@media (max-width:700px){:is(.local-setup,.local-result){padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.local-setup .local-setup-layout{margin:24px auto;gap:24px}.local-setup .local-setup-layout .local-intro{order:2}:is(.local-setup,.local-result) .local-nav .nav-actions{flex-wrap:wrap;justify-content:flex-end;max-width:100%}.local-setup .local-intro h2{font-size:clamp(2.5rem,11vw,3.5rem)}.local-setup .setup-partner{height:clamp(220px,65vw,300px)}.local-setup .local-setup-panel{padding:clamp(16px,5vw,24px)}.local-setup .local-setup-panel h1{font-size:clamp(2.25rem,10vw,3rem);margin-bottom:20px}.local-setup .local-mode .choices{grid-template-columns:1fr}.local-setup .local-mode .choice-tile{justify-content:flex-start;padding:12px 16px;min-height:48px}.local-setup .local-checks{grid-template-columns:1fr}:is(.local-setup,.local-game) .local-slider>span{flex-wrap:wrap;gap:4px 12px}:is(.local-setup,.local-game) .local-slider input{min-height:44px;margin:6px 0}:is(.local-setup,.local-game) .local-checkbox{min-height:44px}.local-game{min-height:100svh;min-height:100dvh}.local-game .local-game-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:10px;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left))}.local-game .local-status{grid-area:1/1/2/-1;display:flex;flex-wrap:wrap;gap:4px 10px;width:fit-content;min-height:44px}.local-game .local-status strong{font-size:1.75rem}.local-game .local-status span{font-size:.75rem}.local-game .local-game-actions{grid-area:2/1/3/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,5.5rem),1fr));gap:6px}.local-game .local-game-actions button{font-size:.8125rem;line-height:1.3;padding:10px 6px;min-height:48px;gap:5px;overflow-wrap:normal;word-break:normal}.local-game .local-game-actions button>svg{display:block;width:16px;height:16px;flex:none}.local-game .local-opponent{left:0;top:max(150px,calc(138px + env(safe-area-inset-top)));width:76vw;height:calc(100dvh - 170px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:650px}.local-game .local-opponent:has(.scene-unavailable){position:relative;inset:auto;width:calc(100% - 24px);height:auto;max-height:none;margin:20px auto 0}.local-game .local-game-feedback{position:absolute;top:auto;right:max(12px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));width:min(68%,340px);max-width:calc(100% - 24px);margin:0}.local-game .local-game-feedback p{max-width:100%;font-size:.8125rem;line-height:1.45;padding:8px 10px;margin-top:8px}.local-game .local-verdict{font-size:1rem;padding:10px 12px}.local-game:not([data-phase=running]) .local-game-feedback{position:relative;inset:auto;width:auto;margin:0 12px}.local-game .local-preparation{width:calc(100% - 24px);margin:20px auto max(24px,env(safe-area-inset-bottom));padding:clamp(16px,5vw,24px)}.local-game .local-preparation h1{font-size:clamp(2rem,10vw,3rem)}.local-game .round-preparation-symbol{width:44px;height:44px;margin-bottom:16px}.local-game .preparation-stages{grid-template-columns:1fr;gap:8px;margin:20px 0}.local-game .local-preparation .local-actions button{flex:1 1 100%}.local-game .pause-round-facts{gap:24px;flex-wrap:wrap}.local-game .local-tuning-dialog{width:calc(100% - 24px);max-width:440px;margin:auto;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:0}.local-game .local-tuning-dialog header{position:static;background:var(--surface);margin:0;padding:12px 16px;border-bottom:1px solid var(--control-border)}.local-game .local-tuning-dialog header button{min-height:44px}.local-result>section{margin:28px auto}.local-result h1{font-size:clamp(2.5rem,12vw,4rem)}.local-result .round-outcomes{grid-template-columns:1fr;gap:20px}.local-result .round-outcomes>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 16px}.local-result .round-outcomes dd{grid-column:2;grid-row:1/3;margin:0}.local-result .round-outcomes>div>span{grid-column:1}.local-result .result-actions .button{min-width:0;width:100%;white-space:normal}.debug-shell{grid-template-columns:minmax(0,1fr)}.debug-shell .debug-stage{min-width:0;min-height:0}.debug-shell .debug-panel{min-width:0;padding:24px max(16px,env(safe-area-inset-right)) max(96px,calc(24px + env(safe-area-inset-bottom))) max(16px,env(safe-area-inset-left))}.head-hook-lab{height:100dvh;grid-template-rows:36dvh minmax(0,1fr)}.head-hook-lab .debug-stage{height:36dvh}.head-hook-lab .debug-panel{height:auto}.debug-shell .button{min-height:44px;min-width:0;white-space:normal;overflow-wrap:anywhere;gap:8px}.debug-shell .check-row,.debug-shell .hook-tuning summary{min-height:44px;font-size:.875rem;line-height:1.5}.debug-shell .hook-slider>span{flex-wrap:wrap}.debug-shell input[type=range]{min-height:44px}.debug-shell select{min-height:44px;font-size:1rem}}.local-game .local-tuning-dialog[open]{display:flex;flex-direction:column;overflow:hidden;padding:0}.local-game .local-tuning-dialog header{position:static;flex:none;margin:0;padding:24px 24px 8px;background:var(--surface);border-bottom:1px solid var(--control-border)}.local-game .local-tuning-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 24px 24px;scroll-padding-block:8px}@media (max-height:550px) and (orientation:landscape) and (max-width:1000px),(max-width:700px){.local-game .local-tuning-dialog header{padding:12px 16px}.local-game .local-tuning-body{padding:16px}.local-game[data-phase=running]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.local-game[data-phase=running] .local-game-top{grid-area:1/1}.local-game[data-phase=running] .local-opponent{position:relative;grid-area:2/1;top:auto;height:auto;min-height:min(180px,max(100px,calc(100dvh - 6rem)));align-self:stretch}.local-game[data-phase=running] .local-game-feedback{position:relative;grid-area:2/1;inset:auto;align-self:end;justify-self:end;margin:8px max(12px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}}@media (max-width:360px) and (max-height:650px) and (orientation:portrait){.local-game[data-phase=running] .local-game-feedback{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;width:auto;min-width:0;justify-self:stretch}.local-game[data-phase=running] .local-game-feedback .local-verdict{grid-area:1/1;align-self:start}.local-game[data-phase=running] .local-game-feedback p{grid-column:1/-1;margin:0}.local-game[data-phase=running] .local-game-feedback:has(.local-verdict)>p:not(.local-tracking-warning){grid-area:1/2;align-self:center}}@media (max-height:550px) and (orientation:landscape) and (max-width:1000px){.local-game .local-game-top{display:flex;align-items:flex-start;gap:8px;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))}.local-game .local-status{display:grid;gap:2px;padding:8px 10px;flex:none}.local-game .local-status strong{font-size:1.5rem}.local-game .local-game-actions{position:static;display:flex;width:auto;max-width:none;flex-wrap:wrap;gap:6px;margin-left:auto}.local-game .local-game-actions button{min-height:44px;font-size:.8125rem;padding:8px}.local-game .local-opponent{top:82px;left:max(0px,env(safe-area-inset-left));width:45vw;height:calc(100dvh - 90px)}.local-game .local-opponent:has(.scene-unavailable){position:relative;inset:auto;width:min(600px,calc(100% - 24px));height:auto;max-height:none;margin:12px auto 0}.local-game .local-game-feedback{top:auto;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:46%;max-width:46%}.local-game .local-preparation{margin:12px auto 24px;padding:20px}.local-game .local-tuning-dialog{max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));margin:auto}.head-hook-lab{height:100dvh;grid-template-columns:minmax(0,1fr) minmax(280px,45%);grid-template-rows:1fr;overflow:hidden}.head-hook-lab .debug-stage{height:100dvh;min-height:0}.head-hook-lab .debug-panel{height:100dvh;overflow-y:auto;padding-top:max(16px,env(safe-area-inset-top))}}.debug-shell .debug-panel .button,.debug-shell .hook-phase-buttons .button{font-size:.875rem}@media (max-width:700px){.debug-shell .attack-controls{grid-template-columns:minmax(0,1fr)}.debug-shell .attack-controls label{font-size:1rem;line-height:1.5}}.debug-shell .debug-panel h1{font-size:1.625rem;line-height:1.25}.debug-shell .control-note,.debug-shell .hook-legend,.debug-shell .hook-slider{font-size:.875rem}.debug-shell .hook-phase-buttons{grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr))}.debug-shell .hook-phase-buttons .button{overflow-wrap:normal}.debug-shell .hook-side .button{flex-basis:6rem;overflow-wrap:normal}@media (max-width:700px){.debug-shell:not(.head-hook-lab){height:100dvh;min-height:0;grid-template-rows:36dvh minmax(0,1fr);overflow:hidden}.debug-shell:not(.head-hook-lab) .debug-stage{height:36dvh;min-height:0}.debug-shell:not(.head-hook-lab) .debug-panel{height:auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}}@media (max-height:550px) and (orientation:landscape) and (max-width:1000px){.debug-shell,.debug-shell:not(.head-hook-lab){height:100dvh;min-height:0;grid-template-columns:minmax(0,1fr) minmax(280px,45%);grid-template-rows:1fr;overflow:hidden}.debug-shell .debug-stage,.debug-shell:not(.head-hook-lab) .debug-stage{height:100dvh;min-height:0}.debug-shell .debug-panel,.debug-shell:not(.head-hook-lab) .debug-panel{height:100dvh;min-height:0;overflow-y:auto;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(96px,calc(24px + env(safe-area-inset-bottom))) max(16px,env(safe-area-inset-left))}}