/* ============================================================
   闪传 FlashDrop — 视觉基调：深空蓝底 + 冷光靛蓝，唯一强元素是取件码
   移动端优先（375px 起），桌面在 768px 追加
   ============================================================ */

:root {
  --bg: #05070e;
  --bg-deep: #03050b;
  --panel: rgba(13, 18, 32, 0.74);
  --panel-solid: #0b1020;
  --line: rgba(122, 146, 196, 0.16);
  --line-strong: rgba(122, 146, 196, 0.32);
  --text: #e9eef9;
  --muted: #8b95af;
  --muted-dim: #666f88;
  --primary: #4f46e5;
  --primary-hi: #7b78ff;
  --accent: #38e1ff;
  --warn: #f0b23b;
  --danger: #ff6b6b;
  --success: #34d399;

  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --font-sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ================= 背景层（纯装饰，独立定位，不裁正文） ================= */

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.stage-grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(to right, rgba(122, 146, 196, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(122, 146, 196, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 78%);
}

.stage-glow {
  position: absolute;
  top: -26vh;
  left: 50%;
  width: 150vw;
  height: 105vh;
  transform: translateX(-50%);
  /* 椭圆在元素内部完全衰减到透明，避免出现发光的矩形边界 */
  background: radial-gradient(
    ellipse 46% 42% at 50% 46%,
    rgba(79, 70, 229, 0.30) 0%,
    rgba(79, 70, 229, 0.16) 38%,
    rgba(56, 225, 255, 0.05) 58%,
    transparent 76%
  );
  animation: breathe 9s ease-in-out infinite;
}

.stage-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 225, 255, 0.42), transparent);
  opacity: 0.5;
  animation: scan 11s linear infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes scan {
  0% { transform: translateY(-2vh); opacity: 0; }
  12% { opacity: 0.55; }
  88% { opacity: 0.55; }
  100% { transform: translateY(102vh); opacity: 0; }
}

/* ================= 容器 ================= */

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 26px 16px 34px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 14px;
  background: var(--panel-solid);
  border-radius: var(--radius-sm);
  color: var(--text);
  z-index: 99;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ================= 品牌区 ================= */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
}

.brand-text { min-width: 0; flex: 1; }

.brand-text h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.4px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-latin {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.6px;
  color: var(--accent);
  text-transform: uppercase;
  opacity: 0.9;
}

.brand-text p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.ghost-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  background: rgba(122, 146, 196, 0.07);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.ghost-btn:hover { color: var(--text); border-color: var(--line-strong); }
.ghost-btn:focus-visible { outline: 2px solid var(--primary-hi); outline-offset: 2px; }

/* ================= 主控制台 ================= */

.console {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 24px 60px -24px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(79, 70, 229, 0.06);
  overflow: hidden;
}

/* 顶边冷光，作为唯一的结构高光 */
.console::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 120, 255, 0.7), rgba(56, 225, 255, 0.55), transparent);
  pointer-events: none;
}

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 6px;
  border-bottom: 1px solid var(--line);
}

.tab-pill {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc(50% - 6px);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.34), rgba(79, 70, 229, 0.12));
  border: 1px solid rgba(123, 120, 255, 0.45);
  box-shadow: 0 6px 18px -8px rgba(79, 70, 229, 0.7);
  transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.tab-pill.is-right { transform: translateX(100%); }

.tab {
  position: relative;
  z-index: 1;
  min-height: 44px;
  padding: 10px 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.22s;
}
.tab.is-active { color: var(--text); }
.tab:focus-visible { outline: 2px solid var(--primary-hi); outline-offset: 1px; }

.panel { padding: 22px 18px 24px; }

.view[hidden] { display: none; }

/* 上传中保持与拖拽区接近的高度，避免切态时页面整体跳动 */
#sendBusy:not([hidden]) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 196px;
}

.busy-label { font-size: 12px; color: var(--muted); }

/* ================= 发送：拖拽区 ================= */

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 214px;
  padding: 30px 18px 22px;
  font: inherit;
  color: inherit;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(79, 70, 229, 0.14), transparent 70%),
    rgba(9, 13, 25, 0.5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: rgba(123, 120, 255, 0.7);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(79, 70, 229, 0.22), transparent 70%),
    rgba(11, 16, 32, 0.7);
}
.dropzone:focus-visible { outline: 2px solid var(--primary-hi); outline-offset: 3px; }
.dropzone.is-dragover {
  border-color: var(--accent);
  border-style: solid;
  transform: scale(0.995);
}

