/* Ruach Game — 폰(/play)은 밝은 화면, 전광판(/host)은 어두운 화면 */
:root {
  --blue: #3182f6;
  --blue-press: #1b64da;
  --ink: #191f28;
  --ink2: #4e5968;
  --ink3: #8b95a1;
  --line: #e5e8eb;
  --bg: #f2f4f6;
  --card: #fff;
  --red: #f04452;
  --green: #03b26c;
  --gold: #ffc533;
  --r: 20px;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  font-feature-settings: "tnum";
  word-break: keep-all;
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 24px; border-radius: 16px; font-weight: 700; font-size: 17px;
  background: var(--blue); color: #fff; transition: transform .08s, background .15s; white-space: nowrap;
}
.btn:active { transform: scale(.97); background: var(--blue-press); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.is-sub { background: #e8f3ff; color: var(--blue-press); }
.btn.is-gray { background: #e5e8eb; color: var(--ink2); }
.btn.is-block { width: 100%; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }
.hidden { display: none !important; }

/* ───────── 시작 화면 ───────── */
.home { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.home-card { width: min(440px, 100%); background: var(--card); border-radius: 28px; padding: 36px 28px 28px; box-shadow: 0 8px 32px rgba(0, 27, 55, .08); }
.home-logo { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.home-logo span { color: var(--blue); }
.home-sub { color: var(--ink2); margin: 8px 0 28px; font-size: 16px; line-height: 1.5; }
.home-label { font-size: 14px; font-weight: 600; color: var(--ink2); margin-bottom: 8px; }
.code-input {
  width: 100%; height: 64px; border-radius: 16px; border: 2px solid var(--line); background: #f9fafb; text-align: center;
  font-size: 28px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; outline: none; padding-left: .3em;
}
.code-input:focus { border-color: var(--blue); background: #fff; }
.home-msg { min-height: 22px; margin: 8px 0; color: var(--red); font-size: 14px; text-align: center; }
.home-or { display: flex; align-items: center; gap: 12px; color: var(--ink3); font-size: 13px; margin: 20px 0; }
.home-or::before, .home-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ───────── 폰 (/play) ───────── */
body.play { background: var(--bg); overflow: hidden; overscroll-behavior: none; }
body.play.is-game { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.p-app { height: 100dvh; display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.p-head { display: flex; align-items: center; gap: 10px; padding: 12px 20px; min-height: 56px; }
.p-team { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; min-width: 0; }
.p-team i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.p-team b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-name { color: var(--ink3); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-conn { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--red); background: #ffeeee; padding: 6px 10px; border-radius: 99px; flex: none; }
.p-main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 4px 20px 20px; position: relative; }
.p-card { background: var(--card); border-radius: 24px; padding: 24px; }
.p-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.p-desc { color: var(--ink2); font-size: 16px; line-height: 1.55; margin-top: 8px; }
.p-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.p-emoji { font-size: 64px; line-height: 1; }
.p-field { width: 100%; height: 56px; border-radius: 16px; border: 2px solid var(--line); background: #fff; padding: 0 18px; font-size: 18px; font-weight: 600; outline: none; }
.p-field:focus { border-color: var(--blue); }
.p-label { font-size: 14px; font-weight: 600; color: var(--ink2); margin: 20px 0 8px; }
.p-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-pick { height: 60px; border-radius: 16px; background: #fff; border: 2px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 14px; font-weight: 700; font-size: 16px; text-align: left; min-width: 0; }
.p-pick i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.p-pick b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-pick small { color: var(--ink3); font-weight: 600; font-size: 13px; flex: none; }
.p-pick.is-on { border-color: var(--blue); background: #e8f3ff; }
.p-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
.p-foot { padding-top: 12px; }
.badge { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 700; background: #e8f3ff; color: var(--blue-press); }
.badge.is-rep { background: #fff3d6; color: #a15c00; }
.badge.is-time { background: #f2f4f6; color: var(--ink2); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.rules { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 12px; counter-reset: r; }
.rules li { counter-increment: r; display: flex; gap: 12px; font-size: 16px; line-height: 1.5; color: var(--ink2); }
.rules li::before { content: counter(r); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; margin-top: -1px; }
.p-rep { margin-top: 16px; padding: 16px; border-radius: 16px; background: #fff3d6; color: #7a4500; font-weight: 700; font-size: 16px; text-align: center; }
.p-rep.is-cheer { background: #f2f4f6; color: var(--ink2); }
.p-timer { height: 8px; border-radius: 99px; background: #e5e8eb; overflow: hidden; margin-bottom: 12px; flex: none; }
.p-timer i { display: block; height: 100%; width: 100%; background: var(--blue); border-radius: 99px; transform-origin: left; }
.p-stage { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.p-over { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(242, 244, 246, .92); border-radius: 24px; }
.p-over b { font-size: 120px; font-weight: 900; letter-spacing: -.04em; color: var(--ink); animation: pop .9s ease-out both; }
.p-over b.is-go { color: var(--blue); font-size: 72px; }
.p-rank { font-size: 88px; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.p-rank small { font-size: 32px; font-weight: 800; margin-left: 4px; }
.p-pts { font-size: 20px; font-weight: 800; color: var(--blue); }
.p-cheer { flex: 1; display: grid; place-items: center; }
.p-cheer button { width: min(70vw, 280px); aspect-ratio: 1; border-radius: 50%; background: #ffe3e8; color: var(--red); font-size: 72px; transition: transform .08s; box-shadow: 0 10px 0 #ffc2cc; }
.p-cheer button:active { transform: translateY(6px) scale(.98); box-shadow: 0 4px 0 #ffc2cc; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 25% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* 연타 패드 */
.tap { flex: 1; min-height: 0; display: flex; flex-direction: column; touch-action: none; }
.tap-top { text-align: center; padding: 4px 0 14px; display: flex; align-items: baseline; justify-content: center; gap: 6px; flex: none; }
.tap-count { font-size: 72px; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.tap-unit { font-size: 20px; font-weight: 700; color: var(--ink3); }
.tap-pad { flex: 1; min-height: 0; position: relative; overflow: hidden; border-radius: 28px; background: #fff; display: grid; place-items: center; border: 2px solid var(--line); }
.tap-core { width: min(62vw, 46vh, 300px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 48px; font-weight: 900; letter-spacing: -.02em; box-shadow: 0 14px 0 var(--blue-press), 0 24px 40px rgba(49, 130, 246, .35); pointer-events: none; }
.tap-pad.is-hit .tap-core { animation: hit .12s ease-out; }
@keyframes hit { 0% { transform: translateY(10px) scale(.96); box-shadow: 0 4px 0 var(--blue-press); } 100% { transform: none; } }
.tap-ripple { position: absolute; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; border: 4px solid var(--blue); opacity: .6; pointer-events: none; animation: ripple .45s ease-out forwards; }
@keyframes ripple { to { transform: scale(2.4); opacity: 0; } }

/* ───────── 전광판 (/host) ───────── */
body.host { background: #0d1117; color: #f2f4f6; overflow: hidden; --panel: #161b22; --panel2: #1f2630; --hline: #2b3440; --dim: #9aa4b2; }
.h-app { height: 100vh; display: flex; flex-direction: column; padding: clamp(14px, 2vh, 28px) clamp(18px, 2.4vw, 44px); gap: clamp(10px, 1.6vh, 20px); }
.h-top { display: flex; align-items: center; gap: 14px; flex: none; }
.h-logo { font-size: clamp(18px, 1.6vw, 26px); font-weight: 800; letter-spacing: -.03em; }
.h-logo span { color: #4c9bff; }
.h-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 99px; background: var(--panel2); font-weight: 700; font-size: 15px; color: #dfe5ec; white-space: nowrap; }
.h-chip b { letter-spacing: .12em; }
.h-chip.is-off { background: #4a1d22; color: #ff9aa2; }
.h-space { flex: 1; }
.h-icon { height: 38px; padding: 0 14px; border-radius: 12px; background: var(--panel2); color: #dfe5ec; font-weight: 600; font-size: 14px; white-space: nowrap; }
.h-icon:hover { background: #2a3340; }
.h-main { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.h-foot { display: flex; justify-content: center; gap: 12px; flex: none; }
.host .btn { height: clamp(52px, 6vh, 68px); padding: 0 clamp(24px, 2.4vw, 44px); font-size: clamp(17px, 1.4vw, 24px); border-radius: 18px; }
.host .btn.is-gray { background: var(--panel2); color: #dfe5ec; }
.host .btn kbd { font: inherit; font-size: .7em; opacity: .7; background: rgba(255, 255, 255, .18); padding: 2px 8px; border-radius: 6px; }
.h-h1 { font-size: clamp(30px, 3.6vw, 68px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.h-h2 { font-size: clamp(18px, 1.6vw, 30px); font-weight: 600; color: var(--dim); margin-top: .4em; line-height: 1.4; }

/* 대기실 */
.lobby { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(280px, 30vw) 1fr; gap: clamp(16px, 2vw, 36px); }
.lobby-qr { background: var(--panel); border-radius: 28px; padding: clamp(18px, 2vw, 32px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 1.6vh, 20px); text-align: center; min-height: 0; }
.qr { background: #fff; border-radius: 20px; padding: 14px; width: min(100%, 46vh); aspect-ratio: 1; }
.qr svg { width: 100%; height: 100%; display: block; }
.lobby-url { font-size: clamp(16px, 1.5vw, 26px); font-weight: 700; color: #dfe5ec; }
.lobby-code { font-size: clamp(34px, 4vw, 72px); font-weight: 900; letter-spacing: .16em; line-height: 1; padding-left: .16em; }
.lobby-hint { color: var(--dim); font-size: clamp(14px, 1.1vw, 20px); font-weight: 600; }
.teams { min-height: 0; display: grid; gap: clamp(8px, 1vw, 16px); grid-template-columns: repeat(var(--cols, 4), 1fr); grid-auto-rows: 1fr; }
.team { background: var(--panel); border-radius: 22px; padding: clamp(12px, 1.2vw, 20px); display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; border-top: 5px solid var(--c); }
.team-head { display: flex; align-items: baseline; gap: 10px; }
.team-name { font-size: clamp(18px, 1.7vw, 32px); font-weight: 800; letter-spacing: -.02em; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-n { font-size: clamp(16px, 1.3vw, 24px); font-weight: 700; color: var(--dim); white-space: nowrap; }
.team-n b { color: #fff; font-size: 1.3em; }
.team-list { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; overflow: hidden; flex: 1; min-height: 0; }
.who { height: clamp(26px, 2.6vh, 34px); padding: 0 10px; border-radius: 99px; background: var(--panel2); font-size: clamp(13px, 1vw, 17px); font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap; }
.who.is-off { opacity: .35; }

/* 게임 고르기 */
.select { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr minmax(260px, 24vw); gap: clamp(16px, 2vw, 36px); }
.select-left { display: flex; flex-direction: column; gap: clamp(12px, 2vh, 24px); min-height: 0; }
.games { display: grid; gap: clamp(10px, 1vw, 16px); grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 17vw, 300px), 1fr)); overflow-y: auto; align-content: start; padding-right: 4px; }
.game { text-align: left; background: var(--panel); border-radius: 22px; padding: clamp(16px, 1.4vw, 24px); display: flex; flex-direction: column; gap: 8px; border: 2px solid transparent; transition: border-color .15s, transform .1s; color: inherit; }
.game:hover { border-color: #4c9bff; transform: translateY(-2px); }
.game-no { font-size: 14px; font-weight: 800; color: #4c9bff; }
.game-title { font-size: clamp(20px, 1.7vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.game-sub { color: var(--dim); font-size: clamp(13px, 1vw, 17px); line-height: 1.45; flex: 1; }
.host .badge { background: #18304f; color: #8ec2ff; height: clamp(28px, 2.6vh, 36px); font-size: clamp(12px, 1vw, 16px); }
.host .badge.is-rep { background: #44340f; color: #ffcf66; }
.host .badge.is-time { background: var(--panel2); color: #dfe5ec; }
.board { background: var(--panel); border-radius: 24px; padding: clamp(16px, 1.4vw, 24px); display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.board-title { font-size: clamp(16px, 1.3vw, 22px); font-weight: 800; color: var(--dim); }
.board-list { display: grid; gap: 8px; overflow: hidden; align-content: start; }
.board-row { display: flex; align-items: center; gap: 12px; font-size: clamp(16px, 1.4vw, 26px); font-weight: 700; padding: clamp(6px, .8vh, 12px) 12px; border-radius: 14px; background: var(--panel2); }
.board-row i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.board-row em { font-style: normal; color: var(--dim); width: 1.4em; text-align: center; }
.board-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row b { font-weight: 900; }
.board-row small { color: #6ee7a8; font-weight: 800; font-size: .75em; }

/* 규칙 안내 */
.intro { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr minmax(240px, 22vw); gap: clamp(20px, 3vw, 60px); align-items: center; }
.intro .rules { margin-top: clamp(16px, 3vh, 40px); gap: clamp(12px, 2vh, 24px); }
.intro .rules li { font-size: clamp(20px, 2vw, 38px); font-weight: 600; color: #f2f4f6; gap: .6em; line-height: 1.35; }
.intro .rules li::before { width: 1.5em; height: 1.5em; font-size: .8em; background: #4c9bff; margin-top: .1em; }
.intro .badges { margin: clamp(12px, 2vh, 24px) 0 0; gap: 8px; }
.phone { justify-self: center; width: 100%; max-width: 300px; aspect-ratio: 9 / 17; border-radius: 40px; background: #f2f4f6; border: 8px solid #2b3440; padding: 18px; display: flex; flex-direction: column; color: var(--ink); text-align: center; gap: 12px; }
.phone-cap { font-size: 13px; font-weight: 700; color: var(--ink3); }
.phone-body { flex: 1; border-radius: 24px; background: #fff; display: grid; place-items: center; padding: 16px; font-size: clamp(16px, 1.3vw, 22px); font-weight: 800; line-height: 1.4; }
.phone-dot { width: 46%; aspect-ratio: 1; border-radius: 50%; background: var(--blue); margin: 0 auto 14px; box-shadow: 0 8px 0 var(--blue-press); animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(8px); box-shadow: 0 2px 0 var(--blue-press); } }
.reps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(14px, 2.4vh, 28px); }
.rep { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 14px; border-radius: 99px; background: var(--panel); font-weight: 700; font-size: 15px; }
.rep i { width: 10px; height: 10px; border-radius: 50%; }
.rep.is-off { outline: 2px solid var(--red); }
.rep button { height: 28px; padding: 0 10px; border-radius: 99px; background: var(--panel2); color: #dfe5ec; font-size: 13px; font-weight: 700; }

/* 게임 중 */
.live { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: clamp(10px, 1.6vh, 20px); }
.live-head { display: flex; align-items: center; gap: clamp(14px, 2vw, 32px); flex: none; }
.live-title { font-size: clamp(22px, 2.2vw, 40px); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.live-bar { flex: 1; height: clamp(12px, 1.6vh, 20px); border-radius: 99px; background: var(--panel2); overflow: hidden; }
.live-bar i { display: block; height: 100%; width: 100%; border-radius: 99px; background: #4c9bff; transform-origin: left; }
.live-bar.is-hurry i { background: var(--red); }
.live-sec { font-size: clamp(36px, 4.4vw, 84px); font-weight: 900; letter-spacing: -.03em; min-width: 2.2ch; text-align: right; line-height: 1; }
.live-stage { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.count { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(13, 17, 23, .88); border-radius: 24px; }
.count b { font-size: clamp(140px, 28vh, 360px); font-weight: 900; letter-spacing: -.05em; animation: pop .9s ease-out both; line-height: 1; }
.count b.is-go { color: #4c9bff; font-size: clamp(90px, 18vh, 240px); }
.race { flex: 1; min-height: 0; display: grid; grid-auto-rows: 1fr; gap: clamp(6px, 1vh, 14px); }
.race-row { display: grid; grid-template-columns: 2.2em minmax(4em, 12vw) 1fr minmax(3.2em, auto) auto; align-items: center; gap: clamp(8px, 1vw, 20px); font-size: clamp(18px, 2.2vw, 40px); font-weight: 800; min-height: 0; }
.race-rank { width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--panel2); display: grid; place-items: center; font-size: .75em; color: var(--dim); }
.race-row.is-lead .race-rank { background: var(--gold); color: #3d2c00; }
.race-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.02em; }
.race-track { height: 72%; max-height: 72px; min-height: 18px; border-radius: 14px; background: var(--panel); position: relative; overflow: hidden; }
.race-fill { position: absolute; inset: 0 auto 0 0; width: 1.5%; border-radius: 14px; transition: width .25s linear; }
.race-val { text-align: right; font-weight: 900; }
.race-unit { font-size: .5em; color: var(--dim); font-weight: 700; white-space: nowrap; }
.race-row.is-empty { opacity: .3; }
.race-hearts { position: absolute; inset: 0; pointer-events: none; }
.heart { position: absolute; bottom: 10%; color: #ff8fa3; font-size: .9em; animation: rise .9s ease-out forwards; }
@keyframes rise { to { transform: translateY(-140%) scale(1.5); opacity: 0; } }

/* 결과 */
.result { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr minmax(260px, 26vw); gap: clamp(16px, 2vw, 36px); }
.result-left { display: flex; flex-direction: column; min-height: 0; gap: clamp(10px, 1.6vh, 20px); }
.podium { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: clamp(10px, 1.2vw, 24px); padding: 0 clamp(0px, 4vw, 80px); }
.pod { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; animation: up .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.pod-name { font-size: clamp(22px, 2.4vw, 46px); font-weight: 900; letter-spacing: -.02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-score { font-size: clamp(16px, 1.5vw, 28px); font-weight: 700; color: var(--dim); }
.pod-block { width: 100%; border-radius: 22px 22px 0 0; background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 55%, #0d1117)); display: flex; flex-direction: column; align-items: center; padding-top: clamp(10px, 2vh, 24px); gap: 4px; }
.pod-rank { font-size: clamp(40px, 6vh, 90px); font-weight: 900; line-height: 1; }
.pod-pts { font-size: clamp(16px, 1.5vw, 28px); font-weight: 800; background: rgba(0, 0, 0, .25); padding: 4px 14px; border-radius: 99px; }
.pod.r1 .pod-block { height: 34vh; } .pod.r2 .pod-block { height: 25vh; } .pod.r3 .pod-block { height: 18vh; }
.pod.r1 { order: 2; animation-delay: .5s; } .pod.r2 { order: 1; animation-delay: .25s; } .pod.r3 { order: 3; }
.pod-crown { font-size: clamp(30px, 4vh, 60px); line-height: 1; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.rest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; flex: none; }
.rest-item { display: inline-flex; align-items: center; gap: 10px; height: clamp(40px, 5vh, 56px); padding: 0 18px; border-radius: 99px; background: var(--panel); font-size: clamp(15px, 1.3vw, 24px); font-weight: 700; }
.rest-item i { width: 10px; height: 10px; border-radius: 50%; }
.rest-item em { font-style: normal; color: var(--dim); }
.rest-item small { color: #6ee7a8; font-weight: 800; }

/* 설정 창 */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 24px; }
.sheet { width: min(560px, 100%); max-height: 90vh; overflow-y: auto; background: var(--panel); border-radius: 28px; padding: 28px; display: grid; gap: 20px; }
.sheet h2 { font-size: 24px; font-weight: 800; }
.sheet label { font-size: 14px; font-weight: 700; color: var(--dim); display: block; margin-bottom: 8px; }
.sheet input[type="text"] { width: 100%; height: 48px; border-radius: 12px; border: 2px solid var(--hline); background: #0d1117; color: #fff; padding: 0 14px; font-weight: 600; outline: none; }
.sheet input[type="text"]:focus { border-color: #4c9bff; }
.seg { display: flex; background: #0d1117; border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 44px; border-radius: 10px; font-weight: 700; color: var(--dim); }
.seg button.is-on { background: #4c9bff; color: #fff; }
.stepper { display: flex; align-items: center; gap: 16px; }
.stepper button { width: 48px; height: 48px; border-radius: 12px; background: var(--panel2); font-size: 22px; font-weight: 800; color: #fff; }
.stepper b { font-size: 24px; font-weight: 800; min-width: 2ch; text-align: center; }
.names { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sheet .btn { height: 52px; font-size: 16px; }
.link { color: #ff9aa2; font-weight: 700; font-size: 14px; text-decoration: underline; margin-right: auto; align-self: center; }

@media (max-width: 900px) {
  .lobby, .select, .result, .intro { grid-template-columns: 1fr; overflow-y: auto; }
  .phone { display: none; }
}
