/* ══════════════════════════════════════════
   Design Tokens — Light Clear Service UI
   目标：浅色背景、少卡片化、信息清楚、移动端友好
══════════════════════════════════════════ */
:root {
  --bg: #f6f8fc;
  --bg-soft: #eef4ff;
  --surface: rgba(255,255,255,0.92);
  --surface-solid: #ffffff;
  --surface-2: #f9fbff;
  --surface-3: #f1f5fb;

  --border: #e3e8f2;
  --border-strong: #cfd8e8;

  --accent: #4f67f5;
  --accent-hover: #3f53d9;
  --accent-bright: #6076ff;
  --accent-dim: rgba(79,103,245,0.11);
  --accent-glow: rgba(79,103,245,0.16);
  --accent-light: #eef2ff;

  --cyan: #0ea5c6;
  --ok: #13a874;
  --ok-dim: rgba(19,168,116,0.10);
  --warn: #d9901d;
  --warn-dim: rgba(217,144,29,0.12);
  --danger: #df4a4a;
  --danger-dim: rgba(223,74,74,0.10);

  --text: #172033;
  --text-2: #4e5c72;
  --text-3: #8793a7;

  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 18px;
  --radius-xl: 22px;
  --radius-2xl: 28px;

  --shadow-s: 0 1px 2px rgba(23,32,51,0.04), 0 8px 24px rgba(23,32,51,0.05);
  --shadow-m: 0 2px 8px rgba(23,32,51,0.06), 0 16px 42px rgba(23,32,51,0.08);
  --shadow-xl: 0 18px 54px rgba(23,32,51,0.10);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv01','cv03','cv04','cv11';
  min-height: 100vh;
}

body {
  padding: 30px 16px 72px;
  background-image:
    radial-gradient(ellipse 82% 44% at 50% -12%, rgba(79,103,245,0.16) 0%, rgba(79,103,245,0.06) 38%, transparent 70%),
    radial-gradient(ellipse 46% 34% at 100% 18%, rgba(14,165,198,0.10) 0%, transparent 62%),
    linear-gradient(180deg, #f5f8ff 0%, #f7f8fb 48%, #f4f6fa 100%);
  background-attachment: fixed;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Hero：浅色品牌区，不再使用黑色大背景 ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 30px 28px 26px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(245,248,255,0.96) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  margin-bottom: 12px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #7c6df2 50%, var(--cyan) 100%);
}
.hero::after {
  content: '';
  position: absolute;
  top: -86px;
  right: -88px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,103,245,0.14) 0%, rgba(14,165,198,0.08) 44%, transparent 70%);
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-light);
  border: 1px solid rgba(79,103,245,0.16);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-hover);
  letter-spacing: .10em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(79,103,245,0.12);
}
.hero h1 {
  margin: 0 0 9px;
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.14;
  color: var(--text);
}
.hero p {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.75;
}

/* ── Section Panel：保留层级，但弱化“到处都是卡片”的感觉 ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 21px 22px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(23,32,51,0.03);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-s);
  background: var(--surface-solid);
}

.title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 15px;
  background: linear-gradient(180deg, var(--accent), var(--cyan));
  border-radius: 999px;
  flex-shrink: 0;
}

/* ── Form ── */
.query { display: flex; gap: 9px; align-items: stretch; }

