﻿    * {
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
      margin: 0;
      padding: 0;
    }

	    html,
	    body {
	      width: 100%;
	      height: 100%;
	      overflow: hidden;
	      overscroll-behavior: none;
	      font-family: "Lilita One", "Arial Black", "Impact", sans-serif;
	    }

      :root {
        --hud-h: 130px;
      }

    body {
      display: flex;
      align-items: center;
      justify-content: center;
      background: #0D0820 url("assets/night/fon.png") center center / cover no-repeat fixed;
      padding-bottom: env(safe-area-inset-bottom);
    }

    button {
      border: 0;
      background: none;
      color: inherit;
      font: inherit;
      cursor: pointer;
    }

    button,
    [role="button"],
    a,
    input,
    select,
    textarea,
    .board-cell,
    .start-play-btn,
    .start-icon-btn,
    .start-leaderboard-btn,
    .settings-btn,
    .reward-btn,
    .play-again-btn,
    .start-panel-close,
    .reward-share-close {
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }

    .rotate-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 9999;
      background: #0D0820;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 16px;
    }

    .rotate-icon {
      font-size: 48px;
      animation: rotateSpin 2s linear infinite;
    }

    .rotate-text {
      color: rgba(255, 241, 201, 0.9);
      font-family: "Lilita One", sans-serif;
      font-size: 20px;
      text-align: center;
    }

    @keyframes rotateSpin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    /* ===== START SCREEN ===== */
    .start-screen {
      position: fixed;
      inset: 0;
      z-index: 50;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      background: #0D0820 url("assets/img/backgrounds/background_home.png") center center / cover no-repeat;
      transition: opacity 0.5s ease;
    }

    @media (max-width: 820px) and (orientation: landscape) {
      .rotate-overlay {
        display: flex;
      }
    }

    .start-screen::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        linear-gradient(180deg, rgba(8, 10, 28, 0.62) 0%, rgba(8, 10, 28, 0.38) 22%, rgba(8, 10, 28, 0.08) 48%, rgba(8, 10, 28, 0) 68%);
      pointer-events: none;
      z-index: 0;
      transition: var(--before-transition, opacity 0.55s ease);
    }

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

    .start-screen.hidden::before {
      opacity: 0;
    }

    .start-screen.onboarding-active::before {
      opacity: 1;
    }

    .start-content {
      position: absolute;
      inset: 0;
      left: 50%;
      transform: translateX(-50%) translateY(-6.5vh);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 5px;
      max-width: 900px;
      width: 100%;
      padding: 0 20px;
      z-index: 3;
      transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
    }

    .start-screen.onboarding-active .start-content {
      opacity: 0;
      transform: translateX(-50%) translateY(calc(-6.5vh + 20px));
    }

    .start-screen.onboarding-active .char-zone {
      opacity: 0;
      transform: translateY(16px);
    }

    .start-screen.hidden .start-content {
      opacity: 0;
      transform: translateX(-50%) translateY(-7.8vh);
    }

    .start-content > * {
      opacity: 0;
      transform: translateY(20px);
      animation: fadeInUp 0.6s ease forwards;
    }

    .start-content > *:nth-child(1) { animation-delay: 0.2s; }
    .start-content > *:nth-child(2) { animation-delay: 0.5s; }
    .start-content > *:nth-child(3) { animation-delay: 0.8s; }
    .start-content > *:nth-child(4) { animation-delay: 1s; }
    .start-content > *:nth-child(5) { animation-delay: 1.1s; }
    .start-content > *:nth-child(6) { animation-delay: 1.2s; }

    .start-pretitle {
      width: 100%;
      max-width: 620px;
      height: auto;
      margin: 0 0 -46px;
      overflow: visible;
      filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.45));
    }

    .start-pretitle-text {
      fill: rgba(255, 250, 245, 0.98);
      font-family: "Bungee Shade", "Lilita One", "Arial Black", sans-serif;
      font-size: 38px;
      letter-spacing: 1px;
      paint-order: stroke fill;
      stroke: rgba(39, 18, 10, 0.6);
      stroke-width: 6px;
      stroke-linejoin: round;
    }

    .start-logo {
      width: 100%;
      max-width: 780px;
      height: auto;
      filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.6));
      animation: fadeInUp 0.6s ease 0.5s forwards;
      margin-top: -104px;
      margin-bottom: 0;
    }

    .start-play-btn {
      width: 314px;
      height: 78px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: -46px;
      font-family: "Lilita One", "Arial Black", sans-serif;
      font-size: 46px;
      color: #fff;
      line-height: 1;
      text-shadow: 0 3px 0 rgba(30, 80, 15, 0.9), 0 0 15px rgba(255, 255, 255, 0.15);
      letter-spacing: 4px;
      background: linear-gradient(180deg, #7be052 0%, #5cb340 40%, #3a8520 100%);
      border: none;
      border-radius: 45px;
      box-shadow:
        0 8px 0 #2a6010,
        0 12px 24px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(123, 224, 82, 0.25),
        0 0 50px rgba(123, 224, 82, 0.1),
        inset 0 3px 0 rgba(255, 255, 255, 0.35),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15);
      transition: transform 0.1s;
      position: relative;
      overflow: hidden;
      will-change: transform, box-shadow, filter;
    }

    .start-play-btn::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 50%;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent);
      border-radius: 45px 45px 0 0;
      pointer-events: none;
    }

    .start-play-btn::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: 45px;
      background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.24), transparent 55%);
      opacity: 0;
      transition: opacity 0.18s ease;
      pointer-events: none;
    }

    .start-play-btn:hover {
      transform: translateY(-4px) scale(1.028);
      box-shadow:
        0 11px 0 #2a6010,
        0 18px 28px rgba(0, 0, 0, 0.54),
        0 0 32px rgba(123, 224, 82, 0.34),
        0 0 60px rgba(123, 224, 82, 0.16),
        inset 0 3px 0 rgba(255, 255, 255, 0.42),
        inset 0 -4px 8px rgba(0, 0, 0, 0.18);
      filter: saturate(1.08) brightness(1.04);
    }

    .start-play-btn:hover::after {
      opacity: 1;
    }

    .start-play-btn:active {
      transform: translateY(4px);
      box-shadow:
        0 2px 0 #2a6010,
        0 4px 10px rgba(0, 0, 0, 0.4),
        inset 0 3px 0 rgba(255, 255, 255, 0.35);
    }

    .phone-gate-overlay {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background:
        radial-gradient(circle at top, rgba(123, 224, 82, 0.14), transparent 38%),
        rgba(8, 6, 18, 0.72);
      backdrop-filter: blur(12px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.22s ease;
      z-index: 60;
    }

    .phone-gate-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    .phone-gate-modal {
      width: min(100%, 430px);
      padding: 28px 24px 22px;
      border-radius: 28px;
      border: 1px solid rgba(255, 224, 153, 0.28);
      background:
        radial-gradient(circle at top, rgba(255, 239, 186, 0.16), transparent 38%),
        linear-gradient(180deg, rgba(29, 18, 54, 0.98), rgba(14, 8, 26, 0.98));
      box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
      transform: translateY(16px) scale(0.96);
      transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .phone-gate-overlay.active .phone-gate-modal {
      transform: translateY(0) scale(1);
    }

    .phone-gate-kicker {
      margin: 0 0 8px;
      color: rgba(255, 221, 134, 0.92);
      font-size: 12px;
      letter-spacing: 1.6px;
      text-transform: uppercase;
      text-align: center;
    }

    .phone-gate-title {
      margin: 0;
      color: #fff1c7;
      font-family: "Lilita One", "Arial Black", sans-serif;
      font-size: 34px;
      line-height: 1;
      text-align: center;
      text-shadow: 0 3px 12px rgba(0, 0, 0, 0.34);
    }

    .phone-gate-text {
      margin: 12px 0 0;
      color: rgba(255, 243, 210, 0.9);
      font-size: 15px;
      line-height: 1.45;
      text-align: center;
    }

    .phone-gate-field {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 18px;
    }

    .phone-gate-label {
      color: #f7e7b6;
      font-family: "Lilita One", "Arial Black", sans-serif;
      font-size: 18px;
      letter-spacing: 0.4px;
      text-align: center;
    }

    .phone-gate-input {
      width: 100%;
      height: 60px;
      padding: 0 18px;
      border: 2px solid rgba(255, 222, 138, 0.34);
      border-radius: 18px;
      background: rgba(255, 250, 239, 0.98);
      color: #3a2415;
      font-family: "Lilita One", "Arial Black", sans-serif;
      font-size: 28px;
      line-height: 1;
      text-align: center;
      letter-spacing: 1px;
      outline: none;
      user-select: text;
      -webkit-user-select: text;
      box-shadow: inset 0 3px 10px rgba(75, 43, 17, 0.12);
      transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
    }

    .phone-gate-input::placeholder {
      color: rgba(91, 59, 36, 0.5);
      letter-spacing: 0.4px;
    }

    .phone-gate-input:focus {
      border-color: rgba(123, 224, 82, 0.95);
      box-shadow:
        inset 0 3px 10px rgba(75, 43, 17, 0.12),
        0 0 0 4px rgba(123, 224, 82, 0.18);
      transform: translateY(-1px);
    }

    .phone-gate-input.invalid {
      border-color: rgba(255, 111, 111, 0.95);
      box-shadow:
        inset 0 3px 10px rgba(75, 43, 17, 0.12),
        0 0 0 4px rgba(255, 111, 111, 0.16);
    }

    .phone-gate-hint,
    .phone-gate-error {
      margin: 0;
      text-align: center;
      font-size: 13px;
      line-height: 1.35;
    }

    .phone-gate-hint {
      color: rgba(255, 241, 201, 0.82);
    }

    .phone-gate-error {
      min-height: 18px;
      color: #ff9b9b;
    }

    .phone-gate-actions {
      display: flex;
      justify-content: center;
      gap: 12px;
      margin-top: 18px;
    }

    .phone-gate-submit,
    .phone-gate-cancel {
      min-width: 148px;
      height: 52px;
      border: none;
      border-radius: 999px;
      font-family: "Lilita One", "Arial Black", sans-serif;
      font-size: 18px;
      letter-spacing: 1px;
      transition: transform 0.12s ease, filter 0.12s ease;
    }

    .phone-gate-submit {
      color: #fff;
      background: linear-gradient(180deg, #7be052 0%, #56ab36 44%, #34761b 100%);
      box-shadow: 0 6px 0 #295d13, 0 12px 20px rgba(0, 0, 0, 0.28);
    }

    .phone-gate-cancel {
      color: rgba(255, 236, 193, 0.9);
      background: linear-gradient(180deg, rgba(91, 56, 34, 0.92), rgba(51, 28, 14, 0.96));
      box-shadow: 0 6px 0 rgba(44, 21, 8, 0.9), 0 12px 20px rgba(0, 0, 0, 0.24);
    }

    .phone-gate-submit:hover,
    .phone-gate-cancel:hover {
      transform: translateY(-2px);
      filter: brightness(1.04);
    }

    .phone-gate-submit:active,
    .phone-gate-cancel:active {
      transform: translateY(3px);
    }

    .start-leaderboard-btn {
      width: 308px;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 12px;
      font-family: "Lilita One", "Arial Black", sans-serif;
      font-size: 17px;
      color: rgba(245, 200, 66, 0.82);
      line-height: 1;
      text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
      letter-spacing: 2px;
      white-space: nowrap;
      background: linear-gradient(180deg, rgba(85, 45, 24, 0.82), rgba(42, 21, 8, 0.92));
      border: 1px solid rgba(245, 200, 66, 0.28);
      border-radius: 35px;
      box-shadow: 0 3px 0 rgba(40, 18, 5, 0.72), 0 6px 12px rgba(0, 0, 0, 0.24);
      opacity: 0.88;
      transition: transform 0.1s, opacity 0.1s;
      position: relative;
      overflow: hidden;
      will-change: transform, box-shadow, filter;
    }

    .start-leaderboard-btn::before {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: 35px;
      background: linear-gradient(180deg, rgba(255, 233, 182, 0.16), transparent 45%);
      opacity: 0;
      transition: opacity 0.18s ease;
      pointer-events: none;
    }

    .start-leaderboard-btn:hover {
      transform: translateY(-3px) scale(1.02);
      opacity: 1;
      box-shadow:
        0 6px 0 rgba(40, 18, 5, 0.76),
        0 12px 18px rgba(0, 0, 0, 0.3),
        0 0 18px rgba(212, 160, 23, 0.12),
        inset 0 1px 0 rgba(255, 232, 180, 0.18);
      filter: saturate(1.05) brightness(1.03);
    }

    .start-leaderboard-btn:hover::before {
      opacity: 1;
    }

    .start-cta-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0;
      margin-top: -22px;
    }

    .start-utility-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0;
      margin-top: -4px;
    }

    .start-icon-btn {
      width: 408px;
      height: 276px;
      padding: 0;
      border: 0;
      background: none;
      border-radius: 0;
      box-shadow: none;
      transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
      will-change: transform, filter;
    }

    .start-icon-btn + .start-icon-btn {
      margin-left: -118px;
    }

    .start-icon-btn img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: center;
      display: block;
      filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.24));
      transition: filter 0.12s ease, transform 0.12s ease;
    }

    .start-icon-btn:hover {
      transform: translateY(-4px) scale(1.04);
      filter: brightness(1.04) saturate(1.05);
      opacity: 0.98;
    }

    .start-icon-btn:hover img {
      transform: scale(1.02);
      filter:
        drop-shadow(0 12px 20px rgba(0, 0, 0, 0.26))
        drop-shadow(0 0 10px rgba(255, 214, 112, 0.16));
    }

    .start-icon-btn:active {
      transform: translateY(2px) scale(0.985);
      filter: brightness(0.98);
      opacity: 1;
    }

    .start-icon-btn:active img {
      transform: scale(0.99);
      filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    }

    .start-meta {
      margin-top: 6px;
      padding: 8px 18px;
      border-radius: 999px;
      background: rgba(18, 11, 38, 0.58);
      border: 1px solid rgba(245, 200, 66, 0.24);
      color: rgba(255, 241, 201, 0.92);
      font-family: "Lilita One", "Arial Black", sans-serif;
      font-size: 14px;
      letter-spacing: 0.3px;
      text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
      backdrop-filter: blur(4px);
    }

    .speech-bubble {
      position: absolute;
      bottom: 51.5%;
      left: 15%;
      background: linear-gradient(180deg, #ffffff, #f0e8d8);
      color: #6B3A1F;
      font-family: "Lilita One", sans-serif;
      font-size: 18px;
      font-weight: bold;
      padding: 12px 24px;
      border-radius: 24px;
      border: 3px solid #D4A017;
      box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
      z-index: 2;
      opacity: 1;
      white-space: nowrap;
    }

    .speech-bubble::after {
      content: "";
      position: absolute;
      bottom: -14px;
      left: 78px;
      width: 0;
      height: 0;
      border-left: 12px solid transparent;
      border-right: 12px solid transparent;
      border-top: 14px solid #D4A017;
    }

    .speech-bubble::before {
      content: "";
      position: absolute;
      bottom: -10px;
      left: 80px;
      width: 0;
      height: 0;
      border-left: 10px solid transparent;
      border-right: 10px solid transparent;
      border-top: 11px solid #f0e8d8;
      z-index: 1;
    }

    .firefly {
      position: absolute;
      width: 4px;
      height: 4px;
      background: #FFE033;
      border-radius: 50%;
      box-shadow:
        0 0 6px 3px rgba(255, 220, 80, 0.6),
        0 0 12px 6px rgba(255, 220, 80, 0.2);
      pointer-events: none;
      z-index: 1;
      animation: fireflyMove 6s ease-in-out infinite, fireflyGlow 3s ease-in-out infinite;
    }

    .start-screen > .firefly:nth-child(2) { top: 60%; left: 30%; animation-delay: 0s, 0.5s; animation-duration: 7s, 2.5s; }
    .start-screen > .firefly:nth-child(3) { top: 70%; left: 55%; animation-delay: 1s, 0s; animation-duration: 8s, 3s; }
    .start-screen > .firefly:nth-child(4) { top: 50%; left: 75%; animation-delay: 2s, 1s; animation-duration: 6s, 3.5s; }
    .start-screen > .firefly:nth-child(5) { top: 65%; left: 45%; animation-delay: 0.5s, 1.5s; animation-duration: 9s, 2s; }
    .start-screen > .firefly:nth-child(6) { top: 75%; left: 20%; animation-delay: 3s, 0.5s; animation-duration: 7s, 4s; }
    .start-screen > .firefly:nth-child(7) { top: 55%; left: 85%; animation-delay: 1.5s, 2s; animation-duration: 8s, 3s; }
    .start-screen > .firefly:nth-child(8) { top: 80%; left: 60%; animation-delay: 2.5s, 0s; animation-duration: 6s, 2.5s; }
    .start-screen > .firefly:nth-child(9) { top: 45%; left: 40%; animation-delay: 0.5s, 1s; animation-duration: 10s, 3s; }

    .firefly.lower-firefly {
      z-index: 2;
      width: 5px;
      height: 5px;
      box-shadow:
        0 0 8px 4px rgba(255, 220, 80, 0.72),
        0 0 16px 8px rgba(255, 220, 80, 0.24);
    }

    .lower-firefly-1 { bottom: 18%; left: 34%; animation-delay: 0.8s, 0.1s; animation-duration: 7.5s, 2.8s; }
    .lower-firefly-2 { bottom: 13%; left: 49%; animation-delay: 1.6s, 0.9s; animation-duration: 8.8s, 3.2s; }
    .lower-firefly-3 { bottom: 20%; left: 67%; animation-delay: 2.2s, 1.4s; animation-duration: 6.8s, 2.6s; }
    .lower-firefly-4 { bottom: 10%; left: 57%; animation-delay: 0.3s, 1.1s; animation-duration: 9.2s, 3.4s; }

    .start-version {
      position: absolute;
      left: 50%;
      bottom: 12px;
      transform: translateX(-50%);
      color: rgba(255, 241, 201, 0.6);
      font-size: 12px;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
      z-index: 1;
    }

    .start-bottom-meta {
      position: relative;
      padding: 6px 14px;
      border-radius: 999px;
      background: rgba(18, 11, 38, 0.42);
      border: 1px solid rgba(245, 200, 66, 0.18);
      color: rgba(255, 241, 201, 0.88);
      font-family: "Lilita One", "Arial Black", sans-serif;
      font-size: 13px;
      letter-spacing: 0.2px;
      text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
      white-space: nowrap;
      margin-bottom: 4px;
    }

    @keyframes buttonHoverDrift {
      0% { transform: translateY(0) scale(1); }
      35% { transform: translateY(-1px) scale(1.012); }
      100% { transform: translateY(0) scale(1); }
    }

    @keyframes buttonTap {
      0% { transform: translateY(0) scale(1); }
      35% { transform: translateY(2px) scale(0.992); }
      100% { transform: translateY(0) scale(1); }
    }

    @keyframes fireflyMove {
      0%, 100% { transform: translate(0, 0); }
      25% { transform: translate(15px, -20px); }
      50% { transform: translate(-10px, -10px); }
      75% { transform: translate(20px, 10px); }
    }

    @keyframes fireflyGlow {
      0%, 100% { opacity: 0.3; }
      50% { opacity: 1; }
    }

    @keyframes fadeInUp {
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .char-zone {
      position: absolute;
      z-index: 3;
      cursor: pointer;
      transition: filter 0.3s, opacity 0.55s ease 0.1s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
    }

    .char-zone:hover {
      filter: brightness(1.08);
    }

    .char-babushka {
      bottom: 0;
      left: 2.8%;
      width: 24%;
      height: 61%;
    }

    .char-goat {
      bottom: 0;
      right: 4.2%;
      width: 22%;
      height: 56%;
    }

    .game {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      height: 100dvh;
      gap: 6px;
      width: min(100vw, 980px);
      max-height: 100vh;
      max-width: 100vw;
      padding: env(safe-area-inset-top, 8px) 8px env(safe-area-inset-bottom, 8px);
      opacity: 1;
      transform: translateY(0) scale(1);
      filter: blur(0);
      transition:
        opacity 0.58s ease,
        transform 0.72s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.58s ease;
    }

    .game.game-hidden {
      opacity: 0;
      transform: translateY(34px) scale(0.965);
      filter: blur(8px);
      pointer-events: none;
      visibility: hidden;
    }

	    .hud-bar {
        position: relative;
	      display: flex;
	      flex-direction: column;
        justify-content: center;
	      gap: 3px;
	      padding: 18px 36px 14px;
	      background: url("assets/img/ui/hud/hud_plank.png") center / 100% 100% no-repeat;
        border: none;
        border-radius: 0;
        box-shadow: none;
        box-sizing: border-box;
        filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
	      flex-shrink: 0;
	      width: 100%;
	      max-width: 560px;
        aspect-ratio: 1199 / 285;
        transition: filter 0.2s ease;
	    }

    .hud-bar.hud-critical {
      animation: hudCriticalPulse 0.95s ease-in-out infinite;
    }


	    .hud-row {
	      display: flex;
	      align-items: center;
	    }

	    .hud-row-top {
	      display: grid;
	      grid-template-columns: 1fr auto 1fr;
	      align-items: center;
	      column-gap: 6px;
	    }

	    .hud-row-bottom {
        display: flex;
	      justify-content: center;
        align-items: center;
        margin-top: 0;
	    }

	    .score-section {
	      display: flex;
	      align-items: center;
	      gap: 5px;
	      justify-self: start;
	      background: none;
        border: none;
	      padding: 0;
	    }

	    .timer-section {
	      display: flex;
	      align-items: center;
	      gap: 5px;
	      justify-self: center;
        justify-content: center;
	      background: none;
        border: none;
	      padding: 0;
	    }

    .coin-icon {
      width: 44px;
      height: 44px;
      background: url("assets/img/ui/hud/coin.png") center / contain no-repeat;
      transform-origin: 50% 58%;
      will-change: transform;
    }

	    .score-value {
	      font-family: "Lilita One", sans-serif;
	      font-size: 32px;
	      color: #FFF4D2;
	      font-weight: bold;
	      text-shadow:
	        0 3px 0 rgba(69, 30, 9, 0.82),
	        0 0 14px rgba(255, 244, 210, 0.18);
	      font-variant-numeric: tabular-nums;
	      line-height: 1;
        transform-origin: center;
        will-change: transform, color, text-shadow;
	    }

    .score-value.score-bump {
      animation: scoreValueBump 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .coin-icon.score-bump {
      animation: coinWobble 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .timer-icon {
      width: 46px;
      height: 46px;
      background: url("assets/img/ui/hud/time.png") center / contain no-repeat;
      flex-shrink: 0;
    }

	    .timer-value {
	      font-family: "Lilita One", sans-serif;
	      font-size: 34px;
	      letter-spacing: 1px;
	      color: #8EF4FF;
	      font-weight: bold;
	      text-shadow:
	        0 0 12px rgba(0, 229, 255, 0.2),
	        0 3px 0 rgba(28, 54, 58, 0.72);
	      font-variant-numeric: tabular-nums;
	      transition: color 0.2s ease, text-shadow 0.2s ease;
	      line-height: 1;
        display: inline-block;
        min-width: 5.2ch;
        text-align: left;
        flex-shrink: 0;
	    }

    .timer-value.timer-critical:not(.timer-heartbeat) {
      animation: timerCriticalShake 0.26s linear infinite;
    }

    .timer-value.timer-heartbeat:not(.timer-critical) {
      animation: timerHeartbeat 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .timer-value.timer-critical.timer-heartbeat {
      animation:
        timerCriticalShake 0.26s linear infinite,
        timerHeartbeat 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    }

	    .settings-btn {
	      width: 44px;
	      height: 44px;
	      background: url("assets/img/ui/hud/pause.png") center / contain no-repeat;
        border: none;
	      border-radius: 0;
        box-shadow: none;
	      transition: transform 0.15s ease, filter 0.15s ease;
	      flex-shrink: 0;
	      justify-self: end;
	    }

    .settings-btn:hover {
      transform: scale(1.12) rotate(15deg);
      filter: brightness(1.15);
    }

	    .timer-progress-wrap {
	      width: auto;
	      height: 8px;
	      background: rgba(0, 0, 0, 0.3);
	      border-radius: 6px;
	      overflow: hidden;
	      flex-shrink: 0;
	      margin: 2px 10px 0;
          border: 1px solid rgba(0, 0, 0, 0.12);
          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
	    }

    .timer-progress {
      height: 100%;
      width: 100%;
      background: linear-gradient(180deg, #4AEEFF 0%, #00C8E0 45%, #00A5BB 100%);
      border-radius: 5px;
      transition: width 1s linear;
      box-shadow:
        0 0 10px rgba(0, 229, 255, 0.45),
        0 0 3px rgba(0, 229, 255, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }

    .timer-progress.timer-critical {
      animation: timerProgressPulse 1s ease-in-out infinite;
    }

	    .goals-row {
	      display: flex;
	      align-items: center;
	      justify-content: center;
	      gap: 16px;
	      min-width: 0;
	      color: #F5C842;
	      text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
	      flex-wrap: nowrap;
        position: relative;
	    }

    .goal-bonus-score {
      position: absolute;
      left: 50%;
      bottom: calc(100% + 4px);
      transform: translateX(-50%);
      pointer-events: none;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      border-radius: 999px;
      background: rgba(58, 28, 4, 0.86);
      border: 1px solid rgba(255, 229, 138, 0.42);
      box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
      font-family: "Lilita One", sans-serif;
      line-height: 1;
      color: #FFE784;
      text-shadow:
        0 2px 0 rgba(58, 28, 4, 0.92),
        0 0 10px rgba(255, 222, 100, 0.92),
        0 0 20px rgba(255, 173, 32, 0.54),
        0 8px 16px rgba(0, 0, 0, 0.34);
      white-space: nowrap;
      z-index: 20;
      animation: goalBonusFloat 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .goal-bonus-label {
      font-size: 15px;
      letter-spacing: 0.6px;
      color: #FFD86E;
      text-transform: uppercase;
      opacity: 0.95;
    }

    .goal-bonus-points {
      font-size: 24px;
      color: #FFF2A5;
    }

	    .goal-item {
	      display: flex;
	      align-items: center;
	      gap: 3px;
	      background: none;
        border: none;
	      padding: 2px 4px;
	      border-radius: 0;
	      min-width: 0;
        position: relative;
        overflow: hidden;
        transition: filter 0.2s ease, opacity 0.2s ease;
	    }

    .goal-item:hover {
      background: none;
      filter: brightness(1.1);
    }

    @keyframes timerCriticalShake {
      0%, 100% { transform: translate(0, 0); }
      20% { transform: translate(calc(var(--timer-shake-distance, 1px) * -1), 0); }
      40% { transform: translate(var(--timer-shake-distance, 1px), 0); }
      60% { transform: translate(calc(var(--timer-shake-distance, 1px) * -0.8), 0); }
      80% { transform: translate(calc(var(--timer-shake-distance, 1px) * 0.8), 0); }
    }

    @keyframes goalBonusFloat {
      0% {
        opacity: 0;
        transform: translateX(-50%) translateY(4px) scale(0.7);
      }
      18% {
        opacity: 1;
        transform: translateX(-50%) translateY(-2px) scale(1.08);
      }
      100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-26px) scale(0.96);
      }
    }

    @keyframes timerHeartbeat {
      0% { transform: scale(1); }
      45% { transform: scale(1.15); }
      100% { transform: scale(1); }
    }

    @keyframes timerProgressPulse {
      0%, 100% { opacity: 0.7; }
      50% { opacity: 1; }
    }

    @keyframes hudCriticalPulse {
      0%, 100% {
        filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
      }
      50% {
        filter:
          drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45))
          drop-shadow(0 0 14px rgba(255, 51, 85, 0.4));
      }
    }

    .goal-item.goal-updated {
      animation: goalItemUpdatedFlash 0.4s ease-out;
    }

    .goal-item.goal-updated .goal-progress {
      animation: goalCountPop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .goal-item.goal-updated .goal-mini-icon {
      animation: goalIconBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .goal-item.goal-complete-flash {
      animation: goalItemCompleteFlash 0.6s ease-out;
    }

    .goal-item.goal-complete-flash .goal-mini-icon {
      animation:
        goalIconBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        goalIconCompleteGlow 0.6s ease-out;
    }

    .goal-item.done {
      opacity: 0.65;
      filter: grayscale(0.2);
    }

	    .goal-mini-icon {
	      width: 38px;
	      height: 38px;
	      object-fit: contain;
	      filter: 
	        drop-shadow(0 3px 5px rgba(0, 0, 0, 0.55))
	        drop-shadow(0 1px 1px rgba(255, 230, 180, 0.2));
	      flex-shrink: 0;
	    }

	    .goal-progress {
	      font-family: "Lilita One", sans-serif;
	      font-size: 22px;
	      color: #FFF4D2;
        font-weight: normal;
	      line-height: 1;
        display: inline-block;
        transform-origin: center;
        text-shadow:
          0 3px 0 rgba(69, 30, 9, 0.82),
          0 0 10px rgba(255, 244, 210, 0.15);
        letter-spacing: 0.2px;
	    }

	    .goal-target {
        font-size: 15px;
        line-height: 1;
        font-weight: 700;
        color: rgba(255, 244, 210, 0.45);
        text-shadow: 0 2px 0 rgba(69, 30, 9, 0.52);
        margin-left: -3px;
	    }

    .goal-progress.done {
      color: #5aff5a;
    }

    .goal-flyer {
      position: fixed;
      width: 16px;
      height: 16px;
      left: 0;
      top: 0;
      pointer-events: none;
      z-index: 20;
      opacity: 1;
      transition:
        left 0.56s cubic-bezier(0.22, 1, 0.36, 1),
        top 0.56s cubic-bezier(0.16, 0.84, 0.22, 1),
        opacity 0.18s ease-out;
    }

    .goal-flyer-icon {
      width: 100%;
      height: 100%;
      background-position: center;
      background-repeat: no-repeat;
      background-size: contain;
      filter:
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.28))
        drop-shadow(0 0 8px rgba(255, 248, 222, 0.35));
      animation: goalFlyArc 0.56s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    @keyframes goalItemUpdatedFlash {
      0% {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.05);
      }
      35% {
        background: rgba(245, 200, 66, 0.3);
        border-color: rgba(255, 225, 134, 0.38);
      }
      100% {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.05);
      }
    }

    @keyframes goalCountPop {
      0% { transform: scale(1); }
      45% { transform: scale(1.3); }
      100% { transform: scale(1); }
    }

    @keyframes goalIconBounce {
      0% { transform: translateY(0); }
      45% { transform: translateY(-6px); }
      70% { transform: translateY(1px); }
      100% { transform: translateY(0); }
    }

    @keyframes goalItemCompleteFlash {
      0% {
        background: rgba(90, 255, 90, 0.35);
        border-color: rgba(160, 255, 160, 0.5);
      }
      100% {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.05);
      }
    }

    @keyframes goalIconCompleteGlow {
      0% {
        filter:
          drop-shadow(0 0 0 rgba(90, 255, 90, 0))
          drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
      }
      30% {
        filter:
          drop-shadow(0 0 12px rgba(90, 255, 90, 0.9))
          drop-shadow(0 0 20px rgba(90, 255, 90, 0.5))
          drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
      }
      100% {
        filter:
          drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35))
          drop-shadow(0 0 4px rgba(90, 255, 90, 0.12));
      }
    }

    @keyframes goalFlyArc {
      0% {
        transform: translate(-50%, -50%) scale(0.72);
        opacity: 0.9;
      }
      35% {
        transform: translate(-50%, calc(-50% - 28px)) scale(1.18);
        opacity: 1;
      }
      100% {
        transform: translate(-50%, -50%) scale(0.68);
        opacity: 0;
      }
    }

	    .board-area {
	      flex: 1 1 0;
	      min-height: 0;
	      display: flex;
	      align-items: center;
	      justify-content: center;
	      width: 100%;
	    }

	    .board-wrap {
	      position: relative;
	      flex: 0 1 auto;
	      --board-layout: desktop;
	      width: min(96vw, calc(100dvh - var(--hud-h, 130px) - 16px));
	      height: min(96vw, calc(100dvh - var(--hud-h, 130px) - 16px));
	      aspect-ratio: 1;
	      max-height: none;
	      max-width: none;
	      min-height: 0;
	      background: url("assets/img/board/field_night.png") center / 100% 100% no-repeat;
        filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
        transition: filter 0.3s ease;
	    }

      .board-wrap.combo-glow {
        filter:
          drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5))
          drop-shadow(0 0 25px rgba(255, 200, 80, 0.25));
      }

	    .board-grid {
	        position: absolute;
	        inset: 0;
	        touch-action: none;
	      }

			      .board-cell {
		        position: absolute;
		        display: flex;
		        align-items: center;
		        justify-content: center;
		        padding: 0;
		        border: 0;
		        appearance: none;
		        -webkit-appearance: none;
		        -webkit-touch-callout: none;
		        box-sizing: border-box;
		        border-radius: 4px;
		        overflow: hidden;
		        background: transparent;
		        box-shadow: none;
		        transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
		      }

        .board-cell.shuffle-gather {
          transform:
            translate(var(--shuffle-x, 0px), var(--shuffle-y, 0px))
            rotate(var(--shuffle-rotate, 0deg))
            scale(0.5);
          transition: transform 0.3s ease-in, opacity 0.15s ease;
          z-index: 7;
        }

        .board-cell.shuffle-hidden {
          opacity: 0;
        }

        .board-cell.shuffle-reveal {
          transition:
            transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
            opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
          transition-delay: var(--shuffle-delay, 0ms);
        }

	      .board-cell.calibration-cell {
	        background: rgba(255, 236, 190, 0.08);
	        box-shadow: none;
	      }

	      .board-cell.calibration-cell::after {
	        content: "";
	        position: absolute;
	        inset: 0;
	        border-radius: 10px;
	        background: rgba(255, 236, 190, 0.03);
	        box-shadow:
	          inset 0 0 0 2px rgba(255, 219, 145, 0.74),
	          0 0 0 1px rgba(42, 18, 7, 0.28);
	        pointer-events: none;
	      }

	    .board-cell.selected {
	      animation: selectedPulse 1.05s ease-in-out infinite;
	      z-index: 2;
	    }

	    .board-cell.animating {
	      overflow: visible;
	      z-index: 4;
	    }

				    .tile {
				        width: 84%;
				        height: 84%;
				        background-color: transparent;
				        background-position: center;
				        background-repeat: no-repeat;
				        background-size: contain;
				        border-radius: 4px;
				        filter:
				          drop-shadow(0 6px 12px rgba(18, 8, 4, 0.42))
				          drop-shadow(0 2px 2px rgba(255, 232, 188, 0.24));
				        transition: transform 0.2s ease, filter 0.2s ease, opacity 0.3s ease;
				        display: block;
				      }

    @media (hover: hover) {
      .board-cell:hover {
        z-index: 2;
      }

      .board-cell:hover .tile {
        transform: translateY(-3px) scale(1.06);
        filter:
          brightness(1.1)
          drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35))
          drop-shadow(0 6px 12px rgba(18, 8, 4, 0.3))
          drop-shadow(0 2px 2px rgba(255, 232, 188, 0.24));
        transition: transform 0.15s ease-out, filter 0.15s ease-out, opacity 0.3s ease;
      }
    }

    .board-cell:active .tile {
      transform: translateY(2px) scale(0.88);
      filter:
        brightness(0.95)
        drop-shadow(0 3px 6px rgba(0, 0, 0, 0.22))
        drop-shadow(0 2px 4px rgba(18, 8, 4, 0.24));
      transition: transform 0.05s ease, filter 0.05s ease, opacity 0.3s ease;
    }

		    .tile-swapping {
		      position: relative;
		      z-index: 5;
          will-change: transform, filter;
		      transition: none;
		    }

		    .board-cell.selected .tile {
          transform: translateY(-4px);
		      filter:
		        drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4))
		        drop-shadow(0 0 8px var(--tile-glow))
		        drop-shadow(0 0 16px var(--tile-glow));
		    }

	    .board-cell.hint-glow {
	      overflow: visible;
	      z-index: 3;
	    }

	    .board-cell.hint-glow::after {
	      content: "";
	      position: absolute;
	      inset: 4%;
	      border-radius: 14px;
	      border: 2px solid rgba(255, 228, 117, 0.96);
	      box-shadow:
	        0 0 0 1px rgba(86, 42, 7, 0.45),
	        0 0 18px rgba(255, 204, 70, 0.7),
	        0 0 34px rgba(255, 186, 52, 0.5),
	        inset 0 0 12px rgba(255, 240, 182, 0.26);
	      pointer-events: none;
	      animation: hintHaloPulse 1.15s ease-in-out infinite;
	    }

	    .hint-glow .tile {
	      animation: hintSwayGlow 1.15s ease-in-out infinite;
	      transform-origin: 50% 72%;
	      will-change: transform, filter;
	    }

	    .hint-swap-arrow {
	      position: absolute;
	      height: 0;
	      border-top: 4px dashed rgba(255, 224, 112, 0.96);
	      border-radius: 999px;
	      pointer-events: none;
	      z-index: 11;
	      filter:
	        drop-shadow(0 0 6px rgba(255, 197, 64, 0.65))
	        drop-shadow(0 0 14px rgba(255, 170, 34, 0.42));
	      transform-origin: left center;
	      animation: hintArrowPulse 1.15s ease-in-out infinite;
	    }

	    .hint-swap-arrow::before {
	      content: "";
	      position: absolute;
	      left: 0;
	      right: 0;
	      top: -6px;
	      height: 12px;
	      border-radius: 999px;
	      background: linear-gradient(
	        90deg,
	        rgba(255, 224, 112, 0),
	        rgba(255, 224, 112, 0.34) 18%,
	        rgba(255, 244, 189, 0.92) 50%,
	        rgba(255, 224, 112, 0.34) 82%,
	        rgba(255, 224, 112, 0)
	      );
	      opacity: 0.78;
	      filter: blur(4px);
	    }

	    .hint-swap-arrow::after {
	      content: "";
	      position: absolute;
	      right: -1px;
	      top: -9px;
	      width: 16px;
	      height: 16px;
	      border-top: 4px solid rgba(255, 238, 170, 0.98);
	      border-right: 4px solid rgba(255, 238, 170, 0.98);
	      border-radius: 3px;
	      box-shadow:
	        0 0 10px rgba(255, 201, 76, 0.6),
	        0 0 18px rgba(255, 170, 34, 0.4);
	      transform: rotate(45deg);
	    }

	    .board-cell.matched {
	      pointer-events: none;
        overflow: visible;
        z-index: 6;
	    }

      .board-cell.matched::after {
        content: "";
        position: absolute;
        inset: 10%;
        border-radius: 50%;
        background: radial-gradient(
          circle,
          rgba(255, 255, 255, 0.95) 0%,
          var(--tile-glow) 34%,
          rgba(255, 255, 255, 0.08) 56%,
          rgba(255, 255, 255, 0) 78%
        );
        pointer-events: none;
        z-index: 1;
        animation: matchedCellGlow 0.48s ease-out forwards;
      }

	    .board-cell.matched .tile {
        position: relative;
        z-index: 2;
	      animation: matchedFlash 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
	    }

    .board-grid.busy {
      pointer-events: none;
    }

	    @keyframes matchedFlash {
	      0% {
          transform: scale(1) rotate(0deg) translate(0, 0);
          opacity: 1;
          filter:
            brightness(1)
            drop-shadow(0 6px 12px rgba(18, 8, 4, 0.42))
            drop-shadow(0 2px 2px rgba(255, 232, 188, 0.24));
        }
        18% {
          transform: scale(1.3) rotate(0deg) translate(0, 0);
          opacity: 1;
          filter:
            brightness(2)
            saturate(1.5)
            drop-shadow(0 0 18px rgba(255, 255, 255, 0.95))
            drop-shadow(0 0 28px rgba(255, 255, 255, 0.7));
        }
        34% {
          transform: scale(0.92) rotate(0deg) translate(0, 0);
          opacity: 1;
          filter:
            brightness(1.45)
            saturate(1.3)
            drop-shadow(0 0 14px rgba(255, 236, 177, 0.55));
        }
	      100% {
          transform:
            translate(var(--match-shift-x, 0px), var(--match-shift-y, 0px))
            rotate(var(--match-rotate, 18deg))
            scale(0);
          opacity: 0;
          filter:
            brightness(1.1)
            saturate(1.1)
            drop-shadow(0 0 10px rgba(255, 255, 255, 0.24));
        }
	    }

      @keyframes matchedCellGlow {
        0% {
          opacity: 0;
          transform: scale(0.6);
          box-shadow: 0 0 0 rgba(255, 255, 255, 0);
        }
        20% {
          opacity: 1;
          transform: scale(1.2);
          box-shadow:
            0 0 16px rgba(255, 255, 255, 0.85),
            0 0 28px var(--tile-glow);
        }
        55% {
          opacity: 0.58;
          transform: scale(1.05);
          box-shadow:
            0 0 12px rgba(255, 255, 255, 0.28),
            0 0 22px var(--tile-glow);
        }
        100% {
          opacity: 0;
          transform: scale(1.35);
          box-shadow:
            0 0 4px rgba(255, 255, 255, 0),
            0 0 12px var(--tile-glow);
        }
      }

	    @keyframes tileLanding {
	      0% {
          transform: translateY(0) scaleX(1) scaleY(1);
          filter:
            drop-shadow(0 8px 12px rgba(0, 0, 0, 0.22))
            drop-shadow(0 5px 10px rgba(18, 8, 4, 0.28))
            drop-shadow(0 1px 2px rgba(255, 232, 188, 0.12));
        }
        36% {
          transform: translateY(4px) scaleX(1.12) scaleY(0.85);
          filter:
            drop-shadow(0 3px 6px rgba(0, 0, 0, 0.16))
            drop-shadow(0 2px 6px rgba(18, 8, 4, 0.2))
            drop-shadow(0 1px 2px rgba(255, 232, 188, 0.12));
        }
        64% {
          transform: translateY(-2px) scaleX(0.97) scaleY(1.06);
          filter:
            drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22))
            drop-shadow(0 4px 8px rgba(18, 8, 4, 0.26))
            drop-shadow(0 1px 2px rgba(255, 232, 188, 0.14));
        }
        100% {
          transform: translateY(0) scaleX(1) scaleY(1);
          filter:
            drop-shadow(0 6px 12px rgba(18, 8, 4, 0.42))
            drop-shadow(0 2px 2px rgba(255, 232, 188, 0.24));
        }
	    }

	    @keyframes hintSwayGlow {
	      0% {
	        transform: rotate(0deg) scale(1);
	        filter:
	          brightness(1)
	          drop-shadow(0 6px 12px rgba(18, 8, 4, 0.42))
	          drop-shadow(0 2px 2px rgba(255, 232, 188, 0.24));
	      }
	      20% {
	        transform: rotate(-5deg) scale(1.06);
	        filter:
	          brightness(1.06)
	          drop-shadow(0 0 12px rgba(255, 219, 92, 0.72))
	          drop-shadow(0 6px 12px rgba(18, 8, 4, 0.42));
	      }
	      50% {
	        transform: rotate(0deg) scale(1.12);
	        filter:
	          brightness(1.16)
	          drop-shadow(0 0 18px rgba(255, 226, 110, 0.95))
	          drop-shadow(0 0 28px rgba(255, 186, 52, 0.52))
	          drop-shadow(0 6px 12px rgba(18, 8, 4, 0.42));
	      }
	      80% {
	        transform: rotate(5deg) scale(1.06);
	        filter:
	          brightness(1.08)
	          drop-shadow(0 0 12px rgba(255, 219, 92, 0.72))
	          drop-shadow(0 6px 12px rgba(18, 8, 4, 0.42));
	      }
	      100% {
	        transform: rotate(0deg) scale(1);
	        filter:
	          brightness(1)
	          drop-shadow(0 6px 12px rgba(18, 8, 4, 0.42))
	          drop-shadow(0 2px 2px rgba(255, 232, 188, 0.24));
	      }
	    }

	    @keyframes hintHaloPulse {
	      0%, 100% {
	        transform: scale(0.94);
	        opacity: 0.78;
	        box-shadow:
	          0 0 0 1px rgba(86, 42, 7, 0.45),
	          0 0 14px rgba(255, 204, 70, 0.52),
	          0 0 26px rgba(255, 186, 52, 0.36),
	          inset 0 0 10px rgba(255, 240, 182, 0.2);
	      }
	      50% {
	        transform: scale(1.04);
	        opacity: 1;
	        box-shadow:
	          0 0 0 1px rgba(86, 42, 7, 0.52),
	          0 0 24px rgba(255, 212, 84, 0.9),
	          0 0 42px rgba(255, 186, 52, 0.64),
	          inset 0 0 18px rgba(255, 244, 199, 0.36);
	      }
	    }

	    @keyframes hintArrowPulse {
	      0%, 100% {
	        opacity: 0.54;
	        filter:
	          drop-shadow(0 0 4px rgba(255, 197, 64, 0.5))
	          drop-shadow(0 0 10px rgba(255, 170, 34, 0.24));
	      }
	      50% {
	        opacity: 1;
	        filter:
	          drop-shadow(0 0 10px rgba(255, 212, 84, 0.9))
	          drop-shadow(0 0 20px rgba(255, 170, 34, 0.52));
	      }
	    }

	    @keyframes selectedPulse {
	      0%, 100% {
          transform: translateY(-4px) scale(1);
          box-shadow: 0 0 16px rgba(245, 200, 66, 0.4);
        }
	      50% {
          transform: translateY(-4px) scale(1.07);
          box-shadow: 0 0 16px rgba(245, 200, 66, 0.8);
        }
	    }

	    .particle {
	      position: absolute;
	      width: 6px;
	      height: 6px;
	      border-radius: 50%;
	      pointer-events: none;
	      z-index: 10;
	      animation: particleBurst 0.62s cubic-bezier(0.12, 0.72, 0.2, 1) forwards;
	    }

	    @keyframes particleBurst {
	      0% {
	        transform: translate(0, 0) rotate(var(--rot-start, 0deg)) scale(1);
	        opacity: 1;
	      }
	      100% {
	        transform: translate(var(--dx), var(--dy)) rotate(var(--rot-end, 360deg)) scale(0);
	        opacity: 0;
	      }
	    }

	    .float-score {
	      position: absolute;
	      left: 0;
	      top: 0;
	      pointer-events: none;
	      font-family: "Lilita One", sans-serif;
	      font-size: 30px;
        font-weight: 700;
	      color: #FFE784;
	      text-shadow:
          0 2px 0 rgba(58, 28, 4, 0.92),
          0 0 10px rgba(255, 222, 100, 0.92),
          0 0 20px rgba(255, 173, 32, 0.54),
          0 10px 18px rgba(0, 0, 0, 0.36);
        font-variant-numeric: tabular-nums;
        letter-spacing: 0.4px;
        white-space: nowrap;
	      z-index: 10;
	      animation: floatScorePop 1.08s cubic-bezier(0.22, 1, 0.36, 1) forwards;
	    }

    .float-score.combo-score {
      font-size: 34px;
      color: #FFC16B;
      text-shadow:
        0 2px 0 rgba(74, 24, 6, 0.96),
        0 0 12px rgba(255, 149, 54, 0.94),
        0 0 24px rgba(255, 86, 50, 0.54),
        0 10px 20px rgba(0, 0, 0, 0.38);
    }

    .float-score-points,
    .float-score-multiplier {
      display: inline-block;
    }

    .float-score-multiplier {
      margin-left: 6px;
      font-size: 0.72em;
      color: #FF6A47;
      text-shadow:
        0 2px 0 rgba(90, 20, 5, 0.92),
        0 0 10px rgba(255, 128, 64, 0.82);
    }

	    @keyframes floatScorePop {
	      0% {
	        opacity: 0;
	        transform: translate(-50%, -50%) scale(0.5);
	      }
        18% {
          opacity: 1;
          transform: translate(-50%, -58%) scale(1.3);
        }
        34% {
          opacity: 1;
          transform: translate(-50%, -64%) scale(1);
        }
	      100% {
	        opacity: 0;
	        transform: translate(-50%, calc(-50% - 60px)) scale(0.96);
	      }
	    }

    @keyframes scoreValueBump {
      0% {
        transform: scale(1);
        color: #D4A017;
        text-shadow:
          0 2px 0 rgba(0, 0, 0, 0.6),
          0 0 8px rgba(255, 214, 89, 0.12);
      }
      45% {
        transform: scale(1.25);
        color: #FFE033;
        text-shadow:
          0 2px 0 rgba(74, 32, 4, 0.74),
          0 0 12px rgba(255, 224, 88, 0.88),
          0 0 24px rgba(255, 170, 36, 0.4);
      }
      100% {
        transform: scale(1);
        color: #D4A017;
        text-shadow:
          0 2px 0 rgba(0, 0, 0, 0.6),
          0 0 8px rgba(255, 214, 89, 0.12);
      }
    }

    @keyframes coinWobble {
      0% { transform: rotate(0deg) scale(1); }
      30% { transform: rotate(-10deg) scale(1.08); }
      62% { transform: rotate(10deg) scale(1.08); }
      100% { transform: rotate(0deg) scale(1); }
    }

	    .combo-display {
	      position: absolute;
	      top: 50%;
	      left: 50%;
	      transform: translate(-50%, -50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
	      font-family: "Lilita One", sans-serif;
        --combo-color: #FFE033;
        --combo-size: 56px;
        --combo-label-size: 22px;
	      z-index: 15;
	      pointer-events: none;
	    }

      .combo-display::before,
      .combo-display::after {
        content: "";
        position: absolute;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        opacity: 0;
        pointer-events: none;
      }

      .combo-display-value {
        font-size: var(--combo-size);
        line-height: 0.92;
        color: var(--combo-color);
        white-space: nowrap;
      }

      .combo-display-label {
        font-size: var(--combo-label-size);
        line-height: 1;
        color: var(--combo-color);
        opacity: 0.8;
        white-space: nowrap;
      }

      .combo-tier-2 .combo-display-value {
        text-shadow:
          0 0 14px rgba(255, 224, 51, 0.62),
          0 0 28px rgba(255, 196, 64, 0.35),
          0 4px 0 rgba(0, 0, 0, 0.42);
        animation: comboTier2Value 0.72s ease-out forwards;
      }

      .combo-tier-2 .combo-display-label {
        text-shadow:
          0 0 10px rgba(255, 214, 90, 0.34),
          0 2px 0 rgba(0, 0, 0, 0.36);
        animation: comboTier2Label 0.72s ease-out forwards;
      }

      .combo-tier-3 {
        --combo-color: #FF8C42;
        --combo-size: 68px;
      }

      .combo-tier-3 .combo-display-value {
        text-shadow:
          0 0 18px rgba(255, 140, 66, 0.75),
          0 0 36px rgba(255, 113, 32, 0.45),
          0 5px 0 rgba(70, 18, 0, 0.5);
        animation: comboTier3Value 0.78s cubic-bezier(0.22, 1, 0.36, 1) forwards;
      }

      .combo-tier-3 .combo-display-label {
        text-shadow:
          0 0 12px rgba(255, 140, 66, 0.4),
          0 2px 0 rgba(0, 0, 0, 0.36);
        animation: comboTier3Label 0.78s ease-out forwards;
      }

      .combo-tier-4 {
        --combo-color: #FF3355;
        --combo-size: 80px;
      }

      .combo-tier-4 .combo-display-value {
        text-shadow:
          0 0 22px rgba(255, 51, 85, 0.85),
          0 0 42px rgba(255, 100, 72, 0.55),
          0 0 10px rgba(255, 255, 255, 0.72),
          0 6px 0 rgba(74, 0, 14, 0.58);
        animation: comboTier4Value 0.84s cubic-bezier(0.22, 1, 0.36, 1) forwards;
      }

      .combo-tier-4 .combo-display-label {
        text-shadow:
          0 0 16px rgba(255, 83, 101, 0.45),
          0 2px 0 rgba(0, 0, 0, 0.4);
        animation: comboTier4Label 0.84s ease-out forwards;
      }

      .combo-tier-4::before,
      .combo-tier-4::after,
      .combo-tier-5::before,
      .combo-tier-5::after {
        background:
          radial-gradient(circle, rgba(255, 255, 255, 0.98) 0%, rgba(255, 241, 171, 0.78) 42%, rgba(255, 255, 255, 0) 100%);
        box-shadow:
          0 0 14px rgba(255, 255, 255, 0.9),
          0 0 22px rgba(255, 122, 92, 0.55);
        animation: comboSparkBurst 0.6s ease-out forwards;
      }

      .combo-tier-4::before,
      .combo-tier-5::before {
        top: 10%;
        left: 18%;
      }

      .combo-tier-4::after,
      .combo-tier-5::after {
        top: 14%;
        right: 16%;
        animation-delay: 0.06s;
      }

      .combo-tier-5 {
        --combo-color: #FFFFFF;
      }

      .combo-tier-5 .combo-display-value {
        text-shadow:
          0 0 12px rgba(255, 255, 255, 0.95),
          0 0 18px rgba(255, 114, 189, 0.7),
          0 0 26px rgba(115, 191, 255, 0.7),
          0 0 34px rgba(255, 232, 82, 0.62),
          0 6px 0 rgba(25, 8, 46, 0.6);
        animation: comboTier5Value 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
      }

      .combo-tier-5 .combo-display-label {
        text-shadow:
          0 0 14px rgba(255, 255, 255, 0.5),
          0 0 18px rgba(115, 191, 255, 0.4),
          0 2px 0 rgba(0, 0, 0, 0.42);
        animation: comboTier5Label 0.9s ease-out forwards;
      }

      .board-wrap.screen-shake-1 {
        animation: boardShake1 0.15s linear 2;
      }

      .board-wrap.screen-shake-2 {
        animation: boardShake2 0.2s linear 3;
      }

      .board-wrap.screen-shake-3 {
        animation: boardShake3 0.25s linear 4;
      }

      .board-wrap.combo-flash-gold {
        animation: comboBoardFlashGold 0.3s ease-out;
      }

      .board-wrap.combo-flash-orange {
        animation: comboBoardFlashOrange 0.3s ease-out;
      }

      .board-wrap.combo-flash-red {
        animation: comboBoardFlashRed 0.3s ease-out;
      }

      .board-wrap.shuffle-flash {
        animation: shuffleBoardFlash 0.2s ease-out;
      }

      @keyframes comboTier2Value {
        0% {
          transform: scale(0.35);
          opacity: 0;
        }
        38% {
          transform: scale(1.18);
          opacity: 1;
        }
        68% {
          transform: scale(0.98);
          opacity: 1;
        }
        100% {
          transform: translateY(-18px) scale(1);
          opacity: 0;
        }
      }

      @keyframes comboTier2Label {
        0%, 12% {
          transform: scale(0.9);
          opacity: 0;
        }
        42% {
          transform: scale(1.04);
          opacity: 0.82;
        }
        100% {
          transform: translateY(-10px) scale(1);
          opacity: 0;
        }
      }

      @keyframes comboTier3Value {
        0% {
          transform: rotate(-5deg) scale(0.2);
          opacity: 0;
        }
        38% {
          transform: rotate(5deg) scale(1.5);
          opacity: 1;
        }
        62% {
          transform: rotate(-2deg) scale(0.97);
          opacity: 1;
        }
        100% {
          transform: translateY(-20px) rotate(0deg) scale(1);
          opacity: 0;
        }
      }

      @keyframes comboTier3Label {
        0%, 10% {
          transform: scale(0.88);
          opacity: 0;
        }
        45% {
          transform: scale(1.08);
          opacity: 0.82;
        }
        100% {
          transform: translateY(-10px) scale(1);
          opacity: 0;
        }
      }

      @keyframes comboTier4Value {
        0% {
          transform: rotate(-8deg) scale(0.1);
          opacity: 0;
        }
        36% {
          transform: rotate(8deg) scale(1.8);
          opacity: 1;
        }
        62% {
          transform: rotate(-4deg) scale(0.96);
          opacity: 1;
        }
        100% {
          transform: translateY(-22px) rotate(0deg) scale(1);
          opacity: 0;
        }
      }

      @keyframes comboTier4Label {
        0%, 10% {
          transform: scale(0.86);
          opacity: 0;
        }
        45% {
          transform: scale(1.1);
          opacity: 0.82;
        }
        100% {
          transform: translateY(-12px) scale(1);
          opacity: 0;
        }
      }

      @keyframes comboTier5Value {
        0% {
          transform: rotate(-10deg) scale(0.08);
          opacity: 0;
        }
        34% {
          transform: rotate(10deg) scale(1.95);
          opacity: 1;
        }
        58% {
          transform: rotate(-6deg) scale(0.94);
          opacity: 1;
        }
        100% {
          transform: translateY(-26px) rotate(0deg) scale(1);
          opacity: 0;
        }
      }

      @keyframes comboTier5Label {
        0%, 12% {
          transform: scale(0.84);
          opacity: 0;
        }
        44% {
          transform: scale(1.14);
          opacity: 0.82;
        }
        100% {
          transform: translateY(-12px) scale(1);
          opacity: 0;
        }
      }

      @keyframes comboSparkBurst {
        0% {
          transform: scale(0.2);
          opacity: 0;
        }
        30% {
          transform: scale(1);
          opacity: 1;
        }
        100% {
          transform: translateY(-12px) scale(0.4);
          opacity: 0;
        }
      }

      @keyframes boardShake1 {
        0%, 100% { transform: translate(0, 0); }
        25% { transform: translate(-2px, 1px); }
        50% { transform: translate(2px, -1px); }
        75% { transform: translate(-1px, 0); }
      }

      @keyframes boardShake2 {
        0%, 100% { transform: translate(0, 0); }
        20% { transform: translate(-4px, 2px); }
        40% { transform: translate(4px, -2px); }
        60% { transform: translate(-3px, 1px); }
        80% { transform: translate(3px, -1px); }
      }

      @keyframes boardShake3 {
        0%, 100% { transform: translate(0, 0); }
        16% { transform: translate(-6px, 2px); }
        32% { transform: translate(6px, -3px); }
        48% { transform: translate(-5px, 1px); }
        64% { transform: translate(5px, -2px); }
        80% { transform: translate(-3px, 1px); }
      }

      @keyframes comboBoardFlashGold {
        0% {
          filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
        }
        45% {
          filter:
            drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5))
            drop-shadow(0 0 24px rgba(255, 216, 90, 0.42));
        }
        100% {
          filter:
            drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5))
            drop-shadow(0 0 25px rgba(255, 200, 80, 0.25));
        }
      }

      @keyframes comboBoardFlashOrange {
        0% {
          filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
        }
        45% {
          filter:
            drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5))
            drop-shadow(0 0 28px rgba(255, 140, 66, 0.52));
        }
        100% {
          filter:
            drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5))
            drop-shadow(0 0 25px rgba(255, 200, 80, 0.25));
        }
      }

      @keyframes comboBoardFlashRed {
        0% {
          filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
        }
        45% {
          filter:
            drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5))
            drop-shadow(0 0 34px rgba(255, 51, 85, 0.58));
        }
        100% {
          filter:
            drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5))
            drop-shadow(0 0 25px rgba(255, 200, 80, 0.25));
        }
      }

      @keyframes shuffleBoardFlash {
        0% {
          box-shadow: 0 0 0 rgba(255, 255, 255, 0);
        }
        45% {
          box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
        }
        100% {
          box-shadow: 0 0 0 rgba(255, 255, 255, 0);
        }
      }

	    .overlay {
	      position: fixed;
      inset: 0;
      z-index: 20;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(13, 8, 32, 0.8);
      backdrop-filter: blur(8px);
	      opacity: 0;
	      pointer-events: none;
	      transition: opacity 0.4s ease;
	    }

      .overlay::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(
          ellipse at center,
          rgba(255, 80, 96, 0) 45%,
          rgba(120, 10, 24, 0.14) 100%
        );
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
      }

    .overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

      .overlay.loss {
        background: rgba(13, 8, 32, 0.88);
      }

      .overlay.loss::before {
        opacity: 1;
      }

    .modal {
      display: grid;
      grid-template-columns: 480px minmax(0, 1fr);
      align-items: center;
      column-gap: 28px;
      width: min(94vw, 1280px);
      min-height: min(78vh, 760px);
      padding: 30px 42px 34px;
      background:
        radial-gradient(circle at 26% 50%, rgba(255, 222, 122, 0.22) 0, rgba(255, 222, 122, 0) 34%),
        linear-gradient(180deg, #fffdfa 0%, #fff9f0 100%);
      border: 4px solid #f2af21;
      border-radius: 44px;
      box-shadow:
        0 30px 80px rgba(19, 7, 37, 0.34),
        0 10px 24px rgba(255, 184, 46, 0.18),
        inset 0 2px 0 rgba(255, 255, 255, 0.92);
      transform: scale(0.8);
      transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
      text-align: center;
      position: relative;
      box-sizing: border-box;
      overflow: hidden;
    }

    .modal::before {
      content: "";
      position: absolute;
      inset: 10px;
      border-radius: 32px;
      border: 2px solid rgba(255, 218, 134, 0.72);
      pointer-events: none;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

	    .overlay.active .modal {
	      transform: scale(1);
	    }

      .modal-title,
      .modal-score,
      .modal-reward-tier,
      .modal-stats,
      .modal-subtitle,
      .modal-rewards,
      .play-again-btn {
        opacity: 0;
      }

      .modal-jar-stage {
        opacity: 0;
      }

    .modal-copy {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      justify-content: center;
      gap: 20px;
      width: 100%;
      min-width: 0;
      padding: 6px 18px 6px 0;
    }

      .overlay.active .modal-title {
        animation: endFadeUp 0.25s ease-out 0.2s forwards;
      }

      .overlay.active .modal-jar-stage {
        animation: endBabushkaReveal 0.32s ease-out 0.5s forwards;
      }

      .overlay.active .modal-score {
        animation: endFadeUp 0.25s ease-out 1.2s forwards;
      }

      .overlay.active .modal-reward-tier {
        animation: endFadeUp 0.25s ease-out 1.34s forwards;
      }

      .overlay.active .modal-stats {
        animation: endFadeUp 0.28s ease-out 1.8s forwards;
      }

      .overlay.active .modal-subtitle {
        animation: endFadeUp 0.28s ease-out 1.95s forwards;
      }

      .overlay.active .modal-rewards {
        animation: endFadeUp 0.28s ease-out 2.08s forwards;
      }

      .overlay.active .play-again-btn {
        animation: endFadeUp 0.28s ease-out 2.24s forwards;
      }

	    .pause-overlay {
	      position: fixed;
	      inset: 0;
	      z-index: 20;
	      display: none;
	      align-items: center;
	      justify-content: center;
	      background: rgba(13, 8, 32, 0.08);
	      backdrop-filter: blur(6px);
	    }

	    .pause-overlay.active {
	      display: flex;
	    }

	    .pause-modal {
	      display: flex;
	      flex-direction: column;
	      align-items: center;
	      gap: 18px;
	      padding: 30px 42px;
	      background: linear-gradient(180deg, rgba(107, 58, 31, 0.95), rgba(44, 18, 6, 0.97));
	      border-radius: 24px;
	      border: 2px solid rgba(212, 160, 23, 0.4);
	      box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
	      text-align: center;
	    }

      .pause-modal > * {
        opacity: 0;
        transform: translateY(10px);
      }

      .pause-overlay.active .pause-modal > * {
        animation: pauseModalReveal 0.25s ease-out forwards;
      }

      .pause-overlay.active .pause-title {
        animation-delay: 0s;
      }

      .pause-overlay.active .pause-progress {
        animation-delay: 0.1s;
      }

      .pause-overlay.active .pause-resume-btn {
        animation-delay: 0.15s;
      }

      .pause-overlay.active .pause-restart-btn {
        animation-delay: 0.2s;
      }

      .pause-overlay.active .pause-menu-btn {
        animation-delay: 0.25s;
      }

	    .pause-title {
	      font-family: "Lilita One", sans-serif;
	      font-size: 36px;
	      color: #F5C842;
	      text-shadow:
	        0 2px 0 rgba(0, 0, 0, 0.6),
	        0 0 20px rgba(245, 200, 66, 0.3);
	    }

	    .pause-resume-btn {
	      margin-top: 4px;
	      padding: 14px 42px;
	      font-family: inherit;
	      font-size: 22px;
	      font-weight: bold;
	      color: #fff;
	      background: linear-gradient(180deg, #5cb340, #3a8520);
	      border: 2px solid rgba(255, 255, 255, 0.2);
	      border-radius: 14px;
	      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	      transition: transform 0.15s ease;
	    }

	    .pause-resume-btn:hover {
	      transform: translateY(-2px);
	    }

      .pause-progress {
        display: flex;
        align-items: stretch;
        justify-content: center;
        gap: 20px;
        width: 100%;
      }

      .pause-stat {
        min-width: 132px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 10px 14px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 241, 201, 0.12);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.08),
          0 8px 18px rgba(0, 0, 0, 0.18);
      }

      .pause-stat-icon,
      .pause-stat-value {
        font-family: "Lilita One", sans-serif;
      }

      .pause-stat-icon {
        font-size: 20px;
        line-height: 1;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.24));
      }

      .pause-stat-value {
        font-size: 20px;
        line-height: 1;
      }

      .pause-stat-score .pause-stat-value,
      .pause-stat-score .pause-stat-icon {
        color: #F5C842;
        text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
      }

      .pause-stat-time .pause-stat-value,
      .pause-stat-time .pause-stat-icon {
        color: #00E5FF;
        text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
      }

      .pause-restart-btn {
        padding: 12px 36px;
        font-family: inherit;
        font-size: 18px;
        font-weight: bold;
        color: #fff;
        background: linear-gradient(180deg, #FF8C42, #CC6A2E);
        border: 2px solid rgba(255, 255, 255, 0.18);
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.34);
        transition: transform 0.15s ease, filter 0.15s ease;
      }

      .pause-restart-btn:hover {
        transform: translateY(-2px);
        filter: brightness(1.05);
      }

      .pause-menu-btn {
        padding: 0;
        background: transparent;
        border: 0;
        font-family: inherit;
        font-size: 16px;
        color: rgba(255, 241, 201, 0.6);
        transition: color 0.15s ease;
      }

      .pause-menu-btn:hover {
        color: rgba(255, 241, 201, 0.9);
        text-decoration: underline;
      }

      @keyframes pauseModalReveal {
        0% {
          opacity: 0;
          transform: translateY(10px);
        }
        100% {
          opacity: 1;
          transform: translateY(0);
        }
      }

	    .tutorial-overlay {
	      position: fixed;
	      inset: 0;
	      z-index: 25;
	      background: rgba(13, 8, 32, 0.46);
	      display: none;
	      pointer-events: none;
	    }

	    .tutorial-overlay.active {
	      display: block;
	    }

	    .tutorial-highlight {
	      position: fixed;
	      z-index: 26;
	      border-radius: 20px;
	      border: 3px solid rgba(245, 200, 66, 0.95);
	      background: rgba(245, 200, 66, 0.08);
	      box-shadow:
	        0 0 0 2px rgba(255, 248, 196, 0.35) inset,
	        0 0 30px rgba(245, 200, 66, 0.45),
	        0 0 60px rgba(245, 200, 66, 0.22);
	      pointer-events: none;
	      display: none;
	    }

	    .tutorial-highlight.active {
	      display: block;
	    }

	    .tutorial-cell-highlight {
	      position: fixed;
	      z-index: 26;
	      border-radius: 12px;
	      border: 3px solid rgba(245, 200, 66, 0.98);
	      background: rgba(245, 200, 66, 0.12);
	      box-shadow:
	        0 0 0 2px rgba(255, 248, 196, 0.28) inset,
	        0 0 18px rgba(245, 200, 66, 0.55),
	        0 0 36px rgba(245, 200, 66, 0.24);
	      pointer-events: none;
	      animation: tutorialFocusPulse 1s ease-in-out infinite;
	    }

	    @keyframes tutorialFocusPulse {
	      0%, 100% {
	        transform: scale(1);
	        box-shadow:
	          0 0 0 2px rgba(255, 248, 196, 0.28) inset,
	          0 0 18px rgba(245, 200, 66, 0.55),
	          0 0 36px rgba(245, 200, 66, 0.24);
	      }
	      50% {
	        transform: scale(1.05);
	        box-shadow:
	          0 0 0 3px rgba(255, 248, 196, 0.4) inset,
	          0 0 24px rgba(255, 220, 90, 0.8),
	          0 0 44px rgba(245, 200, 66, 0.34);
	      }
	    }

	    .tutorial-card {
	      position: absolute;
	      z-index: 27;
	      max-width: 340px;
	      background: linear-gradient(180deg, rgba(107, 58, 31, 0.95), rgba(44, 18, 6, 0.97));
	      border-radius: 20px;
	      padding: 24px 28px;
	      box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
	      border: 2px solid rgba(212, 160, 23, 0.4);
	      display: flex;
	      flex-direction: column;
	      gap: 16px;
	      align-items: flex-start;
	      pointer-events: auto;
	    }

	    .tutorial-card.step-1 {
	      right: 24px;
	      top: 62%;
	      transform: translateY(-50%);
	    }

	    .tutorial-card.step-1::before {
	      content: "";
	      position: absolute;
	      left: -16px;
	      top: 50%;
	      transform: translateY(-50%);
	      border-top: 12px solid transparent;
	      border-bottom: 12px solid transparent;
	      border-right: 16px solid rgba(107, 58, 31, 0.95);
	    }

	    .tutorial-card.step-2 {
	      right: 20px;
	      top: 50%;
	      transform: translateY(-50%);
	    }

	    .tutorial-card.step-2::before {
	      content: "";
	      position: absolute;
	      left: -16px;
	      top: 50%;
	      transform: translateY(-50%);
	      border-top: 12px solid transparent;
	      border-bottom: 12px solid transparent;
	      border-right: 16px solid rgba(107, 58, 31, 0.95);
	    }

	    .tutorial-card.step-3 {
	      right: 24px;
	      top: 118px;
	    }

	    .tutorial-card.step-3::before {
	      content: "";
	      position: absolute;
	      left: -16px;
	      top: 50%;
	      transform: translateY(-50%);
	      border-top: 12px solid transparent;
	      border-bottom: 12px solid transparent;
	      border-right: 16px solid rgba(44, 18, 6, 0.97);
	    }

	    .tutorial-text {
	      font-size: 18px;
	      color: #fff;
	      line-height: 1.5;
	    }

	    .tutorial-btn {
	      align-self: center;
	      padding: 12px 34px;
	      font-family: inherit;
	      font-size: 20px;
	      font-weight: bold;
	      color: #fff;
	      background: linear-gradient(180deg, #5cb340, #3a8520);
	      border: 2px solid rgba(255, 255, 255, 0.2);
	      border-radius: 14px;
	      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	      transition: transform 0.15s ease;
	    }

	    .tutorial-btn:hover {
	      transform: translateY(-2px);
	    }

    .modal-jar-stage {
      position: relative;
      width: 420px;
      height: 560px;
      --jar-shift: 0px;
      justify-self: start;
      align-self: center;
      margin-left: -8px;
      background: none;
      box-shadow: none;
      overflow: visible;
    }

    .modal-jar-stage::before {
      content: "";
      position: absolute;
      left: 50%;
      top: 52%;
      width: 330px;
      height: 400px;
      transform: translate(-50%, -50%);
      border-radius: 46% 46% 42% 42%;
      background:
        radial-gradient(ellipse at center, rgba(255, 249, 224, 0.98) 0%, rgba(255, 232, 162, 0.78) 26%, rgba(255, 214, 107, 0.34) 52%, rgba(255, 214, 107, 0.1) 66%, rgba(255, 214, 107, 0) 78%);
      box-shadow:
        0 0 46px rgba(255, 219, 120, 0.28),
        0 0 96px rgba(255, 219, 120, 0.14);
      filter: blur(10px);
      opacity: 0.88;
      z-index: 0;
      pointer-events: none;
    }

    .modal-jar-svg,
    .modal-jar-frame,
    .modal-jar-splash {
      position: absolute;
      pointer-events: none;
      background-repeat: no-repeat;
      background-color: transparent;
    }

    .modal-jar-svg {
      left: 50%;
      top: 18px;
      width: 370px;
      height: 532px;
      transform: translateX(calc(-50% - var(--jar-shift)));
      overflow: visible;
      opacity: 0;
      display: none;
      transition: transform 0.18s ease, opacity 0.18s ease;
      z-index: 1;
    }

    .modal-jar-stage.is-animating .modal-jar-svg {
      transform: translateX(calc(-50% - var(--jar-shift))) translateY(-2px);
    }

    .modal-jar-frame {
      left: 50%;
      top: 22px;
      width: 370px;
      height: 548px;
      transform: translateX(calc(-50% - var(--jar-shift)));
      background: url("assets/night/banka_frames_clean/jar_fill_0.png") center / 100% 100% no-repeat;
      opacity: 0;
      z-index: 2;
      filter: drop-shadow(0 22px 20px rgba(204, 150, 44, 0.24));
    }

    .modal-jar-splash {
      left: 50%;
      right: auto;
      top: 74px;
      bottom: auto;
      width: 172px;
      height: 96px;
      inset: 74px auto auto 50%;
      transform: translateX(calc(-50% - var(--jar-shift))) scale(0.72);
      transform-origin: center bottom;
      background: none;
      opacity: 0;
      z-index: 3;
    }

    .modal-jar-splash.active {
      animation: milkSplashBurst 0.34s ease-out forwards;
    }

    .modal-stat {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      flex: 1 1 0;
      min-width: 0;
      position: relative;
      padding: 0 16px;
    }

    .modal-stat:not(:last-child)::after {
      content: "";
      position: absolute;
      right: 0;
      top: 6px;
      width: 1px;
      height: 76px;
      background: linear-gradient(180deg, rgba(226, 199, 162, 0), rgba(226, 199, 162, 0.95), rgba(226, 199, 162, 0));
    }

    .modal-stats {
      display: flex;
      gap: 0;
      justify-content: space-between;
      align-items: stretch;
      width: min(100%, 640px);
      align-self: center;
      margin-top: 4px;
    }

    .modal-stat-value {
      font-size: 36px;
      line-height: 0.94;
      color: #ff9f11;
      font-family: "Lilita One", sans-serif;
      text-shadow:
        0 2px 0 rgba(255, 255, 255, 0.72),
        0 3px 8px rgba(255, 173, 34, 0.18);
    }

    .modal-stat-label {
      font-size: 17px;
      line-height: 1;
      color: #9a7657;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 800;
    }

    .modal-title {
      font-family: "Lilita One", sans-serif;
      font-size: 94px;
      color: #48230f;
      text-shadow:
        0 2px 0 rgba(255, 255, 255, 0.5),
        0 6px 16px rgba(102, 52, 22, 0.08);
      line-height: 0.92;
      max-width: 680px;
      align-self: center;
    }

    .modal-score {
      font-family: "Lilita One", sans-serif;
      align-self: center;
      width: min(100%, 700px);
      padding: 16px 30px;
      font-size: 32px;
      color: #31180d;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 249, 238, 0.95));
      border: 3px solid rgba(242, 180, 63, 0.88);
      border-radius: 28px;
      text-shadow: none;
      box-shadow:
        0 14px 28px rgba(43, 22, 10, 0.08),
        inset 0 2px 0 rgba(255, 255, 255, 0.92);
    }

    .modal-score-number {
      color: #ff6a13;
    }

    .modal-reward-tier {
      align-self: center;
      min-height: 30px;
      padding: 6px 18px;
      border-radius: 999px;
      background: rgba(255, 244, 219, 0.92);
      border: 1px solid rgba(236, 192, 89, 0.7);
      color: #8f6539;
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 16px;
      font-weight: 700;
      letter-spacing: 0.02em;
      box-shadow: 0 8px 18px rgba(92, 56, 18, 0.06);
    }

    .modal-reward-tier[data-tone="base"] {
      color: #9a5a12;
      background: rgba(255, 242, 214, 0.96);
    }

    .modal-reward-tier[data-tone="mid"] {
      color: #8d4a16;
      background: rgba(255, 234, 205, 0.96);
    }

    .modal-reward-tier[data-tone="max"] {
      color: #7b3e12;
      background: linear-gradient(180deg, rgba(255, 235, 196, 0.98), rgba(255, 220, 163, 0.96));
    }

    .modal-subtitle {
      max-width: 700px;
      align-self: center;
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 22px;
      line-height: 1.2;
      color: #2B1A12;
      text-shadow: none;
      font-weight: 700;
      text-wrap: balance;
    }

    .modal-rewards {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 14px;
      width: min(100%, 640px);
      align-self: center;
    }

    .modal-rewards.is-empty {
      display: none;
    }

    .reward-btn {
      flex: 1 1 240px;
      min-height: 72px;
      padding: 14px 22px;
      border: 2px solid rgba(234, 164, 34, 0.92);
      border-radius: 24px;
      background:
        linear-gradient(180deg, #fff3cf 0%, #ffe4a4 48%, #ffd97f 100%);
      box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.85),
        inset 0 -6px 0 rgba(208, 145, 31, 0.24),
        0 12px 18px rgba(140, 94, 17, 0.14),
        0 0 0 3px rgba(255, 235, 185, 0.52);
      color: #7a3f08;
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 20px;
      font-weight: 700;
      line-height: 1.1;
      text-align: center;
      text-shadow: 0 1px 0 rgba(255, 251, 232, 0.66);
      transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
    }

    .reward-btn:hover {
      transform: translateY(-2px);
      filter: brightness(1.03) saturate(1.03);
      box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.88),
        inset 0 -6px 0 rgba(208, 145, 31, 0.24),
        0 16px 24px rgba(140, 94, 17, 0.18),
        0 0 0 3px rgba(255, 235, 185, 0.58);
    }

    .reward-btn:active {
      transform: translateY(1px);
      filter: brightness(0.98);
    }

    .reward-btn[data-reward-tone="song"] {
      border-color: rgba(234, 164, 34, 0.92);
      background: linear-gradient(180deg, #fff3cf 0%, #ffe4a4 48%, #ffd97f 100%);
      color: #7a3f08;
      box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.85),
        inset 0 -6px 0 rgba(208, 145, 31, 0.24),
        0 12px 18px rgba(140, 94, 17, 0.14),
        0 0 0 3px rgba(255, 235, 185, 0.52);
    }

    .reward-btn[data-reward-tone="waitress"] {
      border-color: rgba(225, 122, 48, 0.92);
      background: linear-gradient(180deg, #ffe5d1 0%, #ffc89f 50%, #ffb16b 100%);
      color: #7a2f08;
      box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.82),
        inset 0 -6px 0 rgba(196, 92, 22, 0.24),
        0 12px 18px rgba(156, 74, 16, 0.14),
        0 0 0 3px rgba(255, 214, 189, 0.52);
    }

    .reward-btn[data-reward-tone="dance"] {
      border-color: rgba(202, 103, 29, 0.96);
      background: linear-gradient(180deg, #ffe8c9 0%, #ffc98f 42%, #ff9d52 100%);
      color: #6e2408;
      box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.82),
        inset 0 -6px 0 rgba(172, 71, 18, 0.24),
        0 14px 22px rgba(163, 76, 17, 0.16),
        0 0 0 3px rgba(255, 210, 164, 0.56);
    }

    @keyframes starPop {
      0% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
      }
      60% {
        transform: scale(1.3) rotate(5deg);
        opacity: 1;
      }
      100% {
        transform: scale(1) rotate(0);
        opacity: 1;
      }
    }

    @keyframes endFadeUp {
      0% {
        opacity: 0;
        transform: translateY(14px);
      }
      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes endBabushkaReveal {
      0% {
        opacity: 0;
        transform: scale(0.5);
      }
      100% {
        opacity: 1;
        transform: scale(1);
      }
    }

    @keyframes milkSplashBurst {
      0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.45);
      }
      35% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
      }
      100% {
        opacity: 0;
        transform: translateX(-50%) scale(1.12);
      }
    }

    .confetti-piece {
      position: fixed;
      top: -24px;
      left: 0;
      width: 6px;
      height: 12px;
      border-radius: 2px;
      pointer-events: none;
      z-index: 21;
      opacity: 0;
      animation:
        confettiFall var(--confetti-duration, 3s) linear var(--confetti-delay, 0s) forwards,
        confettiSway calc(var(--confetti-duration, 3s) * 0.7) ease-in-out var(--confetti-delay, 0s) infinite,
        confettiSpin calc(var(--confetti-duration, 3s) * 0.45) linear var(--confetti-delay, 0s) infinite;
      transform-origin: center;
    }

    @keyframes confettiFall {
      0% {
        opacity: 0;
        transform: translate3d(0, -4vh, 0) rotate(0deg);
      }
      10% {
        opacity: 1;
      }
      100% {
        opacity: 0.96;
        transform: translate3d(0, 110vh, 0) rotate(var(--confetti-rotate-end, 360deg));
      }
    }

    @keyframes confettiSway {
      0%, 100% {
        margin-left: 0;
      }
      25% {
        margin-left: calc(var(--confetti-drift, 20px) * 0.65);
      }
      50% {
        margin-left: calc(var(--confetti-drift, 20px) * -0.35);
      }
      75% {
        margin-left: var(--confetti-drift, 20px);
      }
    }

    @keyframes confettiSpin {
      0% {
        rotate: var(--confetti-rotate-start, 0deg);
      }
      100% {
        rotate: var(--confetti-rotate-end, 360deg);
      }
    }

    .play-again-btn {
      min-width: 440px;
      min-height: 118px;
      align-self: center;
      margin-top: 4px;
      padding: 24px 42px;
      font-family: "Lilita One", sans-serif;
      font-size: 58px;
      font-weight: 400;
      color: #f7fff1;
      background:
        linear-gradient(180deg, #c7f20d 0%, #93d20b 10%, #73b404 18%, #7cc108 55%, #5f9d04 100%);
      border: none;
      border-radius: 32px;
      text-shadow:
        0 3px 0 rgba(60, 102, 12, 0.54),
        0 0 18px rgba(255, 255, 255, 0.18);
      box-shadow:
        inset 0 4px 0 rgba(255, 255, 255, 0.5),
        inset 0 -8px 0 rgba(53, 106, 5, 0.38),
        0 18px 26px rgba(96, 146, 14, 0.24),
        0 0 0 4px rgba(255, 197, 73, 0.85);
      transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
      position: relative;
    }

    .play-again-btn::before,
    .play-again-btn::after {
      content: "";
      position: absolute;
      pointer-events: none;
      border-radius: inherit;
    }

    .play-again-btn::before {
      left: 18px;
      right: 18px;
      top: 12px;
      height: 28px;
      border-radius: 999px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0));
      opacity: 0.78;
    }

    .play-again-btn::after {
      inset: 8px;
      border: 2px solid rgba(255, 255, 255, 0.24);
    }

    .play-again-btn:hover {
      transform: translateY(-2px);
      filter: brightness(1.04);
      box-shadow:
        inset 0 4px 0 rgba(255, 255, 255, 0.52),
        inset 0 -8px 0 rgba(53, 106, 5, 0.38),
        0 22px 32px rgba(96, 146, 14, 0.28),
        0 0 0 4px rgba(255, 197, 73, 0.9);
    }

    .play-again-btn:active {
      transform: translateY(1px);
      filter: brightness(0.98);
    }

    .toast {
      position: fixed;
      left: 50%;
      bottom: clamp(12%, 13vh, 16%);
      transform: translateX(-50%) translateY(40px) scale(0.8);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      min-width: min(78vw, 320px);
      max-width: min(88vw, 540px);
      padding: 16px 24px;
      border-radius: 22px;
      border: 2px solid rgba(232, 183, 71, 0.76);
      background: linear-gradient(180deg, rgba(116, 62, 28, 0.9), rgba(58, 24, 8, 0.94));
      color: #FFF3D7;
      font-family: "Lilita One", sans-serif;
      font-size: 23px;
      line-height: 1.05;
      letter-spacing: 0.3px;
      text-align: center;
      text-shadow: 0 2px 0 rgba(44, 16, 4, 0.62);
      box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.36),
        0 0 0 1px rgba(255, 241, 201, 0.14) inset,
        0 0 22px rgba(255, 196, 74, 0.14);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      opacity: 0;
      pointer-events: none;
      z-index: 1500;
      will-change: transform, opacity;
    }

    .toast.show {
      animation: toastRise 1.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .toast.toast-copy {
      min-width: auto;
      padding: 12px 18px;
      border-radius: 16px;
      border-color: rgba(188, 233, 140, 0.78);
      background: rgba(43, 80, 24, 0.96);
      color: #f3ffe7;
      font-size: 19px;
      text-shadow: none;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }

    .toast.toast-copy.show {
      animation: toastCopyFade 0.82s ease-out forwards;
    }

    .toast.toast-error {
      border-color: rgba(255, 134, 108, 0.92);
      background: linear-gradient(180deg, rgba(118, 44, 31, 0.92), rgba(57, 17, 16, 0.95));
      box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.36),
        0 0 0 1px rgba(255, 220, 210, 0.14) inset,
        0 0 24px rgba(255, 108, 76, 0.18);
    }

    .toast.toast-shuffle {
      border-color: rgba(244, 208, 96, 0.96);
      background: linear-gradient(180deg, rgba(128, 76, 25, 0.92), rgba(71, 36, 10, 0.95));
      box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(255, 240, 192, 0.16) inset,
        0 0 24px rgba(255, 208, 87, 0.22);
    }

    .toast.toast-error .toast-icon {
      color: #FFD2C7;
      background: rgba(255, 106, 79, 0.18);
    }

    .toast.toast-shuffle .toast-icon {
      color: #FFE69B;
      background: rgba(255, 214, 101, 0.18);
    }

    .toast.toast-copy .toast-icon {
      width: 28px;
      height: 28px;
      font-size: 16px;
      color: #eaffd7;
      background: rgba(215, 255, 184, 0.16);
      box-shadow: none;
    }

    .toast-icon {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      border-radius: 999px;
      font-size: 21px;
      line-height: 1;
      color: #FFF1C7;
      background: rgba(255, 243, 215, 0.12);
      box-shadow:
        0 0 0 1px rgba(255, 243, 215, 0.16) inset,
        0 6px 14px rgba(0, 0, 0, 0.18);
    }

    .toast-label {
      display: inline-block;
    }

    @keyframes toastRise {
      0% {
        opacity: 0;
        transform: translateX(-50%) translateY(44px) scale(0.8);
      }
      18% {
        opacity: 1;
        transform: translateX(-50%) translateY(-6px) scale(1.03);
      }
      28% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
      }
      78% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
      }
      100% {
        opacity: 0;
        transform: translateX(-50%) translateY(34px) scale(0.92);
      }
    }

    @keyframes toastCopyFade {
      0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
      }
      18% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
      }
      78% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
      }
      100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-4px);
      }
    }

    .start-panel-overlay {
      position: fixed;
      inset: 0;
      z-index: 60;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(10, 8, 24, 0.72);
      backdrop-filter: blur(8px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s ease;
    }

    .start-panel-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    .start-panel {
      position: relative;
      width: min(560px, 92vw);
      max-height: min(82vh, 760px);
      overflow: auto;
      display: none;
      flex-direction: column;
      gap: 18px;
      padding: 28px 26px 24px;
      background: linear-gradient(180deg, rgba(107, 58, 31, 0.97), rgba(44, 18, 6, 0.98));
      border: 2px solid rgba(245, 200, 66, 0.42);
      border-radius: 24px;
      box-shadow:
        0 16px 42px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 232, 182, 0.16);
      color: #f6edd8;
    }

    #settings-panel {
      width: min(620px, 92vw);
      gap: 20px;
      padding: 30px 28px 26px;
      background: linear-gradient(180deg, rgba(120, 64, 33, 0.98), rgba(55, 24, 10, 0.99));
      border: 2px solid rgba(245, 200, 66, 0.34);
      border-radius: 26px;
      box-shadow:
        0 22px 52px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 233, 191, 0.16),
        inset 0 -1px 0 rgba(70, 30, 11, 0.45);
    }

    #help-panel {
      width: min(700px, 94vw);
      gap: 20px;
      padding: 30px 28px 26px;
      background: linear-gradient(180deg, rgba(120, 64, 33, 0.98), rgba(55, 24, 10, 0.99));
      border: 2px solid rgba(245, 200, 66, 0.34);
      border-radius: 26px;
      box-shadow:
        0 22px 52px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 233, 191, 0.16),
        inset 0 -1px 0 rgba(70, 30, 11, 0.45);
      scrollbar-gutter: stable;
      scrollbar-width: thin;
      scrollbar-color: rgba(245, 200, 66, 0.68) rgba(54, 23, 10, 0.4);
    }

    #help-panel::-webkit-scrollbar {
      width: 10px;
    }

    #help-panel::-webkit-scrollbar-track {
      background: rgba(54, 23, 10, 0.32);
      border-radius: 999px;
    }

    #help-panel::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, rgba(255, 215, 112, 0.9), rgba(191, 107, 25, 0.92));
      border-radius: 999px;
      border: 2px solid rgba(54, 23, 10, 0.24);
    }

    .start-panel.active {
      display: flex;
    }

    .start-panel-close {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: rgba(28, 12, 5, 0.42);
      border: 1px solid rgba(245, 200, 66, 0.24);
      color: #ffe7a6;
      font-size: 24px;
      line-height: 1;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
      transition: transform 0.12s ease, background 0.12s ease;
    }

    .start-panel-close:hover {
      transform: scale(1.06);
      background: rgba(50, 22, 9, 0.58);
    }

    .start-panel-title {
      font-family: "Lilita One", sans-serif;
      font-size: 34px;
      color: #f5c842;
      text-shadow:
        0 2px 0 rgba(0, 0, 0, 0.58),
        0 0 16px rgba(245, 200, 66, 0.18);
    }

    #settings-panel .start-panel-title {
      font-size: 32px;
      color: #ffd44a;
    }

    #help-panel .start-panel-title {
      font-size: 32px;
      color: #ffd44a;
    }

    .start-panel-subtitle {
      font-size: 17px;
      color: rgba(246, 237, 216, 0.88);
      line-height: 1.45;
    }

    #settings-panel .start-panel-subtitle {
      max-width: 470px;
      font-size: 16px;
      color: rgba(255, 241, 209, 0.9);
      line-height: 1.4;
    }

    #help-panel .start-panel-subtitle {
      max-width: 520px;
      font-size: 16px;
      color: rgba(255, 241, 209, 0.9);
      line-height: 1.42;
    }

    .start-settings-list,
    .start-help-list,
    .leaderboard-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    #settings-panel .start-settings-list {
      gap: 14px;
    }

    #help-panel .start-help-list {
      gap: 14px;
    }

    .leaderboard-empty {
      padding: 18px 16px;
      border-radius: 18px;
      background: rgba(22, 10, 5, 0.32);
      border: 1px dashed rgba(245, 200, 66, 0.28);
      color: rgba(246, 237, 216, 0.82);
      text-align: center;
      line-height: 1.5;
    }

    .start-setting-item,
    .start-help-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 14px 16px;
      background: rgba(20, 10, 4, 0.28);
      border: 1px solid rgba(245, 200, 66, 0.14);
      border-radius: 16px;
      box-shadow: inset 0 1px 0 rgba(255, 233, 191, 0.05);
    }

    #settings-panel .start-setting-item {
      display: grid;
      grid-template-columns: 56px minmax(0, 1fr) auto;
      align-items: center;
      padding: 16px 18px;
      background: linear-gradient(180deg, rgba(87, 43, 19, 0.42), rgba(58, 26, 11, 0.56));
      border: 1px solid rgba(245, 200, 66, 0.16);
      border-radius: 18px;
      box-shadow:
        inset 0 1px 0 rgba(255, 235, 193, 0.06),
        0 6px 18px rgba(23, 8, 2, 0.16);
    }

    .start-setting-visual {
      width: 56px;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 16px;
      color: #fff0bd;
      font-family: "Lilita One", sans-serif;
      font-size: 28px;
      line-height: 1;
      text-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
      box-shadow:
        inset 0 1px 0 rgba(255, 242, 214, 0.24),
        0 6px 14px rgba(18, 7, 2, 0.18);
      flex-shrink: 0;
    }

    .start-setting-visual--sound {
      background:
        radial-gradient(circle at 32% 28%, rgba(255, 246, 205, 0.38), transparent 42%),
        linear-gradient(180deg, rgba(255, 196, 85, 0.34), rgba(140, 76, 24, 0.36));
      border: 1px solid rgba(255, 214, 112, 0.22);
    }

    .start-setting-visual--motion {
      background:
        radial-gradient(circle at 36% 26%, rgba(255, 236, 190, 0.34), transparent 40%),
        linear-gradient(180deg, rgba(245, 143, 82, 0.34), rgba(118, 54, 26, 0.38));
      border: 1px solid rgba(255, 196, 118, 0.2);
    }

    .start-help-item {
      display: grid;
      grid-template-columns: 44px 1fr;
      align-items: flex-start;
      justify-content: flex-start;
      gap: 12px;
    }

    #help-panel .start-help-item {
      grid-template-columns: 56px 1fr;
      gap: 14px;
      padding: 16px 18px;
      background: linear-gradient(180deg, rgba(87, 43, 19, 0.42), rgba(58, 26, 11, 0.56));
      border: 1px solid rgba(245, 200, 66, 0.16);
      border-radius: 18px;
      box-shadow:
        inset 0 1px 0 rgba(255, 235, 193, 0.06),
        0 6px 18px rgba(23, 8, 2, 0.16);
    }

    .leaderboard-item {
      display: grid;
      grid-template-columns: 56px 1fr auto;
      align-items: center;
      gap: 14px;
      padding: 14px 16px;
      background: rgba(20, 10, 4, 0.28);
      border: 1px solid rgba(245, 200, 66, 0.14);
      border-radius: 16px;
      box-shadow: inset 0 1px 0 rgba(255, 233, 191, 0.05);
    }

    .leaderboard-rank {
      width: 56px;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 16px;
      background: linear-gradient(180deg, rgba(245, 200, 66, 0.26), rgba(167, 96, 22, 0.2));
      color: #ffe7a6;
      font-family: "Lilita One", sans-serif;
      font-size: 26px;
      text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
    }

    .leaderboard-copy {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }

    .leaderboard-name {
      font-family: "Lilita One", sans-serif;
      font-size: 24px;
      color: #fff0bd;
      line-height: 1.1;
    }

    .leaderboard-meta {
      font-size: 14px;
      color: rgba(246, 237, 216, 0.76);
      line-height: 1.3;
    }

    .leaderboard-score {
      color: #f5c842;
      font-family: "Lilita One", sans-serif;
      font-size: 28px;
      text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
      white-space: nowrap;
    }

    .start-help-visual {
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 14px;
      background: rgba(245, 200, 66, 0.12);
      box-shadow: inset 0 1px 0 rgba(255, 235, 193, 0.08);
      overflow: hidden;
      flex-shrink: 0;
    }

    #help-panel .start-help-visual {
      width: 56px;
      height: 56px;
      border-radius: 16px;
      background: linear-gradient(180deg, rgba(255, 214, 112, 0.14), rgba(131, 73, 18, 0.12));
      box-shadow:
        inset 0 1px 0 rgba(255, 235, 193, 0.08),
        0 4px 10px rgba(18, 7, 2, 0.12);
    }

    .start-help-visual img {
      width: 30px;
      height: 30px;
      object-fit: contain;
      filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.24));
    }

    #help-panel .start-help-visual img {
      width: 34px;
      height: 34px;
    }

    #help-panel .start-help-visual--swap,
    #help-panel .start-help-visual--cascade,
    #help-panel .start-help-visual--timer {
      position: relative;
    }

    #help-panel .start-help-visual--swap {
      gap: 0;
    }

    #help-panel .start-help-visual--swap img {
      width: 24px;
      height: 24px;
    }

    #help-panel .start-help-visual--swap img:first-child {
      transform: translateX(2px);
    }

    #help-panel .start-help-visual--swap img:last-child {
      transform: translateX(-2px);
    }

    .start-help-swap-arrow {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 14px;
      color: #ffe18a;
      font-family: "Lilita One", sans-serif;
      font-size: 15px;
      line-height: 1;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
      flex-shrink: 0;
    }

    .start-help-hud-icon {
      width: 34px;
      height: 34px;
      flex-shrink: 0;
    }

    #help-panel .start-help-visual--cascade {
      gap: 0;
    }

    #help-panel .start-help-visual--cascade img {
      width: 20px;
      height: 20px;
    }

    #help-panel .start-help-visual--cascade img:nth-child(1) {
      transform: translate(4px, 5px);
      z-index: 1;
    }

    #help-panel .start-help-visual--cascade img:nth-child(2) {
      transform: translateY(-5px);
      z-index: 2;
    }

    #help-panel .start-help-visual--cascade img:nth-child(3) {
      transform: translate(-4px, 5px);
      z-index: 1;
    }

    .start-setting-copy {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    #settings-panel .start-setting-copy {
      gap: 6px;
    }

    .start-help-copy {
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-width: 0;
    }

    #help-panel .start-help-copy {
      gap: 7px;
    }

    .start-setting-name,
    .start-help-item strong {
      display: block;
      font-family: "Lilita One", sans-serif;
      font-size: 22px;
      font-weight: normal;
      color: #ffe7a6;
      line-height: 1.18;
      letter-spacing: 0.2px;
    }

    #settings-panel .start-setting-name {
      font-size: 21px;
      color: #ffe18a;
    }

    #help-panel .start-help-item strong {
      font-size: 19px;
      color: #ffe18a;
    }

    .start-setting-desc,
    .start-help-item span {
      display: block;
      font-size: 15px;
      color: rgba(246, 237, 216, 0.82);
      line-height: 1.45;
    }

    #settings-panel .start-setting-desc {
      font-size: 14px;
      color: rgba(255, 240, 214, 0.84);
      line-height: 1.4;
      max-width: 330px;
    }

    #help-panel .start-help-item span {
      font-size: 14px;
      color: rgba(255, 240, 214, 0.84);
      line-height: 1.42;
    }

    .start-switch {
      position: relative;
      width: 68px;
      height: 38px;
      border-radius: 999px;
      background: rgba(44, 18, 6, 0.88);
      border: 1px solid rgba(245, 200, 66, 0.24);
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
      flex-shrink: 0;
      transition: background 0.14s ease, border-color 0.14s ease;
    }

    #settings-panel .start-switch {
      box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.26),
        0 4px 10px rgba(18, 7, 2, 0.18);
    }

    .start-switch::after {
      content: "";
      position: absolute;
      top: 4px;
      left: 4px;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: linear-gradient(180deg, #fff7da, #e6c972);
      box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.22),
        inset 0 1px 1px rgba(255, 255, 255, 0.7);
      transition: transform 0.14s ease;
    }

    .start-switch.on {
      background: linear-gradient(180deg, #6ecc4e, #3f9724);
      border-color: rgba(255, 245, 214, 0.3);
    }

    .start-switch.on::after {
      transform: translateX(30px);
    }

    .start-help-icon {
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 14px;
      background: rgba(245, 200, 66, 0.12);
      font-size: 24px;
      flex-shrink: 0;
    }

    .start-help-inline-icons {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin: 0 4px;
      vertical-align: middle;
    }

    #help-panel .start-help-inline-icons {
      gap: 6px;
      margin: 0 6px;
    }

    .start-help-inline-icons img {
      width: 20px;
      height: 20px;
      object-fit: contain;
      filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
    }

    #help-panel .start-help-inline-icons img {
      width: 22px;
      height: 22px;
    }

    .ui-motion-off *,
    .ui-motion-off *::before,
    .ui-motion-off *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }

    .story-onboarding-overlay {
      position: fixed;
      inset: 0;
      z-index: 1200;
      display: none;
      align-items: center;
      justify-content: center;
      padding: clamp(16px, 3vw, 32px);
    }

    .story-onboarding-overlay.active {
      display: flex;
    }

    .story-onboarding-overlay.closing {
      display: flex;
      pointer-events: none;
    }

    .story-onboarding-backdrop {
      position: absolute;
      inset: 0;
      background:
        linear-gradient(180deg, rgba(11, 8, 24, 0.52), rgba(11, 8, 24, 0.52)),
        url("assets/night/fon.png") center center / cover no-repeat;
      backdrop-filter: none;
      opacity: 0;
      animation: onboardingBackdropFade 0.45s ease-out forwards;
    }

    .story-onboarding-overlay.closing .story-onboarding-backdrop {
      animation: onboardingBackdropOut 0.52s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .story-onboarding-panel {
      position: relative;
      width: min(100%, 720px);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transform: translateY(28px) scale(0.975);
      animation: onboardingPanelIn 0.58s cubic-bezier(0.18, 0.9, 0.22, 1) forwards;
    }

    .story-onboarding-overlay.closing .story-onboarding-panel {
      animation: onboardingPanelOut 0.45s cubic-bezier(0.22, 0.8, 0.24, 1) forwards;
    }

    .story-onboarding-frame {
      position: relative;
      width: min(100%, 680px);
      display: flex;
      align-items: center;
      justify-content: center;
      transform-origin: center top;
    }

    .story-onboarding-image {
      display: block;
      width: 100%;
      height: auto;
      user-select: none;
      pointer-events: none;
      transform-origin: center center;
      filter: drop-shadow(0 12px 28px rgba(13, 8, 32, 0.24));
    }

    .story-onboarding-image.is-entering {
      animation: onboardingPaperIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .story-onboarding-image.is-leaving {
      animation: onboardingPaperOut 0.2s ease-in both;
    }

    .story-onboarding-hotspot {
      position: absolute;
      border: 0;
      background: transparent;
      padding: 0;
      cursor: pointer;
      border-radius: 12px;
      outline: none;
      z-index: 2;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
      user-select: none;
      box-shadow: none;
      transition: transform 0.2s ease;
      appearance: none;
    }

    .story-onboarding-hotspot::before,
    .story-onboarding-hotspot::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      opacity: 0;
    }

    .story-onboarding-hotspot--attention::before {
      inset: 4px;
      border-radius: 22px;
      background: radial-gradient(circle at 50% 46%, rgba(255, 243, 165, 0.3) 0%, rgba(255, 228, 113, 0.16) 46%, rgba(255, 228, 113, 0) 74%);
      animation: onboardingHotspotGlow 1.7s ease-in-out infinite;
      opacity: 1;
    }

    .story-onboarding-hotspot--attention::after {
      inset: 6px 26px 12px;
      border-radius: 999px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.06) 100%);
      animation: onboardingHotspotShimmer 1.7s ease-in-out infinite;
      opacity: 1;
    }

    .story-onboarding-hotspot:hover {
      box-shadow: none;
    }

    .story-onboarding-hotspot:focus,
    .story-onboarding-hotspot:focus-visible {
      outline: none;
      box-shadow: none;
    }

    .story-onboarding-hotspot:active {
      box-shadow: none;
      transform: scale(0.992);
    }

    @keyframes onboardingHotspotGlow {
      0%, 100% {
        transform: scale(0.995);
        opacity: 0.52;
      }
      50% {
        transform: scale(1.015);
        opacity: 1;
      }
    }

    @keyframes onboardingHotspotShimmer {
      0%, 100% {
        transform: translateY(0);
        opacity: 0.36;
      }
      50% {
        transform: translateY(-1px);
        opacity: 0.68;
      }
    }


    .reward-share-overlay {
      position: fixed;
      inset: 0;
      z-index: 1400;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    .reward-share-overlay.active {
      display: flex;
    }

    .reward-share-backdrop {
      position: absolute;
      inset: 0;
      background: #0d0820;
      backdrop-filter: none;
    }

    .reward-share-modal {
      position: relative;
      width: min(100%, 980px);
      z-index: 1;
      animation: rewardShareIn 0.26s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .reward-share-close {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 42px;
      height: 42px;
      border-radius: 999px;
      background: linear-gradient(180deg, #fff0c4, #f0be61);
      color: #44200c;
      font-size: 28px;
      line-height: 1;
      font-weight: 900;
      box-shadow: 0 12px 28px rgba(13, 8, 24, 0.22);
      z-index: 2;
    }

    .reward-share-card {
      position: relative;
      border-radius: 86px;
      overflow: hidden;
      background: #fff;
      box-shadow: 0 24px 48px rgba(9, 7, 20, 0.32);
    }

    .reward-share-image {
      display: block;
      width: 100%;
      height: auto;
      border-radius: 86px;
    }

    .reward-share-hotspot {
      position: absolute;
      border: 0;
      background: transparent;
      padding: 0;
      cursor: pointer;
      border-radius: 16px;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }

    .reward-share-hotspot-copy {
      left: 31.5%;
      top: 74.9%;
      width: 37%;
      height: 11.3%;
    }

    .reward-share-hotspot-share {
      left: 56.2%;
      top: 62.2%;
      width: 22.4%;
      height: 7.6%;
    }

    @keyframes rewardShareIn {
      from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes onboardingBackdropFade {
      from {
        opacity: 0;
      }
      to {
        opacity: 1;
      }
    }

    @keyframes onboardingPanelIn {
      from {
        opacity: 0;
        transform: translateY(28px) scale(0.975);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes onboardingBackdropOut {
      from {
        opacity: 1;
      }
      to {
        opacity: 0;
      }
    }

    @keyframes onboardingPanelOut {
      from {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
      to {
        opacity: 0;
        transform: translateY(28px) scale(0.94);
      }
    }

    @keyframes onboardingPaperOut {
      from {
        opacity: 1;
        transform: translateX(0) scale(1);
      }
      to {
        opacity: 0;
        transform: translateX(-26px) scale(0.99);
      }
    }

    @keyframes onboardingPaperIn {
      from {
        opacity: 0;
        transform: translateX(30px) scale(0.99);
      }
      to {
        opacity: 1;
        transform: translateX(0) scale(1);
      }
    }

	    @media (max-width: 820px) {
        :root {
          --hud-h: 108px;
        }

	      html,
	      body {
	        min-height: 100dvh;
      }

      body {
        align-items: flex-start;
        justify-content: center;
        background: #0D0820;
      }

      .phone-gate-overlay,
      .overlay,
      .pause-overlay,
      .start-panel-overlay,
      .story-onboarding-overlay,
      .toast,
      .start-meta,
      .speech-bubble {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
      }

      .phone-gate-overlay {
        background: rgba(8, 6, 18, 0.88);
      }

      .overlay {
        background: rgba(13, 8, 32, 0.92);
      }

      .pause-overlay {
        background: rgba(13, 8, 32, 0.74);
      }

      .start-panel-overlay {
        background: rgba(13, 8, 32, 0.85);
      }

      .story-onboarding-overlay {
        background: rgba(13, 8, 32, 0.85);
      }

      .story-onboarding-overlay.closing {
        background: transparent;
        transition: background 0.25s ease;
      }

      .toast {
        background: rgba(71, 36, 10, 0.96);
        border: 1px solid rgba(255, 219, 145, 0.42);
        box-shadow: none;
      }

      .start-meta,
      .speech-bubble {
        background: rgba(18, 11, 38, 0.82);
        border: 1px solid rgba(245, 200, 66, 0.24);
        box-shadow: none;
      }

      .start-pretitle,
      .start-logo,
      .start-icon-btn img,
      .hud-bar,
      .goal-mini-icon,
      .goal-flyer-icon,
      .board-wrap,
      .story-onboarding-image,
      .start-help-visual img,
      .start-help-inline-icons img {
        filter: none !important;
      }

      .phone-gate-modal,
      .modal,
      .pause-modal,
      .start-panel,
      #settings-panel,
      #help-panel,
      .reward-share-close,
      .play-again-btn,
      .reward-btn,
      .story-onboarding-hotspot::before,
      .story-onboarding-hotspot::after {
        box-shadow: none !important;
      }

      .phone-gate-modal,
      .modal,
      .pause-modal,
      .start-panel,
      #settings-panel,
      #help-panel {
        border: 1px solid rgba(245, 200, 66, 0.28);
      }

      .tile {
        filter: brightness(1.02) saturate(1.02) !important;
      }

      .board-cell.selected .tile,
      .board-cell.matched .tile,
      .hint-glow .tile {
        filter: brightness(1.05) saturate(1.04) !important;
      }

      .story-onboarding-overlay {
        padding: 8px;
      }

      .phone-gate-overlay {
        padding: 16px;
      }

      .phone-gate-modal {
        width: min(100%, 340px);
        padding: 22px 16px 16px;
        border-radius: 24px;
      }

      .phone-gate-title {
        font-size: 27px;
      }

      .phone-gate-text {
        font-size: 14px;
      }

      .phone-gate-label {
        font-size: 16px;
      }

      .phone-gate-input {
        height: 50px;
        font-size: 20px;
        border-radius: 14px;
      }

      .phone-gate-actions {
        flex-direction: column;
      }

      .phone-gate-submit,
      .phone-gate-cancel {
        width: 100%;
        min-width: 0;
      }

      .start-screen {
        background: #0D0820 url("assets/home/background_home_mobile.png") center top / cover no-repeat;
        padding-bottom: env(safe-area-inset-bottom, 20px);
      }

      .start-screen::before {
        background:
          linear-gradient(180deg, rgba(8, 10, 28, 0.72) 0%, rgba(8, 10, 28, 0.48) 26%, rgba(8, 10, 28, 0.16) 54%, rgba(8, 10, 28, 0.02) 78%);
      }

      .start-content {
        inset: 0;
        left: 0;
        right: 0;
        justify-content: center;
        gap: 14px;
        max-width: 100%;
        width: 100%;
        padding:
          calc(env(safe-area-inset-top) + 54px)
          16px
          calc(env(safe-area-inset-bottom) + 120px);
        transform: none;
      }

      .start-screen.onboarding-active .start-content,
      .start-screen.hidden .start-content {
        transform: none;
      }

      .start-pretitle {
        width: min(94vw, 460px);
        max-width: none;
        margin: 48px 0 -60px;
      }

      .start-pretitle-text {
        font-size: clamp(30px, 6.6vw, 38px);
        stroke-width: 4px;
      }

      .start-logo {
        width: min(96vw, 560px);
        max-width: none;
        margin-top: -2px;
      }

      .start-cta-row {
        margin-top: -4px;
      }

      .start-play-btn {
        width: min(84vw, 310px);
        height: 72px;
        margin-top: 4px;
        font-size: 38px;
        letter-spacing: 4px;
      }

      .start-leaderboard-btn {
        width: 240px;
        height: 46px;
        margin-top: 10px;
        font-size: 15px;
      }

      .start-utility-row {
        width: 100%;
        gap: 4px;
        margin-top: 10px;
      }

      .start-icon-btn {
        width: min(47vw, 188px);
        height: auto;
        aspect-ratio: 408 / 276;
      }

      .start-icon-btn img {
        transform: none;
      }

      .start-icon-btn + .start-icon-btn {
        margin-left: 0;
      }

      .char-babushka {
        left: -5%;
        width: 39%;
        height: 33%;
        opacity: 0.8;
      }

      .char-goat {
        right: -5%;
        width: 34%;
        height: 28%;
        opacity: 0.74;
      }

      .speech-bubble {
        bottom: 48%;
        left: 15%;
        font-size: 16px;
        padding: 10px 20px;
      }

      .start-meta,
      .start-bottom-meta {
        font-size: 11px;
      }

      .start-version {
        bottom: calc(env(safe-area-inset-bottom) + 8px);
        font-size: 11px;
      }

	      .game {
	        width: 100vw;
	        min-height: 100dvh;
	        max-height: none;
	        justify-content: flex-start;
	        gap: 0;
	        padding:
	          calc(env(safe-area-inset-top) + 8px)
	          8px
	          calc(env(safe-area-inset-bottom) + 4px);
	        background: #0D0820 url("assets/home/background_home_mobile.png") 58% top / cover no-repeat;
	        overflow: hidden;
	      }

	      .hud-bar {
	        width: min(100%, 440px);
	        max-width: 440px;
	        padding: 10px 14px 8px;
	        min-height: 80px;
        background: url("assets/mobile/hud_plank_mobile.png") center / 100% 100% no-repeat;
	        aspect-ratio: auto;
	      }

      .hud-row-top {
        column-gap: 6px;
      }

      .score-section,
      .timer-section {
        gap: 6px;
      }

      .score-section {
        padding-left: 10px;
      }

      .coin-icon,
      .settings-btn {
        width: 36px;
        height: 36px;
      }

      .settings-btn {
        padding: 8px;
        margin: -8px;
        box-sizing: content-box;
      }

      .timer-icon {
        width: 38px;
        height: 38px;
      }

      .score-value {
        font-size: 28px;
      }

      .timer-value {
        min-width: 5ch;
        font-size: 28px;
        letter-spacing: 0;
      }

      .timer-progress-wrap {
        height: 6px;
        margin: 0 4px 0;
      }

      .goals-row {
        gap: 12px;
      }

      .goal-mini-icon {
        width: 30px;
        height: 30px;
      }

      .goal-progress {
        font-size: 18px;
      }

      .goal-target {
        font-size: 13px;
      }

	      .board-area {
	        flex: 1 1 0;
	        min-height: 0;
	        display: flex;
	        align-items: center;
	        justify-content: center;
	        padding-top: 6px;
	        padding-inline: 6px;
	        overflow: visible;
	        contain: layout style;
	      }

      .board-wrap {
        flex-shrink: 0;
        --board-layout: mobile;
        width: min(110vw, calc(100dvh - var(--hud-h, 130px)));
        height: min(110vw, calc(100dvh - var(--hud-h, 130px)));
        max-width: none;
        max-height: none;
        transform-origin: top center;
        background: url("assets/mobile/field_night_mobile_cropped.png") center / 100% 100% no-repeat;
      }

      .tile {
        width: 92%;
        height: 92%;
      }

      .modal {
        grid-template-columns: 1fr;
        width: min(100%, 392px);
        min-height: 0;
        padding: 18px 16px 20px;
        row-gap: 12px;
        column-gap: 0;
        justify-items: center;
      }

      .modal-copy {
        width: min(100%, 332px);
        gap: 14px;
        padding: 0;
        align-items: center;
      }

      .modal-jar-stage {
        width: min(52vw, 200px);
        height: min(58vw, 224px);
        --jar-shift: 0px;
        margin-left: 0;
        justify-self: center;
        left: auto;
        transform: translateX(-8px);
      }

      .modal-jar-stage::before {
        width: min(54vw, 214px);
        height: min(62vw, 246px);
        left: 50%;
        transform: translate(-50%, -50%);
      }

      .modal-jar-svg {
        top: 10px;
        width: min(44vw, 168px);
        height: min(54vw, 210px);
        left: 50%;
        transform: translateX(calc(-50% - var(--jar-shift)));
      }

      .modal-jar-stage.is-animating .modal-jar-svg {
        transform: translateX(calc(-50% - var(--jar-shift))) translateY(-2px);
      }

      .modal-jar-frame {
        top: 14px;
        width: min(44vw, 168px);
        height: min(58vw, 224px);
        left: 50%;
        transform: translateX(calc(-50% - var(--jar-shift)));
      }

      .modal-jar-splash {
        top: 42px;
        inset: 42px auto auto 50%;
        width: min(24vw, 96px);
        height: min(14vw, 54px);
        transform: translateX(calc(-50% - var(--jar-shift))) scale(0.68);
      }

      .modal-score {
        width: min(100%, 332px);
        padding: 12px 18px;
        font-size: 22px;
        text-align: center;
      }

      .modal-reward-tier {
        min-height: 0;
        padding: 4px 10px;
        font-size: 11px;
      }

      .modal-title {
        max-width: 100%;
        font-size: clamp(34px, 10vw, 46px);
        text-align: center;
      }

      .modal-stats {
        width: min(100%, 320px);
      }

      .modal-stat {
        gap: 4px;
        padding: 0 6px;
      }

      .modal-stat:not(:last-child)::after {
        top: 2px;
        height: 44px;
      }

      .modal-stat-value {
        font-size: 22px;
      }

      .modal-stat-label {
        font-size: 11px;
      }

      .modal-subtitle {
        max-width: 320px;
        font-size: 13px;
        text-align: center;
      }

      .modal-rewards {
        width: min(100%, 332px);
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
      }

      .modal-rewards[data-count="3"] {
        grid-template-columns: 1fr 1fr;
      }

      .modal-rewards[data-count="3"] .reward-btn:last-child {
        grid-column: 1 / -1;
      }

      .reward-btn {
        flex-basis: auto;
        min-height: 42px;
        padding: 8px 10px;
        border-radius: 14px;
        font-size: 12px;
      }

      .play-again-btn {
        width: min(100%, 332px);
        min-width: 0;
        min-height: 52px;
        padding: 10px 14px;
        font-size: clamp(21px, 6.8vw, 29px);
      }

      .pause-modal,
      .start-panel,
      #help-panel {
        width: min(100%, 360px);
      }

      .start-panel {
        padding: 18px 14px 16px;
        gap: 12px;
      }

      .leaderboard-item {
        grid-template-columns: 48px 1fr auto;
        gap: 10px;
        padding: 12px 12px;
      }

      .leaderboard-rank {
        width: 48px;
        height: 48px;
        font-size: 22px;
      }

      .leaderboard-score {
        font-size: 24px;
      }

      .start-panel-close {
        width: 44px;
        height: 44px;
        font-size: 28px;
      }

      .start-panel-title {
        font-size: 25px;
        line-height: 1;
      }

      #settings-panel .start-panel-title,
      #help-panel .start-panel-title {
        font-size: 24px;
      }

      .start-panel-subtitle,
      #settings-panel .start-panel-subtitle,
      #help-panel .start-panel-subtitle {
        font-size: 15px;
        line-height: 1.38;
      }

      #settings-panel .start-settings-list,
      #help-panel .start-help-list {
        gap: 10px;
      }

      #settings-panel .start-setting-item {
        gap: 12px;
        padding: 12px 14px;
        border-radius: 16px;
        grid-template-columns: 48px minmax(0, 1fr) auto;
      }

      #settings-panel .start-setting-visual {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 24px;
      }

      #help-panel .start-help-item {
        grid-template-columns: 48px 1fr;
        gap: 10px;
        padding: 12px 14px;
        border-radius: 16px;
      }

      #help-panel .start-help-visual,
      #help-panel .start-help-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
      }

      #help-panel .start-help-visual img {
        width: 28px;
        height: 28px;
      }

      #help-panel .start-help-visual--swap img {
        width: 18px;
        height: 18px;
      }

      #help-panel .start-help-visual--cascade img {
        width: 16px;
        height: 16px;
      }

      #help-panel .start-help-visual--timer .start-help-hud-icon {
        width: 28px;
        height: 28px;
      }

      .start-help-swap-arrow {
        width: 10px;
        font-size: 12px;
      }

      #help-panel .start-help-icon {
        font-size: 24px;
      }

      #settings-panel .start-setting-copy,
      #help-panel .start-help-copy {
        gap: 4px;
      }

      #settings-panel .start-setting-name {
        font-size: 18px;
        line-height: 1.08;
      }

      #help-panel .start-help-item strong {
        font-size: 16px;
        line-height: 1.12;
      }

      #settings-panel .start-setting-desc,
      #help-panel .start-help-item span {
        font-size: 14px;
        line-height: 1.34;
      }

      #settings-panel .start-setting-desc {
        max-width: 170px;
      }

      #settings-panel .start-switch {
        width: 60px;
        height: 34px;
      }

      #settings-panel .start-switch::after {
        top: 4px;
        left: 4px;
        width: 24px;
        height: 24px;
      }

      #settings-panel .start-switch.on::after {
        transform: translateX(26px);
      }

      .tutorial-card {
        max-width: min(88vw, 320px);
        padding: 18px 16px;
      }

      .tutorial-text {
        font-size: 15px;
      }

      .reward-share-overlay {
        padding: 12px;
      }

      .reward-share-modal {
        width: min(100%, 430px);
      }

      .reward-share-close {
        top: 6px;
        right: 6px;
        width: 36px;
        height: 36px;
        font-size: 24px;
      }

      .reward-share-card,
      .reward-share-image {
        border-radius: 44px;
      }

      .story-onboarding-panel {
        width: min(100%, 620px);
      }
    }

	    @media (max-width: 480px) {
        :root {
          --hud-h: 86px;
        }

	      .story-onboarding-overlay {
	        padding: 4px;
	      }

      .story-onboarding-frame {
        left: 22px;
      }

      .start-content {
        padding:
          calc(env(safe-area-inset-top) + 40px)
          12px
          calc(env(safe-area-inset-bottom) + 112px);
      }

      .start-pretitle {
        width: min(96vw, 390px);
        margin: 68px 0 -76px;
        position: relative;
        top: 24px;
      }

      .start-pretitle-text {
        font-size: 29px;
      }

      .start-logo {
        width: min(116vw, 560px);
        margin-top: -4px;
      }

      .start-play-btn {
        width: min(82vw, 276px);
        height: 60px;
        font-size: 31px;
      }

      .start-utility-row {
        gap: 2px;
      }

      .start-icon-btn {
        width: min(48vw, 174px);
      }

      .start-icon-btn img {
        transform: scale(1.28);
      }

      .char-babushka {
        left: -10%;
        width: 42%;
        height: 28%;
        opacity: 0.72;
      }

      .char-goat {
        right: -10%;
        width: 38%;
        height: 24%;
        opacity: 0.64;
      }

	      .hud-bar {
	        width: min(100%, 386px);
	        max-width: 386px;
	        padding: 8px 12px 6px;
	        min-height: 72px;
        background: url("assets/mobile/hud_plank_mobile.png") center / 100% 100% no-repeat;
	      }

      .score-value {
        font-size: 22px;
      }

      .score-section {
        padding-left: 10px;
      }

      .timer-value {
        font-size: 22px;
      }

      .coin-icon,
      .settings-btn {
        width: 26px;
        height: 26px;
      }

      .timer-icon {
        width: 28px;
        height: 28px;
      }

      .goal-mini-icon {
        width: 26px;
        height: 26px;
      }

      .goal-progress {
        font-size: 16px;
      }

	      .board-wrap {
	        flex-shrink: 0;
	        --board-layout: mobile;
	        width: min(122vw, calc(100dvh - var(--hud-h, 78px)));
	        height: min(122vw, calc(100dvh - var(--hud-h, 78px)));
	        max-width: none;
	        max-height: none;
        background: url("assets/mobile/field_night_mobile_cropped.png") center / 100% 100% no-repeat;
	      }

      .tile {
        width: 96%;
        height: 96%;
      }

      .modal {
        width: min(100%, 362px);
        padding: 14px 12px 16px;
        justify-items: center;
      }

      .modal-jar-stage {
        width: min(50vw, 186px);
        height: min(56vw, 208px);
        --jar-shift: 0px;
        margin-left: 0;
        transform: translateX(-7px);
      }

      .modal-jar-stage::before {
        width: min(46vw, 170px);
        height: min(52vw, 192px);
        left: 50%;
        transform: translate(-50%, -50%);
      }

      .modal-jar-svg {
        width: min(38vw, 140px);
        height: min(50vw, 184px);
        left: 50%;
        transform: translateX(calc(-50% - var(--jar-shift)));
      }

      .modal-jar-frame {
        width: min(38vw, 140px);
        height: min(54vw, 200px);
        left: 50%;
        transform: translateX(calc(-50% - var(--jar-shift)));
      }

      .modal-jar-stage.is-animating .modal-jar-svg {
        transform: translateX(calc(-50% - var(--jar-shift))) translateY(-2px);
      }

      .modal-jar-splash {
        transform: translateX(calc(-50% - var(--jar-shift))) scale(0.64);
      }

      .modal-title {
        font-size: clamp(30px, 9.6vw, 40px);
      }

      .modal-score {
        width: min(100%, 304px);
        padding: 9px 10px;
        font-size: 18px;
      }

      .modal-reward-tier {
        padding: 4px 9px;
        font-size: 12px;
      }

      .modal-subtitle {
        max-width: 292px;
        font-size: 12px;
      }

      .modal-rewards {
        width: min(100%, 304px);
        gap: 4px;
      }

      .reward-btn {
        min-height: 40px;
        padding: 7px 8px;
        font-size: 11px;
        border-radius: 13px;
      }

      .play-again-btn {
        width: min(100%, 304px);
        min-height: 48px;
        font-size: clamp(19px, 6.6vw, 26px);
      }

      .phone-gate-modal,
      .pause-modal,
      .start-panel,
      #help-panel,
      .reward-share-modal,
      .story-onboarding-panel {
        width: min(100%, 430px);
      }

      .start-panel {
        padding: 16px 12px 14px;
        gap: 10px;
      }

      .start-panel-title,
      #settings-panel .start-panel-title,
      #help-panel .start-panel-title {
        font-size: 22px;
      }

      .start-panel-subtitle,
      #settings-panel .start-panel-subtitle,
      #help-panel .start-panel-subtitle {
        font-size: 14px;
        line-height: 1.34;
      }

      #settings-panel .start-setting-item {
        gap: 10px;
        padding: 11px 12px;
        grid-template-columns: 42px minmax(0, 1fr) auto;
      }

      #settings-panel .start-setting-visual {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 21px;
      }

      #help-panel .start-help-item {
        grid-template-columns: 42px 1fr;
        gap: 10px;
        padding: 11px 12px;
      }

      #help-panel .start-help-visual,
      #help-panel .start-help-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
      }

      #help-panel .start-help-visual img {
        width: 24px;
        height: 24px;
      }

      #help-panel .start-help-visual--swap img {
        width: 15px;
        height: 15px;
      }

      #help-panel .start-help-visual--cascade img {
        width: 13px;
        height: 13px;
      }

      #help-panel .start-help-visual--timer .start-help-hud-icon {
        width: 24px;
        height: 24px;
      }

      .start-help-swap-arrow {
        width: 8px;
        font-size: 10px;
      }

      #help-panel .start-help-icon {
        font-size: 22px;
      }

      #settings-panel .start-setting-name {
        font-size: 17px;
      }

      #help-panel .start-help-item strong {
        font-size: 15px;
      }

      #settings-panel .start-setting-desc,
      #help-panel .start-help-item span {
        font-size: 14px;
        line-height: 1.3;
      }

      #settings-panel .start-setting-desc {
        max-width: 150px;
      }

      #settings-panel .start-switch {
        width: 56px;
        height: 32px;
      }

      #settings-panel .start-switch::after {
        width: 22px;
        height: 22px;
      }

      #settings-panel .start-switch.on::after {
        transform: translateX(24px);
      }
    }
