    :root {
      --keyro-blue: #0f76bd;
      --keyro-blue-dark: #07548d;
      --keyro-sky: #7fd2ff;
      --cape-red: #d81f0f;
      --cape-red-dark: #9f170c;
      --gold: #ffc928;
      --ink: #11202b;
      --panel: rgba(255, 255, 255, 0.92);
    }

    * { box-sizing: border-box; }

    html,
    body {
      width: 100%;
      height: 100%;
      margin: 0;
      overflow: hidden;
      background: var(--keyro-blue);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: white;
      touch-action: manipulation;
      user-select: none;
    }

    body {
      display: grid;
      place-items: center;
    }

    .game-shell {
      position: relative;
      width: min(100vw, 900px);
      height: min(100vh, 720px);
      min-height: 520px;
      overflow: hidden;
      background:
        radial-gradient(circle at 25% 14%, rgba(255, 255, 255, 0.32), transparent 21%),
        linear-gradient(180deg, #73d4ff 0%, #1c91d0 46%, #0b65a8 100%);
    }

    canvas {
      display: block;
      width: 100%;
      height: 100%;
    }

    .hud {
      position: absolute;
      inset: 0 0 auto 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: max(16px, env(safe-area-inset-top)) 18px 0;
      pointer-events: none;
      z-index: 4;
    }

    .score-pill,
    .hint-pill,
    .stamina-pill,
    .music-pill {
      min-width: 74px;
      padding: 8px 12px;
      border: 2px solid rgba(255, 255, 255, 0.55);
      border-radius: 8px;
      background: rgba(7, 61, 104, 0.36);
      box-shadow: 0 8px 22px rgba(1, 30, 58, 0.18);
      backdrop-filter: blur(8px);
      font-weight: 900;
      line-height: 1;
      text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
    }

    .score-pill {
      font-size: clamp(1.55rem, 4vw, 2.35rem);
      text-align: center;
    }

    .level-pill {
      min-width: 86px;
      padding: 8px 12px;
      border: 2px solid rgba(255, 255, 255, 0.55);
      border-radius: 8px;
      background: rgba(216, 31, 15, 0.82);
      box-shadow: 0 8px 22px rgba(1, 30, 58, 0.18);
      backdrop-filter: blur(8px);
      font-size: clamp(0.95rem, 2.4vw, 1.12rem);
      font-weight: 1000;
      line-height: 1;
      text-align: center;
      text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
      white-space: nowrap;
    }

    .stamina-pill {
      width: clamp(106px, 15vw, 156px);
      min-width: 96px;
      padding: 7px 9px;
    }

    .promo-pill {
      min-width: 92px;
      padding: 8px 12px;
      border: 2px solid rgba(255, 255, 255, 0.65);
      border-radius: 8px;
      background: rgba(255, 201, 40, 0.9);
      color: #082b45;
      box-shadow: 0 8px 22px rgba(1, 30, 58, 0.18);
      font-size: clamp(0.78rem, 2vw, 0.95rem);
      font-weight: 1000;
      line-height: 1;
      text-align: center;
      white-space: nowrap;
    }

    .powerup-pill {
      min-width: 92px;
      padding: 8px 12px;
      border: 2px solid rgba(255, 255, 255, 0.68);
      border-radius: 8px;
      background: rgba(8, 43, 69, 0.72);
      color: #ffc928;
      box-shadow: 0 8px 22px rgba(1, 30, 58, 0.18);
      font-size: clamp(0.72rem, 1.8vw, 0.9rem);
      font-weight: 1000;
      line-height: 1;
      text-align: center;
      white-space: nowrap;
    }

    .stamina-label {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 5px;
      font-size: clamp(0.68rem, 1.6vw, 0.78rem);
      font-weight: 1000;
      line-height: 1;
      white-space: nowrap;
    }

    .stamina-track {
      height: 9px;
      overflow: hidden;
      border: 2px solid rgba(8, 43, 69, 0.48);
      border-radius: 999px;
      background: rgba(4, 32, 52, 0.42);
    }

    .stamina-fill {
      width: 100%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #ffc928, #35e38d);
      transition: width 120ms linear, background 120ms linear;
    }

    .hint-pill {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: clamp(0.78rem, 2vw, 0.95rem);
      letter-spacing: 0;
      white-space: nowrap;
    }

    .audio-toggles {
      display: flex;
      gap: 8px;
      pointer-events: auto;
    }

    .music-pill {
      min-height: 36px;
      min-width: 76px;
      padding: 8px 12px;
      font-size: clamp(0.78rem, 2vw, 0.95rem);
      box-shadow: 0 5px 0 rgba(8, 43, 69, 0.42), 0 12px 20px rgba(1, 30, 58, 0.16);
      pointer-events: auto;
    }

    .hint-pill::before {
      content: "";
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--cape-red);
      box-shadow: inset -2px -2px 0 var(--cape-red-dark), 0 0 0 3px rgba(255, 255, 255, 0.25);
      flex: 0 0 auto;
    }

    .overlay {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      padding: 22px;
      background: linear-gradient(180deg, rgba(4, 71, 122, 0.24), rgba(3, 39, 73, 0.56));
      z-index: 5;
    }

    .panel {
      width: min(92vw, 430px);
      padding: clamp(22px, 5vw, 34px);
      border: 3px solid rgba(255, 255, 255, 0.68);
      border-radius: 8px;
      background: var(--panel);
      color: var(--ink);
      box-shadow: 0 24px 60px rgba(3, 29, 54, 0.36);
      text-align: center;
    }

