/* DumpApp-inspired UI */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface2: #f8faff;
  --border: #e6ebf2;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.1);
  --text: #0f172a;
  --muted: #64748b;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100%;
  overflow-x: hidden;
}
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  touch-action: none;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 720px; margin: 0 auto; padding: 16px; padding-bottom: 32px; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 720px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.logo { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.logo small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.nav-links { display: flex; gap: 8px; flex-shrink: 0; }
.chip {
  padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  white-space: nowrap;
}

/* 首页顶部导航 */
.topbar-inner-stack { justify-content: center; text-align: center; padding-bottom: 10px; }
.site-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 12px 12px;
}
.site-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 68px;
  padding: 10px 6px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: linear-gradient(180deg, #fff, var(--surface2));
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: border-color .2s, background .2s, transform .12s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.site-nav-link:active { transform: scale(.97); }
.site-nav-link:hover {
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}
.site-nav-link.is-active {
  border-color: var(--primary);
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: var(--primary-hover);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.18);
}
.site-nav-icon {
  font-size: 22px;
  line-height: 1;
  filter: saturate(1.1);
}
.site-nav-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
@media (min-width: 480px) {
  .site-nav-text { font-size: 13px; }
  .site-nav-link { min-height: 72px; padding: 12px 8px; }
}

.hero { padding: 24px 0 8px; text-align: center; }
.hero h1 { font-size: clamp(24px, 6vw, 32px); font-weight: 800; margin-bottom: 8px; }
.hero p { color: var(--muted); font-size: 14px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin: 14px 0;
}
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }

.field-block { margin-bottom: 18px; }
.udid-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text); }

/* 应用选择器 */
.app-picker { display: grid; gap: 10px; }
.app-picker-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .12s;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.app-picker-item:active { transform: scale(.985); }
.app-picker-item:hover { border-color: #cbd5e1; background: #fff; }
.app-picker-item.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.app-picker-item input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.app-picker-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(145deg, #e8f0ff, #f0f4fa);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.app-picker-letter { font-size: 22px; font-weight: 800; color: var(--primary); }
.app-picker-icon img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.app-picker-info { flex: 1; min-width: 0; text-align: left; }
.app-picker-name {
  font-size: 16px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-picker-meta {
  font-size: 12px; color: var(--muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-picker-check {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 50%; border: 2px solid var(--border);
  background: #fff; color: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.app-picker-item.active .app-picker-check {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  transform: scale(1.05);
}

.udid-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.udid-row .input-group { width: 100%; min-width: 0; }
@media (min-width: 520px) {
  .udid-row { grid-template-columns: 1fr auto; align-items: center; }
}
.udid-row input, .form-select, .form-input {
  width: 100%; min-width: 0; padding: 14px 15px; border-radius: 12px;
  border: 1.5px solid var(--border); background: #fff; color: var(--text);
  font-size: 16px; max-width: 100%;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color .2s, box-shadow .2s;
}
.form-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
  cursor: pointer;
}
.udid-row input:focus, .form-select:focus, .form-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft), inset 0 1px 2px rgba(15, 23, 42, 0.02);
}
.udid-tip { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.6; }

/* 查询表单 */
.query-form { display: grid; gap: 18px; }
.query-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
}
.query-divider::before, .query-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.input-group { position: relative; }
.input-group-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; color: #94a3b8; pointer-events: none; z-index: 1;
}
.input-group .form-input { padding-left: 46px; }
.form-input-mono {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 15px; letter-spacing: 0.02em;
}
.query-tip {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  font-size: 12px; color: var(--muted); line-height: 1.65;
}
.query-tip strong { color: var(--text); font-weight: 600; }

.packages { display: grid; gap: 12px; }
.pkg {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
  transition: border-color .2s, transform .15s;
}
.pkg:active { transform: scale(.99); }
.pkg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.pkg-name { font-size: 18px; font-weight: 700; }
.pkg-price { font-size: 26px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.pkg-desc { font-size: 13px; color: var(--muted); margin-bottom: 14px; min-height: 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 18px; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 600; cursor: pointer; max-width: 100%;
  transition: opacity .2s, transform .1s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22); }
.btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-udid {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
  white-space: nowrap;
}
.btn-udid:active { transform: scale(.98); opacity: .95; }
.btn-block { width: 100%; }

.loading-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px; gap: 14px; color: var(--muted); font-size: 14px;
}
.spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.5);
  display: none; align-items: flex-end; justify-content: center;
  overscroll-behavior: contain;
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: 440px; max-height: 88vh; overflow: auto;
  background: var(--surface); border-radius: 20px 20px 0 0; padding: 20px 18px 28px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
@media (min-width: 640px) {
  .modal-mask { align-items: center; padding: 20px; }
  .modal { border-radius: 20px; border: 1px solid var(--border); }
}
.modal-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-title { font-size: 18px; font-weight: 800; }
.modal-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.modal-close {
  border: none; background: var(--surface2); width: 34px; height: 34px;
  border-radius: 10px; cursor: pointer; font-size: 16px; flex-shrink: 0;
}

.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; contain: layout style; }
.pay-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 14px 10px;
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
  transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.pay-item:active { transform: scale(.98); }
.pay-item.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-hover);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.pay-item[data-pay="31"].active {
  border-color: #07c160;
  background: rgba(7, 193, 96, 0.1);
  color: #059669;
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.12);
}
.pay-icon { width: 40px; height: 40px; flex-shrink: 0; line-height: 0; }
.pay-icon svg { width: 40px; height: 40px; display: block; }
.pay-label { line-height: 1.2; }

