/* One stage and one deck pass between players; both totals stay visible. */
body{background:#0d1721}#study{max-width:1600px}#study>header{gap:14px;min-height:50px}#study>header .brand{font-size:27px}#battleScores{display:flex;gap:8px;margin-left:auto}#battleScores>div{display:flex;gap:8px;align-items:baseline;padding:7px 12px;border:1px solid #354858;border-radius:9px;min-width:115px;background:#172635}#battleScores small{font-size:9px;color:#b6c5ca;white-space:nowrap}#battleScores b{font-variant-numeric:tabular-nums;font-size:20px}#battleScores [data-active=true]{border-color:#9edbcb;background:#203b39;box-shadow:inset 0 -2px #a5f2ef}#study>header nav{margin-left:0}#study>header nav button{min-width:44px;min-height:44px}#battleTurn{display:flex;align-items:center;gap:14px;min-height:30px;padding:0 3px;font-size:13px;color:#d4e0dc}#turnTimer{font-size:20px;margin-left:auto;font-variant-numeric:tabular-nums;color:#dfff70}#turnDots{display:flex;gap:4px}#turnDots i{display:block;width:8px;height:8px;border-radius:3px;background:#304557}#turnDots [data-done=true]{background:#8dc7bf}#turnDots [data-current=true]{background:#dfff70;box-shadow:0 0 0 2px #dfff7020}.stage-area{box-shadow:0 10px 40px #0002}.hud{top:12px}.hud strong{font-size:27px}.hud>div:first-child>small{font-size:8px}.stage-caption{bottom:70px}.move-caption{max-width:100%}#linkCue{max-width:100%;font-size:11px}#pauseOverlay{pointer-events:none}#overlayTitle{text-align:center;max-width:90%;font-size:clamp(30px,6vw,75px);font-style:italic;color:#e6f8c4}#overlayNote{text-align:center;max-width:90%}.pad kbd{position:absolute;left:7px;top:5px;font-size:9px;line-height:1;color:#bacacb;opacity:.5}.pad .link-mark{left:auto;right:4px}#sound{cursor:pointer}.battle-dialog{color:#f6f1df;background:radial-gradient(ellipse at top left,#273c3e 0,transparent 60%),#142331;border:1px solid #405564;border-radius:22px;padding:26px;width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;box-shadow:0 25px 100px #0009}.battle-dialog::backdrop{background:#07131de8;backdrop-filter:blur(10px)}.battle-dialog h1{font-size:52px;letter-spacing:-2px;line-height:1;margin:12px 0;font-style:italic}.battle-dialog h2{font-size:30px;margin:10px 0 18px;letter-spacing:-.8px}.battle-dialog>p{font-size:13px;line-height:1.5;color:#baccce}.setup-kicker{font-size:9px;letter-spacing:2px;color:#b9d9cc;font-weight:750}.battle-roster{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}.roster-card{display:grid;grid-template-columns:56px 1fr;align-items:center;gap:8px;padding:14px;border:1px solid #496165;border-radius:13px;background:#172b35}.roster-card>b{grid-column:1/-1;font-size:10px;letter-spacing:1.6px;color:#dfff70}.roster-card img{width:52px;height:64px;object-fit:cover;object-position:center 30%;border-radius:7px}.roster-card button{grid-column:1/-1;min-height:44px;font-size:12px;border-color:#7d9a85;background:#253d3e;text-align:left}.roster-card small{grid-column:1/-1;font-size:10px;color:#afc2c8}.battle-dialog select{min-width:0;max-width:100%;width:100%;background:#203643;border:1px solid #4b636c;border-radius:8px;color:inherit;padding:8px;min-height:44px;font:inherit;font-size:13px}.battle-options{display:grid;grid-template-columns:1fr 1fr;gap:14px}.battle-options label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:#bbcecf}.rules{display:flex;flex-direction:column;gap:7px;border-left:2px solid #9ccebb;padding:0 12px;margin:22px 0;font-size:12px}.rules b{color:#edffcd}.rules span{color:#b9cece;line-height:1.5}.battle-dialog>button{width:100%;min-height:48px;margin-top:8px}.battle-dialog .primary{background:#dfff70;color:#172b29;border-color:#dfff70;font-size:16px;font-weight:800}.battle-dialog>small[role=status]{display:block;font-size:10px;line-height:1.4;color:#a6bfc1;text-align:center;margin-top:10px}.classic-link{display:block;text-align:center;font-size:11px;color:#b7cccf;margin-top:18px;text-decoration:none}.battle-dialog table{width:100%;border-collapse:collapse;margin:16px 0;font-size:13px}.battle-dialog th,.battle-dialog td{padding:12px 6px;border-bottom:1px solid #405561;text-align:right}.battle-dialog th:first-child,.battle-dialog td:first-child{text-align:left}.battle-dialog #resultTotals p{display:flex;justify-content:space-between;font-size:18px;color:#e7ffb3}.loadout-head{display:flex!important}.loadout-screen .loadout-head h1{color:#fff8e8}.loadout-screen .preview-variations{background:#223e3d;border-color:#a5d6c7}.loadout-screen .preview-caption>div{flex:1;min-width:0}.loadout-screen .preview-caption b{font-size:15px}.loadout-screen #loadoutConfirm{background:#dfff70;border-color:#dfff70;color:#172b29}.loadout-screen .loadout-preview{grid-row:2/4}.loadout-screen #loadoutTitle{font-style:normal}.loadout-screen #loadoutCanvas canvas{width:100%;height:100%}.loadout-screen .preview-caption{padding:6px 10px;gap:5px}.loadout-screen .preview-caption>button{padding:5px 8px}.loadout-screen #loadoutConfirm{font-size:14px}.loadout-screen .loadout-shell{min-height:0;height:calc(100dvh - 48px)}.loadout-screen .loadout-content{min-height:0;overflow-y:auto}.loadout-screen #loadoutRows{min-width:0}.loadout-screen .loadout-head{grid-row:1}.loadout-screen .loadout-actions{grid-row:3}.loadout-screen .preview-caption button{min-height:44px}.loadout-screen .preview-caption{height:62px}.loadout-screen #loadoutCanvas{bottom:62px}
@media(max-aspect-ratio:1/1){#study>header{gap:8px;min-height:44px}#study>header .brand{font-size:23px}#battleScores{gap:5px}#battleScores>div{min-width:0;display:flex;flex-direction:column;gap:0;padding:3px 8px}#battleScores small{font-size:7px}#battleScores b{font-size:17px}#study>header nav{gap:4px}#study>header nav button{min-width:40px;padding:5px;font-size:10px}#study>header nav button:after{inset:0}#battleTurn{font-size:11px;gap:7px;min-height:26px}#turnTimer{font-size:18px}#turnDots{gap:3px}#turnDots i{width:6px;height:6px}.play-layout{grid-template-rows:minmax(180px,1fr) 282px}.stage-caption{bottom:65px;left:10px;right:10px}.move-caption{max-width:100%}#linkCue{font-size:10px}#hint{font-size:9px}.pad kbd{display:none}.battle-dialog{padding:18px}.battle-dialog h1{font-size:42px}.roster-card{padding:10px;grid-template-columns:42px 1fr;gap:7px}.roster-card img{width:40px;height:50px}.battle-roster{gap:8px;margin:14px 0}.roster-card button{font-size:11px}.battle-dialog select{font-size:12px}.loadout-screen .loadout-shell{height:100dvh}.loadout-screen .loadout-content{flex:1}.loadout-screen .preview-caption b{font-size:13px}}
@media(max-height:460px) and (min-aspect-ratio:1/1){#study{gap:3px}#study>header{min-height:44px}#study>header .brand{font-size:23px}#battleScores>div{min-width:95px;padding:3px 8px}#battleScores b{font-size:17px}#battleScores small{font-size:8px}#battleTurn{min-height:22px;font-size:11px}#turnTimer{font-size:16px}.hud strong{font-size:21px}.hud{top:8px}.hud small{font-size:7px}#comboBox{padding:5px 7px}#combo{font-size:17px}.play-layout{grid-template-columns:minmax(0,1.3fr) minmax(265px,1fr);gap:7px}.deck{gap:2px}.deck-bottom{min-height:44px}#pads{gap:2px}.move-row>small{font-size:8px;line-height:9px}.pad{min-height:44px;border-radius:7px;gap:0;padding:2px}.pad svg{width:18px;height:18px}.pad span{font-size:9px}.pad kbd{display:none}.stage-caption{bottom:58px;left:8px;right:8px}.move-caption{max-width:100%}#current{font-size:9px;padding:3px 6px}#linkCue{font-size:9px}.hud strong{font-size:20px}.hud small{font-size:7px}#linkStat{font-size:8px}.battle-dialog{max-height:calc(100dvh - 16px);padding:14px 20px}.battle-dialog h1{font-size:32px;margin:6px 0}.battle-dialog>p{margin:5px 0;font-size:11px}.battle-dialog .battle-roster{margin:10px 0}.roster-card img{display:none}.roster-card{grid-template-columns:1fr;padding:8px;gap:4px}.roster-card small{display:none}.battle-dialog .rules{margin:10px 0}.loadout-screen .loadout-shell{height:calc(100dvh - 16px)}.loadout-screen .loadout-preview{grid-row:2/4}.loadout-screen .loadout-content{grid-row:2}.loadout-screen #loadoutCanvas{bottom:62px}}
@media(max-width:350px){#study>header .brand{font-size:20px}#battleScores>div{padding:3px 5px}#study>header nav button{min-width:36px;min-height:44px}#battleTurn{font-size:9px}.play-layout{grid-template-rows:minmax(170px,1fr) 272px}.pad span{font-size:9px}.roster-card{grid-template-columns:1fr}.roster-card img{display:none}}
/* Keep actual hit areas at44px, including the smallest landscape view. */
#study #stop,#study>header nav button{min-height:44px;min-width:44px}
@media(max-height:360px) and (orientation:landscape){.move-row>small{display:none}.move-row{border-top:1px solid color-mix(in srgb,var(--group) 45%,transparent);padding-top:1px}.deck-bottom{min-height:44px}#pads{gap:3px}.pad span{font-size:9px}}
@media(max-aspect-ratio:1/1){.play-layout{grid-template-rows:minmax(160px,1fr) 296px}}

.pad[data-link=landing]{border-color:#e7c69d;box-shadow:inset 0 -2px #e7c69d}
.pad[data-link=landing] .link-mark{display:block;color:#ffe0b9}
#linkCue{line-height:1.35;overflow-wrap:anywhere}
.judge-dialog{--player-one:#dfff70;--player-two:#a5f2ef;width:min(550px,calc(100vw - 24px));background:radial-gradient(ellipse at 14% 0%,#273a32,transparent 54%),#152230}
.judge-dialog h2{margin:8px 0 4px}
.judge-dialog>p{margin:0 0 14px}
.judge-rounds,.judge-actions{display:flex;gap:8px;margin:12px 0}
.judge-rounds button,.judge-actions button{min-height:44px;flex:1}
.judge-rounds button[aria-pressed=true]{background:#313e2c}
.judge-actions{position:sticky;bottom:-12px;background:#152230;padding:8px 0 0;margin-bottom:0}
.judge-player{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;padding:8px 12px;border-radius:9px;background:#213138;color:var(--player-one);font-weight:700}
.judge-player[data-player="1"]{color:var(--player-two);flex-direction:row-reverse}
.judge-player span{overflow-wrap:anywhere;font-size:13px}.judge-player b{font-size:22px;line-height:1;font-variant-numeric:tabular-nums}
.judge-players{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:4px}
.judge-row{border-bottom:1px solid #344955}
.judge-row summary{display:grid;grid-template-columns:60px 1fr 60px;align-items:center;gap:4px 6px;min-height:48px;padding:6px 2px;cursor:pointer;list-style:none}
.judge-row summary::-webkit-details-marker{display:none}
.judge-row summary:focus-visible,.arcade-receipt summary:focus-visible{outline:2px solid var(--lime);outline-offset:2px}
.judge-label{text-align:center;font-size:13px;font-weight:700}
.judge-label::after{content:'  ⌄';color:#b4c4cc}
.judge-row[open] .judge-label::after{content:'  ⌃'}
.judge-value{font-size:14px;font-variant-numeric:tabular-nums}.judge-value:nth-child(3){text-align:right}
.judge-row[data-winner="0"] .judge-value:first-child{color:var(--player-one)}
.judge-row[data-winner="1"] .judge-value:nth-child(3){color:var(--player-two)}
.judge-meter{grid-column:1/-1;height:3px;border-radius:3px;background:linear-gradient(to right,var(--player-one) 0 var(--split),transparent var(--split) calc(var(--split) + 2px),var(--player-two) calc(var(--split) + 2px));opacity:.78}
.judge-row[data-winner="tie"] .judge-meter{background:#728593}
.judge-why{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 2px 9px;color:#c9d8dd;font-size:12px;line-height:1.4}
.judge-why p{margin:2px 0}.judge-why b{display:block;color:#f6f1df;margin-bottom:2px}
.arcade-receipt{margin:6px 0;color:#b8cbd4;font-size:12px}.arcade-receipt summary{cursor:pointer;min-height:44px;padding:13px 0}
.judge-dialog #resultTotals p{margin:6px 0;font-size:13px}
@media(max-height:460px) and (orientation:landscape){.judge-dialog{width:min(600px,calc(100vw - 24px))}.judge-dialog h2{font-size:24px}.judge-dialog .judge-row summary{min-height:44px}}
/* Keep hit boxes still while a finger holds or slides between pads. */
#pads .pad:active{transform:none;filter:brightness(1.12)}

.judge-method{color:#bacbd1;font-size:11px;margin:8px 0 5px;text-align:center}
.judge-player b{white-space:nowrap;font-size:clamp(17px,5vw,22px)}
.judge-meter{position:relative}
.judge-meter::after{content:'';position:absolute;left:50%;top:-2px;width:1px;height:7px;background:#f6f1df;opacity:.65}
@media(max-width:360px){.judge-player{padding:8px}.judge-player span{font-size:12px}.judge-rounds{flex-wrap:wrap}.judge-rounds button{font-size:13px;padding:6px 8px}}
.judge-player,.judge-player[data-player="1"]{flex-direction:column;align-items:flex-start;gap:4px}
.judge-player[data-player="1"]{align-items:flex-end;text-align:right}
.judge-row summary,.arcade-receipt summary{-webkit-tap-highlight-color:transparent}
