/* The keyboard remains bottom-anchored; only the arena/HUD layout changes. */
.game-shell { grid-template-rows:40px minmax(0,1fr) 26px 58px auto; }
body[data-keyboard=native] .game-shell { grid-template-rows:40px minmax(0,1fr) 26px 64px; }
.topbar { border:0; }
.top-actions { gap:6px; }
.icon-button { width:27px;height:27px;font-size:14px; }
.icon-button svg { width:16px;height:16px;vertical-align:middle; }
.brand { font-size:13px; }
.brand small { font-size:6px;margin-top:4px; }
.brand-icon { width:26px;height:27px;font-size:22px; }
.arena { margin:0;border:0;border-radius:0;background:#d6d1ba; }
.arena canvas { image-rendering:pixelated; }
.arena .hud { position:absolute;left:0;right:0;top:0;margin:0;z-index:3;padding:12px 14px 24px;grid-template-columns:1fr 62px 1fr;gap:10px;background:linear-gradient(#1b292b9c,#1b292b35 70%,transparent);color:#fff;pointer-events:none; }
.hud .fighter-name { margin-bottom:6px;font-size:9px; }
.hud .fighter-name span { color:#ffffffa6;font-size:9px; }
.health-track { height:8px;background:#101d2b61; }
.health-fill { background:#c2e97d;box-shadow:0 0 8px #bded6d55; }
.cpu .health-fill { background:#c2a5f3;box-shadow:0 0 8px #b59afc55; }
.timer strong { font-size:25px;text-shadow:0 1px 4px #0005; }
.timer span { font-size:5px;letter-spacing:.7px; }
.arena-heading { top:64px;left:14px;right:14px;font-size:6px;letter-spacing:1.3px;color:#3441398a; }
.live-dot { display:none; }
.arena-bottom { z-index:2;bottom:9px; }
.arena-bottom>span { background:#172a2d9c;border:1px solid #f2efde26;color:#f1f4e8;font-size:8px;padding:4px 6px;backdrop-filter:blur(3px); }
.arena-bottom>span:nth-child(2) { background:#f4f0dbab;color:#34443e;font-size:8px;border:0; }
.announcement { top:25%;color:#f7f9de;font-size:32px;font-style:italic;font-family:'Space Grotesk','Noto Sans JP',sans-serif;font-weight:900;letter-spacing:3px;text-shadow:2px 3px 0 #23302ca6,0 0 22px #e6fa9c66;z-index:4; }
.announcement[data-kind=ko] { font-size:52px;letter-spacing:6px;top:30%;color:#e9f9b0;text-shadow:3px 4px 0 #23302c,0 0 26px #e2ff8f; }
.announcement[data-kind=timeup] { font-size:30px;letter-spacing:3px;top:30%;color:#ecedef;text-shadow:2px 3px 0 #23302c; }
#screen-impact { position:absolute;inset:0;z-index:2;pointer-events:none;background:radial-gradient(ellipse at 50% 50%,#fff6c78a,transparent 70%);opacity:0; }
.battle-note { color:#66715c; }
.range-hint { position:absolute;bottom:39px;left:50%;transform:translateX(-50%);z-index:3;padding:4px 8px;background:#1b2d2acb;color:#e9efce;border-bottom:2px solid #c2e97d;font-size:10px;white-space:nowrap;pointer-events:none; }
.range-hint[data-reach=no] { border-color:#e49b82;color:#f4c6b3; }
.counter-prompt { position:absolute;top:88px;left:50%;transform:translateX(-50%);z-index:4;background:#173b40e8;color:#b5ffff;min-width:172px;padding:8px 10px;font-size:11px;pointer-events:none; }
.counter-prompt>span { float:right;font-variant-numeric:tabular-nums; }
.counter-prompt i { display:block;height:3px;background:#173138;margin-top:5px; }.counter-prompt i b { display:block;height:100%;background:#8ff8f0; }
.counter-prompt[data-side=cpu] { color:#edd2ff;background:#352941e8; }
.triangle-rule { font-size:11px;font-weight:700;letter-spacing:.4px;margin:12px 0 0;color:#536539; }
.practice-controls { display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px;margin:12px 0 16px; }
.practice-controls select { font:inherit;padding:8px;border:1px solid #bdc4b0;border-radius:3px;background:#fafbf5;color:#253025; }
.asset-loading { margin-top:14px; }
.asset-loading>span { display:block;font-size:9px;color:#7d876e;line-height:1.6; }
.asset-loading progress { appearance:none;width:100%;height:3px;border:0;background:#dde2d1;margin-top:7px;display:block; }
.asset-loading progress::-webkit-progress-bar { background:#dde2d1; }
.asset-loading progress::-webkit-progress-value { background:#8fac54;transition:width .1s; }
.asset-loading progress::-moz-progress-bar { background:#8fac54; }
.asset-loading .secondary-button { margin-top:10px; }
.primary-button:disabled,.secondary-button:disabled { opacity:.4;cursor:wait; }
.settings-tabs { display:flex;border-bottom:1px solid #c6ceba;gap:5px;margin-top:16px; }
.settings-tabs button { border:0;background:none;flex:1;padding:10px 3px;font-size:12px;color:#78836a; }
.settings-tabs button[aria-pressed=true] { border-bottom:2px solid #7e984f;color:#283126;font-weight:700; }
.mute-setting { display:flex;gap:8px;align-items:center;font-size:11px;margin:18px 0; }
.mute-setting input { accent-color:#799748; }
@media(max-height:730px) { .game-shell { grid-template-rows:36px minmax(0,1fr) 24px 52px auto; } body[data-keyboard=native] .game-shell { grid-template-rows:36px minmax(0,1fr) 24px 58px; }.arena .hud{padding-top:9px}.arena-heading{top:57px} }
@media(max-height:500px) { .game-shell { grid-template-rows:32px minmax(0,1fr) 18px 46px auto; } body[data-keyboard=native] .game-shell { grid-template-rows:32px minmax(0,1fr) 20px 54px; }.arena .hud{padding:6px 10px 16px}.arena-heading{display:none}.timer strong{font-size:22px}.announcement{font-size:24px} }

/* Combat feedback stays inside the stage; keyboard geometry is independent. */
.guard-caption { display:flex;justify-content:space-between;margin:6px 1px 3px;font-size:6px;letter-spacing:1px;color:#dce3ddbd; }
.guard-caption span:last-child { font-variant-numeric:tabular-nums;letter-spacing:0; }
.guard-track { height:3px;background:#14252bad;overflow:hidden; }
.guard-fill { height:100%;width:100%;background:#a5dbe0;transition:width .12s linear; }
.cpu .guard-fill { margin-left:auto; }
.guard-track[data-level=danger] .guard-fill { background:#ffc177;box-shadow:0 0 7px #ffba7299; }
.guard-track[data-level=broken] { background:#e87d5844; }
.arena-heading { top:82px;letter-spacing:.8px; }
#cpu-intent { color:#e5dfef;background:#26312d80;padding:3px 5px;margin-top:-3px;letter-spacing:0;font-size:8px; }
.counter-prompt { top:108px;min-width:185px;border-left:2px solid #8ff8f0; }
.counter-prompt[data-side=cpu] { border-color:#d5b1f3; }
.buffer-prompt { position:absolute;left:50%;bottom:64px;transform:translateX(-50%);padding:5px 9px;color:#edffd0;background:#253f29e8;border:1px solid #bce97455;font-size:10px;white-space:nowrap;pointer-events:none;z-index:3; }
.input-wrap { position:relative; }
.action-timing { position:absolute;left:0;right:0;bottom:-2px;height:2px;pointer-events:none; }
.action-timing i { display:block;height:100%;width:0;background:#bb9ce1; }
.action-timing[data-phase=stun] i { background:#dc9978; }
.action-timing.buffer-ready i { background:#b6e86e;box-shadow:0 0 6px #b6e86e; }
.announcement { font-size:clamp(22px,6vw,32px); }
@media(max-height:730px) { .arena-heading{top:76px}.counter-prompt{top:98px;padding:6px 8px} }
@media(max-height:500px) { .guard-caption{margin-top:4px}.arena-heading{display:none}.counter-prompt{top:83px;padding:4px 7px;font-size:9px}.buffer-prompt{bottom:50px} }

/* Quiet presentation: the dojo carries the title; the fight carries the HUD. */
:root { --paper:#19201f;--ink:#eef0df;--muted:#9ca79e;--line:#35403a; }
body { background:#101615;color:var(--ink); }
.game-shell { position:relative;background:#19201f;grid-template-rows:40px minmax(0,1fr) 58px auto; }
body[data-keyboard=native] .game-shell { grid-template-rows:40px minmax(0,1fr) 64px; }
.sr-only { position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important; }
.brand { color:#dce3d5;font-size:10px;letter-spacing:1.2px; }
.brand>span:last-child { display:none; }.brand-icon { background:transparent;font-size:20px; }
.topbar { background:#151d1b; }.icon-button { color:#bcc9bc;border-color:#465248; }
.composer { color:#eff2e4; }.input-wrap { border-color:#68765d;justify-content:center;padding-bottom:3px; }
.placeholder,#native-input::placeholder { color:#a1ac99; }.input-caret { background:#c2df91; }
#native-input { color:#eff2e4; }.confirm { border-color:#84946d;color:#e5eddb;background:#303e2b;box-shadow:none; }
.timer span { display:none; }.guard-caption { margin:0; }.guard-track { margin-top:7px; }
.arena .hud { padding-bottom:20px; }.fighter-name { color:#e7edde; }
.counter-prompt { top:80px;min-width:82px;text-align:center;padding:6px 9px;background:#183936b3;border:0;border-radius:2px; }
.counter-prompt strong { font-size:11px;font-weight:500;letter-spacing:2px; }.counter-prompt i { margin-top:5px;height:2px; }
.counter-prompt[data-side=cpu] { border:0;background:#352941b3; }
.buffer-prompt { bottom:12px;font-size:10px;padding:4px 8px;border:0;background:#1c3027b3;color:#d9eac1; }
.announcement { pointer-events:none;top:32%;font-size:24px; }
.announcement[data-kind=ko] { top:30%; }
dialog:not(#menu) { background:#1b2420;color:#edf1e2;border-color:#576250;box-shadow:0 18px 80px #0006; }
dialog:not(#menu) p { color:#b4bcae; }dialog:not(#menu) h2 { font-family:'Hiragino Mincho ProN','Yu Mincho',serif;font-weight:600;letter-spacing:2px; }
.command-list { border-color:#47503f; }.command-list>div { border-color:#384333; }.command-list span { color:#b6c0ac; }.command-list b{color:#e8eddf;}
.primary-button { background:#c1d798;color:#17221b;border-color:#c1d798;box-shadow:none; }
.secondary-button { color:#e5ecdf;border-color:#68745f; }.secondary-button>span{color:#b3bea7;}
.text-button { color:#c0cbb7; }.settings-tabs { border-color:#536147; }.settings-tabs button { color:#9fae94; }.settings-tabs button[aria-pressed=true]{color:#daebbd;border-color:#b8d488;}
.setting-row select,.practice-controls select { color:#e0e9d8;background:#283326;border-color:#5b6a4d; }
.settings-footnote { color:#9caa93; }.range-setting output{color:#dbe7ce;}.mode-option{color:#dfe7d6;}.mode-option small{color:#aab69d;}
body[data-screen=title] .game-shell { display:block; }
body[data-screen=title] .arena { position:absolute;inset:0;width:100%;height:100%; }
body[data-screen=title] .topbar,body[data-screen=title] .hud,body[data-screen=title] .composer,body[data-screen=title] #keyboard-dock,body[data-screen=title] #announcement,body[data-screen=title] #counter-prompt,body[data-screen=title] #buffer-prompt { display:none!important; }
#menu { position:fixed;inset:0;margin:0 auto;width:100%;max-width:480px;height:100dvh;max-height:none;border:0;border-radius:0;padding:0;box-shadow:none;color:#f0eddd;background:linear-gradient(180deg,#0b1414c9 0%,#101b1c35 36%,#0c161626 52%,#0e1919e8 78%,#0b1414 100%);overflow:auto; }
#menu[open] { display:flex;flex-direction:column;justify-content:space-between; }
#menu::backdrop { background:transparent;backdrop-filter:none; }
.title-logo { display:flex;align-items:flex-start;gap:18px;padding:calc(env(safe-area-inset-top) + 10vh) 9% 0; }
.title-logo h1 { margin:0;font-family:'Hiragino Mincho ProN','Yu Mincho','Noto Serif CJK JP',serif;font-size:clamp(42px,12.2vw,61px);font-weight:800;letter-spacing:5px;line-height:1.15;text-shadow:0 3px 20px #05101099; }
.title-seal { display:grid;place-items:center;width:28px;height:32px;margin-top:4px;border:1px solid #b8664e;color:#d38b6c;font-family:serif;font-size:19px; }
.title-actions { padding:24px 11% calc(env(safe-area-inset-bottom) + 6vh); }
#menu .primary-button,#menu .secondary-button { justify-content:center;letter-spacing:5px;font-size:16px;border-radius:1px;padding:16px 10px;font-weight:500; }
#menu .primary-button { background:#c4d399;color:#172720;border-color:#c4d399;margin:0 0 12px; }
#menu .secondary-button { background:#15262480;color:#e0e5d3;border-color:#8b9b7d73;margin:0; }
.title-links { display:flex;justify-content:center;gap:0;margin-top:22px; }
.title-links button { border:0;background:transparent;color:#b7c3ad;font-size:12px;letter-spacing:2px;padding:5px 22px; }.title-links button+button{border-left:1px solid #61715766;}
#menu .asset-loading { margin:0 0 20px; }.asset-loading>span{color:#c2cab6;text-align:center;}.asset-loading progress{background:#41503b;}
@media(max-height:730px){.game-shell{grid-template-rows:36px minmax(0,1fr) 52px auto;}body[data-keyboard=native] .game-shell{grid-template-rows:36px minmax(0,1fr) 58px;}.title-logo{padding-top:calc(env(safe-area-inset-top) + 8vh);}.title-actions{padding-bottom:calc(env(safe-area-inset-bottom) + 4vh);}.counter-prompt{top:73px;}}
@media(max-height:500px){.game-shell{grid-template-rows:32px minmax(0,1fr) 46px auto;}body[data-keyboard=native] .game-shell{grid-template-rows:32px minmax(0,1fr) 54px;}.title-logo{padding-top:20px;}.title-logo h1{font-size:36px;}.title-actions{padding-top:10px;padding-bottom:18px;}#menu .primary-button,#menu .secondary-button{padding:10px;}.title-links{margin-top:10px;}.counter-prompt{top:62px;}}

.native-description { background:#263321;border-color:#91a970; }.mode-option small { color:#aab69d; }
@media(min-width:600px){body[data-screen=title] .game-shell{height:100dvh;}}

body[data-screen=title] .game-shell { height:100dvh; }

#help-menu { max-width:480px; }
.guide-table-wrap { width:100%; }
.guide-table { width:100%;border-collapse:collapse;text-align:left;table-layout:fixed;font-size:11px;line-height:1.6; }
.guide-table th,.guide-table td { padding:10px 5px;border-bottom:1px solid #43503d;vertical-align:top;overflow-wrap:anywhere; }
.guide-table thead th { font-size:10px;font-weight:500;color:#aebba2; }
.guide-table th:first-child { width:34%;padding-left:0; }.guide-table th:nth-child(2) { width:12%; }
.guide-table tbody th { font-weight:500; }.guide-table td:last-child { color:#c6cfbd;padding-right:0; }
.guide-word { display:block;font-size:12px;word-break:keep-all;overflow-wrap:normal; }
.guide-kind { display:block;font-size:9px;font-weight:400;letter-spacing:.5px;margin-bottom:3px; }
.guide-kind[data-kind=strike] { color:#cf9380; }.guide-kind[data-kind=throw] { color:#c6aa69; }.guide-kind[data-kind=parry] { color:#82b7bf; }.guide-kind[data-kind=move] { color:#a1b88b; }
.guide-damage { color:#e3ead9;font-variant-numeric:tabular-nums; }
#guide-notes p { font-size:10px;line-height:1.7; }
@media(max-width:350px){#help-menu{padding:16px}.guide-word{font-size:11px}.guide-table{font-size:10px}.guide-table th:first-child{width:35%}.guide-table th:nth-child(2){width:11%}}

#menu #online-start{margin-bottom:12px}
.online-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.online-heading h2{font-size:25px;margin:8px 0 16px}.online-heading>span{font:11px monospace;letter-spacing:1px;color:#c7d8a9}
#online-status{min-height:42px}.online-caption{font-size:10px!important;line-height:1.7!important}.online-error{color:#f0ae92!important;min-height:1.4em}
.online-seats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.online-seat{display:flex;flex-direction:column;gap:8px;border:1px solid #536348;padding:14px 10px;min-width:0}.online-seat strong{font-size:12px}.online-seat span{font-size:10px;color:#b9c8ac}
.invite-label{display:block;font-size:10px;color:#b9c8ac;margin-bottom:6px}.invite-row{display:flex;gap:6px}.invite-row input{min-width:0;flex:1;border:1px solid #536348;border-radius:2px;background:#111b16;color:#d6e4c7;font-size:11px;padding:10px 8px}.invite-row button{border:1px solid #68745f;background:transparent;color:#dfebd4;font-size:11px;padding:8px}
.network-status{position:absolute;bottom:10px;left:10px;right:10px;text-align:center;font-size:10px;line-height:1.6;color:#d5e5c6;text-shadow:0 1px 3px #000;background:#142119b3;border-radius:2px;z-index:4;pointer-events:none;padding:4px 7px}.network-status[hidden]{display:none}.network-status:not(:empty)~.buffer-prompt{bottom:48px}
#online-result{border-top:1px solid #4b5c40;padding-top:12px;color:#d7e7bc!important}
body[data-screen=title] #network-status{display:none}

.replay-controls{border-top:1px solid #536348;padding:4px 0 0;min-width:0}.replay-controls[hidden]{display:none}.replay-buttons{display:flex;align-items:center;gap:5px}.replay-buttons button,.replay-buttons select{border:1px solid #526247;background:#202e23;color:#e7efd9;border-radius:2px;font-size:10px;padding:5px 7px;min-height:28px}.replay-buttons output{flex:1;text-align:center;font:10px monospace;letter-spacing:0}.replay-buttons output:after{display:none}#replay-seek{display:block;width:100%;height:12px;margin:2px 0;accent-color:#c1d798;touch-action:pan-x}
body[data-replay=true] .game-shell{grid-template-rows:40px minmax(130px,1fr) 48px 50px auto}body[data-replay=true] #keyboard-dock{pointer-events:none}body[data-replay=true] #action-timing{opacity:.5}body[data-replay=true] .native-key.replay-pressed{background:#b9dc90!important;color:#182c1e!important;box-shadow:0 0 0 2px #e0f1bf88;opacity:1!important;transform:translateY(1px)}body[data-replay=true] #replay-controls{display:block}body[data-replay=true] .network-status{font-size:9px}#announcement[data-kind=normal]{letter-spacing:3px}
@media(max-height:730px){body[data-replay=true] .game-shell{grid-template-rows:36px minmax(100px,1fr) 46px 44px auto}}

#timer[data-state=warning]{color:#f0c477;text-shadow:0 0 12px #d9a35455}
#timer[data-state=final]{color:#ffac91;text-shadow:0 0 14px #e96f4266}
#announcement[data-kind=timer]{font-size:22px;color:#ffe2a8;letter-spacing:2px}

.composer{position:relative}.input-error{position:absolute;bottom:100%;left:0;right:0;z-index:12;margin:0 0 5px;padding:10px 12px;border:1px solid #cf725d;border-radius:3px;background:#351d19f5;color:#ffd4bd;font-size:12px;line-height:1.5}.input-error[hidden]{display:none}
#command-input{overflow-x:auto;text-overflow:clip;scrollbar-width:none;white-space:nowrap}.candidate[data-special=true]{border-color:#d8b278}body[data-special]:not([data-special=none]) .arena{box-shadow:inset 0 0 55px #0c120daa}#announcement[data-kind=special]{white-space:pre-line;top:18%;padding:10px 16px;color:#fff0bc;font-size:clamp(12px,3.9vw,19px);line-height:1.5;letter-spacing:.6px;text-shadow:0 2px 8px #000,0 0 18px #eea94099;background:linear-gradient(90deg,transparent,#192019d9 16%,#192019d9 84%,transparent)}#announcement[data-kind=special-impact]{top:24%;font-size:clamp(25px,7vw,38px);color:#ffdfa3;text-shadow:0 3px 0 #674128,0 0 18px #cc6d37;letter-spacing:3px}.guide-word{word-break:normal;overflow-wrap:anywhere}
