/* 무결 — 방 화면
   영역 넷을 분리한다: 문제 / 힌트 / 질문 기록 / 대화.
   대화 패널은 "접을 수 있는 우측 패널" 하나의 모델이고,
   768px 이상은 2단으로 나란히, 미만은 같은 패널이 드로어로 겹친다. */

:root {
  --bg: #0e1014;
  --panel: #161920;
  --panel-2: #1c2029;
  --line: #2b313d;
  --text: #eef0f4;
  /* 대비 4.5:1 이상을 지키려고 기존보다 밝게 잡았다 */
  --muted: #a3abbb;
  --accent: #8fb5ff;

  --yes: #4ade80;
  --no: #fb8f8f;
  --irrelevant: #b0bacb;
  --invalid: #fcd34d;
  --ghost: #c4b5fd;

  --radius: 12px;
  --discuss-w: 34%;
}

* { box-sizing: border-box; }

/* HTML 의 hidden 속성은 CSS 의 display 선언에 진다. .ask 처럼 display 를 준
   요소는 hidden 을 걸어도 그대로 보이고, 접근성 트리에도 남는다. */
[hidden] { display: none !important; }

html, body { margin: 0; height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo",
        "Malgun Gothic", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

button, input { font: inherit; color: inherit; }

/* 키보드 사용자를 위해 초점을 확실히 보이게 한다 */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  background: var(--accent);
  color: #0e1014;
  font-weight: 700;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

.app { display: flex; flex-direction: column; height: 100dvh; }

/* ---------- 상단 바 ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 10px;
  padding-top: env(safe-area-inset-top);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
  position: relative;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }

.room { display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: 15px; font-weight: 400; }
.room-label { font-size: 12px; color: var(--muted); }
.room-code { letter-spacing: 1.5px; font-weight: 700; }

/* 사람이 늘어도 상단바 폭이 변하지 않는다. */
.players-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 2px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
}
.players-btn:hover { border-color: var(--accent); }
.crown-badge { font-size: 11px; }

