/* 참가자 폰 화면 — v3 "오락실 기계" 디자인 */
html, body { height: 100%; overflow: hidden; }
body { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.has-aurora { background: transparent; }

/* 상단: 우리 팀 이름표 + 점수 + 남은 시간 */
.top { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 14px 12px; background: var(--panel); border-bottom: 3px solid var(--edge); box-shadow: inset 0 4px 0 var(--c); }
.top .team { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 17px; min-width: 0; letter-spacing: -0.04em; }
.top .team .dot { width: 14px; height: 14px; }
.top .team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .score { margin-left: auto; font-weight: 900; color: var(--accent-ink); font-size: 14px; white-space: nowrap; background: var(--accent); border: 2px solid var(--edge); padding: 3px 9px; border-radius: 6px; box-shadow: 0 2px 0 var(--edge); }
.top .clock { font-weight: 900; font-size: 22px; min-width: 40px; text-align: right; }
.top .snd { flex: none; width: 34px; height: 34px; padding: 0; border-radius: 8px; font-size: 17px; line-height: 1; background: var(--panel-2); border: 2px solid var(--edge); box-shadow: none; }
.top .clock.low { color: var(--bad); animation: blink .5s infinite; }
.wrap { flex: 1; min-height: 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.conn { flex: none; background: var(--bad); color: #fff; text-align: center; font-weight: 900; font-size: 14px; padding: 8px; border-bottom: 3px solid var(--edge); }

.card { background: var(--panel); border: 2px solid var(--edge); box-shadow: 0 5px 0 var(--edge); border-radius: 16px; padding: 24px 20px; }
.center { text-align: center; }
.h1 { font-size: 26px; font-weight: 900; margin: 0 0 6px; letter-spacing: -0.05em; }
.sub { font-size: 15px; color: var(--ink-soft); font-weight: 600; line-height: 1.55; }
.big-btn { width: 100%; padding: 18px; font-size: 19px; border-radius: 12px; font-weight: 900; }
.big-ico { width: 72px; height: 72px; margin: 0 auto 14px; font-size: 72px; }
.big-ico.plain { display: grid; place-items: center; color: var(--ink); }
.big-ico.plain .ico { width: 100%; height: 100%; }

/* 참가 */
.join { margin-top: 5vh; padding-top: 30px; }
.join .h1 { font-size: 28px; }
.join input { width: 100%; padding: 16px; font-size: 20px; font-weight: 800; margin: 20px 0 10px; text-align: center; }
.join .err { color: var(--bad); font-size: 14px; font-weight: 800; min-height: 20px; margin-bottom: 8px; }
.join .err b { color: var(--ink); }
.join .rejoin { display: flex; gap: 8px; margin: 12px 0 4px; }
.join .rejoin button { flex: 1; padding: 12px 8px; font-size: 15px; }
.conn b { text-decoration: underline; }

/* 대기: 우리 팀 이름표 */
.me-hero { position: relative; border-radius: 16px; padding: 30px 18px 22px; text-align: center; background: var(--panel); border: 2px solid var(--edge); box-shadow: 0 6px 0 var(--edge); overflow: hidden; margin-top: 4px; }
.me-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: var(--c); border-bottom: 2px solid var(--edge); }
.me-badge { width: 64px; height: 64px; margin: 4px auto 10px; font-size: 64px; }
.me-badge .medal { font-size: 26px; }
.me-hero .ok { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 900; color: var(--good); }
.me-hero .ok .ico { width: 16px; height: 16px; }
.me-hero .nm { font-size: 34px; font-weight: 900; margin-top: 4px; letter-spacing: -0.05em; overflow-wrap: anywhere; }
.me-hero .st { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; border-top: 2px dashed var(--line); padding-top: 16px; }
.me-hero .st div { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.me-hero .st div + div { border-left: 2px dashed var(--line); }
.me-hero .st b { display: block; font-size: 28px; color: var(--ink); font-weight: 900; margin-top: 2px; }
.waiting { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-soft); font-weight: 800; font-size: 15px; }
.waiting i { width: 9px; height: 9px; border-radius: 2px; background: var(--accent); animation: blink .9s steps(1) infinite; }
.look-up { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: var(--ink-faint); font-weight: 700; }
.look-up .ico { width: 18px; height: 18px; }

/* 룰 안내 */
.intro { text-align: center; margin: auto 0; }
.intro .em-tile { width: 112px; height: 112px; margin: 0 auto; font-size: 112px; --rot: -4deg; transform: rotate(var(--rot)); animation: stamp .45s cubic-bezier(.2,1.3,.4,1) both; }
.intro .nm { font-size: 32px; font-weight: 900; margin-top: 18px; letter-spacing: -0.05em; }
.intro .tg { font-size: 16px; color: var(--ink-soft); font-weight: 600; margin-top: 6px; line-height: 1.5; }
.intro ul { text-align: left; list-style: none; padding: 0; margin: 20px 0 0; counter-reset: h; }
.intro li { display: flex; gap: 10px; align-items: center; padding: 11px 2px; border-bottom: 2px dashed var(--line); font-weight: 800; font-size: 15px; counter-increment: h; }
.intro li:last-child { border-bottom: none; }
.intro li::before { content: counter(h); flex: none; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: var(--c); color: var(--edge); border: 2px solid var(--edge); font-size: 13px; font-weight: 900; }
.intro .who { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--accent); font-weight: 800; font-size: 14px; border: 2px dashed var(--accent); padding: 8px 12px; border-radius: 10px; }
.intro .who .ico { width: 18px; height: 18px; }
.cdw { margin: auto 0; position: relative; display: grid; place-items: center; height: 340px; }
.cd-ring { position: absolute; width: 240px; height: 240px; border-radius: 50%; border: 8px solid var(--c, var(--accent)); opacity: 0; }
.cd-ring.go { animation: ringPulse .9s ease-out both; }
.cd { position: relative; font-size: 160px; font-weight: 900; text-align: center; color: var(--ink); line-height: 1; text-shadow: 9px 9px 0 var(--c, var(--accent)); -webkit-text-stroke: 5px var(--edge); paint-order: stroke fill; }
.cd.go { animation: pop .35s ease both; }
.cd-name { position: absolute; bottom: 0; display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 900; color: var(--ink-soft); }
.cd-name .tile-ico { width: 30px; height: 30px; font-size: 30px; }

/* 연타 */
.hit { flex: 1; min-height: 0; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; position: relative; overflow: hidden;
  background: color-mix(in srgb, var(--c) 34%, var(--panel)); border: 3px solid var(--edge); box-shadow: 0 7px 0 var(--edge); transition: transform .04s, box-shadow .04s, background .08s; }
.hit::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 22px, rgba(10,8,12,.08) 22px 44px); pointer-events: none; }
.hit.on { transform: translateY(5px); box-shadow: 0 2px 0 var(--edge); background: color-mix(in srgb, var(--c) 52%, var(--panel)); }
.hit .n { position: relative; font-size: 104px; font-weight: 900; line-height: 1; -webkit-text-stroke: 4px var(--edge); paint-order: stroke fill; text-shadow: 0 6px 0 var(--edge); }
.hit .t { position: relative; font-size: 17px; color: var(--ink); font-weight: 800; margin-top: 14px; }
.hit .mbtn { position: relative; margin-top: 18px; padding: 14px 20px; font-size: 16px; }