.input, .textarea {
  width: 100%;
  padding: 12px 15px;
  background: #fbfcff;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
  min-height: 48px;
  letter-spacing: -0.01em;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus {
  border-color: rgba(79,103,245,0.72);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input:hover:not(:focus), .textarea:hover:not(:focus) {
  border-color: var(--border-strong);
  background: #fff;
}
.textarea { min-height: 118px; resize: vertical; }

/* ── Buttons ── */
.btn {
  border: none;
  border-radius: var(--radius-s);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
  white-space: nowrap;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
  min-height: 48px;
  position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #6d5df3 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(79,103,245,0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  box-shadow: 0 10px 26px rgba(79,103,245,0.32);
}

.btn-light {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-light:hover {
  border-color: rgba(79,103,245,0.32);
  color: var(--accent-hover);
  background: var(--accent-light);
}
.btn-row { display: flex; gap: 9px; margin-top: 16px; flex-wrap: wrap; }

/* ── Info：用分隔线承载信息，不再做多层卡片 ── */
.info { display: grid; }
.info-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 6px 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.info-row:first-child { padding-top: 2px; }
.info-row:last-child { border-bottom: none; padding-bottom: 2px; }
.k { color: var(--text-3); font-size: 12px; font-weight: 700; padding-top: 1px; }
.v { font-size: 13px; color: var(--text); word-break: break-all; line-height: 1.65; font-weight: 550; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.68;
  flex-shrink: 0;
}
.unused  { background: rgba(19,168,116,0.12); color: #0c7f5a; border: 1px solid rgba(19,168,116,0.18); }
.used    { background: rgba(223,74,74,0.10); color: #b42332; border: 1px solid rgba(223,74,74,0.18); }
.running { background: var(--accent-light); color: var(--accent-hover); border: 1px solid rgba(79,103,245,0.18); }
.paused  { background: rgba(217,144,29,0.12); color: #925f0e; border: 1px solid rgba(217,144,29,0.20); }

/* ── Notices ── */
.notice {
  display: none;
  padding: 12px 15px;
  border-radius: var(--radius-s);
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.65;
  border: 1px solid transparent;
  font-weight: 600;
}
.notice.show { display: block; animation: rise 0.18s ease; }
.notice.ok { background: var(--ok-dim); color: #0c7f5a; border-color: rgba(19,168,116,0.20); }
.notice.err { background: var(--danger-dim); color: #b42332; border-color: rgba(223,74,74,0.20); }

/* ── Content blocks ── */
.blockText { font-size: 14px; color: var(--text-2); line-height: 1.9; white-space: pre-wrap; margin-top: 10px; }
.img { width: 100%; border-radius: var(--radius-s); border: 1px solid var(--border); display: block; margin-top: 12px; }

.jump {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 15px 22px;
  border-radius: var(--radius-m);
  background: linear-gradient(135deg, var(--accent) 0%, #6d5df3 56%, var(--cyan) 100%);
  border: none;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  margin-top: 14px;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  box-shadow: 0 10px 26px rgba(79,103,245,0.28);
  cursor: pointer;
}
.jump:hover { box-shadow: 0 14px 34px rgba(79,103,245,0.34); transform: translateY(-1px); }
.jump::after { content: '→'; margin-left: 6px; font-size: 16px; position: relative; }

/* ── Loading ── */
.loading-card {
  text-align: center;
  padding: 42px 20px;
  color: var(--text-3);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

@keyframes dot1 { 0%,60%,100%{opacity:.2;transform:scale(.7)} 20%{opacity:1;transform:scale(1)} }
@keyframes dot2 { 0%,20%,80%,100%{opacity:.2;transform:scale(.7)} 40%{opacity:1;transform:scale(1)} }
@keyframes dot3 { 0%,40%,100%{opacity:.2;transform:scale(.7)} 60%{opacity:1;transform:scale(1)} }

/* ── Self supplement ── */
.supplement-status-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.75;
  padding: 12px 15px;
  background: var(--accent-light);
  border-radius: var(--radius-s);
  border: 1px solid rgba(79,103,245,0.18);
  border-left: 3px solid var(--accent);
  margin-top: 4px;
}

.hidden { display: none !important; }

/* ── Animations ── */
@keyframes rise { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ── Responsive ── */
@media (max-width: 600px) {
  body { padding: 16px 12px 56px; }
  .hero { padding: 25px 21px 23px; border-radius: var(--radius-xl); }
  .hero h1 { font-size: 23px; }
  .card { padding: 18px; }
  .query, .btn-row { flex-direction: column; }
  .info-row { grid-template-columns: 80px 1fr; }
  .btn { width: 100%; min-height: 46px; }
}

/* =====================================================
   Fix Pack r4 — 用户端稳定性与轻量 UI 调整
===================================================== */
[v-cloak] { display: none !important; }
.current-code-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.notice.err.show,
.notice.ok.show { word-break: break-word; }
.card .notice:last-child { margin-bottom: 0; }
.info-row .v a,
.v { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .hero { margin-bottom: 10px; }
  .card { margin-bottom: 8px; }
  .title { margin-bottom: 12px; }
  .info-row { padding: 9px 0; }
}
/* r4: 用户端原生 JS 版补充样式 */
[hidden] { display: none !important; }
.current-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.current-code-text { font-size: 13px; color: var(--text-2); }
.current-code-text strong { color: var(--text); font-size: 15px; letter-spacing: .04em; }
.btn-compact { padding: 8px 16px; font-size: 13px; min-height: 38px; }
.inline-notice { margin-top: 12px; margin-bottom: 0; }
.loading-dots { display: inline-flex; gap: 3px; align-items: center; margin-left: 4px; }
.loading-dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.loading-dots span:nth-child(1) { animation: dot1 1.2s ease infinite 0s; }
.loading-dots span:nth-child(2) { animation: dot2 1.2s ease infinite .2s; }
.loading-dots span:nth-child(3) { animation: dot3 1.2s ease infinite .4s; }
.empty-line { padding: 10px 0; color: var(--text-3); font-size: 13px; }
@media (max-width: 600px) {
  .current-code { align-items: stretch; }
  .btn-compact { width: 100%; min-height: 42px; }
}

/* =====================================================
   Fix Pack r5 — 用户端百分比进度条
===================================================== */
.progressMini {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.progressTop {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.progressTop strong {
  font-size: 16px;
  font-weight: 900;
  color: var(--accent-hover);
  letter-spacing: -0.02em;
}
.progressTop span {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.progressTrack {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f8;
  border: 1px solid rgba(203,213,225,0.72);
}
.progressTrack i {
  display: block;
  height: 100%;
  min-width: 6px;
  max-width: 100%;
  border-radius: inherit;
  transition: width .24s ease;
  background: linear-gradient(90deg, var(--accent), #6d5df3);
}
.progress-warm .progressTrack i { background: linear-gradient(90deg, #4f67f5, #0ea5c6); }
.progress-done .progressTrack i { background: linear-gradient(90deg, #13a874, #20c997); }
.progress-done .progressTop strong { color: #0c7f5a; }
@media (max-width: 600px) {
  .progressTop { align-items: flex-start; }
  .progressTop span { width: 100%; }
}

/* =====================================================
   Fix Pack r7 — 用户端进度精简 + 点击复制
===================================================== */
.info-row {
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 6px 12px;
  padding: 10px 0;
  align-items: center;
}
.k {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-3);
  font-weight: 800;
  white-space: nowrap;
  padding-top: 0;
}
.v {
  font-size: 14px;
  line-height: 1.55;
  font-weight: 700;
}
.progressMini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.progressTop { display: none !important; }
.progressPercent {
  min-width: 44px;
  text-align: right;
  font-size: 15px;
  font-weight: 900;
  color: var(--accent-hover);
  letter-spacing: -0.02em;
}
.progressTrack {
  height: 10px;
  background: #eef2f8;
}
.progressTrack i { min-width: 0; }
.progress-done .progressPercent { color: #0c7f5a; }
.copyInline {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.55;
  letter-spacing: .01em;
  text-align: left;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  word-break: break-all;
}
.copyInline em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 11px;
  font-weight: 850;
  color: var(--accent-hover);
  background: var(--accent-light);
  border: 1px solid rgba(79,103,245,.16);
  border-radius: 999px;
  padding: 2px 7px;
}
.copyInline.copied em {
  color: #0c7f5a;
  background: rgba(19,168,116,.10);
  border-color: rgba(19,168,116,.18);
}
.copySuffix {
  display: inline-flex;
  margin-left: 8px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 520px) {
  body { padding-left: 12px; padding-right: 12px; }
  .card { padding: 18px 18px; }
  .info-row { grid-template-columns: 56px minmax(0, 1fr); gap: 6px 10px; }
  .k { font-size: 12px; }
  .v, .copyInline { font-size: 14px; }
  .progressPercent { min-width: 40px; font-size: 14px; }
  .copyInline { align-items: flex-start; flex-direction: column; gap: 4px; }
}


/* =====================================================
   Fix Pack 2026-05-13 r8
   目标：用户端复制交互去按钮化，修复流水号 HTML 露出后的样式兜底。
===================================================== */
.copyInline {
  width: auto;
  max-width: 100%;
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-weight: 850;
  letter-spacing: .01em;
  text-align: left;
  word-break: break-all;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(79,103,245,.12);
}
.copyInline::after {
  content: '';
  display: none;
}
.copyInline em { display: none !important; }
.copyInline.copied {
  color: var(--accent-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.copyToast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .88);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(17,24,39,.24);
  transition: opacity .16s ease, transform .16s ease;
}
.copyToast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 520px) {
  .copyInline { display: inline; font-size: 14px; }
}

/* UX Refinement r9 — calmer status colors and smoother copy/progress */
.used {
  background: rgba(79,103,245,0.10) !important;
  color: #3045bf !important;
  border: 1px solid rgba(79,103,245,0.18) !important;
}
.failed {
  background: rgba(223,74,74,0.10) !important;
  color: #b42332 !important;
  border: 1px solid rgba(223,74,74,0.18) !important;
}
.running {
  background: rgba(79,103,245,0.10) !important;
  color: #3045bf !important;
  border: 1px solid rgba(79,103,245,0.18) !important;
}
.progress-run .progressTrack i { background: linear-gradient(90deg, #4f67f5, #6b7cff); }
.progressTrack { overflow: hidden; border-radius: 999px; }
.progressTrack i { display: block; height: 100%; border-radius: inherit; transition: width .22s ease; }
.copyInline {
  cursor: pointer;
  word-break: break-all;
}
.copyInline::after { content: '点击复制'; }
@media (max-width: 640px) {
  .info-row { align-items: flex-start; }
  .progressMini { gap: 8px; }
  .progressPercent { min-width: 38px; }
}

/* r12 brand personalization */
.brand-logo{
  display:block;
  max-width:120px;
  max-height:56px;
  object-fit:contain;
  margin:0 0 14px;
}
.public-notice{
  color:var(--text-2);
  border-left:4px solid var(--accent);
  padding:14px 16px;
}
.public-footer{
  max-width:560px;
  margin:14px auto 0;
  text-align:center;
  color:var(--text-3);
  display:grid;
  gap:6px;
  font-size:13px;
}
.public-footer a{color:var(--accent);font-weight:800;text-decoration:none;}
.public-footer small{font-size:12px;color:var(--text-3);}

/* =====================================================
   r15 — 用户端扫码、备注与整体轻量化
===================================================== */
body {
  padding-top: 24px;
}
.hero {
  padding: 24px 24px 22px;
  margin-bottom: 10px;
  border-radius: 24px;
  box-shadow: 0 12px 36px rgba(23,32,51,0.08), 0 2px 8px rgba(23,32,51,0.04);
}
.hero::after {
  top: -100px;
  right: -110px;
  width: 220px;
  height: 220px;
  opacity: .86;
}
.hero-tag {
  padding: 4px 10px;
  margin-bottom: 12px;
  font-size: 10px;
  letter-spacing: .08em;
}
.hero h1 {
  margin-bottom: 7px;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.035em;
}
.hero p {
  font-size: 13px;
  line-height: 1.65;
  color: #5b667a;
}
.public-notice {
  padding: 13px 15px;
  border-left-width: 3px;
  background: rgba(255,255,255,.9);
  color: #556176;
  box-shadow: 0 1px 2px rgba(23,32,51,0.025);
}
.query-scan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}
.query-actions {
  display: grid;
  grid-template-columns: auto auto;
  gap: 9px;
}
.field-block {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.field-label {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.submit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.submit-actions .btn {
  width: 100%;
}
.submit-main {
  grid-column: 1 / -1;
}
.btn-soft {
  color: var(--accent-hover);
  background: linear-gradient(135deg, rgba(79,103,245,.11), rgba(14,165,198,.08));
  border: 1px solid rgba(79,103,245,.20);
  box-shadow: 0 6px 16px rgba(79,103,245,.08);
}
.btn-soft:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #6d5df3);
  border-color: rgba(79,103,245,.20);
  box-shadow: 0 10px 24px rgba(79,103,245,.22);
}
.scan-open {
  overflow: hidden;
}
.scan-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(10px);
}
.scan-modal[hidden] { display: none !important; }
.scan-panel {
  width: min(100%, 430px);
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(226,232,240,.92);
  box-shadow: 0 24px 70px rgba(15,23,42,.24);
}
.scan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
}
.scan-head strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.scan-video-wrap {
  position: relative;
  margin: 16px;
  height: 300px;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #111827, #1f2937);
}
.scan-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scan-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,.82);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(15,23,42,.20), 0 0 34px rgba(96,118,255,.22) inset;
  pointer-events: none;
}
.scan-frame::before,
.scan-frame::after {
  content: '';
  position: absolute;
  left: 13%;
  right: 13%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
}
.scan-frame::before { top: 32%; }
.scan-frame::after { bottom: 32%; }
.scan-tip {
  padding: 0 18px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 1.6;
}
.scan-upload-btn {
  width: calc(100% - 32px);
  margin: 14px 16px 16px;
}
@media (max-width: 600px) {
  body { padding-top: 14px; }
  .hero {
    padding: 21px 19px 19px;
    border-radius: 22px;
  }
  .hero-tag { margin-bottom: 10px; }
  .hero h1 { font-size: 21px; }
  .hero p { font-size: 12.5px; }
  .query-scan {
    grid-template-columns: 1fr;
  }
  .query-actions {
    grid-template-columns: 1fr 1fr;
  }
  .submit-actions {
    grid-template-columns: 1fr 1fr;
  }
  .scan-modal {
    align-items: end;
    padding: 12px;
  }
  .scan-panel {
    border-radius: 22px;
  }
  .scan-video-wrap {
    height: min(62vh, 330px);
    margin: 14px;
  }
}
@media (max-width: 360px) {
  .query-actions,
  .submit-actions {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   r15.1 hotfix — 老库兼容、扫码性能与扫码界面优化
===================================================== */
.hero {
  padding: 21px 22px 19px;
  margin-bottom: 9px;
}
.hero-tag {
  margin-bottom: 10px;
}
.hero h1 {
  font-size: 22px;
  line-height: 1.18;
}
.hero p {
  font-size: 12.5px;
  line-height: 1.55;
}
.scan-panel {
  width: min(100%, 420px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
}
.scan-head {
  padding: 13px 15px;
}
.scan-video-wrap {
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: min(58vh, 380px);
  margin: 12px 16px 8px;
  border-radius: 18px;
  background: #0b1220;
}
.scan-frame {
  width: 70%;
  border-radius: 16px;
  border-color: rgba(255,255,255,.88);
  box-shadow: 0 0 0 999px rgba(2,6,23,.18), 0 0 0 1px rgba(255,255,255,.18) inset;
}
.scan-frame::before,
.scan-frame::after {
  display: none;
}
.scan-tip {
  min-height: 22px;
  padding: 4px 18px 2px;
  font-size: 12.5px;
  font-weight: 700;
}
.scan-upload-btn {
  margin-top: 12px;
}
@media (max-width: 600px) {
  body { padding-top: 12px; }
  .hero {
    padding: 18px 17px 16px;
    border-radius: 20px;
  }
  .hero h1 { font-size: 20px; }
  .hero p { font-size: 12px; }
  .scan-modal {
    padding: 0;
    align-items: stretch;
    place-items: stretch;
    background: #0b1220;
    backdrop-filter: none;
  }
  .scan-panel {
    width: 100%;
    max-height: none;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
    background: #0b1220;
    box-shadow: none;
  }
  .scan-head {
    padding: calc(env(safe-area-inset-top, 0px) + 13px) 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.10);
    background: rgba(15,23,42,.96);
  }
  .scan-head strong { color: #fff; }
  .scan-head .btn {
    width: auto;
    min-height: 36px;
    padding: 0 14px;
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.10);
    color: #fff;
  }
  .scan-video-wrap {
    flex: 1 1 auto;
    height: auto;
    max-height: none;
    margin: 0;
    border-radius: 0;
    aspect-ratio: auto;
  }
  .scan-frame {
    width: min(68vw, 290px);
  }
  .scan-tip {
    color: rgba(255,255,255,.86);
    background: #0b1220;
    padding: 12px 18px 6px;
  }
  .scan-upload-btn {
    width: calc(100% - 32px);
    margin: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.10);
    color: #fff;
  }
}

/* =====================================================
   r15.2 — 卡密信息收口、换卡密内嵌、链接截断复制
===================================================== */
.page {
  padding-bottom: calc(42px + env(safe-area-inset-bottom, 0px));
}
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.card-title-row .title { margin: 0; }
.btn-mini {
  min-height: 32px;
  padding: 0 13px;
  width: auto;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}
.inline-query {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin: 8px 0 12px;
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248,250,252,.92), rgba(255,255,255,.86));
}
.inline-query[hidden] { display: none !important; }
.inline-query-actions {
  display: grid;
  grid-template-columns: .75fr 1fr;
  gap: 10px;
}
.info-card { overflow: hidden; }
.info-modern {
  border-top: 1px solid rgba(226,232,240,.9);
}
.info-modern .info-row {
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 8px 10px;
  padding: 12px 0;
  align-items: center;
}
.info-modern .k {
  font-size: 13px;
  color: #8996aa;
  font-weight: 900;
  letter-spacing: 0;
}
.info-modern .v {
  min-width: 0;
  font-size: 15px;
  line-height: 1.48;
  font-weight: 800;
  color: #111827;
  word-break: normal;
  overflow-wrap: anywhere;
}
.info-modern .row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 42px;
}
.infoCode {
  font-size: 17px;
  letter-spacing: .02em;
  word-break: break-all;
}
.copyBtn {
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(248,250,252,.96);
  color: #526175;
  border-radius: 999px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.copyBtn:active { transform: scale(.98); }
.linkClamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
  overflow-wrap: anywhere;
  color: #182235;
  font-weight: 800;
}
.info-row-link .v {
  font-size: 14px;
  line-height: 1.48;
  font-weight: 750;
}
.progressMini {
  width: 100%;
}
@media (max-width: 600px) {
  .hero {
    padding: 18px 18px 16px;
    margin-bottom: 8px;
  }
  .hero h1 { font-size: 19px; }
  .hero p { font-size: 12px; }
  .hero-tag {
    padding: 4px 9px;
    font-size: 10px;
  }
  .card-title-row { margin-bottom: 8px; }
  .inline-query-actions { grid-template-columns: .75fr 1fr; }
  .info-modern .info-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 7px 8px;
    padding: 11px 0;
  }
  .info-modern .v { font-size: 15px; }
  .infoCode { font-size: 16px; }
  .copyBtn {
    min-height: 27px;
    padding: 0 9px;
    font-size: 11.5px;
  }
  .textarea { min-height: 130px; }
  .submit-actions { margin-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
.info-modern .row-actions { gap: 6px; }
.switchCodeBtn {
  color: var(--accent-hover);
  background: rgba(79,103,245,.08);
  border-color: rgba(79,103,245,.20);
}
