:root {
      --paint: #ffd21f;
      --paint-dark: #c98b00;
      --outline: #1b1d33;
      --ink: #f8fafc;
      --ink-dim: #94a3b8;
      --surface: #12141c;
      --surface-card: #181c26;
      --asphalt: #14171f;
      --disp: 'Baloo Bhaijaan 2', 'Lalezar', cursive, sans-serif;
      --body: 'Cairo', sans-serif;
    }

    * {
      box-sizing: border-box;
      user-select: none;
      -webkit-user-select: none;
      touch-action: manipulation;
    }

    body {
      margin: 0;
      padding: 0;
      background: #090a0f;
      color: var(--ink);
      font-family: var(--body);
      overflow: hidden;
      width: 100vw;
      height: 100vh;
    }

    /* DAYERI GRAFFITI LOGO */
    .dayeri-logo {
      font-family: var(--disp);
      font-weight: 900;
      color: #ffd21f;
      -webkit-text-stroke: 3px #1b1d33;
      paint-order: stroke fill;
      text-shadow: 0 4px 0 #1b1d33, 0 8px 16px rgba(0,0,0,0.6);
      letter-spacing: -1px;
    }

    /* DAYERI TACTILE YELLOW 3D BUTTON (.go) */
    .go {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      font-family: var(--disp);
      font-weight: 900;
      background: linear-gradient(180deg, #ffe766 0%, #ffd21f 55%, #f5be00 100%);
      color: #160f02;
      border: 2px solid #1b1d33;
      box-shadow: 0 5px 0 #c98b00, 0 8px 16px rgba(0, 0, 0, 0.45);
      border-radius: 1rem;
      cursor: pointer;
      transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.12s ease;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
    }
    .go:hover { filter: brightness(1.06); }
    .go:active {
      transform: translateY(4px);
      box-shadow: 0 1px 0 #c98b00, 0 3px 8px rgba(0, 0, 0, 0.5);
    }
    .go.big {
      width: 100%;
      padding: 0.95rem 1.6rem;
      font-size: 1.4rem;
    }

    /* DARK TACTILE BUTTON */
    .btn-dark {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      font-family: var(--disp);
      font-weight: 800;
      background: linear-gradient(180deg, #232733 0%, #151821 100%);
      color: #f4efe4;
      border: 1.5px solid #353b49;
      box-shadow: 0 4px 0 #0c0e14, 0 6px 14px rgba(0, 0, 0, 0.45);
      border-radius: 0.85rem;
      cursor: pointer;
      transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.15s ease;
    }
    .btn-dark:hover { border-color: var(--paint); color: #ffffff; }
    .btn-dark:active {
      transform: translateY(3px);
      box-shadow: 0 1px 0 #0c0e14;
    }

    /* DAYERI SEGMENTED CHIPS */
    .chip {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-family: var(--disp);
      font-size: 0.85rem;
      font-weight: 800;
      padding: 0.5rem 0.8rem;
      border-radius: 0.85rem;
      background: #171a22;
      color: var(--ink-dim);
      border: 1.5px solid #2b303c;
      box-shadow: 0 2px 0 #0b0c10;
      cursor: pointer;
      transition: all 0.12s ease;
      white-space: nowrap;
    }
    .chip:hover { background: #202430; color: #ffffff; }
    .chip.sel {
      background: linear-gradient(180deg, #ffe766 0%, #ffd21f 100%);
      color: #160f02;
      font-weight: 900;
      border-color: #1b1d33;
      box-shadow: 0 3px 0 #c98b00, 0 0 14px rgba(255, 210, 31, 0.35);
      transform: translateY(-1px);
    }

    /* AUTHENTIC EGYPTIAN LICENSE PLATE */
    .egypt-plate {
      position: relative;
      background: #fbfbfc;
      border: 2px solid #141a24;
      border-radius: 6px;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.15);
      color: #0f172a;
      font-family: var(--disp);
      overflow: hidden;
      min-width: 105px;
    }
    .egypt-plate-header {
      background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
      color: #ffffff;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1px 6px;
      font-size: 8px;
      font-weight: 900;
      border-bottom: 1.5px solid #0f172a;
    }
    .egypt-plate-body {
      padding: 2px 5px;
      font-size: 13px;
      font-weight: 900;
      letter-spacing: 2px;
      text-align: center;
      color: #111827;
      text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
    }

    /* AUTHENTIC OVERHEAD EGYPTIAN HIGHWAY SIGN */
    .highway-sign {
      position: relative;
      background: linear-gradient(180deg, #059669 0%, #047857 60%, #064e3b 100%);
      color: #ffffff;
      border-radius: 8px;
      box-shadow:
        inset 0 0 0 2px #ffffff,
        inset 0 0 0 4px #064e3b,
        0 6px 18px rgba(0, 0, 0, 0.55);
      padding: 6px 14px;
    }

    /* TACTILE DRIVING CONTROLS */
    .pedal-gas {
      position: relative;
      background: linear-gradient(180deg, #059669 0%, #047857 70%, #064e3b 100%);
      border: 2px solid #34d399;
      box-shadow: 0 6px 0 #064e3b, 0 8px 18px rgba(0, 0, 0, 0.5);
      background-image: repeating-linear-gradient(0deg, transparent, transparent 7px, rgba(0, 0, 0, 0.25) 7px, rgba(0, 0, 0, 0.25) 10px);
      transition: transform 0.06s ease, box-shadow 0.06s ease;
      cursor: pointer;
    }
    .pedal-gas:active {
      transform: translateY(4px);
      box-shadow: 0 2px 0 #064e3b;
    }

    .pedal-brake {
      position: relative;
      background: linear-gradient(180deg, #dc2626 0%, #b91c1c 70%, #7f1d1d 100%);
      border: 2px solid #f87171;
      box-shadow: 0 6px 0 #7f1d1d, 0 8px 18px rgba(0, 0, 0, 0.5);
      background-image: repeating-linear-gradient(0deg, transparent, transparent 7px, rgba(0, 0, 0, 0.25) 7px, rgba(0, 0, 0, 0.25) 10px);
      transition: transform 0.06s ease, box-shadow 0.06s ease;
      cursor: pointer;
    }
    .pedal-brake:active {
      transform: translateY(4px);
      box-shadow: 0 2px 0 #7f1d1d;
    }

    .steer-btn {
      background: linear-gradient(180deg, #222736 0%, #151822 100%);
      border: 2px solid #3b4254;
      box-shadow: 0 6px 0 #0d0f16, 0 8px 20px rgba(0, 0, 0, 0.6);
      transition: transform 0.06s ease, box-shadow 0.06s ease, background 0.1s ease;
      cursor: pointer;
    }
    .steer-btn:active {
      transform: translateY(4px);
      box-shadow: 0 2px 0 #0d0f16;
      background: linear-gradient(180deg, #2d3448 0%, #1c202d 100%);
    }

    /* DAYERI CARD & WORKSHOP STYLES */
    .glass-card {
      background: rgba(18, 22, 32, 0.88);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border: 1.5px solid rgba(59, 70, 92, 0.7);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    }

    .workshop-bg {
      background: linear-gradient(180deg, rgba(15, 23, 42, 0.84) 0%, rgba(10, 15, 30, 0.95) 100%),
                  url('../images/highway-awsat.jpeg') center/cover no-repeat;
      background-attachment: fixed;
    }

    .garage-bg {
      background: linear-gradient(180deg, rgba(15, 23, 42, 0.82) 0%, rgba(10, 15, 30, 0.95) 100%),
                  url('../images/highway-ismailia.jpeg') center/cover no-repeat;
      background-attachment: fixed;
    }

    .tuning-plate {
      background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
      border: 2px solid #475569;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
      border-radius: 1.25rem;
      position: relative;
    }
    .tuning-plate::before, .tuning-plate::after {
      content: "";
      position: absolute;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #94a3b8;
      box-shadow: inset 0 1px 2px #0f172a;
    }
    .tuning-plate::before { top: 8px; left: 8px; }
    .tuning-plate::after { top: 8px; right: 8px; }

    /* CHECKPOINT & HIGHWAY CARDS */
    .checkpoint-card {
      background: linear-gradient(180deg, #065f46 0%, #047857 60%, #064e3b 100%);
      border: 2px solid #34d399;
      border-radius: 12px;
      color: #ffffff;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
      transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
      cursor: pointer;
    }
    .checkpoint-card:hover { transform: translateY(-2px); }
    .checkpoint-card.active {
      border-color: #ffd21f;
      box-shadow: 0 0 16px rgba(255, 210, 31, 0.55), 0 4px 12px rgba(0, 0, 0, 0.6);
    }
    .checkpoint-card.locked {
      background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
      border-color: #334155;
      color: #94a3b8;
      cursor: not-allowed;
    }

    /* MODE CARDS (وردية, بمزاجك, سابق الزمن) */
    .mode-card {
      background: linear-gradient(180deg, #242b3a 0%, #161a25 100%);
      border: 2px solid #3b455b;
      border-radius: 16px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
      cursor: pointer;
      transition: all 0.14s ease;
    }
    .mode-card:hover {
      border-color: #ffd21f;
      transform: translateY(-2px);
    }
    .mode-card.active {
      background: linear-gradient(180deg, #ffe766 0%, #ffd21f 100%);
      border-color: #1b1d33;
      color: #111827;
      box-shadow: 0 4px 0 #b48200, 0 0 16px rgba(255, 210, 31, 0.4);
      transform: translateY(-1px);
    }

    /* TIME PICKER CARD */
    .time-card {
      background: linear-gradient(180deg, #202738 0%, #151926 100%);
      border: 2px solid #323d54;
      border-radius: 18px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
      cursor: pointer;
      transition: all 0.14s ease;
    }
    .time-card:hover {
      border-color: #94a3b8;
      transform: translateY(-2px);
    }
    .time-card.active {
      border-color: #ffd21f;
      box-shadow: 0 0 18px rgba(255, 210, 31, 0.5);
      background: linear-gradient(180deg, #2c354d 0%, #1b2131 100%);
    }

    /* CITATION RECEIPT CARD (Game Over) */
    .receipt-card {
      position: relative;
      background: #faf8f5;
      color: #1e293b;
      font-family: var(--body);
      border: 2px solid #d6cfc7;
      border-radius: 1.25rem;
      box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
    }
    .receipt-stamp {
      position: absolute;
      top: 18px;
      left: 18px;
      border: 3px dashed #b91c1c;
      color: #b91c1c;
      padding: 4px 10px;
      font-family: var(--disp);
      font-weight: 900;
      font-size: 13px;
      transform: rotate(-14deg);
      border-radius: 6px;
      opacity: 0.88;
    }

    @keyframes flashScreen {
      0% { opacity: 0.95; }
      100% { opacity: 0; }
    }
    .camera-flash {
      animation: flashScreen 0.45s ease-out forwards;
    }
  
    /* DAYERI SETTINGS STYLES (Images 1-5) */
    .settings-tab {
      background: #e2e8f0;
      color: #0f172a;
      border: 2px solid #cbd5e1;
      border-radius: 14px;
      font-weight: 900;
      font-size: 1.05rem;
      padding: 0.65rem 1.25rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      cursor: pointer;
      box-shadow: 0 4px 0 #94a3b8, 0 6px 12px rgba(0, 0, 0, 0.25);
      transition: all 0.1s ease;
    }
    .settings-tab.active {
      background: linear-gradient(180deg, #ffe766 0%, #ffd21f 100%);
      border-color: #1b1d33;
      color: #111827;
      box-shadow: 0 5px 0 #b48200, 0 8px 18px rgba(0, 0, 0, 0.4);
      transform: translateY(-2px);
    }
    .settings-control-card {
      background: #f1f5f9;
      border: 2px solid #cbd5e1;
      border-radius: 14px;
      color: #1e293b;
      padding: 0.5rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.12s ease;
      min-height: 85px;
    }
    .settings-control-card:hover {
      border-color: #94a3b8;
      background: #ffffff;
    }
    .settings-control-card.active {
      background: linear-gradient(180deg, #ffe766 0%, #ffd21f 100%);
      border-color: #1b1d33;
      color: #111827;
      box-shadow: 0 4px 0 #b48200, 0 4px 12px rgba(255, 210, 31, 0.35);
      transform: translateY(-2px);
    }
    .settings-slider {
      -webkit-appearance: none;
      width: 100%;
      height: 8px;
      border-radius: 6px;
      background: #cbd5e1;
      outline: none;
    }
    .settings-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: #ffd21f;
      border: 3px solid #1b1d33;
      box-shadow: 0 2px 6px rgba(0,0,0,0.4);
      cursor: pointer;
    }
    .settings-chip {
      background: #e2e8f0;
      color: #334155;
      border: 1.5px solid #cbd5e1;
      border-radius: 10px;
      font-weight: 800;
      font-size: 0.85rem;
      padding: 0.35rem 0.85rem;
      cursor: pointer;
      box-shadow: 0 2px 0 #94a3b8;
      transition: all 0.1s ease;
    }
    .settings-chip.active {
      background: linear-gradient(180deg, #ffe766 0%, #ffd21f 100%);
      border-color: #1b1d33;
      color: #111827;
      font-weight: 900;
      box-shadow: 0 3px 0 #b48200;
    }

  
    /* EGYPTIAN HIGHWAY EXIT CHECKPOINTS (Image 2) */
    .checkpoint-sign {
      background: linear-gradient(180deg, #0d703e 0%, #08522c 100%);
      border: 2px solid #ffffff;
      border-radius: 14px;
      color: #ffffff;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
      transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
      cursor: pointer;
    }
    .checkpoint-sign:hover {
      transform: translateY(-2px);
    }
    .checkpoint-sign.active {
      border: 3px solid #ffd21f !important;
      box-shadow: 0 0 16px rgba(255, 210, 31, 0.6), 0 4px 12px rgba(0, 0, 0, 0.6) !important;
      transform: scale(1.03);
    }

    /* MINI TIME TOGGLE BUTTONS (Image 2) */
    .time-mini-btn {
      background: #e2e8f0;
      border: 2px solid #cbd5e1;
      border-radius: 12px;
      padding: 0.4rem 0.2rem;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.12s ease;
    }
    .time-mini-btn:hover {
      background: #cbd5e1;
    }
    .time-mini-btn.sel {
      background: linear-gradient(180deg, #ffe766 0%, #ffd21f 100%) !important;
      border-color: #f59e0b !important;
      box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
      transform: scale(1.05);
    }

    /* --- ENHANCED UI & TYPOGRAPHY STYLING --- */

    /* Sleek Custom Scrollbar */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }
    ::-webkit-scrollbar-track {
      background: rgba(15, 23, 42, 0.6);
      border-radius: 999px;
    }
    ::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, #ffd21f 0%, #b45309 100%);
      border-radius: 999px;
    }

    /* Polished 3D Graffiti Logo */
    .dayeri-logo {
      font-family: var(--disp);
      font-weight: 900;
      color: #ffd21f;
      background: linear-gradient(180deg, #fffbeb 0%, #ffd21f 50%, #f59e0b 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: #ffd21f;
      -webkit-text-stroke: 3px #111422;
      paint-order: stroke fill;
      text-shadow: 0 4px 0 #0d101a, 0 8px 0 #07080d, 0 14px 28px rgba(0, 0, 0, 0.85);
      letter-spacing: -1px;
      filter: drop-shadow(0 4px 12px rgba(255, 210, 31, 0.35));
      transition: transform 0.2s ease;
    }
    .dayeri-logo:hover {
      transform: scale(1.02);
    }

    /* Enhanced 3D Tactile Button (.go) */
    .go {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      font-family: var(--disp);
      font-weight: 900;
      background: linear-gradient(180deg, #fff382 0%, #ffd21f 55%, #f59e0b 100%);
      color: #120e03;
      border: 2px solid #141724;
      box-shadow: 0 6px 0 #b45309, 0 10px 20px rgba(0, 0, 0, 0.5);
      border-radius: 1.1rem;
      cursor: pointer;
      transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.12s ease;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
    }
    .go:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 0 #b45309, 0 14px 26px rgba(0, 0, 0, 0.6);
      filter: brightness(1.05);
    }
    .go:active {
      transform: translateY(4px);
      box-shadow: 0 2px 0 #b45309, 0 4px 8px rgba(0, 0, 0, 0.4);
    }

    /* Enhanced Dark Tactical Button (.btn-dark) */
    .btn-dark {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      font-family: var(--disp);
      font-weight: 800;
      background: linear-gradient(180deg, #242938 0%, #151824 100%);
      color: #f8fafc;
      border: 1.5px solid #3b4356;
      box-shadow: 0 4px 0 #0d101a, 0 8px 16px rgba(0, 0, 0, 0.45);
      border-radius: 1rem;
      cursor: pointer;
      transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.12s ease;
    }
    .btn-dark:hover {
      border-color: #64748b;
      transform: translateY(-1.5px);
      box-shadow: 0 5.5px 0 #0d101a, 0 10px 20px rgba(0, 0, 0, 0.55);
    }
    .btn-dark:active {
      transform: translateY(3px);
      box-shadow: 0 1px 0 #0d101a;
    }

    /* High-Speed LED Warning Glow */
    .speed-warning {
      color: #ef4444 !important;
      text-shadow: 0 0 14px rgba(239, 68, 68, 0.9), 0 0 28px rgba(239, 68, 68, 0.6) !important;
      animation: pulseSpeed 0.35s ease-in-out infinite alternate;
    }
    @keyframes pulseSpeed {
      from { transform: scale(1); }
      to { transform: scale(1.06); }
    }

    /* Polished Egyptian Highway Sign */
    .highway-sign {
      position: relative;
      background: linear-gradient(180deg, #059669 0%, #047857 55%, #064e3b 100%);
      color: #ffffff;
      border-radius: 12px;
      border: 2px solid #ffffff;
      box-shadow:
        inset 0 0 0 2px #064e3b,
        0 6px 18px rgba(0, 0, 0, 0.6);
      font-family: var(--disp);
    }

    /* Polished Mode Cards */
    .mode-card {
      background: linear-gradient(180deg, #232a3a 0%, #141824 100%);
      border: 2px solid #333d52;
      border-radius: 18px;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
      cursor: pointer;
      transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .mode-card:hover {
      transform: translateY(-3px);
      border-color: #64748b;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
    }
    .mode-card.active {
      background: linear-gradient(180deg, #ffe766 0%, #ffd21f 55%, #f59e0b 100%);
      border-color: #1b1d33;
      color: #111827;
      box-shadow: 0 0 20px rgba(255, 210, 31, 0.5), 0 8px 20px rgba(0, 0, 0, 0.6);
      transform: translateY(-2px);
    }
    .mode-card.active span {
      color: #111827 !important;
    }

    /* Authentic Egyptian Citation Receipt */
    .receipt-card {
      position: relative;
      background: #faf8f5;
      color: #1e293b;
      font-family: var(--body);
      border: 2px solid #d6cfc7;
      border-radius: 1.5rem;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
    }
    .receipt-stamp {
      position: absolute;
      top: 18px;
      left: 18px;
      border: 3.5px dashed #b91c1c;
      color: #b91c1c;
      padding: 6px 12px;
      font-family: var(--disp);
      font-weight: 900;
      font-size: 13px;
      line-height: 1.2;
      transform: rotate(-12deg);
      border-radius: 8px;
      opacity: 0.92;
      background: rgba(254, 226, 226, 0.4);
    }

    /* Barcode simulation strip */
    .receipt-barcode {
      height: 38px;
      background: repeating-linear-gradient(
        90deg,
        #1e293b 0px,
        #1e293b 2px,
        transparent 2px,
        transparent 5px,
        #1e293b 5px,
        #1e293b 8px,
        transparent 8px,
        transparent 10px,
        #1e293b 10px,
        #1e293b 13px,
        transparent 13px,
        transparent 15px
      );
      opacity: 0.85;
      margin: 0.75rem auto 0 auto;
      width: 75%;
      border-radius: 4px;
    }

    /* TOP SCREEN ANIMATED MESSAGES & TOASTS (Like Radar Warning Banner) */
    @keyframes topSlideDown {
      0% {
        opacity: 0;
        transform: translate(-50%, -90px) scale(0.88);
      }
      65% {
        opacity: 1;
        transform: translate(-50%, 8px) scale(1.03);
      }
      100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
      }
    }

    @keyframes topSlideUp {
      0% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
      }
      100% {
        opacity: 0;
        transform: translate(-50%, -90px) scale(0.88);
      }
    }

    .top-msg-show {
      animation: topSlideDown 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    }

    .top-msg-hide {
      animation: topSlideUp 0.28s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards !important;
    }

    /* ================= MENUS & START SCREEN ================= */
    @keyframes menuIn {
      from { opacity: 0; transform: translateY(14px) scale(0.98); }
      to { opacity: 1; transform: none; }
    }
    .menu-in { animation: menuIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: var(--d, 0ms); }
    #shiftScreen:not(.hidden) > *, #garageScreen:not(.hidden) > *, #workshopScreen:not(.hidden) > * {
      animation: menuIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }
    #shiftScreen > *:nth-child(2), #garageScreen > *:nth-child(2), #workshopScreen > *:nth-child(2) { animation-delay: 70ms; }
    #shiftScreen > *:nth-child(3), #garageScreen > *:nth-child(3), #workshopScreen > *:nth-child(3) { animation-delay: 140ms; }

    .home-shade-top, .home-shade-bottom { position: absolute; left: 0; right: 0; pointer-events: none; }
    .home-shade-top { top: 0; height: 46%; background: linear-gradient(180deg, rgba(6, 8, 14, 0.78) 0%, rgba(6, 8, 14, 0.35) 55%, transparent 100%); }
    .home-shade-bottom { bottom: 0; height: 38%; background: linear-gradient(0deg, rgba(6, 8, 14, 0.85) 0%, rgba(6, 8, 14, 0.3) 60%, transparent 100%); }

    .hud-pill {
      display: inline-flex; align-items: center; gap: 0.5rem;
      background: rgba(8, 10, 18, 0.66); border-width: 1px; border-style: solid;
      border-radius: 1rem; padding: 0.375rem 0.75rem;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); backdrop-filter: blur(10px);
    }
    .tool-group {
      align-items: center; gap: 2px; padding: 3px;
      background: rgba(8, 10, 18, 0.66); border: 1px solid #3b4356; border-radius: 1rem;
      backdrop-filter: blur(10px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    }
    .tool-btn {
      width: 2.25rem; height: 2.25rem; border-radius: 0.8rem;
      display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
      transition: background 0.15s ease, transform 0.1s ease;
    }
    .tool-btn:hover { background: rgba(255, 255, 255, 0.1); }
    .tool-btn:active { transform: scale(0.92); }

    .logo-badge {
      font-family: var(--disp); font-weight: 900; font-size: 11px; line-height: 1;
      color: #111827; background: linear-gradient(180deg, #fff382, #ffd21f);
      border: 2px solid #111422; border-radius: 6px; padding: 3px 6px 2px;
      box-shadow: 0 3px 0 #b45309;
    }
    @keyframes logoFloat { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-4px) rotate(-1deg); } }
    .home-logo { animation: logoFloat 4.5s ease-in-out infinite; transform-origin: right center; }

    .promo-ribbon {
      align-self: flex-end;
      background: linear-gradient(90deg, #f59e0b, #dc2626);
      color: #fff; font-size: 11px; font-weight: 900; padding: 3px 12px;
      border-radius: 999px; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    }
    .mode-sub { font-size: 10px; font-weight: 800; opacity: 0.7; margin-top: 1px; white-space: nowrap; }
    .mode-card.locked { opacity: 0.6; filter: saturate(0.6); }
    .mode-card.locked:hover { transform: none; }
    .soon-tag {
      position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
      background: #334155; color: #e2e8f0 !important; font-size: 9px; font-weight: 900;
      padding: 1px 8px; border-radius: 999px; border: 1px solid #64748b; white-space: nowrap;
    }

    @keyframes playGlow {
      0%, 100% { box-shadow: 0 6px 0 #b45309, 0 10px 20px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(255, 210, 31, 0.55); }
      50% { box-shadow: 0 6px 0 #b45309, 0 10px 20px rgba(0, 0, 0, 0.5), 0 0 0 12px rgba(255, 210, 31, 0); }
    }
    @keyframes playShine { 0% { transform: translateX(-160%) skewX(-20deg); } 60%, 100% { transform: translateX(260%) skewX(-20deg); } }
    .play-btn { overflow: hidden; animation: playGlow 1.8s ease-in-out infinite; }
    .play-btn::after {
      content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
      animation: playShine 2.8s ease-in-out infinite; pointer-events: none;
    }

    .car-card {
      width: 100%; max-width: 300px;
      background: linear-gradient(180deg, rgba(30, 36, 52, 0.9), rgba(12, 15, 24, 0.92));
      border: 1.5px solid #3b4356; border-radius: 1.1rem; padding: 0.6rem 0.8rem;
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px);
      transition: border-color 0.15s ease, transform 0.12s ease;
    }
    .car-card:hover { border-color: #ffd21f; transform: translateY(-2px); }
    .stat-lbl { font-size: 9px; font-weight: 900; color: #94a3b8; margin-bottom: 2px; }
    .stat-bar { height: 5px; border-radius: 999px; background: #0b0e17; overflow: hidden; }
    .stat-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #22d3ee); transition: width 0.4s ease; }
    @media (max-width: 640px) { .car-card { max-width: none; } }
    .menu-panel {
      background: linear-gradient(180deg, rgba(14, 18, 28, 0.72), rgba(8, 10, 18, 0.82));
      border: 1px solid rgba(100, 116, 139, 0.45); border-radius: 1.4rem;
      padding: 0.6rem; backdrop-filter: blur(12px);
      box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
    }
    .menu-panel .promo-ribbon { margin-top: -1.15rem; margin-bottom: 0.15rem; }
    .soon-tag { top: 5px; left: 5px; transform: none; padding: 0 6px; }
    /* Lit turntable under menu car art */
    .car-podium {
      position: absolute; bottom: 6%; left: 50%; transform: translateX(-50%);
      width: min(88%, 400px); aspect-ratio: 4 / 1; border-radius: 50%;
      background: radial-gradient(ellipse at center, rgba(255, 210, 31, 0.28) 0%, rgba(255, 210, 31, 0.08) 45%, transparent 70%),
                  radial-gradient(ellipse at center, #1e2433 0%, #0d1018 62%, transparent 63%);
      box-shadow: 0 0 0 2px rgba(255, 210, 31, 0.25) inset;
      pointer-events: none;
    }
    .car-podium::after {
      content: ""; position: absolute; inset: 18% 12%; border-radius: 50%;
      border: 2px dashed rgba(255, 210, 31, 0.35);
      animation: podiumSpin 14s linear infinite;
    }
    @keyframes podiumSpin { to { transform: rotate(360deg); } }

    /* =====================================================================
       BUTTON THEME v2 — "Night Racing": coral-orange primary, steel-navy
       secondary with a teal accent bar, chamfered (cut-corner) shapes.
       The fill lives on ::before so the cut corners can be clipped while the
       button itself keeps its drop shadow and any badges that hang outside.
       ===================================================================== */
    :root {
      --btn-a: #ffb020;
      --btn-b: #ff6a2b;
      --btn-c: #ff3d5a;
      --btn-edge: #9f1239;
      --btn-teal: #2dd4bf;
      --btn-navy-a: #24304a;
      --btn-navy-b: #121a2c;
      --cut: 11px;
    }

    .go, .btn-dark, .mode-card {
      isolation: isolate;
      background: none !important;
      border-color: transparent !important;
      box-shadow: none !important;
    }
    .go::before, .btn-dark::before, .mode-card::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
      transition: filter 0.15s ease;
    }
    .mode-card { position: relative; }

    /* Primary (.go) — hot coral/orange */
    .go {
      color: #ffffff !important;
      text-shadow: 0 2px 0 rgba(120, 20, 30, 0.55);
      filter: drop-shadow(0 5px 0 var(--btn-edge)) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
      letter-spacing: 0.2px;
    }
    .go::before {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0) 46%),
        linear-gradient(100deg, var(--btn-a) 0%, var(--btn-b) 52%, var(--btn-c) 100%);
    }
    .go:hover { transform: translateY(-2px); filter: drop-shadow(0 7px 0 var(--btn-edge)) drop-shadow(0 14px 18px rgba(0, 0, 0, 0.5)) brightness(1.06); }
    .go:active { transform: translateY(4px); filter: drop-shadow(0 1px 0 var(--btn-edge)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); }
    .go:disabled, .go.opacity-40 { filter: grayscale(0.7) drop-shadow(0 3px 0 #475569); }
    .play-btn { animation: none; }
    .play-btn::after { z-index: 0; clip-path: inherit; }

    /* Secondary (.btn-dark) — steel navy with a teal underline */
    .btn-dark {
      color: #e2f3f2 !important;
      filter: drop-shadow(0 4px 0 #070a12) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45));
    }
    .btn-dark::before {
      background:
        linear-gradient(0deg, var(--btn-teal) 0 3px, transparent 3px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 40%),
        linear-gradient(180deg, var(--btn-navy-a) 0%, var(--btn-navy-b) 100%);
    }
    .btn-dark:hover { transform: translateY(-1.5px); }
    .btn-dark:hover::before { filter: brightness(1.18); }
    .btn-dark:active { transform: translateY(3px); filter: drop-shadow(0 1px 0 #070a12); }

    /* Mode cards */
    .mode-card {
      color: #e2e8f0;
      filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
      transform: none;
    }
    .mode-card::before {
      background:
        linear-gradient(0deg, rgba(45, 212, 191, 0.85) 0 3px, transparent 3px),
        linear-gradient(180deg, #26324d 0%, #131a2b 100%);
    }
    .mode-card:hover { transform: translateY(-3px); }
    .mode-card:hover::before { filter: brightness(1.15); }
    .mode-card.active { color: #ffffff; transform: translateY(-2px); filter: drop-shadow(0 5px 0 var(--btn-edge)) drop-shadow(0 0 16px rgba(255, 106, 43, 0.45)); }
    .mode-card.active::before {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 50%),
        linear-gradient(110deg, var(--btn-a) 0%, var(--btn-b) 55%, var(--btn-c) 100%);
    }
    .mode-card.active span { color: #ffffff !important; text-shadow: 0 2px 0 rgba(120, 20, 30, 0.5); }
    .mode-card.locked:hover { transform: none; }
    .soon-tag { top: 6px; left: 14px; background: #0f172a; border-color: var(--btn-teal); color: #99f6e4 !important; }

    /* Selected states everywhere → coral gradient */
    .chip { border-radius: 0.6rem 0.6rem 0.6rem 0.2rem; background: linear-gradient(180deg, #1f2940, #131a2b); border-color: #2f3b55; color: #cbd5e1; }
    .chip:hover { background: linear-gradient(180deg, #27344f, #172036); border-color: var(--btn-teal); }
    .chip.sel, .settings-tab.active, .settings-control-card.active, .settings-chip.active, .time-mini-btn.sel {
      background: linear-gradient(110deg, var(--btn-a) 0%, var(--btn-b) 55%, var(--btn-c) 100%) !important;
      border-color: var(--btn-edge) !important;
      color: #ffffff !important;
      box-shadow: 0 3px 0 var(--btn-edge), 0 0 14px rgba(255, 106, 43, 0.35) !important;
      text-shadow: 0 1px 0 rgba(120, 20, 30, 0.5);
    }
    .chip.sel * , .settings-tab.active *, .settings-control-card.active * { color: #ffffff !important; }
    .settings-tab, .settings-chip, .settings-control-card, .time-mini-btn { border-radius: 0.7rem 0.7rem 0.7rem 0.25rem; }
    .settings-slider::-webkit-slider-thumb { background: var(--btn-b); border-color: #ffffff; }
    .time-card.active, .checkpoint-sign.active {
      border-color: var(--btn-b) !important;
      box-shadow: 0 0 18px rgba(255, 106, 43, 0.55), 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    }

    /* Top bar pills + tool group pick up the teal accent */
    .hud-pill { border-radius: 0.7rem 0.7rem 0.7rem 0.2rem; }
    .tool-group { border-color: rgba(45, 212, 191, 0.45); border-radius: 0.7rem 0.7rem 0.7rem 0.2rem; }
    .tool-btn:hover { background: rgba(45, 212, 191, 0.16); }
    .car-card { border-radius: 0.9rem 0.9rem 0.9rem 0.25rem; }
    .car-card:hover { border-color: var(--btn-b); }
    .promo-ribbon { background: linear-gradient(90deg, var(--btn-teal), #0ea5e9); color: #04201c; }

    /* ================= SETTINGS SCREEN ================= */
    .settings-shell {
      max-height: calc(100vh - 1.5rem);
      display: flex; flex-direction: column;
      background: linear-gradient(180deg, rgba(22, 28, 44, 0.97), rgba(10, 13, 22, 0.98));
      border: 1px solid rgba(100, 116, 139, 0.45);
      border-radius: 1.4rem 1.4rem 1.4rem 0.4rem;
      padding: 1rem;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
      animation: menuIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }
    .settings-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin-bottom: 0.75rem; }
    #settingsModal .settings-tab {
      background: #161d2e; color: #cbd5e1; border: 1px solid #2c3750;
      box-shadow: none; font-size: 0.85rem; padding: 0.55rem 0.4rem;
      justify-content: center; gap: 0.35rem; transform: none;
    }
    #settingsModal .settings-tab:hover { border-color: var(--btn-teal); color: #fff; }
    .settings-body { overflow-y: auto; padding-inline-end: 2px; min-height: 0; }
    .set-head { font-size: 11px; font-weight: 900; color: #94a3b8; margin-bottom: 0.4rem; }
    .set-card {
      background: rgba(15, 20, 33, 0.85); border: 1px solid #253049;
      border-radius: 1rem 1rem 1rem 0.3rem; padding: 0.35rem 0.85rem;
    }
    .set-card.space-y-3, .set-card.space-y-2\.5 { padding: 0.85rem; }
    .set-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0; flex-wrap: wrap; }
    .set-title { font-size: 0.85rem; font-weight: 900; color: #f1f5f9; }
    .set-desc { font-size: 10.5px; font-weight: 700; color: #8391a7; margin-top: 1px; }
    .set-val { font-family: ui-monospace, monospace; font-size: 11px; font-weight: 900; color: #fff; background: #0b1020; border: 1px solid #2c3750; border-radius: 6px; padding: 1px 7px; min-width: 38px; text-align: center; }
    .seg { display: inline-flex; gap: 3px; padding: 3px; background: #0b1020; border: 1px solid #253049; border-radius: 0.75rem 0.75rem 0.75rem 0.25rem; flex-wrap: wrap; }
    #settingsModal .settings-chip {
      background: transparent; color: #a9b6ca; border: 0; box-shadow: none;
      font-size: 0.78rem; padding: 0.32rem 0.7rem; border-radius: 0.55rem 0.55rem 0.55rem 0.2rem; white-space: nowrap;
    }
    #settingsModal .settings-chip:hover { color: #fff; background: rgba(45, 212, 191, 0.12); }
    #settingsModal .settings-chip.danger { background: rgba(225, 29, 72, 0.15); color: #fda4af; border: 1px solid rgba(225, 29, 72, 0.45); }
    #settingsModal .settings-control-card {
      background: #161d2e; border: 1px solid #2c3750; color: #cbd5e1; min-height: 76px;
      border-radius: 0.9rem 0.9rem 0.9rem 0.3rem;
    }
    #settingsModal .settings-control-card:hover { border-color: var(--btn-teal); background: #1b2438; }
    #controlSubOptions .text-slate-700, #controlSubOptions .text-slate-600, #controlSubOptions .text-slate-500 { color: #a9b6ca !important; }
    #controlSubOptions .bg-white\/70 { background: transparent !important; border: 0 !important; padding: 0 !important; color: #cbd5e1 !important; }
    #controlSubOptions .border-slate-300 { border-color: #2c3750 !important; }
    #settingsModal .settings-slider { background: #0b1020; height: 8px; border: 1px solid #253049; accent-color: var(--btn-b); }
    #settingsModal .settings-slider::-webkit-slider-thumb { width: 20px; height: 20px; border: 3px solid #fff; background: var(--btn-b); }

    /* Accent palettes (Settings → ألوان القوائم) */
    :root[data-accent="green"] { --btn-a: #a3e635; --btn-b: #22c55e; --btn-c: #059669; --btn-edge: #065f46; }
    :root[data-accent="blue"] { --btn-a: #38bdf8; --btn-b: #3b82f6; --btn-c: #6366f1; --btn-edge: #1e3a8a; }

    /* ================= CAR INSTRUMENT CLUSTER ================= */
    .dash-cluster {
      position: relative;
      padding: 8px 12px 8px;
      border-radius: 26px 26px 20px 20px;
      background:
        radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
        linear-gradient(180deg, #1b1f2a 0%, #0b0d13 100%);
      border: 2px solid #3a4152;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -6px 14px rgba(0, 0, 0, 0.6),
        0 10px 26px rgba(0, 0, 0, 0.55);
      backdrop-filter: blur(6px);
    }
    .dash-row { display: flex; align-items: flex-end; gap: 4px; }
    .dash-speedo { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
    .dash-speedo-svg { width: 100%; height: 100%; overflow: visible; }
    .dash-speed-readout { position: absolute; left: 0; right: 0; top: 56%; text-align: center; pointer-events: none; }
    .dash-speed-num {
      font-family: 'Changa', var(--disp); font-weight: 800; font-size: 30px; line-height: 1;
      color: #fff; text-shadow: 0 0 10px rgba(255, 176, 32, 0.55);
    }
    .dash-speed-num.speed-warning { color: #ef4444 !important; }
    .dash-speed-unit { font-size: 10px; font-weight: 800; color: #fbbf24; margin-top: 2px; }
    .dash-mini { width: 88px; text-align: center; padding-bottom: 6px; }
    .dash-mini-svg { width: 100%; height: auto; overflow: visible; }
    .dash-mini-lbl { font-size: 10px; font-weight: 900; line-height: 1.1; margin-top: -2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .dash-mini-val { font-family: ui-monospace, monospace; font-size: 10px; font-weight: 900; margin-top: 1px; }
    .dash-lcd {
      display: flex; align-items: center; gap: 8px; justify-content: space-between;
      margin-top: 4px; padding: 4px 10px; border-radius: 10px;
      background: linear-gradient(180deg, #0a1a1f, #06100f);
      border: 1px solid #1f3b3a;
      box-shadow: inset 0 0 12px rgba(45, 212, 191, 0.12);
      color: #a7f3d0; font-size: 11px; font-weight: 900;
    }
    .dash-lcd-unit { font-size: 9px; opacity: 0.7; }
    .dash-health-track { flex: 1; min-width: 30px; height: 5px; border-radius: 99px; background: #0f2a2a; overflow: hidden; }
    .dash-lamp { font-size: 11px; filter: grayscale(1) brightness(0.6); }
    .dash-lamp.on { filter: drop-shadow(0 0 4px #f59e0b); animation: pulseSpeed 0.5s ease-in-out infinite alternate; }
    @media (max-width: 640px) {
      .dash-cluster { padding: 5px 7px 6px; border-radius: 20px 20px 14px 14px; }
      .dash-speedo { width: 104px; height: 104px; }
      .dash-speed-num { font-size: 22px; }
      .dash-mini { width: 58px; }
      .dash-mini-lbl { font-size: 8px; }
      .dash-lcd { font-size: 9.5px; padding: 3px 7px; gap: 5px; }
    }

    /* ================= GPS ROAD MAP ================= */
    .hud-map {
      position: absolute; left: 10px; top: 96px; z-index: 20; pointer-events: none;
      width: 120px; border-radius: 16px 16px 16px 4px; overflow: hidden;
      border: 2px solid #3a4152; background: #0b1120;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    }
    .hud-map canvas { display: block; width: 100%; height: auto; }
    .hud-map-title {
      position: absolute; top: 0; left: 0; right: 0; text-align: center;
      font-size: 10px; font-weight: 900; color: #e2e8f0; padding: 2px 0;
      background: linear-gradient(180deg, rgba(11, 17, 32, 0.95), rgba(11, 17, 32, 0));
    }
    @media (max-width: 640px) { .hud-map { width: 78px; top: 150px; left: 6px; } }
    /* Round road map */
    .hud-map {
      width: 132px; height: 132px; border-radius: 50%; border: 0; background: transparent;
      box-shadow: 0 0 0 3px rgba(11, 13, 19, 0.9), 0 10px 24px rgba(0, 0, 0, 0.55);
      overflow: hidden;
    }
    @media (max-width: 640px) { .hud-map { width: 96px; height: 96px; top: 150px; } }

    /* ================= COMPACT GAUGE CLUSTER ================= */
    .dash-cluster { padding: 6px 9px 6px; border-radius: 20px 20px 15px 15px; }
    .dash-speedo { width: 108px; height: 108px; }
    .dash-speed-num { font-size: 22px; }
    .dash-speed-unit { font-size: 8.5px; margin-top: 1px; }
    .dash-mini { width: 62px; padding-bottom: 4px; }
    .dash-mini-lbl { font-size: 8.5px; }
    .dash-mini-val { font-size: 8.5px; }
    .dash-lcd { font-size: 9.5px; padding: 3px 8px; gap: 6px; margin-top: 3px; }
    .dash-lcd-unit { font-size: 8px; }
    .dash-lamp { font-size: 9.5px; }
    @media (max-width: 640px) {
      .dash-cluster { padding: 4px 6px 5px; border-radius: 16px 16px 12px 12px; }
      .dash-speedo { width: 80px; height: 80px; }
      .dash-speed-num { font-size: 17px; }
      .dash-speed-unit { font-size: 7.5px; }
      .dash-mini { width: 46px; }
      .dash-mini-lbl, .dash-mini-val { font-size: 7px; }
      .dash-lcd { font-size: 8px; padding: 2px 6px; gap: 4px; }
    }

    /* Nitro gauge stacked above the fuel gauge, left of the speedometer */
    .dash-row { align-items: center; }
    .dash-minis { display: flex; flex-direction: column; gap: 2px; }
    .dash-minis .dash-mini { width: 58px; padding-bottom: 0; }
    .dash-minis .dash-mini-svg { margin-bottom: -4px; }
    @media (max-width: 640px) {
      .dash-minis .dash-mini { width: 44px; }
    }

    /* Action buttons moved to the top-right, so the round map takes the top-left corner */
    .hud-map { top: 12px; }
    @media (max-width: 640px) { .hud-map { top: 10px; } }

    /* Gauges in one row (nitro · speed · fuel), compact */
    .dash-row { align-items: flex-end; gap: 1px; }
    .dash-minis { flex-direction: row; }
    .dash-minis .dash-mini { width: 38px; padding-bottom: 1px; }
    .dash-minis .dash-mini-svg { margin-bottom: -3px; }
    .dash-speedo { width: 64px; height: 64px; }
    .dash-speed-num { font-size: 14px; }
    .dash-speed-unit { font-size: 6px; margin-top: 0; }
    .dash-mini-lbl, .dash-mini-val { font-size: 6px; margin-top: 0; }
    .dash-cluster { padding: 3px 5px 3px; border-radius: 14px 14px 10px 10px; }
    .dash-lcd { font-size: 7px; padding: 1px 5px; margin-top: 1px; gap: 4px; }
    .dash-lcd-unit { font-size: 6px; }
    .dash-lamp { font-size: 7.5px; }
    .dash-health-track { min-width: 18px; height: 3px; }
    @media (max-width: 640px) {
      .dash-minis .dash-mini { width: 32px; }
      .dash-speedo { width: 54px; height: 54px; }
      .dash-speed-num { font-size: 12px; }
      .dash-speed-unit { font-size: 5.5px; }
      .dash-mini-lbl, .dash-mini-val { font-size: 5.5px; }
      .dash-cluster { padding: 2px 4px 3px; border-radius: 12px 12px 9px 9px; }
      .dash-lcd { font-size: 6.5px; padding: 1px 4px; }
    }

    /* ================= ON-SCREEN NOTIFICATIONS ================= */
    .toast-stack {
      position: fixed; left: 50%; top: 70px; z-index: 9999;
      transform: translateX(-50%);
      width: min(92vw, 440px);
      display: flex; flex-direction: column; align-items: center; gap: 6px;
      pointer-events: none;
      transition: top 0.2s ease;
    }
    .toast-card {
      --c: #fbbf24; --bg1: rgba(48, 32, 4, 0.94);
      position: relative; direction: rtl;
      display: flex; align-items: center; gap: 10px;
      max-width: 100%;
      padding: 8px 14px 11px 10px;
      border-radius: 16px;
      background: linear-gradient(180deg, var(--bg1), rgba(10, 12, 18, 0.94));
      border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent);
      box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.45),
        0 0 18px color-mix(in srgb, var(--c) 22%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(8px);
      color: #fff; font-weight: 900; font-size: 14px; line-height: 1.35;
      overflow: hidden; pointer-events: auto; cursor: pointer;
      animation: toastIn 0.38s cubic-bezier(0.2, 1.4, 0.4, 1) both;
    }
    .toast-icon {
      flex-shrink: 0; width: 30px; height: 30px; border-radius: 10px;
      display: grid; place-items: center; font-size: 17px;
      background: color-mix(in srgb, var(--c) 22%, transparent);
      box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 60%, transparent);
    }
    .toast-msg { color: color-mix(in srgb, var(--c) 28%, #fff); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
    .toast-count {
      flex-shrink: 0; background: var(--c); color: #0b0d13;
      font-size: 11px; font-weight: 900; border-radius: 99px; padding: 1px 7px;
    }
    .toast-bar {
      position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2.5px;
      border-radius: 9px; background: rgba(255, 255, 255, 0.08); overflow: hidden;
    }
    .toast-bar i { display: block; height: 100%; background: var(--c); transform-origin: right; }
    .t-success { --c: #34d399; --bg1: rgba(4, 44, 32, 0.94); }
    .t-danger  { --c: #f87171; --bg1: rgba(64, 10, 14, 0.94); }
    .t-info    { --c: #22d3ee; --bg1: rgba(4, 34, 46, 0.94); }
    .t-neutral { --c: #94a3b8; --bg1: rgba(22, 28, 40, 0.94); }
    .toast-card.t-danger { animation: toastIn 0.38s cubic-bezier(0.2, 1.4, 0.4, 1) both, toastShake 0.36s 0.12s; }
    .toast-card.bump { animation: toastBump 0.3s ease; }
    .toast-card.leaving { animation: toastOut 0.26s ease-in forwards; pointer-events: none; }
    @keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(0.9); } to { opacity: 1; transform: none; } }
    @keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(0.94); } }
    @keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
    @keyframes toastShake { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }
    @keyframes toastBump { 50% { transform: scale(1.06); } }
    @media (max-width: 640px) {
      .toast-card { font-size: 12.5px; padding: 6px 11px 9px 8px; border-radius: 14px; gap: 8px; }
      .toast-icon { width: 26px; height: 26px; font-size: 15px; border-radius: 8px; }
    }

    /* Calmer notifications: smaller, a bit see-through, so the road stays visible */
    .toast-stack { width: min(86vw, 380px); gap: 5px; }
    .toast-card { font-size: 13px; padding: 6px 12px 9px 9px; gap: 8px; opacity: 0.94; }
    .toast-icon { width: 26px; height: 26px; font-size: 15px; border-radius: 8px; }
    @media (max-width: 640px) {
      .toast-card { font-size: 11.5px; padding: 5px 10px 8px 7px; border-radius: 12px; }
      .toast-icon { width: 22px; height: 22px; font-size: 13px; border-radius: 7px; }
    }

    /* Compact glass pills: small, one line, colour accent on the side */
    .toast-stack { width: auto; max-width: min(78vw, 330px); gap: 4px; }
    .toast-card {
      gap: 6px; padding: 4px 11px 5px 5px; border-radius: 999px;
      font-size: 12px; font-weight: 800; line-height: 1.25; opacity: 1;
      background: rgba(12, 14, 20, 0.72);
      border: 1px solid rgba(255, 255, 255, 0.10);
      border-inline-start: 3px solid var(--c);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 10px color-mix(in srgb, var(--c) 18%, transparent);
      backdrop-filter: blur(10px) saturate(1.3);
      -webkit-backdrop-filter: blur(10px) saturate(1.3);
      animation: toastPillIn 0.3s cubic-bezier(0.2, 1.3, 0.4, 1) both;
    }
    .toast-icon {
      width: 20px; height: 20px; border-radius: 50%; font-size: 11.5px;
      background: color-mix(in srgb, var(--c) 26%, transparent); box-shadow: none;
    }
    .toast-msg { color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .toast-count { font-size: 10px; padding: 0 6px; }
    .toast-bar { left: 14px; right: 14px; bottom: 1px; height: 1.5px; background: transparent; }
    .toast-bar i { opacity: 0.7; }
    .toast-card.t-danger { animation: toastPillIn 0.3s cubic-bezier(0.2, 1.3, 0.4, 1) both, toastShake 0.3s 0.1s; }
    @keyframes toastPillIn { from { opacity: 0; transform: translateY(-8px) scale(0.85); } to { opacity: 1; transform: none; } }
    @media (max-width: 640px) {
      .toast-stack { max-width: min(80vw, 280px); }
      .toast-card { font-size: 10.5px; padding: 3px 9px 4px 4px; }
      .toast-icon { width: 17px; height: 17px; font-size: 10px; }
    }

    /* ================= BLUE EXIT SIGN ================= */
    .highway-sign.exit-sign {
      display: flex; align-items: center; gap: 14px;
      direction: rtl;
      padding: 6px 12px 7px 14px;
      min-width: 210px; max-width: min(78vw, 340px);
      border-radius: 10px;
      border: 2px solid #ffffff;
      background: linear-gradient(180deg, #2557c7 0%, #1d47a8 55%, #173b8c 100%);
      box-shadow: inset 0 0 0 2px #163a8a, 0 6px 18px rgba(0, 0, 0, 0.55);
    }
    .exit-sign-text { flex: 1; min-width: 0; text-align: right; }
    .exit-sign-label { font-size: 10px; font-weight: 800; color: #dbe6ff; opacity: 0.85; line-height: 1.1; }
    .exit-sign-name { font-size: 16px; font-weight: 900; color: #fff; line-height: 1.15; }
    .exit-sign-dist {
      flex-shrink: 0; direction: ltr;
      font-family: 'Changa', var(--disp); font-weight: 800; font-size: 20px;
      color: #facc15; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
      white-space: nowrap;
    }
    @media (max-width: 640px) {
      .highway-sign.exit-sign { min-width: 0; gap: 10px; padding: 4px 9px 5px 10px; }
      .exit-sign-name { font-size: 13px; }
      .exit-sign-dist { font-size: 16px; }
    }

    /* ================= ROUND MAP WITH PROGRESS RING ================= */
    .hud-map {
      overflow: visible; background: transparent; border-radius: 50%;
      box-shadow: none; padding: 7px;
      width: 140px; height: 140px; box-sizing: border-box;
    }
    .hud-map canvas {
      width: 100%; height: 100%; border-radius: 50%;
      box-shadow: 0 0 0 3px #0b0d12, 0 10px 24px rgba(0, 0, 0, 0.55);
    }
    .hud-map-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
    .hud-map-ring circle { fill: none; stroke-width: 5; }
    .hud-map-ring .ring-track { stroke: rgba(11, 13, 18, 0.85); stroke-width: 7; }
    .hud-map-ring .ring-fill { stroke: #facc15; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray 0.25s linear; filter: drop-shadow(0 0 3px rgba(250, 204, 21, 0.6)); }
    .hud-map-pill {
      position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
      background: #0b0d12; color: #fff; border: 2px solid #fff; border-radius: 99px;
      padding: 1px 10px; font: 800 12px 'Changa', var(--disp); white-space: nowrap;
      direction: ltr;
      box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
    }
    @media (max-width: 640px) {
      .hud-map { width: 104px; height: 104px; padding: 5px; }
      .hud-map-pill { font-size: 10px; padding: 0 8px; bottom: -7px; }
    }

    /* Settings: all radio stations */
    .radio-stations-row { flex-direction: column; align-items: stretch !important; gap: 8px; }
    .radio-station-list { display: flex; flex-wrap: wrap; gap: 6px; }
    .radio-station-list .radio-station-chip { flex: 0 0 auto; font-size: 12px; padding: 5px 10px; border-radius: 99px; }

    /* Exit board stacked above the round map, top-left */
    .hud-left-stack {
      position: absolute; left: 6px; top: 12px; z-index: 20; pointer-events: none;
      display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
    }
    .hud-left-stack { align-items: stretch; direction: ltr; }
    .hud-left-stack .exit-sign { align-self: flex-start; }
    /* Map hugs the far left, a bit smaller */
    .hud-left-stack .hud-map { position: relative; left: auto; top: auto; margin: 0; align-self: flex-start;
      width: 112px; height: 112px; padding: 5px; }
    .hud-left-stack .hud-map-pill { font-size: 10px; padding: 0 8px; bottom: -7px; }
    .hud-left-stack .exit-sign { max-width: min(46vw, 300px); min-width: 0; }
    @media (max-width: 640px) {
      .hud-left-stack { left: 4px; top: 8px; gap: 10px; }
      .hud-left-stack .exit-sign { max-width: 52vw; }
      .hud-left-stack .hud-map { width: 88px; height: 88px; padding: 4px; }
      .hud-left-stack .hud-map-pill { font-size: 9px; }
    }

    /* Shop: locked vehicles and paints */
    .chip.car-locked { position: relative; opacity: 0.92; }
    .car-price-tag {
      margin-top: 3px; font-size: 10.5px; font-weight: 900; color: #fde68a;
      background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(250, 204, 21, 0.45);
      border-radius: 99px; padding: 1px 8px; white-space: nowrap;
    }
    .car-free-tag {
      margin-top: 3px; font-size: 10px; font-weight: 900; color: #052e16;
      background: #4ade80; border-radius: 99px; padding: 0 8px;
    }
    .color-swatch { position: relative; }
    .color-swatch.locked { opacity: 0.75; }
    .swatch-lock { font-size: 10px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.8)); }

    /* ---------- Workshop tuning: stats, pips, celebration ---------- */
    .upg-stage { font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: 999px;
      background: #1e293b; color: #94a3b8; border: 1px solid #334155; white-space: nowrap; }
    .upg-stage.lit { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #111827; border-color: #fde68a;
      box-shadow: 0 0 12px rgba(251, 191, 36, 0.45); }
    .upg-stat { opacity: 0.55; transition: opacity 0.2s; }
    .upg-stat.mine { opacity: 1; }
    .upg-stat-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 800; color: #cbd5e1; margin-bottom: 3px; }
    .upg-vals { font-family: ui-monospace, monospace; font-weight: 900; direction: ltr; color: #fff; }
    .upg-vals small { font-size: 10px; color: #94a3b8; }
    .upg-stat.mine .upg-v0 { color: #e2e8f0; }
    .upg-arrow { color: #64748b; margin: 0 4px; }
    .upg-v1 { color: #34d399; text-shadow: 0 0 8px rgba(52, 211, 153, 0.5); }
    .upg-bar { position: relative; height: 6px; border-radius: 999px; background: #0b1220; border: 1px solid #1e293b; overflow: hidden; direction: ltr; }
    .upg-bar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; transition: width 0.5s cubic-bezier(.2,.9,.3,1.2); }
    .upg-bar i.now { background: linear-gradient(90deg, #2563eb, #60a5fa); }
    .upg-stat.mine .upg-bar i.now { background: linear-gradient(90deg, #d97706, #fbbf24); }
    .upg-bar i.gain { background: repeating-linear-gradient(45deg, #34d399 0 4px, #10b981 4px 8px); border-radius: 0 999px 999px 0;
      animation: upgGainPulse 1.1s ease-in-out infinite; }
    @keyframes upgGainPulse { 50% { opacity: 0.45; } }

    #upgPipsIndicator { direction: ltr; }
    .upg-pip { height: 12px; border-radius: 3px; background: #1e293b; border: 1px solid #334155; position: relative; }
    .upg-pip.ms { border-color: #b45309; }
    .upg-pip.on { background: linear-gradient(180deg, #fde047, #f59e0b); border-color: #fbbf24; box-shadow: 0 0 6px rgba(251, 191, 36, 0.5); }
    .upg-pip.on.ms { background: linear-gradient(180deg, #fff7ae, #f97316); box-shadow: 0 0 10px rgba(249, 115, 22, 0.7); }
    .upg-pip.next { animation: upgPipNext 1s ease-in-out infinite; }
    @keyframes upgPipNext { 50% { border-color: #fbbf24; background: #3b2f12; } }
    .upg-pip.pop { animation: upgPipPop 0.6s cubic-bezier(.2,1.6,.4,1); }
    @keyframes upgPipPop { 0% { transform: scale(0.2); filter: brightness(3); } 60% { transform: scale(1.5); } 100% { transform: scale(1); } }

    #btnExecuteUpgrade.upg-cant { filter: grayscale(0.6) brightness(0.8); }
    #btnExecuteUpgrade.upg-maxed { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
    .upg-shake { animation: upgShake 0.4s; }
    @keyframes upgShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

    #workshopCarHeroImg.upg-hop { animation: upgHop 0.9s cubic-bezier(.3,1.4,.5,1); }
    @keyframes upgHop { 0% { transform: translateY(0); } 25% { transform: translateY(-26px) scale(1.04); filter: brightness(1.35) drop-shadow(0 0 22px rgba(251,191,36,.8)); }
      55% { transform: translateY(4px) scale(0.99); } 75% { transform: translateY(-6px); } 100% { transform: translateY(0); } }
    #upgPlate.upg-flash { animation: upgFlash 0.8s ease-out; }
    @keyframes upgFlash { 0% { box-shadow: 0 0 0 3px #fbbf24, 0 0 40px rgba(251,191,36,.7); } 100% { box-shadow: none; } }

    .upg-sparks { position: absolute; left: 50%; top: 55%; width: 0; height: 0; z-index: 20; pointer-events: none; }
    .upg-sparks i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fde68a;
      box-shadow: 0 0 8px #fbbf24, 0 0 2px #fff; opacity: 0; animation: upgSpark 0.95s ease-out forwards; }
    .upg-sparks i.gold { width: 9px; height: 9px; background: #fff; box-shadow: 0 0 12px #f59e0b, 0 0 24px #f97316; }
    @keyframes upgSpark { 0% { transform: translate(0, 0) scale(1.2); opacity: 1; }
      100% { transform: translate(var(--dx), calc(var(--dy) + 60px)) scale(0.3); opacity: 0; } }
    #pipsEngine, #pipsNos, #pipsBrakes, #pipsArmor { direction: ltr; }
