*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
:root{
  --bg-deep:#070b14;--slate-900:#0f172a;--slate-800:#1e293b;--slate-700:#334155;
  --slate-600:#475569;--slate-500:#64748b;--slate-400:#94a3b8;--slate-300:#cbd5e1;
  --blue-400:#60a5fa;--amber-400:#fbbf24;
  --font-main:'Outfit',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --font-mono:'JetBrains Mono','SF Mono',monospace;
  --ease-spring:cubic-bezier(0.34,1.56,0.64,1);
}
html,body{height:100%;height:100dvh;overflow:hidden;background:var(--bg-deep)}
body{font-family:var(--font-main);-webkit-user-select:none;user-select:none;
  -webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;touch-action:manipulation}
#root{height:100%;display:flex;align-items:center;justify-content:center}
.game-frame{width:100%;max-width:1080px;max-height:720px;height:100%;position:relative;overflow:hidden}
@media(min-width:1081px){.game-frame{border:1px solid rgba(51,65,85,0.3);border-radius:12px}}
@media(max-width:600px){.game-frame{max-width:100%;max-height:100%}#root{align-items:stretch}}
.noise-bg::before{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;opacity:0.025;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:256px 256px}
@keyframes fadeInUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
@keyframes collectPulse{0%{transform:scale(1);opacity:1}50%{transform:scale(0.92)}100%{transform:scale(0.85);opacity:0.3}}
@keyframes starPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.15)}}
.card-word,.card-cat{transition:transform 0.18s var(--ease-spring),box-shadow 0.18s ease,border-color 0.18s ease,background 0.18s ease;
  will-change:transform;cursor:pointer;position:relative;overflow:hidden}
.card-word::after,.card-cat::after{content:'';position:absolute;inset:0;border-radius:inherit;
  background:linear-gradient(135deg,rgba(255,255,255,0.06) 0%,transparent 50%);pointer-events:none}
.card-word:active,.card-cat:active{transform:scale(0.96)!important}
::-webkit-scrollbar{display:none}
button:focus-visible{outline:2px solid var(--blue-400);outline-offset:2px}

.screen-scroll{height:100%;overflow-y:auto;-webkit-overflow-scrolling:touch;background:#000;padding:16px 20px}
.screen-scroll::-webkit-scrollbar{width:4px}
.screen-scroll::-webkit-scrollbar-thumb{background:#334155;border-radius:2px}
.sec-title{font-size:14px;font-weight:700;color:#e2e8f0;margin-bottom:6px}
.sec-body{font-size:12px;color:#94a3b8;line-height:1.6}
.sec{margin-bottom:16px}
.back-link{font-size:13px;color:#3b82f6;cursor:pointer;font-weight:600;margin-bottom:12px}
.back-link:hover{text-decoration:underline}
.nav-link{font-size:14px;color:#3b82f6;cursor:pointer;font-weight:600}
.nav-link:hover{text-decoration:underline}
.toggle-bar{display:flex;border-radius:8px;overflow:hidden;border:1px solid #334155;margin-bottom:12px}
.toggle-opt{flex:1;padding:8px 0;text-align:center;cursor:pointer;font-size:12px;font-weight:700}
.toggle-opt.active{background:#1e3a5f;color:#fff}
.toggle-opt:not(.active){background:transparent;color:#64748b}
.chip{padding:3px 8px;border-radius:4px;font-size:11px;font-weight:500;cursor:pointer;display:inline-block;margin:2px}
.cat-row{padding:10px 12px;border-radius:6px;cursor:pointer;display:flex;justify-content:space-between;align-items:center}
.cat-row:hover{background:#1e293b}
.rec-card{background:#0f172a;border-radius:10px;padding:14px;margin-bottom:10px;border:1px solid #1e293b}
