/* ==========================================================================
   PIKO — META-CARTRIDGE 2D ACTION PLATFORMER STYLES
   ========================================================================== */

:root {
  --bg-void: #0B0914;
  --bg-card: rgba(18, 16, 32, 0.92);
  --bg-panel: rgba(29, 25, 52, 0.88);
  --piko-green: #2EE65B;
  --piko-liquid: #00F0FF;
  --maass-gold: #FFBE0B;
  --maass-orange: #FF6B35;
  --glitch-magenta: #FF0055;
  --glitch-cyan: #00F5D4;
  --text-light: #F8FAFC;
  --text-muted: #94A3B8;
  --border-pixel: #38BDF8;
  --font-display: 'Fredoka', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-void);
  color: var(--text-light);
  font-family: var(--font-sans);
}

#app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #18142c 0%, #07060d 100%);
  overflow: hidden;
}

#game-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0B0914;
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.15);
}

/* CRT Scanline Overlay */
.crt-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.18) 50%),
    radial-gradient(circle at center, transparent 65%, rgba(5, 4, 10, 0.55) 100%);
  background-size: 100% 4px, 100% 100%;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   TOP IN-GAME HUD
   ========================================================================== */
.hud-layer {
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  z-index: 15;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.hud-left {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(11, 9, 20, 0.85);
  border: 2px solid rgba(46, 230, 91, 0.65);
  border-radius: 12px;
  padding: 8px 12px;
  min-width: 245px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.65), 0 0 16px rgba(46, 230, 91, 0.15);
  backdrop-filter: blur(6px);
}

.player-card.liquid-active {
  border-color: var(--piko-liquid);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 240, 255, 0.4);
}

.p2-card {
  border-color: rgba(255, 190, 11, 0.8);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.65), 0 0 16px rgba(255, 190, 11, 0.2);
}

.avatar-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
}

.piko-badge {
  background: radial-gradient(circle at 35% 30%, #70ff94, #1eb946 70%, #0d6e28);
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(46, 230, 91, 0.6);
}

.piko-badge.is-liquid {
  background: radial-gradient(circle at 35% 30%, #a5f3fc, #00f0ff 65%, #0284c7);
  border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.85);
}

.maass-badge {
  background: radial-gradient(circle at 50% 50%, #fde047 45%, #f97316 48%, #fbbf24 72%);
  border: 2px solid #fffbeb;
  box-shadow: 0 0 10px rgba(255, 190, 11, 0.6);
}

.state-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  background: #0f172a;
  color: var(--piko-green);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid currentColor;
  transform: translateY(4px);
}

.maass-tag {
  color: var(--maass-gold);
}

.player-stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.player-name {
  color: var(--piko-green);
  letter-spacing: 0.5px;
}

.maass-name {
  color: var(--maass-gold);
}

.hp-Readout {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e2e8f0;
}

.hp-bar-outer {
  position: relative;
  width: 100%;
  height: 11px;
  background: #1e293b;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hp-bar-fill {
  height: 100%;
  transition: width 0.15s ease-out, background 0.2s ease;
}

.p1-hp-fill {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}

.p1-hp-fill.liquid-hp {
  background: linear-gradient(90deg, #0284c7, #00f0ff);
}

.p2-hp-fill {
  background: linear-gradient(90deg, #ea580c, #facc15);
}

.hp-cap-marker {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 0, 85, 0.45),
    rgba(255, 0, 85, 0.45) 4px,
    rgba(15, 23, 42, 0.75) 4px,
    rgba(15, 23, 42, 0.75) 8px
  );
  border-left: 2px solid var(--glitch-magenta);
}

.sub-ability-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.ability-pill {
  color: #38bdf8;
  font-weight: 700;
}

.maass-pill {
  color: #fbbf24;
}

.score-pill {
  color: #facc15;
  font-weight: 800;
}

/* Center Boss & Stage HUD */
.hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 440px;
}

.level-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 5px 14px;
  border-radius: 999px;
  color: #f8fafc;
  text-transform: uppercase;
}

.boss-hud {
  width: 100%;
  background: rgba(20, 6, 18, 0.9);
  border: 2px solid var(--glitch-magenta);
  border-radius: 10px;
  padding: 6px 12px;
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.45);
}

.boss-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #fda4af;
  margin-bottom: 4px;
}

.boss-bar-outer {
  width: 100%;
  height: 12px;
  background: #1f0916;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 0, 85, 0.4);
}

.boss-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #be123c, #ff0055, #fb7185);
  transition: width 0.12s ease-out;
}

.hud-right {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s, border-color 0.15s;
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--piko-liquid);
}

/* ==========================================================================
   CINEMATIC & STORY TOAST BARS
   ========================================================================== */
.cinematic-layer {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.cinematic-top-strip {
  background: linear-gradient(180deg, rgba(5, 4, 12, 0.96) 0%, rgba(5, 4, 12, 0.7) 80%, transparent 100%);
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
}

.cartridge-status {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--glitch-cyan);
  letter-spacing: 1.2px;
}