.brand-mark {
      width: 72px;
      height: 72px;
      margin: 0 auto 14px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      border: 5px solid #fff;
      background: var(--cape-red);
      color: #fff;
      font-size: 2.3rem;
      font-weight: 1000;
      line-height: 1;
      box-shadow: 0 9px 0 var(--cape-red-dark), 0 18px 30px rgba(79, 12, 6, 0.25);
      touch-action: manipulation;
    }

    h1,
    h2 {
      margin: 0;
      color: var(--keyro-blue-dark);
      line-height: 1.02;
      letter-spacing: 0;
    }

    h1 { font-size: clamp(2.45rem, 10vw, 4rem); }
    h2 { font-size: clamp(2rem, 8vw, 3.2rem); }

    .panel p {
      margin: 12px auto 22px;
      max-width: 30ch;
      font-size: clamp(0.98rem, 3.5vw, 1.12rem);
      line-height: 1.45;
      color: #263744;
    }

    .button-row {
      display: flex;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    button {
      appearance: none;
      border: 0;
      border-radius: 8px;
      min-height: 48px;
      padding: 0 18px;
      background: var(--cape-red);
      color: #fff;
      font: inherit;
      font-size: 1rem;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 6px 0 var(--cape-red-dark), 0 14px 24px rgba(171, 28, 14, 0.24);
      transition: transform 120ms ease, box-shadow 120ms ease;
    }

    .secondary-button {
      background: linear-gradient(180deg, #1489d7, #07548d);
      box-shadow: 0 7px 0 #082b45, 0 16px 26px rgba(1, 30, 58, 0.22);
    }

    .survival-mode-button.locked {
      background: linear-gradient(180deg, #9fb3c1, #526978);
      box-shadow: 0 7px 0 #2b3d48, 0 16px 26px rgba(1, 30, 58, 0.16);
      cursor: pointer;
    }

    .continue-run-button {
      background: linear-gradient(180deg, #ffe27a, #ffc928);
      color: #082b45;
      box-shadow: 0 6px 0 #b88400, 0 14px 24px rgba(184, 132, 0, 0.24);
    }

    button:active {
      transform: translateY(4px);
      box-shadow: 0 2px 0 var(--cape-red-dark), 0 8px 16px rgba(171, 28, 14, 0.2);
    }

    button:disabled {
      opacity: 0.55;
      cursor: not-allowed;
      transform: none;
      filter: grayscale(0.25);
    }

    .secondary-stat {
      margin-top: 14px;
      color: #385467;
      font-size: 0.92rem;
      font-weight: 800;
    }

    .high-score-message {
      display: grid;
      gap: 4px;
      margin: 12px auto;
      padding: 12px 14px;
      border: 2px solid rgba(255, 201, 40, 0.72);
      border-radius: 14px;
      background: #fff7cf;
      color: #082b45;
      font-weight: 900;
    }

    .high-score-message strong {
      color: #d81f0f;
      font-size: 1.08rem;
    }

    .share-message {
      margin-top: 8px;
      font-weight: 900;
    }

    .death-cause {
      margin: 8px auto 0;
      max-width: 430px;
      color: #0b4265;
      background: rgba(255, 200, 40, 0.18);
      border: 1px solid rgba(255, 200, 40, 0.42);
      border-radius: 8px;
      padding: 8px 10px;
      font-size: 0.92rem;
      font-weight: 1000;
      line-height: 1.25;
    }

    .settings-panel {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 2px solid rgba(8, 43, 69, 0.12);
    }

    .settings-title {
      margin: 0 0 10px;
      color: #385467;
      font-size: 0.86rem;
      font-weight: 1000;
      text-transform: uppercase;
    }

    .settings-panel .button-row {
      margin-top: 10px;
    }

    .promo-card {
      border-color: rgba(255, 201, 40, 0.92);
      box-shadow: 0 24px 60px rgba(3, 29, 54, 0.36), 0 0 0 8px rgba(255, 201, 40, 0.18);
    }

    .promo-code {
      margin: 14px auto;
      padding: 12px 14px;
      border: 3px dashed var(--cape-red);
      border-radius: 8px;
      background: #fff7cf;
      color: #082b45;
      font-size: clamp(1.45rem, 6vw, 2.2rem);
      font-weight: 1000;
      letter-spacing: 0;
    }

    .promo-details {
      margin: 8px auto 12px;
      padding: 9px 12px;
      border-radius: 12px;
      background: rgba(15, 118, 189, 0.12);
      color: #123b52;
      font-size: 0.86rem;
      font-weight: 900;
      line-height: 1.35;
    }

    .promo-van-stage {
      position: relative;
      height: 148px;
      margin: 8px 0 12px;
      overflow: hidden;
      border-radius: 8px;
      background:
        radial-gradient(circle at 78% 22%, rgba(255, 201, 40, 0.55), transparent 17%),
        linear-gradient(180deg, #7cd8ff 0 48%, #1d8bd1 49% 60%, #123b52 61% 100%);
      border: 2px solid rgba(8, 43, 69, 0.18);
    }

    .promo-van-stage::before {
      content: "";
      position: absolute;
      left: -8%;
      right: -8%;
      top: 18px;
      height: 24px;
      background:
        radial-gradient(ellipse at 12% 60%, rgba(255,255,255,0.72) 0 18px, transparent 19px),
        radial-gradient(ellipse at 24% 35%, rgba(255,255,255,0.64) 0 22px, transparent 23px),
        radial-gradient(ellipse at 62% 52%, rgba(255,255,255,0.58) 0 18px, transparent 19px);
      animation: promoCloudDrift 6s linear infinite;
    }

    .promo-van-stage::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: 28px;
      height: 4px;
      background: repeating-linear-gradient(90deg, rgba(255, 201, 40, 0.9) 0 28px, transparent 28px 48px);
      animation: promoRoadDash 0.7s linear infinite;
    }

    .promo-chase-actor {
      position: absolute;
      height: auto;
      filter: drop-shadow(0 8px 8px rgba(3, 30, 52, 0.28));
      pointer-events: none;
      object-fit: contain;
      will-change: transform;
    }

    .promo-van {
      left: 2%;
      bottom: 12px;
      width: min(43vw, 205px);
      animation: promoVanSquadBounce 0.68s ease-in-out infinite;
      z-index: 2;
    }

    .promo-keyro,
    .promo-keyra,
    .promo-spare,
    .promo-golden {
      z-index: 4;
      width: min(14vw, 62px);
      animation: promoHeroJump 0.86s ease-in-out infinite;
    }

    .promo-keyro {
      left: 29%;
      bottom: 48px;
      animation-delay: 0s;
    }

    .promo-keyra {
      left: 39%;
      bottom: 44px;
      width: min(13.5vw, 60px);
      animation-delay: -0.2s;
    }

    .promo-spare {
      left: 20%;
      bottom: 42px;
      width: min(13vw, 58px);
      animation-delay: -0.38s;
    }

    .promo-golden {
      left: 49%;
      bottom: 48px;
      width: min(13.5vw, 60px);
      animation-delay: -0.54s;
      filter: drop-shadow(0 0 10px rgba(255, 216, 77, 0.82)) drop-shadow(0 8px 8px rgba(3, 30, 52, 0.22));
    }

    .promo-glitchkey {
      right: 5%;
      bottom: 43px;
      width: min(18vw, 86px);
      z-index: 5;
      animation: promoGlitchEscape 0.82s ease-in-out infinite, promoGlitchFlicker 0.28s steps(2) infinite;
      filter: drop-shadow(0 0 10px rgba(216, 31, 15, 0.45)) drop-shadow(0 8px 8px rgba(3, 30, 52, 0.25));
    }

    @keyframes promoCloudDrift {
      from { transform: translateX(0); }
      to { transform: translateX(8%); }
    }

    @keyframes promoRoadDash {
      from { background-position-x: 0; }
      to { background-position-x: -48px; }
    }

    @keyframes promoVanSquadBounce {
      0%, 100% { transform: translateY(0) rotate(-1deg); }
      50% { transform: translateY(-4px) rotate(1deg); }
    }

    @keyframes promoHeroJump {
      0%, 100% { transform: translateY(0) rotate(-5deg); }
      45% { transform: translateY(-24px) rotate(7deg); }
      70% { transform: translateY(-10px) rotate(2deg); }
    }

    @keyframes promoGlitchEscape {
      0%, 100% { transform: translate(0, 0) rotate(8deg); }
      45% { transform: translate(14px, -28px) rotate(-10deg); }
      70% { transform: translate(8px, -11px) rotate(4deg); }
    }

    @keyframes promoGlitchFlicker {
      0%, 100% { opacity: 0.96; }
      50% { opacity: 0.78; }
    }

    .social-row {
      display: flex;
      justify-content: center;
      gap: 10px;
      margin: 12px 0 18px;
    }

    .social-icon {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      border: 2px solid rgba(8, 43, 69, 0.2);
      background: #0b1720;
      color: #fff;
      font-size: 0.78rem;
      font-weight: 1000;
      line-height: 1;
      box-shadow: 0 6px 16px rgba(1, 30, 58, 0.18);
    }

    .social-icon.instagram {
      background: radial-gradient(circle at 30% 110%, #feda75, #fa7e1e 32%, #d62976 58%, #962fbf 82%, #4f5bd5);
    }

    .social-icon.facebook {
      background: #1877f2;
      font-size: 1.25rem;
    }

    .social-icon.tiktok {
      background: #111;
      text-shadow: 2px 0 #25f4ee, -2px 0 #fe2c55;
      font-size: 1.05rem;
    }

    .characters-panel {
      width: min(94vw, 640px);
      max-height: min(92vh, 760px);
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }

    .character-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin: 14px 0 18px;
    }

    .character-card {
      position: relative;
      display: grid;
      gap: 8px;
      min-height: 198px;
      padding: 10px 8px;
      border: 2px solid rgba(8, 43, 69, 0.12);
      border-radius: 18px;
      background:
        radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.86), transparent 34%),
        linear-gradient(180deg, #e9f7ff, #cbeeff);
      color: #082b45;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 12px 22px rgba(1, 30, 58, 0.14);
      overflow: hidden;
    }

    .character-card[aria-pressed="true"] {
      border-color: #ffc928;
      box-shadow: inset 0 0 0 2px #ffc928, 0 14px 24px rgba(184, 132, 0, 0.2);
    }

    .character-card.locked .character-art {
      filter: grayscale(1) brightness(0.12) opacity(0.56);
    }

    .character-art-wrap {
      height: 94px;
      display: grid;
      place-items: end center;
    }

    .character-art {
      max-width: 100%;
      max-height: 102px;
      object-fit: contain;
      filter: drop-shadow(0 8px 8px rgba(3, 30, 52, 0.18));
    }

    .character-name {
      font-size: 0.9rem;
      font-weight: 1000;
      line-height: 1.05;
    }

    .character-requirement {
      min-height: 32px;
      color: #385467;
      font-size: 0.68rem;
      font-weight: 900;
      line-height: 1.2;
    }

    .character-select {
      min-height: 34px;
      padding: 0 8px;
      border-radius: 10px;
      font-size: 0.76rem;
    }

    .unlock-toast {
      position: absolute;
      left: 50%;
      top: max(92px, calc(env(safe-area-inset-top) + 82px));
      z-index: 12;
      min-width: min(86vw, 320px);
      padding: 14px 18px;
      border: 3px solid rgba(255, 201, 40, 0.92);
      border-radius: 18px;
      background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.86), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 207, 0.96));
      color: #082b45;
      text-align: center;
      transform: translateX(-50%);
      box-shadow: 0 18px 46px rgba(2, 25, 45, 0.3);
      animation: unlockPop 2.4s ease both;
    }

    .unlock-kicker {
      color: #d81f0f;
      font-size: 0.78rem;
      font-weight: 1000;
      text-transform: uppercase;
    }

    .unlock-name {
      font-size: clamp(1.45rem, 6vw, 2.1rem);
      font-weight: 1000;
      line-height: 1.05;
    }

    .dialogue-box {
      position: absolute;
      left: 50%;
      bottom: max(18px, env(safe-area-inset-bottom));
      z-index: 11;
      width: min(92vw, 560px);
      min-height: 82px;
      display: grid;
      grid-template-columns: 74px 1fr;
      gap: 12px;
      align-items: center;
      padding: 12px 14px;
      border: 3px solid rgba(255, 255, 255, 0.9);
      border-radius: 16px;
      background: rgba(8, 43, 69, 0.88);
      color: #fff;
      box-shadow: 0 18px 42px rgba(0, 20, 42, 0.32);
      transform: translateX(-50%);
      pointer-events: none;
    }

    .dialogue-box.dialogue-story {
      top: 50%;
      bottom: auto;
      width: min(88vw, 620px);
      min-height: 116px;
      grid-template-columns: 88px 1fr;
      padding: 16px 18px;
      transform: translate(-50%, -50%);
      z-index: 16;
      background: rgba(8, 43, 69, 0.93);
      box-shadow: 0 24px 60px rgba(0, 20, 42, 0.42), 0 0 0 6px rgba(255, 201, 40, 0.12);
    }

    .dialogue-speaker {
      width: 70px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      align-self: center;
    }

    .dialogue-portrait {
      width: 54px;
      height: 54px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 3px solid #fff;
      border-radius: 16px;
      background: linear-gradient(180deg, #9beaff, #0f76bd);
      box-shadow: 0 6px 0 rgba(3, 30, 52, 0.5);
      overflow: hidden;
      animation: portraitIdle 1.5s ease-in-out infinite alternate;
    }

    .dialogue-name {
      width: 70px;
      min-height: 15px;
      color: #ffc928;
      font-size: 0.64rem;
      font-weight: 1000;
      line-height: 1;
      text-align: center;
      text-transform: uppercase;
      text-shadow: 0 2px 0 rgba(3, 30, 52, 0.55);
      white-space: normal;
    }

    .dialogue-box.dialogue-story .dialogue-speaker {
      width: 84px;
    }

    .dialogue-box.dialogue-story .dialogue-portrait {
      width: 68px;
      height: 68px;
    }

    .dialogue-box.dialogue-story .dialogue-name {
      width: 84px;
      font-size: 0.68rem;
    }

    .dialogue-portrait-image {
      width: 156%;
      height: 156%;
      object-fit: contain;
      object-position: center 26%;
      transform: translateY(14%);
      filter: drop-shadow(0 3px 4px rgba(0, 20, 42, 0.25));
    }

    .dialogue-portrait[data-character="van"] .dialogue-portrait-image {
      width: 142%;
      height: 104%;
      transform: translateY(0);
    }

    .dialogue-portrait[data-character="hoodie"] .dialogue-portrait-image {
      width: 132%;
      height: 132%;
      object-position: center 36%;
      transform: translateY(6%);
    }

    .dialogue-portrait[data-character="keyra"] .dialogue-portrait-image {
      width: 136%;
      height: 136%;
      object-position: center 34%;
      transform: translateY(8%);
    }

    .dialogue-portrait[data-character="golden"],
    .dialogue-portrait[data-character="goldenAura"] {
      background: linear-gradient(180deg, #fff2a4, #ffc928);
    }

    .dialogue-portrait[data-character="goldenAura"] .dialogue-portrait-image,
    .dialogue-portrait[data-character="keyraLocked"] .dialogue-portrait-image {
      width: 118%;
      height: 118%;
      transform: translateY(0);
      object-position: center center;
    }

    .dialogue-portrait[data-character="glitchkey"] {
      background: linear-gradient(180deg, #26104d, #d81f0f);
      box-shadow: 0 6px 0 rgba(42, 0, 48, 0.72), 0 0 22px rgba(216, 31, 15, 0.34);
    }

    .dialogue-portrait[data-character="glitchkey"] .dialogue-portrait-image {
      width: 178%;
      height: 178%;
      object-position: center 20%;
      transform: translateY(16%);
      filter: drop-shadow(0 0 5px rgba(255, 28, 80, 0.55));
    }

    .dialogue-portrait[data-character="keyroSad"] {
      background: linear-gradient(180deg, #5c83a5, #102b45);
    }

    .dialogue-portrait[data-character="keyroSad"] .dialogue-portrait-image {
      width: 138%;
      height: 138%;
      object-position: center 34%;
      transform: translateY(7%);
      filter: drop-shadow(0 4px 5px rgba(0, 20, 42, 0.35));
    }

    .dialogue-copy {
      min-height: 42px;
      font-size: clamp(0.95rem, 3vw, 1.12rem);
      font-weight: 900;
      line-height: 1.35;
      text-align: left;
    }

    .dialogue-box.dialogue-story .dialogue-copy {
      min-height: 58px;
      font-size: clamp(1.02rem, 2.1vw, 1.22rem);
      line-height: 1.42;
    }

    .dialogue-box.dialogue-waiting::after {
      content: "TAP / SPACE TO CONTINUE";
      position: absolute;
      right: 16px;
      bottom: 7px;
      color: #ffc928;
      font-size: 0.62rem;
      font-weight: 1000;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      animation: dialoguePromptPulse 0.9s ease-in-out infinite alternate;
    }

    .choice-box {
      position: absolute;
      left: 50%;
      bottom: max(20px, env(safe-area-inset-bottom));
      z-index: 18;
      width: min(92vw, 560px);
      padding: 14px;
      border: 3px solid rgba(255, 255, 255, 0.92);
      border-radius: 10px;
      background: rgba(3, 18, 34, 0.94);
      color: #ffffff;
      box-shadow: 0 22px 56px rgba(0, 20, 42, 0.42), 0 0 0 6px rgba(255, 201, 40, 0.14);
      transform: translateX(-50%);
      pointer-events: auto;
    }

    .choice-title {
      margin-bottom: 10px;
      color: #ffc928;
      font-size: 0.78rem;
      font-weight: 1000;
      text-align: center;
      text-transform: uppercase;
    }

    .choice-options {
      display: grid;
      gap: 8px;
    }

    .choice-option {
      min-height: 42px;
      padding: 9px 12px;
      border: 2px solid rgba(255, 255, 255, 0.28);
      border-radius: 8px;
      background: rgba(15, 118, 189, 0.74);
      color: #ffffff;
      box-shadow: 0 5px 0 rgba(8, 43, 69, 0.62);
      font-size: 0.95rem;
      font-weight: 1000;
      text-align: left;
    }

    .choice-option:hover,
    .choice-option:focus-visible {
      background: rgba(216, 31, 15, 0.88);
      outline: none;
    }

    .choice-hint {
      margin-top: 10px;
      color: rgba(255, 255, 255, 0.72);
      font-size: 0.7rem;
      font-weight: 900;
      text-align: center;
      text-transform: uppercase;
    }

    @keyframes portraitIdle {
      from { transform: translateY(0) rotate(-1deg); }
      to { transform: translateY(-3px) rotate(1deg); }
    }

    @keyframes dialoguePromptPulse {
      from { opacity: 0.46; transform: translateY(0); }
      to { opacity: 1; transform: translateY(-2px); }
    }

    @keyframes unlockPop {
      0% { transform: translate(-50%, -16px) scale(0.86); opacity: 0; }
      12%, 82% { transform: translate(-50%, 0) scale(1); opacity: 1; }
      100% { transform: translate(-50%, -10px) scale(0.96); opacity: 0; }
    }

    .hidden { display: none; }

    .countdown-overlay {
      position: absolute;
      inset: 0;
      z-index: 6;
      display: grid;
      place-items: center;
      pointer-events: none;
      background: radial-gradient(circle at 50% 42%, rgba(255, 201, 40, 0.22), transparent 26%);
    }

    .countdown-overlay.hidden {
      display: none;
    }

    .countdown-card {
      min-width: 154px;
      padding: 18px 22px 20px;
      border: 3px solid rgba(255, 255, 255, 0.82);
      border-radius: 18px;
      background: rgba(8, 43, 69, 0.78);
      color: #fff;
      text-align: center;
      box-shadow: 0 20px 46px rgba(2, 25, 45, 0.34);
      backdrop-filter: blur(6px);
    }

    .countdown-label {
      margin-bottom: 6px;
      color: #ffc928;
      font-size: clamp(0.78rem, 3vw, 0.95rem);
      font-weight: 1000;
      text-transform: uppercase;
    }

    .countdown-number {
      font-size: clamp(3.8rem, 20vw, 7rem);
      font-weight: 1000;
      line-height: 0.9;
      text-shadow: 0 5px 0 rgba(0, 0, 0, 0.22);
      animation: countdownPop 420ms ease both;
    }

    .countdown-number.pop {
      animation: none;
    }

    @keyframes countdownPop {
      0% { transform: scale(0.55); opacity: 0; }
      55% { transform: scale(1.12); opacity: 1; }
      100% { transform: scale(1); opacity: 1; }
    }

    @media (max-width: 640px) {
      .game-shell {
        width: 100vw;
        height: 100vh;
        min-height: 100vh;
      }

      .hud {
        padding-left: 12px;
        padding-right: 12px;
        gap: 8px;
      }

      .hint-pill {
        max-width: 38vw;
        white-space: normal;
        line-height: 1.1;
        padding: 8px 10px;
      }

      .audio-toggles {
        gap: 6px;
      }

      .music-pill {
        min-width: 58px;
        padding: 8px 9px;
      }

      .stamina-pill {
        width: 104px;
        min-width: 90px;
      }

      .promo-pill {
        min-width: 74px;
        padding: 8px 9px;
      }
    }

.loading-screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #0f76bd 0%, #07548d 100%);
  color: white;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-box {
  width: min(84vw, 340px);
  text-align: center;
}

.loading-brand {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border: 4px solid white;
  border-radius: 50%;
  background: #d81f0f;
  font-size: 2.3rem;
  font-weight: 1000;
  box-shadow: 0 16px 30px rgba(0, 27, 52, 0.28);
}

.loading-title {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 8vw, 2.15rem);
  font-weight: 1000;
  line-height: 1;
}

.loading-bar {
  height: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.loading-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: #ffc928;
  animation: loadingSlide 1.05s ease-in-out infinite alternate;
}

@keyframes loadingSlide {
  from { transform: translateX(-18%); }
  to { transform: translateX(155%); }
}

.fullscreen-button {
  background: rgba(8, 43, 69, 0.68);
}

/* Branded mobile polish overrides */
body {
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 201, 40, 0.34), transparent 34%),
    linear-gradient(180deg, #083f79 0%, #0f76bd 58%, #06385f 100%);
  -webkit-tap-highlight-color: transparent;
}

.game-shell {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.48), transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(255, 201, 40, 0.22), transparent 18%),
    linear-gradient(180deg, #8ae3ff 0%, #1b9edb 47%, #0a5e9c 100%);
  box-shadow: 0 30px 70px rgba(0, 25, 51, 0.28);
}

.hud {
  align-items: flex-start;
  gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 14px 0;
}

.score-pill,
.level-pill,
.promo-pill,
.powerup-pill,
.stamina-pill,
.music-pill,
.hint-pill {
  border-radius: 999px;
  border-width: 1px;
  box-shadow: 0 8px 18px rgba(1, 30, 58, 0.16);
}

.score-pill {
  min-width: 58px;
  padding: 7px 11px;
  font-size: clamp(1.2rem, 4.8vw, 2.05rem);
  background: rgba(8, 43, 69, 0.58);
}

.level-pill,
.promo-pill,
.powerup-pill {
  min-width: 72px;
  padding: 7px 10px;
  font-size: clamp(0.78rem, 2.4vw, 1rem);
}

.stamina-pill {
  width: clamp(98px, 18vw, 148px);
  min-width: 92px;
  padding: 7px 9px;
  background: rgba(8, 43, 69, 0.48);
}

.hint-pill {
  background: rgba(255, 255, 255, 0.18);
}

.overlay {
  padding: clamp(16px, 5vw, 28px);
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 201, 40, 0.24), transparent 25%),
    linear-gradient(180deg, rgba(4, 71, 122, 0.18), rgba(3, 39, 73, 0.66));
}

