/* I AM NOT GUILTY — Dark Deco / Gotham noir
   黑纸上画亮色：近黑底 + 暖金 + 警红 + 骨白 */
:root {
  --bg: #0b0b0e;
  --bg2: #121218;
  --panel: #16161d;
  --panel2: #1c1c25;
  --line: #2b2b36;
  --gold: #d4a94e;
  --gold-dim: #9a7c39;
  --red: #c0392f;
  --red-deep: #8e2721;
  --bone: #e8e0cc;
  --muted: #8f8a7a;
  --teal: #5e9e97;
  --paper: #e9dfae;
  --ink: #1a1710;
  --good: #7fae6e;
  --shadow: 0 8px 30px rgba(0, 0, 0, .55);
  --deco: 'Poiret One', 'STZhongsong', 'SimSun', serif;
  --type: 'Special Elite', 'Courier New', 'SimSun', monospace;
  --hand: 'Caveat', 'Long Cang', 'KaiTi', 'STKaiti', cursive;
  --body: Georgia, 'STZhongsong', 'SimSun', serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  background: var(--bg); color: var(--bone); font-family: var(--body);
  min-height: 100vh; overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% -10%, rgba(212, 169, 78, .05), transparent 45%),
    radial-gradient(circle at 90% 110%, rgba(192, 57, 47, .05), transparent 40%);
}
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- halftone 纹理 ---------- */
.halftone::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background-image: radial-gradient(circle, #fff 1px, transparent 1.4px);
  background-size: 7px 7px;
}

/* ---------- 屏幕容器 ---------- */
.screen { min-height: 100vh; min-height: 100dvh; display: none; flex-direction: column; }
.screen.active { display: flex; }

/* ================= 标题屏 ================= */
#screen-title { align-items: center; justify-content: center; text-align: center; position: relative; padding: 24px; }
.title-rays {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  background: repeating-conic-gradient(from -90deg at 50% 120%, rgba(212,169,78,.045) 0 4deg, transparent 4deg 12deg);
}
.title-card { position: relative; max-width: 720px; width: 100%; }
.title-kicker { font-family: var(--type); color: var(--muted); letter-spacing: .35em; font-size: .8rem; text-transform: uppercase; }
h1.logo {
  font-family: var(--deco); font-size: clamp(2.6rem, 9vw, 5.2rem); line-height: 1.04;
  letter-spacing: .06em; color: var(--bone); margin: 18px 0 6px;
  text-shadow: 0 0 40px rgba(212, 169, 78, .25);
}
h1.logo .not { color: var(--red); font-style: normal; position: relative; display: inline-block; transform: rotate(-2deg); }
h1.logo .not::after {
  content: ''; position: absolute; left: -6%; right: -6%; top: 48%; height: 3px;
  background: var(--gold); transform: rotate(-1.5deg); opacity: .0;
}
.title-zh { font-size: clamp(1rem, 3vw, 1.4rem); color: var(--gold); letter-spacing: .7em; margin-left: .7em; }
.title-sub { color: var(--muted); font-size: .92rem; margin-top: 14px; line-height: 1.9; max-width: 560px; margin-inline: auto; }
.title-actions { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  background: linear-gradient(180deg, var(--panel2), var(--panel)); color: var(--bone);
  border: 1px solid var(--line); padding: 13px 26px; font-size: 1rem; letter-spacing: .12em;
  font-family: var(--body); transition: all .18s ease; border-radius: 2px; position: relative;
}
.btn:hover { border-color: var(--gold-dim); color: var(--gold); transform: translateY(-1px); }
.btn.primary { border-color: var(--gold-dim); color: var(--ink); background: linear-gradient(180deg, #e5bd63, var(--gold)); font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); color: var(--ink); }
.btn.danger { border-color: var(--red-deep); color: #e8a49e; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.small { padding: 8px 14px; font-size: .85rem; }

.lang-toggle { position: fixed; top: 14px; right: 14px; z-index: 300; }
#screen-game .hud { padding-right: 74px; } /* 给右上角固定的语言按钮让位 */

/* ================= 设置屏 ================= */
#screen-setup { padding: 28px 18px 60px; align-items: center; }
.setup-wrap { width: 100%; max-width: 980px; }
.setup-h { font-family: var(--deco); font-size: 1.9rem; color: var(--gold); letter-spacing: .12em; margin-bottom: 4px; }
.setup-sub { color: var(--muted); font-size: .9rem; margin-bottom: 22px; }
.mode-row { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.mode-btn { flex: 1; min-width: 130px; padding: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 2px; }
.mode-btn.sel { border-color: var(--gold); color: var(--gold); background: rgba(212, 169, 78, .07); }
.slot-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.slot { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); padding: 10px 12px; border-radius: 2px; flex-wrap: wrap; }
.slot .who { display: flex; gap: 6px; }
.slot .who button { padding: 6px 12px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); font-size: .85rem; border-radius: 2px; }
.slot .who button.sel { color: var(--gold); border-color: var(--gold-dim); }
.slot input { background: var(--bg2); border: 1px solid var(--line); color: var(--bone); padding: 7px 10px; width: 130px; font-family: inherit; border-radius: 2px; }
.slot .remove { margin-left: auto; color: var(--red); background: none; border: none; font-size: 1.1rem; }

/* 角色卡片 */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; width: 100%; }
.char-card {
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line);
  padding: 12px; cursor: pointer; transition: all .15s; border-radius: 2px; position: relative; text-align: left;
  color: var(--bone); font-family: var(--body);
}
.char-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.char-card.sel { border-color: var(--gold); background: rgba(212, 169, 78, .08); box-shadow: 0 0 0 1px var(--gold); }
.char-card.taken { opacity: .35; pointer-events: none; }
.char-card .cn { font-size: 1.05rem; font-weight: 700; }
.char-card .en { font-family: var(--type); font-size: .62rem; color: var(--gold-dim); letter-spacing: .08em; margin-top: 2px; }
.char-card .tag { font-size: .72rem; color: var(--muted); margin-top: 6px; }
.char-card .stars { color: var(--gold); font-size: .7rem; letter-spacing: .2em; position: absolute; top: 10px; right: 10px; }
.char-card .peek { font-size: .72rem; color: var(--teal); margin-top: 8px; text-decoration: underline dotted; }

