:root {
  --bg: #eef1f4;
  --ink: #1f2933;
  --ink-2: #52606d;
  --ink-3: #8a96a3;
  --line: #d9dee4;
  --card: #ffffff;
  --chat-bg: #b9c8d6;
  --mine: #b6e3a8;
  --accent: #e8743b;
  --accent-ink: #b5521f;
  --warm: #ffd27a;
  --calm: #5b8def;
  --gray-avatar: #a9b4bf;
  --lit: #ffb547;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --serif: "Noto Serif TC", "Songti TC", serif;
  --hand: "LXGW WenKai TC", "Noto Serif TC", serif;
  --m-mood: #f2b84b;
  --m-akai: #d9776a;
  --m-next: #4fa38a;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- 手機外框：桌機上置中，手機上滿版 ---------- */
.stage { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.phone {
  width: 100%; max-width: 420px; height: min(860px, calc(100dvh - 48px)); background: var(--chat-bg);
  border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; position: relative;
  box-shadow: 0 0 0 10px #1f2933, 0 30px 60px rgba(31, 41, 51, .35);
}
@media (max-width: 480px) {
  .stage { padding: 0; }
  .phone { max-width: none; height: 100dvh; border-radius: 0; box-shadow: none; }
}

/* ---------- 聊天室標題列 ---------- */
.chat-head { background: #24323f; color: #fff; padding: 12px 14px 10px; display: flex; align-items: center; gap: 10px; }
.chat-head .back { color: #fff; text-decoration: none; font-size: 20px; line-height: 1; opacity: .8; }
.chat-head h1 { font-size: 16px; margin: 0; font-weight: 700; flex: 1; }
.chat-head h1 small { font-weight: 400; opacity: .7; margin-left: 4px; }
.chat-head .clock { font-size: 12px; opacity: .85; white-space: nowrap; }

/* 已讀的 37 個人 */
.readers { background: #2f3f4e; color: #cfd8e1; padding: 8px 12px 10px; }
.readers .label { font-size: 11px; display: flex; justify-content: space-between; margin-bottom: 6px; }
.readers .label b { color: var(--lit); font-weight: 700; }
.dots { display: grid; grid-template-columns: repeat(19, 1fr); gap: 4px; }
.dot { aspect-ratio: 1; border-radius: 50%; background: var(--gray-avatar); opacity: .45; transition: background .6s, opacity .6s, transform .6s; position: relative; }
.dot.me { opacity: 1; background: transparent; box-shadow: inset 0 0 0 2px #fff; }
.dot.lit { background: var(--lit); opacity: 1; transform: scale(1.15); box-shadow: 0 0 8px rgba(255, 181, 71, .8); }
.dot.me.lit { background: var(--lit); }

/* ---------- 訊息 ---------- */
.messages { flex: 1; overflow-y: auto; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.day { align-self: center; font-size: 11px; color: #fff; background: rgba(31, 41, 51, .35); padding: 2px 10px; border-radius: 999px; }
.msg { display: flex; gap: 8px; align-items: flex-start; max-width: 88%; animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg .avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 700; }
.msg .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msg .name { font-size: 11px; color: #33414e; }
.msg .row { display: flex; align-items: flex-end; gap: 6px; }
.bubble { background: #fff; padding: 8px 12px; border-radius: 16px; border-top-left-radius: 4px; font-size: 15px; word-break: break-word; }
.meta { font-size: 10px; color: #3d4b58; white-space: nowrap; line-height: 1.3; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .row { flex-direction: row-reverse; }
.msg.mine .bubble { background: var(--mine); border-top-left-radius: 16px; border-top-right-radius: 4px; }
.msg.mine .meta { text-align: right; }
.msg .sticker { font-size: 56px; line-height: 1; }
.msg .photo { width: 190px; border-radius: 12px; display: block; background: #fff; }
.read-count { font-weight: 700; color: #24323f; }
.system { align-self: center; font-size: 12px; color: #24323f; background: rgba(255, 255, 255, .6); padding: 4px 12px; border-radius: 999px; text-align: center; max-width: 90%; }
.typing { align-self: flex-start; font-size: 12px; color: #33414e; padding-left: 42px; }
.typing span { display: inline-block; width: 5px; height: 5px; margin: 0 1px; border-radius: 50%; background: #33414e; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }

/* ---------- 下方：選擇與輸入 ---------- */
.dock { background: #f7f9fa; border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.prompt-line { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.prompt-line b { color: var(--accent-ink); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 12px; text-align: left; color: var(--ink); font-size: 14px; line-height: 1.35; }
.action small { display: block; color: var(--ink-3); font-size: 11px; margin-top: 2px; }
.action:hover { border-color: var(--accent); }
.action[disabled], .private-menu button[disabled] { opacity: .5; cursor: default; }
.action[disabled]:hover { border-color: var(--line); }
.action.said small, .private-menu button.said { color: #2f7d4f; }
.composer { display: flex; gap: 8px; align-items: center; }
.composer .to { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.composer input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; font: inherit; font-size: 15px; background: #fff; }
.composer button { border: 0; background: var(--accent); color: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 700; }
.composer .cancel { background: transparent; color: var(--ink-3); padding: 10px 6px; font-weight: 400; }
.composer button[disabled] { opacity: .5; }

/* ---------- 首頁 ---------- */
.landing { max-width: 1040px; margin: 0 auto; padding: 40px 20px 64px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.landing h1 { font-family: var(--serif); font-size: clamp(34px, 6vw, 56px); line-height: 1.25; margin: 0 0 18px; }
.landing .lead { font-size: 18px; color: var(--ink-2); margin: 0 0 12px; }
.stat { font-size: 15px; color: var(--ink-2); border-left: 4px solid var(--accent); padding: 4px 0 4px 12px; margin: 22px 0 28px; }
.stat b { color: var(--accent-ink); font-size: 20px; }
.stat a { color: var(--ink-3); font-size: 12px; }
.cta { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; text-decoration: none; padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 17px; box-shadow: 0 8px 20px rgba(232, 116, 59, .35); }
.cta:hover { background: var(--accent-ink); }
.note { color: var(--ink-3); font-size: 13px; margin-top: 14px; }
.mock { background: var(--chat-bg); border-radius: 24px; padding: 18px 14px; box-shadow: 0 0 0 8px #1f2933, 0 24px 48px rgba(31, 41, 51, .3); display: flex; flex-direction: column; gap: 10px; max-width: 340px; justify-self: center; width: 100%; }
.mock .bubble { font-size: 14px; }
.help { position: fixed; right: 16px; bottom: 16px; font-size: 12px; color: var(--ink-3); }
.site-foot { max-width: 1040px; margin: 0 auto; padding: 0 20px 32px; color: var(--ink-3); font-size: 13px; }
.site-foot p { margin: 4px 0; }
@media (max-width: 820px) { .landing { grid-template-columns: 1fr; padding-top: 24px; } }

/* ---------- 小安身邊、頭像狀態 ---------- */
.ring-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 11px; }
.ring-label { margin-right: 4px; }
.ring-light { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .45); transition: all .6s; }
.ring-light.on { background: var(--warm); color: #2b2420; box-shadow: 0 0 10px rgba(255, 210, 122, .9); }
.dot.calm { background: #7fc8a0; opacity: .8; }
.dot.flash { animation: flash 1s 3; }
@keyframes flash { 50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, .8); } }

/* ---------- 分頁 ---------- */
.tabs { display: flex; gap: 2px; background: #24323f; padding: 0 8px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; color: #aab8c5; padding: 8px 10px; font-size: 13px; position: relative; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs button[aria-pressed=true] { color: #fff; border-bottom-color: var(--lit); }
.tabs button.unread::after { content: ""; position: absolute; top: 6px; right: 2px; width: 7px; height: 7px; border-radius: 50%; background: #ff5a4e; }
.threads { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.threads .messages { flex: 1; }

/* ---------- 訊息細節 ---------- */
.msg .avatar { position: relative; }
.msg .avatar i { position: absolute; bottom: -3px; right: -5px; font-style: normal; font-size: 8px; background: #24323f; color: #fff; border-radius: 4px; padding: 0 3px; line-height: 1.4; }
.photo-card { width: 200px; background: #fff; border-radius: 12px; overflow: hidden; font-size: 12px; color: var(--ink-2); }
.photo-card .blur { height: 96px; background: linear-gradient(135deg, #c6ced6, #9aa7b3 40%, #d8c3b0); filter: blur(6px); transform: scale(1.1); }
.photo-card p { margin: 0; padding: 6px 10px; }
.photo-card .react { display: flex; gap: 6px; padding: 0 10px 8px; }
.photo-card .react button { border: 1px solid var(--line); background: #f7f9fa; border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.photo-card .react button[disabled] { opacity: .4; cursor: default; }
.photo-card.gone { opacity: .35; }
.photo-card.gone p::after { content: "（已收回）"; }

/* ---------- 下方輸入 ---------- */
.private-menu { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.private-menu button { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 12px; text-align: left; }
.starters { margin-bottom: 8px; }
.starters summary { font-size: 13px; color: var(--accent-ink); cursor: pointer; margin-bottom: 6px; }
#starter-list { display: flex; flex-direction: column; gap: 6px; }
.starter { border: 1px dashed #c9d2db; background: #fff; border-radius: 12px; padding: 8px 10px; text-align: left; font-size: 14px; color: var(--ink); }
.hint-line { font-size: 11px; color: var(--ink-3); margin: 6px 0 0; }

/* ---------- 覆蓋層 ---------- */
.dim { position: absolute; inset: 0; background: rgba(15, 23, 32, .8); display: grid; place-items: center; color: #fff; font-size: 18px; z-index: 20; }
.overlay { position: absolute; inset: 0; background: rgba(15, 23, 32, .55); display: flex; align-items: flex-end; z-index: 30; }
.overlay .card { background: #fff; width: 100%; max-height: 92%; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); }
.card h2, .sheet h2 { font-family: var(--serif); font-size: 21px; margin: 0 0 10px; line-height: 1.4; }
.card p, .sheet p { margin: 0 0 10px; font-size: 15px; }
.kicker { color: var(--accent-ink); font-size: 12px !important; letter-spacing: .1em; margin-bottom: 4px !important; }
.relation { background: #f1f4f7; border-radius: 12px; padding: 10px 12px; margin: 12px 0; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.stack button, .stack .btn, .row-btns button { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; font-size: 15px; text-align: left; color: var(--ink); text-decoration: none; display: block; }
.stack .primary, .primary { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; text-align: center !important; font-weight: 700; }
.row-btns { display: flex; justify-content: flex-end; margin-top: 10px; }
.ghost { color: var(--ink-3) !important; }
.calm-msg { background: #fff6ec; border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: 14px; }
.calm-msg button { margin-top: 8px; border: 0; background: var(--accent); color: #fff; border-radius: 999px; padding: 6px 14px; }
.care { padding-left: 18px; font-size: 14px; }
.care li { margin-bottom: 6px; }
.care a { margin-left: 6px; color: var(--accent-ink); }
.help-bar { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 22; display: flex; gap: 8px; align-items: center; font-size: 12px; line-height: 1.4; padding: 8px 10px; border-radius: 10px; background: rgba(31, 41, 51, .94); color: #fff; }
.help-bar[hidden] { display: none; }
.help-bar button { flex: none; border: 0; background: var(--warm); color: #2b2420; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.toast { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); background: #1f2933; color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 13px; z-index: 40; white-space: nowrap; }

/* ---------- 警告與提前結束（第二版玩法規格 §9） ---------- */
.overlay.strike .card h2 { color: var(--accent-ink); }
.overlay.strike-end { background: #fbfaf7; align-items: stretch; }
.overlay.strike-end .card { background: transparent; max-height: none; border-radius: 0; display: flex; flex-direction: column; justify-content: center; justify-content: safe center; padding: 28px 24px calc(28px + env(safe-area-inset-bottom)); }
.overlay.strike-end .card p { line-height: 1.8; }
.strike-end .end-btns button { text-align: center; }

/* ---------- 回合結束 ---------- */
.sheet { position: absolute; inset: 0; background: #fbfaf7; z-index: 25; overflow-y: auto; }
.sheet-inner { padding: 20px 20px 40px; }
.progress { display: flex; gap: 4px; margin-bottom: 18px; }
.progress i { flex: 1; height: 3px; border-radius: 2px; background: #e3e6ea; }
.progress i.on { background: var(--accent); }
.sheet h3 { font-size: 15px; margin: 18px 0 8px; }
.small { font-size: 12px !important; color: var(--ink-3); }
.next { width: 100%; margin-top: 18px; border: 0; border-radius: 14px; padding: 12px; font-size: 16px; }
.diary { font-family: var(--hand); background: #fff; border: 1px solid #ece6dc; border-radius: 6px; padding: 16px 18px; box-shadow: 0 6px 16px rgba(70, 45, 20, .06); }
.diary p { font-size: 16px; line-height: 1.9; }
.you-mark { color: var(--accent-ink); font-family: var(--sans); font-size: 12px; }
.curve { width: 100%; height: auto; }
.curve .line { fill: none; stroke: #5b6b7b; stroke-width: 2.5; }
.curve .pt { fill: #5b6b7b; }
.curve .mark { fill: var(--accent); }
.curve .lv { font-size: 12px; }
.curve .tm { font-size: 8px; fill: var(--ink-3); text-anchor: middle; }
.th { display: flex; gap: 10px; align-items: flex-start; background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; }
.avatar.sm { width: 28px; height: 28px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 12px; flex: none; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare > div { background: #fff; border-radius: 12px; padding: 10px; }
.compare h3 { margin-top: 0; }
.sum { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.sum li { margin-bottom: 4px; }
.fb { background: #fff; border-radius: 14px; padding: 14px 16px; border-left: 4px solid var(--accent); }
.fb ol { padding-left: 18px; font-size: 14px; }
.fb li { margin-bottom: 8px; }
.tag { color: var(--accent-ink); font-size: 13px !important; }
.lens { margin-top: 12px; background: #f1f4f7; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.lens summary { cursor: pointer; font-weight: 700; }
.lens p { font-size: 13px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.checks .yes { color: #2f7d4f; }
.checks .no { color: var(--ink-3); }
.script { background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; }
.script p { font-size: 14px !important; margin: 4px 0 6px !important; }
.script button { border: 1px solid var(--line); background: #f7f9fa; border-radius: 999px; padding: 3px 12px; font-size: 12px; }
.steps { padding-left: 18px; font-size: 14px; }
.quiz-item { background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.quiz-item button { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; font-size: 14px; }
.quiz-item button.right { background: #e3f4e8; border-color: #7fc8a0; }
.quiz-item button.wrong { background: #fde8e6; border-color: #f0a39b; }
.why { font-size: 13px !important; color: var(--ink-2); }
.res { width: 100%; border-collapse: collapse; font-size: 13px; }
.res td { border-top: 1px solid #eceff2; padding: 6px 4px; vertical-align: top; }
.res td:first-child { color: var(--ink-3); width: 40%; }
.end-btns .btn { text-align: center; }

/* ---------- 課堂模式（學生端）：加入課堂、前後測、承諾卡、寫一句話 ---------- */
.room .room-code { font-size: 30px !important; font-weight: 700; letter-spacing: .25em; text-align: center; background: #f1f4f7; border-radius: 12px; padding: 6px 0 6px .25em; margin: 4px 0 12px !important; }
.room .seat-line { background: #fff6ec; border-radius: 12px; padding: 8px 12px; font-size: 14px !important; }
.room .seat-line b { color: var(--accent-ink); font-size: 18px; margin: 0 2px; }
.room .room-err { color: #b3261e; font-size: 13px !important; margin: 10px 0 0 !important; }
.room .primary[disabled] { opacity: .45; cursor: default; }
.room .scale-item { margin: 14px 0; }
.room .scale-item p { font-size: 14px !important; margin-bottom: 6px !important; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.likert button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 0; color: var(--ink); line-height: 1.25; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.likert b { font-size: 15px; }
.likert small { font-size: 10px; color: var(--ink-3); }
.likert [aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.likert [aria-pressed=true] small { color: #fff; }
.commit [aria-pressed=true] { border-color: var(--accent); background: #fff6ec; box-shadow: inset 0 0 0 1px var(--accent); }
.commit [aria-pressed=true]::before { content: "✓ "; color: var(--accent-ink); font-weight: 700; }
.room-note { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px; resize: vertical; background: #fff; }
.room .note-count { text-align: right; margin: 2px 0 6px !important; }
.consent { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 4px 0 6px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.note-card { background: #fff; border: 1px solid #ece6dc; border-radius: 12px; padding: 10px 14px; margin: 12px 0; }
.note-card small { color: var(--ink-3); font-size: 12px; }
.note-card p { font-family: var(--hand); font-size: 16px !important; margin: 4px 0 0 !important; word-break: break-word; }
.link-btn { display: block; width: 100%; border: 0; background: none; color: var(--ink-3); text-decoration: underline; font-size: 13px; margin-top: 10px; padding: 4px 0; }

/* ---------- 第二版：回合、量表、教學、困難模式（docs/第二版玩法規格.md） ---------- */

/* 沒有真的送出的那一句 */
.msg.unsent .bubble { opacity: .55; }
.msg.unsent .read-count { color: #b3261e; }

/* 量表的長條：寬度變動時約 0.6 秒動畫 */
.mbar { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.mbar s, .meter .bar s { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .6s ease; }
[data-m="mood"] s, .unseen td:nth-child(2) s { background: var(--m-mood); }
[data-m="akai"] s, .unseen td:nth-child(3) s { background: var(--m-akai); }
[data-m="next"] s, .unseen td:nth-child(4) s { background: var(--m-next); }

/* 數字旁邊的「+20」「−15」，約 1.5 秒 */
.chip { position: absolute; font-size: 11px; font-weight: 700; font-style: normal; line-height: 1.3; padding: 0 5px; border-radius: 999px; opacity: 0; pointer-events: none; white-space: nowrap; }
.chip.up { background: #e3f4e8; color: #2f7d4f; }
.chip.down { background: #fde8e6; color: #b3261e; }
.chip.show { animation: chip 1.5s ease forwards; }
@keyframes chip { 0% { opacity: 0; translate: 0 4px; } 15%, 75% { opacity: 1; translate: 0 0; } 100% { opacity: 0; } }

/* 窄螢幕：聊天室標題列下面的精簡列（高度 ≤ 44px） */
.strip-wrap { position: relative; z-index: 19; flex: none; }
.strip { width: 100%; height: 40px; border: 0; border-top: 1px solid rgba(255, 255, 255, .06); background: #2a3946; color: #cfd8e1; display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 11px; text-align: left; }
.strip-round { font-weight: 700; color: #fff; white-space: nowrap; }
.mini { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; position: relative; }
.mini i { font-style: normal; font-size: 12px; flex: none; }
.mini .mbar { flex: 1; min-width: 16px; }
.mini em { font-style: normal; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.mini .chip { left: 50%; top: -14px; margin-left: -12px; }
.strip-left { display: none; }
.strip-caret { opacity: .6; margin-left: auto; }

/* 提示面板：寬螢幕在手機右邊，窄螢幕從精簡列往下展開 */
.hud { display: none; flex-direction: column; gap: 14px; background: #fff; color: var(--ink); border-radius: 16px; padding: 14px 16px; box-shadow: 0 12px 30px rgba(15, 23, 32, .25); font-size: 13px; }
.hud.open { display: flex; position: absolute; left: 8px; right: 8px; top: calc(100% + 4px); max-height: min(70vh, 460px); overflow-y: auto; }
.hud h3 { font-size: 13px; margin: 0 0 6px; }
.hud-round p { margin: 6px 0 0; font-weight: 700; font-size: 14px; }
.round-dots { display: flex; gap: 6px; }
.round-dots i { width: 10px; height: 10px; border-radius: 50%; background: #e3e6ea; }
.round-dots i.done { background: #b9c3cd; }
.round-dots i.now { background: var(--accent); box-shadow: 0 0 0 3px rgba(232, 116, 59, .2); }
.meters { display: flex; flex-direction: column; gap: 10px; }
.meter .m-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.m-val { position: relative; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-val b { font-size: 16px; }
.m-val .chip { right: calc(100% + 4px); top: 1px; }
.meter .bar { height: 8px; border-radius: 4px; background: #e6eaee; overflow: hidden; margin-top: 4px; }
.m-note { font-size: 11px; color: var(--ink-3); margin: 0; }
.can-say ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.can-say li { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.can-say li.said { background: #f1f4f7; color: var(--ink-3); }
.how { align-self: flex-start; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--accent-ink); }
.how[disabled] { opacity: .5; cursor: default; }

@media (min-width: 900px) {
  .stage { display: flex; justify-content: center; align-items: center; gap: 36px; }
  .phone { flex: 0 1 420px; }
  .strip-wrap { display: none; }
  .hud { display: flex; flex: 0 0 280px; max-height: min(860px, calc(100dvh - 48px)); overflow-y: auto; box-shadow: 0 10px 30px rgba(31, 41, 51, .12); }
}

/* 困難模式：拿掉量表、小安身邊、開口人數；回合數和「這回合還能說」保留 */
body.hard .meters, body.hard .mini, body.hard .ring-row, body.hard .lit-wrap { display: none !important; }
body.hard .strip-left { display: inline; }

/* 教學：聚光燈遮罩，框住要介紹的元件 */
.tour { position: fixed; inset: 0; z-index: 100; }
.tour.no-hole { background: rgba(15, 23, 32, .72); }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 200vmax rgba(15, 23, 32, .72); outline: 2px solid var(--warm); pointer-events: none; transition: left .25s, top .25s, width .25s, height .25s; }
.tour-card { position: fixed; width: min(300px, calc(100vw - 32px)); background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.tour-text { font-size: 15px; margin: 0 0 12px; }
.tour-btns { display: flex; justify-content: flex-end; gap: 8px; }
.tour-btns button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; }

/* 這才是現實生活：普通模式最後一頁的卡 */
.reality { background: #24323f; color: #fff; border-radius: 14px; padding: 14px 16px; margin: 20px 0 4px; }
.reality h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 18px; }
.reality p { font-size: 14px !important; color: #dce3ea; }
.reality .stack button { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); text-align: center; }

/* 困難模式結果頁：看不見的那三條 */
.unseen { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; background: #fff; border-radius: 12px; }
.unseen th, .unseen td { padding: 6px 4px; border-top: 1px solid #eceff2; text-align: left; vertical-align: top; }
.unseen thead th { border-top: 0; font-weight: 500; font-size: 11px; line-height: 1.3; color: var(--ink-3); }
.unseen thead th:first-child, .unseen tbody th { width: 64px; }
.unseen tbody th { font-weight: 700; white-space: nowrap; }
.unseen th small { display: block; font-weight: 400; color: var(--ink-3); }
.unseen .num { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; }
.unseen .mbar { height: 5px; margin-top: 3px; background: #e6eaee; }

@media (prefers-reduced-motion: reduce) {
  .mbar s, .meter .bar s, .tour-hole { transition: none; }
  .chip { display: none; }
}