/* 四角括线：结构表达「接收舱」，不是装饰 */
.corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0 solid rgba(123, 120, 255, 0.85);
}
.corner-tl { top: 8px; left: 8px; border-top-width: 1.5px; border-left-width: 1.5px; }
.corner-tr { top: 8px; right: 8px; border-top-width: 1.5px; border-right-width: 1.5px; }
.corner-bl { bottom: 8px; left: 8px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.corner-br { bottom: 8px; right: 8px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

.dz-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 10px;
  border-radius: 50%;
  color: var(--primary-hi);
  background: radial-gradient(circle at 50% 30%, rgba(79, 70, 229, 0.34), rgba(79, 70, 229, 0.08));
  border: 1px solid rgba(123, 120, 255, 0.32);
  transition: transform 0.24s, color 0.24s;
}
.dropzone:hover .dz-icon { transform: translateY(-2px); color: #a9a7ff; }

.dz-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.dz-sub {
  font-size: 13px;
  color: var(--muted);
}
.dz-sub b { color: var(--text); font-weight: 600; }

.dz-warn {
  margin-top: 10px;
  padding-top: 10px;
  font-size: 11px;
  color: rgba(240, 178, 59, 0.86);
  border-top: 1px solid rgba(240, 178, 59, 0.18);
}

/* ================= 发送：上传中 ================= */

.busy-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.busy-file {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.busy-size {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(122, 146, 196, 0.14);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-hi) 60%, var(--accent));
  box-shadow: 0 0 14px rgba(123, 120, 255, 0.55);
  transition: width 0.18s linear;
}

.busy-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.busy-pct {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.busy-tip {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--muted-dim);
}

/* ================= 发送：取件码（签名元素） ================= */

.done-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.done-label { font-size: 12px; color: var(--muted); letter-spacing: 1px; }

.done-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--warn);
}

.done-timer .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 8px rgba(240, 178, 59, 0.8);
  animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.code-block {
  position: relative;
  padding: 16px 12px 14px;
  border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(79, 70, 229, 0.20), transparent 72%),
    rgba(7, 11, 22, 0.72);
  border: 1px solid rgba(123, 120, 255, 0.28);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.code-block:hover { border-color: rgba(123, 120, 255, 0.55); box-shadow: 0 0 0 1px rgba(123, 120, 255, 0.1), 0 12px 30px -18px rgba(79, 70, 229, 0.9); }
.code-block:focus-visible { outline: 2px solid var(--primary-hi); outline-offset: 3px; }

.code-digits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.code-cell {
  display: grid;
  place-items: center;
  height: 62px;
  font-family: var(--font-mono);
  font-size: clamp(28px, 11vw, 40px);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
  background: linear-gradient(180deg, rgba(123, 120, 255, 0.16), rgba(123, 120, 255, 0.02));
  border: 1px solid rgba(122, 146, 196, 0.22);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  opacity: 0;
  transform: translateY(6px);
  animation: cell-in 0.36s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
  text-shadow: 0 0 18px rgba(123, 120, 255, 0.55);
}

@keyframes cell-in {
  to { opacity: 1; transform: translateY(0); }
}

/* 时间消耗条：把剩余有效期编码成可见长度 */
.code-deplete {
  margin-top: 12px;
  height: 2px;
  border-radius: 2px;
  background: rgba(122, 146, 196, 0.12);
  overflow: hidden;
}
.code-deplete > i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--warn), rgba(240, 178, 59, 0.35));
  transition: width 1s linear;
}

.code-copy-hint {
  display: block;
  margin-top: 10px;
  text-align: center;
  font-size: 11px;
  color: var(--muted-dim);
  letter-spacing: 0.6px;
}

.done-file {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.done-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

/* ================= 按钮 ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 12px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:focus-visible { outline: 2px solid var(--primary-hi); outline-offset: 2px; }
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #605ae8, var(--primary));
  border-color: rgba(123, 120, 255, 0.55);
  box-shadow: 0 10px 26px -14px rgba(79, 70, 229, 0.95), 0 1px 0 rgba(255, 255, 255, 0.16) inset;
}
.btn--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #7470f4, #5a51ea);
  box-shadow: 0 14px 30px -14px rgba(79, 70, 229, 1), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
.btn--primary:disabled {
  cursor: not-allowed;
  color: rgba(233, 238, 249, 0.42);
  background: rgba(122, 146, 196, 0.12);
  border-color: rgba(122, 146, 196, 0.14);
  box-shadow: none;
}

.btn--ghost {
  color: var(--text);
  background: rgba(122, 146, 196, 0.08);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--line-strong); background: rgba(122, 146, 196, 0.14); }

.btn--wide { width: 100%; margin-top: 18px; }

/* ================= 接收 ================= */

.receive-label {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.8px;
  color: var(--muted);
}

.otp {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.otp-cell {
  width: 100%;
  height: 66px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  caret-color: var(--accent);
  background: linear-gradient(180deg, rgba(122, 146, 196, 0.10), rgba(122, 146, 196, 0.02));
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  -webkit-appearance: none;
  appearance: none;
}
.otp-cell:focus {
  outline: none;
  border-color: rgba(123, 120, 255, 0.8);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.22), rgba(79, 70, 229, 0.04));
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}
.otp-cell:disabled { opacity: 0.6; }

