/* --- room shell ------------------------------------------------------------ */
.room { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.room.solo { grid-template-columns: minmax(0, 1fr); max-width: 820px; margin: 0 auto; }
@media (max-width: 920px) { .room { grid-template-columns: 1fr; } }
.room-head { --c: var(--accent); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.room-head h1 { font-size: 1.6rem; }
.code-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); font: 700 0.95rem var(--mono); letter-spacing: 0.16em; color: var(--text); }
.code-chip:hover { border-color: var(--c); }
.code-chip .icon { color: var(--muted); }
.stage { --c: var(--accent); position: relative; overflow: hidden; min-height: 420px; padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.side { display: flex; flex-direction: column; gap: 12px; }
.panel { padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.panel h3 { display: flex; align-items: center; gap: 6px; font: 700 0.78rem var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.members { display: flex; flex-direction: column; gap: 4px; }
.member { display: flex; align-items: center; gap: 9px; padding: 4px; border-radius: 10px; }
.member.off { opacity: 0.4; }
.member .av { width: 32px; height: 32px; font-size: 1.1rem; border-radius: 8px; }
.member .nm { flex: 1; min-width: 0; font-weight: 700; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member .host { color: var(--accent); }
.member .kick { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 0; background: none; color: var(--dim); }
.member .kick:hover { background: var(--surface-2); color: var(--bad); }
.chat-log { height: 230px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; font-size: 0.9rem; padding-right: 4px; }
.chat-log .msg b { font-weight: 700; margin-right: 6px; }
.chat-log .sys { color: var(--dim); font-size: 0.82rem; }
.chat-form { display: flex; gap: 6px; margin-top: 10px; }
.chat-form .input { flex: 1; height: 36px; }

/* --- lobby / results ---------------------------------------------------------- */
.lobby { display: grid; gap: 22px; }
.lobby h2 { font-size: 1.15rem; margin-bottom: 10px; }
.how { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--muted); }
.how li::marker { color: var(--c); font-weight: 700; }
.settings { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.setting label { font-weight: 500; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { border: 0; background: none; border-radius: 7px; padding: 5px 12px; font-weight: 700; font-size: 0.85rem; color: var(--muted); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.seg button:disabled { cursor: default; }
.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.stepper button { width: 30px; height: 30px; border: 0; border-radius: 7px; background: var(--surface-3); font-weight: 700; }
.stepper span { min-width: 2.4em; text-align: center; font: 700 0.95rem var(--mono); }
.invite { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.invite .label { font: 700 0.72rem var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.invite .big-code { font: 700 1.9rem var(--mono); letter-spacing: 0.18em; color: var(--c); }
.invite .url { color: var(--muted); font-size: 0.88rem; }
.start-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--border); }
.start-row .note { color: var(--muted); font-size: 0.9rem; }
.results h2 { font-size: 1.8rem; text-align: center; margin: 4px 0 4px; }
.results .sub { text-align: center; color: var(--muted); margin-bottom: 18px; }
.podium { display: flex; flex-direction: column; gap: 8px; max-width: 560px; margin: 0 auto 20px; }
.place { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); animation: pop 0.25s backwards; }
.place.first { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.place .rk { width: 2em; text-align: center; font: 700 1rem var(--mono); color: var(--dim); }
.place.first .rk { color: var(--accent); }
.place .who { flex: 1; min-width: 0; }
.place .who b { display: block; font-weight: 700; }
.place .who span { font-size: 0.85rem; color: var(--muted); }
.place .xp { font: 700 0.85rem var(--mono); color: var(--accent); }

/* --- shared game bits ------------------------------------------------------------ */
.g-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.timebar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 6px 0 18px; }
.timebar > div { height: 100%; width: 100%; background: var(--c); border-radius: 99px; transform-origin: left; }
.countdown { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 88%, transparent); }
.countdown b { font: 800 7rem var(--display); color: var(--c); animation: pulse 1s infinite; }
.prompt-card { text-align: center; padding: 8px 0 4px; }
.prompt-card .kicker, .secret .kicker, .daily-head .kicker { font: 700 0.75rem var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--c); }
.prompt-card h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); margin: 8px 0 4px; }
.answer-form { display: flex; gap: 10px; max-width: 520px; margin: 18px auto 0; }
.answer-form .input { flex: 1; height: 48px; font-size: 1.1rem; }
.answer-form .btn { height: 48px; }
.locked-msg { text-align: center; margin-top: 18px; font-weight: 500; }
.locked-msg b { color: var(--c); }
.who-done { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; min-height: 34px; margin-top: 14px; }
.who-done .av { width: 32px; height: 32px; font-size: 1.05rem; border-radius: 8px; animation: pop 0.2s; }
.scorebar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.scorebar .s { display: flex; align-items: center; gap: 7px; padding: 3px 10px 3px 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.88rem; font-weight: 700; }
.scorebar .s .av { width: 26px; height: 26px; font-size: 0.95rem; border-radius: 7px; }
.scorebar .s b { font: 700 0.88rem var(--mono); color: var(--c); }
.scorebar .s.me { border-color: var(--c); }
.float { position: absolute; z-index: 6; pointer-events: none; white-space: nowrap; font: 700 0.95rem var(--mono); animation: rise 1.1s forwards; }

/* --- Fuse ---------------------------------------------------------------------------- */
.arena { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin: 0 auto; }
.arena.boom-shake { animation: shake 0.45s; }
.arena .seat { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 96px; text-align: center; transform: translate(-50%, -50%); transition: opacity 0.3s; }
.arena .seat .av { width: 52px; height: 52px; font-size: 1.8rem; border-radius: 14px; border: 2px solid transparent; transition: transform 0.2s, border-color 0.2s; }
.arena .seat.turn .av { border-color: var(--fuse); transform: scale(1.12); }
.arena .seat.out { opacity: 0.35; }
.arena .seat.out .av { filter: grayscale(1); }
.arena .seat .nm { max-width: 96px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arena .seat .typing { min-height: 1em; font: 500 0.72rem var(--mono); color: var(--dim); }
.pips { display: flex; gap: 3px; min-height: 8px; }
.pips i { width: 8px; height: 8px; border-radius: 2px; background: var(--surface-3); }
.pips i.on { background: var(--fuse); }
.bomb-wrap { position: absolute; left: 50%; top: 50%; width: 38%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.bomb-wrap svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.bomb-wrap .ring-bg { stroke: var(--surface-3); }
.bomb-wrap .bomb { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text); transition: color 0.15s; }
.bomb-wrap.hot .bomb { color: var(--bad); animation: shake 0.3s infinite; }
.bomb-wrap.blown .bomb { color: var(--bad); transform: scale(1.15); }
/* A full-size overlay rotated about the arena centre, so the arrow always points at the seat. */
.pointer { position: absolute; inset: 0; pointer-events: none; transition: transform 0.35s cubic-bezier(0.4, 1.6, 0.6, 1), opacity 0.2s; }
.pointer::after { content: ''; position: absolute; left: 50%; top: 29%; transform: translate(-50%, -100%); border: 7px solid transparent; border-bottom: 11px solid var(--fuse); }
.word-zone { min-height: 120px; margin-top: 8px; text-align: center; }
.word { font: 700 clamp(1.7rem, 6.5vw, 2.8rem) var(--mono); letter-spacing: 0.03em; user-select: none; -webkit-user-select: none; word-break: break-all; }
.word .ok { color: var(--good); }
.word .no { color: var(--bad); text-decoration: underline; }
.status { min-height: 1.5em; margin-top: 6px; font-weight: 500; color: var(--muted); }
.status.mine { color: var(--fuse); font-weight: 700; }
.type-input { width: min(100%, 420px); height: 52px; margin-top: 12px; text-align: center; font: 500 1.3rem var(--mono); border-color: var(--fuse); }
.type-input.waiting { border-color: var(--border-strong); opacity: 0.6; }
.fuse-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font: 500 0.78rem var(--mono); color: var(--dim); }

/* --- Mole ----------------------------------------------------------------------------- */
.secret { text-align: center; margin: 2px 0 8px; }
.secret b { display: block; margin: 4px 0; font: 800 clamp(2rem, 6vw, 3rem) var(--display); letter-spacing: -0.02em; }
.clue-board { display: flex; flex-direction: column; gap: 6px; max-width: 640px; margin: 16px auto 0; }
.clue-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 12px; text-align: left; background: var(--surface-2); border: 1px solid var(--border); }
.clue-row .av { width: 32px; height: 32px; font-size: 1.1rem; border-radius: 8px; }
.clue-row .nm { min-width: 6.5em; max-width: 9em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clue-row .chips { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.clue-row .chip { padding: 3px 9px; border-radius: 7px; background: var(--surface-3); font-weight: 700; font-size: 0.9rem; }
.clue-row .chip.dim { color: var(--dim); font-weight: 500; }
.clue-row .votes { display: flex; gap: 2px; }
.clue-row .votes .av { width: 24px; height: 24px; font-size: 0.85rem; border-radius: 6px; }
.clue-row .pts { font: 700 0.85rem var(--mono); color: var(--good); }
.clue-row .tagm { font: 700 0.65rem/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 6px; border-radius: 5px; background: var(--bad); color: var(--ink); }
.clue-row.votable { cursor: pointer; }
.clue-row.votable:hover { border-color: var(--c); }
.clue-row.picked { border-color: var(--c); }
.clue-row.mole { border-color: color-mix(in srgb, var(--bad) 60%, var(--border)); }
.verdict-card { max-width: 640px; margin: 6px auto 4px; padding: 16px; border-radius: 14px; text-align: center; animation: pop 0.25s; background: var(--surface-2); border: 1px solid var(--border-strong); }
.verdict-card.caught { border-color: color-mix(in srgb, var(--good) 55%, var(--border)); }
.verdict-card.escaped { border-color: color-mix(in srgb, var(--bad) 55%, var(--border)); }
.verdict-card h2 { font-size: clamp(1.3rem, 4vw, 1.7rem); }
.verdict-card .words { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-top: 8px; color: var(--muted); }
.verdict-card .words b { color: var(--text); font-weight: 700; }

/* --- Shove ------------------------------------------------------------------------------ */
.rink-wrap { position: relative; width: min(100%, 620px); margin: 0 auto; }
.rink { display: block; width: 100%; aspect-ratio: 1; border-radius: 16px; touch-action: none; background: #0b1530; }
.rink-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; pointer-events: none; font: 800 clamp(1.4rem, 5vw, 2.2rem) var(--display); color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.2s; }
.rink-msg.show { opacity: 1; }
.dash-btn { position: absolute; right: 14px; bottom: 14px; }
@media (hover: hover) and (pointer: fine) { .dash-btn { display: none; } }
.shove-help { margin-top: 10px; text-align: center; font-size: 0.85rem; color: var(--dim); }
.wins { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.8rem; }
.wins .dot { width: 10px; height: 10px; border-radius: 3px; }
.wins .av { width: 22px; height: 22px; font-size: 0.8rem; border-radius: 6px; }

/* --- Undercut ---------------------------------------------------------------------------- */
.numpad { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; max-width: 620px; margin: 18px auto 0; }
@media (max-width: 560px) { .numpad { grid-template-columns: repeat(5, 1fr); } }
.numpad button { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); font: 700 clamp(1.3rem, 4vw, 1.9rem) var(--mono); transition: border-color 0.15s, background 0.15s, transform 0.05s; }
.numpad button:hover:not(:disabled) { border-color: var(--c); }
.numpad button:active:not(:disabled) { transform: translateY(1px); }
.numpad button.sel { background: var(--c); border-color: var(--c); color: var(--ink); }
.numpad button:disabled:not(.sel) { opacity: 0.35; cursor: default; }
.numline { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; max-width: 680px; margin: 16px auto 0; align-items: end; }
.numcol { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; }
.numcol .n { width: 100%; padding: 4px 0; border-radius: 9px; text-align: center; font: 700 1.3rem var(--mono); background: var(--surface-2); border: 1px solid var(--border); }
.numcol.unique .n { border-color: var(--c); }
.numcol.win .n { background: var(--c); border-color: var(--c); color: var(--ink); }
.numcol.clash .n { color: var(--bad); text-decoration: line-through; }
.numcol .av { width: 28px; height: 28px; font-size: 0.95rem; border-radius: 7px; animation: pop 0.2s backwards; }
.verdict { margin-top: 16px; text-align: center; font: 700 1.25rem var(--display); }

/* --- Quickdraw --------------------------------------------------------------------------- */
.pad { display: grid; place-items: center; min-height: 300px; padding: 20px; border-radius: 16px; text-align: center; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: background 0.06s; }
.pad b { display: block; font: 800 clamp(2.4rem, 9vw, 4.4rem) var(--display); letter-spacing: -0.02em; }
.pad span { font-weight: 500; }
.pad.wait { background: #2a1520; color: #ffb3c6; }
.pad.go { background: var(--good); color: var(--ink); }
.pad.fault { background: #3a1018; color: var(--bad); }
.pad.result { background: var(--surface-2); cursor: default; }
.draw-list { display: flex; flex-direction: column; gap: 6px; max-width: 420px; margin: 12px auto 0; }

/* --- daily ----------------------------------------------------------------------------- */
.daily-head { --c: var(--accent); margin: 8px 0 22px; text-align: center; }
.daily-head h1 { margin-top: 6px; font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; }
.daily-head p { max-width: 560px; margin: 10px auto 0; color: var(--muted); }
.big-score { text-align: center; }
.big-score b { display: block; font: 800 clamp(3.2rem, 11vw, 4.8rem)/1 var(--display); color: var(--c); }
.share-box { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0; }
.hist-wrap { margin-top: 12px; }
.hist { display: grid; grid-template-columns: repeat(100, 1fr); gap: 1px; height: 120px; align-items: end; padding: 8px; border-radius: 10px; background: var(--surface-2); }
.hist .col { display: flex; align-items: flex-end; height: 100%; }
.hist .col i { display: block; width: 100%; border-radius: 2px 2px 0 0; background: var(--dim); }
.hist .col.one i { background: var(--under); }
.hist .col.clash i { background: var(--bad); }
.hist .col.win i { background: var(--accent); }
.hist .col.mine { outline: 1px dashed var(--text); }
.hist-axis { display: flex; justify-content: space-between; padding: 3px 8px 0; font: 500 0.72rem var(--mono); color: var(--dim); }
