    :root {
      --bg-0: #08162b;
      --bg-1: #102a4d;
      --bg-2: #19507a;
      --panel: rgba(8, 20, 38, 0.72);
      --panel-soft: rgba(12, 34, 60, 0.5);
      --line: rgba(177, 228, 255, 0.24);
      --line-bright: rgba(168, 232, 255, 0.48);
      --text: #f5fbff;
      --muted: #b9d0df;
      --cyan: #67dcff;
      --gold: #ffe277;
      --pink: #ff8bc2;
      --danger: #b36cff;
      color-scheme: dark;
    }

    body[data-theme="light"] {
      --bg-0: #eaf7ff;
      --bg-1: #cceeff;
      --bg-2: #8fcdea;
      --panel: rgba(247, 253, 255, 0.74);
      --panel-soft: rgba(229, 248, 255, 0.58);
      --line: rgba(30, 94, 130, 0.2);
      --line-bright: rgba(27, 125, 170, 0.4);
      --text: #0b2440;
      --muted: #496579;
      --cyan: #087da2;
      --gold: #d69b00;
      --pink: #b83e76;
      --danger: #6d49c7;
      color-scheme: light;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      width: 100%;
      min-height: 100%;
      margin: 0;
      overflow: hidden;
      background: var(--bg-0);
      color: var(--text);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      scrollbar-width: none;
    }

    body::-webkit-scrollbar {
      display: none;
    }

    body {
      min-height: 100dvh;
      background:
        radial-gradient(circle at 68% 16%, rgba(255, 238, 156, 0.28), transparent 17rem),
        radial-gradient(circle at 20% 18%, rgba(103, 220, 255, 0.2), transparent 22rem),
        linear-gradient(135deg, var(--bg-0), var(--bg-1) 50%, var(--bg-2));
    }

    body[data-theme="light"] {
      background:
        radial-gradient(circle at 68% 16%, rgba(255, 221, 113, 0.3), transparent 17rem),
        radial-gradient(circle at 20% 18%, rgba(20, 166, 211, 0.18), transparent 22rem),
        linear-gradient(135deg, var(--bg-0), var(--bg-1) 52%, var(--bg-2));
    }

    .lost-stars-page {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100dvh;
      isolation: isolate;
      overflow: hidden;
      background: inherit;
      touch-action: none;
      user-select: none;
    }

    .starfield,
    .lost-stars-canvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }

    .starfield {
      z-index: 0;
      overflow: hidden;
      pointer-events: none;
      opacity: 0.42;
    }

    .starfield::before,
    .starfield::after {
      content: "";
      position: absolute;
      inset: -18%;
      will-change: transform;
      transform: translate3d(0, 0, 0);
      backface-visibility: hidden;
      background:
        radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.78) 0 1px, transparent 1.7px),
        radial-gradient(circle at 55% 36%, rgba(103, 220, 255, 0.58) 0 1px, transparent 1.8px),
        radial-gradient(circle at 82% 16%, rgba(255, 226, 119, 0.66) 0 1px, transparent 1.8px),
        radial-gradient(circle at 30% 75%, rgba(255, 139, 194, 0.52) 0 1px, transparent 1.7px);
      background-size: 130px 110px, 190px 160px, 230px 190px, 170px 140px;
      animation: starfieldDrift 36s linear infinite;
    }

    .starfield::after {
      inset: -26%;
      opacity: 0.48;
      filter: blur(0.2px);
      transform: translate3d(-5%, -4%, 0);
      animation-duration: 52s;
      animation-direction: reverse;
    }

    .lost-stars-canvas {
      z-index: 1;
      display: block;
    }

    .topbar {
      position: fixed;
      z-index: 5;
      top: 14px;
      left: 50%;
      width: min(1160px, calc(100vw - 28px));
      min-height: 64px;
      transform: translateX(-50%);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 10px 12px 10px 14px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel);
      box-shadow: 0 22px 72px rgba(0, 0, 0, 0.28);
      backdrop-filter: blur(20px);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
      color: var(--text);
      text-decoration: none;
    }

    .brand img {
      width: 44px;
      height: 44px;
      border-radius: 15px;
      box-shadow: 0 8px 24px rgba(103, 220, 255, 0.24);
    }

    .brand strong,
    .score-pill b {
      display: block;
      font-size: 17px;
      line-height: 1.1;
      letter-spacing: -0.01em;
    }

    .brand small,
    .score-pill span {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .top-actions,
    .hud {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .pill,
    .icon-pill {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
      font: inherit;
      font-weight: 850;
      text-decoration: none;
      cursor: pointer;
      transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
    }

    .pill {
      min-height: 42px;
      padding: 10px 16px;
    }

    .icon-pill {
      width: 44px;
      height: 44px;
      display: grid;
      place-items: center;
      font-size: 19px;
    }

    .pill:hover,
    .icon-pill:hover,
    .pill:focus-visible,
    .icon-pill:focus-visible {
      transform: translateY(-1px);
      border-color: var(--line-bright);
      background: rgba(255, 255, 255, 0.11);
      outline: none;
    }

    .pill-primary {
      border-color: rgba(103, 220, 255, 0.46);
      background: linear-gradient(135deg, #9df2ff, #bba5ff);
      color: #09233b;
      box-shadow: 0 18px 54px rgba(103, 220, 255, 0.22);
    }

    .hud {
      position: fixed;
      z-index: 4;
      left: 50%;
      bottom: 20px;
      width: min(940px, calc(100vw - 28px));
      transform: translateX(-50%);
      justify-content: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel);
      box-shadow: 0 20px 64px rgba(0, 0, 0, 0.28);
      backdrop-filter: blur(20px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 220ms ease, transform 220ms ease;
    }

    body[data-game-state="playing"] .hud,
    body[data-game-state="paused"] .hud,
    body[data-game-state="gameover"] .hud {
      opacity: 1;
      pointer-events: auto;
    }

    .score-pill {
      min-width: 112px;
      padding: 8px 14px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
    }

    .score-pill b {
      color: var(--text);
      font-size: 18px;
    }

    .effect-pill {
      min-width: 154px;
    }

    .combo-pill {
      min-width: 104px;
    }

    .overlay {
      position: fixed;
      z-index: 3;
      inset: 0;
      display: grid;
      place-items: center;
      padding: 96px 20px 28px;
      pointer-events: none;
      transition: opacity 260ms ease, transform 260ms ease;
    }

    body[data-game-state="playing"] .overlay,
    body[data-game-state="paused"] .overlay {
      opacity: 0;
      transform: translateY(-16px);
    }

    .error-panel {
      width: min(1210px, calc(100vw - 72px));
      display: grid;
      grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
      gap: clamp(22px, 3vw, 42px);
      align-items: stretch;
      transform: translateX(clamp(0px, 1.7vw, 22px));
      pointer-events: auto;
    }

    .copy-card,
    .preview-card {
      position: relative;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 28px;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
        var(--panel);
      box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(18px);
    }

    .copy-card {
      padding: clamp(28px, 3.2vw, 46px);
      min-height: clamp(540px, 64svh, 700px);
      display: grid;
      align-content: center;
    }

    .copy-card::before,
    .preview-card::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(116deg, transparent 0 18%, rgba(103, 220, 255, 0.16) 18% 23%, transparent 23% 58%, rgba(255, 226, 119, 0.1) 58% 63%, transparent 63%),
        repeating-linear-gradient(110deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 13px);
      opacity: 0.82;
    }

    .eyebrow {
      position: relative;
      z-index: 1;
      width: max-content;
      max-width: 100%;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 9px 13px;
      border: 1px solid var(--line-bright);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.08);
      color: var(--cyan);
      font-size: 13px;
      font-weight: 900;
    }

    .eyebrow::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--cyan);
      box-shadow: 0 0 18px var(--cyan);
    }

    h1 {
      position: relative;
      z-index: 1;
      margin: 20px 0 0;
      max-width: 760px;
      font-size: clamp(58px, 6.3vw, 106px);
      line-height: 0.86;
      letter-spacing: -0.055em;
      text-wrap: balance;
    }

    .lead,
    .microcopy {
      position: relative;
      z-index: 1;
      margin: 22px 0 0;
      max-width: 650px;
      color: var(--muted);
      font-size: clamp(17px, 1.45vw, 20px);
      line-height: 1.52;
    }

    .microcopy {
      margin-top: 14px;
      font-size: 14px;
      line-height: 1.5;
    }

    .actions {
      position: relative;
      z-index: 1;
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 24px;
    }

    .control-picker {
      position: relative;
      z-index: 1;
      display: inline-flex;
      gap: 6px;
      align-items: center;
      margin-top: 16px;
      padding: 6px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
    }

    .control-option {
      min-height: 36px;
      border: 0;
      border-radius: 999px;
      padding: 8px 14px;
      background: transparent;
      color: var(--muted);
      font: inherit;
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
      transition: background 180ms ease, color 180ms ease, transform 180ms ease;
    }

    .control-option:hover,
    .control-option:focus-visible {
      color: var(--text);
      outline: none;
    }

    .control-option.is-active {
      background: linear-gradient(135deg, #9df2ff, #bba5ff);
      color: #09233b;
      box-shadow: 0 10px 24px rgba(103, 220, 255, 0.18);
    }

    .tips {
      position: relative;
      z-index: 1;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 22px;
    }

    .tips span {
      padding: 9px 12px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .preview-card {
      min-height: clamp(560px, 66svh, 720px);
      padding: 18px;
      overflow: visible;
      isolation: isolate;
    }

    .preview-card::after {
      content: "";
      position: absolute;
      z-index: -1;
      inset: 16% 8% -8%;
      border-radius: 42%;
      background:
        radial-gradient(ellipse at 50% 56%, rgba(103, 220, 255, 0.28), transparent 68%),
        radial-gradient(ellipse at 48% 22%, rgba(255, 226, 119, 0.26), transparent 48%);
      filter: blur(28px);
      opacity: 0.9;
    }

    .preview-stage {
      position: relative;
      height: 100%;
      min-height: clamp(524px, calc(66svh - 36px), 684px);
      overflow: hidden;
      border: 1px solid rgba(177, 228, 255, 0.22);
      border-radius: 22px;
      background:
        radial-gradient(circle at 50% 18%, rgba(255, 233, 147, 0.78), transparent 13%),
        radial-gradient(circle at 50% 42%, rgba(103, 220, 255, 0.34), transparent 35%),
        linear-gradient(180deg, rgba(39, 101, 153, 0.78), rgba(8, 22, 48, 0.94));
      box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 -80px 110px rgba(7, 18, 34, 0.38);
      animation: previewSkyShift 9.5s ease-in-out infinite;
    }

    .preview-stage::before {
      content: "";
      position: absolute;
      z-index: 1;
      inset: auto -10% 0;
      height: 34%;
      background:
        radial-gradient(ellipse at 50% 0, rgba(139, 237, 255, 0.46), transparent 57%),
        linear-gradient(180deg, transparent, rgba(7, 18, 34, 0.48));
    }

    .preview-stage::after {
      content: "";
      position: absolute;
      z-index: 2;
      inset: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.78) 0 1px, transparent 2px),
        radial-gradient(circle at 76% 20%, rgba(255, 226, 119, 0.72) 0 1px, transparent 2px),
        radial-gradient(circle at 78% 72%, rgba(103, 220, 255, 0.62) 0 1px, transparent 2px),
        linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0 8%, transparent 8% 17%, rgba(255, 255, 255, 0.1) 17% 20%, transparent 20%);
      background-size: 120px 120px, 156px 156px, 134px 134px, auto;
      opacity: 0.6;
      animation: previewStarsDrift 7.5s linear infinite;
    }

    body[data-theme="light"] .preview-card {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(229, 248, 255, 0.44)),
        var(--panel);
      box-shadow: 0 30px 100px rgba(48, 126, 158, 0.18);
    }

    body[data-theme="light"] .preview-stage {
      border-color: rgba(33, 142, 181, 0.18);
      background:
        radial-gradient(circle at 50% 18%, rgba(255, 219, 83, 0.44), transparent 13%),
        radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.54), transparent 27%),
        linear-gradient(180deg, rgba(220, 246, 255, 0.92), rgba(166, 222, 238, 0.9) 57%, rgba(213, 245, 253, 0.96));
    }

    body[data-theme="light"] .preview-stage::before {
      background:
        radial-gradient(ellipse at 50% 0, rgba(255, 255, 255, 0.68), transparent 58%),
        linear-gradient(180deg, transparent, rgba(103, 190, 213, 0.24));
    }

    .preview-aura,
    .preview-orbit,
    .preview-platform,
    .preview-spark,
    .preview-lane,
    .preview-catch-ring,
    .preview-danger-ring,
    .preview-score-pop,
    .preview-combo-pop {
      position: absolute;
      pointer-events: none;
    }

    .preview-lane {
      z-index: 1;
      top: -14%;
      width: 2px;
      height: 78%;
      border-radius: 999px;
      background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.34), transparent);
      box-shadow: 0 0 22px rgba(103, 220, 255, 0.22);
      opacity: 0.4;
      transform: rotate(13deg);
      animation: lanePulse 3.8s ease-in-out infinite;
    }

    .preview-lane-left {
      left: 26%;
    }

    .preview-lane-mid {
      left: 51%;
      animation-delay: -1.2s;
    }

    .preview-lane-right {
      right: 25%;
      animation-delay: -2.1s;
    }

    .preview-aura {
      z-index: 2;
      left: 50%;
      bottom: 66px;
      width: min(72%, 300px);
      aspect-ratio: 0.82;
      border-radius: 50%;
      background:
        radial-gradient(ellipse at 50% 55%, rgba(255, 255, 255, 0.34), transparent 58%),
        radial-gradient(ellipse at 50% 40%, rgba(103, 220, 255, 0.34), transparent 68%);
      border: 1px solid rgba(255, 255, 255, 0.16);
      box-shadow:
        0 0 46px rgba(103, 220, 255, 0.2),
        inset 0 0 42px rgba(255, 255, 255, 0.1);
      transform: translateX(-50%);
      animation: auraPulse 4.2s ease-in-out infinite;
    }

    .preview-orbit {
      z-index: 3;
      left: 50%;
      bottom: 166px;
      width: min(72%, 318px);
      height: 104px;
      border: 1px solid rgba(103, 220, 255, 0.32);
      border-left-color: transparent;
      border-right-color: transparent;
      border-radius: 50%;
      transform: translateX(-50%) rotate(-11deg);
      opacity: 0.68;
      animation: orbitSweep 5.2s ease-in-out infinite;
    }

    .preview-orbit-two {
      bottom: 142px;
      width: min(64%, 278px);
      height: 78px;
      border-color: rgba(255, 226, 119, 0.28);
      border-top-color: transparent;
      transform: translateX(-50%) rotate(18deg);
      opacity: 0.5;
      animation: orbitSweepAlt 6.4s ease-in-out infinite;
    }

    .preview-platform {
      z-index: 3;
      left: 50%;
      bottom: 32px;
      width: min(56%, 238px);
      height: 34px;
      border-radius: 50%;
      background:
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.6), rgba(103, 220, 255, 0.28) 42%, transparent 72%);
      filter: blur(1px);
      transform: translateX(-50%);
    }

    .preview-catch-ring {
      z-index: 5;
      left: 50%;
      bottom: 104px;
      width: min(46%, 176px);
      aspect-ratio: 1;
      border: 2px solid rgba(103, 220, 255, 0.42);
      border-radius: 50%;
      box-shadow:
        0 0 30px rgba(103, 220, 255, 0.28),
        inset 0 0 26px rgba(255, 255, 255, 0.12);
      opacity: 0;
      transform: translateX(-50%) scale(0.76);
      animation: catchPulse 4.8s ease-in-out infinite;
    }

    .preview-danger-ring {
      z-index: 5;
      right: 58px;
      bottom: 124px;
      width: 92px;
      aspect-ratio: 1;
      border: 2px solid rgba(179, 108, 255, 0.52);
      border-radius: 50%;
      box-shadow:
        0 0 28px rgba(179, 108, 255, 0.34),
        inset 0 0 24px rgba(179, 108, 255, 0.14);
      animation: dangerPulse 2.2s ease-in-out infinite;
    }

    .preview-spark {
      z-index: 5;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: #fff3a4;
      box-shadow: 0 0 18px rgba(255, 226, 119, 0.72);
      animation: sparkTwinkle 2.6s ease-in-out infinite;
    }

    .preview-spark-one {
      left: 30%;
      top: 30%;
    }

    .preview-spark-two {
      right: 31%;
      top: 24%;
      width: 6px;
      height: 6px;
      background: #93ecff;
      box-shadow: 0 0 16px rgba(103, 220, 255, 0.78);
      animation-delay: -0.8s;
    }

    .preview-spark-three {
      right: 24%;
      bottom: 33%;
      width: 7px;
      height: 7px;
      animation-delay: -1.6s;
    }

    .preview-cat {
      position: absolute;
      z-index: 4;
      left: 50%;
      bottom: 46px;
      width: min(60%, 286px);
      transform: translateX(-50%);
      filter:
        drop-shadow(0 22px 18px rgba(0, 0, 0, 0.34))
        drop-shadow(0 0 20px rgba(103, 220, 255, 0.24));
      animation: previewFloat 3.2s ease-in-out infinite;
    }

    .preview-score-pop,
    .preview-combo-pop {
      z-index: 7;
      left: 50%;
      bottom: 198px;
      min-width: 54px;
      padding: 7px 10px;
      border: 1px solid rgba(255, 255, 255, 0.36);
      border-radius: 999px;
      color: #09233b;
      background: linear-gradient(135deg, #ffe277, #9df2ff);
      font-size: 14px;
      font-weight: 950;
      text-align: center;
      box-shadow: 0 14px 32px rgba(103, 220, 255, 0.28);
      opacity: 0;
      transform: translate(-50%, 16px) scale(0.82);
      animation: scorePop 4.8s ease-in-out infinite;
    }

    .preview-combo-pop {
      left: 62%;
      bottom: 234px;
      min-width: 46px;
      background: linear-gradient(135deg, #bba5ff, #ff8bc2);
      animation-delay: -1.6s;
    }

    .preview-item {
      position: absolute;
      z-index: 6;
      width: 84px;
      height: 84px;
      object-fit: contain;
      filter:
        saturate(1.08)
        drop-shadow(0 12px 14px rgba(0, 0, 0, 0.2))
        drop-shadow(0 0 12px rgba(103, 220, 255, 0.18));
      animation: itemBob 3.4s ease-in-out infinite;
    }

    .preview-item.star-a {
      top: 82px;
      left: 60px;
      width: 74px;
      height: 74px;
      animation: previewFallA 4.8s ease-in-out infinite;
    }

    .preview-item.star-b {
      top: 132px;
      right: 52px;
      width: 86px;
      height: 86px;
      animation: previewFallB 5.4s ease-in-out -1.2s infinite;
    }

    .preview-item.heart {
      top: 264px;
      left: 44px;
      width: 70px;
      height: 70px;
      animation: heartFloat 3.7s ease-in-out -0.6s infinite;
    }

    .preview-item.hole {
      bottom: 118px;
      right: 54px;
      width: 84px;
      height: 84px;
      animation: holeThreat 4.8s ease-in-out -1.8s infinite;
    }

    .mobile-controls {
      position: fixed;
      z-index: 6;
      inset: auto 0 98px;
      display: none;
      justify-content: space-between;
      padding: 0 20px;
      pointer-events: none;
    }

    .mobile-controls button {
      width: 76px;
      height: 76px;
      border: 1px solid var(--line-bright);
      border-radius: 50%;
      background: rgba(8, 20, 38, 0.54);
      color: var(--text);
      font-size: 32px;
      font-weight: 950;
      pointer-events: auto;
      backdrop-filter: blur(14px);
    }

    .toast {
      position: fixed;
      z-index: 7;
      top: 96px;
      left: 50%;
      width: min(520px, calc(100vw - 32px));
      transform: translateX(-50%) translateY(-8px);
      padding: 13px 16px;
      border: 1px solid var(--line-bright);
      border-radius: 18px;
      background: rgba(8, 20, 38, 0.82);
      box-shadow: 0 20px 70px rgba(0, 0, 0, 0.3);
      color: var(--text);
      text-align: center;
      font-weight: 850;
      opacity: 0;
      pointer-events: none;
      backdrop-filter: blur(18px);
      transition: opacity 180ms ease, transform 180ms ease;
    }

    body[data-theme="light"] .toast {
      background: rgba(248, 253, 255, 0.86);
      color: var(--text);
    }

    .toast.is-visible {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    @keyframes starfieldDrift {
      to {
        transform: translate3d(7%, 6%, 0);
      }
    }

    @keyframes previewSkyShift {
      0%, 100% {
        background-position: 0 0, 0 0, 0 0;
      }
      50% {
        background-position: 0 0, 24px -18px, 0 0;
      }
    }

    @keyframes previewStarsDrift {
      to {
        background-position: 120px 120px, -156px 156px, 134px -134px, 0 0;
      }
    }

    @keyframes previewFloat {
      50% {
        transform: translateX(-50%) translateY(-8px);
      }
    }

    @keyframes itemBob {
      50% {
        transform: translateY(-12px) rotate(5deg);
      }
    }

    @keyframes previewFallA {
      0% {
        opacity: 0;
        transform: translate3d(-18px, -86px, 0) rotate(-22deg) scale(0.72);
      }
      12%, 70% {
        opacity: 1;
      }
      74% {
        opacity: 1;
        transform: translate3d(106px, 228px, 0) rotate(18deg) scale(1);
      }
      82%, 100% {
        opacity: 0;
        transform: translate3d(128px, 278px, 0) rotate(38deg) scale(0.36);
      }
    }

    @keyframes previewFallB {
      0% {
        opacity: 0;
        transform: translate3d(28px, -104px, 0) rotate(18deg) scale(0.72);
      }
      14%, 66% {
        opacity: 1;
      }
      76% {
        opacity: 1;
        transform: translate3d(-96px, 174px, 0) rotate(-24deg) scale(1.04);
      }
      88%, 100% {
        opacity: 0;
        transform: translate3d(-128px, 238px, 0) rotate(-46deg) scale(0.4);
      }
    }

    @keyframes heartFloat {
      0%, 100% {
        transform: translate3d(0, 0, 0) rotate(-4deg) scale(1);
      }
      50% {
        transform: translate3d(8px, -12px, 0) rotate(5deg) scale(1.06);
      }
    }

    @keyframes holeThreat {
      0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
        filter: saturate(1.08) drop-shadow(0 12px 14px rgba(0, 0, 0, 0.2)) drop-shadow(0 0 12px rgba(179, 108, 255, 0.18));
      }
      50% {
        transform: translate3d(-10px, 8px, 0) rotate(18deg) scale(1.08);
        filter: saturate(1.18) drop-shadow(0 16px 18px rgba(0, 0, 0, 0.26)) drop-shadow(0 0 24px rgba(179, 108, 255, 0.36));
      }
    }

    @keyframes lanePulse {
      50% {
        opacity: 0.74;
        transform: rotate(13deg) translateY(18px);
      }
    }

    @keyframes orbitSweep {
      50% {
        transform: translateX(-50%) rotate(-2deg) scaleX(1.05);
        opacity: 0.9;
      }
    }

    @keyframes orbitSweepAlt {
      50% {
        transform: translateX(-50%) rotate(30deg) scaleX(0.96);
        opacity: 0.72;
      }
    }

    @keyframes catchPulse {
      64% {
        opacity: 0;
        transform: translateX(-50%) scale(0.76);
      }
      72% {
        opacity: 0.86;
        transform: translateX(-50%) scale(0.96);
      }
      86%, 100% {
        opacity: 0;
        transform: translateX(-50%) scale(1.34);
      }
    }

    @keyframes dangerPulse {
      0%, 100% {
        opacity: 0.4;
        transform: scale(0.88);
      }
      50% {
        opacity: 0.95;
        transform: scale(1.08);
      }
    }

    @keyframes scorePop {
      0%, 62% {
        opacity: 0;
        transform: translate(-50%, 16px) scale(0.82);
      }
      72% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
      }
      88%, 100% {
        opacity: 0;
        transform: translate(-50%, -24px) scale(0.96);
      }
    }

    @keyframes auraPulse {
      50% {
        opacity: 0.68;
        transform: translateX(-50%) scale(1.035);
      }
    }

    @keyframes sparkTwinkle {
      0%, 100% {
        opacity: 0.32;
        transform: scale(0.72);
      }
      50% {
        opacity: 1;
        transform: scale(1.18);
      }
    }

    @media (min-width: 921px) and (max-height: 820px) {
      .overlay {
        padding-top: 84px;
      }

      .copy-card {
        min-height: clamp(500px, calc(100svh - 124px), 620px);
      }

      .preview-card {
        min-height: clamp(500px, calc(100svh - 124px), 640px);
      }

      .preview-stage {
        min-height: clamp(464px, calc(100svh - 160px), 604px);
      }

      h1 {
        font-size: clamp(52px, 5.4vw, 88px);
      }
    }

    @media (max-width: 920px) {
      .topbar {
        top: 10px;
        width: min(100vw - 20px, 680px);
        gap: 10px;
        border-radius: 24px;
      }

      .top-actions {
        gap: 8px;
      }

      .top-actions .icon-pill {
        display: none;
      }

      .hud {
        bottom: 10px;
        border-radius: 24px;
        flex-wrap: wrap;
      }

      .score-pill {
        min-width: 0;
        flex: 1 1 88px;
        text-align: center;
      }

      .error-panel {
        width: min(680px, 100%);
        grid-template-columns: 1fr;
        transform: none;
      }

      .overlay {
        overflow: auto;
        place-items: start center;
        padding-top: 92px;
      }

      .preview-card {
        min-height: 360px;
      }

      .copy-card {
        min-height: auto;
      }

      .preview-stage {
        min-height: 326px;
      }

      .preview-cat {
        bottom: 36px;
        width: min(46%, 190px);
      }

      .preview-aura {
        bottom: 44px;
        width: min(60%, 220px);
      }

      .preview-orbit {
        bottom: 120px;
        width: min(62%, 220px);
      }

      .preview-orbit-two {
        bottom: 104px;
        width: min(54%, 190px);
      }

      .preview-platform {
        bottom: 22px;
        width: min(48%, 180px);
      }

      .preview-catch-ring {
        bottom: 78px;
        width: min(40%, 132px);
      }

      .preview-danger-ring {
        right: 18%;
        bottom: 76px;
        width: 66px;
      }

      .preview-score-pop {
        bottom: 146px;
      }

      .preview-combo-pop {
        bottom: 172px;
      }

      .preview-item {
        width: 58px;
        height: 58px;
      }

      .preview-item.star-a {
        left: 18%;
        top: 72px;
      }

      .preview-item.star-b {
        right: 17%;
        top: 92px;
        width: 64px;
        height: 64px;
      }

      .preview-item.heart {
        left: 17%;
        top: 176px;
      }

      .preview-item.hole {
        right: 18%;
        bottom: 70px;
        width: 64px;
        height: 64px;
      }

      body[data-game-state="playing"] .mobile-controls,
      body[data-game-state="paused"] .mobile-controls {
        display: flex;
      }
    }

    @media (max-width: 560px) {
      .topbar {
        padding-inline: 10px;
      }

      .brand strong {
        font-size: 14px;
      }

      .brand small {
        font-size: 11px;
      }

      .brand img {
        width: 40px;
        height: 40px;
      }

      .top-actions .pill-primary {
        padding-inline: 12px;
        font-size: 13px;
      }

      .top-actions .pill:not(.pill-primary) {
        padding-inline: 12px;
        font-size: 13px;
      }

      .copy-card {
        padding: 24px;
        border-radius: 22px;
      }

      h1 {
        font-size: clamp(52px, 18vw, 76px);
      }

      .lead {
        font-size: 16px;
      }

      .actions .pill {
        width: 100%;
        justify-content: center;
      }

      .control-picker {
        display: none;
      }

      .tips span {
        flex: 1 1 100%;
        text-align: center;
      }

    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
      }
    }
