/* Arcade: always a dark "game room" regardless of site theme. */
body.arena{margin:0;min-height:100vh;background:radial-gradient(120% 80% at 50% -10%,#1d4a3f 0%,#0c1412 55%,#07090a 100%) fixed;color:#f2f5f3;font-family:Pretendard,'Noto Sans KR',system-ui,-apple-system,sans-serif;-webkit-tap-highlight-color:transparent;color-scheme:dark}
.arena *{box-sizing:border-box}
.ar-top{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;background:#07090acc;backdrop-filter:blur(10px);border-bottom:1px solid #ffffff12}
.ar-top strong{font-size:13px;font-weight:900;letter-spacing:4px;color:#ffd75e}
.ar-back,.ar-me{color:#cfd8d4;text-decoration:none;font-size:14px;font-weight:700}
.ar-me{padding:6px 12px;border-radius:999px;background:#ffffff12}
.ar-main{max-width:760px;margin:0 auto;padding:22px 16px calc(120px + env(safe-area-inset-bottom))}
.ar-hero h1{margin:6px 0 8px;font-size:32px;font-weight:900;letter-spacing:-1px}
.ar-hero p{margin:0 0 22px;color:#b6c4be;font-size:15px;line-height:1.6}
.ar-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.ar-mode{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-height:168px;padding:18px;border:0;border-radius:20px;color:#fff;text-align:left;font:inherit;cursor:pointer;overflow:hidden;box-shadow:0 14px 30px #0006,inset 0 1px 0 #ffffff26;transition:transform .15s ease,box-shadow .15s ease}
.ar-mode:hover{transform:translateY(-3px);box-shadow:0 20px 40px #0008,inset 0 1px 0 #ffffff33}
.ar-mode:active{transform:translateY(0) scale(.98)}
.ar-mode:focus-visible{outline:3px solid #ffd75e;outline-offset:3px}
.ar-speed{background:linear-gradient(150deg,#ff9d2e,#d9441f)}
.ar-survival{background:linear-gradient(150deg,#e2405f,#7a1f6b)}
.ar-daily{background:linear-gradient(150deg,#3a8ef0,#2a4fb0)}
.ar-mode-icon{font-size:30px;line-height:1;margin-bottom:6px;filter:drop-shadow(0 3px 6px #0004)}
.ar-mode strong{font-size:19px;font-weight:900}
.ar-mode small{font-size:12.5px;opacity:.88}
.ar-mode em{margin-top:auto;font-style:normal;font-size:12.5px;font-weight:800;padding:4px 10px;border-radius:999px;background:#0003}
.ar-board{margin-top:28px;padding:18px;border-radius:20px;background:#ffffff0b;border:1px solid #ffffff14}
.ar-board-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.ar-board h2{margin:0;font-size:18px;font-weight:900}
.ar-tabs{display:flex;gap:4px;padding:4px;border-radius:12px;background:#0005;overflow-x:auto}
.ar-tabs button{flex:none;border:0;border-radius:9px;padding:7px 12px;background:none;color:#a9b8b2;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.ar-tabs button[aria-selected=true]{background:#ffd75e;color:#2b1d00}
.ar-rank{margin:0;padding:0;list-style:none}
.ar-rank li{display:grid;grid-template-columns:40px 1fr auto auto;align-items:center;gap:10px;padding:10px 6px;border-top:1px solid #ffffff10;font-size:14.5px}
.ar-rank li:first-child{border-top:0}
.ar-rank li b{text-align:center;font-weight:900;color:#cfd8d4}
.ar-rank li span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ar-rank li small{color:#8ea19a;font-size:12px}
.ar-rank li strong{font-variant-numeric:tabular-nums;font-weight:800}
.ar-rank li.is-me{background:#ffd75e1f;border-radius:10px}
.ar-note{margin:10px 0 0;color:#9fb0aa;font-size:13px}
.ar-rules{margin-top:16px;color:#b6c4be;font-size:13.5px}
.ar-rules summary{cursor:pointer;font-weight:700}
.ar-rules ul{padding-left:18px;line-height:1.7}
/* Play */
.ar-hud{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.ar-hud-item{display:flex;flex-direction:column;align-items:center;padding:10px;border-radius:14px;background:#ffffff10}
.ar-hud-item small{font-size:11px;font-weight:800;letter-spacing:1px;color:#9fb0aa}
.ar-hud-item b{font-size:24px;font-weight:900;font-variant-numeric:tabular-nums;line-height:1.3}
.ar-combo-wrap.is-hot{background:linear-gradient(135deg,#ff8a4c,#e0352b);animation:ar-pulse .6s ease}
.ar-combo-wrap.is-hot small{color:#fff}
@keyframes ar-pulse{50%{transform:scale(1.06)}}
#arLife{letter-spacing:2px;color:#ff6b81}
body[data-mode=speed] #arLife,body[data-mode=daily] #arLife{color:#fff;letter-spacing:0}
.ar-timer{height:8px;margin:12px 0 0;border-radius:8px;background:#ffffff14;overflow:hidden}
.ar-timer i{display:block;height:100%;transform-origin:left;background:linear-gradient(90deg,#5fe0a8,#ffd75e);transition:transform .1s linear}
.ar-timer.is-low i{background:linear-gradient(90deg,#ff6b4a,#ff3b5c)}
.ar-felt{position:relative;margin:16px 0;padding:22px 16px 26px;border-radius:28px;background:radial-gradient(90% 80% at 50% 40%,#2c7a5f,#134232 70%,#0c2a20);box-shadow:inset 0 0 0 6px #5a3a1e,inset 0 0 0 9px #2a1a0c,0 20px 50px #0008;text-align:center;transition:box-shadow .2s}
.ar-felt[data-state=ok]{box-shadow:inset 0 0 0 6px #5a3a1e,inset 0 0 0 9px #2a1a0c,0 0 0 4px #5fe0a8,0 20px 50px #0008}
.ar-felt[data-state=bad]{box-shadow:inset 0 0 0 6px #5a3a1e,inset 0 0 0 9px #2a1a0c,0 0 0 4px #ff4d6a,0 20px 50px #0008;animation:ar-shake .35s}
@keyframes ar-shake{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
.ar-seats{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;margin:0 0 14px;padding:0;list-style:none}
.ar-seats li{min-width:44px;padding:4px 6px;border-radius:999px;font-size:11px;font-weight:800;background:#0000002e;color:#cfe6dc}
.ar-seats li.is-fold{opacity:.4;text-decoration:line-through}
.ar-seats li.is-hero{background:#ffd75e;color:#2b1d00;transform:scale(1.12)}
.ar-spot{display:flex;flex-direction:column;align-items:center;gap:2px}
.ar-spot span{font-size:13px;font-weight:800;color:#bfe8d6}
.ar-spot strong{font-size:34px;font-weight:900;letter-spacing:-1px;text-shadow:0 3px 10px #0006}
.ar-spot small{font-size:12px;color:#a8d4c2}
.ar-cards{display:flex;justify-content:center;gap:10px;min-height:120px;margin:16px 0 6px;perspective:600px}
.ar-cards .game-card{width:82px;height:116px;font-size:28px}
.ar-hand{margin:0;font-size:15px;font-weight:900;letter-spacing:1px;color:#e8f6ef}
.ar-flash{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:4px;min-width:220px;padding:14px 18px;border-radius:16px;background:#07090ae6;box-shadow:0 16px 40px #000a;animation:ar-flash .25s cubic-bezier(.2,.9,.3,1.3)}
.ar-flash strong{font-size:20px;font-weight:900}
.ar-flash small{font-size:13px;color:#cfd8d4}
.ar-flash.is-ok strong{color:#5fe0a8}.ar-flash.is-mixed strong{color:#ffd75e}.ar-flash.is-bad strong{color:#ff6b81}
@keyframes ar-flash{from{opacity:0;transform:translate(-50%,-40%) scale(.85)}}
.ar-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.ar-act{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;min-height:64px;border:0;border-radius:16px;font:inherit;font-size:17px;font-weight:900;color:#fff;cursor:pointer;box-shadow:0 6px 0 #0006,0 10px 20px #0005;transition:transform .08s ease,box-shadow .08s ease,filter .15s}
.ar-act:active{transform:translateY(4px);box-shadow:0 2px 0 #0006}
.ar-act:focus-visible{outline:3px solid #ffd75e;outline-offset:2px}
.ar-act kbd{font:inherit;font-size:11px;font-weight:800;padding:2px 6px;border-radius:6px;background:#0003;opacity:.8}
.ar-act-fold{background:linear-gradient(#5d6670,#3f464e)}
.ar-act-open{background:linear-gradient(#2fbf7f,#1f8a5a)}
.ar-act-call{background:linear-gradient(#3a8ef0,#2a62c0)}
.ar-act-jam{background:linear-gradient(#ff6b4a,#d6302b)}
.ar-act:disabled{cursor:default;filter:saturate(.5) brightness(.75)}
.ar-act.is-best{filter:none;outline:3px solid #5fe0a8;outline-offset:2px}
.ar-act.is-wrong{filter:none;outline:3px solid #ff4d6a;outline-offset:2px}
.ar-act.is-right{filter:none}
.ar-keys{margin:12px 0 0;text-align:center;font-size:12px;color:#7f928b}
@media(hover:none){.ar-keys,.ar-act kbd{display:none}}
/* Result */
.ar-result{text-align:center;padding-top:10px}
.ar-result>small{font-size:13px;font-weight:800;letter-spacing:2px;color:#ffd75e}
.ar-result h2{margin:6px 0 4px;font-size:56px;font-weight:900;letter-spacing:-2px;background:linear-gradient(#fff,#ffd75e);-webkit-background-clip:text;background-clip:text;color:transparent}
.ar-best{margin:0 0 20px;color:#b6c4be;font-weight:700}
.ar-best.is-record{color:#ffd75e;animation:ar-pulse .8s ease 2}
.ar-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0 0 14px}
.ar-stats div{padding:12px 6px;border-radius:14px;background:#ffffff10}
.ar-stats dt{font-size:11.5px;color:#9fb0aa;font-weight:700}
.ar-stats dd{margin:4px 0 0;font-size:20px;font-weight:900;font-variant-numeric:tabular-nums}
.ar-result-actions{display:grid;grid-template-columns:2fr 1fr;gap:10px;margin:18px 0}
.ar-primary,.ar-secondary{min-height:56px;border:0;border-radius:16px;font:inherit;font-size:17px;font-weight:900;cursor:pointer}
.ar-primary{background:#ffd75e;color:#2b1d00;box-shadow:0 6px 0 #b58a1c}
.ar-primary:active{transform:translateY(4px);box-shadow:0 2px 0 #b58a1c}
.ar-secondary{background:#ffffff14;color:#fff}
.ar-review{margin-top:18px;padding:16px;border-radius:18px;background:#ffffff0b;text-align:left}
.ar-review h3{margin:0 0 8px;font-size:16px}
.ar-review ol{margin:0;padding:0;list-style:none}
.ar-review li{display:grid;grid-template-columns:52px 1fr;gap:2px 10px;padding:10px 0;border-top:1px solid #ffffff10}
.ar-review li b{grid-row:span 2;font-size:18px;font-weight:900;color:#ffd75e}
.ar-review li span{font-size:13.5px}
.ar-review li small{font-size:12.5px;color:#5fe0a8}
.ar-link{display:inline-block;margin-top:10px;color:#cfd8d4;font-size:13.5px}
@media(max-width:600px){.ar-modes{grid-template-columns:1fr}.ar-mode{min-height:0;display:grid;grid-template-columns:auto 1fr auto;align-items:center;column-gap:14px}.ar-mode-icon{grid-row:span 2;margin:0}.ar-mode em{grid-row:span 2;grid-column:3;margin:0}
 .ar-hero h1{font-size:27px}.ar-stats{grid-template-columns:repeat(2,1fr)}.ar-result h2{font-size:48px}.ar-cards .game-card{width:72px;height:102px}.ar-spot strong{font-size:30px}}
@media(prefers-reduced-motion:reduce){.ar-felt[data-state=bad],.ar-flash,.ar-combo-wrap.is-hot,.ar-best.is-record{animation:none}}
html:has(body.arena){background:#07090a}
.ar-flash[hidden]{display:none!important}
.arena .ar-cards .game-card{width:84px!important;height:118px!important}
@media(max-width:600px){.arena .ar-cards .game-card{width:74px!important;height:104px!important}}
/* Street toggle */
.ar-street{display:inline-flex;gap:4px;padding:4px;margin:4px 0 12px;border-radius:14px;background:#0006;border:1px solid #ffffff14}
.ar-street button{border:0;border-radius:10px;padding:9px 18px;background:none;color:#a9b8b2;font:inherit;font-size:14.5px;font-weight:800;cursor:pointer}
.ar-street button[aria-selected=true]{background:#fff;color:#0c1412;box-shadow:0 4px 12px #0005}
body[data-street=post] .ar-street button[aria-selected=true]{background:#7fd8ff;color:#06202c}
body[data-street=post].arena{background:radial-gradient(120% 80% at 50% -10%,#1d3a5a 0%,#0b1220 55%,#06080d 100%) fixed}
body[data-street=post] .ar-felt{background:radial-gradient(90% 80% at 50% 40%,#2a5f86,#143650 70%,#0c2236)}
/* Postflop table */
.ar-post{display:flex;flex-direction:column;align-items:center;gap:10px}
.ar-kind{padding:5px 12px;border-radius:999px;font-size:12px;font-weight:900;letter-spacing:.5px;background:#ffd75e;color:#2b1d00}
.ar-kind[data-kind=made]{background:#7fd8c3;color:#06231c}.ar-kind[data-kind=nuts]{background:#c9a6ff;color:#220a46}.ar-kind[data-kind=draw]{background:#ff9d7a;color:#3a1200}
.ar-prompt{margin:0;max-width:520px;font-size:15.5px;font-weight:700;line-height:1.5;color:#eaf4fb}
.ar-row{display:flex;align-items:center;gap:10px}
.ar-row>small{width:30px;font-size:11.5px;font-weight:900;color:#bcd6e6;text-align:right}
.ar-row[hidden]{display:none!important}
.arena .ar-cards-sm,.arena .ar-cards-board{min-height:0;margin:0;gap:6px}
.arena .ar-cards-board .game-card{width:56px!important;height:80px!important}
.arena .ar-cards-sm .game-card{width:56px!important;height:80px!important}
.ar-villain .ar-cards-sm{opacity:.92}
.ar-hero .ar-cards-sm .game-card{box-shadow:0 0 0 3px #ffd75e,0 6px 14px #0007}
.ar-choice-cards{display:flex;gap:4px}
.arena .ar-choice-cards .game-card{width:40px!important;height:56px!important;font-size:15px}
.ar-act-choice{background:linear-gradient(#4b5ad8,#3340a8)}
.ar-actions[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.ar-actions[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}
body[data-street=post] .ar-act b{font-size:15.5px}
@media(max-width:600px){
 .arena .ar-cards-board .game-card,.arena .ar-cards-sm .game-card{width:48px!important;height:68px!important}
 .ar-prompt{font-size:14.5px}
 .ar-actions[data-count="3"]{grid-template-columns:1fr 1fr 1fr}
 body[data-street=post] .ar-act{min-height:58px;font-size:15px}
}
.ar-pre[hidden],.ar-post[hidden]{display:none!important}
.ar-mode strong{white-space:nowrap}
.ar-review li{grid-template-columns:minmax(52px,max-content) 1fr}.ar-review li b{white-space:nowrap;font-size:15px}

/* GameTree workbook: a quiet play surface, separate from the scored engine. */
.arena .ar-top .gl-mark{font-size:15px!important;letter-spacing:-.025em!important;color:inherit}
.arena .ar-mode-practice{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;padding:14px 16px;margin:0 0 14px;border:1px solid #c3a974;border-radius:12px;background:#ede2ca;color:#252018;font:inherit;text-align:left;cursor:pointer;min-height:64px}
.ar-mode-practice strong,.ar-mode-practice small{display:block}
.ar-mode-practice small{margin-top:3px;font-size:13px;color:#594c37}
.arena #lobby .gl-title{margin:0 0 16px;padding:0}
.arena #lobby .gl-name{font-size:clamp(1.65rem,5vw,2.25rem);margin:0;letter-spacing:-.05em}
.arena .ar-lobby-extras{margin:18px 0;text-align:center}
.arena #lobby .gl-play{min-width:0;min-height:44px;animation:none;box-shadow:none;background:transparent;border:1px solid #c3a974;border-radius:8px;color:#ead6a5;flex-direction:row;gap:8px}
.arena #lobby .gl-play b{font-size:13px;letter-spacing:0}
.arena #lobby .gl-play small{margin:0}
.arena #lobby .gl-play:active{transform:none;box-shadow:none}

body.arena[data-screen=play]{--ar-paper:#f4f1eb;--ar-ink:#282620;--ar-muted:#665e50;--ar-stroke:#cec4b4;background:var(--ar-paper);color:var(--ar-ink);color-scheme:light}
:root[data-pg-theme=dark] body.arena[data-screen=play]{--ar-paper:#1c1d1a;--ar-ink:#f1ebdc;--ar-muted:#c0b5a0;--ar-stroke:#534d40;color-scheme:dark}
@media(prefers-color-scheme:dark){:root:not([data-pg-theme]) body.arena[data-screen=play]{--ar-paper:#1c1d1a;--ar-ink:#f1ebdc;--ar-muted:#c0b5a0;--ar-stroke:#534d40;color-scheme:dark}}
.arena[data-screen=play] .ar-top{display:grid;grid-template-columns:1fr auto 1fr;background:var(--ar-paper);border-color:var(--ar-stroke);color:var(--ar-ink)}
.arena[data-screen=play] .ar-top .ar-back{color:var(--ar-muted)}
.arena[data-screen=play] .ar-me{display:none}
.arena[data-screen=play] .ar-main{max-width:650px;padding-top:12px;padding-bottom:calc(20px + env(safe-area-inset-bottom))}
.ar-play-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:4px}
.ar-play-head h2{font-size:clamp(1.05rem,4.5vw,1.4rem);letter-spacing:-.045em;margin:0}
.ar-play-head button{padding:0 8px;min-height:44px;color:var(--ar-muted);background:none;border:0;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
#play .ar-hud{display:flex;justify-content:flex-end;gap:12px;padding:4px 0 8px;border-bottom:1px solid var(--ar-stroke)}
#play .ar-hud-item{padding:0;display:flex;flex-direction:row;gap:4px;background:none;border-radius:0}
#play .ar-hud-item small,#play .ar-hud-item b{font-size:12px;color:inherit;letter-spacing:0}
#play .ar-hud-item small{color:var(--ar-muted)}
body.arena[data-mode=practice] #play .ar-hud-item:not(:last-child){display:none}
#play .ar-felt{--ar-felt:#303831;background:var(--ar-felt);color:#f3e8cf;max-width:552px;margin:12px auto 14px;border-radius:50% / 44%;box-shadow:inset 0 0 0 4px #272722,inset 0 0 0 7px #151713,inset 0 0 0 8px #907650;animation:none;transition:none;padding:12px 8px;text-align:center}
#play .ar-pre{position:relative;min-height:clamp(155px,43vw,212px);display:grid;align-content:center;gap:5px;padding:32px 0}
#play [hidden]{display:none!important}
#play .ar-seats,#play .ar-seats li{position:absolute;margin:0;padding:0}
#play .ar-seats{inset:0;pointer-events:none}
#play .ar-seats li{display:grid;place-items:center;transform:translate(-50%,-50%);min-width:clamp(30px,9.8vw,52px);min-height:20px;border-radius:5px;padding:1px 3px;background:#dbd0b9;color:#302c22;font-size:10px;font-weight:850;border:1px solid #ab9c82;white-space:nowrap}
#play .ar-seats li.is-fold{opacity:.77}
#play .ar-seats li.is-hero{background:#211e17;border-color:#ddbf81;color:#ffe5a9}
#play .ar-seats li:nth-child(1){left:23%;top:13%}#play .ar-seats li:nth-child(2){left:41%;top:7%}#play .ar-seats li:nth-child(3){left:59%;top:7%}#play .ar-seats li:nth-child(4){left:77%;top:13%}#play .ar-seats li:nth-child(5){left:91%;top:45%}#play .ar-seats li:nth-child(6){left:78%;top:84%}#play .ar-seats li:nth-child(7){left:56%;top:93%}#play .ar-seats li:nth-child(8){left:31%;top:92%}#play .ar-seats li:nth-child(9){left:9%;top:45%}
#play .ar-spot{display:flex;flex-direction:row;justify-content:center;gap:6px}
#play .ar-spot span{color:#efe5d2;font-size:11px}
#play .ar-spot span:first-child::after{content:' ·';color:#c0a16c}
#play .ar-cards{gap:5px;min-height:0;margin:0}
#play .ar-cards .game-card{width:clamp(36px,11vw,57px)!important;height:clamp(51px,15vw,80px)!important}
#play .ar-cards-board .game-card,#play .ar-cards-sm .game-card,#play .ar-choice-cards .game-card{width:clamp(28px,8vw,37px)!important;height:clamp(39px,11vw,52px)!important}
#play .ar-post{padding:10px clamp(3px,5vw,32px)}
#play .ar-kind{border:0;background:transparent;color:#f4d898;margin:0}
#play .ar-prompt{color:#f9f0de;font-size:14px;line-height:1.35}
#play .ar-row{margin:5px 0;gap:5px}
#play .ar-row small{color:#e8d7b8}
#play .ar-hero .ar-cards-sm .game-card{box-shadow:none}
#play .ar-actions{gap:8px}
#play .ar-act,#play .ar-next{min-width:0;min-height:48px;padding:8px 6px;border-radius:9px;box-shadow:none;transform:none;font-size:15px;line-height:1.2}
#play .ar-act{border:1px solid var(--ar-stroke);color:var(--ar-ink);background:transparent}
#play .ar-act-open,#play .ar-next{background:#2a2821;border:1px solid #9f8452;color:#fff5df}
#play .ar-act kbd{color:inherit}
#play .ar-act.is-best{outline-color:#819273}
#play .ar-act.is-wrong{outline-color:#b57464}
#play .ar-next{width:100%;font:inherit;font-weight:800;cursor:pointer}
#play .ar-actions button:focus-visible,#play .ar-next:focus-visible,#play .ar-play-head button:focus-visible,.ar-mode-practice:focus-visible{outline:2px solid #96743e;outline-offset:3px}
#play .ar-keys{color:var(--ar-muted);margin:8px 0 0}
#play .ar-flash{position:static;transform:none;display:grid;gap:4px;padding:9px 12px;margin:0 0 8px;border:1px solid var(--ar-stroke);border-radius:8px;background:var(--ar-paper);box-shadow:none;animation:none;text-align:left}
#play .ar-flash strong,#play .ar-flash small{font-size:13px;color:var(--ar-ink);line-height:1.4}
#play .ar-flash.is-bad{border-inline-start:3px solid #ac624e}
#play .ar-flash.is-ok{border-inline-start:3px solid #727e58}
#play .ar-flash.is-mixed{border-inline-start:3px solid #9f8452}
@media(pointer:coarse){#play .ar-keys,#play .ar-act kbd{display:none}}
