/* ============================================================
   鸿雁传书 · 无限结界 — 复古通信风格样式
   北邮 96 无线 · 毕业三十周年
   ============================================================ */
:root {
  --ink: #050d1c;
  --navy: #0d2244;
  --navy-2: #123a6b;
  --cream: #f2ead9;
  --cream-dim: #cdc3ad;
  --muted: #8fa3c4;
  --accent: #e8681f;
  --amber: #ffab3d;
  --lcd: #7cf0a8;
  --bad: #ff7a7a;
  --line: rgba(180, 205, 245, 0.18);
  --panel: rgba(9, 20, 40, 0.86);
  --plastic: linear-gradient(180deg, #efe7d6 0%, #ddd2ba 55%, #c9bda3 100%);
  --plastic-dark: linear-gradient(180deg, #2a3448 0%, #1a2233 60%, #111827 100%);
  --radius: 16px;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--cream);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.page-game { overflow: hidden; height: 100dvh; }
body.page-game .app {
  height: 100dvh; max-width: 1380px; margin: 0 auto;
  padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 10px;
  position: relative; z-index: 1; overflow: hidden;
}
body.page-game .topbar { margin-bottom: 0; flex: 0 0 auto; }
body.page-game .wrap { padding: 0; }

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { color: #fff3dd; }

/* ---------- 背景装饰：电路板 + 电波 ---------- */
.bg-deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-deco::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 720px at 15% -5%, rgba(18, 58, 107, 0.62), transparent 62%),
    radial-gradient(900px 640px at 95% 8%, rgba(232, 104, 31, 0.16), transparent 58%),
    radial-gradient(900px 700px at 50% 115%, rgba(18, 58, 107, 0.35), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 4px),
    #071122;
}
.deco-circuit {
  position: absolute; inset: 0;
  opacity: .5;
  background-image:
    linear-gradient(90deg, rgba(120, 170, 235, 0.10) 1px, transparent 1px),
    linear-gradient(0deg, rgba(120, 170, 235, 0.08) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px;
  mask-image: radial-gradient(1200px 800px at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(1200px 800px at 50% 30%, #000 20%, transparent 78%);
}
.deco-waves {
  position: absolute; right: -180px; top: 40px; width: 620px; height: 620px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 26%, rgba(255, 171, 61, 0.10) 26% 27%, transparent 27% 40%,
      rgba(255, 171, 61, 0.08) 40% 41%, transparent 41% 54%, rgba(255, 171, 61, 0.06) 54% 55%, transparent 55%);
  animation: wave 6s ease-in-out infinite;
}
@keyframes wave { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.06); opacity: 1; } }

.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 20px 18px 60px; }
.wrap.wide { max-width: 1320px; }