.panel {
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 248, 255, 0.95));
  box-shadow:
    0 18px 0 rgba(8, 43, 69, 0.16),
    0 32px 70px rgba(3, 29, 54, 0.4);
}

.start-panel {
  width: min(92vw, 460px);
  padding: clamp(18px, 4.8vw, 30px);
  overflow: hidden;
}

.start-panel h1 {
  font-size: clamp(2.3rem, 11vw, 4rem);
  color: #07548d;
  text-shadow: 0 3px 0 rgba(255, 201, 40, 0.36);
}

.reward-copy {
  margin: 10px auto 14px;
  max-width: 26ch;
  color: #082b45;
  font-weight: 1000;
}

.start-hero {
  position: relative;
  min-height: 178px;
  margin: 2px -10px 16px;
}

.start-hero::before {
  content: "";
  position: absolute;
  inset: 12px 10px 30px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.72), transparent 17%),
    linear-gradient(180deg, #88dcff, #0f76bd);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.54);
}

.start-keyro {
  position: absolute;
  z-index: 3;
  left: 32%;
  top: -2px;
  width: min(38vw, 148px);
  height: auto;
  transform: translateX(-50%);
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  filter: drop-shadow(0 14px 18px rgba(3, 30, 52, 0.28));
  animation: heroFloat 1.55s ease-in-out infinite alternate;
}