.cinematic-bottom-strip {
  background: linear-gradient(0deg, rgba(5, 4, 12, 0.96) 0%, rgba(5, 4, 12, 0.88) 78%, transparent 100%);
  padding: 26px 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.dialogue-speaker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--maass-gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.dialogue-text {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.4;
  max-width: 860px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* In-game Story Toast */
.story-toast {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(12, 10, 26, 0.94);
  border: 2px solid var(--piko-liquid);
  border-radius: 14px;
  padding: 12px 20px;
  max-width: 680px;
  width: calc(100% - 32px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.75), 0 0 20px rgba(0, 240, 255, 0.25);
  pointer-events: none;
  animation: toastSlideUp 0.25s ease-out;
}

@keyframes toastSlideUp {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.toast-portrait {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.toast-speaker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--piko-liquid);
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.toast-text {
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.35;
}

/* ==========================================================================
   MODALS & MAIN MENU
   ========================================================================== */
.modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at center, rgba(13, 11, 26, 0.72) 0%, rgba(5, 4, 12, 0.92) 100%);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}

.menu-card {
  background: var(--bg-card);
  border: 2px solid rgba(56, 189, 248, 0.45);
  border-radius: 20px;
  padding: 24px 28px;
  max-width: 820px;
  width: 100%;
  max-height: 94vh;
  overflow-y: auto;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.85),
    0 0 40px rgba(0, 240, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compact-card {
  max-width: 460px;
  text-align: center;
}

.cartridge-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--glitch-cyan);
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
}

.glitch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--glitch-magenta);
  box-shadow: 0 0 8px var(--glitch-magenta);
  animation: pulseDot 1.2s infinite alternate;
}

@keyframes pulseDot {
  from { opacity: 0.4; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.2); }
}

.title-showcase {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* CSS Mascot Previews */
.hero-mascots {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 36px;
  margin-bottom: 4px;
}

.mascot-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mascot-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #cbd5e1;
}

.piko-ball {
  width: 48px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #86efac, #2EE65B 65%, #15803d);
  border: 2.5px solid #fff;
  position: relative;
  box-shadow: 0 0 18px rgba(46, 230, 91, 0.55);
  animation: heroBounce 1.6s infinite ease-in-out;
}

.piko-eye {
  position: absolute;
  top: 15px;
  width: 7px;
  height: 11px;
  background: #09090b;
  border-radius: 50%;
}

.piko-eye.left { left: 13px; }
.piko-eye.right { right: 11px; }

.piko-eye::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
}

.piko-sword {
  position: absolute;
  right: -18px;
  top: 8px;
  width: 24px;
  height: 7px;
  background: linear-gradient(90deg, #facc15 25%, #e2e8f0 25%, #38bdf8 100%);
  border: 1.5px solid #0f172a;
  border-radius: 2px 6px 6px 2px;
  transform: rotate(-28deg);
}

.maass-body {
  width: 44px;
  height: 62px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: heroBounce 1.6s infinite ease-in-out 0.25s;
}

.maass-petals {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #ffbe0b 0deg 30deg, #fb5607 30deg 60deg,
    #ffbe0b 60deg 90deg, #fb5607 90deg 120deg,
    #ffbe0b 120deg 150deg, #fb5607 150deg 180deg,
    #ffbe0b 180deg 210deg, #fb5607 210deg 240deg,
    #ffbe0b 240deg 270deg, #fb5607 270deg 300deg,
    #ffbe0b 300deg 330deg, #fb5607 330deg 360deg
  );
  border: 2px solid #fff;
  box-shadow: 0 0 16px rgba(255, 190, 11, 0.5);
}

.maass-face {
  position: absolute;
  top: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fef08a;
  border: 2px solid #78350f;
}

.m-eye {
  position: absolute;
  top: 7px;
  width: 4px;
  height: 6px;
  background: #1c1917;
  border-radius: 50%;
}

.m-eye.left { left: 6px; }
.m-eye.right { right: 6px; }

.m-smile {
  position: absolute;
  bottom: 5px;
  left: 6px;
  width: 12px;
  height: 6px;
  border-bottom: 2.5px solid #1c1917;
  border-radius: 0 0 10px 10px;
}

.maass-hammer {
  position: absolute;
  right: -20px;
  top: 10px;
  width: 22px;
  height: 15px;
  background: linear-gradient(135deg, #94a3b8, #475569);
  border: 2px solid #facc15;
  border-radius: 4px;
  transform: rotate(15deg);
}

@keyframes heroBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.game-logo {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--piko-green);
  text-shadow:
    3px 3px 0px #064e3b,
    -2px -2px 0px var(--piko-liquid),
    0 0 28px rgba(46, 230, 91, 0.55);
  line-height: 1;
}

