/* Kaiju Breach touch controls and small-screen fixes (ours; kept by scripts/import-game.mjs). */
.tc{display:none}
.tc.show{display:block}
.tc,.tc *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.tc-zone{position:fixed;left:0;bottom:0;z-index:15;width:46vw;height:62vh;touch-action:none}
.tc-base{position:absolute;left:calc(env(safe-area-inset-left,0px) + 96px);top:calc(100% - 96px);width:120px;height:120px;margin:-60px 0 0 -60px;border:2px solid rgba(150,190,240,.35);border-radius:50%;background:rgba(7,12,20,.35);opacity:.55}
.tc-base.on{opacity:1}
.tc-knob{position:absolute;left:50%;top:50%;width:54px;height:54px;margin:-27px 0 0 -27px;border:2px solid rgba(232,238,246,.7);border-radius:50%;background:rgba(255,138,42,.55);box-shadow:0 0 18px rgba(255,138,42,.35)}

.tc-btn{position:fixed;z-index:16;display:grid;place-items:center;border:2px solid rgba(232,238,246,.55);border-radius:50%;background:rgba(7,12,20,.55);color:#e8eef6;font:700 11px/1 Orbitron,Rajdhani,'Arial Black',sans-serif;letter-spacing:.06em;touch-action:none;padding:0}
.tc-btn.on{background:rgba(255,138,42,.8);border-color:#ff8a2a;color:#04070b}
/* Diamond, anchored bottom-right: I top, J left, L right, K bottom. */
.tc-pad .tc-btn{width:66px;height:66px}
.tc-heavy{right:calc(env(safe-area-inset-right,0px) + 88px);bottom:150px}
.tc-jab{right:calc(env(safe-area-inset-right,0px) + 160px);bottom:84px}
.tc-kick{right:calc(env(safe-area-inset-right,0px) + 16px);bottom:84px}
.tc-special{right:calc(env(safe-area-inset-right,0px) + 88px);bottom:18px;border-color:rgba(63,232,255,.7)}
.tc-row{position:fixed;z-index:16}
.tc-small{width:52px;height:52px;font-size:9px;border-radius:16px}
.tc-grab{right:calc(env(safe-area-inset-right,0px) + 240px);bottom:120px}
.tc-super{right:calc(env(safe-area-inset-right,0px) + 16px);bottom:170px;border-color:rgba(255,200,69,.8)}
.tc-jump{right:calc(env(safe-area-inset-right,0px) + 240px);bottom:60px}
.tc-block{right:calc(env(safe-area-inset-right,0px) + 296px);bottom:90px}
.tc-dash{right:calc(env(safe-area-inset-right,0px) + 296px);bottom:30px}

.tc-turn{display:none}
@media (orientation:portrait){
  .tc-zone{width:50vw;height:45vh}
  .tc-base{left:96px;top:calc(100% - 110px)}
  .tc-pad .tc-btn{width:58px;height:58px;font-size:10px;letter-spacing:.02em}
  .tc-heavy{right:72px;bottom:150px}
  .tc-jab{right:134px;bottom:92px}
  .tc-kick{right:10px;bottom:92px}
  .tc-special{right:72px;bottom:34px}
  .tc-small{width:46px;height:46px}
  .tc-grab{right:12px;bottom:216px}
  .tc-super{right:64px;bottom:216px}
  .tc-jump{left:12px;bottom:216px;right:auto}
  .tc-block{left:64px;bottom:216px;right:auto}
  .tc-dash{left:116px;bottom:216px;right:auto}
  .tc-turn{position:fixed;left:50%;top:132px;z-index:14;display:flex;flex-direction:column;align-items:center;gap:2px;transform:translateX(-50%);padding:8px 14px;border:1px solid rgba(150,190,240,.25);background:rgba(7,12,20,.6);color:#e8eef6;font:600 13px/1.2 Rajdhani,system-ui,sans-serif;text-align:center;white-space:nowrap;pointer-events:none;animation:tc-fade 5s forwards}
  .tc-turn b{font:700 12px/1.2 Orbitron,sans-serif;letter-spacing:.08em}
}
@keyframes tc-fade{0%,70%{opacity:1}100%{opacity:0}}

/* Touch devices: the keyboard hints do not apply. */
.touch .menu-hint,.touch #hud .hint{display:none!important}
.touch #hud .training-tag::after{content:""}

/* Short screens (a phone held sideways): tighten the main menu so all of it fits. */
@media (max-height:500px){
  .menu-panel{top:50%;max-height:calc(100vh - 24px);width:min(400px,60vw)}
  .brand h1{font-size:clamp(30px,9vh,48px)}
  .brand p{margin:6px 0 12px;font-size:11px;letter-spacing:3px}
  nav button{padding-top:8px!important;padding-bottom:8px!important;margin-bottom:6px!important}
  nav button b{font-size:18px!important}
  nav button small{font-size:12px!important}
  .options{margin-top:6px!important}
  .menu-panel .footer{margin-top:8px!important}
}
@media (prefers-reduced-motion:reduce){.tc-turn{animation:none}}