.avatar {
  display: grid;
  place-items: center;
  width: 27px; height: 27px;
  margin-left: -7px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: #0e1014;
}
.avatar.ghost { box-shadow: 0 0 0 2px var(--ghost); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.dev-btn {
  height: 26px;
  padding: 0 9px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.tickets {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.tickets.low { border-color: var(--invalid); color: var(--invalid); }
.ticket-icon { font-size: 12px; }

.badge {
  position: absolute;
  top: 0; right: 0;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #0e1014;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

/* ---------- 레이아웃 ---------- */

.panes { display: flex; flex: 1 1 auto; min-height: 0; }
.pane { display: flex; flex-direction: column; min-height: 0; }
.pane-questions { flex: 1 1 auto; min-width: 0; }
.pane-discuss {
  flex: 0 0 var(--discuss-w);
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.section-head {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--accent);
}

/* ---------- 1. 문제 ---------- */

.scenario {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  /* 아주 긴 상황 글이 들어와도 기록 자리가 0이 되지 않게 하는 보호선.
     보통은 걸리지 않는다 — 모바일에서 카드는 어차피 곧 접힌다. */
  max-height: 62dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* 안쪽 가로 스크롤 요소가 카드를 밀어내지 못하게 잠근다.
     이게 없으면 컷 스트립의 내용 폭이 그대로 밀고 나가 상황 글이 잘린다. */
  min-width: 0;
  margin: 12px 14px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #1f2531, var(--panel-2));
  overflow: hidden;
}
.scenario-inner { min-width: 0; padding: 12px 15px 14px; border-left: 4px solid var(--accent); }
.scenario-name { margin-left: 8px; color: var(--muted); letter-spacing: 0; font-weight: 400; }
.scenario-text {
  margin: 7px 0 0;
  font-size: 17px;
  line-height: 1.65;
  color: #f2f4f8;
  word-break: keep-all;
}

/* ---------- 2. 힌트 (질문 기록 위 고정) ---------- */

.hintbar {
  flex: 0 0 auto;
  /* 힌트에 이미지가 붙으면 이 칸이 커져 질문 기록을 눌러버린다.
     좁은 화면에서는 탭 하나를 통째로 쓰므로 아래에서 이 제한을 푼다. */
  max-height: 24dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 10px 14px 0;
  padding: 10px 13px 12px;
  border: 1px solid rgba(252, 211, 77, .3);
  border-radius: var(--radius);
  background: rgba(252, 211, 77, .06);
}
.hintbar .section-head { color: var(--invalid); }

.hint-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }

.hint-open {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.hint-open:hover { border-color: var(--invalid); }
.hint-tier {
  flex: 0 0 auto;
  min-width: 24px;
  padding: 1px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}
/* 상으로 갈수록 결정적이라 색도 세진다. */
.hint-tier.t-하 { color: var(--irrelevant); }
.hint-tier.t-중 { color: var(--invalid); }
.hint-tier.t-상 { color: var(--no); }
.hint-src { margin-left: auto; font-size: 11px; color: var(--muted); }
.hint-cta { font-size: 12px; color: var(--muted); }

.hint-shown {
  padding: 10px 12px;
  border: 1px solid rgba(252, 211, 77, .35);
  border-radius: 9px;
  background: var(--panel-2);
}
.hint-shown .hint-head { display: flex; gap: 9px; margin-bottom: 5px; }
.hint-text { color: #f2f4f8; word-break: keep-all; }

.hint-img {
  display: block;
  width: 100%;
  margin-top: 9px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #000;
  cursor: zoom-in;
}
.hint-img img { display: block; width: 100%; max-height: 260px; object-fit: contain; }

/* ---------- 접힌 문제 띠 ---------- */

/* 카드를 접고 나면 이것만 남는다. 눌러서 시트로 다시 본다. */
.peek {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  width: calc(100% - 28px);
  margin: 10px 14px 0;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.peek:hover { border-color: var(--accent); }
.peek[hidden] { display: none; }
.peek-thumb {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
}
.peek-thumb[hidden] { display: none; }
.peek-text { min-width: 0; flex: 1; display: flex; gap: 7px; align-items: baseline; }
.peek-text b { flex: 0 0 auto; font-size: 13px; }
.peek-text span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}
.peek-more { flex: 0 0 auto; font-size: 11.5px; color: var(--accent); }

/* ---------- 상황 컷 (전체 폭 히어로) ---------- */

/* 가로로 넘기며 본다. 컷이 없는 문제는 목록이 통째로 사라진다. */
.hero { position: relative; min-width: 0; }
.hero[hidden] { display: none; }

.hero-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.hero-track::-webkit-scrollbar { display: none; }

.hero-frame { position: relative; min-width: 0; }
.hero-slide { flex: 0 0 100%; scroll-snap-align: center; min-width: 0; }
.hero-view {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: zoom-in;
}
.hero-view img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* 캡션을 사진 위에 얹지 않는다. 어떤 사진이 올지 몰라 대비를 보장할 수 없다. */
.hero-caption[hidden] { display: none; }
.hero-caption {
  margin: 0;
  padding: 7px 15px 3px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  word-break: keep-all;
}

.hero-dots {
  position: absolute;
  left: 0; right: 0;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.hero-dots li {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .6);
  transition: background .2s;
}
.hero-dots li.on { background: #fff; }

/* ---------- 클리어 컷 ---------- */

.clear-cuts { display: grid; gap: 10px; margin-top: 10px; }
.clear-cuts:empty { display: none; }
.clear-cut { margin: 0; }
.clear-view {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  cursor: zoom-in;
}
.clear-view img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.clear-cut figcaption {
  margin: 6px 2px 0;
  font-size: 11.5px;
  color: var(--muted);
  word-break: keep-all;
}

/* ---------- 컷 크게 보기 ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .88);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }

/* ---------- 3. 질문 기록 ---------- */

.log {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.turn { display: block; }

/* 줄 전체가 누를 수 있는 것이 된다. 버튼 기본 모양은 걷어낸다. */
.row-main {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}
button.row-main { cursor: pointer; }
button.row-main:hover .turn-q,
button.row-main:hover .msg-body { background: #2b3547; }
.row-more {
  flex: 0 0 auto;
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  transition: transform .15s;
}
button.row-main[aria-expanded="true"] .row-more { transform: rotate(180deg); }

/* 펼쳤을 때만 나오는 조작. 평소에는 기록에 아무 버튼도 없다. */
.acts {
  display: flex;
  gap: 7px;
  margin: 7px 0 0 34px;
  flex-wrap: wrap;
}
.act {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
}
.act:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.act:disabled { opacity: .5; cursor: default; }

.turn .avatar { margin: 2px 0 0; width: 25px; height: 25px; border: 0; }
.turn-body { min-width: 0; flex: 1; }
.turn-who { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.turn-row { position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.turn-q {
  padding: 7px 12px;
  border-radius: 4px 13px 13px 13px;
  background: var(--panel-2);
  word-break: keep-all;
}
.turn.mine .turn-q { background: #26334d; }

.verdict {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid currentColor;
}
.verdict.yes { color: var(--yes); }
.verdict.no { color: var(--no); }
.verdict.irrelevant { color: var(--irrelevant); }
.verdict.invalid { color: var(--invalid); }

.turn-pending .turn-q { opacity: .6; }
.dots { display: inline-flex; gap: 3px; padding: 0 4px; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25 } 30% { opacity: 1 } }

.notice {
  align-self: center;
  max-width: 90%;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}
.notice.graduate { color: var(--yes); }
.notice.hint { color: var(--invalid); }

/* ---------- 입력 ---------- */

.composer {
  flex: 0 0 auto;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.composer-warn {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 9px;
  background: rgba(252, 211, 77, .12);
  border: 1px solid rgba(252, 211, 77, .35);
  color: var(--invalid);
  font-size: 12.5px;
}

.ask, .say { display: flex; gap: 8px; align-items: center; }
.field { position: relative; flex: 1 1 auto; min-width: 0; }
.field input {
  width: 100%;
  height: 42px;
  padding: 0 54px 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  outline: none;
}
.field input::placeholder, .say input::placeholder { color: var(--muted); }
.counter {
  position: absolute;
  right: 15px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.counter.max { color: var(--invalid); }

.say input {
  flex: 1;
  height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  outline: none;
}
.say input:disabled { opacity: .5; }

.btn-answer {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.btn-answer[aria-pressed="true"] {
  border-color: var(--yes);
  color: var(--yes);
  background: rgba(74, 222, 128, .12);
}

.btn-send {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #0e1014;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.btn-send:disabled { background: var(--line); color: var(--muted); cursor: default; }

/* ---------- 4. 토론 — 하나의 흐름 ---------- */

.discuss-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 6px 11px 14px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.discuss-head .icon-btn { margin-left: auto; }

.ghost-tag {
  margin: 0;
  padding: 2px 9px;
  border: 1px solid var(--ghost);
  border-radius: 999px;
  color: var(--ghost);
  font-size: 11.5px;
}

.chat {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.msg .row-main { flex-direction: column; align-items: stretch; gap: 0; position: relative; }
.msg .row-more { position: absolute; right: 0; top: 0; }
.msg .acts { margin-left: 0; }
.msg-who { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.msg-row { position: relative; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.msg-body { color: #dde2ea; word-break: keep-all; }
.msg.mine .msg-body { color: var(--accent); }

/* 유령의 글. 유령에게만 내려간다. */
.msg.ghost .msg-who, .msg.ghost .msg-body { color: var(--ghost); }
.msg.ghost .msg-body { font-style: italic; }
.ghost-mark { margin-left: 4px; }

.ghost-note {
  margin: 0;
  padding: 0 14px 10px;
  color: var(--ghost);
  font-size: 11.5px;
  line-height: 1.5;
}

.say {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.app.is-ghost .say input { border-color: rgba(196, 181, 253, .4); }

/* ---------- 주목 (유령이 뿌리는 파티클) ---------- */

.hl-count {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(196, 181, 253, .14);
  color: var(--ghost);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.particles {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  pointer-events: none;
}
.particles i {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ghost);
  box-shadow: 0 0 7px var(--ghost);
  animation: sparkle 850ms ease-out var(--delay, 0ms) forwards;
}
@keyframes sparkle {
  from { opacity: 1; transform: translate(0, 0) scale(1); }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); }
}

/* ---------- 힌트 덱 (유령 전용) ---------- */

.hint-deck {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}
.hint-deck summary { cursor: pointer; list-style: none; }
.hint-deck summary::-webkit-details-marker { display: none; }
.hint-deck summary .section-head { color: var(--invalid); }
.hint-deck-note { margin: 6px 0 8px; font-size: 11.5px; color: var(--muted); }
.deck-next { display: grid; gap: 6px; }
.deck-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}
.deck-btn:hover:not(:disabled) { border-color: var(--invalid); }
.deck-btn:disabled { opacity: .45; cursor: default; }
.deck-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-cta { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: var(--invalid); }
.deck-wait { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- 넓은 화면: 한 칸에 쌓이므로 위쪽을 묶는다 ---------- */

/* 좁은 화면은 문제를 접고 힌트를 탭으로 빼서 기록이 화면을 차지한다.
   넓은 화면은 셋이 한 칸에 세로로 쌓이므로 위 둘을 묶어야 기록이 남는다. */
@media (min-width: 768px) {
  .scenario { max-height: 34dvh; }
  .hero-view img { max-height: 22dvh; }
}

/* ---------- 좁은 화면: 하단 탭으로 전환 ---------- */

/* 드로어를 걷어냈다. 숨겨진 패널이라 존재를 모르고 지나치는 게 문제였다.
   768px 이상은 지금처럼 2단으로 나란히 두고, 미만은 탭으로 한 번에 하나씩 본다. */

.mobile-tabs { display: none; }

.app.discuss-closed .pane-discuss { display: none; }

@media (max-width: 767px) {
  /* 탭이 고르는 pane 하나만 보인다 */
  .app:not([data-mtab="discuss"]) .pane-discuss { display: none; }
  .app[data-mtab="discuss"] .pane-questions { display: none; }
  .app[data-mtab="discuss"] .pane-discuss { display: flex; border-left: 0; }

  /* 힌트는 DOM 을 옮기지 않고 탭 하나를 통째로 차지한다.
     질문 화면의 나머지 형제를 감추면 끝이라 코드가 갈라지지 않는다. */
  .app:not([data-mtab="hints"]) .hintbar { display: none; }
  .app[data-mtab="hints"] .pane-questions > *:not(.hintbar) { display: none; }
  .app[data-mtab="hints"] .hintbar {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 14px;
  }

  .mobile-tabs {
    display: flex;
    flex: 0 0 auto;
    border-top: 1px solid var(--line);
    background: var(--panel);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mtab {
    flex: 1;
    min-height: 50px;
    border: 0;
    border-top: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
  }
  .mtab[aria-selected="true"] {
    color: var(--text);
    border-top-color: var(--accent);
    font-weight: 700;
  }
  .mtab-badge {
    display: inline-block;
    min-width: 18px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #0e1014;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
  }

  /* 상단 말풍선은 데스크톱 접기 전용이라 여기선 필요 없다 */
  .discuss-toggle, .discuss-head .icon-btn { display: none; }

  .scenario-text { font-size: 16px; }
  .discuss-head { padding: 11px 14px; }
}

/* ---------- 정답 순간 ---------- */

.result {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 10, 14, .82);
  overflow-y: auto;
}
.result[hidden] { display: none; }

.result-card {
  width: min(100%, 400px);
  padding: 30px 26px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #1f2531, var(--panel));
  text-align: center;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .55);
  position: relative;
}
.result-card:focus-visible { outline: 3px solid var(--accent); }

.result-crown { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.result.miss .result-crown { filter: grayscale(1); opacity: .5; }

.result-title { margin: 0 0 6px; font-size: 23px; letter-spacing: -.4px; }
.result.win .result-title { color: var(--yes); }
.result.miss .result-title { color: var(--invalid); }

.result-rank { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; }

.result-answer {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  text-align: left;
}
.result-label {
  display: block;
  margin-bottom: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--accent);
}
.result-answer p { margin: 0; word-break: keep-all; line-height: 1.6; }

/* 몇 칸을 채웠는지만 보여준다. 어느 요소가 빠졌는지 알려주면 정답을 흘리는 셈이다. */
.result-points {
  display: flex;
  gap: 7px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.result-points li {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: var(--line);
}
.result-points li.on { background: var(--yes); }

.result-note {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  word-break: keep-all;
}

.result-close {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #0e1014;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* 컨페티는 카드 위에서 흩어진다 */
.confetti { position: absolute; left: 50%; top: 30%; width: 0; height: 0; pointer-events: none; }
.confetti i {
  position: absolute;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  animation: fall 1500ms ease-out var(--delay, 0ms) forwards;
}
@keyframes fall {
  from { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--spin)); }
}

/* ---------- 왕관 · 유령이 된 뒤 ---------- */

.avatar-wrap { position: relative; display: inline-block; line-height: 0; }
.crown {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6));
}
.turn .crown { font-size: 11px; top: -7px; }

/* 유령이 되면 화면 전체의 온도가 바뀐다 */
.app.is-ghost .topbar { background: #1b1826; border-bottom-color: #3a3350; }
.app.is-ghost .say input { border-color: rgba(196, 181, 253, .4); }

/* 유령은 질문할 수 없다. 서버가 403 을 주므로 화면에서 먼저 막는다. */
.ghost-lock {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid rgba(196, 181, 253, .3);
  border-radius: 12px;
  background: rgba(196, 181, 253, .08);
  color: var(--ghost);
  font-size: 12.5px;
  line-height: 1.55;
  word-break: keep-all;
}
.ghost-lock .crown-inline { flex: 0 0 auto; font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- 로비 ---------- */

.lobby {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: #f7f4ed;
  color: #363b32;
  overflow-y: auto;
}
.lobby[hidden] { display: none; }

.lobby-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  width: 100%;
  max-width: 1180px;
  height: 80px;
  margin: 0 auto;
  padding: 0 40px;
}

.lobby-brand,
.stage-header-nav {
  display: inline-grid;
  grid-template-columns: 43px max-content;
  align-items: center;
  column-gap: 11px;
  color: #45522f;
}
.lobby-brand {
  text-decoration: none;
}
.lobby-brand-mark,
.lobby-header-back {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1.5px solid #6e795e;
  border-radius: 50%;
  color: #586c4d;
}
.lobby-brand-mark svg,
.lobby-header-back svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lobby-brand strong,
.stage-header-nav strong {
  font-family: "Gowun Batang", "AppleMyungjo", "Batang", serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.6px;
}
.lobby-header-back {
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.lobby-header-back:hover {
  background: #586c4d;
  color: #fffdf8;
}
.lobby-tag {
  padding: 3px 9px;
  border: 1px solid #dcded2;
  border-radius: 5px;
  color: #7d806e;
  font-size: 12px;
  letter-spacing: 1px;
}

.lobby-main {
  width: min(calc(100% - 64px), 1100px);
  margin: 0 auto;
  flex: 1 0 auto;
}

.lobby-visual {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #dacbb7;
  box-shadow: 0 8px 25px rgba(119, 94, 45, .05);
}
.lobby-visual video {
  display: block;
  width: 100%;
  aspect-ratio: 864 / 496;
  object-fit: cover;
}

.lobby-card {
  display: flex;
  flex-direction: column;
  width: min(100%, 340px);
  margin: 24px auto 30px;
}

.lobby-profile-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}
.lobby-nickname { min-width: 0; }
.lobby-nickname .lobby-input { margin-bottom: 0; }

.profile-photo {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: visible;
  border: 1px solid #d2d6c6;
  border-radius: 50%;
  background: #eef1e5;
  color: #718064;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(81, 91, 51, .08);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.profile-photo:hover {
  border-color: #9baa89;
  box-shadow: 0 5px 14px rgba(81, 91, 51, .13);
  transform: translateY(-1px);
}
.profile-photo:disabled { cursor: wait; opacity: .58; transform: none; }
.profile-photo > img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
.profile-default {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.profile-default svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
}
.profile-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 2px solid #f7f4ed;
  border-radius: 50%;
  background: #657455;
  color: #fffdf7;
}
.profile-edit svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.lobby-label {
  display: block;
  margin: 0 0 8px;
  color: #6c6e5e;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.2px;
}
.lobby-input {
  width: 100%;
  height: 50px;
  margin: 0 0 14px;
  padding: 0 16px;
  border: 1px solid #dad9cb;
  border-radius: 9px;
  background: #fffdf8;
  color: #535947;
  font-size: 15px;
  outline: none;
  box-shadow: 0 2px 5px rgba(93, 96, 56, .02);
}
.lobby-input:focus {
  border-color: #93a47e;
  box-shadow: 0 0 0 3px rgba(145, 161, 123, .12);
}
.lobby-input::placeholder { color: #a8aa9a; }

.lobby-btn {
  width: 100%;
  min-height: 50px;
  border: 1px solid #d7d9c9;
  border-radius: 9px;
  background: #eef1e5;
  color: #4e5c42;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.lobby-btn:hover {
  border-color: #aab998;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(74, 87, 48, .08);
}
.lobby-btn.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 112px;
  flex: 0 0 112px;
  padding: 0 16px;
  border: 0;
  background: #657455;
  color: #fffdf2;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .3px;
}
.lobby-btn.primary:hover { background: #536545; }
.lobby-btn.lobby-browse {
  width: 100%;
  flex: none;
  min-height: 51px;
  margin-top: -2px;
}
.lobby-btn:disabled { opacity: .5; cursor: default; }

.lobby-error {
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px solid rgba(163, 85, 68, .32);
  border-radius: 9px;
  background: rgba(163, 85, 68, .07);
  color: #a35544;
  font-size: 12.5px;
}

/* ---------- 사건파일 목록 ---------- */

.stage-view {
  width: min(100%, 840px);
  margin: 0 auto;
  padding: 12px 0 70px;
}
.stage-view[hidden], .lobby-entrance[hidden] { display: none; }

.stage-heading { margin: 22px 0 30px 74px; }
.stage-heading p {
  margin: 0;
  min-height: 1.6em;
  color: #848675;
  font-size: 15px;
  transition: opacity .5s ease, filter .5s ease;
}
.stage-heading p.is-typing {
  opacity: 1;
  filter: none;
  transition: none;
}
.stage-heading p.is-typing::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -.12em;
  background: currentColor;
  animation: stage-caret .72s steps(1) infinite;
}
.stage-heading p.is-leaving { opacity: 0; filter: blur(3px); }
@keyframes stage-caret { 50% { opacity: 0; } }

.stage-list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stage-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 18px;
  position: relative;
}
.stage-rail {
  display: flex;
  justify-content: center;
  position: relative;
}
.stage-rail::after {
  content: '';
  position: absolute;
  top: 56px;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: #d8dbcb;
}
.stage-rail i {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border: 1px solid #c9d1bc;
  border-radius: 50%;
  background: #eef1e5;
  color: #657853;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 1px;
}

.stage-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-height: 220px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dedfd1;
  border-radius: 16px;
  background: #fffdf7;
  color: #3e4437;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(81, 91, 51, .06);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.stage-card:hover {
  border-color: #a7b498;
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(85, 90, 53, .12);
}
.stage-card:focus-visible { outline-color: #72865f; }
.stage-card:active { transform: scale(.992); }
.stage-card:disabled { opacity: .62; transform: none; cursor: wait; }

.stage-thumb { position: relative; overflow: hidden; background: #ddd4c7; }
.stage-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transition: transform .45s ease;
}
.stage-card:hover .stage-thumb img { transform: scale(1.025); }
.stage-thumb-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 27, 20, .04), transparent 55%, rgba(24, 27, 20, .2));
  pointer-events: none;
}
.stage-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 28px 25px;
}
.stage-number {
  color: #7e886a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
}
.stage-copy strong {
  margin: 9px 0 25px;
  color: #30372d;
  font-family: "Gowun Batang", "AppleMyungjo", "Batang", serif;
  font-size: 27px;
  line-height: 1.4;
  letter-spacing: -.8px;
}
.stage-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.stage-activity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7b846f;
  font-size: 14px;
}
.stage-activity i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8b9f6c;
  box-shadow: 0 0 0 4px rgba(139, 159, 108, .1);
}
.stage-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #657957;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.stage-cta b { font-size: 18px; font-weight: 500; transition: transform .2s ease; }
.stage-card:hover .stage-cta b { transform: translateX(3px); }
.stage-continuation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 21px;
  width: 56px;
  min-height: 150px;
  padding-top: 30px;
  background: linear-gradient(#d8dbcb 0 68%, transparent 100%) center top / 1px 100% no-repeat;
}
.stage-continuation span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #aeb8a0;
}
.stage-continuation span:nth-child(2) { opacity: .62; }
.stage-continuation span:nth-child(3) { opacity: .28; }
.stage-error { margin-left: 74px; }

@media (min-width: 900px) and (max-height: 900px) {
  .lobby-header { height: 70px; }
  .lobby-main { max-width: 920px; }
  .lobby-card { margin-top: 18px; margin-bottom: 24px; }
}

@media (max-width: 900px) {
  .lobby-header { height: 76px; padding: 0 24px; }
  .lobby-main { width: calc(100% - 48px); }
}

@media (max-width: 620px) {
  .lobby-header {
    position: sticky;
    top: 0;
    z-index: 2;
    height: calc(64px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 16px 0;
    background: rgba(247, 244, 237, .92);
    border-bottom: 1px solid rgba(216, 219, 203, .72);
    backdrop-filter: blur(14px);
  }
  .lobby-brand,
  .stage-header-nav { grid-template-columns: 44px max-content; column-gap: 8px; }
  .lobby-brand-mark,
  .lobby-header-back { width: 44px; height: 44px; }
  .lobby-brand strong, .stage-header-nav strong { font-size: 20px; }
  .lobby-tag { display: none; }
  .lobby-main { width: calc(100% - 32px); padding: 8px 0 calc(30px + env(safe-area-inset-bottom)); }
  .lobby-visual { border-radius: 10px; }
  .lobby-card { width: calc(100% - 34px); margin: 27px auto 0; }
  .lobby-input { height: 51px; font-size: 16px; }
  .lobby-btn { min-height: 52px; }
  .lobby-btn.lobby-browse { width: 100%; }
  .stage-view { padding: 16px 0 36px; }
  .stage-heading { margin: 6px 0 22px 54px; }
  .stage-heading p { min-height: 3.1em; font-size: 14px; line-height: 1.55; }
  .stage-item { grid-template-columns: 42px minmax(0, 1fr); gap: 12px; }
  .stage-rail { display: flex; }
  .stage-rail i { width: 42px; height: 42px; font-size: 11px; }
  .stage-rail::after { top: 50px; }
  .stage-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(81, 91, 51, .09);
  }
  .stage-thumb { aspect-ratio: 16 / 10; }
  .stage-thumb img { object-position: center 40%; }
  .stage-copy { padding: 20px 18px 18px; }
  .stage-number { font-size: 12px; }
  .stage-copy strong { margin: 5px 0 20px; font-size: 23px; }
  .stage-card-footer { padding-top: 15px; border-top: 1px solid #e8e8dd; }
  .stage-activity { font-size: 13px; }
  .stage-cta { gap: 7px; font-size: 13px; }
  .stage-continuation { width: 42px; min-height: 132px; padding-top: 26px; }
  .stage-error { margin-left: 54px; }
}

@media (max-width: 370px) {
  .lobby-main { width: calc(100% - 24px); }
  .stage-heading { margin-left: 48px; }
  .stage-item { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
  .stage-rail i { width: 38px; height: 38px; }
  .stage-rail::after { top: 46px; }
  .stage-copy { padding-inline: 15px; }
  .stage-copy strong { font-size: 21px; }
  .stage-card-footer { gap: 10px; }
  .stage-activity, .stage-cta { font-size: 12px; }
  .stage-continuation { width: 38px; }
  .stage-error { margin-left: 48px; }
}

@media (hover: none) {
  .stage-card:hover { border-color: #dedfd1; transform: none; box-shadow: 0 8px 24px rgba(81, 91, 51, .09); }
  .stage-card:hover .stage-thumb img,
  .stage-card:hover .stage-cta b { transform: none; }
  .stage-card:not(:disabled):active { transform: scale(.985); }
}

/* 해설 — 방이 끝나면 문제 카드 아래에 붙는다 */
.reveal {
  flex: 0 0 auto;
  margin: 10px 14px 0;
  padding: 13px 15px;
  border: 1px solid var(--yes);
  border-radius: var(--radius);
  background: rgba(74, 222, 128, .08);
}
.reveal .section-head { color: var(--yes); }
.reveal p { margin: 7px 0 0; color: #f2f4f8; word-break: keep-all; }

/* ---------- 질문 필터 ---------- */

.log-filter {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  margin: 10px 14px 0;
}
.chip {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { color: #0e1014; font-weight: 700; background: var(--muted); border-color: transparent; }
.chip.yes[aria-pressed="true"] { background: var(--yes); }
.chip.no[aria-pressed="true"] { background: var(--no); }
.chip-n { font-variant-numeric: tabular-nums; opacity: .75; }

.log-empty {
  align-self: center;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 입력 중 ---------- */

.typing {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 6px 14px 8px;
  list-style: none;
  min-height: 34px;
}
.typing li { display: flex; align-items: center; gap: 6px; }
.typing .avatar { width: 21px; height: 21px; border: 0; font-size: 10px; }
.typing-name { font-size: 11.5px; color: var(--muted); }

.typing-dots { display: inline-flex; gap: 3px; padding: 0 2px; }
.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-bounce 1.1s infinite;
}
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .35; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ---------- 시트 (문제 다시 보기 · 참가자) ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(8, 10, 14, .7);
}
.sheet[hidden] { display: none; }

.sheet-card {
  width: min(100%, 520px);
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  padding: 8px 0 max(14px, env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: var(--panel);
  animation: sheet-up .18s ease-out;
}
.sheet-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@keyframes sheet-up { from { transform: translateY(12px); opacity: .6 } to { transform: none; opacity: 1 } }

.sheet-grip {
  width: 38px;
  height: 4px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: var(--line);
}
.sheet-title { margin: 0 16px 10px; font-size: 15px; }
.sheet-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-body .hero { margin-bottom: 4px; }
/* 시트는 이미 자기 높이를 갖고 있다. 안쪽 히어로까지 또 묶으면 작아진다. */
.sheet-body .hero-view img { max-height: 46dvh; }
.sheet-scenario {
  margin: 10px 16px 0;
  font-size: 16px;
  line-height: 1.7;
  color: #f2f4f8;
  word-break: keep-all;
}
.sheet-close {
  flex: 0 0 auto;
  margin: 14px 16px 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 14.5px;
  cursor: pointer;
}
.sheet-close:hover { border-color: var(--accent); }

.player-list { margin: 0; padding: 0 16px; list-style: none; display: grid; gap: 10px; }
.player-row { display: flex; align-items: center; gap: 10px; }
.player-row .avatar { width: 30px; height: 30px; border: 0; }
.player-name { font-size: 14px; }
.player-tag { margin-left: auto; font-size: 11.5px; color: var(--ghost); }

.hint-lead {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  word-break: keep-all;
}