.game-subtitle {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 1px;
}

/* Mode Grid Buttons */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 2px solid rgba(46, 230, 91, 0.7);
  background: linear-gradient(145deg, rgba(20, 48, 36, 0.85), rgba(12, 24, 28, 0.92));
  color: #fff;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
  box-shadow: 0 5px 0 #052e16;
}

.mode-btn:hover {
  transform: translateY(-3px);
  border-color: var(--piko-liquid);
  box-shadow: 0 8px 0 #052e16, 0 0 24px rgba(0, 240, 255, 0.35);
}

.mode-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #052e16;
}

.coop-mode {
  border-color: rgba(255, 190, 11, 0.8);
  background: linear-gradient(145deg, rgba(58, 36, 14, 0.88), rgba(28, 18, 12, 0.94));
  box-shadow: 0 5px 0 #451a03;
}

.coop-mode:hover {
  border-color: #fde047;
  box-shadow: 0 8px 0 #451a03, 0 0 24px rgba(255, 190, 11, 0.35);
}

.mode-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(46, 230, 91, 0.2);
  color: var(--piko-green);
}

.coop-badge {
  background: rgba(255, 190, 11, 0.2);
  color: var(--maass-gold);
}

.mode-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.mode-desc {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.4;
}

.menu-Subactions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.retro-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.85);
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.14s ease;
  box-shadow: 0 4px 0 #0f172a;
}

.retro-btn:hover {
  border-color: var(--piko-liquid);
  color: var(--piko-liquid);
  transform: translateY(-2px);
}

.retro-btn.small-btn {
  padding: 7px 14px;
  font-size: 11px;
}

.retro-btn.danger-btn {
  border-color: rgba(255, 0, 85, 0.6);
  color: #fda4af;
}

.retro-btn.danger-btn:hover {
  background: rgba(255, 0, 85, 0.2);
  border-color: var(--glitch-magenta);
}

/* Drawers inside Main Menu */
.drawer-panel {
  background: var(--bg-panel);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 16px;
}

.drawer-title {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--piko-liquid);
  margin-bottom: 12px;
  text-align: center;
}

.stage-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stage-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 3px;
  padding: 11px 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  color: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
}

.stage-card:hover {
  border-color: var(--piko-green);
  transform: translateY(-2px);
}

.stage-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--glitch-cyan);
}

.stage-card strong {
  font-family: var(--font-display);
  font-size: 15px;
}

.stage-card small {
  font-size: 11.5px;
  color: #94a3b8;
}

.controls-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.control-box {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.control-box h3 {
  font-family: var(--font-display);
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--piko-green);
}

.p2-box h3 {
  color: var(--maass-gold);
}

.control-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.4;
}

kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  background: #e2e8f0;
  border-radius: 4px;
  box-shadow: 0 2px 0 #64748b;
  margin: 0 1px;
}

.modal-heading {
  font-family: var(--font-display);
  font-size: 32px;
  color: #fff;
}

.modal-subtext {
  font-size: 14px;
  color: #cbd5e1;
}

.vertical-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.vertical-btns .mode-btn {
  align-items: center;
  text-align: center;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-item span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #94a3b8;
}

.stat-item strong {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--piko-liquid);
}

/* ==========================================================================
   MOBILE & TOUCH CONTROLS
   ========================================================================== */
.touch-controls {
  position: absolute;
  bottom: 14px;
  left: 16px;
  right: 16px;
  z-index: 20;
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

.touch-controls.touch-visible {
  display: flex;
}

.touch-left,
.touch-right {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.touch-btn {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.45);
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 20px;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  touch-action: manipulation;
}

.touch-btn:active,
.touch-btn.pressed {
  transform: scale(0.92);
  background: rgba(56, 189, 248, 0.45);
  border-color: #fff;
}

.action-liquid {
  border-color: var(--piko-liquid);
  background: rgba(0, 240, 255, 0.22);
}

.action-liquid.active-toggle {
  background: rgba(0, 240, 255, 0.65);
  color: #090d16;
  box-shadow: 0 0 18px var(--piko-liquid);
}

.action-sword {
  border-color: var(--piko-green);
  background: rgba(46, 230, 91, 0.22);
}

.action-jump {
  border-color: var(--maass-gold);
  background: rgba(255, 190, 11, 0.24);
}

.touch-icon {
  font-size: 20px;
  line-height: 1;
}

.touch-lbl {
  font-size: 9px;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 820px) {
  .mode-grid,
  .controls-columns,
  .stage-buttons-grid {
    grid-template-columns: 1fr;
  }

  .menu-card {
    padding: 18px 16px;
  }

  .player-card {
    min-width: 180px;
    padding: 6px 10px;
  }

  .dialogue-text {
    font-size: 16px;
  }

  .touch-controls {
    display: flex;
  }
}

@media (pointer: coarse) {
  .touch-controls {
    display: flex;
  }
}