.start-keyro.start-van-character {
  top: 44px;
  width: min(58vw, 250px);
  animation: heroVanFloat 1.55s ease-in-out infinite alternate;
}

@keyframes heroVanFloat {
  from { transform: translate(-50%, 0) rotate(-1deg) scaleX(-1); }
  to { transform: translate(-50%, -8px) rotate(1deg) scaleX(-1); }
}

.start-road {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 0;
  height: 72px;
  overflow: visible;
  border-radius: 14px;
  background: linear-gradient(180deg, #16455d 0%, #082b45 100%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.18);
}

.start-road::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 38px;
  height: 4px;
  background: repeating-linear-gradient(90deg, #ffc928 0 26px, transparent 26px 44px);
}

.start-van {
  position: absolute;
  z-index: 2;
  left: 60%;
  bottom: 9px;
  width: min(62vw, 270px);
  height: auto;
  transform: translateX(-50%);
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  filter: drop-shadow(0 8px 8px rgba(0, 20, 42, 0.34));
}

@keyframes heroFloat {
  from { transform: translate(-50%, 0) rotate(-1deg); }
  to { transform: translate(-50%, -8px) rotate(1deg); }
}

button {
  border-radius: 14px;
  background: linear-gradient(180deg, #f13a28, #c8190c);
  box-shadow: 0 7px 0 #8f1209, 0 16px 26px rgba(171, 28, 14, 0.24);
}

@media (max-width: 640px) {
  html,
  body {
    height: 100dvh;
  }

  .game-shell {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
  }

  .hud {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: start;
    padding: max(8px, env(safe-area-inset-top)) 8px 0;
    gap: 6px;
  }

  .score-pill {
    min-width: 46px;
    padding: 6px 9px;
    font-size: 1.12rem;
  }

  .level-pill {
    min-width: 64px;
    padding: 6px 8px;
    font-size: 0.74rem;
  }

  .promo-pill {
    grid-column: 1 / 3;
    min-width: 0;
    width: fit-content;
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .powerup-pill {
    grid-column: 2 / 4;
    justify-self: center;
    align-self: start;
    max-width: 52vw;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    padding: 6px 9px;
    font-size: 0.7rem;
  }

  .stamina-pill {
    justify-self: end;
    width: min(34vw, 126px);
    min-width: 92px;
    padding: 6px 8px;
  }

  .stamina-label {
    margin-bottom: 4px;
    font-size: 0.62rem;
  }

  .stamina-track {
    height: 8px;
    border-width: 1px;
  }

  .audio-toggles {
    position: absolute;
    right: 8px;
    top: calc(max(8px, env(safe-area-inset-top)) + 42px);
    gap: 4px;
  }

  .music-pill {
    min-width: 0;
    min-height: 28px;
    padding: 6px 7px;
    font-size: 0.62rem;
  }

  .hint-pill {
    display: none;
  }

  .start-overlay {
    align-items: center;
    padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  }

  .start-panel {
    width: min(94vw, 390px);
    padding: 17px 16px 18px;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
    margin-bottom: 8px;
    border-width: 4px;
    font-size: 1.85rem;
    box-shadow: 0 6px 0 var(--cape-red-dark), 0 14px 22px rgba(79, 12, 6, 0.22);
  }

  .start-panel h1 {
    font-size: clamp(2.15rem, 12vw, 3.2rem);
  }

  .reward-copy {
    margin: 8px auto 10px;
    font-size: 0.98rem;
    line-height: 1.22;
  }

  .start-hero {
    min-height: clamp(160px, 38vh, 226px);
    margin: 0 -6px 14px;
  }

  .start-keyro {
    left: 30%;
    width: min(40vw, 170px);
  }

  .start-keyro.start-van-character {
    left: 34%;
    top: 50px;
    width: min(64vw, 260px);
  }

  .start-road {
    height: clamp(70px, 13vh, 92px);
  }

  .start-van {
    left: 62%;
    width: min(70vw, 292px);
  }

  .button-row {
    gap: 8px;
  }

  button {
    min-height: 44px;
    padding: 0 15px;
    font-size: 0.94rem;
  }

  .fullscreen-button {
    min-height: 40px;
    font-size: 0.82rem;
  }

  .panel:not(.start-panel) {
    width: min(92vw, 390px);
    padding: 20px 16px;
  }

  #charactersScreen {
    place-items: stretch center;
    align-items: stretch;
    padding: max(10px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .characters-panel {
    width: min(96vw, 430px);
    max-height: calc(100dvh - 24px);
    padding: 16px 12px;
    align-self: center;
  }

  .promo-van-stage {
    height: 118px;
  }

  .promo-van {
    width: min(42vw, 165px);
  }

  .promo-keyro,
  .promo-keyra,
  .promo-spare,
  .promo-golden {
    width: min(13vw, 48px);
  }

  .promo-glitchkey {
    width: min(17vw, 62px);
    right: 4%;
  }

  .character-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .character-card {
    min-height: 154px;
    padding: 9px 7px;
  }

  .character-art-wrap {
    height: 68px;
  }

  .character-art {
    max-height: 76px;
  }

  .characters-panel p {
    margin-bottom: 12px;
  }

  .dialogue-box {
    width: calc(100vw - 20px);
    grid-template-columns: 58px 1fr;
    gap: 9px;
    min-height: 72px;
    padding: 10px;
  }

  .dialogue-box.dialogue-story {
    top: 50%;
    bottom: auto;
    width: min(calc(100vw - 28px), 430px);
    min-height: 104px;
    grid-template-columns: 72px 1fr;
    padding: 14px;
    transform: translate(-50%, -50%);
    z-index: 16;
  }

  .dialogue-speaker {
    width: 56px;
    gap: 4px;
  }

  .dialogue-portrait {
    width: 46px;
    height: 46px;
    font-size: 1.35rem;
  }

  .dialogue-box.dialogue-story .dialogue-portrait {
    width: 62px;
    height: 62px;
  }

  .dialogue-name {
    width: 56px;
    font-size: 0.56rem;
  }

  .dialogue-box.dialogue-story .dialogue-name {
    width: 68px;
    font-size: 0.6rem;
  }

  .dialogue-copy {
    font-size: 0.88rem;
  }

  .dialogue-box.dialogue-story .dialogue-copy {
    font-size: 0.96rem;
    line-height: 1.42;
  }

  .dialogue-box.dialogue-waiting::after {
    right: 10px;
    bottom: 5px;
    font-size: 0.54rem;
  }

  .choice-box {
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 11px;
  }

  .choice-option {
    min-height: 40px;
    font-size: 0.86rem;
  }

  .score-pill,
  .level-pill,
  .promo-pill,
  .powerup-pill,
  .stamina-pill,
  .music-pill {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 4px 10px rgba(1, 30, 58, 0.14);
  }

  .game-shell,
  .panel,
  .promo-card {
    box-shadow: none;
  }

  .start-keyro,
  .start-van,
  .promo-van {
    filter: none;
  }

  .loading-bar span {
    animation-duration: 1.4s;
  }
}
