
    :root {
      --bg: #0d0e12; --card: rgba(22, 24, 35, 0.85);
      --accent-gradient: linear-gradient(135deg, #ff6b8b 0%, #ff8e53 100%);
      --accent: #ff6b8b; --text: #f0f2f5; --muted: #9ba1b0;
      --border: rgba(255, 255, 255, 0.08); --glow: rgba(255, 107, 139, 0.15);
    }
    
    body.theme-forest { --bg: #0f1410; --card: rgba(20, 28, 22, 0.85); --accent-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%); --accent: #81c784; --glow: rgba(86, 171, 47, 0.15); }
    body.theme-amber { --bg: #14120e; --card: rgba(32, 26, 20, 0.85); --accent-gradient: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%); --accent: #f2994a; --glow: rgba(242, 153, 74, 0.15); }
    body.theme-ocean { --bg: #0c1017; --card: rgba(18, 24, 38, 0.85); --accent-gradient: linear-gradient(135deg, #2b5876 0%, #4e4376 100%); --accent: #54a0ff; --glow: rgba(84, 160, 255, 0.15); }
    body.wind-down-mode { --bg: #000000 !important; --card: rgba(10, 10, 12, 0.95) !important; --accent: #d8a47f !important; --accent-gradient: linear-gradient(135deg, #d8a47f 0%, #a07855 100%) !important; --muted: #666c7c !important; --glow: rgba(216, 164, 127, 0.05) !important; }

    ::-webkit-scrollbar { width: 4px; height: 4px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

    * { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
    
    body { background-color: var(--bg); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100dvh; padding: 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); text-align: center; overflow-x: hidden; position: relative; transition: background-color 0.3s ease; }
    
    .aurora-orb { position: fixed; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, var(--accent) 0%, rgba(0,0,0,0) 70%); opacity: 0.22; z-index: -3; pointer-events: none; will-change: transform; animation: floatOrb 12s infinite alternate ease-in-out; }
    .aurora-2 { width: 280px; height: 280px; background: radial-gradient(circle, #ff8e53 0%, rgba(0,0,0,0) 70%); right: -40px; bottom: -40px; animation-delay: -6s; }
    @keyframes floatOrb { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(35px, 45px, 0) scale(1.1); } }
    #dust-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

    .card { position: relative; background: var(--card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 30px; padding: 22px 18px; max-width: 420px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12); margin-bottom: 65px; transform: translateZ(0); }
    .card::before { content: ''; position: absolute; inset: 0; border-radius: 30px; padding: 1px; background: var(--accent-gradient); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: 0.6; }
    
    h1 { font-size: 1.45rem; margin-bottom: 4px; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    p.subtitle { color: var(--muted); font-size: 0.85rem; margin-bottom: 12px; line-height: 1.3; }
    
    .category-scroll-container { width: 100%; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; margin-bottom: 14px; border-radius: 20px; border: 1px solid var(--border); background: rgba(0, 0, 0, 0.25); }
    .category-scroll-container::-webkit-scrollbar { display: none; }
    .category-bar { display: flex; gap: 4px; padding: 5px; width: max-content; margin: 0 auto; }
    .cat-pill { background: transparent; border: none; color: var(--muted); border-radius: 16px; padding: 6px 12px; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; }
    .cat-pill.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px var(--glow); }

    .display-box { background: rgba(0, 0, 0, 0.35); border: 1px dashed rgba(255, 255, 255, 0.12); border-radius: 16px; padding: 16px 12px; min-height: 125px; max-height: 380px; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 0.95rem; font-weight: 500; line-height: 1.4; margin-bottom: 16px; }

    .btn { background: var(--accent-gradient); color: #fff; border: none; border-radius: 14px; padding: 14px 18px; font-size: 0.95rem; font-weight: 600; width: 100%; cursor: pointer; transition: transform 0.1s ease; box-shadow: 0 6px 16px rgba(0,0,0,0.2); margin-bottom: 12px; }
    .btn:active { transform: scale(0.97); }
    
    .btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
    .btn-secondary { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); color: var(--text); border-radius: 12px; padding: 10px 8px; font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all 0.15s ease; display: flex; align-items: center; justify-content: center; gap: 5px; }
    .btn-secondary:active { transform: scale(0.96); background: rgba(255, 255, 255, 0.08); }
    .span-2 { grid-column: span 2; }
    .hidden-group { display: none !important; }

    .fab { position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,0.4); z-index: 10; }
    .fab:active { transform: scale(0.9); }
    .fab-music { left: 18px; background: rgba(28, 30, 41, 0.9); backdrop-filter: blur(8px); color: #fff; border: 1px solid var(--border); }
    .fab-sos { right: 18px; background: #ff4757; color: #fff; }

    /* Component CSS */
    .breathe-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100px; }
    .circle { width: 50px; height: 50px; background: var(--accent-gradient); border-radius: 50%; animation: breathe 8s infinite ease-in-out; box-shadow: 0 0 20px var(--glow); }
    @keyframes breathe { 0%, 100% { transform: scale(0.8); opacity: 0.6; } 50% { transform: scale(1.5); opacity: 1; } }
    
    .void-textarea, .win-input, .dump-textarea { width: 100%; height: 55px; background: rgba(0,0,0,0.4); border: 1px solid var(--border); color: #fff; border-radius: 10px; padding: 8px 10px; resize: none; font-family: inherit; font-size: 16px; margin-bottom: 8px; }
    .void-textarea:focus, .win-input:focus, .dump-textarea:focus { outline: 1px solid var(--accent); }
    .void-fade { opacity: 0; filter: blur(8px); transform: scale(0.85); transition: all 1.2s ease-out; }
    
    .bubble-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 6px; }
    .bubble { width: 30px; height: 30px; background: rgba(255, 255, 255, 0.05); border-radius: 50%; border: 2px solid var(--border); cursor: pointer; }
    .bubble.popped { background: transparent; transform: scale(0.65); opacity: 0.2; border-color: rgba(255,255,255,0.1); }
    
    .win-list { text-align: left; width: 100%; font-size: 0.8rem; max-height: 80px; overflow-y: auto; padding-right: 4px; margin-top: 4px; }
    .win-item { background: rgba(255,255,255,0.04); padding: 5px 8px; border-radius: 6px; margin-bottom: 4px; border-left: 3px solid var(--accent); }

    /* Game Layouts */
    .wordle-grid { display: grid; grid-template-rows: repeat(6, 1fr); gap: 3px; margin-bottom: 10px; }
    .wordle-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
    .wordle-tile { width: 30px; height: 30px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 5px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.95rem; color: #fff; text-transform: uppercase; }
    .wordle-tile.correct { background: #538d4e; border-color: #538d4e; }
    .wordle-tile.present { background: #b59f3b; border-color: #b59f3b; }
    .wordle-tile.absent { background: #3a3a3c; border-color: #3a3a3c; }
    
    .w-key { background: rgba(255,255,255,0.12); border: none; color: #fff; border-radius: 4px; font-size: 0.8rem; font-weight: bold; padding: 10px 0; cursor: pointer; flex: 1; display: flex; align-items: center; justify-content: center; touch-action: manipulation; }
    .w-key:active { background: rgba(255,255,255,0.35); transform: scale(0.95); }
    .w-key.correct { background: #538d4e; }
    .w-key.present { background: #b59f3b; }
    .w-key.absent { background: #3a3a3c; opacity: 0.45; }
    .w-key.wide { flex: 1.4; font-size: 0.65rem; }

    .sudoku-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 8px; width: 155px; margin-left: auto; margin-right: auto; }
    .sudoku-cell { width: 35px; height: 35px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 6px; color: #fff; font-size: 16px; text-align: center; }
    .sudoku-cell:read-only { background: rgba(0,0,0,0.4); color: var(--muted); }
    
    .card-match-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; width: 175px; margin-left: auto; margin-right: auto; }
    .memory-card { height: 40px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; cursor: pointer; }
    .memory-card.flipped { background: rgba(255,255,255,0.15); border-color: var(--accent); }
    
    .chime-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 175px; margin-left: auto; margin-right: auto; margin-bottom: 8px; }
    .chime-btn { height: 42px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 10px; font-size: 1.15rem; cursor: pointer; }
    .chime-btn:active, .chime-btn.active { transform: scale(0.92); background: var(--accent); border-color: transparent; }
    
    .ttt-grid, .lights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 145px; margin-left: auto; margin-right: auto; margin-bottom: 8px; }
    .ttt-cell { height: 42px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 8px; font-size: 1.15rem; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; }
    
    .light-cell { height: 42px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
    .light-cell.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px var(--glow); }

    canvas.interactive { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; touch-action: none; margin-bottom: 6px; display: block; margin-left: auto; margin-right: auto; }
  