.pay-qr { text-align: center; padding: 10px 0; }
.pay-qr img {
  width: min(220px, 70vw); margin: 0 auto;
  border-radius: 14px; border: 1px solid var(--border); background: #fff; padding: 10px;
}
.pay-hint { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.pay-status { text-align: center; padding: 12px 0 0; font-size: 13px; color: var(--muted); }
.pay-status.checking { color: var(--primary); font-weight: 600; }

.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.status-badge.ok { background: rgba(16,185,129,.12); color: #047857; }
.status-badge.warn { background: rgba(245,158,11,.12); color: #b45309; }
.status-badge.bad { background: rgba(239,68,68,.12); color: #b91c1c; }

.result-box {
  padding: 16px; border-radius: 14px;
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.2);
  font-size: 13px; word-break: break-all;
}
.cert-meta { font-size: 13px; color: var(--muted); margin: 8px 0 14px; line-height: 1.7; }

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(24px);
  background: #0f172a; color: #fff; padding: 12px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 2000; font-size: 13px;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px 16px 36px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 12px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; height: 88px;
}
.progress-wrap { margin: 16px 0 8px; }
.progress-bar {
  height: 8px; border-radius: 999px; background: var(--border); overflow: hidden;
}
.progress-bar > span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: inherit; transition: width .35s ease;
}
.progress-label { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }

/* 在线签名页 — 易能签风格 */
.sign-body { background: linear-gradient(180deg, #eff6ff 0%, var(--bg) 28%, #fff 100%); }
.sign-container { padding-bottom: 48px; }
.sign-udid-card { margin-bottom: 14px; }
.sign-cert-hint { font-size: 12px; color: var(--muted); margin-top: 10px; }
.sign-featured {
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  border: 1px solid rgba(37, 99, 235, .12);
  box-shadow: 0 16px 48px rgba(37, 99, 235, .1);
  margin-bottom: 18px;
  overflow: hidden;
}
.sign-featured-inner { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.sign-featured-icon {
  width: 84px; height: 84px; border-radius: 22px; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; font-size: 34px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .28); overflow: hidden;
}
.sign-featured-icon img { width: 100%; height: 100%; object-fit: cover; }
.sign-featured-badge {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 6px;
}
.sign-featured-info h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sign-featured-info p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.sign-featured-meta { font-size: 12px !important; color: var(--primary) !important; }
.sign-featured-btn { min-height: 50px; font-size: 16px; font-weight: 800; }
.sign-store-head { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 12px; }
.sign-store-head h3 { font-size: 17px; font-weight: 800; }
.sign-store-count { font-size: 12px; color: var(--muted); }
.sign-search-row { display: flex; gap: 8px; margin-bottom: 14px; }
.sign-search-row .form-input { flex: 1; }
.sign-app-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
@media (max-width: 400px) { .sign-app-grid { grid-template-columns: repeat(2, 1fr); } }
.sign-app-item {
  border: 1px solid var(--border); background: var(--surface); border-radius: 16px;
  padding: 12px 8px; text-align: center; cursor: pointer; transition: .15s;
}
.sign-app-item:not(.is-locked):active { transform: scale(.97); border-color: var(--primary); }
.sign-app-item.is-locked { opacity: .55; cursor: not-allowed; }
.sign-app-icon {
  width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 14px;
  background: linear-gradient(145deg, #dbeafe, #eff6ff); position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--primary);
}
.sign-app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sign-app-name { font-size: 12px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.sign-app-ver { font-size: 10px; color: var(--muted); margin-top: 2px; }
.sign-app-action { font-size: 11px; color: var(--primary); font-weight: 700; margin-top: 6px; }
.sign-app-lock { font-size: 10px; color: var(--warn); margin-top: 6px; }
.sign-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 32px 12px; font-size: 13px; }
.sign-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }
.sign-page-info { font-size: 13px; color: var(--muted); }
.sign-result { text-align: center; padding: 8px 0; }
.sign-result-icon {
  width: 88px; height: 88px; margin: 0 auto 14px; border-radius: 22px;
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; font-size: 36px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.sign-result-icon img { width: 100%; height: 100%; object-fit: cover; }
.sign-result-title { font-size: 20px; font-weight: 800; color: var(--success); }
.sign-result-name { font-size: 15px; font-weight: 700; margin-top: 6px; }
.sign-result-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sign-result-actions { display: grid; gap: 10px; margin-top: 18px; }
.sign-result-tip { font-size: 12px; color: var(--muted); margin-top: 14px; line-height: 1.6; }
.sign-modal { max-width: 420px; }

/* 易能签安装落地页 dz.yhios.cn 风格 */
.install-landing-main { max-width: 480px; }
.install-hero { text-align: center; padding: 32px 24px; }
.install-hero-icon {
  width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 22px;
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
  font-size: 40px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 36px rgba(37,99,235,.25); overflow: hidden;
}
.install-hero-icon img { width: 100%; height: 100%; object-fit: cover; }
.install-hero h1 { font-size: 26px; font-weight: 800; }
.install-hero-ver { color: var(--muted); font-size: 14px; margin-top: 4px; }
.install-hero-desc { color: var(--primary); font-weight: 600; font-size: 14px; margin-top: 8px; }
.install-hero-note { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.7; }
.install-hero-btn { min-height: 52px; font-size: 17px; font-weight: 800; margin-top: 4px; }