/* 게이지 */
.gauge-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 72px 1fr; gap: 14px; }
.gbar { position: relative; border-radius: 14px; background: var(--edge); border: 3px solid var(--panel-3); overflow: hidden; }
.gbar .zone { position: absolute; left: 0; right: 0; z-index: 2; background: rgba(63,208,127,.22); border-top: 4px solid var(--good); border-bottom: 4px solid var(--good); transition: bottom .4s, height .4s; }
.gbar .fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--c); transition: height .1s linear; }
.gbar .fill::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 16px, rgba(10,8,12,.45) 16px 19px); }
.gbar .fill.in { background: var(--good); }
.hold { border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; background: var(--panel-2); border: 3px solid var(--edge); box-shadow: 0 7px 0 var(--edge); transition: transform .05s, box-shadow .05s; }
.hold.on { background: color-mix(in srgb, var(--c) 34%, var(--panel)); transform: translateY(5px); box-shadow: 0 2px 0 var(--edge); }
.hold .n { font-size: 54px; font-weight: 900; }
.hold .t { font-size: 16px; color: var(--ink-soft); font-weight: 700; margin-top: 8px; text-align: center; line-height: 1.5; }
.hold .zs { font-size: 18px; font-weight: 900; margin-top: 14px; color: var(--good); min-height: 24px; }

