    /* ============================================================
       0. CSS RESET & GLOBAL THEME
       ============================================================ */
    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      user-select: none;
    }

    :root {
      --bg-dark: #080b10;
      --panel-bg: #111622;
      --panel-border: #1f2c40;
      --accent-green: #10b981;
      --accent-neon-green: #39ff14;
      --accent-cyan: #06b6d4;
      --accent-neon-cyan: #00f0ff;
      --accent-amber: #f59e0b;
      --accent-red: #ef4444;
      --accent-purple: #a855f7;
      --text-main: #f8fafc;
      --text-sub: #cbd5e1;
      --text-dim: #94a3b8;
      --font-body: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      --font-code: 'JetBrains Mono', Consolas, monospace;
      --font-pixel: 'Press Start 2P', monospace;
    }

    html, body {
      height: 100vh;
      max-height: 100vh;
      overflow: hidden;
      background-color: var(--bg-dark);
      color: var(--text-main);
      font-family: var(--font-body);
      font-size: 14px;
      line-height: 1.4;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
    }

    /* CRT Scanline overlay */
    body::before {
      content: " ";
      display: block;
      position: fixed;
      top: 0; left: 0; bottom: 0; right: 0;
      background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%),
                  linear-gradient(90deg, rgba(255,0,0,0.015), rgba(0,255,0,0.01), rgba(0,0,255,0.015));
      z-index: 990;
      background-size: 100% 3px, 6px 100%;
      pointer-events: none;
    }

    /* Screen Edge Glow */
    #screenGlowOverlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      pointer-events: none;
      z-index: 995;
      transition: box-shadow 0.3s ease;
    }
    .combo-glow {
      box-shadow: inset 0 0 50px rgba(0, 240, 255, 0.4), inset 0 0 100px rgba(57, 255, 20, 0.25) !important;
    }
    .siren-glow {
      box-shadow: inset 0 0 70px rgba(239, 68, 68, 0.7), inset 0 0 120px rgba(255, 0, 85, 0.4) !important;
      animation: sirenPulse 0.8s infinite alternate;
    }
    .fever-glow {
      box-shadow: inset 0 0 60px rgba(245, 158, 11, 0.8), inset 0 0 120px rgba(239, 68, 68, 0.6) !important;
      animation: feverPulse 0.4s infinite alternate;
    }
    @keyframes sirenPulse { 0% { opacity: 0.4; } 100% { opacity: 1; } }
    @keyframes feverPulse { 0% { opacity: 0.7; } 100% { opacity: 1; filter: brightness(1.2); } }

    /* Extreme Screen Shake for Adviser Raid */
    .adviser-shake {
      animation: adviserDoorBang 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    }
    @keyframes adviserDoorBang {
      10%, 90% { transform: translate3d(-6px, 4px, 0); }
      20%, 80% { transform: translate3d(8px, -6px, 0); }
      30%, 50%, 70% { transform: translate3d(-10px, 8px, 0); }
      40%, 60% { transform: translate3d(10px, -8px, 0); }
    }

    #particleCanvas {
      position: fixed;
      top: 0; left: 0;
      width: 100vw;
      height: 100vh;
      pointer-events: none;
      z-index: 980;
    }

    /* ============================================================
       TOP HEADER & VISUAL WEEKLY TIMELINE CALENDAR
       ============================================================ */
    header {
      height: 60px;
      background: #0c111a;
      border-bottom: 2px solid var(--panel-border);
      padding: 0 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-shrink: 0;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
      position: relative;
      z-index: 100;
    }

    .brand-group {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .logo-badge {
      font-family: var(--font-pixel);
      font-size: 10px;
      background: linear-gradient(135deg, #ef4444, #991b1b);
      color: #fff;
      padding: 5px 8px;
      border-radius: 4px;
      letter-spacing: 0.5px;
      box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    }

    .brand-title {
      font-size: 15px;
      font-weight: 800;
      color: #ffffff;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .brand-title span.pixel-sub {
      font-family: var(--font-pixel);
      font-size: 8px;
      color: var(--accent-neon-cyan);
    }

    /* Center Visual Weekly Timeline */
    .timeline-bar {
      display: flex;
      align-items: center;
      gap: 6px;
      background: #070a0f;
      border: 1px solid #1c2738;
      border-radius: 6px;
      padding: 4px 8px;
    }

    .timeline-step {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 700;
      color: #64748b;
      background: #0f1520;
      border: 1px solid transparent;
      transition: all 0.3s;
    }

    .timeline-step.completed {
      color: #10b981;
      background: rgba(16, 185, 129, 0.1);
      border-color: rgba(16, 185, 129, 0.3);
    }

    .timeline-step.active {
      color: #000;
      background: var(--accent-neon-cyan);
      box-shadow: 0 0 12px var(--accent-neon-cyan);
      font-weight: 800;
      animation: stepPulse 1.2s infinite alternate;
    }

    .timeline-step.deadline { color: #f87171; }
    .timeline-step.deadline.active {
      background: var(--accent-red);
      color: #fff;
      box-shadow: 0 0 15px #ef4444;
    }

    @keyframes stepPulse {
      from { transform: scale(1); filter: brightness(1); }
      to { transform: scale(1.05); filter: brightness(1.2); }
    }

    /* Daily Milestone & Adviser Warning Pills */
    .daily-quota-pill {
      display: flex;
      align-items: center;
      gap: 6px;
      background: #0d1522;
      border: 1px solid #1f3047;
      border-radius: 6px;
      padding: 4px 10px;
      font-size: 11px;
      color: #94a3b8;
    }
    .daily-quota-pill b {
      color: var(--accent-neon-cyan);
      font-family: var(--font-code);
      font-size: 12px;
    }
    .quota-pending {
      color: var(--accent-amber);
      font-size: 10px;
      font-weight: 700;
    }
    .quota-cleared {
      color: var(--accent-neon-green);
      font-size: 10px;
      font-weight: 800;
    }

    .warning-pill {
      display: flex;
      align-items: center;
      gap: 5px;
      background: #180d12;
      border: 1px solid #4a1924;
      border-radius: 6px;
      padding: 4px 8px;
      font-size: 11px;
      font-weight: 800;
      color: #f87171;
    }
    .warning-pill.danger {
      border-color: #ef4444;
      box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
      animation: stepPulse 0.8s infinite alternate;
    }
    .warning-circle {
      display: inline-block;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: #2a151d;
      border: 1px solid #571b29;
      margin: 0 1px;
      vertical-align: middle;
    }
    .warning-circle.filled {
      background: #ef4444;
      border-color: #ff7878;
      box-shadow: 0 0 6px #ef4444;
    }

    .header-right {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .header-btn {
      background: #16202f;
      border: 1px solid #283a52;
      color: var(--text-sub);
      padding: 5px 8px;
      border-radius: 5px;
      cursor: pointer;
      font-size: 11px;
      font-weight: 700;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .header-btn:hover {
      background: #23344d;
      color: #ffffff;
      border-color: var(--accent-cyan);
    }
    .header-btn.highlight {
      border-color: var(--accent-purple);
      color: #c084fc;
    }
    .header-btn.fever-badge {
      border-color: #f59e0b;
      color: #f59e0b;
      font-weight: 800;
    }

    /* ============================================================
       MAIN 3-PANEL CONTAINER (100VH NO OVERFLOW)
       ============================================================ */
    .panoramic-lab-wrapper {
      width: 100%;
      max-width: 100vw;
      padding: 2px 14px 4px 14px;
      box-sizing: border-box;
      flex-shrink: 0;
      height: 140px;
    }

    .game-container {
      display: grid;
      grid-template-columns: 310px 1fr 350px;
      gap: 12px;
      padding: 2px 14px 8px 14px;
      height: calc(100vh - 54px - 142px);
      max-height: calc(100vh - 54px - 142px);
      box-sizing: border-box;
      overflow: hidden;
    }

    .panel {
      background: var(--panel-bg);
      border: 1px solid var(--panel-border);
      border-radius: 8px;
      padding: 12px;
      display: flex;
      flex-direction: column;
      box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
      overflow-y: auto;
      min-height: 0;
    }

    .panel::-webkit-scrollbar { width: 5px; }
    .panel::-webkit-scrollbar-thumb {
      background: #27364b;
      border-radius: 3px;
    }

    .panel-title {
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.5px;
      color: var(--accent-amber);
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 6px;
      margin-bottom: 8px;
      border-bottom: 1px solid #1f2c40;
      text-transform: uppercase;
    }

    /* ============================================================
       LEFT PANEL: INTERACTIVE AVATAR, COLLEAGUES, STATS
       ============================================================ */
    .character-card {
      background: linear-gradient(180deg, #172233 0%, #0e1522 100%);
      border: 1px solid #283c57;
      border-radius: 6px;
      padding: 8px;
      margin-bottom: 8px;
      display: flex;
      flex-direction: column;
      align-items: center;
      position: relative;
    }

    .char-avatar-box {
      width: 82px;
      height: 82px;
      background: #090e17;
      border: 2px solid var(--accent-cyan);
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
      margin-bottom: 4px;
      cursor: pointer;
      transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .char-avatar-box:hover {
      transform: scale(1.05);
      border-color: var(--accent-neon-green);
    }
    .char-avatar-box:active { transform: scale(0.95); }

    .char-mood-bubble {
      position: absolute;
      top: -6px;
      right: -8px;
      background: var(--accent-amber);
      color: #000;
      font-size: 9px;
      font-weight: 800;
      padding: 2px 6px;
      border-radius: 10px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    }

    .char-meta {
      text-align: center;
      width: 100%;
    }

    .char-name {
      font-size: 13px;
      font-weight: 800;
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
    }

    .char-title-tag {
      font-size: 10px;
      font-weight: 700;
      color: var(--accent-neon-cyan);
      background: rgba(6, 182, 212, 0.15);
      padding: 1px 6px;
      border-radius: 4px;
      margin-top: 2px;
      display: inline-block;
    }

    .char-dialogue {
      font-size: 11px;
      color: #cbd5e1;
      background: #090e17;
      border: 1px solid #1c2738;
      border-radius: 4px;
      padding: 4px 6px;
      margin-top: 5px;
      width: 100%;
      text-align: center;
      min-height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }

    /* Player Direct Action Buttons */
    .char-actions-bar {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 4px;
      width: 100%;
      margin-top: 5px;
    }

    .btn-char-action {
      background: linear-gradient(180deg, #1a2638 0%, #111a27 100%);
      border: 1px solid #2d4263;
      border-bottom: 3.5px solid #0a111a;
      color: var(--text-sub);
      padding: 3px 2px 2px 2px;
      border-radius: 5px;
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1px;
      box-shadow: 0 2px 0 #05080e, 0 3px 6px rgba(0, 0, 0, 0.5);
      transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.1s ease;
    }
    .btn-char-action:hover:not(:disabled) {
      background: linear-gradient(180deg, #24354e 0%, #162233 100%);
      color: #fff;
      border-color: var(--accent-cyan);
      transform: translateY(-1.5px);
      box-shadow: 0 3.5px 0 #05080e, 0 5px 10px rgba(0, 240, 255, 0.2);
    }
    .btn-char-action:active:not(:disabled) {
      transform: translateY(2.5px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #05080e;
    }

    /* Colleagues Display Bar */
    .colleagues-bar {
      background: #0b1018;
      border: 1px solid #1e2b3c;
      border-radius: 5px;
      padding: 5px 8px;
      margin-bottom: 8px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .colleagues-title {
      font-size: 10px;
      font-weight: 700;
      color: var(--accent-purple);
      display: flex;
      justify-content: space-between;
    }

    .colleagues-slots {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 3px;
    }

    .colleague-chip {
      background: #131c28;
      border: 1px dashed #283a52;
      border-radius: 4px;
      padding: 3px 2px;
      font-size: 8px;
      color: #64748b;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 2px;
      cursor: pointer;
      text-align: center;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      transition: all 0.2s;
    }
    .colleague-chip.active {
      border: 1px solid var(--accent-purple);
      background: #1d182b;
      color: #e9d5ff;
      font-weight: 700;
      box-shadow: 0 0 6px rgba(168, 85, 247, 0.3);
    }

    /* Active Set Synergies Bar */
    .set-synergy-bar {
      background: #151408;
      border: 1px solid #b45309;
      border-radius: 5px;
      padding: 4px 8px;
      margin-bottom: 8px;
      font-size: 10px;
      color: var(--accent-amber);
      display: none;
      align-items: center;
      justify-content: space-between;
    }
    .set-synergy-bar.active { display: flex; }

    /* Resources Boxes */
    .resource-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      margin-bottom: 8px;
    }

    .resource-box {
      background: #141c28;
      border: 1px solid #223044;
      padding: 5px 8px;
      border-radius: 6px;
    }

    .res-label {
      font-size: 10px;
      font-weight: 700;
      color: var(--text-dim);
      display: flex;
      justify-content: space-between;
    }

    .res-val {
      font-size: 16px;
      font-weight: 800;
      font-family: var(--font-code);
      color: #ffffff;
      margin-top: 1px;
    }
    .res-val.energy { color: var(--accent-neon-green); }
    .res-val.score { color: var(--accent-neon-cyan); }

    /* Stats Rows */
    .stat-rows {
      display: flex;
      flex-direction: column;
      gap: 5px;
      margin-bottom: 6px;
    }

    .stat-row {
      background: #131a26;
      border: 1px solid #1f2c3f;
      border-radius: 5px;
      padding: 5px 7px;
      display: flex;
      flex-direction: column;
      gap: 2px;
      cursor: pointer;
      transition: border-color 0.2s;
    }
    .stat-row:hover { border-color: var(--accent-cyan); }

    .stat-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .stat-name {
      font-size: 11px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 4px;
      color: var(--text-main);
    }

    .stat-num {
      font-family: var(--font-code);
      font-weight: 800;
      font-size: 12px;
      color: var(--accent-cyan);
    }

    .stat-desc {
      font-size: 10px;
      color: var(--text-dim);
      line-height: 1.2;
    }

    /* Hardware Rack */
    .hardware-rack {
      background: #090e17;
      border: 1px solid #1e2c3f;
      border-radius: 5px;
      padding: 5px 8px;
      margin-top: auto;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 10px;
      color: #4ade80;
      font-family: var(--font-code);
    }
    .hardware-rack:hover {
      background: #101826;
      border-color: #4ade80;
    }

    /* ============================================================
       CENTER PANEL: 3x5 SLOT & CONTROLS & FEVER HUD
       ============================================================ */
    .center-panel {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      background: radial-gradient(circle at 50% 20%, #151e2c 0%, #0d121b 100%);
      border: 1px solid #283a52;
      position: relative;
    }

    .camera-shake {
      animation: cameraShake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    }
    @keyframes cameraShake {
      10%, 90% { transform: translate3d(-3px, 1px, 0); }
      20%, 80% { transform: translate3d(4px, -2px, 0); }
      30%, 50%, 70% { transform: translate3d(-5px, 3px, 0); }
      40%, 60% { transform: translate3d(5px, -3px, 0); }
    }

    /* Fever Banner on Machine */
    .fever-indicator {
      width: 100%;
      max-width: 610px;
      background: linear-gradient(90deg, #dc2626, #f59e0b, #ec4899, #dc2626);
      background-size: 300% 100%;
      border-radius: 6px;
      padding: 6px 12px;
      display: none;
      align-items: center;
      justify-content: space-between;
      font-family: var(--font-pixel);
      font-size: 9.5px;
      color: #fff;
      text-shadow: 0 0 6px #fff,
                   0 0 14px #ff0055,
                   0 0 28px #ff0055,
                   0 0 45px #f59e0b,
                   0 0 70px #ff0055;
      box-shadow: 0 0 18px rgba(255, 0, 85, 0.75),
                  0 0 35px rgba(245, 158, 11, 0.5),
                  0 0 60px rgba(255, 0, 85, 0.35),
                  inset 0 0 15px rgba(255, 255, 255, 0.3);
      animation: feverRainbowShift 2.5s linear infinite, feverGlowPulse 0.8s infinite alternate ease-in-out;
      border: 1px solid rgba(255, 255, 255, 0.5);
    }
    .fever-indicator.active { display: flex; }

    @keyframes feverRainbowShift {
      0% { background-position: 0% 50%; }
      100% { background-position: 300% 50%; }
    }
    @keyframes feverGlowPulse {
      0% { filter: drop-shadow(0 0 8px #f59e0b) brightness(1); }
      100% { filter: drop-shadow(0 0 20px #ff0055) brightness(1.2); }
    }

    /* Slot HUD */
    .slot-hud {
      width: 100%;
      max-width: 610px;
      background: #090c12;
      border: 2px solid #1f2b3e;
      border-radius: 6px;
      padding: 6px 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-shrink: 0;
    }

    .hud-box { text-align: center; }
    .hud-label {
      font-size: 9px;
      font-weight: 700;
      color: var(--text-dim);
      text-transform: uppercase;
    }
    .hud-val {
      font-family: var(--font-code);
      font-size: 16px;
      font-weight: 800;
      color: var(--accent-neon-cyan);
    }
    .hud-val.combo { color: var(--accent-amber); }

    /* ============================================================
       PANORAMIC INTERACTIVE LAB DIORAMA (FULL 3-PANEL SPAN)
       ============================================================ */
    .lab-diorama-housing {
      width: 100%;
      height: 100%;
      background: #080c14;
      border: 2px solid #1e2c40;
      border-radius: 8px;
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), inset 0 0 25px rgba(0, 0, 0, 0.85);
      user-select: none;
    }

    .diorama-header {
      height: 22px;
      background: linear-gradient(90deg, rgba(13, 20, 33, 0.98) 0%, rgba(18, 28, 45, 0.98) 100%);
      border-bottom: 1px solid #1f3048;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 10px;
      font-size: 9.5px;
      font-weight: 700;
      color: #94a3b8;
      z-index: 10;
    }

    .diorama-title-tag {
      display: flex;
      align-items: center;
      gap: 7px;
      color: var(--accent-neon-cyan);
      font-family: var(--font-code);
      font-size: 10px;
    }

    .diorama-led {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #10b981;
      box-shadow: 0 0 8px #10b981;
      animation: ledBlink 1.4s infinite alternate;
    }
    @keyframes ledBlink {
      from { opacity: 0.35; filter: drop-shadow(0 0 2px #10b981); }
      to { opacity: 1; filter: drop-shadow(0 0 6px #39ff14); }
    }

    .diorama-time-badge {
      color: var(--accent-amber);
      font-size: 9px;
      background: rgba(245, 158, 11, 0.12);
      border: 1px solid rgba(245, 158, 11, 0.3);
      border-radius: 3px;
      padding: 1px 5px;
    }

    .diorama-telemetry {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 9px;
      color: #64748b;
      font-family: var(--font-code);
    }
    .diorama-telemetry span b {
      color: var(--accent-cyan);
    }

    .diorama-stage {
      flex: 1;
      position: relative;
      display: flex;
      flex-direction: column;
      background: #090e18;
      overflow: hidden;
    }

    /* Panoramic Wall (Top 52px) */
    .diorama-wall {
      height: 52px;
      background: linear-gradient(180deg, #101826 0%, #172437 100%);
      border-bottom: 2px solid #24354c;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 14px;
    }

    .wall-section-left {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .diorama-clock {
      font-family: var(--font-pixel);
      font-size: 7.5px;
      color: #38bdf8;
      background: #0b121e;
      border: 1px solid #1e293b;
      padding: 3px 6px;
      border-radius: 3px;
      letter-spacing: 0.5px;
    }

    .diorama-pantry-sign {
      font-size: 8px;
      color: #94a3b8;
      border-left: 2px solid var(--accent-amber);
      padding-left: 5px;
    }

    /* Panoramic Lab Windows with time-of-day sky */
    .diorama-window {
      width: 140px;
      height: 34px;
      background: linear-gradient(180deg, #38bdf8 0%, #bae6fd 60%, #e0f2fe 100%);
      border: 2px solid #334155;
      border-radius: 4px;
      box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.4), 0 2px 6px rgba(0,0,0,0.5);
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: flex-end;
      justify-content: space-around;
    }
    .diorama-window::after {
      content: "";
      position: absolute;
      bottom: 0; left: 0; right: 0;
      height: 10px;
      background: repeating-linear-gradient(90deg, #1e293b 0px, #1e293b 8px, #0f172a 8px, #0f172a 16px);
      opacity: 0.8;
    }
    .diorama-window.sunset {
      background: linear-gradient(180deg, #c2410c 0%, #f97316 40%, #fbbf24 100%);
      box-shadow: inset 0 0 12px rgba(249, 115, 22, 0.6), 0 2px 6px rgba(0,0,0,0.5);
    }
    .diorama-window.night {
      background: linear-gradient(180deg, #050515 0%, #0f172a 60%, #1e1b4b 100%);
      box-shadow: inset 0 0 15px rgba(99, 102, 241, 0.5), 0 2px 6px rgba(0,0,0,0.5);
    }
    .diorama-window.night::before {
      content: "✦  •   ★";
      position: absolute;
      top: 3px; left: 10px;
      font-size: 7px;
      color: #e0e7ff;
      letter-spacing: 12px;
    }

    /* Math Research Whiteboard */
    .diorama-whiteboard {
      background: #f8fafc;
      border: 2px solid #64748b;
      border-radius: 4px;
      padding: 3px 10px;
      cursor: pointer;
      box-shadow: 0 3px 8px rgba(0,0,0,0.6);
      transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1px;
    }
    .diorama-whiteboard:hover {
      transform: scale(1.06);
      border-color: var(--accent-neon-cyan);
      box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
    }
    .whiteboard-math {
      font-family: var(--font-code);
      font-size: 9px;
      color: #091e42;
      font-weight: 800;
      white-space: nowrap;
    }
    .whiteboard-sub {
      font-size: 6.5px;
      color: #64748b;
      font-weight: 700;
    }

    /* Top Conference Poster Badges */
    .diorama-posters {
      display: flex;
      gap: 6px;
      align-items: center;
    }
    .poster-chip {
      background: #0f172a;
      border: 1px solid #334155;
      border-radius: 2px;
      padding: 2px 4px;
      font-size: 7px;
      font-weight: 800;
      color: #38bdf8;
      letter-spacing: 0.3px;
    }
    .poster-chip.neurips { color: #f43f5e; border-color: rgba(244, 63, 94, 0.4); }
    .poster-chip.sec { color: #10b981; border-color: rgba(16, 185, 129, 0.4); }

    /* Glass Server Room Bay (Right Side) */
    .diorama-server-rack-area {
      display: flex;
      gap: 5px;
      align-items: flex-end;
      height: 42px;
      cursor: pointer;
      background: rgba(10, 20, 35, 0.7);
      border: 1px solid #1e3a5f;
      border-radius: 4px;
      padding: 2px 8px;
      position: relative;
    }
    .diorama-server-rack-area:hover {
      border-color: var(--accent-neon-cyan);
      box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
    }
    .server-room-label {
      position: absolute;
      top: -6px; right: 6px;
      font-size: 6.5px;
      font-weight: 800;
      color: #38bdf8;
      background: #09111e;
      padding: 0 3px;
      border: 1px solid #1e3a5f;
      border-radius: 2px;
    }
    .mini-server-rack {
      width: 14px;
      height: 36px;
      background: #090e17;
      border: 1.5px solid #2d3e55;
      border-radius: 3px;
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      align-items: center;
      padding: 2px 0;
      box-shadow: inset 0 0 5px rgba(0,0,0,0.8);
      position: relative;
    }
    .mini-rack-led {
      width: 7px;
      height: 2px;
      border-radius: 1px;
      background: #22c55e;
      box-shadow: 0 0 4px #22c55e;
      animation: rackBlink 0.9s infinite alternate;
    }
    .mini-rack-fan {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      border: 1px dashed #38bdf8;
      animation: fanSpin 0.6s linear infinite;
    }
    @keyframes fanSpin {
      100% { transform: rotate(360deg); }
    }
    .mini-server-rack.quantum {
      border-color: var(--accent-neon-cyan);
      box-shadow: 0 0 12px rgba(0, 240, 255, 0.6), inset 0 0 6px rgba(0, 240, 255, 0.4);
    }
    .mini-server-rack.quantum .mini-rack-led {
      background: var(--accent-neon-cyan);
      box-shadow: 0 0 6px var(--accent-neon-cyan);
    }

    /* Panoramic Floor (Bottom 62px) */
    .diorama-floor {
      flex: 1;
      background: 
        linear-gradient(45deg, #0c1320 25%, #101a2b 25%, #101a2b 50%, #0c1320 50%, #0c1320 75%, #101a2b 75%, #101a2b 100%);
      background-size: 16px 16px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 16px;
      border-top: 1px solid #1a293e;
    }

    /* Floor Zones */
    .diorama-zone-pantry {
      display: flex;
      align-items: center;
      gap: 10px;
      background: rgba(15, 23, 42, 0.65);
      border: 1px solid #1e293b;
      border-radius: 5px;
      padding: 3px 8px;
    }

    .diorama-zone-player {
      display: flex;
      align-items: center;
      gap: 6px;
      background: rgba(14, 23, 38, 0.85);
      border: 1.5px solid #23354d;
      border-radius: 6px;
      padding: 3px 10px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .diorama-zone-player:hover {
      border-color: var(--accent-cyan);
      box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
    }

    .diorama-zone-colleagues {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 200px;
      justify-content: center;
    }

    .diorama-zone-servers {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* Props & Interactive Elements */
    .diorama-prop {
      cursor: pointer;
      transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .diorama-prop:hover {
      transform: scale(1.22);
      filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6));
    }

    .pixel-art-svg {
      image-rendering: pixelated;
      shape-rendering: crispEdges;
      vertical-align: middle;
      display: block;
    }

    /* Cat Idle Breathing & Floating Zzz */
    .cat-idle-breathe {
      transform-origin: center bottom;
      animation: catBreathe 2.4s infinite ease-in-out;
    }
    @keyframes catBreathe {
      0%, 100% { transform: scale(1, 1) translateY(0); }
      50% { transform: scale(1.05, 0.94) translateY(0.5px); }
    }
    .cat-zzz-float {
      position: absolute;
      top: -10px;
      right: -2px;
      font-family: var(--font-pixel);
      font-size: 8px;
      font-weight: 800;
      color: #6ee7b7;
      text-shadow: 0 0 4px #059669;
      pointer-events: none;
      animation: catZzzFloat 2s infinite ease-out;
    }
    @keyframes catZzzFloat {
      0% { opacity: 0; transform: translate(0, 0) scale(0.7); }
      40% { opacity: 1; }
      100% { opacity: 0; transform: translate(6px, -12px) scale(1.2); }
    }

    /* Player Idle Bob & Typing Hands */
    .player-idle-bob {
      transform-origin: center bottom;
      animation: playerBob 1.6s infinite ease-in-out;
    }
    @keyframes playerBob {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-1.5px); }
    }
    .typing-hand-left {
      animation: typeLeft 0.25s infinite alternate ease-in-out;
    }
    .typing-hand-right {
      animation: typeRight 0.25s infinite alternate-reverse ease-in-out;
    }
    @keyframes typeLeft {
      0% { transform: translateY(0); }
      100% { transform: translateY(-2px); }
    }
    @keyframes typeRight {
      0% { transform: translateY(0); }
      100% { transform: translateY(-2px); }
    }

    /* Blinking LEDs */
    .blinking-led {
      animation: ledBlink 1.4s infinite alternate ease-in-out;
    }
    @keyframes ledBlink {
      0%, 100% { opacity: 1; filter: drop-shadow(0 0 3px currentColor); }
      50% { opacity: 0.25; filter: none; }
    }
    .blinking-led-fast {
      animation: ledBlinkFast 0.5s infinite alternate ease-in-out;
    }
    @keyframes ledBlinkFast {
      0%, 100% { opacity: 1; filter: drop-shadow(0 0 4px currentColor); }
      50% { opacity: 0.2; }
    }

    /* Steam & Pulse Effects */
    .pixel-steam-cloud {
      position: absolute;
      top: -10px;
      left: 6px;
      font-size: 10px;
      pointer-events: none;
      animation: steamCloudRise 1.4s infinite ease-out;
    }
    @keyframes steamCloudRise {
      0% { opacity: 0; transform: translateY(0) scale(0.6); }
      40% { opacity: 0.9; }
      100% { opacity: 0; transform: translateY(-10px) scale(1.2); }
    }

    .pulse-neon-aura {
      animation: neonCanPulse 1.8s infinite alternate ease-in-out;
    }
    @keyframes neonCanPulse {
      0% { filter: drop-shadow(0 0 3px #00f0ff); }
      100% { filter: drop-shadow(0 0 8px #39ff14) drop-shadow(0 0 14px #00f0ff); }
    }

    .fan-spin-fast {
      transform-origin: center center;
      animation: fanSpin 0.3s infinite linear;
    }
    @keyframes fanSpin {
      to { transform: rotate(360deg); }
    }

    .coolant-bubble {
      animation: coolantFlow 1.2s infinite alternate ease-in-out;
    }
    @keyframes coolantFlow {
      0% { opacity: 0.4; }
      100% { opacity: 1; filter: drop-shadow(0 0 5px #00f0ff); }
    }

    .prop-gaming-pc {
      animation: pcRgbGlow 3s infinite linear;
    }
    @keyframes pcRgbGlow {
      0% { filter: drop-shadow(0 0 4px #f43f5e); }
      33% { filter: drop-shadow(0 0 5px #10b981); }
      66% { filter: drop-shadow(0 0 5px #06b6d4); }
      100% { filter: drop-shadow(0 0 4px #f43f5e); }
    }

    .prop-papers {
      font-size: 13px;
    }

    .diorama-sprite {
      font-size: 17px;
      display: flex;
      flex-direction: column;
      align-items: center;
      cursor: pointer;
      position: relative;
      transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .diorama-sprite:hover {
      transform: translateY(-4px) scale(1.2);
    }
    .sprite-label {
      font-size: 7.5px;
      font-weight: 800;
      color: #94a3b8;
      background: rgba(0, 0, 0, 0.75);
      border: 1px solid #1e293b;
      padding: 0 4px;
      border-radius: 3px;
      margin-top: -2px;
      white-space: nowrap;
    }

    .diorama-colleagues-area {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .diorama-bubble {
      position: absolute;
      bottom: 46px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(15, 23, 42, 0.98);
      border: 1.5px solid var(--accent-neon-cyan);
      border-radius: 6px;
      padding: 3px 10px;
      font-size: 10px;
      font-weight: 800;
      color: #fff;
      box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
      pointer-events: none;
      z-index: 25;
      animation: bubbleFloat 2.8s ease-in-out forwards;
      white-space: nowrap;
    }
    @keyframes bubbleFloat {
      0% { opacity: 0; transform: translate(-50%, 8px); }
      15% { opacity: 1; transform: translate(-50%, 0); }
      80% { opacity: 1; transform: translate(-50%, -3px); }
      100% { opacity: 0; transform: translate(-50%, -10px); }
    }

    .diorama-float-pts {
      position: fixed;
      font-family: var(--font-code);
      font-size: 12px;
      font-weight: 800;
      color: #38bdf8;
      text-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
      pointer-events: none;
      z-index: 9999;
      animation: floatPtsAnim 0.75s ease-out forwards;
    }
    @keyframes floatPtsAnim {
      0% { opacity: 1; transform: translateY(0) scale(1); }
      100% { opacity: 0; transform: translateY(-30px) scale(1.2); }
    }

    .legacy-perk-card {
      transition: all 0.15s ease;
      cursor: pointer;
    }
    .legacy-perk-card:hover {
      border-color: #fbbf24 !important;
      background: #292524 !important;
    }
    .legacy-perk-card.selected {
      border-color: #f59e0b !important;
      background: #3c2415 !important;
      box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
    }

    /* ============================================================
       GACHA / 3-CARD PACK DRAFT MODAL STYLES
       ============================================================ */
    .gacha-modal-card {
      background: linear-gradient(145deg, #0e1626 0%, #152238 100%);
      border: 2px solid var(--accent-cyan);
      box-shadow: 0 0 35px rgba(6, 182, 212, 0.4), inset 0 0 25px rgba(0, 0, 0, 0.8);
      border-radius: 12px;
      width: 760px;
      max-width: 95vw;
      padding: 18px 24px;
      display: flex;
      flex-direction: column;
      align-items: center;
      position: relative;
      animation: gachaModalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    @keyframes gachaModalPop {
      0% { transform: scale(0.85); opacity: 0; }
      100% { transform: scale(1); opacity: 1; }
    }

    .gacha-header {
      text-align: center;
      margin-bottom: 16px;
    }
    .gacha-badge {
      font-size: 10px;
      font-weight: 800;
      color: var(--accent-neon-cyan);
      letter-spacing: 2px;
      text-transform: uppercase;
      margin-bottom: 4px;
    }
    .gacha-title {
      font-size: 18px;
      font-weight: 800;
      color: #fff;
      text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    }
    .gacha-subtitle {
      font-size: 11px;
      color: #94a3b8;
      margin-top: 3px;
    }

    .gacha-cards-container {
      display: flex;
      gap: 16px;
      justify-content: center;
      width: 100%;
      margin: 10px 0 18px 0;
    }

    .gacha-card {
      width: 215px;
      background: #090e18;
      border: 2px solid #203148;
      border-radius: 8px;
      padding: 14px 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      cursor: pointer;
      position: relative;
      transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
      box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
    }
    .gacha-card:hover {
      transform: translateY(-8px) scale(1.04);
    }

    .gacha-card.rarity-common {
      border-color: #38bdf8;
      box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
    }
    .gacha-card.rarity-rare {
      border-color: #22d3ee;
      box-shadow: 0 4px 18px rgba(34, 211, 238, 0.35);
    }
    .gacha-card.rarity-epic {
      border-color: #c084fc;
      box-shadow: 0 4px 22px rgba(192, 132, 252, 0.45);
    }
    .gacha-card.rarity-legendary {
      border-color: #f59e0b;
      box-shadow: 0 4px 28px rgba(245, 158, 11, 0.6);
      animation: legendaryGlow 1.8s infinite alternate;
    }
    @keyframes legendaryGlow {
      from { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4); }
      to { box-shadow: 0 4px 32px rgba(245, 158, 11, 0.85); }
    }

    .gacha-rarity-pill {
      font-size: 8px;
      font-weight: 800;
      padding: 2px 7px;
      border-radius: 10px;
      text-transform: uppercase;
      margin-bottom: 8px;
      letter-spacing: 0.5px;
    }
    .rarity-common .gacha-rarity-pill { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid #38bdf8; }
    .rarity-rare .gacha-rarity-pill { background: rgba(34, 211, 238, 0.2); color: #22d3ee; border: 1px solid #22d3ee; }
    .rarity-epic .gacha-rarity-pill { background: rgba(192, 132, 252, 0.2); color: #c084fc; border: 1px solid #c084fc; }
    .rarity-legendary .gacha-rarity-pill { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid #fbbf24; }

    .gacha-card-sprite {
      font-size: 38px;
      margin: 6px 0;
      filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
    }
    .gacha-card-name {
      font-size: 13px;
      font-weight: 800;
      color: #fff;
      margin-bottom: 4px;
      min-height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .gacha-card-desc {
      font-size: 10px;
      color: #94a3b8;
      line-height: 1.4;
      flex: 1;
      margin-bottom: 12px;
      min-height: 48px;
    }
    .btn-gacha-pick {
      width: 100%;
      background: linear-gradient(180deg, #10b981 0%, #059669 100%);
      color: #fff;
      border: 1px solid #34d399;
      border-bottom: 4px solid #064e3b;
      box-shadow: 0 3px 0 #022c22, 0 5px 12px rgba(16, 185, 129, 0.35);
      border-radius: 5px;
      padding: 6px 0 5px 0;
      font-size: 11px;
      font-weight: 800;
      cursor: pointer;
      transition: transform 0.08s ease, box-shadow 0.08s ease;
    }
    .btn-gacha-pick:hover {
      transform: translateY(-2px);
      background: #34d399;
      color: #000;
      box-shadow: 0 5px 0 #022c22, 0 8px 18px rgba(52, 211, 153, 0.6);
    }
    .btn-gacha-pick:active {
      transform: translateY(3px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #022c22;
    }

    .gacha-replacement-box {
      width: 100%;
      background: rgba(239, 68, 68, 0.12);
      border: 1px solid rgba(239, 68, 68, 0.35);
      border-radius: 6px;
      padding: 8px 12px;
      margin-bottom: 12px;
      text-align: center;
    }
    .replacement-title {
      font-size: 10.5px;
      font-weight: 800;
      color: #f87171;
      margin-bottom: 6px;
    }
    .replacement-chips-row {
      display: flex;
      gap: 6px;
      justify-content: center;
      flex-wrap: wrap;
    }
    .replacement-chip {
      background: #1e1b2e;
      border: 1px solid #475569;
      border-radius: 4px;
      padding: 3px 8px;
      font-size: 9.5px;
      color: #cbd5e1;
      cursor: pointer;
      transition: all 0.15s;
    }
    .replacement-chip:hover {
      border-color: #ef4444;
      background: #450a0a;
      color: #fff;
    }

    /* Daily Essential Banner in Shop */
    .shop-daily-banner {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
      border: 1.5px solid rgba(16, 185, 129, 0.4);
      border-radius: 6px;
      padding: 8px 10px;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .daily-banner-info {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .daily-drink-icon {
      font-size: 22px;
      filter: drop-shadow(0 0 6px #10b981);
    }
    .daily-banner-text {
      display: flex;
      flex-direction: column;
    }
    .daily-banner-title {
      font-size: 11.5px;
      font-weight: 800;
      color: #34d399;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .daily-badge-tag {
      font-size: 7.5px;
      background: #10b981;
      color: #000;
      padding: 0 4px;
      border-radius: 2px;
      font-weight: 800;
    }
    .daily-banner-desc {
      font-size: 9.5px;
      color: #94a3b8;
    }
    .btn-buy-daily {
      background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
      color: #022c22;
      border: 1px solid #6ee7b7;
      border-bottom: 4px solid #065f46;
      box-shadow: 0 3px 0 #022c22, 0 4px 10px rgba(16, 185, 129, 0.4);
      border-radius: 5px;
      padding: 5px 12px 4px 12px;
      font-size: 10.5px;
      font-weight: 800;
      cursor: pointer;
      transition: transform 0.08s ease, box-shadow 0.08s ease;
      white-space: nowrap;
    }
    .btn-buy-daily:hover:not(:disabled) {
      transform: translateY(-2px);
      background: #6ee7b7;
      box-shadow: 0 5px 0 #022c22, 0 8px 16px rgba(110, 231, 183, 0.6);
    }
    .btn-buy-daily:active:not(:disabled) {
      transform: translateY(3px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #022c22;
    }
    .btn-buy-daily:disabled {
      background: #334155;
      color: #64748b;
      border: 1px solid #475569;
      border-bottom: 3px solid #1e293b;
      box-shadow: 0 2px 0 #0f172a;
      cursor: not-allowed;
      transform: none;
    }

    /* Gacha Pack Box in Shop */
    .shop-gacha-card {
      background: #0d1522;
      border: 1.5px solid #23354d;
      border-radius: 6px;
      padding: 8px 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 7px;
      transition: all 0.15s;
    }
    .shop-gacha-card:hover {
      border-color: var(--accent-neon-cyan);
      box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
    }
    .gacha-card-icon {
      font-size: 20px;
    }
    .gacha-card-meta {
      flex: 1;
      margin: 0 10px;
    }
    .gacha-card-title {
      font-size: 11px;
      font-weight: 800;
      color: #fff;
    }
    .gacha-card-info-desc {
      font-size: 9px;
      color: #94a3b8;
    }
    .btn-open-gacha {
      background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
      color: #ffffff;
      border: 1px solid #7dd3fc;
      border-bottom: 4px solid #075985;
      box-shadow: 0 3px 0 #082f49, 0 4px 10px rgba(14, 165, 233, 0.4);
      border-radius: 5px;
      padding: 5px 11px 4px 11px;
      font-size: 10.5px;
      font-weight: 800;
      cursor: pointer;
      transition: transform 0.08s ease, box-shadow 0.08s ease;
      white-space: nowrap;
    }
    .btn-open-gacha:hover:not(:disabled) {
      transform: translateY(-2px);
      background: #7dd3fc;
      color: #0369a1;
      box-shadow: 0 5px 0 #082f49, 0 8px 16px rgba(56, 189, 248, 0.6);
    }
    .btn-open-gacha:active:not(:disabled) {
      transform: translateY(3px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #082f49;
    }
    .btn-open-gacha:disabled {
      background: #334155;
      color: #64748b;
      border: 1px solid #475569;
      border-bottom: 3px solid #1e293b;
      box-shadow: 0 2px 0 #0f172a;
      cursor: not-allowed;
      transform: none;
    }

    /* 3x5 Grid Housing */
    .slot-housing {
      background: #090d14;
      border: 3px solid #243347;
      border-radius: 8px;
      padding: 5px;
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 0, 0, 0.95);
      width: 100%;
      max-width: 610px;
      flex-shrink: 0;
      position: relative;
    }

    .slot-housing.fever-housing {
      border-color: #f59e0b !important;
      box-shadow: 0 0 30px rgba(245, 158, 11, 0.7), inset 0 0 25px rgba(239, 68, 68, 0.4) !important;
    }

    .slot-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 5px;
    }

    .slot-column {
      display: flex;
      flex-direction: column;
      gap: 5px;
      background: rgba(18, 25, 38, 0.6);
      padding: 3px;
      border-radius: 6px;
      border: 1px solid #1c2738;
    }

    .slot-column.spinning {
      filter: url(#verticalMotionBlur) drop-shadow(0 0 14px rgba(0, 240, 255, 0.5));
      will-change: transform, filter;
      animation: reelSpinVibrate 0.05s infinite alternate ease-in-out;
    }
    @keyframes reelSpinVibrate {
      0% { transform: translateY(-1.5px); }
      100% { transform: translateY(1.5px); }
    }
    .slot-column.spinning .slot-cell {
      transform: scaleY(1.08);
      filter: brightness(1.22);
      border-color: rgba(0, 240, 255, 0.45) !important;
    }

    /* Slot Cell */
    .slot-cell {
      height: 66px;
      background: #141c28;
      border: 2px solid #243347;
      border-radius: 6px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 1px;
      position: relative;
      transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
      cursor: pointer;
    }
    .slot-cell:hover {
      border-color: #3b506d;
      background: #1a2536;
    }

    .cell-icon-wrap {
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .cell-name {
      font-size: 9px;
      font-weight: 700;
      color: #94a3b8;
      max-width: 90%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* ChatGPT Wildcard Neon Bloom */
    .slot-cell.wildcard {
      background: radial-gradient(circle at 50% 30%, #0d3830 0%, #0c182c 100%) !important;
      border: 2px solid var(--accent-neon-cyan) !important;
      box-shadow: 0 0 12px rgba(0, 240, 255, 0.75),
                  0 0 25px rgba(0, 240, 255, 0.5),
                  0 0 45px rgba(57, 255, 20, 0.35),
                  inset 0 0 14px rgba(0, 240, 255, 0.35) !important;
      animation: neonWildcardPulse 1.8s infinite alternate ease-in-out;
    }
    .slot-cell.wildcard .cell-name {
      color: var(--accent-neon-green) !important;
      font-weight: 800 !important;
      text-shadow: 0 0 4px #39ff14,
                   0 0 10px #39ff14,
                   0 0 20px #00f0ff,
                   0 0 35px #00f0ff !important;
      letter-spacing: 0.5px;
    }
    @keyframes neonWildcardPulse {
      0% {
        box-shadow: 0 0 10px rgba(0, 240, 255, 0.6), 0 0 20px rgba(0, 240, 255, 0.3), inset 0 0 10px rgba(0, 240, 255, 0.25);
        filter: brightness(1.0);
      }
      100% {
        box-shadow: 0 0 20px rgba(0, 240, 255, 0.95), 0 0 40px rgba(57, 255, 20, 0.6), 0 0 65px rgba(0, 240, 255, 0.4), inset 0 0 18px rgba(57, 255, 20, 0.4);
        filter: brightness(1.25);
      }
    }

    .slot-cell.obstacle {
      background: #1a0f14;
      border-color: rgba(239, 68, 68, 0.5);
    }
    .slot-cell.obstacle .cell-name { color: #f87171; }

    .slot-cell.boss-lock {
      background: #250915 !important;
      border-color: #ff0055 !important;
      box-shadow: 0 0 10px rgba(255, 0, 85, 0.4);
    }

    /* Matched / Pop Animations */
    .slot-cell.highlight-match {
      border-color: var(--accent-neon-green) !important;
      background: rgba(16, 185, 129, 0.25) !important;
      box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
    }

    .slot-cell.pop {
      animation: popExplode 0.4s forwards ease-out;
      z-index: 10;
      border-color: #fff !important;
      box-shadow: 0 0 30px #ffffff, 0 0 45px var(--accent-neon-green) !important;
    }

    @keyframes popExplode {
      0% { transform: scale(1); filter: brightness(1); }
      35% { transform: scale(1.15); filter: brightness(2.2); }
      100% { transform: scale(0.2); opacity: 0; }
    }

    .slot-cell.fall-in {
      animation: dropDown 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
    }

    @keyframes dropDown {
      0% { transform: translateY(-70px); opacity: 0; }
      100% { transform: translateY(0); opacity: 1; }
    }

    /* Floating Score */
    .floating-text {
      position: absolute;
      font-size: 15px;
      font-weight: 800;
      font-family: var(--font-code);
      color: var(--accent-neon-green);
      text-shadow: 0 0 6px #000, 0 0 10px var(--accent-neon-green);
      pointer-events: none;
      z-index: 100;
      animation: floatUp 0.8s ease-out forwards;
    }

    @keyframes floatUp {
      0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
      50% { transform: translate(-50%, -20px) scale(1.2); }
      100% { opacity: 0; transform: translate(-50%, -40px) scale(0.9); }
    }

    /* Controls Panel */
    .controls-panel {
      width: 100%;
      max-width: 610px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex-shrink: 0;
    }

    .btn-spin {
      height: 50px;
      background: linear-gradient(180deg, #ff416c 0%, #ff2a2a 45%, #d61c1c 100%);
      border: 2px solid #ff9ebb;
      border-bottom: 6px solid #750000;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 800;
      color: #ffffff;
      cursor: pointer;
      box-shadow: 0 6px 0 #4a0000, 0 10px 24px rgba(255, 65, 108, 0.45);
      transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.1s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      letter-spacing: 0.5px;
      position: relative;
      text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    }

    .btn-spin:hover:not(:disabled) {
      transform: translateY(-2.5px);
      box-shadow: 0 8.5px 0 #4a0000, 0 15px 30px rgba(255, 65, 108, 0.65);
      filter: brightness(1.12);
    }
    .btn-spin:active:not(:disabled) {
      transform: translateY(5px);
      border-bottom: 2px solid #750000;
      box-shadow: 0 1px 0 #4a0000, 0 3px 8px rgba(255, 65, 108, 0.35);
    }
    .btn-spin:disabled {
      background: #293548;
      border: 2px solid #3b4c63;
      border-bottom: 4px solid #141c28;
      color: #64748b;
      cursor: not-allowed;
      box-shadow: 0 3px 0 #0d131c;
      filter: grayscale(0.85);
      transform: none;
    }

    .action-sub-bar {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 6px;
    }

    .btn-sub-action {
      height: 36px;
      background: linear-gradient(180deg, #1e2c3f 0%, #121b28 100%);
      border: 1px solid #324765;
      border-bottom: 4px solid #0b121b;
      color: var(--text-sub);
      border-radius: 6px;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      box-shadow: 0 3px 0 #05080e, 0 4px 8px rgba(0, 0, 0, 0.5);
    }
    .btn-sub-action:hover:not(:disabled) {
      transform: translateY(-2px);
      background: linear-gradient(180deg, #2b3e59 0%, #1a273b 100%);
      color: #ffffff;
      border-color: var(--accent-cyan);
      box-shadow: 0 5px 0 #05080e, 0 6px 14px rgba(0, 240, 255, 0.25);
    }
    .btn-sub-action:active:not(:disabled) {
      transform: translateY(3px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #05080e;
    }

    .btn-sub-action.minigame-btn {
      background: linear-gradient(180deg, #2e1065 0%, #1a0a38 100%);
      border-color: #a855f7;
      border-bottom-color: #581c87;
      color: #e9d5ff;
      box-shadow: 0 3px 0 #3b0764, 0 4px 8px rgba(168, 85, 247, 0.3);
    }
    .btn-sub-action.minigame-btn:hover:not(:disabled) {
      background: linear-gradient(180deg, #3b0764 0%, #2e1065 100%);
      border-color: #c084fc;
      box-shadow: 0 5px 0 #3b0764, 0 7px 16px rgba(192, 132, 252, 0.45);
      color: #fff;
    }
    .btn-sub-action.minigame-btn:active:not(:disabled) {
      transform: translateY(3px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #3b0764;
    }

    .btn-sub-action.end-turn {
      background: linear-gradient(180deg, #451a03 0%, #260e02 100%);
      border-color: #f59e0b;
      border-bottom-color: #78350f;
      color: #fef08a;
      box-shadow: 0 3px 0 #451a03, 0 4px 8px rgba(245, 158, 11, 0.3);
    }
    .btn-sub-action.end-turn:hover:not(:disabled) {
      background: linear-gradient(180deg, #5c2405 0%, #3a1503 100%);
      border-color: #fbbf24;
      box-shadow: 0 5px 0 #451a03, 0 7px 16px rgba(251, 191, 36, 0.45);
      color: #ffffff;
    }
    .btn-sub-action.end-turn:active:not(:disabled) {
      transform: translateY(3px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #451a03;
    }

    /* Pattern Test Bar */
    .pattern-test-bar {
      display: flex;
      gap: 5px;
      flex-wrap: wrap;
      justify-content: center;
      padding: 4px 6px;
      background: #090d14;
      border: 1px dashed #1f2c3d;
      border-radius: 4px;
      width: 100%;
      max-width: 610px;
    }

    .btn-test {
      background: #141c28;
      border: 1px solid #243449;
      color: #94a3b8;
      font-size: 10px;
      font-weight: 600;
      padding: 2px 6px;
      border-radius: 3px;
      cursor: pointer;
    }
    .btn-test:hover {
      background: #1c2738;
      color: #ffffff;
      border-color: var(--accent-cyan);
    }

    /* ============================================================
       RIGHT PANEL: CLEAN SHOP WITH TABS & REALTIME TERMINAL
       ============================================================ */
    .right-panel {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .shop-section {
      background: #0e141f;
      border: 1px solid #1f2d42;
      border-radius: 6px;
      padding: 8px 10px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex-shrink: 0;
    }

    .shop-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .shop-title-group {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .shop-title {
      font-size: 11px;
      font-weight: 800;
      color: var(--accent-cyan);
    }

    .shop-restock-info {
      font-size: 9px;
      color: var(--accent-amber);
      background: rgba(245, 158, 11, 0.15);
      padding: 1px 5px;
      border-radius: 3px;
    }

    .shop-actions-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: #090e17;
      border: 1px solid #1a2536;
      border-radius: 4px;
      padding: 4px 8px;
    }

    .btn-reroll {
      background: linear-gradient(180deg, #1e2c3e 0%, #131c28 100%);
      border: 1px solid #334862;
      border-bottom: 3.5px solid #0d141e;
      color: #f1f5f9;
      font-size: 10px;
      font-weight: 700;
      padding: 3px 9px 2px 9px;
      border-radius: 4px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 4px;
      box-shadow: 0 2px 0 #080c14;
      transition: transform 0.08s ease, box-shadow 0.08s ease;
    }
    .btn-reroll:hover:not(:disabled) {
      transform: translateY(-1.5px);
      background: linear-gradient(180deg, #2a3c54 0%, #1a2737 100%);
      border-color: var(--accent-amber);
      color: var(--accent-amber);
      box-shadow: 0 3.5px 0 #080c14, 0 4px 10px rgba(245, 158, 11, 0.25);
    }
    .btn-reroll:active:not(:disabled) {
      transform: translateY(2.5px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #080c14;
    }
    .btn-reroll:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      border-bottom-width: 2px;
      box-shadow: 0 1px 0 #080c14;
      transform: none;
    }

    /* Shop Tabs */
    .shop-tabs {
      display: flex;
      gap: 4px;
      border-bottom: 1px solid #1e2a3c;
      padding-bottom: 4px;
    }
    .shop-tab-btn {
      flex: 1;
      background: #121926;
      border: 1px solid #233247;
      color: var(--text-dim);
      font-size: 10px;
      font-weight: 700;
      padding: 3px 0;
      border-radius: 3px;
      cursor: pointer;
      text-align: center;
    }
    .shop-tab-btn.active {
      background: #1a273b;
      color: #ffffff;
      border-color: var(--accent-cyan);
    }

    .shop-items-list {
      display: flex;
      flex-direction: column;
      gap: 5px;
      min-height: 135px;
    }

    .shop-card {
      background: #141c28;
      border: 1px solid #223044;
      border-radius: 4px;
      padding: 5px 8px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: border-color 0.2s;
    }
    .shop-card:hover { border-color: var(--accent-cyan); }

    .shop-card-info {
      display: flex;
      flex-direction: column;
      gap: 1px;
      max-width: 75%;
    }

    .shop-card-name {
      font-size: 11px;
      font-weight: 700;
      color: #ffffff;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .shop-card-desc {
      font-size: 10px;
      color: var(--text-dim);
      line-height: 1.2;
    }

    .btn-buy {
      background: linear-gradient(180deg, #059669 0%, #047857 100%);
      border: 1px solid #34d399;
      border-bottom: 3.5px solid #064e3b;
      color: #ffffff;
      font-size: 10px;
      font-weight: 700;
      padding: 4px 10px 3px 10px;
      border-radius: 4px;
      cursor: pointer;
      white-space: nowrap;
      box-shadow: 0 2px 0 #022c22, 0 2px 6px rgba(0, 0, 0, 0.4);
      transition: transform 0.08s ease, box-shadow 0.08s ease;
    }
    .btn-buy:hover:not(:disabled) {
      transform: translateY(-1.5px);
      background: #10b981;
      box-shadow: 0 3.5px 0 #022c22, 0 4px 10px rgba(16, 185, 129, 0.5);
    }
    .btn-buy:active:not(:disabled) {
      transform: translateY(2.5px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #022c22;
    }
    .btn-buy:disabled {
      background: #243245;
      border: 1px solid #384b64;
      border-bottom: 2.5px solid #141c28;
      color: #64748b;
      box-shadow: 0 1px 0 #0f1622;
      cursor: not-allowed;
      transform: none;
    }

    /* Relic Inventory */
    .relic-section {
      background: #0e141f;
      border: 1px solid #1f2d42;
      border-radius: 6px;
      padding: 6px 8px;
      flex-shrink: 0;
    }

    .relic-title {
      font-size: 10px;
      font-weight: 700;
      color: var(--accent-amber);
      margin-bottom: 4px;
    }

    .relic-grid {
      display: flex;
      gap: 5px;
    }

    .relic-slot {
      flex: 1;
      height: 34px;
      background: #131a26;
      border: 1px dashed #27374e;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      color: #64748b;
    }
    .relic-slot.filled {
      border: 1px solid var(--accent-cyan);
      background: #162438;
      color: #ffffff;
      font-weight: 700;
    }

    /* Realtime Terminal Console */
    .terminal-container {
      display: flex;
      flex-direction: column;
      flex: 1;
      min-height: 110px;
      background: #080c12;
      border: 1px solid #1b2636;
      border-radius: 6px;
      overflow: hidden;
    }

    .terminal-bar {
      background: #0f1520;
      border-bottom: 1px solid #1b2636;
      padding: 4px 8px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 10px;
      font-weight: 700;
      color: var(--text-dim);
    }

    .terminal-logs {
      flex: 1;
      padding: 6px 8px;
      overflow-y: auto;
      font-family: var(--font-code);
      font-size: 11px;
      line-height: 1.4;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .terminal-logs::-webkit-scrollbar { width: 4px; }
    .terminal-logs::-webkit-scrollbar-thumb {
      background: #27364b;
      border-radius: 2px;
    }

    .log-line { word-break: break-all; }
    .log-time { color: #475569; margin-right: 5px; }
    .log-sys { color: var(--accent-neon-cyan); }
    .log-match { color: var(--accent-neon-green); font-weight: 700; }
    .log-combo { color: var(--accent-amber); font-weight: 700; }
    .log-warn { color: #f87171; }
    .log-info { color: #cbd5e1; }

    /* ============================================================
       STEAM STYLE ACHIEVEMENT POPUP
       ============================================================ */
    #achievementPopup {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: #101622;
      border: 2px solid #f59e0b;
      border-radius: 8px;
      padding: 12px 18px;
      display: flex;
      align-items: center;
      gap: 14px;
      box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85), 0 0 20px rgba(245, 158, 11, 0.4);
      z-index: 3000;
      transform: translateX(130%);
      transition: transform 0.4s cubic-bezier(0.17, 0.89, 0.32, 1.28);
      pointer-events: auto;
      max-width: 380px;
    }
    #achievementPopup.show { transform: translateX(0); }

    .achieve-trophy-icon {
      font-size: 32px;
      filter: drop-shadow(0 0 8px #f59e0b);
    }
    .achieve-text-group {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .achieve-header-tag {
      font-family: var(--font-pixel);
      font-size: 8px;
      color: var(--accent-amber);
      letter-spacing: 0.5px;
    }
    .achieve-title {
      font-size: 14px;
      font-weight: 800;
      color: #ffffff;
    }
    .achieve-desc {
      font-size: 11px;
      color: #cbd5e1;
      line-height: 1.3;
    }

    /* Day Transition Banner */
    #dayTransitionBanner {
      position: fixed;
      top: 30%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0.8);
      background: rgba(13, 18, 28, 0.95);
      border: 2px solid var(--accent-neon-cyan);
      box-shadow: 0 0 40px rgba(0, 240, 255, 0.5);
      border-radius: 8px;
      padding: 20px 40px;
      text-align: center;
      z-index: 2000;
      pointer-events: none;
      opacity: 0;
      transition: all 0.4s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    }
    #dayTransitionBanner.show {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
    .banner-day-title {
      font-family: var(--font-pixel);
      font-size: 17px;
      color: var(--accent-neon-cyan);
      margin-bottom: 6px;
    }
    .banner-day-sub {
      font-size: 13px;
      color: #cbd5e1;
    }

    /* Screen-Center Dopamine Jackpot Overlay */
    #jackpotOverlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      pointer-events: none;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 2100;
      opacity: 0;
      transform: scale(0.6);
      transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    #jackpotOverlay.active {
      opacity: 1;
      transform: scale(1);
    }
    .jackpot-banner {
      background: linear-gradient(135deg, rgba(20, 10, 30, 0.96), rgba(40, 12, 55, 0.96));
      border: 3px solid #f59e0b;
      box-shadow: 0 0 60px rgba(245, 158, 11, 0.85), 0 0 120px rgba(239, 68, 68, 0.7);
      border-radius: 12px;
      padding: 24px 44px;
      text-align: center;
      animation: jackpotPulse 0.4s infinite alternate;
    }
    .jackpot-sparkles {
      font-size: 22px;
      letter-spacing: 10px;
      margin-bottom: 6px;
    }
    .jackpot-title {
      font-family: var(--font-pixel);
      font-size: 24px;
      background: linear-gradient(to right, #f59e0b, #ef4444, #00f0ff, #39ff14);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 8px;
    }
    .jackpot-sub {
      font-family: var(--font-code);
      font-size: 18px;
      font-weight: 800;
      color: #ffffff;
      text-shadow: 0 0 10px #00f0ff;
    }
    @keyframes jackpotPulse {
      0% { transform: scale(1); filter: brightness(1); }
      100% { transform: scale(1.05); filter: brightness(1.3); }
    }

    .modal-reward-box {
      background: #0b121e;
      border: 2px solid var(--accent-neon-cyan);
      border-radius: 8px;
      padding: 16px;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }
    .modal-reward-icon {
      font-size: 42px;
      filter: drop-shadow(0 0 10px #f59e0b);
      animation: stepPulse 0.8s infinite alternate;
    }
    .modal-reward-title {
      font-size: 16px;
      font-weight: 800;
      color: #ffffff;
    }
    .modal-reward-desc {
      font-size: 12px;
      color: #94a3b8;
      line-height: 1.4;
    }

    /* Modal System */
    .modal-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(4, 7, 12, 0.88);
      backdrop-filter: blur(4px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      padding: 16px;
    }
    .modal-overlay.active { display: flex; }

    .modal-card {
      background: #111722;
      border: 2px solid var(--accent-cyan);
      border-radius: 8px;
      width: 100%;
      max-width: 530px;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(6, 182, 212, 0.3);
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      animation: modalPop 0.25s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    }
    @keyframes modalPop {
      from { transform: scale(0.85); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }

    .modal-badge {
      font-size: 11px;
      font-weight: 800;
      color: var(--accent-amber);
      text-transform: uppercase;
      letter-spacing: 1px;
    }
    .modal-title {
      font-size: 17px;
      font-weight: 800;
      color: #ffffff;
    }

    .modal-event-header {
      display: flex;
      gap: 12px;
      align-items: center;
      background: #090e17;
      border: 1px solid #1f2d42;
      border-radius: 6px;
      padding: 10px;
    }
    .event-portrait-box {
      width: 60px;
      height: 60px;
      background: #121926;
      border: 2px solid var(--accent-amber);
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .event-header-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .modal-desc {
      font-size: 13px;
      color: #cbd5e1;
      line-height: 1.5;
    }

    .modal-options {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .modal-opt-btn {
      background: #172130;
      border: 1px solid #2b3d56;
      border-radius: 6px;
      padding: 10px 12px;
      color: #ffffff;
      text-align: left;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .modal-opt-btn:hover:not(:disabled) {
      background: #223249;
      border-color: var(--accent-cyan);
    }
    .modal-opt-btn:disabled {
      background: #0e131c;
      border-color: #1e2838;
      color: #64748b;
      cursor: not-allowed;
      opacity: 0.6;
    }

    .opt-req-tag {
      font-size: 11px;
      color: var(--accent-amber);
      font-family: var(--font-code);
    }
    .opt-req-tag.unmet { color: #f87171; }

    /* Minigame Modal */
    .minigame-arena {
      background: #080d14;
      border: 2px solid #23344d;
      border-radius: 6px;
      padding: 16px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
    }
    .tuning-track {
      width: 100%;
      height: 40px;
      background: #121926;
      border: 2px solid #334764;
      border-radius: 20px;
      position: relative;
      overflow: hidden;
    }
    .convergence-sweet-spot {
      position: absolute;
      top: 0; bottom: 0;
      left: 42%;
      width: 16%;
      background: rgba(16, 185, 129, 0.4);
      border-left: 2px dashed #10b981;
      border-right: 2px dashed #10b981;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: 800;
      color: var(--accent-neon-green);
    }
    .tuning-needle {
      position: absolute;
      top: 2px; bottom: 2px;
      width: 12px;
      background: #ff0055;
      box-shadow: 0 0 10px #ff0055;
      border-radius: 6px;
      transform: translateX(-50%);
      left: 10%;
    }
    .minigame-score-row {
      display: flex;
      justify-content: space-between;
      width: 100%;
      font-family: var(--font-code);
      font-size: 13px;
      color: #94a3b8;
    }

    /* ============================================================
       TITLE SCREEN & CHARACTER SELECTION
       ============================================================ */
    #titleScreenOverlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: radial-gradient(circle at center, #0f172a 0%, #030712 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 2000;
      transition: opacity 0.35s ease, visibility 0.35s ease;
      padding: 16px;
    }
    #titleScreenOverlay.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }
    .title-card-container {
      max-width: 860px;
      width: 100%;
      background: #090f1a;
      border: 2px solid var(--accent-cyan);
      box-shadow: 0 0 50px rgba(0, 240, 255, 0.22), inset 0 0 30px rgba(6, 182, 212, 0.08);
      border-radius: 12px;
      padding: 22px 24px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
      animation: modalPop 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    }
    .title-logo-badge {
      font-family: var(--font-pixel);
      font-size: 26px;
      background: linear-gradient(to right, #00f0ff, #38bdf8, #818cf8, #c084fc);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      text-align: center;
      letter-spacing: 2px;
    }
    .title-sub {
      font-family: var(--font-code);
      font-size: 12px;
      color: #94a3b8;
      letter-spacing: 1px;
      text-align: center;
    }
    .char-select-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      width: 100%;
    }
    .char-card-option {
      background: #0f1726;
      border: 2px solid #1f2e45;
      border-radius: 8px;
      padding: 12px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
    }
    .char-card-option:hover {
      transform: translateY(-3px);
      border-color: var(--accent-cyan);
      box-shadow: 0 6px 18px rgba(6, 182, 212, 0.25);
    }
    .char-card-option.selected {
      border-color: var(--accent-neon-green);
      background: #11232c;
      box-shadow: 0 0 20px rgba(57, 255, 20, 0.35);
    }
    .char-option-name {
      font-size: 13px;
      font-weight: 800;
      color: #fff;
    }
    .char-option-role {
      font-size: 10px;
      font-weight: 700;
      color: var(--accent-cyan);
    }
    .char-option-quote {
      font-size: 10px;
      color: #94a3b8;
      font-style: italic;
      text-align: center;
      min-height: 28px;
    }
    .char-option-stats {
      font-family: var(--font-code);
      font-size: 10px;
      color: #cbd5e1;
      background: #090e18;
      border: 1px solid #1e293b;
      padding: 4px 6px;
      border-radius: 4px;
      width: 100%;
      text-align: center;
    }
    .char-traits-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
      width: 100%;
      margin-top: 4px;
    }
    .char-trait-pill {
      background: #141f30;
      border: 1px solid #253852;
      border-radius: 4px;
      padding: 3px 6px;
      font-size: 9.5px;
      color: #e2e8f0;
      line-height: 1.3;
    }
    .char-trait-pill b {
      color: var(--accent-amber);
    }
    .start-game-btn {
      background: linear-gradient(180deg, #10b981 0%, #047857 100%);
      color: #ffffff;
      border: 2px solid #6ee7b7;
      border-bottom: 6px solid #064e3b;
      font-family: var(--font-pixel);
      font-size: 14px;
      padding: 10px 30px 8px 30px;
      border-radius: 8px;
      cursor: pointer;
      box-shadow: 0 6px 0 #022c22, 0 10px 24px rgba(16, 185, 129, 0.5);
      transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.1s ease;
    }
    .start-game-btn:hover {
      transform: translateY(-2.5px);
      filter: brightness(1.12);
      box-shadow: 0 8.5px 0 #022c22, 0 14px 28px rgba(16, 185, 129, 0.7);
    }
    .start-game-btn:active {
      transform: translateY(5px);
      border-bottom-width: 2px;
      box-shadow: 0 1px 0 #022c22;
    }

    /* Reel Tactical Controls (Hold & Nudge) */
    .reel-tactical-bar {
      display: flex;
      flex-direction: column;
      gap: 4px;
      width: 100%;
      max-width: 610px;
      margin-top: 4px;
    }
    .nudge-status-badge {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 2px 8px;
      background: #090e18;
      border: 1px solid #1a283c;
      border-radius: 4px;
      font-size: 10px;
      color: #94a3b8;
    }
    .nudge-status-badge b {
      color: var(--accent-amber);
      font-family: var(--font-code);
    }
    .reel-ctrl-row {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 6px;
    }
    .reel-ctrl-item {
      display: flex;
      align-items: center;
      gap: 3px;
      justify-content: center;
    }
    .btn-hold {
      flex: 1;
      height: 25px;
      background: linear-gradient(180deg, #182333 0%, #0f1622 100%);
      border: 1px solid #2b3e58;
      border-bottom: 3.5px solid #080d14;
      color: #94a3b8;
      font-size: 9.5px;
      font-weight: 800;
      border-radius: 4px;
      cursor: pointer;
      box-shadow: 0 2px 0 #05080e;
      transition: transform 0.08s ease, box-shadow 0.08s ease;
    }
    .btn-hold:hover {
      transform: translateY(-1.5px);
      border-color: var(--accent-cyan);
      color: #fff;
      box-shadow: 0 3.5px 0 #05080e, 0 3px 8px rgba(0, 240, 255, 0.25);
    }
    .btn-hold:active {
      transform: translateY(2.5px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #05080e;
    }
    .btn-hold.active {
      background: linear-gradient(180deg, #0e3748 0%, #08212d 100%);
      border-color: var(--accent-neon-cyan);
      border-bottom: 3.5px solid #02141c;
      color: var(--accent-neon-cyan);
      box-shadow: 0 2px 0 #010b0f, 0 0 12px rgba(0, 240, 255, 0.5);
    }
    .btn-hold.is-stopping {
      background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
      border-color: #fca5a5 !important;
      border-bottom: 3.5px solid #7f1d1d !important;
      color: #ffffff !important;
      box-shadow: 0 2px 0 #450a0a, 0 0 14px rgba(239, 68, 68, 0.8) !important;
      animation: stopPulse 0.4s infinite alternate !important;
      font-weight: 900 !important;
    }
    @keyframes stopPulse {
      from { transform: scale(0.96); filter: brightness(1); }
      to { transform: scale(1.05); filter: brightness(1.2); }
    }

    .prestige-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: linear-gradient(135deg, #78350f, #b45309);
      border: 1px solid #f59e0b;
      border-radius: 4px;
      padding: 2px 7px;
      font-size: 10px;
      font-weight: 800;
      color: #fef08a;
      box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
    }
    .btn-nudge {
      width: 20px;
      height: 25px;
      background: linear-gradient(180deg, #1c2a3d 0%, #121c29 100%);
      border: 1px solid #334865;
      border-bottom: 3.5px solid #0b1118;
      color: #38bdf8;
      font-size: 9px;
      font-weight: 800;
      border-radius: 3px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 0 #05080e;
      transition: transform 0.08s ease, box-shadow 0.08s ease;
    }
    .btn-nudge:hover:not(:disabled) {
      transform: translateY(-1.5px);
      background: #253954;
      border-color: #38bdf8;
      color: #fff;
      box-shadow: 0 3.5px 0 #05080e, 0 3px 8px rgba(56, 189, 248, 0.3);
    }
    .btn-nudge:active:not(:disabled) {
      transform: translateY(2.5px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #05080e;
    }
    .btn-nudge:disabled {
      opacity: 0.4;
      cursor: not-allowed;
      border-bottom-width: 2px;
      box-shadow: 0 1px 0 #05080e;
      transform: none;
    }
    .slot-column.column-held {
      box-shadow: 0 0 15px rgba(0, 240, 255, 0.45);
      border: 1px solid var(--accent-neon-cyan);
      border-radius: 6px;
    }

    /* Active Researcher Skills Bar */
    .active-skills-bar {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 6px;
      margin-bottom: 2px;
    }
    .btn-skill {
      background: linear-gradient(180deg, #182333 0%, #0e1520 100%);
      border: 1px solid #2d415d;
      border-bottom: 4px solid #080d14;
      border-radius: 6px;
      padding: 4px 6px;
      display: flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      box-shadow: 0 3px 0 #04070a, 0 4px 8px rgba(0, 0, 0, 0.4);
      transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
      text-align: left;
    }
    .btn-skill:hover:not(:disabled) {
      transform: translateY(-2px);
      border-color: var(--accent-neon-cyan);
      background: linear-gradient(180deg, #223249 0%, #141e2e 100%);
      box-shadow: 0 5px 0 #04070a, 0 6px 14px rgba(0, 240, 255, 0.25);
    }
    .btn-skill:active:not(:disabled) {
      transform: translateY(3px);
      border-bottom-width: 1px;
      box-shadow: 0 0.5px 0 #04070a;
    }
    .btn-skill:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      border-bottom-width: 2px;
      box-shadow: 0 1px 0 #04070a;
      transform: none;
    }
    .skill-icon {
      font-size: 16px;
    }
    .skill-meta {
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .skill-name {
      font-size: 10px;
      font-weight: 800;
      color: #ffffff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .skill-cost {
      font-size: 9px;
      font-family: var(--font-code);
      color: var(--accent-neon-green);
    }
    .char-traits-row {
      display: flex;
      gap: 4px;
      margin-top: 4px;
      width: 100%;
      flex-wrap: wrap;
    }
    .char-trait-badge {
      font-size: 9px;
      font-weight: 700;
      color: var(--accent-amber);
      background: rgba(245, 158, 11, 0.12);
      border: 1px solid rgba(245, 158, 11, 0.35);
      padding: 2px 5px;
      border-radius: 3px;
      flex: 1;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* ============================================================
       RESPONSIVE DESIGN: TABLET & MOBILE MEDIA QUERIES
       ============================================================ */

    /* ------------------------------------------------------------
       1. TABLET BREAKPOINT (max-width: 1024px)
       ------------------------------------------------------------ */
    @media (max-width: 1024px) {
      html, body {
        height: auto;
        min-height: 100vh;
        max-height: none;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }

      /* 1-Column Stack with Unconstrained Height */
      .game-container {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        overflow: visible;
        padding: 6px 12px 28px 12px;
        gap: 14px;
      }

      /* Reorder Panels: Center (Slot) Top -> Left (Profile) -> Right (Shop) */
      .center-panel {
        order: 1;
        width: 100%;
        max-width: 100%;
      }
      .left-panel {
        order: 2;
        width: 100%;
        max-width: 100%;
      }
      .right-panel {
        order: 3;
        width: 100%;
        max-width: 100%;
      }

      .panel {
        height: auto;
        max-height: none;
        min-height: auto;
        overflow: visible;
      }

      /* Top Header & Navigation Wrapping */
      header {
        height: auto;
        min-height: 56px;
        padding: 8px 14px;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-between;
      }

      header > div:nth-child(2) {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 2px;
      }

      .brand-group {
        order: 1;
      }

      .header-right {
        order: 2;
        flex-wrap: wrap;
        gap: 4px;
      }

      .timeline-bar {
        overflow-x: auto;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
        padding: 3px 6px;
      }

      /* Top Panoramic Diorama */
      .panoramic-lab-wrapper {
        height: auto;
        min-height: 140px;
        padding: 4px 12px;
      }
      .lab-diorama-housing {
        height: 140px;
      }
      .diorama-header {
        overflow-x: auto;
        white-space: nowrap;
        font-size: 9px;
        padding: 0 8px;
      }
      .diorama-stage {
        overflow-x: auto;
      }
      .diorama-wall, .diorama-floor {
        min-width: 580px;
      }

      /* Slot Machine Width Elasticity */
      .fever-indicator,
      .slot-hud,
      .slot-housing,
      .reel-tactical-bar,
      .controls-panel {
        width: 100%;
        max-width: 680px;
      }

      /* Modal Popups in Tablet Viewport */
      .modal-card {
        max-width: 92vw;
        max-height: 90vh;
        overflow-y: auto;
      }
      .gacha-modal-card {
        width: 92vw;
        max-width: 92vw;
        max-height: 90vh;
        overflow-y: auto;
        padding: 16px;
      }
      .title-card-container {
        width: 94vw;
        max-width: 94vw;
        max-height: 92vh;
        overflow-y: auto;
        padding: 16px;
      }
    }

    /* ------------------------------------------------------------
       2. MOBILE BREAKPOINT (max-width: 768px)
       ------------------------------------------------------------ */
    @media (max-width: 768px) {
      /* Fluid Scrollable Layout */
      html, body {
        height: auto;
        min-height: 100vh;
        max-height: none;
        overflow-x: hidden;
        overflow-y: auto;
      }

      .game-container {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        overflow: visible;
        padding: 4px 8px 30px 8px;
        gap: 12px;
      }

      .center-panel {
        order: 1;
        width: 100%;
        max-width: 100%;
        padding: 8px 6px;
      }
      .left-panel {
        order: 2;
        width: 100%;
        max-width: 100%;
        padding: 10px 8px;
      }
      .right-panel {
        order: 3;
        width: 100%;
        max-width: 100%;
        padding: 10px 8px;
      }

      .panel {
        padding: 10px 8px;
        border-radius: 6px;
        overflow: visible;
        height: auto;
        max-height: none;
        min-height: auto;
      }

      /* Top Header Reflow for Small Screens */
      header {
        height: auto;
        min-height: 52px;
        padding: 6px 8px;
        flex-wrap: wrap;
        gap: 6px;
      }

      .brand-title {
        font-size: 13px;
        gap: 4px;
      }
      .brand-title span.pixel-sub {
        display: none;
      }
      .logo-badge {
        font-size: 8.5px;
        padding: 3px 5px;
      }

      header > div:nth-child(2) {
        order: 3;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        margin-top: 2px;
      }

      .daily-quota-pill, .warning-pill {
        font-size: 9.5px;
        padding: 3px 6px;
      }
      .daily-quota-pill b {
        font-size: 10.5px;
      }

      .timeline-bar {
        overflow-x: auto;
        max-width: 100%;
        padding: 2px 4px;
        gap: 3px;
        -webkit-overflow-scrolling: touch;
      }
      .timeline-step {
        font-size: 8.5px;
        padding: 2px 4px;
        white-space: nowrap;
      }

      .header-right {
        order: 2;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 3px;
      }
      .header-btn {
        font-size: 9.5px;
        padding: 3px 6px;
      }

      /* Panoramic Diorama Mobile Scaling */
      .panoramic-lab-wrapper {
        padding: 2px 6px;
        height: auto;
        min-height: 125px;
      }
      .lab-diorama-housing {
        height: 125px;
      }
      .diorama-header {
        font-size: 8px;
        padding: 0 6px;
        height: 20px;
      }
      .diorama-title-tag {
        font-size: 8.5px;
        gap: 4px;
      }
      .diorama-telemetry {
        gap: 6px;
        font-size: 8px;
      }
      .diorama-telemetry span:first-child {
        display: none; /* Hide redundant temp on very small diorama */
      }
      .diorama-wall {
        height: 44px;
        padding: 0 8px;
      }
      .diorama-window {
        width: 65px;
        height: 26px;
      }
      .diorama-clock {
        font-size: 6.5px;
        padding: 2px 4px;
      }
      .diorama-pantry-sign, .whiteboard-sub {
        display: none;
      }
      .whiteboard-math {
        font-size: 7.5px;
      }
      .diorama-floor {
        padding: 0 8px;
      }

      /* 3x5 Slot Machine Mobile Elasticity */
      .fever-indicator {
        font-size: 8px;
        padding: 4px 8px;
        flex-direction: column;
        gap: 2px;
        text-align: center;
        max-width: 100%;
      }

      .slot-hud {
        padding: 4px 8px;
        max-width: 100%;
      }
      .hud-label {
        font-size: 8px;
      }
      .hud-val {
        font-size: 13px;
      }

      .slot-housing {
        padding: 3px;
        border-width: 2px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
      }

      .slot-grid {
        gap: 3px;
        width: 100%;
      }

      .slot-column {
        padding: 2px;
        gap: 3px;
        min-width: 0;
      }

      .slot-cell {
        height: 54px;
        border-width: 1.5px;
        border-radius: 4px;
        padding: 1px 0;
        gap: 0;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
      }

      .cell-icon-wrap {
        width: 24px;
        height: 24px;
      }
      .cell-icon-wrap svg {
        width: 22px;
        height: 22px;
        max-width: 100%;
        max-height: 100%;
        display: block;
      }

      .cell-name {
        font-size: 7.5px;
        letter-spacing: -0.3px;
        max-width: 96%;
        transform: scale(0.92);
        transform-origin: center bottom;
      }

      /* Reel Tactical Controls (Hold & Nudge) */
      .reel-tactical-bar {
        width: 100%;
        max-width: 100%;
        gap: 3px;
      }
      .nudge-status-badge {
        font-size: 8.5px;
        padding: 2px 6px;
      }
      .reel-ctrl-row {
        gap: 3px;
        width: 100%;
      }
      .reel-ctrl-item {
        gap: 2px;
        min-width: 0;
      }
      .btn-hold {
        height: 23px;
        font-size: 7.5px;
        padding: 0 1px;
        letter-spacing: -0.4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .btn-nudge {
        width: 15px;
        height: 23px;
        font-size: 7.5px;
        flex-shrink: 0;
      }

      /* Controls Panel & Active Skills */
      .controls-panel {
        width: 100%;
        max-width: 100%;
        gap: 5px;
      }

      .active-skills-bar {
        gap: 4px;
        grid-template-columns: 1fr 1fr 1fr;
      }
      .btn-skill {
        padding: 3px 4px;
        gap: 4px;
        border-bottom-width: 3px;
      }
      .skill-icon {
        font-size: 13px;
      }
      .skill-name {
        font-size: 8px;
        letter-spacing: -0.3px;
      }
      .skill-cost {
        font-size: 7.5px;
      }

      .btn-spin {
        height: 46px;
        font-size: 13px;
        border-bottom-width: 4px;
        letter-spacing: 0;
      }

      .action-sub-bar {
        gap: 4px;
        grid-template-columns: 1fr 1fr 1fr;
      }
      .btn-sub-action {
        height: 33px;
        font-size: 9px;
        padding: 2px 3px;
        letter-spacing: -0.3px;
        border-bottom-width: 3px;
      }

      .pattern-test-bar {
        gap: 3px;
        padding: 3px 4px;
      }
      .btn-test {
        font-size: 8.5px;
        padding: 2px 4px;
      }

      /* Left Panel: Profile & Colleagues */
      .character-card {
        padding: 6px;
        margin-bottom: 6px;
      }
      .char-avatar-box {
        width: 60px;
        height: 60px;
      }
      .char-name {
        font-size: 12px;
      }
      .char-title-tag {
        font-size: 9px;
      }
      .char-dialogue {
        font-size: 10px;
        min-height: 24px;
        padding: 3px 4px;
      }
      .char-actions-bar {
        gap: 3px;
      }
      .btn-char-action {
        font-size: 9px;
        padding: 3px 2px;
      }
      .colleagues-slots {
        gap: 2px;
      }
      .colleague-chip {
        font-size: 7px;
        padding: 2px 1px;
      }
      .stat-rows {
        gap: 4px;
      }
      .stat-row {
        padding: 4px 6px;
      }
      .stat-name {
        font-size: 10px;
      }
      .stat-num {
        font-size: 11px;
      }
      .stat-desc {
        font-size: 8.5px;
      }

      /* Right Panel: Shop & Terminal */
      .shop-tab-btn {
        font-size: 9px;
        padding: 2px 0;
      }
      .shop-card {
        padding: 4px 6px;
      }
      .shop-card-name {
        font-size: 10px;
      }
      .shop-card-desc {
        font-size: 8.5px;
      }
      .btn-buy {
        font-size: 9px;
        padding: 3px 7px;
      }
      .terminal-container {
        min-height: 90px;
        max-height: 140px;
      }
      .terminal-logs {
        font-size: 9.5px;
        line-height: 1.3;
      }

      /* Responsive Modals */
      .modal-overlay {
        padding: 6px;
        align-items: flex-start;
        overflow-y: auto;
      }
      .modal-card {
        padding: 12px 10px;
        gap: 8px;
        max-width: 96vw;
        width: 96vw;
        margin: auto;
        box-sizing: border-box;
      }
      .modal-title {
        font-size: 13.5px;
      }
      .modal-desc {
        font-size: 11px;
        line-height: 1.35;
      }
      .modal-opt-btn {
        font-size: 11px;
        padding: 7px 9px;
      }

      /* Gacha 3-Card Pack Draft Modal */
      .gacha-modal-card {
        width: 96vw;
        max-width: 96vw;
        padding: 12px 8px;
        margin: auto;
        box-sizing: border-box;
      }
      .gacha-title {
        font-size: 14px;
      }
      .gacha-subtitle {
        font-size: 9.5px;
      }
      .gacha-cards-container {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin: 6px 0 10px 0;
        max-height: 52vh;
        overflow-y: auto;
        padding-right: 4px;
        width: 100%;
      }
      .gacha-card {
        width: 100%;
        max-width: 250px;
        padding: 8px;
      }
      .gacha-card-sprite {
        font-size: 26px;
        margin: 2px 0;
      }
      .gacha-card-name {
        font-size: 11.5px;
        min-height: auto;
      }
      .gacha-card-desc {
        font-size: 9px;
        min-height: auto;
        margin-bottom: 6px;
      }

      /* Title Screen & Character Select Overlay */
      #titleScreenOverlay {
        padding: 6px;
        align-items: flex-start;
        overflow-y: auto;
      }
      .title-card-container {
        width: 96vw;
        max-width: 96vw;
        padding: 12px 8px;
        gap: 8px;
        margin: auto;
        box-sizing: border-box;
      }
      .title-logo-badge {
        font-size: 15px;
        letter-spacing: 0.5px;
      }
      .title-sub {
        font-size: 9px;
      }
      .char-select-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        max-height: 50vh;
        overflow-y: auto;
        padding-right: 2px;
        width: 100%;
      }
      .char-card-option {
        padding: 8px;
        gap: 4px;
      }
      .char-option-name {
        font-size: 11.5px;
      }
      .char-option-quote {
        font-size: 8.5px;
        min-height: auto;
      }
      .char-option-stats {
        font-size: 8.5px;
        padding: 2px 4px;
      }
      .char-traits-list {
        gap: 2px;
      }
      .char-trait-pill {
        font-size: 8px;
        padding: 2px 4px;
      }
      .start-game-btn {
        font-size: 10.5px;
        padding: 8px 14px;
        width: 100%;
      }
      #legacyPerkSelectGrid {
        grid-template-columns: 1fr !important;
        gap: 4px;
      }

      /* Hyperparameter Tuning Minigame */
      .minigame-arena {
        padding: 8px;
        gap: 8px;
      }
      .tuning-track {
        height: 30px;
      }
      .minigame-score-row {
        font-size: 10.5px;
      }
      #mgStopBtn {
        font-size: 11.5px !important;
        height: 36px !important;
      }

      /* Mobile Achievement Popup */
      #achievementPopup {
        bottom: 8px;
        right: 8px;
        left: 8px;
        max-width: calc(100vw - 16px);
        padding: 8px 10px;
        gap: 8px;
      }
      .achieve-trophy-icon {
        font-size: 22px;
      }
      .achieve-title {
        font-size: 11.5px;
      }
      .achieve-desc {
        font-size: 9.5px;
      }
    }

    /* ------------------------------------------------------------
       3. ULTRA-COMPACT MOBILE BREAKPOINT (max-width: 480px)
       ------------------------------------------------------------ */
    @media (max-width: 480px) {
      .game-container {
        padding: 2px 4px 30px 4px;
      }
      .slot-cell {
        height: 48px;
      }
      .cell-icon-wrap {
        width: 20px;
        height: 20px;
      }
      .cell-icon-wrap svg {
        width: 18px;
        height: 18px;
      }
      .cell-name {
        font-size: 7px;
        display: none; /* Hide small symbol text on micro devices to prevent overlap */
      }
      .btn-hold {
        font-size: 7px;
        height: 21px;
      }
      .btn-nudge {
        width: 13px;
        height: 21px;
      }
      .btn-spin {
        height: 42px;
        font-size: 11.5px;
      }
      .btn-sub-action {
        font-size: 8px;
        height: 30px;
      }
      .active-skills-bar {
        grid-template-columns: 1fr;
        gap: 3px;
      }
      .btn-skill {
        padding: 2px 4px;
      }
    }