.receive-tip {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted-dim);
  text-align: center;
}

/* ================= 合规提示 ================= */

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(240, 178, 59, 0.22);
  background: rgba(240, 178, 59, 0.07);
  color: rgba(240, 178, 59, 0.92);
}
.notice svg { flex: none; margin-top: 2px; }
.notice p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(229, 219, 196, 0.78);
}
.notice b { color: rgba(240, 178, 59, 0.95); margin-right: 6px; }

/* ================= 常见问题 ================= */

.faq {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.faq-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}

.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  position: relative;
  padding: 11px 24px 11px 0;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1;
  color: var(--muted);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:focus-visible { outline: 2px solid var(--primary-hi); outline-offset: 2px; }

.faq-item p {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* ================= 页脚 ================= */

.site-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 11px;
  color: var(--muted-dim);
}

.foot-brand { margin: 0 0 8px; letter-spacing: 0.3px; }

.foot-links {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.link-btn {
  min-height: 32px;
  padding: 4px 2px;
  font: inherit;
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.2s;
}
.link-btn:hover { color: var(--primary-hi); }
.link-btn:focus-visible { outline: 2px solid var(--primary-hi); outline-offset: 2px; }

.sep { color: rgba(122, 146, 196, 0.3); }

.foot-legal {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  line-height: 1.7;
}

.foot-legal a {
  color: var(--muted-dim);
  text-decoration: none;
}
.foot-legal a:hover { color: var(--muted); }

.police-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.police-link img { width: 16px; height: 17px; display: block; }

/* ================= 弹窗 ================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 12, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0d1324, #080c17);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
  animation: panel-in 0.24s ease-out;
  overflow: hidden;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 700; }

.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: rgba(122, 146, 196, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn:focus-visible { outline: 2px solid var(--primary-hi); outline-offset: 2px; }

.modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #c3cbdd;
}

.modal-body h3 {
  margin: 16px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin: 0 0 8px; }
.modal-body ul { margin: 6px 0 10px; padding-left: 18px; }
.modal-body li { margin-bottom: 4px; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}

/* 表单 */
.field-group { border: 0; margin: 0 0 14px; padding: 0; }
.field-group legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }

.radio {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
  color: #c3cbdd;
  background: rgba(122, 146, 196, 0.07);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.radio input { accent-color: var(--primary-hi); margin: 0; }
.radio:has(input:checked) {
  border-color: rgba(123, 120, 255, 0.7);
  background: rgba(79, 70, 229, 0.2);
  color: var(--text);
}

.field { display: block; margin-bottom: 14px; }
.field-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.field-label em {
  font-style: normal;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted-dim);
}

.field textarea,
.field input {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: rgba(6, 10, 20, 0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
}
.field textarea:focus,
.field input:focus {
  outline: none;
  border-color: rgba(123, 120, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}
.field ::placeholder { color: var(--muted-dim); }

/* ================= Toast ================= */

.toast-stack {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text);
  background: rgba(13, 18, 32, 0.94);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--muted);
  border-radius: 10px;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: toast-in 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
  pointer-events: auto;
}

.toast.is-out { animation: toast-out 0.24s ease-in forwards; }
.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warn); }
.toast--info { border-left-color: var(--accent); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-8px); }
}

/* ================= 错误页 ================= */

.is-error .shell { padding-top: 12vh; }

.console--error { padding: 0; }

.error-body {
  padding: 34px 22px 30px;
  text-align: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(123, 120, 255, 0.85);
  text-shadow: 0 0 26px rgba(79, 70, 229, 0.5);
}

.error-title {
  margin: 6px 0 10px;
  font-size: 19px;
  font-weight: 700;
}

.error-text {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

.error-body .btn { text-decoration: none; display: inline-flex; }

/* ================= 通用 ================= */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ================= 桌面扩展 ================= */

@media (min-width: 768px) {
  /* 宽屏下把内容整体落到视觉中心，避免单卡片页面下方出现大片空白 */
  .shell {
    padding: clamp(40px, calc((100vh - 640px) / 2), 110px) 24px 44px;
  }
  .brand { margin-bottom: 26px; }
  .brand-text h1 { font-size: 23px; }
  .panel { padding: 28px 26px 30px; }
  .dropzone { min-height: 240px; padding: 38px 24px 26px; }
  .code-cell { height: 72px; font-size: 42px; }
}

/* ================= 降低动效 ================= */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .stage-scan, .stage-glow { display: none; }
  .code-cell { opacity: 1; transform: none; }
}
