:root {
  --navy: #112d5c;
  --cobalt: #246bdb;
  --ink: #14233d;
  --muted: #73819a;
  --line: #e7ebf2;
  --soft: #f5f8fc;
  --lime: #d9f544;
  --yellow: #ffe65c;
  --danger: #ff6b6b;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #edf2f8; font-family: 'Noto Sans KR', sans-serif; }
button { font: inherit; cursor: pointer; }
.app-shell { max-width: 1240px; min-height: 100vh; margin: auto; background: #fff; box-shadow: 0 0 50px rgba(17,45,92,.08); }
.topbar { height: 76px; padding: 0 42px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.top-profile { display:flex; align-items:center; gap:18px; min-width:0; color:var(--navy); }
.top-profile-rank { display:flex; align-items:center; gap:7px; min-width:0; }
.rank-emblem-top { width:31px; height:37px; }
.rank-emblem-top > b { font-size:9px; }
.rank-emblem-top .rank-stage { right:-4px; bottom:0; min-width:15px; height:15px; border-width:1.5px; font-size:10px; }
.top-profile-rank small { color:var(--muted); font:700 9px/1.1 'DM Sans',sans-serif; white-space:nowrap; }
.top-profile-rating { display:grid; gap:2px; padding-left:18px; border-left:1px solid var(--line); }
.top-profile-rating span { color:var(--muted); font:800 8px/1 'DM Sans',sans-serif; letter-spacing:.08em; }
.top-profile-rating strong { color:var(--cobalt); font:800 17px/1 'DM Sans',sans-serif; }
.brand { display: flex; gap: 11px; align-items: center; color: var(--navy); font: 800 15px 'DM Sans', sans-serif; letter-spacing: .08em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--navy); background: var(--lime); font-size: 12px; letter-spacing: -.08em; }
.top-actions { display: flex; gap: 18px; align-items: center; color: var(--muted); font-size: 12px; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #67d383; box-shadow: 0 0 0 4px #ebfaee; }
.icon-button, .avatar { border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.avatar { width: 33px; height: 33px; border-radius: 50%; color: white; background: var(--cobalt); font-size: 13px; }
.page { padding: 54px 8.5%; }
.eyebrow { color: var(--cobalt); font: 700 12px 'DM Sans', sans-serif; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 12px 0 10px; font-size: clamp(30px, 4vw, 48px); line-height: 1.18; letter-spacing: -.05em; }
.lede { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.season-badge { display:inline-flex; margin-top:16px; padding:6px 10px; border-radius:999px; color:var(--cobalt); background:#edf4ff; font:700 11px 'DM Sans', sans-serif; letter-spacing:.04em; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 32px; padding-bottom: 44px; }
.hero-copy { max-width: 620px; }
.quick-match { width: 218px; padding: 20px 21px; border: 0; border-radius: 18px; color: var(--navy); background: var(--lime); text-align: left; box-shadow: 0 10px 24px rgba(174,202,28,.23); transition: transform .2s; }
.quick-match:hover { transform: translateY(-3px); }
.quick-match strong { display: block; font-size: 18px; }.quick-match span { display: block; margin-top: 4px; font-size: 12px; opacity: .7; }.arrow { float: right; font-size: 24px; }
.dashboard { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.card { padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: white; }.stat-card { background: var(--navy); color: white; border: none; min-height: 184px; }.stat-label { color: #a9bad9; font-size: 12px; }.rating { margin: 10px 0 16px; font: 700 40px 'DM Sans'; letter-spacing: -.05em; }.rating small { margin-left: 8px; color: #8ee797; font: 600 12px 'Noto Sans KR'; letter-spacing: 0; }.rank-row { display:flex; justify-content:space-between; align-items: center; color:#d3dced; font-size: 12px; }.rank-badge { padding: 5px 9px; color: var(--navy); border-radius: 7px; background: var(--lime); font-weight: 700; }
.card-title { display:flex; justify-content:space-between; align-items:center; margin-bottom: 20px; font-weight: 700; }.card-title a { color: var(--cobalt); font-size: 12px; }.recent-list { display:grid; gap: 15px; }.recent-item { display:flex; align-items:center; gap: 12px; font-size: 13px; }.result { width: 29px; height: 29px; display:grid; place-items:center; border-radius: 9px; font-weight: 800; }.win { color:#2d9f66; background:#e8f8ef; }.loss { color:#de6666; background:#fff0f0; }.recent-meta { margin-left:auto; text-align:right; color: var(--muted); font-size: 11px; }.section { margin-top: 20px; }.category-grid { display:grid; grid-template-columns:repeat(4,1fr); gap: 10px; }.category { padding: 15px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--soft); color: var(--navy); text-align:left; }.category:hover { border-color: #a9c4ef; background:#f0f6ff; }.category b { display:block; margin-bottom:3px; font-size:13px; }.category span { color:var(--muted); font-size:10px; }
.battle-page { max-width: 850px; margin:auto; padding: 35px 5% 60px; }.battle-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 28px; }.back { color:var(--muted); border:0; background:transparent; }.round { color:var(--muted); font-size:12px; }.players { display:grid; grid-template-columns:1fr auto 1fr; gap:18px; align-items:center; }.player { padding:15px 18px; border:1px solid var(--line); border-radius:16px; }.player.me { border:2px solid var(--cobalt); }.player-top { display:flex; justify-content:space-between; color:var(--muted); font-size:12px; }.player-name { margin:7px 0 10px; font-weight:700; }.points { color:var(--cobalt); font:700 25px 'DM Sans'; }.hearts { color:var(--danger); letter-spacing:2px; }.vs { color:#c0c9d8; font:700 12px 'DM Sans'; }.question-card { margin-top: 22px; padding: 34px 38px 38px; border-radius: 24px; background:var(--soft); text-align:center; }.question-label { color:var(--cobalt); font-size:12px; font-weight:700; }.question { max-width: 650px; min-height: 98px; margin: 18px auto 28px; display:grid; place-items:center; font-size:clamp(22px, 3.5vw, 32px); line-height:1.5; font-weight:700; letter-spacing:-.04em; }.progress { height:5px; max-width: 580px; margin: auto; border-radius:99px; background:#dde5f0; overflow:hidden; }.progress span { display:block; height:100%; width:65%; border-radius:99px; background:var(--cobalt); }.buzz { width:min(280px, 100%); aspect-ratio:1.9; margin: 34px auto 0; border:0; border-radius: 100px; color:var(--navy); background:var(--lime); box-shadow: 0 12px 0 #b9d225, 0 20px 30px rgba(159,185,26,.22); font-size:22px; font-weight:800; }.buzz:active { transform:translateY(6px); box-shadow:0 6px 0 #b9d225; }.status { min-height: 25px; margin-top: 20px; color:var(--muted); font-size:12px; }.answer-panel { display:none; max-width:540px; margin:26px auto 0; }.answer-panel input { width:100%; padding:15px 17px; border:1px solid #cdd8e8; border-radius:12px; font-size:16px; }.answer-panel button { width:100%; margin-top:10px; padding:14px; border:0; border-radius:12px; color:white; background:var(--cobalt); font-weight:700; }.answer-panel.active { display:block; }
.centered { min-height: calc(100vh - 76px); display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }.centered h2 { margin:14px 0 8px; font-size:30px; letter-spacing:-.04em; }.muted { color:var(--muted); font-size:14px; line-height:1.8; }.match-orb { width:108px; height:108px; display:grid; place-items:center; margin-bottom:26px; border-radius:36px; color:var(--navy); background:var(--lime); font:800 24px 'DM Sans'; box-shadow:0 0 0 14px #f5f9dc; animation:pulse 1.4s infinite; }.searching-dots { display:flex; gap:7px; margin:27px 0; }.searching-dots i { width:7px; height:7px; border-radius:50%; background:var(--cobalt); animation:bounce .8s infinite alternate; }.searching-dots i:nth-child(2) { animation-delay:.2s; }.searching-dots i:nth-child(3) { animation-delay:.4s; }.cancel,.text-button { border:0; color:var(--muted); background:transparent; font-size:13px; }.ready-versus { display:flex; align-items:center; gap:40px; margin:28px 0; }.ready-versus > div { display:flex; flex-direction:column; align-items:center; gap:6px; }.ready-versus > strong { color:#c0c9d8; }.ready-versus small { color:var(--muted); font-size:11px; }.ready-avatar { width:58px; height:58px; display:grid; place-items:center; border-radius:20px; color:white; background:#98a9bf; font-weight:800; }.ready-avatar.mine { background:var(--cobalt); }.countdown-page { background:var(--navy); color:#fff; }.countdown-page .eyebrow { color:var(--lime); }.count-number { margin:18px 0 0; color:var(--lime); font:800 120px 'DM Sans'; line-height:1; }.countdown-page .muted { color:#b7c7e0; }.result-card { max-width:550px; width:100%; text-align:center; padding:50px 30px; border:1px solid var(--line); border-radius:24px; }.result-icon { width:60px; height:60px; margin:auto; display:grid; place-items:center; border-radius:20px; background:var(--lime); font-size:27px; }.result-icon.wrong { color:#cf5252; background:#ffe4e4; }.result-card h2 { margin:18px 0 8px; font-size:30px; }.result-card p { color:var(--muted); }.explanation { font-size:13px; }.result-stats { display:flex; justify-content:center; gap:35px; margin:28px 0; padding:17px; border-radius:14px; background:var(--soft); color:var(--muted); font-size:12px; }.result-stats b { display:block; margin-top:5px; color:var(--navy); font-size:20px; }.final-score { display:flex; justify-content:center; gap:26px; align-items:center; margin:25px 0; font:700 42px 'DM Sans'; }.final-score span { color:#cad3df; font-size:25px; }.rating-change { color:var(--muted); font-size:13px; }.rating-change strong { margin-left:7px; color:#2d9f66; }.text-button { display:block; margin:17px auto 0; }
.match-found-icon { width:72px; height:72px; margin-bottom:22px; display:grid; place-items:center; border-radius:24px; color:var(--navy); background:var(--lime); font:900 32px 'DM Sans',sans-serif; box-shadow:0 0 0 12px #f5f9dc; animation:match-found-pop 420ms cubic-bezier(.34,1.56,.64,1) both; }
.match-found-page h2 { max-width:560px; margin-top:12px; font-size:clamp(26px,5vw,38px); }
.match-starting { margin:0; color:var(--muted); font-size:14px; font-weight:650; }
.ready-versus small { min-height:23px; display:flex; align-items:center; justify-content:center; gap:4px; }
.rank-emblem-inline { width:19px; height:23px; }
.rank-emblem-inline > b { font-size:6px; }
.rank-emblem-inline .rank-stage { right:-5px; bottom:0; min-width:12px; height:12px; padding:0 1px; border-width:1px; font-size:8px; }
.result-progression { width:min(410px,100%); margin:0 auto 22px; display:grid; gap:12px; }
.rank-result { padding:12px 14px 12px 10px; display:grid; grid-template-columns:54px minmax(0,1fr); gap:10px; align-items:center; border:1px solid #d8e2ef; border-radius:16px; background:#f8fbff; text-align:left; }
.rank-emblem-result { width:50px; height:59px; }
.rank-emblem-result > b { font-size:13px; }
.rank-result > div > small { display:block; margin-bottom:2px; color:var(--cobalt); font:850 9px 'DM Sans','Noto Sans KR',sans-serif; letter-spacing:.08em; }
.rank-result > div > strong { display:flex; align-items:baseline; justify-content:space-between; gap:8px; color:var(--navy); font:900 16px 'DM Sans','Noto Sans KR',sans-serif; }
.rank-result em { color:#2d9f66; font:900 12px 'DM Sans',sans-serif; }
.rank-progress { height:5px; margin:7px 0 5px; }
.rank-progress > span { width:var(--rank-to,0%); animation:rank-progress-in 600ms cubic-bezier(.22,1,.36,1) both; }
.result-progression > .rating-change { min-height:42px; padding:9px 14px; display:grid; grid-template-columns:72px minmax(0,1fr) auto; align-items:center; gap:8px; border:1px solid #d8e2ef; border-radius:13px; background:#fff; text-align:left; }
.result-progression > .rating-change span { color:var(--muted); font:800 9px 'DM Sans',sans-serif; letter-spacing:.08em; }
.result-progression > .rating-change b { color:var(--navy); font:850 13px 'DM Sans',sans-serif; }
.result-progression > .rating-change strong { margin:0; color:#2d9f66; font:900 13px 'DM Sans',sans-serif; }
.rank-result.is-promoted .rank-emblem-result { animation:rank-badge-promote 400ms cubic-bezier(.22,1,.36,1) both; }
@keyframes rank-progress-in { from { width:var(--rank-from,0%); } }
@keyframes rank-badge-promote { from { opacity:0; transform:translateY(14px) scale(.88); } }
.rank-result p { margin:0!important; color:var(--muted)!important; font-size:9px!important; line-height:1.3; }
.match-found-page { width:100%; }
.match-found-page > .eyebrow,.match-found-page > h2 { width:100%; text-align:center; }
.match-found-page .ready-versus { width:min(430px,100%); margin:24px auto 18px; display:grid; grid-template-columns:minmax(0,150px) 42px minmax(0,150px); gap:18px; align-items:stretch; justify-content:center; }
.ready-player { width:100%; min-height:150px; padding:16px 10px 13px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; border:1px solid var(--divider,#dce4ef); border-radius:18px; background:#fff; }
.ready-player b { color:var(--navy); font-size:15px; }
.ready-vs { position:relative; width:42px; height:100%; display:grid; place-items:center; align-self:center; color:var(--cobalt)!important; font:900 15px 'DM Sans',sans-serif; }
.ready-vs::before,.ready-vs::after { content:""; position:absolute; top:50%; width:13px; height:1px; background:#cbd6e5; }
.ready-vs::before { right:100%; margin-right:5px; }
.ready-vs::after { left:100%; margin-left:5px; }
.ready-action { width:min(280px,100%); min-height:52px; margin:0; transition:transform 100ms ease-out,background 150ms,color 150ms; }
.ready-action.is-ready { transform:translateY(4px); background:var(--brand-blue-dark,#164fb8); }
.match-starting { min-height:24px; margin-top:12px; display:flex; align-items:center; gap:7px; }
.waiting-dots { display:inline-flex; gap:3px; }
.waiting-dots i { width:4px; height:4px; border-radius:50%; background:var(--cobalt); animation:waiting-dot 650ms ease-in-out infinite alternate; }
.waiting-dots i:nth-child(2) { animation-delay:120ms; }
.waiting-dots i:nth-child(3) { animation-delay:240ms; }
.match-found-animate .eyebrow { animation:found-heading-in 360ms cubic-bezier(.22,1,.36,1) 80ms both; }
.match-found-animate h2 { animation:found-heading-in 360ms cubic-bezier(.22,1,.36,1) 120ms both; }
.match-found-animate .ready-player-me { animation:found-player-left 420ms cubic-bezier(.22,1,.36,1) 180ms both; }
.match-found-animate .ready-player-opponent { animation:found-player-right 420ms cubic-bezier(.22,1,.36,1) 240ms both; }
.match-found-animate .ready-vs { animation:found-vs-in 300ms cubic-bezier(.22,1,.36,1) 460ms both; }
.match-found-animate .ready-action { animation:found-button-in 360ms cubic-bezier(.22,1,.36,1) 760ms both; }
.countdown-title { margin:14px 0 4px; color:#fff; font-size:18px; font-weight:800; }
.count-clip { height:132px; overflow:hidden; display:grid; place-items:center; }
.count-number { margin:0; }
.count-number.count-enter { animation:count-slide-in 240ms cubic-bezier(.22,1,.36,1) both; }
.countdown-sweep { width:min(320px,72vw); height:3px; margin-top:18px; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.14); }
.countdown-sweep span { display:block; width:100%; height:100%; background:var(--cobalt); transform:scaleX(0); transform-origin:left; animation:countdown-line 400ms linear 1200ms forwards; }
@keyframes waiting-dot { to { opacity:.25; transform:translateY(-2px); } }
@keyframes found-heading-in { from { opacity:0; transform:translateY(8px); } }
@keyframes found-player-left { from { opacity:0; transform:translateX(-24px); } }
@keyframes found-player-right { from { opacity:0; transform:translateX(24px); } }
@keyframes found-vs-in { from { opacity:0; transform:scale(.88); } }
@keyframes found-button-in { from { opacity:0; transform:translateY(12px); } }
@keyframes count-slide-in { from { opacity:0; transform:translateY(70%); } }
@keyframes countdown-line { to { transform:scaleX(1); } }
@keyframes pulse { 50% { transform:scale(1.04); } } @keyframes bounce { to { transform:translateY(-7px); opacity:.5; } }
@keyframes match-found-pop { from { opacity:0; transform:scale(.55) rotate(-10deg); } }
.buzz { transition: transform .08s ease-out, box-shadow .08s ease-out, filter .08s ease-out; touch-action: manipulation; }
.buzz:hover { filter: brightness(1.03); }
.buzz:active, .buzz.is-pressed { transform: translateY(8px) scale(.985); box-shadow: 0 4px 0 #b9d225, 0 9px 15px rgba(159,185,26,.18); filter: brightness(.97); }
.buzz:focus-visible { outline: 4px solid rgba(36,107,219,.3); outline-offset: 4px; }
.answer-guide { color:var(--muted); font-size:12px; }.selected-chars { min-height:42px; margin:14px auto; padding:9px 14px; border-radius:11px; color:var(--navy); background:white; font-size:22px; font-weight:800; letter-spacing:.18em; }.candidate-options { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; max-width:420px; margin:auto; }.candidate { min-height:52px; border:1px solid #d5deeb; border-radius:12px; color:var(--navy); background:white; font-size:21px; font-weight:700; transition:transform .08s, background .12s, border-color .12s; }.candidate:hover { border-color:var(--cobalt); background:#f0f6ff; }.candidate:active { transform:translateY(4px); }.candidate-options.wrong-pick { animation:shake .26s ease-in-out; }.candidate-options.wrong-pick .candidate { border-color:#ee8c8c; background:#fff1f1; }.result-card p strong { color:var(--navy); }.wrong { animation:wrong-pop .26s ease-out; }
@keyframes shake { 25% { transform:translateX(-7px); } 75% { transform:translateX(7px); } } @keyframes wrong-pop { 50% { transform:scale(1.12) rotate(-8deg); } }
.result-card { text-align:center; padding:50px 30px; }.result-icon { width:60px; height:60px; margin:auto; display:grid; place-items:center; border-radius:20px; background:var(--lime); font-size:27px; }.result-card h2 { margin:18px 0 8px; font-size:30px; }.result-card p { color:var(--muted); }.primary { margin-top:20px; padding:14px 26px; border:0; border-radius:12px; color:white; background:var(--cobalt); font-weight:700; }
.connection-card { width:min(480px,100%); padding:44px 34px; border:1px solid var(--line); border-radius:24px; background:white; box-shadow:0 22px 60px rgba(17,45,92,.1); }
.connection-pulse { width:66px; height:66px; display:grid; place-items:center; margin:0 auto 22px; border-radius:22px; color:var(--navy); background:var(--lime); font:800 29px 'DM Sans'; animation:reconnect-spin 1.2s linear infinite; }
.connection-pulse.offline { color:#cf5252; background:#ffe4e4; animation:connection-blink 1s ease-in-out infinite; }
.connection-card h2 { margin:14px 0 8px; font-size:30px; letter-spacing:-.04em; }
.connection-meta { display:flex; justify-content:space-between; align-items:center; margin-top:26px; padding:15px 17px; border-radius:13px; color:var(--muted); background:var(--soft); font-size:12px; }
.connection-meta strong { color:var(--navy); font:700 19px 'DM Sans'; }
@keyframes reconnect-spin { to { transform:rotate(360deg); } }
@keyframes connection-blink { 50% { transform:scale(.94); opacity:.65; } }
@media (max-width:700px) { .topbar { padding:0 20px; }.online-count { display:none; }.page { padding:38px 20px; }.hero { display:block; }.quick-match { width:100%; margin-top:25px; }.dashboard { grid-template-columns:1fr; }.category-grid { grid-template-columns:repeat(2,1fr); }.battle-page { padding:25px 16px 45px; }.question-card { padding:28px 18px 30px; }.players { gap:8px; }.player { padding:12px; }.player-name { font-size:12px; }.points { font-size:21px; } }

/* App layout: every route stays inside one device viewport. */
:root { --topbar-height:64px; }
html, body { width:100%; height:100%; overflow:hidden; }
.app-shell { width:100%; height:100dvh; min-height:0; overflow:hidden; }
.topbar { height:var(--topbar-height); }
#app { height:calc(100dvh - var(--topbar-height)); overflow:auto; }
.page { height:100%; padding:clamp(18px,4vh,42px) 8.5%; display:grid; grid-template-rows:auto auto minmax(0,1fr); gap:clamp(10px,2vh,20px); overflow:hidden; }
.hero { padding-bottom:0; align-items:center; }
.hero h1 { margin:8px 0; font-size:clamp(27px,5vh,46px); }
.hero .lede { line-height:1.55; }
.season-badge { margin-top:10px; }
.quick-match { flex:0 0 auto; }
.dashboard { min-height:0; }
.card { padding:clamp(15px,2.3vh,23px); }
.stat-card { min-height:0; }
.rating { margin:6px 0 10px; font-size:clamp(30px,5vh,40px); }
.card-title { margin-bottom:clamp(10px,1.8vh,18px); }
.recent-list { gap:clamp(7px,1.5vh,13px); }
.section { min-height:0; margin-top:0; overflow:hidden; }
.category-grid { gap:8px; }
.category { padding:clamp(8px,1.5vh,13px) 11px; }
@media (max-width:700px) {
  :root { --topbar-height:56px; }
  .topbar { padding:0 16px; }
  .top-profile { gap:12px; }
  .top-profile-rating { padding-left:12px; }
  .top-actions { gap:10px; }
  .page { padding:clamp(16px,3vh,28px) 18px; grid-template-rows:auto minmax(0,1fr); }
  .hero { display:grid; gap:12px; }
  .hero h1 { font-size:clamp(25px,4.6vh,36px); }
  .quick-match { width:100%; margin-top:0; padding:15px 18px; }
  .dashboard { display:block; }
  .dashboard > .card:not(.stat-card), .section { display:none; }
  .stat-card { height:100%; max-height:180px; }
}

@media (max-height:700px) {
  :root { --topbar-height:52px; }
  .brand-mark { width:30px; height:30px; }
  .page { padding-top:14px; padding-bottom:14px; gap:8px; }
  .lede { display:none; }
  .season-badge { margin-top:6px; }
  .quick-match { padding:12px 16px; }
}

@media (max-height:620px) {
  .page { grid-template-rows:auto minmax(0,1fr); }
  .dashboard { display:block; }
  .dashboard > .card:not(.stat-card), .section { display:none; }
  .stat-card { height:100%; max-height:150px; }
}

/* Quiz Battle title and match surfaces */
.settings-button {
  width:36px; height:36px; display:grid; place-items:center; border:1px solid var(--line);
  border-radius:12px; color:var(--navy); background:#fff; font-size:17px;
  box-shadow:0 5px 14px rgba(17,45,92,.08); transition:transform .12s, background .12s;
}
.settings-button:hover { background:var(--soft); }
.settings-button:active { transform:translateY(2px); }
.settings-button[hidden] { display:none; }

.title-screen {
  position:relative; height:100%; min-height:0!important; padding:clamp(28px,5vh,62px) 8.5% max(56px,env(safe-area-inset-bottom));
  display:grid; grid-template-columns:minmax(0,1.05fr) minmax(320px,.8fr); align-items:center; gap:clamp(42px,8vw,110px);
  overflow:hidden; text-align:left; background:
    radial-gradient(circle at 12% 12%, rgba(36,107,219,.11), transparent 31%),
    linear-gradient(145deg,#fff 0%,#f7faff 58%,#eef4ff 100%);
}
.title-brand-panel { min-width:0; max-width:620px; }
.title-catchphrase { margin:0 0 12px; color:var(--cobalt); font-size:clamp(12px,1.35vw,15px); font-weight:800; letter-spacing:.02em; }
.title-screen h1 { min-height:clamp(72px,11vw,124px); margin:0; display:flex; align-items:baseline; color:var(--navy); font:900 clamp(64px,10vw,118px)/.95 'Noto Sans KR',sans-serif; letter-spacing:-.09em; white-space:nowrap; }
.logo-clip { display:inline-block; overflow:hidden; padding:0 .025em .08em; margin-bottom:-.08em; }
.logo-letter { display:block; will-change:transform,opacity; }
.logo-bang { color:var(--cobalt); padding-right:.06em; }
.brand-translation { margin-left:.3em; color:var(--cobalt); font-size:.25em; font-weight:800; letter-spacing:-.04em; }
.title-support { will-change:transform,opacity; }
.brand-roman { margin:1px 0 10px; color:#8a98af; font:800 11px 'DM Sans',sans-serif; letter-spacing:.18em; }
.title-description { margin:0; color:var(--ink); font-size:clamp(14px,1.45vw,17px); font-weight:650; line-height:1.65; letter-spacing:-.02em; }
.title-meta { display:flex; flex-wrap:wrap; justify-content:flex-start; gap:8px; margin:18px 0 0; }
.title-meta > span { padding:6px 10px; border-radius:999px; color:var(--cobalt); background:#edf4ff; font:800 10px 'DM Sans','Noto Sans KR',sans-serif; letter-spacing:.035em; }
.rank-emblem { --rank-color:#cfd5dd; --rank-label:#44536a; --rank-stage-bg:#071a3a; --rank-stage-ink:#fff; position:relative; width:44px; height:52px; flex:0 0 auto; display:inline-grid; place-items:center; color:var(--rank-color); vertical-align:middle; }
.rank-emblem svg { width:100%; height:100%; overflow:visible; filter:drop-shadow(0 4px 5px rgba(12,31,62,.17)); }
.rank-emblem .rank-shield { fill:currentColor; }
.rank-emblem .rank-cut { fill:rgba(255,255,255,.15); }
.rank-emblem .rank-spark { fill:rgba(255,255,255,.5); }
.rank-emblem > b { position:absolute; left:50%; top:52%; transform:translate(-50%,-50%); color:var(--rank-label); font:900 12px/1 'DM Sans','Noto Sans KR',sans-serif; letter-spacing:-.05em; white-space:nowrap; text-shadow:0 1px 1px rgba(0,0,0,.12); }
.rank-grade-minus { display:inline-block; margin-left:.04em; color:currentColor; font:950 .78em/1 'DM Sans',sans-serif; font-style:normal; letter-spacing:0; transform:translateY(-.13em); }
.rank-stage { position:absolute; right:4%; bottom:10%; z-index:2; min-width:16px; height:16px; padding:0 2px; display:grid; place-items:center; border:1.5px solid rgba(255,255,255,.95); border-radius:999px; color:var(--rank-stage-ink); background:var(--rank-stage-bg); font:950 12px/1 'DM Sans',sans-serif; box-shadow:0 2px 5px rgba(7,26,58,.3); }
.rank-master-level { position:absolute; left:50%; bottom:17%; width:64%; transform:translateX(-50%); overflow:hidden; color:#fff; font:800 max(5px,calc(10px - (var(--rank-digits) - 2) * .7px))/1 'DM Sans',sans-serif; text-align:center; white-space:nowrap; }
.rank-tier-d { --rank-color:#cfd5dd; --rank-label:#44536a; --rank-stage-bg:#071a3a; --rank-stage-ink:#fff; }
.rank-tier-c { --rank-color:#7f91a8; --rank-label:#fff; --rank-stage-bg:#102b58; --rank-stage-ink:#fff; }
.rank-tier-b { --rank-color:#46a8ff; --rank-label:#fff; --rank-stage-bg:#fff; --rank-stage-ink:#1762b8; }
.rank-tier-a { --rank-color:#246bdb; --rank-label:#fff; --rank-stage-bg:#fff; --rank-stage-ink:#164fb8; }
.rank-tier-aa { --rank-color:#102b58; --rank-label:#fff; --rank-stage-bg:#eaf2ff; --rank-stage-ink:#071a3a; }
.rank-tier-master { --rank-color:#061226; --rank-label:#fff; }
.rank-tier-master svg { filter:drop-shadow(0 0 2px rgba(232,203,103,.8)) drop-shadow(0 6px 8px rgba(3,12,28,.32)); }
.rank-tier-master .rank-shield { stroke:#e8cb67; stroke-width:1.7; }
.rank-tier-master .rank-cut { fill:rgba(255,255,255,.08); stroke:rgba(255,255,255,.48); stroke-width:.6; }
.rank-tier-master .rank-spark { fill:#f3d875; }
.rank-tier-master > b { color:#fff; text-shadow:0 0 5px rgba(255,255,255,.38); }
.rank-tier-master > b { top:43%; }
.home-rank-pill { min-height:46px; padding:3px 11px 3px 5px; display:flex; align-items:center; gap:7px; border:1px solid #d8e2ef; border-radius:14px; background:#fff; box-shadow:0 7px 18px rgba(17,45,92,.07); }
.rank-emblem-home { width:34px; height:40px; }
.rank-emblem-home > b { font-size:10px; }
.rank-emblem-home .rank-stage { right:-4px; bottom:1px; min-width:15px; height:15px; border-width:1.5px; font-size:10px; }
.home-rank-pill > div { min-width:88px; display:grid; gap:2px; }
.home-rank-pill b { color:var(--navy); font:900 12px/1.1 'DM Sans','Noto Sans KR',sans-serif; }
.home-rank-pill small { color:var(--muted); font:700 8px/1.1 'DM Sans',sans-serif; }
.home-rank-pill i,.rank-progress { height:3px; overflow:hidden; border-radius:99px; background:#e3e9f1; }
.home-rank-pill i > span,.rank-progress > span { display:block; height:100%; border-radius:inherit; background:var(--cobalt); }
.home-menu { width:100%; max-width:480px; justify-self:end; display:grid; gap:12px; }
.menu-card { position:relative; isolation:isolate; width:100%; min-height:86px; padding:16px 18px; display:grid; grid-template-columns:38px minmax(0,1fr) 30px; gap:13px; align-items:center; overflow:hidden; border:1px solid #d8e2ef; border-radius:18px; color:var(--navy); background:#fff; text-align:left; box-shadow:0 10px 28px rgba(17,45,92,.07); transform-origin:center; transition:transform 220ms cubic-bezier(.65,0,.35,1),border-color 220ms,box-shadow 220ms; touch-action:manipulation; }
.menu-card::before { content:""; position:absolute; inset:0; z-index:-1; background:var(--cobalt); transform:scaleX(0); transform-origin:left; transition:transform 220ms cubic-bezier(.65,0,.35,1); }
.menu-card > * { position:relative; z-index:1; transition:color 220ms,transform 160ms ease-out; }
.menu-card-primary { min-height:98px; border-color:var(--cobalt); color:#fff; background:var(--cobalt); box-shadow:0 16px 34px rgba(36,107,219,.24); }
.menu-card-primary::before { background:#174fae; }
.menu-number { color:#a8b6ca; font:800 12px 'DM Sans',sans-serif; letter-spacing:.08em; }
.menu-card-primary .menu-number,.menu-card-primary .menu-copy small { color:rgba(255,255,255,.82); }
.menu-copy strong,.menu-copy small { display:block; }
.menu-copy strong { font-size:17px; line-height:1.3; }
.menu-copy small { margin-top:4px; color:var(--muted); font-size:11px; font-weight:500; }
.menu-arrow { justify-self:end; color:var(--cobalt); font:700 24px 'DM Sans',sans-serif; }
.menu-card-primary .menu-arrow { width:36px; height:36px; display:grid; place-items:center; border-radius:50%; color:var(--navy); background:var(--lime); box-shadow:0 5px 14px rgba(8,32,71,.18); }
.menu-card:hover,.menu-card:focus-visible,.menu-card.is-selected { border-color:var(--cobalt); color:#fff; transform:scale(1.01); box-shadow:0 16px 34px rgba(36,107,219,.21); outline:none; }
.menu-card:hover::before,.menu-card:focus-visible::before,.menu-card.is-selected::before { transform:scaleX(1); }
.menu-card:hover .menu-number,.menu-card:hover .menu-copy small,.menu-card:hover .menu-arrow,.menu-card:focus-visible .menu-number,.menu-card:focus-visible .menu-copy small,.menu-card:focus-visible .menu-arrow,.menu-card.is-selected .menu-number,.menu-card.is-selected .menu-copy small,.menu-card.is-selected .menu-arrow { color:#fff; }
.menu-card:hover .menu-arrow,.menu-card:focus-visible .menu-arrow,.menu-card.is-selected .menu-arrow { transform:translateX(8px); }
.menu-card-primary:hover .menu-arrow,.menu-card-primary:focus-visible .menu-arrow,.menu-card-primary.is-selected .menu-arrow { color:var(--navy); }
.menu-card:disabled { cursor:default; opacity:1; }
.home-intro .title-catchphrase { animation:home-catchphrase-in 360ms ease-out 0ms both; }
.home-intro .logo-clip:nth-of-type(1) .logo-letter { animation:home-logo-letter-in 500ms cubic-bezier(.22,1,.36,1) 90ms both; }
.home-intro .logo-clip:nth-of-type(2) .logo-letter { animation:home-logo-letter-in 500ms cubic-bezier(.22,1,.36,1) 160ms both; }
.home-intro .logo-bang .logo-letter { animation:home-logo-bang-in 500ms cubic-bezier(.34,1.36,.64,1) 230ms both; }
.home-intro .brand-translation { animation:home-support-in 360ms ease-out 320ms both; }
.home-intro .title-support { animation:home-support-in 380ms cubic-bezier(.22,1,.36,1) 320ms both; }
.home-intro .menu-card:nth-child(1) { animation:home-card-in 320ms cubic-bezier(.16,1,.3,1) 400ms both; }
.home-intro .menu-card:nth-child(2) { animation:home-card-in 320ms cubic-bezier(.16,1,.3,1) 480ms both; }
.home-intro .menu-card:nth-child(3) { animation:home-card-in 320ms cubic-bezier(.16,1,.3,1) 560ms both; }
.home-return .title-brand-panel,.home-return .home-menu { animation:home-return-fade 200ms ease-out both; }
@keyframes home-catchphrase-in { from { opacity:0; transform:translateX(-12px); } }
@keyframes home-logo-letter-in { from { opacity:0; transform:translateY(108%); } }
@keyframes home-logo-bang-in { 0% { opacity:0; transform:translateY(108%); } 78% { transform:translateY(-2px); } 100% { opacity:1; transform:translateY(0); } }
@keyframes home-support-in { from { opacity:0; transform:translateY(8px); } }
@keyframes home-card-in { from { opacity:0; transform:translateX(24px); } }
@keyframes home-return-fade { from { opacity:0; } }
.status-toast { position:fixed; left:50%; bottom:26px; transform:translateX(-50%); padding:11px 18px; border-radius:999px; color:white; background:var(--navy); font:700 12px 'Noto Sans KR',sans-serif; box-shadow:0 10px 24px rgba(17,45,92,.25); opacity:0; pointer-events:none; transition:opacity .2s,transform .2s; z-index:20; }
.status-toast.show { opacity:1; transform:translateX(-50%) translateY(-4px); }
.test-locale-button { position:absolute; left:max(clamp(14px,2.2vw,28px),env(safe-area-inset-left)); bottom:max(clamp(10px,2vh,18px),env(safe-area-inset-bottom)); z-index:3; padding:8px 12px; border:1px solid #cfdcf0; border-radius:999px; color:var(--cobalt); background:rgba(255,255,255,.94); font:800 10px 'DM Sans',sans-serif; letter-spacing:.04em; box-shadow:0 7px 18px rgba(17,45,92,.1); touch-action:manipulation; }
.test-locale-button:hover { background:#edf4ff; }
.test-locale-button:active { transform:translateY(2px); }

.friend-room-page { padding-top:18px; padding-bottom:24px; }
.friend-room-card { width:min(720px,100%); padding:clamp(22px,4vh,38px); border:1px solid var(--line); border-radius:24px; background:#fff; box-shadow:0 24px 60px rgba(17,45,92,.09); }
.friend-room-card > h2 { margin:8px 0 20px; }
.friend-room-actions { display:grid; grid-template-columns:1fr 1fr; gap:12px; text-align:left; }
.friend-room-option { min-height:230px; padding:20px; border:1px solid #dce5f1; border-radius:18px; background:var(--soft); }
.friend-step { color:var(--cobalt); font:800 10px 'DM Sans',sans-serif; letter-spacing:.14em; }
.friend-room-option h3 { margin:7px 0 16px; color:var(--navy); font-size:17px; }
.friend-room-button { width:100%; min-height:50px; padding:0 15px; display:flex; align-items:center; justify-content:space-between; border:0; border-radius:13px; color:#fff; background:var(--cobalt); font-weight:800; touch-action:manipulation; }
.friend-room-button:active { transform:translateY(2px); }
.created-room { margin-top:14px; padding:12px; border:1px solid #cddcf1; border-radius:13px; background:#fff; text-align:center; }
.created-room[hidden] { display:none; }
.created-room small,.created-room span { display:block; color:var(--muted); font-size:9px; }
.created-room strong { display:block; margin:3px 0; color:var(--cobalt); font:800 34px 'DM Sans',sans-serif; letter-spacing:.16em; }
.room-join-form label { display:block; margin-bottom:7px; color:var(--muted); font-size:10px; }
.room-join-form > div { display:grid; grid-template-columns:1fr 52px; }
.room-join-form input { width:100%; height:52px; padding:0 14px; border:1px solid #cbd7e8; border-radius:13px 0 0 13px; color:var(--navy); background:#fff; font:800 24px 'DM Sans',sans-serif; letter-spacing:.2em; text-align:center; outline:none; }
.room-join-form input:focus { border-color:var(--cobalt); box-shadow:0 0 0 3px rgba(36,107,219,.12); }
.room-join-form button { border:0; border-radius:0 13px 13px 0; color:#fff; background:var(--navy); font-size:22px; touch-action:manipulation; }
.room-join-form p { min-height:18px; margin:8px 0 0; color:#cf5252; font-size:10px; }
.friend-back { margin-top:14px; }

.history-rail { position:fixed; right:0; top:50%; z-index:31; width:38px; min-height:124px; padding:10px 7px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; transform:translateY(-50%); border:1px solid #b8cdeb; border-right:0; border-radius:14px 0 0 14px; color:var(--navy); background:#fff; box-shadow:-8px 10px 28px rgba(17,45,92,.15); touch-action:manipulation; }
.history-rail span { writing-mode:vertical-rl; font-size:10px; font-weight:800; letter-spacing:.08em; }
.history-rail b { width:22px; height:22px; display:grid; place-items:center; border-radius:50%; color:#fff; background:var(--cobalt); font:800 10px 'DM Sans',sans-serif; }
.history-rail.is-open { color:#fff; background:var(--cobalt); border-color:var(--cobalt); }
.history-rail.is-open b { color:var(--cobalt); background:#fff; }
.history-scrim { position:fixed; inset:var(--topbar-height) 0 0; z-index:30; background:rgba(9,27,54,0); pointer-events:none; transition:background 220ms ease; }
.history-scrim.is-open { background:rgba(9,27,54,.28); pointer-events:auto; }
.history-drawer { position:absolute; top:0; right:0; width:min(410px,92vw); height:100%; padding:22px 18px max(22px,env(safe-area-inset-bottom)); display:flex; flex-direction:column; background:#f8fbff; box-shadow:-20px 0 50px rgba(17,45,92,.18); transform:translateX(100%); transition:transform 220ms cubic-bezier(.22,1,.36,1); }
.history-scrim.is-open .history-drawer { transform:translateX(0); }
.history-drawer > header { display:flex; align-items:center; justify-content:space-between; padding:0 2px 14px; border-bottom:1px solid var(--line); }
.history-drawer header small { color:var(--cobalt); font:800 9px 'DM Sans',sans-serif; letter-spacing:.16em; }
.history-drawer header h2 { margin:3px 0 0; color:var(--navy); font-size:22px; }
.history-drawer header button { width:38px; height:38px; border:1px solid var(--line); border-radius:12px; color:var(--navy); background:#fff; font-size:22px; }
.history-list { min-height:0; padding-top:12px; display:grid; align-content:start; gap:8px; overflow:auto; }
.history-empty { margin:28px 10px; color:var(--muted); font-size:12px; line-height:1.7; text-align:center; }
.history-item { border:1px solid #dce5f1; border-radius:14px; overflow:hidden; background:#fff; }
.history-question { width:100%; padding:13px; display:grid; grid-template-columns:minmax(0,1fr) 24px; gap:10px; align-items:center; border:0; color:var(--navy); background:#fff; text-align:left; }
.history-question span small,.history-question span strong { display:block; }
.history-question span small { margin-bottom:4px; color:var(--cobalt); font-size:9px; }
.history-question span strong { display:-webkit-box; overflow:hidden; font-size:12px; line-height:1.5; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.history-question b { color:var(--cobalt); font-size:18px; }
.history-answer { padding:0 13px 13px; border-top:1px solid var(--line); background:#f7faff; }
.history-answer[hidden] { display:none; }
.history-answer p { margin:10px 0 0; color:var(--muted); font-size:11px; line-height:1.6; }
.history-answer p span { display:block; margin-bottom:2px; color:var(--cobalt); font-size:9px; font-weight:800; }
.history-answer p strong { color:var(--navy); font-size:15px; }
.history-report { width:100%; min-height:38px; margin-top:11px; border:1px solid #c9d8ec; border-radius:10px; color:var(--cobalt); background:#fff; font-size:11px; font-weight:800; }

.opponent-answer-page { padding-top:18px; }
.opponent-input-card { margin-top:20px; padding:clamp(22px,4vh,36px); border:1px solid #dce5f1; border-radius:22px; background:#fff; text-align:center; box-shadow:0 14px 34px rgba(17,45,92,.09); }
.opponent-typing-label { margin:0; display:flex; align-items:center; justify-content:center; gap:9px; color:var(--navy); font-size:14px; font-weight:800; }
.opponent-typing-label > span { width:9px; height:9px; border-radius:50%; background:#f3c900; box-shadow:0 0 0 5px #fff7cf; animation:opponent-typing-pulse 900ms ease-in-out infinite alternate; }
.opponent-question { max-width:650px; margin:18px auto; color:var(--muted); font-size:13px; line-height:1.65; }
.opponent-entry { min-height:120px; padding:16px; display:grid; align-content:center; gap:7px; border-radius:18px; background:var(--soft); }
.opponent-marks,.opponent-characters { min-height:44px; display:flex; justify-content:center; gap:10px; }
.opponent-marks span,.opponent-characters span { width:46px; height:44px; display:grid; place-items:center; border-radius:12px; }
.opponent-marks span { color:var(--cobalt); background:#e9f2ff; font:900 25px 'DM Sans',sans-serif; }
.opponent-marks span.is-wrong { color:#d64f58; background:#ffe9ea; }
.opponent-characters span { border:1px solid #cfdbeb; color:var(--navy); background:#fff; font-size:21px; font-weight:800; }
.opponent-characters span.is-wrong { border-color:#e78d93; color:#d64f58; background:#fff5f5; }
.opponent-input-note { min-height:18px; margin:12px 0 0; color:var(--muted); font-size:11px; }
@keyframes opponent-typing-pulse { to { transform:scale(.72); opacity:.5; } }

.online-battle-page { max-width:850px; }
.online-battle-page .buzz { display:grid; place-items:center; align-content:center; gap:5px; }
.online-battle-page .buzz strong { font-size:22px; }
.online-battle-page .buzz small { font-size:10px; font-weight:700; opacity:.7; }
.online-battle-page .buzz.is-locked { color:#738097; background:#e5eaf1; box-shadow:0 12px 0 #cdd5e0,0 20px 30px rgba(17,45,92,.1); }
.online-battle-page .buzz.is-pending { transform:translateY(6px); color:#fff; background:var(--cobalt); box-shadow:0 6px 0 #164fb8; }
.online-answer-page .candidates { max-width:720px; margin:0 auto; display:flex; flex-wrap:wrap; justify-content:center; gap:9px; }
.online-answer-page h2 { word-break:keep-all; }
.online-answer-page .candidate { width:auto; min-width:52px; padding:0 14px; }
.online-selected { max-width:720px; min-height:58px; margin:22px auto 14px; display:flex; flex-wrap:wrap; justify-content:center; gap:7px; }
.online-selected span { width:auto; min-width:46px; min-height:52px; padding:0 10px; display:grid; place-items:center; border:2px solid var(--cobalt); border-radius:12px; color:var(--navy); background:#fff; font-size:22px; font-weight:850; }
.answer-deadline { margin-top:16px; color:var(--muted); font-size:12px; }
.answer-deadline b { color:var(--cobalt); font:900 22px 'DM Sans',sans-serif; }
.background-sync-note { display:block; margin-top:9px; color:#8795a9; font-size:9px; }

/* Achievement titles: compact angular badges inspired by the supplied blue-line references. */
.title-badge { --title-accent:#246bdb; min-width:0; height:28px; padding:0 11px 0 7px; display:inline-flex; align-items:center; gap:6px; color:var(--navy); background:#fff; border:1.5px solid var(--title-accent); clip-path:polygon(7px 0,calc(100% - 7px) 0,100% 50%,calc(100% - 7px) 100%,7px 100%,0 50%); white-space:nowrap; }
.title-badge i { min-width:17px; color:var(--title-accent); font:900 10px/1 'DM Sans',sans-serif; font-style:normal; text-align:center; }
.title-badge b { overflow:hidden; text-overflow:ellipsis; font-size:10px; font-weight:900; letter-spacing:-.02em; }
.title-style-speed { clip-path:polygon(10px 0,100% 0,calc(100% - 10px) 50%,100% 100%,10px 100%,0 50%); }
.title-style-icon { background:linear-gradient(90deg,#edf4ff 0 30px,#fff 30px); }
.title-style-beta { border-width:0 0 2px; clip-path:none; color:#102b58; }
.title-style-beta i,.title-style-beta b { color:#246bdb; }
.title-style-master { --title-accent:#0b244f; border-width:2px; box-shadow:inset 0 -4px 0 #cbd1dc; }
.title-badge-top { max-width:150px; height:24px; }
.title-badge-battle { max-width:150px; height:23px; margin:7px 0 2px; }
.title-badge-battle b { font-size:9px; }
.home-actions { width:100%; max-width:480px; justify-self:end; display:grid; gap:10px; }
.home-actions .home-menu { justify-self:stretch; }
.quiz-time-slot:empty { display:none; }
.quiz-time-banner { width:100%; min-height:66px; padding:11px 13px; display:grid; grid-template-columns:36px minmax(0,1fr) auto; gap:10px; align-items:center; border:1px solid #bed3f3; border-radius:16px; color:var(--navy); background:#fff; text-align:left; box-shadow:0 8px 22px rgba(17,45,92,.07); transition:background 180ms,border-color 180ms; }
.quiz-time-mark { width:36px; height:36px; display:grid; place-items:center; border-radius:12px; color:#fff; background:var(--cobalt); font:900 15px 'DM Sans',sans-serif; }
.quiz-time-banner strong,.quiz-time-banner small { display:block; }
.quiz-time-banner strong { font-size:13px; }
.quiz-time-banner small { margin-top:3px; color:var(--muted); font-size:9px; }
.quiz-time-banner em { color:var(--cobalt); font-size:10px; font-weight:900; font-style:normal; white-space:nowrap; }
.quiz-time-banner.phase-live { border-color:var(--cobalt); color:#fff; background:var(--cobalt); cursor:pointer; }
.quiz-time-banner.phase-live:hover,.quiz-time-banner.phase-live:focus-visible { background:#174fae; outline:none; }
.quiz-time-banner.phase-live .quiz-time-mark { color:var(--navy); background:var(--lime); }
.quiz-time-banner.phase-live small,.quiz-time-banner.phase-live em { color:#fff; }
.quiz-time-banner.phase-endedToday { min-height:52px; opacity:.78; }
.title-settings { margin:14px 0; padding:14px; border:1px solid #d8e3f1; border-radius:16px; background:#f8fbff; }
.title-settings > header { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:10px; text-align:left; }
.title-settings > header strong { color:var(--navy); font-size:13px; }
.title-settings > header small { color:var(--muted); font-size:9px; }
.title-choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.title-choice { min-width:0; padding:8px; display:grid; gap:5px; border:1px solid #dce5f1; border-radius:12px; background:#fff; text-align:left; }
.title-choice .title-badge { width:100%; }
.title-choice > small { overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.title-choice.is-selected { border-color:var(--cobalt); box-shadow:0 0 0 2px rgba(36,107,219,.12); }
.title-choice:disabled { cursor:not-allowed; filter:grayscale(.8); opacity:.5; }

.ranking-card,.settings-card { width:min(520px,100%); padding:38px; border:1px solid var(--line); border-radius:24px; background:#fff; box-shadow:0 24px 60px rgba(17,45,92,.09); }
.account-panel { margin:20px 0 14px; padding:14px; border:1px solid #cadbf4; border-radius:16px; background:linear-gradient(135deg,#f7faff,#edf4ff); }
.account-summary { display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:11px; align-items:center; text-align:left; }
.account-avatar { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; color:#fff; background:#97a9c2; font:900 18px 'DM Sans',sans-serif; }
.account-avatar.is-linked { background:var(--cobalt); }
.account-summary > span:nth-child(2) { min-width:0; }
.account-summary strong,.account-summary small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-summary strong { color:var(--navy); font-size:13px; }
.account-summary small { margin-top:3px; color:var(--muted); font-size:9px; }
.account-summary em { padding:4px 7px; border-radius:999px; color:var(--cobalt); background:#fff; font:800 8px 'DM Sans','Noto Sans KR',sans-serif; letter-spacing:.05em; }
.account-action { width:100%; min-height:42px; margin-top:12px; border:1px solid #aac7ef; border-radius:11px; color:var(--cobalt); background:#fff; font-weight:850; }
.account-action:hover { background:#f7faff; }
.account-action.is-signout { color:var(--muted); border-color:#d5deea; }
.account-action:disabled { cursor:wait; opacity:.62; }
.account-error { margin:9px 2px 0; color:#b7525f; font-size:9px; font-weight:750; }
.ranking-list,.settings-list { margin:25px 0 8px; padding:0; display:grid; gap:10px; }
.ranking-list { list-style:none; }
.ranking-list li,.setting-row { min-height:62px; padding:13px 16px; display:grid; grid-template-columns:38px 1fr auto; gap:12px; align-items:center; border:1px solid var(--line); border-radius:14px; background:var(--soft); }
.ranking-list li > b { width:28px; height:28px; display:grid; place-items:center; border-radius:9px; color:var(--cobalt); background:#e7f0ff; }
.ranking-list li strong { font:700 16px 'DM Sans',sans-serif; }
.ranking-list li.is-me { border-color:var(--cobalt); background:#eef5ff; box-shadow:0 0 0 2px rgba(13,91,215,.08); }
.ranking-list li > span { min-width:0; display:flex; align-items:center; gap:8px; overflow:hidden; white-space:nowrap; }
.title-badge-ranking { max-width:150px; }
.ranking-loading,.ranking-empty { margin:26px 0; color:var(--muted); text-align:center; }
.settings-card { max-height:calc(100dvh - 36px); overflow:auto; }
.setting-row { width:100%; grid-template-columns:1fr auto; color:var(--navy); text-align:left; }
.setting-row span strong,.setting-row span small { display:block; }
.setting-row span small { margin-top:3px; color:var(--muted); font-size:10px; }
.setting-row b { color:var(--cobalt); }
.setting-row.static { cursor:default; }
.setting-link { background:#fff; }
.setting-link:hover { border-color:#a9c4ef; background:#f5f9ff; }
.match-history-card { max-height:min(720px,calc(100vh - 110px)); display:flex; flex-direction:column; }
.match-history-list { min-height:90px; margin:18px 0; display:grid; gap:9px; overflow:auto; }
.match-history-row { padding:11px; display:grid; grid-template-columns:42px minmax(0,1fr) auto auto; gap:9px; align-items:center; border:1px solid var(--line); border-radius:14px; text-align:left; }
.match-history-avatar { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; color:#fff; background:#98a9bf; font-weight:850; }
.match-history-row > div { min-width:0; }
.match-history-row > div strong,.match-history-row > div small { display:block; }
.match-history-row > div strong { overflow:hidden; color:var(--navy); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.match-history-row > div small { margin-top:3px; color:var(--muted); font:700 9px 'DM Sans','Noto Sans KR',sans-serif; }
.match-history-result { color:var(--muted); font-size:10px; }
.match-history-result.win { color:#2d9f66; }
.match-report { min-height:34px; padding:0 9px; border:1px solid #d8e2ef; border-radius:9px; color:#9b5560; background:#fff; font-size:10px; font-weight:800; }
.report-dialog { width:min(460px,calc(100% - 28px)); padding:0; border:0; border-radius:22px; color:var(--navy); background:#fff; box-shadow:0 28px 80px rgba(7,26,58,.28); }
.report-dialog::backdrop { background:rgba(7,26,58,.42); }
.report-dialog form { padding:26px; }
.report-dialog h2 { margin:8px 0 14px; font-size:24px; }
.report-target { max-height:66px; margin:0 0 14px; padding:10px 12px; overflow:auto; border-radius:10px; color:var(--muted); background:var(--soft); font-size:11px; line-height:1.5; }
.report-dialog label { margin-top:12px; display:grid; gap:6px; color:var(--muted); font-size:11px; font-weight:800; }
.report-dialog select,.report-dialog textarea { width:100%; padding:11px 12px; border:1px solid #cfd9e7; border-radius:11px; color:var(--navy); background:#fff; font:600 14px 'Noto Sans KR',sans-serif; resize:none; }
.report-dialog textarea:focus,.report-dialog select:focus { border-color:var(--cobalt); outline:2px solid rgba(36,107,219,.12); }
.report-error { min-height:18px; margin:5px 0 0; color:#b7525f; font-size:10px; }
.report-actions { display:grid; grid-template-columns:1fr 1.4fr; gap:8px; margin-top:8px; }
.report-actions .text-button,.report-actions .primary { width:100%; min-height:46px; margin:0; }
.danger-button { width:100%; min-height:46px; border:0; border-radius:12px; color:#fff; background:#c73d4f; font-weight:850; }
.danger-button:disabled { color:#9c6f75; background:#f1dfe2; cursor:not-allowed; }
.delete-confirm { padding:12px 14px!important; display:flex!important; flex-direction:row!important; align-items:center; gap:9px; border:1px solid #e1e7f0; border-radius:12px; background:#f8fafc; }
.delete-confirm input { width:18px; height:18px; margin:0; accent-color:#c73d4f; }
.danger-link strong { color:#b72f43; }
.candidate:disabled,.answer-panel.is-input-locked .candidate { color:#8795a9; background:#eef2f7; pointer-events:none; }
.rank-preview-page { width:min(720px,100%); height:100%; margin:auto; padding:34px 22px max(28px,env(safe-area-inset-bottom)); overflow:auto; text-align:center; }
.rank-preview-page h1 { margin:8px 0 4px; font-size:32px; }
.rank-preview-page > p { margin:0; color:var(--muted); font-size:12px; }
.rank-preview-grid { margin:22px 0; display:grid; grid-template-columns:repeat(6,1fr); gap:10px; }
.rank-preview-item { min-width:0; padding:12px 5px 10px; display:flex; flex-direction:column; align-items:center; border:1px solid var(--line); border-radius:15px; background:#fff; }
.rank-emblem-preview { width:54px; height:64px; }
.rank-emblem-preview > b { font-size:15px; }
.rank-emblem-preview .rank-stage { right:1px; bottom:5px; min-width:19px; height:19px; font-size:14px; }
.rank-preview-item strong { margin-top:6px; color:var(--navy); font:900 11px 'DM Sans','Noto Sans KR',sans-serif; }
.rank-preview-item small { margin-top:3px; color:var(--muted); font:700 7px 'DM Sans',sans-serif; }
.rank-preview-page > .primary { width:min(280px,100%); }

.battle-arena { max-width:960px; padding-top:22px; }
.battle-arena .battle-head { margin-bottom:14px; }
.scoreboard { display:grid; grid-template-columns:minmax(0,1fr) 120px minmax(0,1fr); align-items:stretch; gap:10px; }
.combatant { min-width:0; min-height:126px; padding:15px 17px; display:flex; align-items:center; gap:13px; border:1px solid #dfe6f0; background:#fff; box-shadow:0 9px 24px rgba(17,45,92,.07); }
.combatant.me { border-left:6px solid var(--cobalt); border-radius:20px 8px 8px 20px; }
.combatant.opponent { border-right:6px solid #f3c900; border-radius:8px 20px 20px 8px; text-align:right; }
.combat-avatar { flex:0 0 auto; width:68px; height:68px; display:grid; place-items:center; border:4px solid var(--cobalt); border-radius:50%; color:#fff; background:linear-gradient(145deg,#173a70,#2b77e2); font-weight:800; box-shadow:0 0 0 4px #e9f1ff; }
.opponent .combat-avatar { border-color:#f3c900; background:linear-gradient(145deg,#6550a6,#a287df); box-shadow:0 0 0 4px #fff8cf; }
.combat-copy { min-width:0; flex:1; }
.combat-copy strong,.combat-copy small,.combat-copy span { display:block; }
.combat-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:16px; }
.combat-copy small { margin:4px 0 8px; color:var(--muted); font:600 11px 'DM Sans',sans-serif; }
.combat-life { width:max-content; padding:4px 9px; border:1px solid #e5eaf1; border-radius:999px; color:var(--cobalt); background:#fff; font-size:12px; }
.opponent .combat-life { margin-left:auto; color:#e0ad00; }
.combat-score { color:var(--navy); font:800 30px 'DM Sans',sans-serif; }
.round-hub { padding:13px 9px; display:grid; place-items:center; align-content:center; border:1px solid #dfe6f0; border-radius:16px; background:#fff; text-align:center; box-shadow:0 9px 24px rgba(17,45,92,.07); }
.round-hub div { display:flex; justify-content:center; align-items:baseline; gap:4px; }
.round-hub strong { color:var(--cobalt); font:800 40px 'DM Sans',sans-serif; }
.round-hub span { color:var(--muted); font:600 14px 'DM Sans',sans-serif; }
.round-hub small { color:var(--muted); font:700 10px 'DM Sans',sans-serif; letter-spacing:.08em; }
.round-hub i { width:8px; height:8px; margin-top:10px; border-radius:50%; background:var(--cobalt); box-shadow:15px 0 0 #dbe3ef; }
.question-timer-row { margin:24px 4px 16px; display:grid; grid-template-columns:auto auto 1fr; align-items:center; gap:10px; }
.timer-icon { color:var(--cobalt); font-size:25px; }
.question-timer-row b { min-width:50px; color:var(--navy); font:700 16px 'DM Sans',sans-serif; }
.question-progress { height:12px; border-radius:999px; background:#e4e8ee; overflow:hidden; }
.question-progress span { display:block; width:100%; height:100%; border-radius:inherit; background:linear-gradient(90deg,#2776e8,#175bc9); transition:width .08s linear; }
.live-question-card { margin:0; min-height:250px; padding:25px 30px 28px; border:1px solid #dfe5ee; border-radius:20px; background:#fff; text-align:left; box-shadow:0 12px 28px rgba(17,45,92,.08); }
.question-meta { display:flex; align-items:center; gap:8px; }
.q-badge { width:45px; height:45px; display:grid; place-items:center; border-radius:50%; color:#fff; background:var(--cobalt); font:800 20px 'DM Sans',sans-serif; }
.category-pill,.difficulty-pill { padding:6px 10px; border-radius:999px; color:var(--cobalt); background:#eaf2ff; font-size:11px; font-weight:700; }
.difficulty-pill { color:#7b6b14; background:#fff7cf; }
.round-caption { margin-left:auto; color:var(--muted); font:700 11px 'DM Sans',sans-serif; }
.live-question-card .question { max-width:none; min-height:116px; margin:18px 8px 8px; place-items:center start; font-size:clamp(21px,3vw,30px); }
.buzzer-zone { display:flex; justify-content:center; margin:26px auto 0; }
.buzzer-zone .buzz { width:220px; height:220px; aspect-ratio:1; margin:0; display:flex; flex-direction:column; align-items:center; justify-content:center; border:9px solid #fff; border-radius:50%; color:#fff; background:linear-gradient(160deg,#3d84f0 0%,#1760cf 65%,#0d3f9e 100%); box-shadow:0 0 0 10px #ffd34a,0 13px 0 14px #dfe5ed,0 24px 32px rgba(17,69,155,.28); }
.buzzer-zone .buzz span { font-size:34px; line-height:1; }
.buzzer-zone .buzz strong { margin-top:10px; font-size:22px; }
.buzzer-zone .buzz small { margin-top:5px; color:#dbe8ff; font-size:10px; font-weight:500; }
.buzzer-zone .buzz:active,.buzzer-zone .buzz.is-pressed { transform:translateY(10px) scale(.985); box-shadow:0 0 0 10px #ffd34a,0 4px 0 14px #dfe5ed,0 11px 19px rgba(17,69,155,.2); }
.battle-arena > .status { margin-top:22px; text-align:center; }
.live-question-card .answer-panel { max-width:620px; margin:8px auto 0; text-align:center; }
.timeout-answer-page { background:radial-gradient(circle at 50% 42%,#f7faff 0%,#eef4ff 58%,#fff 100%); }
.timeout-answer-card { width:min(620px,100%); padding:clamp(36px,7vw,72px) 28px; border:1px solid #dfe7f2; border-radius:28px; background:rgba(255,255,255,.94); box-shadow:0 24px 70px rgba(17,45,92,.12); }
.timeout-answer-card > p { margin:14px 0 28px; color:var(--muted); font-size:14px; }
.timeout-answer { display:flex; flex-direction:column; align-items:center; gap:12px; }
.timeout-answer span { padding:6px 12px; border-radius:999px; color:#fff; background:var(--cobalt); font-size:12px; font-weight:800; letter-spacing:.08em; }
.timeout-answer strong { color:var(--navy); font-size:clamp(34px,7vw,64px); line-height:1.2; letter-spacing:-.04em; word-break:keep-all; }
.timeout-answer-card > small { display:block; margin-top:32px; color:var(--muted); font-size:12px; }
.timeout-answer-card > small b { color:var(--cobalt); font:800 16px 'DM Sans',sans-serif; }
.answer-result-card { padding-top:34px; padding-bottom:30px; }
.answer-result-card .result-icon { width:48px; height:48px; border-radius:16px; font-size:22px; }
.answer-result-card h2 { margin:12px 0 0; font-size:24px; }
.result-revealed-answer { margin:18px 0 12px; padding:22px 18px; display:flex; flex-direction:column; align-items:center; gap:10px; border:1px solid #dbe5f2; border-radius:20px; background:#f7faff; }
.result-revealed-answer > span { padding:5px 11px; border-radius:999px; color:#fff; background:var(--cobalt); font-size:11px; font-weight:900; letter-spacing:.08em; }
.result-revealed-answer > strong { color:var(--navy); font-size:clamp(38px,8vw,68px); line-height:1.15; font-weight:900; letter-spacing:-.05em; word-break:keep-all; overflow-wrap:anywhere; }
.answer-result-card .explanation { max-width:440px; margin:0 auto; font-size:12px; line-height:1.6; }
.answer-result-card .result-stats { margin:18px 0 0; }
.result-auto-next { margin:20px 0 0!important; font-size:12px!important; }
.result-auto-next b { margin-right:2px; color:var(--cobalt); font:800 16px 'DM Sans',sans-serif; }

@media (max-width:700px) {
  .title-screen { padding:clamp(48px,8vh,68px) 18px max(52px,env(safe-area-inset-bottom)); grid-template-columns:1fr; grid-template-rows:auto auto; align-content:start; align-items:stretch; gap:clamp(18px,3vh,28px); }
  .title-brand-panel { align-self:end; }
  .title-catchphrase { margin-bottom:7px; font-size:12px; }
  .title-screen h1 { min-height:clamp(56px,19vw,78px); font-size:clamp(54px,18vw,78px); }
  .brand-roman { margin:0 0 6px; font-size:9px; }
  .title-description { font-size:14px; line-height:1.5; }
  .title-meta { gap:5px; margin-top:10px; }
  .title-meta > span { padding:5px 8px; font-size:10px; }
  .home-rank-pill { min-height:42px; padding-right:9px; }
  .rank-emblem-home { width:31px; height:37px; }
  .home-menu { max-width:none; align-self:start; gap:8px; }
  .menu-card { min-height:72px; padding:12px 14px; grid-template-columns:30px minmax(0,1fr) 30px; gap:10px; border-radius:16px; }
  .menu-card-primary { min-height:86px; }
  .menu-copy strong { font-size:17px; }
  .menu-copy small { margin-top:3px; font-size:11px; line-height:1.35; }
  .menu-arrow { font-size:20px; }
  .menu-card-primary .menu-arrow { width:32px; height:32px; }
  .test-locale-button { font-size:11px; }
  .result-card.final { padding:24px 16px; }
  .result-card.final .result-icon { width:48px; height:48px; border-radius:16px; font-size:22px; }
  .result-card.final h2 { margin:10px 0 4px; font-size:25px; }
  .result-card.final > p { margin:4px 0; font-size:11px; }
  .result-card.final .final-score { margin:12px 0; font-size:34px; }
  .result-progression { margin-bottom:14px; gap:8px; }
  .rank-result { padding-top:8px; padding-bottom:8px; }
  .match-found-page { padding-left:14px; padding-right:14px; }
  .match-found-page h2 { font-size:25px; }
  .match-found-page .ready-versus { margin:18px auto 14px; grid-template-columns:minmax(0,132px) 30px minmax(0,132px); gap:7px; }
  .ready-player { width:100%; min-height:140px; padding:13px 6px 10px; }
  .ready-vs { width:30px; font-size:13px; }
  .ready-vs::before,.ready-vs::after { display:none; }
  .ready-action { min-height:50px; font-size:15px; }
  .rank-preview-page { padding-top:24px; }
  .rank-preview-page h1 { font-size:27px; }
  .rank-preview-grid { grid-template-columns:repeat(3,1fr); gap:8px; margin:16px 0; }
  .rank-preview-item { padding:8px 4px 7px; }
  .rank-emblem-preview { width:45px; height:53px; }
  .rank-emblem-preview > b { font-size:12px; }
  .friend-room-card { padding:20px 15px; }
  .friend-room-card > h2 { margin-bottom:12px; font-size:24px; }
  .friend-room-actions { grid-template-columns:1fr; gap:8px; }
  .friend-room-option { min-height:0; padding:13px; }
  .friend-room-option h3 { margin:3px 0 9px; font-size:14px; }
  .created-room { margin-top:8px; padding:7px; }
  .created-room strong { font-size:27px; }
  .history-rail { width:34px; min-height:108px; }
  .history-drawer { width:calc(100vw - 22px); padding:18px 14px max(18px,env(safe-area-inset-bottom)); }
  .opponent-answer-page { padding-top:10px; }
  .opponent-input-card { margin-top:13px; padding:18px 13px; }
  .opponent-question { margin:12px auto; font-size:11px; }
  .opponent-entry { min-height:102px; padding:12px 8px; }
  .opponent-marks,.opponent-characters { min-height:38px; gap:7px; }
  .opponent-marks span,.opponent-characters span { width:39px; height:38px; }
  .opponent-marks span { font-size:22px; }
  .opponent-characters span { font-size:18px; }
  .battle-arena { padding:14px 12px 40px; }
  .scoreboard { grid-template-columns:minmax(0,1fr) 66px minmax(0,1fr); gap:5px; }
  .combatant { min-height:91px; padding:9px; gap:7px; }
  .combat-avatar { width:42px; height:42px; border-width:3px; font-size:12px; }
  .combat-copy strong { font-size:12px; }
  .combat-copy small { margin:2px 0 5px; font-size:9px; }
  .combat-life { padding:2px 6px; font-size:10px; }
  .combat-score { font-size:20px; }
  .round-hub { padding:8px 4px; border-radius:12px; }
  .round-hub strong { font-size:27px; }
  .round-hub span { font-size:10px; }
  .question-timer-row { margin:18px 2px 12px; }
  .live-question-card { min-height:220px; padding:18px 17px 20px; }
  .q-badge { width:37px; height:37px; font-size:17px; }
  .live-question-card .question { min-height:115px; margin:14px 3px 5px; font-size:20px; }
  .buzzer-zone .buzz { width:180px; height:180px; }
  .buzzer-zone .buzz strong { font-size:19px; }
}

@media (max-height:680px) {
  .title-screen { padding-top:22px; gap:10px; }
  .title-screen h1 { min-height:48px; font-size:clamp(44px,12vh,62px); }
  .title-catchphrase { margin-bottom:3px; }
  .brand-roman { display:none; }
  .title-description { font-size:13px; line-height:1.4; }
  .title-meta { margin-top:6px; }
  .menu-card { min-height:62px; padding-top:8px; padding-bottom:8px; }
  .menu-card-primary { min-height:72px; }
}

@media (max-height:560px) {
  .title-description,.title-meta { display:none; }
  .title-screen { grid-template-columns:minmax(0,1fr) minmax(280px,.85fr); grid-template-rows:1fr; gap:24px; }
  .menu-copy small { display:none; }
}

@media (prefers-reduced-motion:reduce) {
  .home-intro .title-catchphrase,.home-intro .logo-letter,.home-intro .brand-translation,.home-intro .title-support,.home-intro .menu-card,.home-return .title-brand-panel,.home-return .home-menu { animation:none!important; }
  .menu-card,.menu-card::before,.menu-card > * { transition:none!important; }
  .history-scrim,.history-drawer { transition:none!important; }
  .opponent-typing-label > span { animation:none!important; }
  .match-found-animate .eyebrow,.match-found-animate h2,.match-found-animate .ready-player,.match-found-animate .ready-vs,.match-found-animate .ready-action,.count-number.count-enter,.countdown-sweep span,.waiting-dots i { animation:none!important; }
}

@media (max-width:700px) {
  .title-badge-top { display:none; }
  .title-screen { grid-template-columns:1fr; align-content:center; gap:18px; padding-top:20px; }
  .title-brand-panel,.home-actions { max-width:none; }
  .title-screen h1 { min-height:60px; font-size:62px; }
  .home-actions { gap:8px; }
  .quiz-time-banner { min-height:58px; }
}