/* ================= 对局屏 ================= */
#screen-game { padding: 10px; gap: 10px; }
.hud {
  display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 2px; flex-wrap: wrap;
}
.hud .day { font-family: var(--deco); font-size: 1.25rem; color: var(--gold); letter-spacing: .1em; white-space: nowrap; }
.hud .stage { font-family: var(--type); font-size: .68rem; color: var(--muted); letter-spacing: .18em; text-transform: uppercase; }
.hud .cal { display: flex; gap: 3px; margin-left: auto; flex-wrap: wrap; max-width: 100%; }
.hud .cal i { width: 8px; height: 8px; background: var(--line); border-radius: 1px; }
.hud .cal i.past { background: var(--gold-dim); }
.hud .cal i.now { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.hud .cal i.cp { border: 1px solid var(--red); }

.game-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .9fr); gap: 10px; align-items: start; }
.game-body > * { min-width: 0; }
#screen-game { overflow-x: clip; max-width: 100vw; }

/* 棋盘 */
.board-wrap { position: relative; min-width: 0; max-width: 100%; }
.board {
  display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(7, 1fr);
  gap: 4px; aspect-ratio: 1; background: var(--bg2); border: 1px solid var(--line); padding: 6px; border-radius: 3px;
  position: relative;
}
.sq {
  background-size: cover; background-position: center;
  border: 1px solid var(--line);
  border-radius: 2px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 2px; padding: 3px 2px 4px; position: relative; min-width: 0; overflow: hidden;
  transition: box-shadow .2s, border-color .2s; cursor: pointer;
}
.sq .ico { font-size: clamp(.8rem, 2.2vw, 1.15rem); line-height: 1; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.sq .nm { font-size: clamp(.42rem, 1.1vw, .62rem); color: var(--bone); letter-spacing: .05em; text-align: center; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .95); }
.sq:hover { border-color: var(--gold-dim); }
.sq.corner { border-color: var(--gold-dim); }
.sq.corner .nm { color: var(--gold); }
.sq.arkham { border-color: #513a5a; }
.sq.arkham .nm { color: #c3a8d6; }
.sq.active-sq { border-color: var(--gold); box-shadow: 0 0 12px rgba(212, 169, 78, .35), inset 0 0 8px rgba(212, 169, 78, .15); }

/* 地点悬浮/点击面板 */
.tile-popover {
  position: fixed; z-index: 180; width: 300px; max-width: 88vw; background: var(--panel2); border: 1px solid var(--gold-dim);
  border-radius: 3px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease; overflow: hidden;
}
.tile-popover.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.tp-img { width: 100%; height: 130px; object-fit: cover; display: block; filter: saturate(.9); }
.tp-body { padding: 10px 12px 12px; }
.tp-name { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.tp-tip { font-size: .78rem; color: var(--muted); line-height: 1.6; }
.tp-here { margin-top: 8px; font-size: .68rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tp-chip { padding: 1px 7px; border: 1px solid; border-radius: 10px; color: var(--bone); }
.board-center {
  grid-area: 2 / 2 / 7 / 7; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; position: relative; padding: 8px; overflow: hidden;
}
.board-center .bc-logo { font-family: var(--deco); font-size: clamp(1rem, 3.4vw, 1.9rem); letter-spacing: .1em; color: rgba(232, 224, 204, .16); text-align: center; line-height: 1.2; user-select: none; }
.board-center .bc-logo .not { color: rgba(192, 57, 47, .35); }
.dice { display: flex; gap: 10px; }
.die {
  width: 44px; height: 44px; background: var(--bone); color: var(--ink); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700;
  box-shadow: var(--shadow); opacity: 0; transform: scale(.6) rotate(-20deg); transition: all .25s;
}
.die.show { opacity: 1; transform: scale(1) rotate(0); }
.die.rolling { animation: diceroll .5s ease infinite; opacity: 1; }
@keyframes diceroll { 0% { transform: rotate(-12deg) scale(1) } 50% { transform: rotate(12deg) scale(1.08) } 100% { transform: rotate(-12deg) scale(1) } }
.bc-tip { font-size: .72rem; color: var(--muted); text-align: center; max-width: 90%; line-height: 1.7; min-height: 2.4em; }

/* 棋子 */
.token {
  position: absolute; width: 26px; height: 26px; border-radius: 50%; z-index: 40;
  display: flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 700; color: #0b0b0e;
  border: 2px solid rgba(0, 0, 0, .5); box-shadow: 0 3px 8px rgba(0, 0, 0, .6);
  transition: left .18s ease-in-out, top .18s ease-in-out; will-change: left, top;
}
.token.current { box-shadow: 0 0 0 3px var(--gold), 0 3px 10px rgba(0, 0, 0, .7); z-index: 50; }
.token.out { filter: grayscale(1) brightness(.5); }
.token.hop { animation: hop .18s ease-in-out; }
@keyframes hop { 50% { margin-top: -7px } }

/* 右栏 */
.side { display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow: hidden; }
.side > * { min-width: 0; }
.log { overflow-wrap: anywhere; }
.mini { flex-wrap: wrap; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 12px; position: relative; }
.pcard.current-turn { border-color: var(--gold-dim); box-shadow: 0 0 0 1px var(--gold-dim); }
.pcard .top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pcard .nm { font-weight: 700; font-size: 1.02rem; }
.pcard .arch { font-family: var(--type); font-size: .6rem; color: var(--gold-dim); letter-spacing: .1em; }
.pcard .badge { font-size: .62rem; padding: 2px 6px; border: 1px solid var(--line); color: var(--muted); border-radius: 2px; }
.pcard .badge.ngri { color: #b48cc8; border-color: #513a5a; }
.pcard .badge.selfdef { color: var(--teal); border-color: var(--teal); }
.pcard .badge.malinger { color: var(--red); border-color: var(--red-deep); }
.pcard .diary-btn { margin-left: auto; background: none; border: none; color: var(--gold-dim); font-size: 1rem; }
.meters { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.meter { display: grid; grid-template-columns: 46px 1fr 44px; gap: 8px; align-items: center; font-size: .72rem; }
.meter .lab { color: var(--muted); letter-spacing: .06em; font-family: var(--type); font-size: .6rem; }
.meter .bar { height: 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; position: relative; overflow: visible; }
.meter .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; transition: width .5s ease; }
.meter .val { text-align: right; font-variant-numeric: tabular-nums; }
.meter .val.bump { animation: bump .5s; }
@keyframes bump { 30% { transform: scale(1.35); color: var(--gold) } }
.fill.hp { background: linear-gradient(90deg, #7c3a34, #b8574e); }
.fill.san { background: linear-gradient(90deg, #3c5a72, #6d9ab5); }
.fill.knw { background: linear-gradient(90deg, #4e6e46, var(--good)); }
.fill.trust { background: linear-gradient(90deg, var(--gold-dim), var(--gold)); }
/* SAN 计量条上的 NGRI 区间标记 */
.san-band { position: absolute; top: -3px; bottom: -3px; border: 1px dashed rgba(180, 140, 200, .8); border-radius: 3px; pointer-events: none; }
.san-low { position: absolute; top: -3px; bottom: -3px; left: 0; border-right: 1px solid rgba(192, 57, 47, .7); pointer-events: none; }
.stat-row { display: flex; gap: 10px; margin-top: 8px; font-size: .78rem; flex-wrap: wrap; }
.stat-row b { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-row span { color: var(--muted); }
.hand-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; font-size: .68rem; }
.hand-row .chip { padding: 2px 8px; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; }
.hand-row .chip.hot { color: var(--paper); border-color: var(--gold-dim); }

.mini-list { display: flex; flex-direction: column; gap: 6px; }
.mini {
  display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  padding: 6px 10px; font-size: .75rem; border-radius: 2px; color: var(--muted);
}
.mini .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mini .mnm { color: var(--bone); min-width: 56px; }
.mini.turn { border-color: var(--gold-dim); }
.mini.dead { opacity: .45; }
.mini .ms { margin-left: auto; display: flex; gap: 8px; font-variant-numeric: tabular-nums; }

/* 行动区 */
.action-bar { background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 12px; }
.action-bar .ttl { font-family: var(--type); font-size: .66rem; letter-spacing: .18em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.action-list { display: flex; flex-direction: column; gap: 8px; }
.action-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left;
  background: var(--bg2); border: 1px solid var(--line); color: var(--bone); padding: 10px 12px;
  font-size: .85rem; border-radius: 2px; transition: all .15s; font-family: var(--body);
}
.action-btn:hover:not(:disabled) { border-color: var(--gold-dim); }
.action-btn small { color: var(--muted); font-size: .7rem; }
.action-btn:disabled { opacity: .38; cursor: not-allowed; }
.action-btn.risk { border-left: 3px solid var(--red-deep); }

/* 日志 */
.log { background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 10px 12px; max-height: 180px; overflow-y: auto; font-size: .74rem; line-height: 1.8; }
.log .e { color: var(--muted); }
.log .e b { color: var(--bone); font-weight: 700; }
.log .e.warn { color: #c9856f; }
.log .e.gold { color: var(--gold); }
.log::-webkit-scrollbar { width: 6px; }
.log::-webkit-scrollbar-thumb { background: var(--line); }

/* ================= 弹层 ================= */
.overlay {
  position: fixed; inset: 0; background: rgba(5, 5, 8, .78); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 18px; overflow-y: auto;
}
.overlay.fade-in { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0 } }
.modal {
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line);
  max-width: 480px; width: 100%; padding: 24px; border-radius: 3px; box-shadow: var(--shadow);
  position: relative; animation: modalin .3s cubic-bezier(.2, 1.4, .4, 1); max-height: 92dvh; overflow-y: auto;
}
@keyframes modalin { from { transform: translateY(24px) scale(.96); opacity: 0 } }
.modal .m-kicker { font-family: var(--type); font-size: .64rem; letter-spacing: .22em; color: var(--gold-dim); text-transform: uppercase; }
.modal .m-title { font-family: var(--deco); font-size: 1.5rem; color: var(--bone); letter-spacing: .06em; margin: 8px 0 6px; }
.modal .m-body { color: var(--muted); font-size: .92rem; line-height: 1.9; }
.modal .m-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.modal .m-actions.row { flex-direction: row; flex-wrap: wrap; }

/* 卡片抽取 */
.card-draw {
  max-width: 340px; text-align: center; border: 1px solid var(--gold-dim);
  background:
    linear-gradient(180deg, rgba(212, 169, 78, .06), transparent 40%),
    linear-gradient(180deg, var(--panel2), var(--panel));
  animation: cardflip .45s cubic-bezier(.2, 1.3, .4, 1);
}
@keyframes cardflip { from { transform: rotateY(90deg) scale(.9); opacity: 0 } }
.card-draw .c-type { font-family: var(--type); letter-spacing: .3em; font-size: .68rem; color: var(--gold); text-transform: uppercase; }
.card-draw .c-ico { font-size: 2.6rem; margin: 14px 0; filter: sepia(.3); }
.card-draw .c-text { font-size: .95rem; line-height: 2; color: var(--bone); }

/* 检查点/审判 splash */
.splash { text-align: center; max-width: 560px; background: transparent; border: none; box-shadow: none; }
.splash .s-act { font-family: var(--type); letter-spacing: .5em; color: var(--red); font-size: .8rem; }
.splash .s-title { font-family: var(--deco); font-size: clamp(2rem, 7vw, 3.4rem); color: var(--bone); letter-spacing: .12em; margin: 14px 0; text-shadow: 0 0 50px rgba(212, 169, 78, .3); }
.splash .s-sub { color: var(--muted); line-height: 2; }

/* 图章 */
.stamp {
  display: inline-block; font-family: var(--deco); font-size: 2.2rem; letter-spacing: .14em;
  padding: 8px 22px; border: 4px double currentColor; border-radius: 4px; transform: rotate(-8deg);
  animation: stampin .35s cubic-bezier(.3, 2.2, .5, 1); text-transform: uppercase;
}
@keyframes stampin { from { transform: rotate(-8deg) scale(2.6); opacity: 0 } }
.stamp.good { color: var(--good); } .stamp.bad { color: var(--red); }
.stamp.half { color: var(--gold); } .stamp.dark { color: #9b7fb0; }

/* 日记 */
.diary-modal { max-width: 460px; background: var(--paper); color: var(--ink); border: none; }
.diary-modal .d-head { font-family: var(--type); font-size: .7rem; letter-spacing: .2em; color: #7a6a3a; text-transform: uppercase; display: flex; justify-content: space-between; }
.diary-modal .d-name { font-size: 1.3rem; font-weight: 700; margin: 8px 0 2px; }
.diary-modal .d-en { font-family: var(--type); font-size: .66rem; color: #7a6a3a; letter-spacing: .12em; }
.diary-entry { margin-top: 16px; padding: 12px 14px; background: rgba(255, 252, 240, .65); border-left: 3px solid #b39643; transform: rotate(-.4deg); box-shadow: 2px 3px 8px rgba(0, 0, 0, .12); }
.diary-entry:nth-child(even) { transform: rotate(.4deg); }
.diary-entry .d-day { font-family: var(--type); font-size: .62rem; color: #8a7534; letter-spacing: .15em; }
.diary-entry .d-text { font-family: var(--hand); font-size: 1.18rem; line-height: 1.65; margin-top: 4px; }
.diary-entry.locked { filter: blur(0); opacity: .55; }
.diary-entry.locked .d-text { font-family: var(--type); font-size: .72rem; letter-spacing: .2em; color: #8a7534; }
.diary-perks { margin-top: 14px; font-size: .78rem; line-height: 1.9; }
.diary-perks li { list-style: none; padding-left: 16px; position: relative; }
.diary-perks li::before { content: '◆'; position: absolute; left: 0; color: #b39643; font-size: .6rem; top: .45em; }

/* 结局卡 */
.ending-card { max-width: 520px; text-align: center; }
.ending-card .e-body { font-family: var(--body); color: var(--bone); font-size: 1rem; line-height: 2.1; margin: 18px 0; text-align: left; }
.ending-card .e-margin { font-family: var(--type); font-size: .7rem; color: var(--muted); letter-spacing: .12em; margin-top: 4px; }

/* 审判分量表 */
.verdict-table { width: 100%; font-size: .8rem; margin: 12px 0; border-collapse: collapse; }
.verdict-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); color: var(--muted); }
.verdict-table td:last-child { text-align: right; color: var(--bone); font-variant-numeric: tabular-nums; }
.verdict-table tr.total td { color: var(--gold); font-weight: 700; border-top: 2px solid var(--gold-dim); border-bottom: none; }

/* 陪审团 */
.jury-strip { display: flex; gap: 4px; flex-wrap: wrap; }
.juror { width: 26px; height: 30px; background: var(--bg2); border: 1px solid var(--line); border-radius: 2px 2px 6px 6px; display: flex; align-items: center; justify-content: center; font-size: .8rem; opacity: .85; }
.juror.revealed { border-color: var(--teal); }
.juror.unknown { color: var(--muted); font-family: var(--type); font-size: .7rem; }

/* quiz */
.quiz-opt { text-align: left; }
.quiz-diff { font-size: .62rem; letter-spacing: .2em; padding: 2px 8px; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; margin-left: 8px; font-family: var(--type); text-transform: uppercase; }
.quiz-right { color: var(--good) !important; border-color: var(--good) !important; }
.quiz-wrong { color: var(--red) !important; border-color: var(--red-deep) !important; }

/* 浮动数字 */
.floater {
  position: fixed; z-index: 400; font-family: var(--deco); font-weight: 700; font-size: 1.1rem;
  pointer-events: none; animation: floatup 1.2s ease forwards; text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
}
@keyframes floatup { from { opacity: 0; transform: translateY(6px) } 20% { opacity: 1 } to { opacity: 0; transform: translateY(-34px) } }

/* 帮助按钮 + 回放 */
.help-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 150; width: 48px; height: 48px; border-radius: 50%;
  background: var(--panel2); border: 1px solid var(--gold-dim); color: var(--gold); font-size: 1.3rem;
  font-family: var(--deco); box-shadow: var(--shadow);
}
.help-fab:hover { background: var(--gold); color: var(--ink); }
.replay-caption {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 260;
  background: rgba(10, 10, 14, .92); border: 1px solid var(--gold-dim); color: var(--bone);
  padding: 12px 20px; max-width: min(560px, 92vw); font-size: .9rem; line-height: 1.8; border-radius: 3px;
  box-shadow: var(--shadow);
}
.replay-caption .rc-k { font-family: var(--type); font-size: .6rem; letter-spacing: .25em; color: var(--gold); text-transform: uppercase; display: block; margin-bottom: 4px; }
.replay-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 260; display: flex; gap: 8px; }

/* 移交提示（热座） */
.handoff { text-align: center; }
.handoff .h-name { font-family: var(--deco); font-size: 2rem; color: var(--gold); margin: 10px 0; letter-spacing: .1em; }

/* 回合横幅 / AI 公告 */
.turn-banner {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 60;
  background: rgba(8, 8, 12, .92); border: 1px solid var(--gold-dim); color: var(--bone);
  padding: 10px 22px; font-size: .95rem; letter-spacing: .06em; border-radius: 3px;
  box-shadow: var(--shadow); max-width: 86%; text-align: center; line-height: 1.7;
  animation: bannerin .22s ease;
}
.turn-banner small { color: var(--gold-dim); font-family: var(--type); font-size: .62rem; letter-spacing: .2em; }
.turn-banner.warn { border-color: var(--red-deep); }
.turn-banner.off { opacity: 0; transition: opacity .25s; }
@keyframes bannerin { from { opacity: 0; transform: translate(-50%, -46%) } }

/* 判决预测面板 */
.projection { margin-top: 12px; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 3px; }
.pj-row { display: flex; justify-content: space-between; align-items: baseline; }
.pj-lab { font-family: var(--type); font-size: .6rem; letter-spacing: .22em; color: var(--muted); }
.pj-margin { font-family: var(--deco); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.proj-good { color: var(--good); } .proj-close { color: var(--gold); } .proj-bad { color: var(--red); }
.pj-bar { position: relative; height: 8px; margin: 8px 0 6px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(192,57,47,.5), rgba(212,169,78,.35) 50%, rgba(127,174,110,.5)); }
.pj-zero { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--bone); opacity: .7; }
.pj-needle { position: absolute; top: -4px; width: 3px; height: 16px; border-radius: 2px; background: currentColor;
  transition: left .6s cubic-bezier(.3, 1.3, .5, 1); box-shadow: 0 0 8px currentColor; }
.pj-sub { font-size: .68rem; color: var(--muted); }
.pj-ngri { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.pj-chk { font-size: .66rem; padding: 2px 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.pj-chk.ok { color: #b48cc8; border-color: #513a5a; }
.pj-chk.bad { color: var(--red); border-color: var(--red-deep); }

/* 立绘 */
.d-top { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.d-portrait { width: 84px; height: 84px; object-fit: cover; border-radius: 3px; border: 2px solid #b39643; filter: sepia(.15) contrast(1.05); }
.char-card .cc-portrait { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; margin-bottom: 8px; filter: saturate(.85) contrast(1.06); border: 1px solid var(--line); }
.cur-avatar { width: 44px; height: 44px; object-fit: cover; border-radius: 50%; border: 2px solid var(--gold-dim); flex: none; }

/* 联机：房间码/加入行/座位行/等待横幅 */
.online-join-row { display: flex; gap: 8px; }
.online-join-row input { flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--bone); padding: 12px 14px; font-family: inherit; border-radius: 2px; }
.room-code-box { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--gold-dim); padding: 12px 16px; margin-bottom: 18px; border-radius: 2px; flex-wrap: wrap; }
.room-code-box code { font-family: var(--type); font-size: 1rem; color: var(--gold); letter-spacing: .05em; word-break: break-all; }
.seat-row { align-items: center; }
.seat-row .badge { margin-left: auto; }
.wait-banner {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(140%); z-index: 250;
  background: rgba(10, 10, 14, .94); border: 1px solid var(--gold-dim); color: var(--bone); padding: 10px 20px;
  font-size: .85rem; border-radius: 20px; box-shadow: var(--shadow); transition: transform .3s ease; white-space: nowrap;
}
.wait-banner.show { transform: translateX(-50%) translateY(0); }

/* toast */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 500;
  background: var(--panel2); border: 1px solid var(--gold-dim); color: var(--bone); padding: 10px 20px;
  font-size: .85rem; border-radius: 2px; animation: toastin .3s ease; box-shadow: var(--shadow); max-width: 92vw;
}
@keyframes toastin { from { transform: translate(-50%, -18px); opacity: 0 } }

/* ================= 移动端 ================= */
@media (max-width: 860px) {
  #screen-game { padding: 6px; }
  .game-body { grid-template-columns: 1fr; }
  .hud { position: sticky; top: 0; z-index: 100; padding: 6px 10px; gap: 8px; }
  .hud .cal { display: none; }
  .side { order: 2; }
  .token { width: 20px; height: 20px; font-size: .56rem; }
  .die { width: 36px; height: 36px; font-size: 1.2rem; }
  .help-fab { width: 42px; height: 42px; bottom: 12px; right: 12px; }
  .modal { padding: 18px; }
  .stamp { font-size: 1.7rem; }
}
@media (max-width: 420px) {
  .sq .nm { font-size: .4rem; }
  .board { gap: 3px; padding: 4px; }
  .meter { grid-template-columns: 38px 1fr 38px; }
  .title-kicker { font-size: .58rem; letter-spacing: .22em; }
  h1.logo { font-size: 2.35rem; letter-spacing: .03em; }
  .title-zh { letter-spacing: .45em; margin-left: .45em; }
  .title-sub { font-size: .85rem; padding: 0 4px; }
  .title-actions .btn { width: 100%; }
}