/* 퀴즈 */
.pill { align-self: center; font-size: 15px; font-weight: 900; color: var(--accent-ink); background: var(--accent); border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge); padding: 4px 12px; border-radius: 8px; transform: rotate(-2deg); }
.rule { text-align: center; font-size: 17px; font-weight: 900; color: var(--edge); background: var(--c); border: 2px solid var(--edge); padding: 10px; border-radius: 10px; }
.qbox { position: relative; background: var(--panel); border: 2px solid var(--edge); box-shadow: 0 5px 0 var(--edge); border-radius: 16px; padding: 32px 16px; text-align: center; }
.qbox .q { font-size: 54px; font-weight: 900; letter-spacing: -0.03em; }
.qbox .ask { font-size: 14px; color: var(--ink-soft); font-weight: 800; margin-top: 8px; }
.qbox.ok { background: color-mix(in srgb, var(--good) 18%, var(--panel)); }
.qbox.no { background: color-mix(in srgb, var(--bad) 18%, var(--panel)); animation: shakeX .35s; }
.lock { position: absolute; inset: 0; border-radius: 14px; background: var(--bad); display: grid; place-items: center; font-size: 30px; font-weight: 900; color: #fff; -webkit-text-stroke: 3px var(--edge); paint-order: stroke fill; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; min-height: 0; max-height: 420px; }
.choices button { font-size: 30px; font-weight: 900; border-radius: 14px; padding: 10px; margin-bottom: 6px; }

/* 기억력 게임 */
.mem-top { display: flex; justify-content: center; align-items: center; gap: 12px; }
.hearts { display: flex; gap: 4px; }
.hearts i { width: 20px; height: 18px; background: var(--bad); clip-path: path("M10 18 1.6 9.6A5 5 0 0 1 10 3a5 5 0 0 1 8.4 6.6Z"); }
.hearts i.off { background: var(--panel-3); }
.pstat { text-align: center; font-size: 19px; font-weight: 900; min-height: 28px; }
.pstat b { color: var(--accent); }
.mem { display: grid; gap: 8px; width: 100%; max-width: min(100%, 56vh); aspect-ratio: 1; align-self: center; touch-action: none; }
.mcell { border-radius: 10px; background: var(--panel-3); border: 2px solid var(--edge); box-shadow: 0 4px 0 var(--edge); transition: background .1s, transform .08s, box-shadow .08s; display: grid; place-items: center; font-size: 26px; font-weight: 900; }
.mcell.lit { background: var(--ink); transform: translateY(-2px); }
.mcell.ok { background: var(--c); color: var(--edge); box-shadow: 0 1px 0 var(--edge); transform: translateY(3px); }
.mcell.ok::after { content: "✓"; }
.mcell.no { background: var(--bad); animation: shakeX .3s; }
.mcell.no::after { content: "✕"; color: #fff; }
.mcell.ans { background: color-mix(in srgb, var(--gold) 30%, var(--panel-3)); outline: 3px solid var(--gold); outline-offset: -5px; }
.mem.watch .mcell { pointer-events: none; }
.mem.clear .mcell.ok { animation: pop .4s ease both; }

/* 구구단 / 1to16 */
.seq-q { text-align: center; font-size: 46px; font-weight: 900; letter-spacing: -0.03em; }
.seq-a { text-align: center; font-size: 48px; font-weight: 900; color: var(--accent); min-height: 60px; background: var(--edge); border: 2px solid var(--panel-3); border-radius: 12px; padding: 2px 0; }
.seq-a.no { color: var(--bad); animation: shakeX .3s; }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 14px; height: 14px; border-radius: 3px; background: var(--panel-3); border: 2px solid var(--edge); }
.dots i.on { background: var(--c); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; flex: 1; min-height: 0; max-height: 380px; }
.keys button { font-size: 30px; font-weight: 900; border-radius: 12px; margin-bottom: 6px; }
.keys .ok { font-size: 21px; }
.board16 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; flex: 1; min-height: 0; max-height: 440px; }
.board16 button { font-size: 30px; font-weight: 900; border-radius: 12px; touch-action: none; margin-bottom: 6px; }
.board16 button.gone { opacity: .1; pointer-events: none; transform: translateY(4px); box-shadow: none; }
.board16 button.no { background: var(--bad); animation: shakeX .3s; }
.next-n { text-align: center; font-size: 18px; font-weight: 800; color: var(--ink-soft); }
.next-n b { display: inline-block; font-size: 32px; color: var(--edge); background: var(--c); border: 2px solid var(--edge); border-radius: 8px; padding: 0 12px; margin-left: 6px; }