/* ---------- 顶栏 ---------- */
.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.badge-sticker {
  width: 62px; height: 62px; object-fit: contain; border-radius: 50%;
  background: #fff; padding: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5), 0 0 0 2px rgba(255, 255, 255, .18);
}
.brand-text h1 {
  margin: 0; font-size: clamp(17px, 2.4vw, 24px); letter-spacing: 3px; color: #fff6e6;
  text-shadow: 0 0 18px rgba(255, 171, 61, .35);
}
.brand-sub { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.brand-sub em { font-style: normal; color: var(--amber); letter-spacing: 1px; }

.nav { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.nav a, .nav button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--cream);
  font-family: inherit; transition: .18s;
}
.nav a:hover, .nav button:hover { border-color: var(--accent); color: var(--amber); text-decoration: none; transform: translateY(-1px); }
.nav a.active { background: linear-gradient(180deg, #f08a3c, #d0551a); border-color: #ffb877; color: #1b0d02; font-weight: 700; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; cursor: pointer; font-family: inherit;
  font-size: 14.5px; font-weight: 700; letter-spacing: 1px;
  color: #1b0d02;
  background: linear-gradient(180deg, #ffb15c, #e8681f 60%, #c8551a);
  border: 1px solid #ffc98c;
  box-shadow: 0 4px 0 #8f3a10, 0 8px 20px rgba(0, 0, 0, .45);
  transition: .14s;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #8f3a10; }
.btn.ghost {
  background: rgba(255, 255, 255, .05); color: var(--cream);
  border-color: var(--line); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn.danger { background: linear-gradient(180deg, #ff9a9a, #d24848); border-color: #ffc4c4; box-shadow: 0 4px 0 #7d2020; }
.btn.sm { padding: 7px 13px; font-size: 12.5px; box-shadow: none; border-radius: 8px; }
.btn.xl { padding: 15px 40px; font-size: 17px; letter-spacing: 3px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.center { justify-content: center; }
.hidden { display: none !important; }

/* ============================================================
   欢迎页：老式无线电台
   ============================================================ */
.welcome { display: grid; place-items: center; padding: 8px 0 40px; }
.welcome.hidden { display: none; }

.radio-set {
  width: min(980px, 100%);
  background: var(--plastic);
  border-radius: 26px;
  padding: 22px;
  color: #23303f;
  border: 1px solid #fffdf5;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, .6),
    inset 0 2px 0 rgba(255, 255, 255, .9),
    inset 0 -10px 26px rgba(120, 100, 60, .35);
  display: grid;
  gap: 18px;
}
.radio-face { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.radio-brand { display: flex; flex-direction: column; line-height: 1.15; }
.rb-1 { font-size: 26px; font-weight: 800; letter-spacing: 3px; color: var(--navy-2); }
.rb-2 { font-size: 13px; letter-spacing: 5px; color: #a8642a; }
.speaker {
  flex: 1; min-width: 200px; height: 62px; border-radius: 12px;
  background:
    radial-gradient(circle at 4px 4px, rgba(35, 48, 63, .55) 1.6px, transparent 1.7px) 0 0 / 11px 11px,
    linear-gradient(180deg, #cbbfa4, #b6a888);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .45), inset 0 -2px 0 rgba(255, 255, 255, .35);
}
.radio-knobs { display: flex; align-items: center; gap: 16px; }
.knob-box { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10.5px; letter-spacing: 1px; color: #6b6350; }
.knob {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #6a7488, #2b3446 62%, #161d29);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .5), inset 0 -2px 4px rgba(0, 0, 0, .6), inset 0 2px 3px rgba(255, 255, 255, .25);
  display: grid; place-items: center;
}
.knob i { width: 3px; height: 15px; background: #ffd9a0; border-radius: 2px; transform: translateY(-8px); }
.vu { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10.5px; color: #6b6350; letter-spacing: 1px; }
.vu-scale {
  display: flex; align-items: flex-end; gap: 3px; height: 46px; padding: 5px 7px;
  background: linear-gradient(180deg, #2f3a2c, #1c2419); border-radius: 6px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .7);
}
.vu-scale i { display: block; width: 6px; height: var(--v); background: linear-gradient(180deg, #b6ff7a, #4fbf3f); border-radius: 2px; box-shadow: 0 0 8px rgba(140, 255, 120, .5); }

.radio-screen {
  position: relative;
  background: linear-gradient(180deg, #0a1a12, #06120c);
  border-radius: 14px;
  padding: 16px 18px;
  border: 2px solid #16241b;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .8), inset 0 0 90px rgba(40, 120, 60, .18);
  min-height: 210px;
}
.radio-screen::after {
  content: ''; position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px);
}
.screen-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 3px; color: var(--lcd);
  border-bottom: 1px dashed rgba(124, 240, 168, .35); padding-bottom: 8px; margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(124, 240, 168, .6);
}
.screen-head .screen-freq { margin-left: auto; font-size: 11px; opacity: .75; }
.dot-led { width: 9px; height: 9px; border-radius: 50%; background: #ff5b4a; box-shadow: 0 0 12px #ff5b4a; animation: blink 1.6s infinite; }
@keyframes blink { 0%, 60% { opacity: 1; } 70%, 100% { opacity: .28; } }
.screen-body {
  max-height: 260px; overflow: auto; font-size: 15px; line-height: 1.95;
  color: #b9ffcf; text-shadow: 0 0 8px rgba(124, 240, 168, .35);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.screen-body p { margin: 0 0 8px; }
.story-line::after { content: '▌'; color: var(--lcd); animation: blink 1s steps(1) infinite; }
.skip-btn {
  position: absolute; right: 14px; bottom: 12px; z-index: 2;
  background: rgba(124, 240, 168, .12); border: 1px solid rgba(124, 240, 168, .5);
  color: var(--lcd); font-family: var(--mono); font-size: 11.5px; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 6px; cursor: pointer;
}

.radio-chat { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bird-img { width: 132px; height: 132px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35)); animation: bob 3.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1.5deg); } }
.bubbles { flex: 1; min-width: 240px; display: grid; gap: 8px; }
.bubble {
  position: relative; background: #fffdf6; border: 2px solid #2b3446; border-radius: 14px;
  padding: 9px 14px; font-size: 14px; line-height: 1.6; color: #26313f;
  box-shadow: 3px 4px 0 rgba(43, 52, 70, .35);
}
.bubble .who {
  display: inline-block; font-size: 11px; letter-spacing: 2px; margin-right: 8px;
  padding: 1px 7px; border-radius: 999px; background: var(--navy-2); color: #fff; vertical-align: 1px;
}
.bubble.geese { background: #fdf2e4; border-color: #a8642a; }
.bubble.geese .who { background: var(--accent); }
.radio-cta { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 4px; }
.tips { font-size: 12.5px; color: #6b6350; text-align: center; max-width: 620px; line-height: 1.7; }

/* ============================================================
   游戏界面：一屏自适应（仪表条 + 舞台 + 寻呼机侧栏）
   ============================================================ */
.play { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.play.hidden { display: none; }

.play-grid {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 12px;
}
.stage-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }

/* 仪表条 */
.hud-strip {
  flex: 0 0 auto; display: grid; gap: 6px;
  grid-template-columns: repeat(4, minmax(58px, auto)) minmax(120px, 1fr);
  background: var(--plastic-dark); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px; padding: 7px 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.gauge { min-width: 0; }
.gauge .k { font-size: 10.5px; color: var(--muted); letter-spacing: .5px; white-space: nowrap; }
.gauge .v { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.25; }
.gauge .v.accent { color: var(--amber); }
.gauge .v.warn { color: #ffd166; }
.gauge .v.danger { color: var(--bad); }
.gauge .v.lives { font-size: 13px; letter-spacing: 1px; }
.gauge .v.lives i { font-style: normal; }
.gauge.grow { display: flex; flex-direction: column; justify-content: center; }

.progress {
  height: 8px; border-radius: 5px; margin-top: 5px; position: relative;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); overflow: hidden;
}
.progress > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #ffb15c, var(--accent));
  box-shadow: 0 0 14px rgba(255, 171, 61, .6);
  transition: width .18s ease-out;
}
.progress-target::after {
  content: ''; position: absolute; top: -2px; bottom: -2px; width: 2px; left: var(--target, 80%);
  background: var(--lcd); box-shadow: 0 0 10px var(--lcd);
}
.progress-target.no-target::after { display: none; }

/* 舞台：画布按剩余空间等比缩放 */
.stage-shell {
  flex: 1 1 auto; min-height: 0; position: relative;
  display: grid; place-items: center;
  border-radius: 16px; overflow: hidden;
  border: 2px solid #14243d; background: #04101f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 50px rgba(0, 0, 0, .55), inset 0 0 60px rgba(0, 0, 0, .8);
  line-height: 0;
}
#stage { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; touch-action: none; }
.crt-glass {
  position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 3px),
    radial-gradient(120% 100% at 50% 45%, transparent 58%, rgba(0, 0, 0, .5) 100%);
  mix-blend-mode: multiply;
}
.stage-tag {
  position: absolute; left: 10px; top: 8px; z-index: 3; pointer-events: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: rgba(255, 210, 160, .8);
  background: rgba(4, 12, 26, .6); border: 1px solid rgba(255, 171, 61, .35);
  padding: 2px 8px; border-radius: 6px;
}

/* 侧栏 */
.side-col { min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.pager {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  background: var(--plastic-dark); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.pager-head {
  display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 2px; color: var(--lcd); margin-bottom: 8px; flex: 0 0 auto;
}
.pager-led { color: var(--lcd); animation: blink 1.8s infinite; }
.pager-code { margin-left: auto; font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.pager-screen {
  flex: 1 1 auto; min-height: 74px; overflow: auto;
  background: linear-gradient(180deg, #0b1a13, #061009);
  border: 2px solid #17281d; border-radius: 10px; padding: 9px 10px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .75);
}
.cond-list { display: grid; gap: 7px; }
.cond-item {
  display: grid; grid-template-columns: 16px 1fr auto; gap: 3px 7px; align-items: center;
  font-family: var(--mono); font-size: 12px; color: #a9e8c4; line-height: 1.4;
}
.cond-item .ck { color: #587a66; }
.cond-item.done .ck { color: var(--lcd); }
.cond-item.done .cl { color: var(--lcd); text-decoration: line-through; opacity: .8; }
.cond-item .cv { font-size: 11px; color: #d8ffe8; }
.cond-item .cbar { grid-column: 1 / -1; height: 3px; background: rgba(124, 240, 168, .14); border-radius: 3px; overflow: hidden; }
.cond-item .cbar i { display: block; height: 100%; background: var(--lcd); box-shadow: 0 0 8px var(--lcd); }
.cond-item .cbtn {
  grid-column: 3; grid-row: 1; justify-self: end;
  background: rgba(124, 240, 168, .16); border: 1px solid rgba(124, 240, 168, .55); color: var(--lcd);
  font-family: var(--mono); font-size: 10.5px; padding: 2px 7px; border-radius: 5px; cursor: pointer;
}
.cond-item .cbtn:hover { background: var(--lcd); color: #06120c; }

.legend {
  flex: 0 0 auto; background: rgba(6, 14, 28, .8); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 10px;
}
.legend-head { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2px; color: var(--amber); margin-bottom: 6px; }
.legend-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.sig-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--cream-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px 2px 6px; background: rgba(255, 255, 255, .03);
}
.sig-chip b { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

.ctrl-grid { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ctrl-grid .btn { width: 100%; padding: 7px 8px; font-size: 12px; }

/* 触屏虚拟键盘：浮在右下角，不占布局 */
.touchpad { display: none; }
.touchpad.on {
  display: block; position: fixed; right: 12px; bottom: 12px; z-index: 45;
  padding: 6px; border-radius: 16px;
  background: rgba(9, 20, 40, .72); backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
}
.touchpad .pad { display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(3, 46px); gap: 5px; }
.touchpad button {
  border-radius: 9px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02));
  color: var(--amber); font-size: 17px; cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent; font-family: inherit;
}
.touchpad button:active { background: var(--accent); color: #1b0d02; }
.touchpad .empty { visibility: hidden; }
/* 手机上虚拟键盘占位：给它腾出地方，别压住寻呼机和按钮 */
@media (max-width: 1000px) {
  .play:has(.touchpad.on) .side-col { padding-right: 166px; }
  .play:has(.touchpad.on) .ctrl-grid { display: none; }
  .play:has(.touchpad.on) .pager-screen { max-height: 78px; }
}

/* ============================================================
   弹层（关卡介绍 / 过关 / 暂停 / 结算）
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  padding: 16px; overflow: auto; line-height: 1.6;
  background: radial-gradient(900px 620px at 50% 42%, rgba(8, 18, 38, .82), rgba(3, 7, 16, .94));
  backdrop-filter: blur(5px);
}
.modal.hidden { display: none; }
.modal-card {
  width: min(720px, 94vw); max-height: 92dvh; overflow: auto;
  background: linear-gradient(180deg, rgba(13, 26, 50, .96), rgba(7, 14, 30, .98));
  border: 1px solid rgba(255, 171, 61, .32); border-radius: 18px;
  padding: 20px 22px 18px; text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .08);
  display: grid; gap: 10px; justify-items: center;
}
.modal-card h1 {
  margin: 0; font-size: clamp(18px, 2.6vw, 26px); letter-spacing: 3px; color: #fff4e2;
  text-shadow: 0 0 22px rgba(255, 171, 61, .45);
}
.modal-card p { margin: 0; max-width: 620px; color: var(--cream-dim); font-size: 14px; }
.modal-card .k { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.modal-card .big { font-size: 24px; font-weight: 800; color: var(--amber); font-variant-numeric: tabular-nums; }
#ovArt { max-width: 100%; }
.reveal-photo {
  max-width: min(520px, 84vw); max-height: 40dvh; border-radius: 10px;
  border: 4px solid #f6efdd; box-shadow: 0 16px 40px rgba(0, 0, 0, .7);
  background: #111; transform: rotate(-.6deg);
}
.barrier-preview {
  position: relative; width: min(400px, 76vw); height: 84px; border-radius: 10px; overflow: hidden;
  background: repeating-conic-gradient(#1a2333 0% 25%, #0d1422 0% 50%) 50% / 6px 6px;
  border: 2px solid #2b3b57; display: grid; place-items: center;
}
.bp-noise {
  position: absolute; inset: 0; opacity: .55;
  background-image: radial-gradient(rgba(255,255,255,.5) .6px, transparent .7px);
  background-size: 3px 3px; animation: noiseShift .3s steps(3) infinite;
}
@keyframes noiseShift { 0% { transform: translate(0, 0); } 50% { transform: translate(-2px, 1px); } 100% { transform: translate(1px, -2px); } }
.bp-text { position: relative; font-family: var(--mono); letter-spacing: 8px; color: rgba(220, 235, 255, .8); font-size: 14px; }
.final-score { font-size: clamp(34px, 6vw, 54px); font-weight: 800; color: var(--amber); font-variant-numeric: tabular-nums; text-shadow: 0 0 30px rgba(255, 171, 61, .5); }
.final-score small { font-size: 16px; margin-left: 6px; color: var(--cream-dim); }

.cond-card {
  background: rgba(6, 16, 32, .8); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; max-width: 560px; text-align: left; width: 100%;
}
.cond-head { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; color: var(--amber); margin-bottom: 7px; }
.cond-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.cond-list li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--cream-dim); }
.cond-list li.done { color: var(--lcd); }
.cond-list .ck { color: var(--muted); }
.cond-list li.done .ck { color: var(--lcd); }
.cond-list .cnote { margin-left: auto; font-size: 11px; color: var(--muted); }
.cond-meta { margin-top: 8px; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.hint > div { margin-bottom: 4px; }

/* ============================================================
   大哥大：答题弹窗
   ============================================================ */
.phone-wrap {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: center; justify-content: center; padding: 18px;
  background: rgba(3, 7, 16, .74); backdrop-filter: blur(4px);
}
.phone-wrap.show { display: flex; }
.brickphone {
  position: relative; width: min(400px, 94vw);
  background: linear-gradient(180deg, #3b4252 0%, #232a38 55%, #171d28 100%);
  border-radius: 26px 26px 20px 20px; padding: 18px 16px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .72), inset 0 2px 0 rgba(255, 255, 255, .16);
  display: grid; gap: 11px;
}
.antenna {
  position: absolute; right: 26px; top: -58px; width: 9px; height: 64px; border-radius: 5px;
  background: linear-gradient(90deg, #6d7788, #2b3340); box-shadow: 0 0 0 2px rgba(0, 0, 0, .3);
}
.brickphone::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 76px; height: 8px;
  background: repeating-linear-gradient(90deg, #4a5262 0 2px, transparent 2px 6px); opacity: .5;
}
.phone-top { display: flex; align-items: center; font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 2px; }
.phone-sig { margin-left: auto; color: var(--lcd); letter-spacing: 0; }
.phone-screen {
  background: linear-gradient(180deg, #0c1c14, #06110b); border: 2px solid #1a2a1f; border-radius: 10px;
  padding: 12px 14px; box-shadow: inset 0 0 26px rgba(0, 0, 0, .8);
}
.phone-line { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--lcd); opacity: .8; }
.phone-q { margin-top: 6px; font-size: 15px; line-height: 1.65; color: #c8ffdd; }
.phone-msg { margin-top: 8px; font-size: 12.5px; color: #9fd8b6; min-height: 18px; line-height: 1.6; }
.phone-input { display: flex; gap: 8px; }
.phone-input input {
  flex: 1; padding: 11px 12px; border-radius: 9px; font-size: 15px; font-family: inherit;
  background: rgba(6, 12, 24, .9); border: 1px solid var(--line); color: var(--cream); outline: none;
}
.phone-input input:focus { border-color: var(--lcd); box-shadow: 0 0 0 3px rgba(124, 240, 168, .14); }
.phone-keypad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  font-size: 12.5px; color: #cfd8e6;
}
.phone-keypad span {
  padding: 7px 0; text-align: center; border-radius: 7px;
  background: linear-gradient(180deg, #5a6272, #363d4b); box-shadow: 0 2px 0 rgba(0, 0, 0, .5);
  border: 1px solid rgba(255, 255, 255, .1);
}
.phone-actions { display: flex; justify-content: flex-end; }

/* ---------- 提示条 ---------- */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 18px);
  background: rgba(8, 16, 32, .96); border: 1px solid var(--amber); color: var(--cream);
  padding: 11px 20px; border-radius: 10px; font-size: 13.5px; z-index: 90;
  opacity: 0; pointer-events: none; transition: .22s; max-width: 92vw; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { border-color: var(--bad); }

/* ============================================================
   通用卡片 / 表单 / 表格（管理端与榜单）
   ============================================================ */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; backdrop-filter: blur(8px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .48);
}
.card + .card { margin-top: 16px; }
.card h2 { margin: 0 0 6px; font-size: 16px; letter-spacing: 2px; }
.card h2 span { color: var(--amber); }

label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; letter-spacing: .5px; }
input[type=text], input[type=password], input[type=number], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 9px; font-size: 14px; font-family: inherit;
  background: rgba(4, 10, 22, .8); border: 1px solid var(--line); color: var(--cream); outline: none; transition: .16s;
}
input:focus, select:focus, textarea:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 171, 61, .13); }
textarea { resize: vertical; min-height: 64px; line-height: 1.7; }
input[type=checkbox], input[type=radio] { width: auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.field { margin-bottom: 14px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }

.dropzone {
  border: 2px dashed rgba(180, 205, 245, .35); border-radius: 12px; padding: 22px; text-align: center;
  color: var(--muted); font-size: 13px; cursor: pointer; transition: .18s; background: rgba(255, 255, 255, .02);
}
.dropzone:hover, .dropzone.hot { border-color: var(--amber); color: var(--amber); background: rgba(255, 171, 61, .07); }
.dropzone strong { color: var(--cream); }
.preview { margin-top: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.preview img {
  width: 96px; height: 96px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line);
  background: repeating-conic-gradient(rgba(255,255,255,.05) 0% 25%, transparent 0% 50%) 50% / 16px 16px, rgba(0, 0, 0, .35);
  padding: 6px;
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.chip {
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; cursor: pointer; transition: .16s;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--muted);
}
.chip:hover { color: var(--amber); border-color: var(--amber); }
.chip.active { background: linear-gradient(180deg, #f08a3c, #d0551a); border-color: #ffb877; color: #1b0d02; font-weight: 700; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tile {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(6, 12, 26, .78);
  display: flex; flex-direction: column; transition: .18s;
}
.tile:hover { border-color: rgba(255, 171, 61, .6); transform: translateY(-2px); }
.tile.off { opacity: .5; }
.tile .thumb {
  height: 136px; display: flex; align-items: center; justify-content: center; padding: 8px;
  background: repeating-conic-gradient(rgba(255,255,255,.045) 0% 25%, transparent 0% 50%) 50% / 18px 18px,
    linear-gradient(160deg, rgba(18, 34, 60, .85), rgba(4, 8, 18, .9));
}
.tile .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.tile .meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.tile .name { font-weight: 700; font-size: 14px; word-break: break-all; }
.tile .sub { color: var(--muted); font-size: 11.5px; display: flex; gap: 8px; flex-wrap: wrap; }
.tile .actions { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; letter-spacing: .6px; border: 1px solid var(--line); color: var(--muted); }
.tag.photo { color: var(--amber); border-color: rgba(255,171,61,.5); }
.tag.hero { color: #7cf0a8; border-color: rgba(124,240,168,.5); }
.tag.enemy { color: #ff8fa8; border-color: rgba(255,143,168,.5); }
.tag.item { color: #ffd166; border-color: rgba(255,209,102,.5); }
.tag.background { color: #9d7bff; border-color: rgba(157,123,255,.5); }
.tag.off { color: #7b88a8; }
.empty-state { text-align: center; color: var(--muted); padding: 36px 10px; font-size: 14px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 11.5px; letter-spacing: 1px; font-weight: 600; }
tbody tr:hover { background: rgba(255, 171, 61, .06); }
td.rank { font-weight: 800; color: var(--muted); width: 66px; }
td.rank.top1 { color: #ffd166; }
td.rank.top2 { color: #dfe7f5; }
td.rank.top3 { color: #ffab76; }
td.score { font-weight: 800; color: var(--amber); font-variant-numeric: tabular-nums; }
tr.me { background: rgba(124, 240, 168, .10); }

/* 照片墙 */
.photo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.photo-card {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(6, 12, 26, .8);
}
.photo-card .frame { position: relative; aspect-ratio: 4 / 3; background: #0a1424; }
.photo-card .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card.locked .frame img { filter: blur(14px) grayscale(.7) brightness(.5); }
.photo-card .lock {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.35) 0 2px, transparent 2px 4px);
  color: #cfe0f5; font-family: var(--mono); font-size: 12px; letter-spacing: 2px; padding: 10px;
}
.photo-card .cap { padding: 10px 12px; font-size: 13px; color: var(--cream-dim); line-height: 1.6; }
.photo-card .cap b { display: block; color: #fff3dd; margin-bottom: 4px; font-size: 13.5px; }

/* 管理端：关卡编辑 */
.level-list { display: grid; gap: 10px; }
.level-row {
  display: grid; grid-template-columns: 52px 96px 1fr auto; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(6, 12, 26, .7);
}
.level-row.off { opacity: .55; }
.level-row .idx { font-family: var(--mono); font-size: 18px; color: var(--amber); text-align: center; }
.level-row .shot { width: 96px; height: 68px; object-fit: cover; border-radius: 8px; background: #0a1424; }
.level-row .info { min-width: 0; }
.level-row .ttl { font-weight: 700; font-size: 14.5px; }
.level-row .cond-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.level-row .acts { display: flex; gap: 6px; flex-wrap: wrap; }

.region-stage {
  position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: #0a1424; cursor: crosshair; touch-action: none; user-select: none;
}
.region-stage img { display: block; width: 100%; }
.region-stage .rg {
  position: absolute; border: 2px dashed rgba(255, 110, 110, .95); background: rgba(255, 80, 80, .12);
  border-radius: 4px;
}
.region-stage .rg span {
  position: absolute; left: 2px; top: 1px; font-size: 11px; font-family: var(--mono);
  background: rgba(60, 14, 20, .92); color: #ffd0d0; padding: 0 5px; border-radius: 4px;
}
.region-stage .rg.sel { border-color: var(--lcd); background: rgba(124, 240, 168, .16); }
.region-stage .rg .del {
  position: absolute; right: -1px; top: -1px; width: 18px; height: 18px; line-height: 16px; text-align: center;
  background: rgba(60, 14, 20, .95); color: #ffb0b0; border: 1px solid rgba(255, 140, 140, .6);
  border-radius: 0 3px 0 6px; font-size: 12px; cursor: pointer;
}
.region-stage .marquee { position: absolute; border: 2px solid var(--amber); background: rgba(255, 171, 61, .18); pointer-events: none; }

dialog {
  border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(680px, 94vw);
  background: #0a1428; color: var(--cream);
}
dialog::backdrop { background: rgba(2, 5, 12, .76); backdrop-filter: blur(3px); }
dialog .dlg-head { padding: 16px 18px 0; font-weight: 800; letter-spacing: 1px; font-size: 15px; }
dialog .dlg-body { padding: 14px 18px; max-height: 66vh; overflow: auto; }
dialog .dlg-foot { padding: 0 18px 18px; display: flex; gap: 10px; justify-content: flex-end; }

.queue { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.queue-item { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.queue-item img { width: 46px; height: 46px; object-fit: contain; background: rgba(0, 0, 0, .35); border-radius: 8px; padding: 3px; }
.queue-item .qi-main { flex: 1; min-width: 0; }
.queue-item input { padding: 6px 10px; font-size: 13px; }
.queue-item .qi-size { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

@media (max-width: 1000px) {
  /* 手机 / 平板：同样一屏放下，不产生滚动条 */
  .play-grid { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; }
  .side-col {
    flex-direction: row; align-items: stretch; gap: 6px; overflow: hidden;
    flex-wrap: nowrap;
  }
  .pager { flex: 1 1 auto; min-width: 0; padding: 8px 10px; }
  .pager-screen { min-height: 62px; max-height: 88px; }
  .legend { display: none; }
  .ctrl-grid { flex: 0 0 auto; grid-template-columns: repeat(2, 46px); align-content: start; }
  .ctrl-grid .btn { padding: 8px 4px; font-size: 11px; }
  .ctrl-grid .btn .long { display: none; }
  .stage-shell { min-height: 0; }
  .hud-strip { padding: 6px 8px; grid-template-columns: repeat(3, minmax(46px, auto)) minmax(80px, 1fr); }
  .gauge .v { font-size: 15px; }
  #btnAnswer { flex: 0 0 auto; }
}

@media (max-width: 760px) {
  .wrap { padding: 14px 12px 44px; }
  .card { padding: 14px; }
  .radio-set { padding: 16px; border-radius: 20px; }
  .bird-img { width: 96px; height: 96px; }
  .brand-sub em { display: none; }
  .hud-strip { grid-template-columns: repeat(3, minmax(50px, auto)) minmax(90px, 1fr); }
  .brand-text h1 { letter-spacing: 1px; }
  .nav { width: 100%; margin-left: 0; }
  .level-row { grid-template-columns: 40px 1fr; grid-auto-rows: auto; }
  .level-row .shot { display: none; }
  .level-row .acts { grid-column: 1 / -1; }
}
