.device-choice{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px;border:1px solid #454a50;margin:0 auto 16px;max-width:420px;text-align:left}.device-choice legend{font-size:10px;letter-spacing:1px;padding:0 8px}.device-choice button{min-height:58px;background:#15191e;border:1px solid #50545a;padding:12px;color:#fff;font-weight:800;font-size:12px}.device-choice small{display:block;margin-top:5px;font-size:10px;color:#b9c0c7;font-weight:400}.device-choice [aria-pressed=true]{border-color:var(--gold);box-shadow:inset 0 0 0 1px var(--gold);color:var(--gold)}.setting-device{display:flex;align-items:center;gap:16px;justify-content:space-between}.setting-device strong{font-size:12px}.setting-device small{display:block;font-size:11px;color:#bbc1c5;margin-top:6px}.setting-device select{width:43%}.mobile-battle-actions{display:none}.touch-controls button.is-held{background:var(--gold)!important;color:#000;transform:scale(.95)}.rotate-notice{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:#080b11f7;text-align:center;padding:24px}.rotate-notice span{font-size:65px;color:var(--gold)}.rotate-notice p{font-size:14px;line-height:1.7;color:#c2c8cf}.rotate-notice h2{font-size:28px}.mobile-mode{min-width:0}.mobile-mode .splash-screen{min-height:calc(100svh - 66px)}.mobile-mode .touch-controls{display:flex}.mobile-mode .touch-controls,.mobile-mode .touch-controls button{touch-action:none;user-select:none;-webkit-user-select:none}.mobile-mode .touch-controls{position:absolute;bottom:max(8px,env(safe-area-inset-bottom));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));justify-content:space-between;flex-wrap:nowrap;pointer-events:none;padding:0;z-index:15;background:none;border:0}.mobile-mode .touch-controls button{pointer-events:auto;min-width:44px;min-height:44px;height:44px;font-size:9px;font-weight:800;border:1px solid #feaf0066;background:#111a24d9;border-radius:8px;padding:5px;color:white}.mobile-mode .touch-dpad{display:grid;grid-template-columns:repeat(3,44px);gap:5px;align-items:center}.mobile-mode .touch-dpad [data-key=KeyW]{grid-column:2;grid-row:1}.mobile-mode .touch-dpad [data-key=KeyA]{grid-column:1;grid-row:2}.mobile-mode .touch-dpad [data-key=KeyS]{grid-column:2;grid-row:2}.mobile-mode .touch-dpad [data-key=KeyD]{grid-column:3;grid-row:2}.mobile-mode .touch-attacks{display:grid;grid-template-columns:repeat(3,58px);gap:5px;align-items:end}.mobile-mode .touch-attacks button{width:58px}.mobile-mode .mobile-battle-actions{display:flex;position:absolute;right:max(10px,env(safe-area-inset-right));top:5px;z-index:22;gap:5px}.mobile-battle-actions button{height:38px;width:40px;background:#101820d9;border:1px solid #777;border-radius:6px;font-size:21px}.mobile-mode.playing{overflow:hidden;background:#000}.mobile-mode.playing>.topbar{display:none}.mobile-mode.playing #game-screen{position:fixed;inset:0;max-width:none;width:100%;height:100dvh;display:flex;align-items:center;justify-content:center;padding:0;background:#000}.mobile-mode.playing .game-toolbar,.mobile-mode.playing .battle-controls,.mobile-mode.playing .prototype-note{display:none}.mobile-mode.playing .battle-shell{position:relative;width:min(100vw,177.777778dvh);height:auto;aspect-ratio:16/9;border:0;flex:none}.mobile-mode.playing #game-canvas{width:100%;height:100%;display:block}.mobile-mode .hud{top:3%;left:5%;right:13%;grid-template-columns:1fr 48px 1fr;gap:12px}.mobile-mode .hud-avatar{display:none}.mobile-mode .hud-identity strong{font-size:12px}.mobile-mode .hud-identity span{font-size:7px}.mobile-mode .hud-identity{margin-bottom:3px;gap:6px}.mobile-mode .health-bar{height:10px}.mobile-mode .health-meta{font-size:7px;margin:3px 0}.mobile-mode .meter-bar{height:5px}.mobile-mode .meter-meta{font-size:6px}.mobile-mode .timer-hud strong{font-size:29px}.mobile-mode .timer-hud>span,.mobile-mode #fight-mode-small{font-size:7px}.mobile-mode .battle-corner{display:none}.mobile-mode .coop-hud{top:25%;font-size:8px;padding:5px}.mobile-mode .overlay-card{max-height:92%;overflow:auto;width:min(320px,85%);padding:12px}.mobile-mode .overlay-card h2{font-size:26px}.mobile-mode .overlay-card p{font-size:10px;margin:8px 0}.mobile-mode .overlay-card .fight-button{height:42px}.mobile-mode .combo-display{font-size:18px}.mobile-mode .battle-banner strong{font-size:38px}.mobile-mode .special-announcement{font-size:12px}
@media(orientation:landscape) and (max-height:520px){.mobile-mode .topbar{height:48px}.mobile-mode .splash-screen{min-height:calc(100svh - 48px);padding:8px 16px}.mobile-mode .splash-logo{max-height:62px}.mobile-mode .splash-content h1{font-size:32px;margin:0}.mobile-mode .splash-content .eyebrow,.mobile-mode .splash-footer,.mobile-mode .splash-tagline{display:none}.mobile-mode .device-choice{margin:6px auto;padding:8px}.mobile-mode .device-choice button{min-height:42px;padding:8px}.mobile-mode .device-choice small{margin-top:2px}.mobile-mode .splash-content>.fight-button{height:42px;margin:5px auto}.mobile-mode .input-hint{margin:5px;font-size:8px}.mobile-mode .main-menu{padding-top:16px}.mobile-mode .main-intro{display:none}.mobile-mode .mode-card{min-height:90px;padding:14px}.mobile-mode .main-menu .mode-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.mobile-mode .selection{padding:14px 3%}.mobile-mode .selection-heading{margin-bottom:12px}.mobile-mode .selection-heading h1{font-size:22px}.mobile-mode .game-overlay{z-index:30}.mobile-mode .touch-controls{bottom:5px}.mobile-mode .touch-dpad{grid-template-columns:repeat(3,42px)}.mobile-mode .touch-controls button{min-width:42px;min-height:42px;height:42px}.mobile-mode .touch-attacks{grid-template-columns:repeat(3,54px)}.mobile-mode .touch-attacks button{width:54px}.mobile-mode .battle-shell{max-height:100dvh}}
body:not(.mobile-mode) .touch-controls{display:none!important}

/* Continuous eight-way input: the center is neutral; roll a thumb through the
   corners for diagonals. Only the game controls reserve browser touch gestures. */
.mobile-mode {
  --pad-size: clamp(46px, 12dvh, 58px);
  --attack-size: clamp(50px, 12dvh, 60px);
}
.mobile-mode .touch-controls,
.mobile-mode .street-touch {
  gap: 16px;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  align-items: flex-end;
  z-index: 15;
}
.mobile-mode :is(.touch-dpad, .street-dpad, [data-dpad]) {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, var(--pad-size));
  grid-template-rows: repeat(3, var(--pad-size));
  gap: 4px;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 24px;
  background: radial-gradient(circle, #0a121bcc 0 41%, #111a245c 42% 67%, transparent 68%);
}
.mobile-mode :is(.touch-dpad, .street-dpad, [data-dpad])::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff55;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.mobile-mode :is(.touch-dpad, .street-dpad) [data-key='KeyW'] { grid-column: 2; grid-row: 1; }
.mobile-mode :is(.touch-dpad, .street-dpad) [data-key='KeyA'] { grid-column: 1; grid-row: 2; }
.mobile-mode :is(.touch-dpad, .street-dpad) [data-key='KeyD'] { grid-column: 3; grid-row: 2; }
.mobile-mode :is(.touch-dpad, .street-dpad) [data-key='KeyS'] { grid-column: 2; grid-row: 3; }
.mobile-mode :is(.touch-controls, .street-touch) button {
  height: var(--attack-size);
  min-height: 46px;
  min-width: 46px;
  border: 1px solid #ffb51c9c;
  border-radius: 12px;
  background: #101923df;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  box-shadow: 0 2px 10px #0006;
  padding: 6px 3px;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.mobile-mode :is(.touch-dpad, .street-dpad) button {
  width: var(--pad-size);
  height: var(--pad-size);
  font-size: 25px;
}
.mobile-mode .touch-attacks {
  display: grid;
  grid-template-columns: repeat(3, var(--attack-size));
  grid-template-rows: repeat(2, var(--attack-size));
  gap: 6px;
}
.mobile-mode .street-attacks {
  display: grid;
  grid-template-columns: repeat(4, var(--attack-size));
  grid-template-rows: repeat(2, var(--attack-size));
  gap: 6px;
}
.mobile-mode :is(.touch-attacks, .street-attacks) button { width: var(--attack-size); }
.mobile-mode :is(.touch-attacks, .street-attacks) [data-key='KeyL'] { font-size: 8px; }
.mobile-mode :is(.touch-controls, .street-touch) button.is-held {
  background: #feaf00 !important;
  color: #090d15;
  box-shadow: 0 0 14px #feaf0060;
}
.mobile-mode :is(.mobile-battle-actions, .street-actions) {
  top: max(6px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 22;
}
.mobile-mode :is(.mobile-battle-actions, .street-actions) button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  color: #fff;
}
.mobile-mode .game-overlay { z-index: 30; }
.mobile-mode :is(.hud, .street-hud) { right: max(112px, calc(env(safe-area-inset-right) + 106px)); }
.mobile-mode .rotate-notice { z-index: 1000; }
.mobile-mode.playing :is(.battle-shell, .street-stage) {
  width: min(100vw, 177.777778dvh);
  max-width: none;
  aspect-ratio: 16/9;
}
.mobile-mode :is(dialog, .overlay-card, .street-overlay > div) { overscroll-behavior: contain; }
.mobile-mode.playing :is(.app-toast, .street-toast) {
  bottom: calc(var(--pad-size) * 3 + 26px);
  max-width: 70%;
  padding: 10px 14px;
  font-size: 11px;
}
body:not(.mobile-mode) .street-touch { display: none !important; }
@media (orientation: landscape) and (max-height: 360px) {
  .mobile-mode { --pad-size: 46px; --attack-size: 46px; }
  .mobile-mode :is(.touch-controls, .street-touch) { bottom: max(5px, env(safe-area-inset-bottom)); }
  .mobile-mode .street-attacks { gap: 4px; }
  .mobile-mode :is(.touch-controls, .street-touch) button { font-size: 9px; }
  .mobile-mode :is(.touch-dpad, .street-dpad) button { font-size: 23px; }
}
