/* Base page, shell, status bars, and hearts. */
:root {
      --bg-0: #020407;
      --bg-1: #040a12;
      --neon: #00ff9d;
      --cyan: #00b7ff;
      --panel-border: rgba(0,255,157,0.35);
      --panel-soft: rgba(255,255,255,0.08);
    }
    * { box-sizing: border-box; }
    html, body {
      margin: 0;
      min-height: 100%;
      color: #fff;
      font-family: "Space Mono", "SFMono-Regular", Menlo, Consolas, monospace;
      background:
        radial-gradient(circle at 18% 16%, rgba(0,255,157,0.12), transparent 52%),
        radial-gradient(circle at 82% 0%, rgba(0,243,255,0.10), transparent 48%),
        linear-gradient(170deg, var(--bg-1), var(--bg-0));
    }

    .arcade-page {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 8px;
    }

    .arcade-shell {
      width: min(98vw, 500px);
      border-radius: 18px;
      border: 1px solid var(--panel-border);
      background:
        radial-gradient(circle at 20% 0%, rgba(0,255,157,0.12), transparent 55%),
        radial-gradient(circle at 80% 100%, rgba(0,180,255,0.12), transparent 55%),
        rgba(0,0,0,0.90);
      padding: 12px;
      max-height: calc(100vh - 16px);
      box-shadow: 0 0 40px rgba(0,0,0,0.9);
    }

    .arcade-title {
      margin: 0 0 4px;
      text-align: center;
      letter-spacing: 0.24em;
      font-size: clamp(0.8rem, 2vw, 1rem);
      text-transform: uppercase;
    }
    .arcade-subtitle {
      margin: 0 0 8px;
      text-align: center;
      letter-spacing: 0.16em;
      font-size: 0.58rem;
      text-transform: uppercase;
      opacity: 0.75;
    }

    .arcade-shell-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 6px;
      font-size: 0.7rem;
      text-transform: uppercase;
    }
    .pill {
      border-radius: 999px;
      border: 1px solid rgba(0,255,157,0.4);
      padding: 3px 8px;
      font-size: 0.5rem;
      letter-spacing: 0.1em;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }
    .pill strong {
      color: var(--neon);
      font-weight: 700;
    }
    .hp-track {
      position: relative;
      height: 8px;
      border-radius: 999px;
      overflow: hidden;
      margin: 0 2px 8px;
      border: 1px solid rgba(255,255,255,0.18);
      background: rgba(0,0,0,0.55);
    }
    .hp-fill {
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, #1dff9f, #8dff73);
      transition: width 0.18s ease, background 0.18s ease;
    }
    .atk-track {
      position: relative;
      height: 8px;
      border-radius: 999px;
      overflow: hidden;
      margin: 0 2px 8px;
      border: 1px solid rgba(0,183,255,0.35);
      background: rgba(0,0,0,0.55);
      box-shadow: inset 0 0 8px rgba(0,140,255,0.2);
    }
    .atk-fill {
      width: 0%;
      height: 100%;
      background: linear-gradient(90deg, #3ad1ff, #89f7ff);
      transition: width 0.14s ease;
    }
    .atk-track.ready {
      border-color: rgba(0,255,157,0.72);
      box-shadow: 0 0 10px rgba(0,255,157,0.45), inset 0 0 8px rgba(0,255,157,0.22);
    }
    .hp-hearts {
      margin: 0 2px 8px;
      display: inline-flex;
      gap: 3px;
      align-items: center;
      flex-wrap: wrap;
      min-height: 16px;
    }
    .heart-cell {
      position: relative;
      width: 14px;
      height: 14px;
      line-height: 14px;
      display: inline-block;
      font-size: 13px;
    }
    .heart-back {
      position: absolute;
      inset: 0;
      color: rgba(255, 128, 128, 0.22);
      text-shadow: 0 0 2px rgba(0,0,0,0.6);
      user-select: none;
    }
    .heart-front {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      overflow: hidden;
      color: #ff4b6e;
      text-shadow: 0 0 5px rgba(255, 60, 105, 0.6);
      white-space: nowrap;
      user-select: none;
    }
    .heart-back svg,
    .heart-front svg {
      width: 100%;
      height: 100%;
      display: block;
      fill: currentColor;
    }