/* 퀴즈: 풍선 · 가위바위보 */
.balloon { width: 150px; height: 180px; margin: 0 auto 22px; border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%; background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.6) 0 9%, transparent 10%), var(--bc); border: 3px solid var(--edge); display: grid; place-items: center; position: relative; box-shadow: inset -14px -16px 0 rgba(0,0,0,.16); }
.balloon::after { content: ""; position: absolute; bottom: -16px; left: 50%; width: 3px; height: 16px; margin-left: -1.5px; background: var(--ink-soft); }
.balloon span { font-size: 40px; font-weight: 900; color: #fff; -webkit-text-stroke: 4px var(--edge); paint-order: stroke fill; }
.choices button.rps { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.choices button.rps span { font-size: 44px; line-height: 1; }
.choices button.rps small { font-size: 20px; font-weight: 900; }
.big-hint { font-size: 28px !important; font-weight: 900 !important; margin-top: 10px !important; }

/* 두더지 */
.moles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; flex: 1; min-height: 0; max-height: 420px; align-content: center; }
.hole { position: relative; border-radius: 50%; aspect-ratio: 1; background: radial-gradient(ellipse at 50% 70%, #1a120c 0 44%, #3a2a1c 45% 58%, var(--panel-2) 59%); border: 2px solid var(--edge); overflow: hidden; touch-action: none; }
.hole .mole { position: absolute; left: 9%; right: 9%; bottom: -100%; aspect-ratio: 1; transform-origin: 50% 100%; transition: bottom .13s cubic-bezier(.3,1.4,.5,1), transform .08s; pointer-events: none; }
.hole .mole .ico { width: 100%; height: 100%; }
.hole .m-dirt { display: none; }
.hole.up .mole { bottom: -6%; }
.hole.bonk { background: radial-gradient(ellipse at 50% 70%, #1a120c 0 44%, var(--accent) 45% 58%, var(--panel-2) 59%); }
.hole.bonk .mole { transform: scale(1.06, .84); transition: bottom .16s ease-in, transform .06s; }
.moles.locked { opacity: .45; }

/* 피아노 건반 */
/* 10초를 멈춰라 */
.stopw { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.sw-goal { font-size: 18px; font-weight: 800; color: var(--ink-soft); }
.sw-goal b { color: var(--accent); font-size: 22px; }
.sw-t { font-size: 92px; font-weight: 900; line-height: 1; -webkit-text-stroke: 4px var(--edge); paint-order: stroke fill; text-shadow: 0 6px 0 var(--edge); }
.sw-t.hid { color: var(--ink-faint); }
.sw-h { font-size: 16px; font-weight: 800; color: var(--ink-soft); text-align: center; min-height: 22px; }
.sw-btn { width: 78vw; max-width: 340px; aspect-ratio: 1; border-radius: 50%; font-size: 52px; font-weight: 900; margin-top: 10px; touch-action: none; }
/* 탑 쌓기 */
.tower { flex: 1; min-height: 0; position: relative; border-radius: 18px; background: var(--panel); border: 3px solid var(--edge); box-shadow: 0 7px 0 var(--edge); overflow: hidden; touch-action: none; }
.tw-stack { position: absolute; inset: 0; }
.tw-stack i, .tw-move { position: absolute; border-radius: 5px; border: 2px solid var(--edge); background: var(--c, var(--accent)); box-sizing: border-box; }
.tw-stack i { opacity: .82; }
.tw-stack i:last-child { opacity: 1; }
.tw-move { background: var(--ink); box-shadow: 0 0 0 3px var(--c, var(--accent)); }
.tw-move.fall { transition: transform .8s ease-in, opacity .8s; transform: translateY(120%) rotate(18deg); opacity: 0; }
/* 다른 색 찾기 */
.oc { width: min(100%, 58vh); aspect-ratio: 1; align-self: center; display: grid; gap: 6px; touch-action: none; margin: auto 0; }
.occ { border-radius: 10px; border: 2px solid var(--edge); padding: 0; min-height: 0; }
.oc.no { animation: shakeX .3s; }
.tiles { flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(5, 1fr); gap: 4px; touch-action: none; background: var(--edge); border: 3px solid var(--edge); border-radius: 12px; overflow: hidden; }
.tile { background: var(--ink); border-radius: 4px; }
.tile.black { background: #0E0C11; box-shadow: inset 0 -7px 0 var(--c, var(--accent)); }
.tile.now { outline: 2px solid rgba(255,255,255,.1); }
.tile.now.black { box-shadow: inset 0 -10px 0 var(--c, var(--accent)), inset 0 0 0 3px var(--accent); }
.tiles.no { animation: shakeX .3s; }
.tiles.no .tile:not(.black) { background: #FFC9CE; }

/* 비번 업다운 */
.ud-range { text-align: center; font-size: 20px; font-weight: 800; color: var(--ink-soft); }
.ud-range b { font-size: 34px; color: var(--ink); font-weight: 900; }
.ud-hint { text-align: center; font-size: 24px; font-weight: 900; min-height: 30px; }
.ud-hint.up { color: var(--good); }
.ud-hint.down { color: var(--bad); }
.ud-hist { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 28px; }
.ud-hist span { font-size: 14px; font-weight: 900; padding: 3px 9px; border-radius: 6px; background: var(--panel-2); border: 2px solid var(--edge); }
.ud-hist .up { color: var(--good); }
.ud-hist .down { color: var(--bad); }

/* 자를잡아라 */
.rz { flex: 1; min-height: 0; border-radius: 22px; background: var(--panel); border: 3px solid var(--edge); box-shadow: 0 7px 0 var(--edge); position: relative; overflow: hidden; touch-action: none; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 40px; }
.ruler { position: absolute; top: 18px; left: 50%; width: 48px; height: 46%; margin-left: -24px; border-radius: 6px; border: 3px solid var(--edge); background: repeating-linear-gradient(0deg, #E8C26B 0 12px, #C9A04A 12px 15px); }
.rz.drop .ruler { animation: rulerFall .5s cubic-bezier(.55,0,1,.45) forwards; } /* 2026-11-02: 1.5초는 너무 느리다는 의견 → 0.5초 */
@keyframes rulerFall { to { transform: translateY(260%); } }
.rz.drop { background: color-mix(in srgb, var(--good) 22%, var(--panel)); }
.rz.missed { background: var(--panel); }
.rz-t { position: relative; text-align: center; font-size: 28px; font-weight: 900; line-height: 1.35; }
.rz-t small { font-size: 15px; color: var(--ink-soft); font-weight: 700; }

/* 100m 달리기 */
.run-top { display: grid; gap: 10px; }
.run-m { text-align: center; font-size: 58px; font-weight: 900; line-height: 1; letter-spacing: -0.04em; }
.run-bar { position: relative; height: 26px; border-radius: 8px; background: #6E2F22; border: 2px solid var(--edge); margin: 40px 22px 4px; }
.run-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px 0 0 6px; background: linear-gradient(90deg, transparent, var(--c)); transition: width .1s linear; }
.run-bar .run-guy { position: absolute; bottom: 2px; left: 0; width: 40px; height: 52px; margin-left: -20px; transition: left .1s linear; }
.run-bar .run-flag { position: absolute; right: -16px; top: 50%; width: 28px; height: 28px; margin-top: -24px; color: var(--ink); }
.run-bar .run-flag .ico { width: 100%; height: 100%; }
.feet { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-height: 460px; }
.foot { border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; touch-action: none; margin-bottom: 6px; }
.foot .shoe { font-size: 78px; font-weight: 900; line-height: 1; -webkit-text-stroke: 3px var(--edge); paint-order: stroke fill; }
.foot small { font-size: 20px; font-weight: 900; color: var(--ink-soft); }
.foot.next { background: color-mix(in srgb, var(--c) 40%, var(--panel-3)); }
.foot.next small { color: var(--ink); }
.foot.bad { animation: shakeX .3s; background: color-mix(in srgb, var(--bad) 45%, var(--panel-3)); }

/* 결과 */
.res { text-align: center; margin: auto 0; }
.res .mk { position: relative; display: grid; place-items: center; width: 132px; height: 132px; margin: 0 auto; }
.res .mk .medal { font-size: 50px; }
.res .mk .ico { width: 100%; height: 100%; }
.res .mk.plain { width: 96px; height: 96px; color: var(--ink-soft); }
.res .mk.gold { color: var(--gold); filter: drop-shadow(0 5px 0 var(--edge)); }
.res.top .mk::before { content: ""; position: absolute; left: 50%; top: 50%; width: 280px; height: 280px; margin: -140px 0 0 -140px; z-index: -1; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--gold) 30%, transparent) 0 10deg, transparent 10deg 20deg); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 70%); mask-image: radial-gradient(circle, #000 20%, transparent 70%); animation: spin 24s linear infinite; }
.res .rk { font-size: 52px; font-weight: 900; margin-top: 14px; letter-spacing: -0.05em; }
.res .rw { font-size: 17px; color: var(--ink-soft); font-weight: 700; margin-top: 6px; }
.res .pt { display: inline-block; font-size: 24px; margin-top: 16px; }
.res .tot { font-size: 15px; color: var(--ink-soft); font-weight: 700; margin-top: 16px; }
.res .drum { animation: floaty .5s ease-in-out infinite; }
.res .mk .tile-ico { width: 96px; height: 96px; font-size: 96px; }

/* 참가 화면: 이미 있는 팀 고르기 */
.team-pick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 14px; }
.team-pick button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; font-size: 15px; }
.team-pick .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }

/* 달무티 모바일 카드 테이블 */
.dalmuti-mobile { display: flex; flex-direction: column; gap: 12px; width: 100%; min-height: 0; }
.dm-mobile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dm-turn { color: var(--c); font-size: 24px; font-weight: 900; }
.dm-last { min-height: 46px; display: grid; place-items: center; padding: 10px 12px; background: var(--panel); border: 2px solid var(--edge); border-radius: 12px; color: var(--ink-soft); font-size: 14px; font-weight: 700; text-align: center; }
.dm-hand-title { display: flex; align-items: baseline; gap: 7px; color: var(--ink); font-size: 19px; font-weight: 900; }
.dm-hand-title b { color: var(--c); }
.dm-hand-title small { margin-left: auto; color: var(--ink-faint); font-size: 11px; font-weight: 700; }
.dm-hand { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; overflow-y: auto; padding: 5px 2px 10px; min-height: 0; max-height: 46vh; }
.dm-card { min-height: 76px; padding: 7px 3px; border: 2px solid var(--edge); border-radius: 11px; background: var(--panel-2); color: var(--ink); box-shadow: 0 4px 0 var(--edge); font: inherit; cursor: pointer; transition: transform .12s, background .12s, color .12s; }
.dm-card span { display: block; font-size: 30px; line-height: 1.1; font-weight: 900; }
.dm-card small { color: var(--ink-faint); font-size: 10px; font-weight: 800; }
.dm-card.selected { color: var(--accent-ink); background: var(--c); transform: translateY(-6px); box-shadow: 0 8px 0 var(--edge); }
.dm-card:disabled { opacity: .5; cursor: default; }
.dm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.dm-actions button { min-height: 52px; }
.dm-message { min-height: 20px; color: var(--bad); font-size: 13px; font-weight: 800; text-align: center; }

/* 아발론 모바일 */
.avalon-mobile { display: flex; flex-direction: column; gap: 11px; width: 100%; min-height: 0; }
.av-role-card { text-align: center; padding: 18px 14px 15px; border: 2px solid var(--edge); border-radius: 16px; box-shadow: 0 5px 0 var(--edge); background: color-mix(in srgb, var(--c) 22%, var(--panel)); }
.av-role-card.evil { --c: var(--bad); background: color-mix(in srgb, var(--bad) 18%, var(--panel)); }
.av-role-kicker { color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.av-role-name { font-size: 32px; font-weight: 900; margin-top: 3px; }
.av-faction { margin-top: 4px; color: var(--c); font-size: 15px; font-weight: 900; }
.av-info { padding: 11px 12px; background: var(--panel-2); border: 2px dashed var(--c); border-radius: 12px; color: var(--ink-soft); font-size: 13px; font-weight: 800; text-align: center; }
.av-info b { color: var(--ink); }
.av-info > div { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.av-info span { padding: 4px 8px; border-radius: 7px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.av-info small { color: var(--c); font-size: 10px; }
.av-mobile-status { padding: 11px 12px; background: var(--panel); border: 2px solid var(--edge); border-radius: 12px; text-align: center; }
.av-mobile-status b { display: block; color: var(--c); font-size: 19px; font-weight: 900; }
.av-mobile-status span { display: block; color: var(--ink-soft); font-size: 12px; font-weight: 700; margin-top: 3px; }
.av-mobile-board { display: flex; flex-direction: column; gap: 9px; }
.av-help, .av-wait { padding: 14px 12px; background: var(--panel-2); border-radius: 11px; color: var(--ink-soft); font-size: 14px; font-weight: 800; text-align: center; line-height: 1.45; }
.av-wait b { color: var(--c); }
.av-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.av-person { padding: 13px 8px; border: 2px solid var(--edge); border-radius: 10px; background: var(--panel-2); box-shadow: 0 3px 0 var(--edge); color: var(--ink); font: inherit; font-size: 15px; font-weight: 900; }
.av-person .dot, .av-proposal .dot { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 50%; background: var(--c); }
.av-person.selected { background: var(--c); color: var(--accent-ink); transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.av-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.av-proposal { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.av-proposal span { padding: 7px 9px; background: color-mix(in srgb, var(--c) 22%, var(--panel)); border: 2px solid var(--edge); border-radius: 8px; font-size: 13px; font-weight: 900; }
.av-mobile-history { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; color: var(--ink-faint); font-size: 11px; font-weight: 800; }
.av-mobile-history span { padding: 3px 7px; background: var(--panel-2); border-radius: 5px; }
.av-mobile-message { min-height: 18px; color: var(--bad); text-align: center; font-size: 13px; font-weight: 800; }
.avalon-mobile-result { margin: auto 0; text-align: center; }
.av-result-icon { font-size: 82px; line-height: 1; }
.av-result-title { font-size: 30px; font-weight: 900; margin-top: 12px; }
.av-result-role { margin-top: 12px; color: var(--ink-soft); font-size: 16px; font-weight: 800; }
.av-result-role b { color: var(--c); }
.av-result-score { margin-top: 18px; color: var(--ink-soft); font-size: 14px; line-height: 1.7; font-weight: 700; }
.av-result-score b { color: var(--accent); font-size: 24px; }

/* 공개 로비와 참가자 방장 UI */
.host-panel, .host-controls { margin: 14px 0; padding: 14px; border: 2px solid var(--accent); border-radius: 13px; background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.host-tag { color: var(--accent); font-size: 13px; font-weight: 900; }
.host-caption { margin-top: 5px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.mode-switch, .host-actions { display: flex; gap: 8px; margin-top: 10px; }
.mode-switch .arc, .host-actions .arc { flex: 1; padding: 10px 8px; font-size: 14px; }
.mode-switch .arc:disabled { opacity: .45; cursor: not-allowed; }
.game-picker { display: flex; gap: 8px; margin-top: 10px; }
.game-picker select { min-width: 0; flex: 1; padding: 11px 8px; border: 2px solid var(--edge); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; font-weight: 800; }
.game-picker .arc { padding: 10px 9px; font-size: 13px; }
.selected-game { margin-top: 8px; color: var(--ink); font-size: 20px; font-weight: 900; }
.public-roster { padding: 14px; border: 2px solid var(--edge); border-radius: 13px; background: var(--panel-2); }
.roster-title { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 13px; font-weight: 900; }
.roster-title span { color: var(--accent); }
.roster-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.roster-item { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 9px 8px; border-radius: 9px; background: var(--panel); font-size: 14px; }
.roster-item .dot { flex: none; width: 10px; height: 10px; background: var(--c); }
.roster-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-item small { margin-left: auto; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.roster-item em { margin-left: auto; color: var(--accent); font-size: 10px; font-style: normal; font-weight: 900; }
.roster-empty { grid-column: 1 / -1; color: var(--ink-faint); text-align: center; font-size: 13px; font-weight: 700; padding: 10px; }
.host-next { margin-top: 18px; }
@media (max-width: 360px) { .roster-grid { grid-template-columns: 1fr; } .game-picker { flex-direction: column; } }

/* 사람의 이름과 팀 편성을 분리한 방 로비 */
.room-bar{flex:none;padding:9px 14px;background:var(--panel);border-bottom:2px solid var(--edge);max-height:34vh;overflow:auto}
.room-bar-head{display:flex;align-items:center;gap:8px;font-size:12px}.room-bar-head a,.lobby-link{color:var(--ink-soft);text-decoration:none}.room-bar-head b{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.room-bar-head span{color:var(--accent);font-weight:900}
.host-mode summary{cursor:pointer;font-weight:800;font-size:13px;padding:8px 0}.host-mode .mode-switch{margin:0 0 7px}.host-mode small{color:var(--ink-soft);font-size:11px;line-height:1.4;display:block}
.pending-mode,.member-error{font-size:13px;font-weight:800;padding:9px 0;color:var(--accent)}.pending-mode .arc,.member-error .arc{padding:5px 8px;font-size:11px;margin-left:6px}.member-error{color:var(--bad)}
.lobby-link{display:block;margin-top:18px;font-size:13px}.sr-label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.team-manager{background:var(--panel);border:2px solid var(--edge);border-radius:14px;padding:16px}.team-manager h2{font-size:18px;margin:0 0 7px}.team-manager p{font-size:12px;line-height:1.6;color:var(--ink-soft);margin:0 0 13px}
.team-create{display:flex;gap:8px;margin-bottom:14px}.team-create input{min-width:0;flex:1;padding:11px;font-size:14px}.team-create button{white-space:nowrap;padding:10px;font-size:13px}.team-choices{display:grid;gap:9px}.team-choice{border:1px solid var(--line);border-left:5px solid var(--c);border-radius:9px;padding:10px;display:flex;align-items:center;gap:10px}.team-choice>div{flex:1;min-width:0}.team-choice b{font-size:15px;overflow-wrap:anywhere}.team-choice small{display:block;color:var(--ink-soft);font-size:12px;line-height:1.5;margin-top:4px;overflow-wrap:anywhere}.team-choice button{font-size:12px;padding:9px 12px;flex:none}.leave-team{margin-top:12px;font-size:12px;padding:9px}.unassigned{font-size:12px;line-height:1.5;color:var(--ink-soft);padding-top:12px}.roster-item{flex-wrap:wrap}.roster-item small{flex-basis:100%;margin-left:0!important}.roster-item.offline{opacity:.5}.roster-title{margin:0 0 10px;font-size:17px}.roster-grid{gap:8px}.me-hero .st b{font-size:23px}
/* 대기 항목은 줄어들지 않고 스크롤되도록 유지한다. */
.me-hero,.public-roster,.team-manager,.host-controls{flex-shrink:0}.me-hero{padding:18px 14px 12px}.me-hero .me-badge{display:none}.me-hero .nm{font-size:24px}.me-hero .st{margin-top:12px;padding-top:9px}.me-hero .st b{font-size:21px}.me-hero .ok{font-size:12px}
