:root{--bg:#f6f7fb;--panel:#fff;--text:#18212f;--muted:#667085;--line:#e7eaf0;--accent:#2563eb;--accent2:#dbeafe;--danger:#dc2626;--success:#16a34a;--radius:18px;--sidebar:260px}*{box-sizing:border-box}html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}body{min-height:100vh}a{color:inherit;text-decoration:none}button,input,textarea{font:inherit}.app-shell{display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;overflow:auto;background:#111827;color:#e5e7eb;padding:18px 14px;z-index:20}.brand a{display:flex;flex-direction:column;gap:3px;padding:6px 10px 18px}.brand strong{font-size:22px;color:#fff}.brand small{font-size:12px;color:#9ca3af}.game-nav{display:flex;flex-direction:column;gap:10px}.nav-home,.nav-game{display:block;border-radius:10px;padding:9px 10px}.nav-home{background:#1f2937;color:#fff}.nav-game{font-size:14px;color:#cbd5e1;padding-left:30px}.nav-game:hover,.nav-home:hover{background:#243244}.nav-group-title{font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:.03em;color:#94a3b8;padding:10px 10px 4px}.sidebar-ad{margin-top:20px}.main-wrap{min-width:0}.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:12px;min-height:62px;padding:10px 22px;background:rgba(246,247,251,.94);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}.topbar-title{font-weight:800}.icon-btn,.install-btn,.primary{border:0;border-radius:11px;cursor:pointer}.icon-btn{width:42px;height:42px;background:var(--panel);border:1px solid var(--line)}.install-btn,.primary{background:var(--accent);color:#fff;padding:11px 16px;font-weight:700}.install-btn{margin-left:auto}.main-content{max-width:1180px;margin:0 auto;padding:28px}.footer{max-width:1180px;margin:30px auto 0;padding:24px 28px 42px;color:var(--muted);font-size:13px}.hero{background:linear-gradient(135deg,#111827,#26364f);color:#fff;border-radius:24px;padding:38px;margin-bottom:20px}.hero h1{font-size:clamp(30px,5vw,52px);line-height:1.06;max-width:800px;margin:8px 0 14px}.hero p{max-width:700px;color:#d1d5db;font-size:17px}.eyebrow{font-size:12px;letter-spacing:.14em;font-weight:800;color:#93c5fd}.today-grid,.quick-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.today-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:30px}.metric-card,.quick-stats>div{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:17px}.metric-card span,.quick-stats span{display:block;color:var(--muted);font-size:12px;margin-bottom:5px}.metric-card strong,.quick-stats strong{font-size:20px}.section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:26px 0 12px}.section-head h2,.category-section h3{margin:0}.section-head p{margin:4px 0 0;color:var(--muted)}.category-section{margin:26px 0}.game-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.game-card{display:flex;gap:14px;background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:18px;transition:.18s}.game-card:hover{transform:translateY(-2px);border-color:#cbd5e1}.game-card-icon{font-size:28px}.game-card strong{font-size:16px}.game-card p{font-size:13px;line-height:1.5;color:var(--muted);min-height:40px}.game-card span{font-size:13px;font-weight:700;color:var(--accent)}.game-header{margin-bottom:15px}.game-header h1{font-size:34px;margin:5px 0}.game-header p{color:var(--muted);max-width:720px}.breadcrumb{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--accent)}.quick-stats{margin-bottom:14px}.game-stage-card,.result-card,.history-card,.about-game{background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:18px;margin:14px 0}.game-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:13px;border-bottom:1px solid var(--line);font-weight:700}.game-toolbar #gameTimer{font-variant-numeric:tabular-nums;font-size:20px}.game-root{padding:18px 0 4px;min-height:260px}.game-controls{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:16px}.number-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px}.num-cell{aspect-ratio:1/1;border:1px solid #d8dee8;background:#fff;border-radius:8px;font-weight:800;cursor:pointer;min-width:0}.num-cell:hover{background:#f8fafc}.num-cell.correct{background:#e8f7ed;color:#166534;border-color:#bbf7d0}.num-cell.wrong{background:#fee2e2;border-color:#fecaca}.reaction-wrap{display:grid;gap:14px}.reaction-pad{min-height:260px;border:2px dashed #cbd5e1;border-radius:18px;background:#f8fafc;font-size:28px;font-weight:900;cursor:pointer}.reaction-pad.ready{background:#dcfce7;border-color:#22c55e;color:#166534}.memory-grid{--cols:4;display:grid;grid-template-columns:repeat(var(--cols),1fr);gap:10px;max-width:440px;margin:10px auto}.memory-cell{aspect-ratio:1/1;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc;cursor:pointer}.memory-cell.show{background:#334155}.memory-cell.chosen{background:#dbeafe;border-color:#60a5fa}.stroop-word,.math-question,.sequence-question{text-align:center;font-size:clamp(34px,8vw,72px);font-weight:900;padding:32px 10px}.stroop-choices,.math-choices{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;max-width:760px;margin:0 auto}.stroop-choices button,.math-choices button{min-height:54px;border:1px solid #cbd5e1;background:#fff;border-radius:12px;font-weight:800;cursor:pointer}.result-card{border-color:#bfdbfe;background:#f8fbff}.result-card h2{margin-top:0}.history-list{display:grid;gap:8px}.history-list>div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:9px 0;font-size:13px}.about-game{line-height:1.7}.about-game p{color:#475467}.ad-slot{display:flex;align-items:center;justify-content:center;border-radius:12px;overflow:hidden;color:#98a2b3;font-size:11px;text-align:center}.ad-placeholder{border:1px dashed #d0d5dd;padding:8px 14px;border-radius:8px}.game-page.is-playing [data-ad-slot="game_bottom"]{visibility:hidden}.sidebar-collapsed{grid-template-columns:76px minmax(0,1fr)}.sidebar-collapsed .brand small,.sidebar-collapsed .nav-group-title span,.sidebar-collapsed .nav-game,.sidebar-collapsed .sidebar-ad{display:none}.sidebar-collapsed .brand strong{font-size:14px}.game-error{color:var(--danger)}
@media(max-width:900px){.app-shell{grid-template-columns:1fr}.sidebar{position:fixed;left:0;top:0;width:280px;transform:translateX(-102%);transition:.2s}.app-shell:not(.sidebar-collapsed) .sidebar{transform:translateX(0)}.app-shell.sidebar-collapsed{grid-template-columns:1fr}.main-content{padding:18px}.today-grid,.quick-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.game-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar-collapsed .brand small,.sidebar-collapsed .nav-group-title span,.sidebar-collapsed .nav-game,.sidebar-collapsed .sidebar-ad{display:block}.sidebar-collapsed .brand strong{font-size:22px}}
@media(max-width:600px){.topbar{padding:8px 12px}.main-content{padding:12px}.hero{padding:24px 18px;border-radius:18px}.today-grid{grid-template-columns:1fr}.quick-stats{grid-template-columns:repeat(2,1fr)}.game-cards{grid-template-columns:1fr}.game-header h1{font-size:28px}.game-stage-card,.result-card,.history-card,.about-game{border-radius:14px;padding:13px}.number-grid{gap:3px}.num-cell{font-size:11px;border-radius:5px}.stroop-choices,.math-choices{grid-template-columns:repeat(2,1fr)}.reaction-pad{min-height:210px}.sidebar-ad{display:none!important}}

/* v0.1.5 — Compact game workspace */
.app-shell-game{--sidebar:216px;background:#f4f6fa}.app-shell-game .sidebar{padding:14px 10px;background:#0f172a;border-right:1px solid rgba(255,255,255,.05)}.app-shell-game .brand a{padding:4px 8px 14px}.app-shell-game .brand strong{font-size:18px;letter-spacing:-.02em}.app-shell-game .brand small{font-size:10px;color:#7f8da5}.app-shell-game .game-nav{gap:7px}.app-shell-game .nav-home{padding:8px 9px;font-size:13px;background:#172033}.app-shell-game .nav-group-title{padding:9px 9px 2px;font-size:11px;letter-spacing:.06em;color:#8190aa}.app-shell-game .nav-game{margin:1px 0;padding:7px 9px 7px 25px;border-radius:8px;font-size:12px;color:#bcc7d8;transition:background .15s,color .15s}.app-shell-game .nav-game:hover{background:#17233a;color:#fff}.app-shell-game .nav-game.is-active{background:#1e3a5f;color:#dbeafe;font-weight:750;box-shadow:inset 2px 0 0 #60a5fa}

.game-topbar{min-height:56px;padding:6px 16px;background:rgba(255,255,255,.96);border-bottom:1px solid #e4e8ef;backdrop-filter:blur(12px)}.game-topbar .icon-btn{width:36px;height:36px;border-radius:10px;background:#f8fafc}.game-topbar-title{display:flex;flex-direction:column;min-width:0;line-height:1.12}.game-topbar-title span{font-size:9px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:#64748b}.game-topbar-title strong{margin-top:2px;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.02em}.game-topbar-stats{display:flex;align-items:center;gap:6px;margin-left:auto}.stat-chip{display:flex;align-items:baseline;gap:6px;min-height:34px;padding:5px 9px;border:1px solid #e5e9f0;border-radius:9px;background:#f8fafc;white-space:nowrap}.stat-chip span{font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:#7b8798}.stat-chip strong{font-size:13px;font-variant-numeric:tabular-nums;color:#1f2937}.help-circle,.mini-icon-btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #dfe4eb;background:#fff;color:#334155;cursor:pointer}.help-circle{width:34px;height:34px;margin-left:2px;border-radius:50%;font-size:15px;font-weight:900}.help-circle:hover,.mini-icon-btn:hover{background:#f1f5f9;border-color:#cbd5e1}

.game-main-content{max-width:none;padding:12px 18px 18px}.game-page-compact{max-width:1120px;margin:0 auto}.compact-stage{position:relative;margin:0;padding:10px 12px 12px;border-radius:16px;background:#fff;border:1px solid #e1e6ed;box-shadow:0 1px 2px rgba(15,23,42,.03)}.compact-toolbar{min-height:34px;padding:0 2px 8px;border-bottom:1px solid #eef1f5}.game-status-line{display:flex;align-items:center;gap:8px;font-size:13px;color:#334155}.status-dot{width:7px;height:7px;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 3px #f1f5f9}.game-page.is-playing .status-dot{background:#22c55e;box-shadow:0 0 0 3px #dcfce7}.game-toolbar-actions{display:flex;align-items:center;gap:8px}.mini-icon-btn{width:30px;height:30px;border-radius:8px;font-size:15px}.game-timer{min-width:86px;text-align:right;font-size:17px!important;font-weight:850;font-variant-numeric:tabular-nums;letter-spacing:-.02em;color:#0f172a}.compact-game-root{padding:9px 0 0;min-height:0}.compact-game-root>p:first-child{margin:12px;text-align:center;color:#64748b}

.number-controls{display:flex;align-items:center;justify-content:center;gap:7px;max-width:580px;margin:0 auto 8px}.compact-start{min-height:34px;padding:7px 13px;border-radius:9px;font-size:12px}.number-progress,.number-mistakes{display:flex;align-items:center;gap:6px;min-height:34px;padding:5px 9px;border:1px solid #e3e7ee;border-radius:9px;background:#f8fafc}.number-progress span,.number-mistakes span{font-size:10px;color:#718096}.number-progress strong{font-size:18px;line-height:1;color:#1d4ed8;font-variant-numeric:tabular-nums}.number-mistakes strong{font-size:14px;color:#475569;font-variant-numeric:tabular-nums}.number-grid{width:min(100%,580px,calc(100dvh - 220px));margin:0 auto;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px}.num-cell{aspect-ratio:1/1;min-width:0;padding:0;border:1px solid #d9e0e9;border-radius:6px;background:#fbfcfe;color:#172033;font-size:clamp(11px,1.15vw,15px);font-weight:760;line-height:1;box-shadow:none;transition:background .1s,border-color .1s,color .1s,transform .08s}.num-cell:hover{background:#f1f5f9;border-color:#b9c4d2}.num-cell:active{transform:scale(.96)}.num-cell.correct{background:#f0fdf4;color:#7b8b82;border-color:#d7eadc}.num-cell.correct:disabled{cursor:default}.num-cell.wrong{background:#fff1f2;color:#be123c;border-color:#fecdd3}

.compact-result{position:absolute;z-index:8;top:54px;left:50%;width:min(360px,calc(100% - 28px));margin:0;transform:translateX(-50%);padding:18px 18px 16px;border:1px solid #dbe4ef;border-radius:16px;background:rgba(255,255,255,.98);box-shadow:0 18px 50px rgba(15,23,42,.18);text-align:center}.compact-result .result-close{position:absolute;top:8px;right:9px;width:30px;height:30px;border:0;border-radius:8px;background:#f1f5f9;color:#475569;font-size:20px;cursor:pointer}.result-kicker{font-size:9px;font-weight:900;letter-spacing:.12em;color:#64748b}.result-time{margin:6px 0 4px;font-size:30px;font-weight:900;letter-spacing:-.04em;font-variant-numeric:tabular-nums}.compact-result p{margin:4px 0;color:#64748b;font-size:13px}.game-ad-after{display:none}.game-page.has-result .game-ad-after{display:block;max-width:720px;margin:10px auto 0}

.brain-dialog{width:min(540px,calc(100% - 28px));max-height:min(680px,calc(100dvh - 40px));padding:0;border:1px solid #e0e6ee;border-radius:18px;background:#fff;color:#18212f;box-shadow:0 24px 70px rgba(15,23,42,.25);overflow:auto}.brain-dialog::backdrop{background:rgba(15,23,42,.42);backdrop-filter:blur(2px)}.dialog-head{position:sticky;top:0;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 18px 12px;background:#fff;border-bottom:1px solid #eef1f5;z-index:1}.dialog-head h2{margin:2px 0 0;font-size:21px;letter-spacing:-.025em}.dialog-kicker{font-size:9px;font-weight:900;letter-spacing:.11em;color:#64748b}.dialog-close{width:32px;height:32px;border:1px solid #e2e8f0;border-radius:9px;background:#f8fafc;color:#475569;font-size:20px;cursor:pointer}.dialog-lead{margin:14px 18px;color:#64748b;line-height:1.6}.dialog-section{margin:0 18px 16px;padding:13px 14px;border-radius:12px;background:#f8fafc;border:1px solid #edf0f4}.dialog-section h3{margin:0 0 6px;font-size:13px}.dialog-section p{margin:0;color:#526071;line-height:1.65;font-size:13px}.history-dialog .history-list{padding:0 18px 18px}.history-dialog .history-list>div{padding:10px 2px}

@media(min-width:901px){.app-shell-game .main-wrap{min-height:100vh}.game-main-content{padding-top:10px}.game-page-compact .compact-stage{min-height:calc(100dvh - 84px);display:flex;flex-direction:column}.game-page-compact .compact-game-root{display:flex;flex:1;flex-direction:column;justify-content:center}.game-page-compact .number-controls{flex:0 0 auto}.game-page-compact .number-grid{flex:0 0 auto}}
@media(max-width:1100px){.game-topbar-stats{gap:4px}.stat-chip{padding:5px 7px}.stat-chip span{display:none}.game-topbar-title strong{font-size:15px}.game-topbar-title span{display:none}}
@media(max-width:900px){.app-shell-game{--sidebar:260px}.game-topbar{padding:6px 10px}.game-main-content{padding:10px}.game-page-compact{max-width:760px}.compact-stage{padding:9px}.number-grid{width:min(100%,560px,calc(100dvh - 205px))}.sidebar .nav-game.is-active{background:#1e3a5f;color:#dbeafe}}
@media(max-width:640px){.game-topbar{gap:7px;min-height:52px}.game-topbar .icon-btn{width:34px;height:34px}.game-topbar-title{max-width:115px}.game-topbar-title strong{font-size:13px}.game-topbar-stats{min-width:0;overflow:hidden}.stat-chip{min-width:0;padding:4px 6px;border-radius:8px}.stat-chip:nth-child(2),.stat-chip:nth-child(3){display:none}.stat-chip strong{font-size:12px}.help-circle{width:32px;height:32px;flex:0 0 auto}.game-main-content{padding:8px}.compact-stage{border-radius:12px;padding:8px}.compact-toolbar{padding-bottom:6px}.game-status-line{font-size:12px}.game-timer{font-size:15px!important;min-width:76px}.number-controls{margin-bottom:6px;gap:5px}.compact-start{padding:6px 9px}.number-progress,.number-mistakes{padding:4px 7px;min-height:32px}.number-progress span,.number-mistakes span{display:none}.number-progress strong{font-size:17px}.number-grid{width:min(100%,calc(100dvh - 185px));gap:2px}.num-cell{border-radius:4px;font-size:11px}.compact-result{top:48px}}

/* v0.1.6 — Unified compact gameplay + focus mode */
.focus-circle{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;flex:0 0 auto;border:1px solid #dfe4eb;border-radius:10px;background:#fff;color:#334155;font-size:15px;font-weight:800;cursor:pointer;transition:.15s}.focus-circle:hover{background:#f1f5f9;border-color:#cbd5e1}.focus-circle.is-active{background:#172033;border-color:#172033;color:#fff}.app-shell-game.focus-mode{grid-template-columns:minmax(0,1fr)}.app-shell-game.focus-mode .sidebar{display:none}.app-shell-game.focus-mode .game-main-content{padding-left:10px;padding-right:10px}.app-shell-game.focus-mode .game-page-compact{max-width:1280px}.app-shell-game.focus-mode .game-topbar{padding-left:10px;padding-right:10px}.app-shell-game.focus-mode #sidebarToggle{display:none}

.mini-game-shell{display:flex;flex:1;min-height:0;flex-direction:column;justify-content:center}.mini-hud{display:flex;align-items:center;justify-content:center;gap:6px;width:min(100%,760px);margin:0 auto 8px;min-height:34px}.mini-primary{min-height:32px;padding:6px 12px;border-radius:9px;font-size:12px;line-height:1.1}.mini-chip{display:flex;align-items:baseline;gap:5px;min-height:32px;padding:5px 8px;border:1px solid #e1e6ed;border-radius:8px;background:#f8fafc;white-space:nowrap}.mini-chip span{font-size:9px;line-height:1;text-transform:uppercase;letter-spacing:.04em;color:#7b8798}.mini-chip strong{font-size:14px;line-height:1;font-variant-numeric:tabular-nums;color:#1f2937}.mini-hint{min-width:0;flex:1;text-align:right;color:#7a8797;font-size:11px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.number-controls{max-width:540px;margin-bottom:6px}.number-progress,.number-mistakes{min-height:32px;padding:5px 8px}.number-progress strong{font-size:16px}.number-mistakes strong{font-size:13px}.number-grid{width:min(100%,540px,calc(100dvh - 188px));gap:3px}.num-cell{border-radius:5px;font-size:clamp(10px,1vw,14px);font-weight:750}.num-cell.correct{color:#91a096;background:#f7fbf8;border-color:#e0ebe3}.num-cell.wrong{background:#fff4f5;border-color:#fecdd3}

.quiz-game-shell{width:100%}.quiz-center{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;justify-content:center;padding:4px 0 10px}.compact-prompt{width:100%;padding:12px 8px 18px;font-size:clamp(38px,5vw,62px);line-height:1.05;letter-spacing:-.035em}.compact-choices{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;width:min(100%,660px);margin:0 auto}.compact-choices button{min-height:46px;padding:8px 10px;border-radius:9px;background:#fbfcfe;border:1px solid #dce3eb;color:#253044;font-size:13px;font-weight:760;transition:background .1s,border-color .1s,transform .08s}.compact-choices button:hover:not(:disabled){background:#f1f5f9;border-color:#bdc8d5}.compact-choices button:active:not(:disabled){transform:scale(.98)}.compact-choices button.choice-correct{background:#ecfdf3;border-color:#86efac;color:#166534}.compact-choices button.choice-wrong{background:#fff1f2;border-color:#fda4af;color:#9f1239}.compact-choices button:disabled{cursor:default}.sequence-prompt{font-size:clamp(28px,4vw,48px);letter-spacing:-.025em;white-space:nowrap}.sequence-center{padding-top:0}

.reaction-game-shell{width:100%}.compact-reaction-pad{display:flex;flex:1;min-height:240px;max-height:440px;width:min(100%,720px);margin:0 auto;align-items:center;justify-content:center;flex-direction:column;gap:7px;border:1px solid #d9e1ea;border-radius:16px;background:#f8fafc;color:#334155;cursor:pointer;transition:background .12s,border-color .12s,transform .08s}.compact-reaction-pad:not(:disabled):active{transform:scale(.995)}.compact-reaction-pad .reaction-pad-main{font-size:clamp(30px,5vw,54px);font-weight:900;letter-spacing:-.035em}.compact-reaction-pad small{font-size:12px;font-weight:600;color:#7b8798}.compact-reaction-pad.ready{background:#ecfdf3;border-color:#86efac;color:#166534}.compact-reaction-pad.ready small{color:#15803d}.compact-reaction-pad.too-early{background:#fff1f2;border-color:#fda4af;color:#9f1239}.compact-reaction-pad.too-early small{color:#be123c}

.memory-game-shell{width:100%}.compact-memory-grid{width:min(100%,390px,calc(100dvh - 190px));max-width:none;gap:7px;margin:0 auto}.compact-memory-grid .memory-cell{border-radius:9px;border-color:#d7dee7;background:#f8fafc;transition:background .12s,border-color .12s,transform .08s}.compact-memory-grid .memory-cell:active{transform:scale(.97)}.compact-memory-grid .memory-cell.show{background:#263449;border-color:#263449}.compact-memory-grid .memory-cell.chosen{background:#e8f1ff;border-color:#93b4e8}.compact-memory-grid .memory-cell.chosen-correct{background:#ecfdf3;border-color:#86efac}.compact-memory-grid .memory-cell.chosen-wrong{background:#fff1f2;border-color:#fda4af}

@media(min-width:901px) and (max-height:760px){.game-topbar{min-height:50px}.game-main-content{padding-top:7px;padding-bottom:8px}.compact-stage{padding-top:7px;padding-bottom:8px}.compact-toolbar{min-height:30px;padding-bottom:5px}.game-page-compact .compact-stage{min-height:calc(100dvh - 67px)}.game-timer{font-size:15px!important}.mini-hud{margin-bottom:5px}.number-grid{width:min(100%,500px,calc(100dvh - 155px))}.compact-memory-grid{width:min(100%,350px,calc(100dvh - 160px))}.compact-reaction-pad{min-height:200px;max-height:360px}.compact-prompt{padding-top:6px;padding-bottom:12px}}

@media(max-width:900px){.focus-circle{display:none}.mini-game-shell{justify-content:flex-start}.mini-hint{display:none}.number-grid{width:min(100%,520px,calc(100dvh - 174px))}.compact-reaction-pad{min-height:220px;max-height:380px}.compact-memory-grid{width:min(100%,370px,calc(100dvh - 178px))}}
@media(max-width:640px){.mini-hud{gap:4px;margin-bottom:5px}.mini-primary{padding:6px 9px}.mini-chip{padding:4px 6px}.mini-chip span{display:none}.mini-chip strong{font-size:13px}.number-grid{width:min(100%,calc(100dvh - 164px));gap:2px}.num-cell{border-radius:4px;font-size:10px}.compact-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;width:min(100%,420px)}.compact-choices button{min-height:43px}.compact-prompt{padding:10px 5px 14px;font-size:clamp(34px,12vw,52px)}.sequence-prompt{font-size:clamp(23px,7.5vw,36px);white-space:normal}.compact-reaction-pad{min-height:210px;border-radius:12px}.compact-memory-grid{width:min(100%,340px,calc(100dvh - 168px));gap:5px}.compact-memory-grid .memory-cell{border-radius:7px}}

/* v0.1.7 — Number Search V2 */
.number-v2-shell{display:flex;flex:1;min-height:0;flex-direction:column;justify-content:center}.number-v2-strip{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;width:min(100%,860px);margin:0 auto 8px}.seg-inline,.dialog-choice-grid{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.seg-inline{padding:4px;border:1px solid #e2e8f0;border-radius:12px;background:#fbfcfe}.seg-btn{border:0;background:transparent;color:#475569;min-height:30px;padding:6px 10px;border-radius:9px;font-size:12px;font-weight:700;cursor:pointer}.seg-btn:hover{background:#f1f5f9}.seg-btn.is-active{background:#172033;color:#fff}.mini-gear{width:34px;height:34px;border:1px solid #dfe6ef;border-radius:10px;background:#fff;color:#334155;cursor:pointer}.number-v2-hud{width:min(100%,860px);margin-bottom:10px}.number-mode-badge strong{font-size:13px}.number-paper-shell{display:flex;justify-content:center;align-items:center;flex:1;min-height:0}.number-paper{display:flex;align-items:center;justify-content:center;width:min(100%,760px);padding:10px;border-radius:22px;background:linear-gradient(180deg,#fffdfa,#fff);border:1px solid #ebe6dc;box-shadow:0 14px 34px rgba(15,23,42,.06), inset 0 1px 0 rgba(255,255,255,.6)}.number-paper.is-free{background:linear-gradient(180deg,#fffdfa,#fffdf8);background-image:linear-gradient(to bottom,rgba(230,221,206,.35) 1px,transparent 1px);background-size:100% 28px}.number-board{position:relative;width:min(100%,580px);margin:0 auto}.number-board.layout-grid,.number-board.layout-honey{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));gap:4px}.number-board.layout-grid .num-cell,.number-board.layout-honey .num-cell{aspect-ratio:1/1;border:1px solid #d8dee8;background:#fff;border-radius:8px;font-weight:800;cursor:pointer;min-width:0;font-size:clamp(10px,1vw,14px)}.number-board.layout-grid.shape-round .num-cell{border-radius:999px}.number-board.layout-grid.shape-hex .num-cell,.number-board.layout-honey .num-cell{clip-path:polygon(25% 7%,75% 7%,100% 50%,75% 93%,25% 93%,0 50%);border-radius:0}.number-board.layout-honey{gap:3px}.number-board.layout-honey .num-cell.offset{transform:translateX(8px)}.number-board.layout-grid .num-cell:hover,.number-board.layout-honey .num-cell:hover{background:#f8fafc}.number-board.layout-grid.mark-circle .num-cell.correct,.number-board.layout-honey.mark-circle .num-cell.correct{background:#eff6ff;border-color:#60a5fa;color:#1d4ed8}.number-board.layout-grid.mark-fade .num-cell.correct,.number-board.layout-honey.mark-fade .num-cell.correct{background:#f8fafc;border-color:#e2e8f0;color:#94a3b8;opacity:.45}.number-board.layout-grid.mark-hide .num-cell.correct,.number-board.layout-honey.mark-hide .num-cell.correct{visibility:hidden}.number-board .num-cell.wrong{background:#fff1f2;border-color:#fda4af}.number-board.layout-free{aspect-ratio:1/1;max-width:580px;min-height:min(580px,calc(100dvh - 250px))}.scatter-num{position:absolute;transform:translate(-50%,-50%) rotate(var(--rot,0deg));border:0;background:transparent;color:#1f2937;font-weight:800;cursor:pointer;min-width:28px;min-height:28px;display:inline-flex;align-items:center;justify-content:center;padding:0 3px;font-size:18px;line-height:1;transition:transform .08s,color .12s,opacity .12s,background .12s,border-color .12s}.scatter-num.small{font-size:16px}.scatter-num.tiny{font-size:14px}.scatter-num:hover{color:#0f172a;transform:translate(-50%,-50%) rotate(var(--rot,0deg)) scale(1.08)}.layout-free.mark-circle .scatter-num.correct{width:2.2em;height:2.2em;border:2px solid #3b82f6;border-radius:999px;background:rgba(219,234,254,.45);color:#1d4ed8;transform:translate(-50%,-50%) rotate(0deg)}.layout-free.mark-fade .scatter-num.correct{opacity:.28;color:#94a3b8}.layout-free.mark-hide .scatter-num.correct{opacity:0;pointer-events:none}.layout-free .scatter-num.wrong{color:#be123c}.number-settings-dialog .dialog-choice-grid{margin-top:6px}.number-settings-dialog .seg-btn{border:1px solid #e2e8f0;background:#fff}.number-settings-dialog .seg-btn.is-active{background:#172033;border-color:#172033;color:#fff}

@media(min-width:901px) and (max-height:760px){.number-v2-strip{margin-bottom:6px}.number-v2-hud{margin-bottom:8px}.number-paper{padding:8px}.number-board.layout-free{min-height:min(540px,calc(100dvh - 210px));max-width:540px}.number-board{width:min(100%,540px)}}
@media(max-width:900px){.number-v2-strip{justify-content:flex-start;width:100%}.number-v2-hud{width:100%}.number-paper{width:100%;padding:8px}.number-board{width:min(100%,540px)}.number-board.layout-free{max-width:540px;min-height:min(540px,calc(100dvh - 245px))}}
@media(max-width:640px){.number-v2-strip{gap:5px;margin-bottom:6px}.seg-inline{padding:3px;border-radius:10px;overflow:auto;max-width:100%}.seg-btn{padding:5px 8px;font-size:11px;min-height:28px}.mini-gear{width:32px;height:32px}.number-v2-hud{justify-content:flex-start;gap:4px}.number-mode-badge{display:none}.number-paper{padding:6px;border-radius:16px}.number-board{width:min(100%,calc(100dvw - 36px))}.number-board.layout-free{min-height:min(calc(100dvw - 36px),calc(100dvh - 240px));max-width:calc(100dvw - 36px)}.number-board.layout-grid,.number-board.layout-honey{gap:3px}.number-board.layout-grid .num-cell,.number-board.layout-honey .num-cell{font-size:11px;border-radius:6px}.scatter-num{font-size:16px}.scatter-num.small{font-size:14px}.scatter-num.tiny{font-size:12px}}

/* v0.1.8 — Number Search V3: paper scatter, sequence + movement */
.number-v3-shell{display:flex;flex:1;min-height:0;flex-direction:column;justify-content:center}.number-v3-strip{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;width:min(100%,900px);margin:0 auto 7px}.number-v3-hud{width:min(100%,900px);margin-bottom:8px}.number-progress-count strong{font-size:13px}.paper-v3{position:relative;overflow:hidden;isolation:isolate}.paper-v3.is-free{background-color:#fffdf8;background-image:linear-gradient(to bottom,transparent 27px,rgba(108,151,190,.16) 28px,transparent 29px);background-size:100% 29px}.paper-v3.is-free::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:0;background:radial-gradient(circle at 18% 20%,rgba(139,116,84,.035),transparent 22%),radial-gradient(circle at 77% 68%,rgba(139,116,84,.028),transparent 24%)}.paper-margin-line{display:none}.paper-v3.is-free .paper-margin-line{display:block;position:absolute;top:0;bottom:0;left:9%;width:1px;background:rgba(221,87,87,.20);z-index:1;pointer-events:none}.paper-v3 .number-board{z-index:2}.number-board.layout-free{aspect-ratio:1/1;max-width:600px;min-height:min(600px,calc(100dvh - 242px));position:relative}.scatter-num{font-family:"Segoe Print","Bradley Hand","Comic Sans MS",ui-rounded,system-ui,sans-serif;text-shadow:.25px .2px 0 rgba(15,23,42,.14);transform:translate(-50%,-50%) rotate(var(--rot,0deg)) scale(var(--scale,1));transition:transform .08s,color .12s,opacity .14s,filter .12s}.scatter-num.ink-1{font-weight:720}.scatter-num.ink-2{font-weight:800;letter-spacing:-.03em}.scatter-num.ink-3{font-weight:680;filter:contrast(.96)}.scatter-num:hover{transform:translate(-50%,-50%) rotate(var(--rot,0deg)) scale(calc(var(--scale,1) * 1.08))}.layout-free.mark-circle .scatter-num.correct{width:2.25em;height:1.95em;border:0;background:transparent;color:#2457a6;transform:translate(-50%,-50%) rotate(0deg) scale(1)}.layout-free.mark-circle .scatter-num.correct::before,.layout-free.mark-circle .scatter-num.correct::after{content:"";position:absolute;inset:-.18em -.28em;border:2px solid rgba(37,99,235,.82);border-radius:52% 47% 50% 46%;pointer-events:none}.layout-free.mark-circle .scatter-num.correct::before{transform:rotate(-7deg) scaleX(1.04);border-width:1.7px}.layout-free.mark-circle .scatter-num.correct::after{inset:-.12em -.23em;transform:rotate(5deg) scaleY(.96);border-color:rgba(37,99,235,.48);border-width:1px}.layout-free.mark-fade .scatter-num.correct{opacity:.24;color:#64748b}.layout-free.mark-hide .scatter-num.correct,.layout-free .scatter-num.style-hide{opacity:0;pointer-events:none}.number-settings-dialog .setting-note{margin:8px 0 0;color:#7b8798;font-size:11px;line-height:1.45}.number-result-actions{display:flex;gap:7px;margin-top:10px}.result-action{border:1px solid #dce3eb;background:#fff;color:#334155;border-radius:9px;padding:7px 10px;font-size:12px;font-weight:750;cursor:pointer}.result-action:hover{background:#f8fafc}.result-action.primary-lite{background:#172033;border-color:#172033;color:#fff}.number-v3-shell .seg-btn:disabled,.number-v3-shell button[aria-disabled="true"]{opacity:.5;cursor:not-allowed}

/* Organic honey layout without making the board taller than the viewport */
.number-board.layout-honey{padding-left:4px;padding-right:4px}.number-board.layout-honey .num-cell.offset{transform:translateX(10%)}

@media(min-width:901px) and (max-height:760px){.number-v3-strip{margin-bottom:5px}.number-v3-hud{margin-bottom:6px}.number-board.layout-free{max-width:520px;min-height:min(520px,calc(100dvh - 195px))}.paper-v3{padding:7px}.paper-v3.is-free .paper-margin-line{left:8%}}
@media(max-width:900px){.number-v3-strip{justify-content:flex-start;width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:1px}.number-v3-strip .seg-inline{flex:0 0 auto}.number-v3-hud{width:100%}.number-board.layout-free{max-width:540px;min-height:min(540px,calc(100dvh - 238px))}}
@media(max-width:640px){.number-v3-strip{gap:4px;margin-bottom:5px}.number-v3-hud{gap:4px}.number-progress-count{display:none}.paper-v3.is-free .paper-margin-line{left:8%}.number-board.layout-free{width:min(100%,calc(100dvw - 38px));max-width:calc(100dvw - 38px);min-height:min(calc(100dvw - 38px),calc(100dvh - 226px))}.scatter-num{font-size:15px;min-width:26px;min-height:26px}.scatter-num.small{font-size:13px}.scatter-num.tiny{font-size:11.5px}.number-result-actions{flex-wrap:wrap}}

/* v0.1.9 — Daily Challenge */
.daily-challenge-card{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 18px;padding:18px 20px;border:1px solid #dbe4f0;border-radius:18px;background:linear-gradient(135deg,#ffffff,#f8fbff)}.daily-challenge-copy{min-width:0}.daily-kicker{display:block;margin-bottom:5px;font-size:10px;font-weight:900;letter-spacing:.09em;color:#475569}.daily-challenge-card h2{margin:0 0 5px;font-size:21px;letter-spacing:-.025em}.daily-challenge-card p{margin:0 0 4px;color:#334155;font-size:14px;font-weight:700}.daily-challenge-card small{display:block;color:#7a8797;line-height:1.45}.daily-challenge-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:10px 15px;border-radius:11px;background:#172033;color:#fff;font-size:13px;font-weight:800}.daily-challenge-btn:hover{background:#243044}
.daily-game-banner{display:flex;align-items:center;gap:10px;width:min(100%,860px);margin:0 auto 8px;padding:8px 10px;border:1px solid #dce5f0;border-radius:13px;background:linear-gradient(135deg,#f8fbff,#fff)}.daily-game-badge{flex:0 0 auto;padding:5px 7px;border-radius:8px;background:#172033;color:#fff;font-size:9px;font-weight:900;letter-spacing:.08em}.daily-game-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:1px}.daily-game-copy strong{font-size:13px;line-height:1.2}.daily-game-copy span{min-width:0;color:#64748b;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.daily-exit-btn{flex:0 0 auto;border:1px solid #d9e1ea;border-radius:9px;background:#fff;color:#475569;min-height:32px;padding:6px 9px;font-size:11px;font-weight:700;cursor:pointer}.daily-exit-btn:hover{background:#f1f5f9}.is-game-route .daily-game-banner+.number-v3-hud{margin-top:0}
@media(max-width:640px){.daily-challenge-card{align-items:stretch;flex-direction:column;gap:12px;padding:15px}.daily-challenge-btn{width:100%}.daily-game-banner{gap:7px;padding:7px 8px}.daily-game-badge{display:none}.daily-game-copy strong{font-size:12px}.daily-game-copy span{font-size:10px}.daily-exit-btn{padding:5px 7px;font-size:10px}.daily-game-banner+.number-v3-hud{margin-top:0}}

/* v0.2.0 — Brain training dashboard */
.brain-dashboard{display:grid;gap:16px}.dashboard-welcome{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:2px 2px 4px}.dashboard-welcome h1{margin:3px 0 5px;font-size:clamp(24px,3vw,34px);line-height:1.12;letter-spacing:-.035em}.dashboard-welcome p{max-width:760px;margin:0;color:#6b7280;font-size:13px;line-height:1.55}.dashboard-kicker,.panel-kicker{font-size:9px;font-weight:900;letter-spacing:.12em;color:#64748b}.dashboard-continue{display:flex;align-items:center;gap:10px;flex:0 0 auto;min-width:220px;padding:10px 12px;border:1px solid #dfe5ed;border-radius:13px;background:#fff;transition:.15s}.dashboard-continue:hover{border-color:#bdc8d5;background:#fbfcfe}.dashboard-continue span{font-size:10px;color:#7b8798;text-transform:uppercase;font-weight:800}.dashboard-continue strong{min-width:0;flex:1;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-continue b{font-size:18px;color:#334155}.dashboard-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.summary-tile{display:flex;align-items:center;gap:11px;min-width:0;padding:13px 14px;border:1px solid #e3e8ef;border-radius:15px;background:#fff}.summary-icon{display:grid;place-items:center;width:35px;height:35px;flex:0 0 auto;border-radius:11px;background:#f3f6fa;color:#334155;font-size:16px}.summary-tile div{display:flex;min-width:0;flex-direction:column}.summary-tile small{color:#7a8797;font-size:10px;font-weight:700}.summary-tile strong{margin:1px 0;font-size:20px;line-height:1.1;letter-spacing:-.03em;font-variant-numeric:tabular-nums}.summary-tile em{font-style:normal;color:#94a3b8;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-grid{display:grid;gap:12px}.dashboard-grid-primary{grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr)}.dashboard-grid-secondary{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr) minmax(0,.95fr)}.dashboard-panel{min-width:0;padding:16px;border:1px solid #e3e8ef;border-radius:17px;background:#fff}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}.panel-head h2{margin:2px 0 0;font-size:17px;letter-spacing:-.025em}.panel-meta,.training-progress{font-size:12px;color:#475569;white-space:nowrap}.training-progress{display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:28px;padding:4px 8px;border-radius:9px;background:#172033;color:#fff;font-weight:800}.training-progress-track{height:5px;margin:-2px 0 11px;border-radius:999px;background:#eef2f6;overflow:hidden}.training-progress-track span{display:block;width:var(--progress,0%);height:100%;border-radius:inherit;background:#334155;transition:width .25s}.training-list{display:grid;gap:7px}.training-task{display:flex;align-items:center;gap:9px;min-width:0;padding:9px;border:1px solid #edf0f4;border-radius:12px;background:#fbfcfe;transition:.15s}.training-task:hover{border-color:#ccd5e0;background:#fff}.training-task.is-done{background:#f8fbf8}.training-check{display:grid;place-items:center;width:24px;height:24px;flex:0 0 auto;border:1px solid #d9e1ea;border-radius:8px;background:#fff;color:#64748b;font-size:10px;font-weight:900}.training-task.is-done .training-check{border-color:#b7ddc2;background:#eaf7ed;color:#166534}.training-icon{width:25px;text-align:center;font-size:17px}.training-copy{display:flex;min-width:0;flex:1;flex-direction:column}.training-copy strong{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.training-copy small{margin-top:2px;color:#8793a2;font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.training-action{font-size:10px;font-weight:800;color:#475569}.training-task.is-done .training-action{color:#4b7d58}.panel-note{margin:11px 0 0;color:#8a95a3;font-size:10.5px;line-height:1.5}.week-chart{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));align-items:end;gap:7px;height:160px;padding-top:4px}.week-column{display:grid;grid-template-rows:1fr auto auto;gap:3px;min-width:0;height:100%;text-align:center}.week-bar-track{display:flex;align-items:flex-end;justify-content:center;height:118px;border-radius:9px;background:#f7f9fb;overflow:hidden}.week-bar{position:relative;width:min(70%,34px);min-height:4px;border-radius:7px 7px 3px 3px;background:#334155;transition:height .25s}.week-bar span{position:absolute;top:-17px;left:50%;transform:translateX(-50%);font-size:9px;font-weight:800;color:#64748b}.week-column strong{font-size:10px;color:#475569}.week-column small{font-size:9px;color:#9aa4b1}.skill-list{display:grid;gap:10px}.skill-row{display:grid;gap:5px}.skill-label{display:flex;align-items:center;gap:6px}.skill-label span{width:20px;text-align:center}.skill-label strong{flex:1;font-size:11.5px}.skill-label small{font-size:10px;color:#8b96a5}.skill-track{height:6px;border-radius:999px;background:#f0f3f6;overflow:hidden}.skill-track span{display:block;height:100%;border-radius:inherit;background:#475569;transition:width .25s}.record-list,.recent-list{display:grid;gap:4px}.record-row,.recent-row{display:flex;align-items:center;gap:8px;min-width:0;padding:8px 4px;border-bottom:1px solid #f0f2f5}.record-row:last-child,.recent-row:last-child{border-bottom:0}.record-row:hover,.recent-row:hover{background:#fbfcfd}.record-icon,.recent-icon{display:grid;place-items:center;width:28px;height:28px;flex:0 0 auto;border-radius:9px;background:#f4f6f8;font-size:14px}.record-copy,.recent-copy{display:flex;min-width:0;flex:1;flex-direction:column}.record-copy strong,.recent-copy strong{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-copy small,.recent-copy small{margin-top:2px;font-size:9.5px;color:#98a2af}.record-row>b,.recent-row>b{font-size:11px;color:#334155;white-space:nowrap}.empty-dashboard-state{padding:15px 10px;color:#8793a2;font-size:11px;line-height:1.5;text-align:center}.game-library-section{padding-top:3px}.dashboard-section-head{margin:3px 0 12px}.dashboard-section-head h2{font-size:20px}.dashboard-category{margin:0 0 15px}.dashboard-category-head{display:flex;align-items:center;gap:7px;margin-bottom:7px;color:#475569}.dashboard-category-head span{font-size:15px}.dashboard-category-head strong{font-size:11px;text-transform:uppercase;letter-spacing:.05em}.dashboard-game-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.dashboard-game-card{display:flex;align-items:center;gap:9px;min-width:0;padding:11px 12px;border:1px solid #e5e9ef;border-radius:13px;background:#fff;transition:.14s}.dashboard-game-card:hover{border-color:#cbd5df;transform:translateY(-1px)}.dashboard-game-icon{display:grid;place-items:center;width:32px;height:32px;flex:0 0 auto;border-radius:10px;background:#f5f7fa;font-size:16px}.dashboard-game-copy{display:flex;min-width:0;flex:1;flex-direction:column}.dashboard-game-copy strong{font-size:12px}.dashboard-game-copy small{margin-top:2px;color:#8a95a3;font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-game-card>b{font-size:15px;color:#94a3b8}.dashboard-skeleton{position:relative;overflow:hidden;border-radius:9px;background:#f1f4f7}.dashboard-skeleton::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.75),transparent);animation:brainSkeleton 1.2s infinite}.dashboard-skeleton.line{height:47px}.dashboard-skeleton.block{height:140px}.dashboard-skeleton.chart{width:100%;height:140px}@keyframes brainSkeleton{to{transform:translateX(100%)}}.dashboard-ready .dashboard-skeleton{display:none}

@media(max-width:1050px){.dashboard-grid-secondary{grid-template-columns:1fr 1fr}.recent-panel{grid-column:1/-1}.dashboard-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.dashboard-welcome{align-items:stretch;flex-direction:column}.dashboard-continue{min-width:0;width:100%}.dashboard-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid-primary,.dashboard-grid-secondary{grid-template-columns:1fr}.recent-panel{grid-column:auto}}
@media(max-width:600px){.brain-dashboard{gap:11px}.dashboard-welcome h1{font-size:24px}.dashboard-welcome p{font-size:11px}.dashboard-summary{gap:7px}.summary-tile{padding:10px;gap:8px;border-radius:12px}.summary-icon{width:30px;height:30px;border-radius:9px;font-size:14px}.summary-tile strong{font-size:16px}.summary-tile em{font-size:9px}.dashboard-panel{padding:12px;border-radius:14px}.panel-head h2{font-size:15px}.week-chart{gap:4px;height:142px}.week-bar-track{height:100px}.week-bar{width:72%}.dashboard-game-grid{grid-template-columns:1fr}.dashboard-game-card{padding:9px 10px}.dashboard-category{margin-bottom:11px}}

/* v0.2.1 — Visual Search / Tìm khác biệt */
.visual-search-shell{display:flex;flex:1;min-height:0;flex-direction:column;justify-content:center}.visual-search-options{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;width:min(100%,760px);margin:0 auto 8px}.visual-search-hud{width:min(100%,760px);margin-bottom:8px}.visual-search-center{display:flex;flex:1;min-height:0;align-items:center;justify-content:center}.visual-search-board{--visual-cols:7;display:grid;grid-template-columns:repeat(var(--visual-cols),minmax(0,1fr));gap:5px;width:min(100%,560px,calc(100dvh - 205px));aspect-ratio:1/1;margin:0 auto;padding:8px;border:1px solid #e4e8ef;border-radius:18px;background:#fff}.visual-search-board.is-idle{display:flex;align-items:center;justify-content:center;aspect-ratio:auto;min-height:320px;background:linear-gradient(180deg,#fff,#fafbfd)}.visual-search-idle{display:flex;flex-direction:column;align-items:center;gap:10px;color:#64748b;text-align:center}.visual-search-idle strong{font-size:52px;line-height:1}.visual-search-idle span{font-size:13px;font-weight:700}.visual-cell{min-width:0;aspect-ratio:1/1;border:1px solid #e1e6ed;border-radius:9px;background:#fbfcfe;color:#1f2937;font-size:clamp(14px,2vw,26px);font-weight:850;line-height:1;cursor:pointer;transition:background .1s,border-color .1s,transform .08s,color .1s}.visual-cell:hover{background:#f3f6fa;border-color:#cfd7e2}.visual-cell:active{transform:scale(.96)}.visual-cell.is-correct{background:#ecfdf3;border-color:#86efac;color:#166534;transform:scale(.93)}.visual-cell.is-wrong{background:#fff1f2;border-color:#fda4af;color:#9f1239}.visual-search-board.difficulty-hard{gap:3px;padding:6px}.visual-search-board.difficulty-hard .visual-cell{border-radius:6px;font-size:clamp(11px,1.55vw,20px)}.visual-search-board.difficulty-easy{gap:7px}.visual-search-board.difficulty-easy .visual-cell{font-size:clamp(20px,3vw,34px)}
@media(min-width:901px) and (max-height:760px){.visual-search-options{margin-bottom:5px}.visual-search-hud{margin-bottom:5px}.visual-search-board{width:min(100%,500px,calc(100dvh - 165px));padding:6px}.visual-search-board.is-idle{min-height:260px}}
@media(max-width:900px){.visual-search-shell{justify-content:flex-start}.visual-search-options{justify-content:flex-start;width:100%}.visual-search-hud{width:100%}.visual-search-board{width:min(100%,520px,calc(100dvh - 190px))}}
@media(max-width:640px){.visual-search-options{gap:4px;margin-bottom:5px}.visual-search-options .seg-inline{max-width:100%;overflow:auto}.visual-search-hud{justify-content:flex-start}.visual-search-hud .mini-hint{display:none}.visual-search-board{width:min(100%,calc(100dvw - 34px),calc(100dvh - 185px));gap:3px;padding:5px;border-radius:13px}.visual-search-board.difficulty-easy{gap:5px}.visual-search-board.difficulty-hard{gap:2px;padding:4px}.visual-cell{border-radius:6px;font-size:clamp(13px,4.2vw,22px)}.visual-search-board.difficulty-hard .visual-cell{font-size:clamp(10px,3vw,16px)}.visual-search-board.is-idle{min-height:240px;aspect-ratio:auto}}

/* v0.2.2 — Digit Span */
.digit-span-shell{width:100%}.digit-span-options{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap;width:min(100%,720px);margin:0 auto 8px}.digit-span-hud{width:min(100%,720px);margin-bottom:8px}.digit-span-stage{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;justify-content:center;width:min(100%,720px);margin:0 auto}.digit-span-screen{display:flex;flex-direction:column;align-items:center;justify-content:center;width:min(100%,520px);min-height:230px;padding:22px;border:1px solid #dfe5ec;border-radius:20px;background:#fbfcfe;transition:background .16s,border-color .16s,color .16s,transform .12s}.digit-span-screen.pulse{transform:scale(1.012)}.digit-span-kicker{font-size:10px;font-weight:900;letter-spacing:.14em;color:#7c8796}.digit-span-digit{min-height:92px;display:flex;align-items:center;justify-content:center;font-size:clamp(64px,10vw,108px);font-weight:900;line-height:1;letter-spacing:-.05em;font-variant-numeric:tabular-nums;color:#172033}.digit-span-caption{font-size:13px;font-weight:650;color:#718096}.digit-span-screen.is-input{background:#fff}.digit-span-screen.is-correct{background:#ecfdf3;border-color:#86efac}.digit-span-screen.is-correct .digit-span-digit{color:#15803d}.digit-span-screen.is-wrong{background:#fff1f2;border-color:#fda4af}.digit-span-screen.is-wrong .digit-span-digit{color:#be123c}.digit-span-entry{width:min(100%,520px);margin-top:10px}.digit-span-answer{display:flex;align-items:center;justify-content:center;gap:5px;min-height:42px;margin-bottom:9px;overflow:hidden}.digit-answer-cell{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:32px;padding:0 3px;border-bottom:2px solid #d7dee8;color:#a0aabc;font-size:18px;font-weight:800;font-variant-numeric:tabular-nums}.digit-answer-cell.is-filled{border-color:#94a3b8;color:#253044}.digit-span-keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:min(100%,330px);margin:0 auto}.digit-span-keypad button{min-height:44px;border:1px solid #dce3eb;border-radius:10px;background:#fff;color:#253044;font-size:16px;font-weight:800;cursor:pointer}.digit-span-keypad button:hover{background:#f1f5f9;border-color:#bdc8d5}.digit-span-keypad button:active{transform:scale(.98)}.digit-span-keypad .key-action{color:#64748b;background:#f8fafc}.digit-span-keypad .key-submit{background:#172033;border-color:#172033;color:#fff;opacity:.58}.digit-span-keypad .key-submit.is-ready{opacity:1}.digit-span-options .seg-btn:disabled{opacity:.48;cursor:not-allowed}

@media(min-width:901px) and (max-height:760px){.digit-span-options{margin-bottom:5px}.digit-span-hud{margin-bottom:5px}.digit-span-screen{min-height:190px;padding:16px}.digit-span-digit{min-height:78px;font-size:clamp(56px,9vw,90px)}.digit-span-entry{margin-top:7px}.digit-span-keypad button{min-height:38px}.digit-span-answer{margin-bottom:6px}}
@media(max-width:640px){.digit-span-options{justify-content:flex-start;margin-bottom:6px}.digit-span-hud{justify-content:flex-start}.digit-span-screen{min-height:190px;padding:14px;border-radius:15px}.digit-span-digit{min-height:78px;font-size:clamp(56px,18vw,82px)}.digit-span-caption{font-size:12px}.digit-span-entry{margin-top:7px}.digit-span-answer{gap:3px;min-height:36px;overflow-x:auto;justify-content:flex-start;padding:0 4px}.digit-answer-cell{min-width:20px;height:28px;font-size:16px}.digit-span-keypad{width:min(100%,300px);gap:5px}.digit-span-keypad button{min-height:42px;border-radius:9px}}

/* v0.2.3 — Matrix Logic */
.matrix-game-shell{display:flex;flex:1;min-height:0;flex-direction:column;justify-content:center}.matrix-options{display:flex;justify-content:center;margin:0 auto 7px}.matrix-hud{width:min(100%,760px)}.matrix-stage{display:grid;grid-template-columns:minmax(260px,430px) minmax(220px,300px);align-items:center;justify-content:center;gap:18px;width:min(100%,780px);margin:0 auto}.matrix-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;width:min(100%,430px);aspect-ratio:1/1}.matrix-board.is-idle{display:flex;align-items:center;justify-content:center;border:1px dashed #d7dee7;border-radius:18px;background:#fafbfc}.matrix-idle{display:flex;flex-direction:column;align-items:center;gap:8px;color:#718096;text-align:center;font-size:13px}.matrix-idle strong{font-size:52px;color:#c4ccd7}.matrix-cell{display:flex;align-items:center;justify-content:center;min-width:0;border:1px solid #dce3eb;border-radius:13px;background:#fff;position:relative;overflow:hidden}.matrix-cell.is-missing{background:#f8fafc;border-style:dashed;border-color:#b9c4d2}.matrix-cell.is-revealed{border-style:solid;border-color:#86efac;background:#f0fdf4;animation:matrixReveal .18s ease-out}.matrix-missing{font-size:clamp(28px,4vw,46px);font-weight:900;color:#94a3b8}.matrix-glyph-pack{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;place-items:center;line-height:1}.matrix-glyph-pack i{font-style:normal;font-size:clamp(16px,2.4vw,28px);color:#273449}.matrix-glyph-pack.count-1{grid-template-columns:1fr}.matrix-glyph-pack.count-2{grid-template-columns:repeat(2,1fr)}.matrix-glyph-pack.count-3{grid-template-columns:repeat(3,1fr)}.matrix-glyph-pack.count-4{grid-template-columns:repeat(2,1fr)}.matrix-glyph-pack.count-5,.matrix-glyph-pack.count-6{grid-template-columns:repeat(3,1fr)}.matrix-arrow{font-size:clamp(34px,5vw,58px);font-weight:800;line-height:1;color:#263449}.matrix-quad{display:grid;grid-template-columns:repeat(2,1fr);gap:5px;width:48%;aspect-ratio:1/1}.matrix-quad i{display:block;border:2px solid #94a3b8;border-radius:3px;background:#fff}.matrix-quad i.on{background:#263449;border-color:#263449}.matrix-compound{display:flex;align-items:center;gap:7px}.matrix-compound b{font-size:clamp(28px,4vw,48px);line-height:1;color:#273449}.matrix-compound em{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:999px;background:#eef2f7;color:#334155;font-size:12px;font-style:normal;font-weight:900}.matrix-options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.matrix-option{position:relative;display:flex;align-items:center;justify-content:center;min-height:112px;border:1px solid #dce3eb;border-radius:13px;background:#fff;color:#243044;cursor:pointer;transition:.12s}.matrix-option:hover:not(:disabled){background:#f8fafc;border-color:#b9c5d3;transform:translateY(-1px)}.matrix-option:active:not(:disabled){transform:scale(.98)}.matrix-option.is-correct{background:#ecfdf3;border-color:#86efac}.matrix-option.is-wrong{background:#fff1f2;border-color:#fda4af}.matrix-option:disabled{cursor:default}.matrix-option-key{position:absolute;left:7px;top:7px;display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;border-radius:7px;background:#f1f5f9;color:#64748b;font-size:10px;font-weight:900}.matrix-option.is-correct .matrix-option-key{background:#dcfce7;color:#166534}.matrix-option.is-wrong .matrix-option-key{background:#ffe4e6;color:#9f1239}.matrix-option .matrix-glyph-pack i{font-size:24px}.matrix-option .matrix-arrow{font-size:46px}.matrix-option .matrix-quad{width:44px}.matrix-option .matrix-compound b{font-size:38px}@keyframes matrixReveal{from{transform:scale(.9);opacity:.3}to{transform:scale(1);opacity:1}}

@media(min-width:901px) and (max-height:760px){.matrix-stage{grid-template-columns:minmax(250px,360px) minmax(210px,270px);gap:14px}.matrix-board{max-width:360px}.matrix-option{min-height:88px}.matrix-options{margin-bottom:5px}}
@media(max-width:760px){.matrix-stage{grid-template-columns:1fr;gap:10px;width:min(100%,520px)}.matrix-board{width:min(100%,360px);margin:0 auto}.matrix-options-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.matrix-option{min-height:74px}.matrix-option .matrix-glyph-pack i{font-size:18px}.matrix-option .matrix-arrow{font-size:34px}.matrix-option .matrix-quad{width:34px}.matrix-option .matrix-compound{gap:4px}.matrix-option .matrix-compound b{font-size:28px}.matrix-option .matrix-compound em{width:22px;height:22px;font-size:10px}}
@media(max-width:480px){.matrix-options{margin-bottom:5px}.matrix-hud{margin-bottom:5px}.matrix-stage{gap:7px}.matrix-board{width:min(100%,calc(100dvh - 290px),330px);min-width:250px;gap:5px}.matrix-cell{border-radius:9px}.matrix-options-grid{gap:4px}.matrix-option{min-height:64px;border-radius:9px}.matrix-option-key{left:4px;top:4px;width:18px;height:18px}.matrix-glyph-pack{gap:2px}.matrix-glyph-pack i{font-size:18px}.matrix-arrow{font-size:36px}.matrix-quad{gap:3px}.matrix-compound b{font-size:30px}}

/* v0.2.4 — Go / No-Go */
.go-no-go-shell{width:100%}.go-no-go-options{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin:0 auto 8px}.go-no-go-hud{width:min(100%,820px)}.go-no-go-stage{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;justify-content:center;gap:10px}.go-no-go-rule{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.go-no-go-rule span{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:6px 10px;border-radius:10px;border:1px solid #e2e8f0;background:#fff;font-size:12px;color:#475569}.go-no-go-rule .rule-go{border-color:#bbf7d0;background:#f0fdf4;color:#166534}.go-no-go-rule .rule-stop{border-color:#fecdd3;background:#fff1f2;color:#9f1239}.go-no-go-rule b{font-size:10px;letter-spacing:.07em}.go-no-go-pad{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;width:min(100%,620px);min-height:300px;max-height:440px;border:1px solid #d9e1ea;border-radius:18px;background:#f8fafc;color:#334155;cursor:pointer;transition:background .12s,border-color .12s,transform .08s,color .12s}.go-no-go-pad:active{transform:scale(.995)}.go-no-go-symbol{font-size:clamp(62px,9vw,104px);font-weight:900;line-height:.9}.go-no-go-pad strong{font-size:clamp(25px,4vw,40px);letter-spacing:-.03em}.go-no-go-pad small{font-size:12px;font-weight:650;color:#7b8798}.go-no-go-pad.is-waiting{background:#f8fafc;color:#64748b}.go-no-go-pad.is-stimulus.stim-go{background:#ecfdf3;border-color:#86efac;color:#166534}.go-no-go-pad.is-stimulus.stim-go small{color:#15803d}.go-no-go-pad.is-stimulus.stim-nogo{background:#fff7f7;border-color:#fda4af;color:#9f1239}.go-no-go-pad.is-stimulus.stim-nogo small{color:#be123c}.go-no-go-pad.is-correct{box-shadow:inset 0 0 0 2px rgba(22,163,74,.16)}.go-no-go-pad.is-wrong{background:#fff1f2;border-color:#fb7185;color:#9f1239}.go-no-go-pad.is-finished{background:#f8fafc;border-color:#cbd5e1;color:#0f172a}.go-no-go-keyhint{font-size:11px;color:#94a3b8}.go-no-go-keyhint kbd{display:inline-flex;align-items:center;justify-content:center;min-width:44px;padding:2px 7px;border:1px solid #d8dee8;border-bottom-width:2px;border-radius:6px;background:#fff;color:#475569;font:inherit;font-weight:700}
@media(min-width:901px) and (max-height:760px){.go-no-go-options{margin-bottom:5px}.go-no-go-pad{min-height:230px;max-height:330px}.go-no-go-stage{gap:7px}}
@media(max-width:640px){.go-no-go-options{justify-content:flex-start}.go-no-go-hud .mini-chip:nth-of-type(3){display:none}.go-no-go-rule{gap:5px}.go-no-go-rule span{padding:5px 8px}.go-no-go-pad{min-height:230px;border-radius:14px}.go-no-go-keyhint{display:none}.go-no-go-symbol{font-size:66px}}

/* v0.3.0 — Frontend refresh, media cards and SEO-ready branding */
:root{--bg:#f4f6fa;--panel:#fff;--text:#18212f;--muted:#667085;--line:#e6eaf0;--accent:#2563eb;--accent2:#dbeafe;--radius:16px;--sidebar:226px}.app-shell{grid-template-columns:var(--sidebar) minmax(0,1fr)}.sidebar{background:#101827;padding:14px 12px}.brand a{display:flex;flex-direction:row;align-items:center;gap:10px;padding:6px 6px 14px}.brand-logo{width:40px;height:40px;border-radius:11px;overflow:hidden;background:#fff;display:grid;place-items:center;flex:0 0 auto}.brand-logo img{width:100%;height:100%;object-fit:contain}.brand-logo-fallback{font-weight:900;color:#111827}.brand-copy{min-width:0}.brand-copy strong,.brand-copy small{display:block}.brand-copy strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brand-copy small{font-size:10px;color:#8e9bad;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nav-home,.nav-game{border-radius:9px}.nav-home{padding:8px 9px;font-size:13px}.nav-game{font-size:12px;padding:7px 9px 7px 27px}.nav-group-title{font-size:11px;padding:10px 8px 4px}.site-topbar{min-height:56px;padding:8px 18px}.site-topbar .topbar-title{display:grid;line-height:1.15}.site-topbar .topbar-title strong{font-size:13px}.site-topbar .topbar-title span{font-size:10px;color:var(--muted);margin-top:2px}.main-content{max-width:1220px;padding:22px 24px 34px}.footer{max-width:1220px;padding:22px 24px 36px;display:flex;justify-content:space-between;gap:16px;border-top:1px solid var(--line)}

.brain-home-v3{display:grid;gap:18px}.home-hero-v3{display:grid;grid-template-columns:minmax(0,1.02fr) minmax(360px,.98fr);gap:24px;align-items:stretch;padding:0;margin:0}.home-hero-copy{display:flex;flex-direction:column;justify-content:center;min-height:350px;padding:34px 8px 34px 4px}.home-overline{font-size:10px;letter-spacing:.15em;font-weight:900;color:#5270a0}.home-hero-copy h1{margin:10px 0 14px;max-width:640px;font-size:clamp(38px,5vw,64px);line-height:.98;letter-spacing:-.055em;color:#121a27}.home-hero-copy p{max-width:620px;margin:0;color:#667085;font-size:16px;line-height:1.65}.home-hero-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:22px}.hero-primary,.hero-secondary{min-height:42px;display:inline-flex;align-items:center;justify-content:center;padding:10px 15px;border-radius:11px;font-size:12px;font-weight:850}.hero-primary{background:#172033;color:#fff}.hero-secondary{background:#fff;border:1px solid #dde3ea;color:#344054}.home-hero-note{display:flex;flex-wrap:wrap;gap:12px 18px;margin-top:18px;color:#8a95a5;font-size:10px}.home-hero-note span:before{content:'✓';margin-right:5px;color:#50705a}.home-hero-media{position:relative;min-height:350px;border-radius:22px;overflow:hidden;background:#172033;border:1px solid #dbe1e9}.home-hero-media>img{width:100%;height:100%;object-fit:cover;display:block}.home-hero-media:after{content:'';position:absolute;inset:auto 0 0;height:42%;background:linear-gradient(transparent,rgba(10,15,24,.32));pointer-events:none}.hero-visual-fallback{height:100%;min-height:350px;display:grid;place-content:center;text-align:center;color:#fff;background:radial-gradient(circle at 70% 20%,#31486f,#111827 60%);gap:8px}.hero-visual-fallback span{font-size:64px}.hero-visual-fallback strong{font-size:20px}.hero-visual-fallback small{color:#c7d0dd}.daily-floating-card{position:absolute;z-index:2;left:16px;right:16px;bottom:16px;padding:13px 14px;border-radius:13px;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);box-shadow:0 12px 28px rgba(15,23,42,.18);display:grid;gap:3px}.daily-floating-card span{font-size:9px;letter-spacing:.12em;font-weight:900;color:#64748b}.daily-floating-card strong{font-size:13px}.daily-floating-card small{font-size:10px;color:#667085}.home-summary{margin:0}.home-summary .summary-tile{min-height:92px;padding:14px 15px}.home-summary .summary-icon{width:34px;height:34px;border-radius:10px;background:#f1f5f9;display:grid;place-items:center}.dashboard-panel{border-radius:16px;box-shadow:none}.dashboard-grid-primary{gap:14px}.dashboard-grid-secondary{gap:14px}.home-game-library{padding-top:4px;scroll-margin-top:70px}.dashboard-section-head{align-items:flex-end}.dashboard-category{margin:20px 0 28px}.dashboard-category-head{display:flex;align-items:center;gap:9px;margin-bottom:10px}.dashboard-category-head>span{width:34px;height:34px;border-radius:10px;background:#fff;border:1px solid var(--line);display:grid;place-items:center}.dashboard-category-head div{display:grid}.dashboard-category-head strong{font-size:15px}.dashboard-category-head small{font-size:10px;color:var(--muted);margin-top:1px}.image-game-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.image-game-card{display:grid!important;grid-template-columns:1fr!important;gap:0!important;padding:0!important;overflow:hidden;border-radius:15px;background:#fff}.image-game-card:hover{transform:translateY(-2px);border-color:#cfd6e1}.game-card-media{position:relative;display:block;aspect-ratio:16/9;background:#e9eef5;overflow:hidden}.game-card-media img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .22s ease}.image-game-card:hover .game-card-media img{transform:scale(1.025)}.game-card-fallback{height:100%;display:grid;place-items:center;font-size:44px;background:linear-gradient(135deg,#eef2f7,#dde6f1)}.image-game-card .dashboard-game-copy{display:grid;padding:12px 13px 6px;gap:3px}.image-game-card .dashboard-game-copy small{font-size:9px;text-transform:uppercase;letter-spacing:.07em;color:#8090a3}.image-game-card .dashboard-game-copy strong{font-size:14px}.image-game-card .dashboard-game-copy span{font-size:11px;line-height:1.45;color:#667085;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:32px}.image-game-card>b{padding:5px 13px 12px;font-size:11px;color:#2563eb}.dashboard-continue{border-radius:11px}.dialog-game-thumb{aspect-ratio:16/9;overflow:hidden;background:#eef2f7}.dialog-game-thumb img{width:100%;height:100%;object-fit:cover;display:block}.brain-dialog .dialog-head{position:sticky}.brain-dialog .dialog-game-thumb+.dialog-head{position:relative}.game-stage-card{box-shadow:0 10px 28px rgba(15,23,42,.04)}

@media(max-width:1050px){.home-hero-v3{grid-template-columns:1fr .9fr}.image-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){:root{--sidebar:250px}.main-content{padding:16px}.home-hero-v3{grid-template-columns:1fr}.home-hero-copy{min-height:0;padding:18px 2px 6px}.home-hero-copy h1{font-size:clamp(34px,9vw,52px)}.home-hero-media{min-height:280px}.hero-visual-fallback{min-height:280px}.footer{padding:20px 16px 30px}.image-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.site-topbar .topbar-title span{display:none}.main-content{padding:10px}.home-hero-v3{gap:12px}.home-hero-copy{padding:12px 2px 4px}.home-hero-copy h1{font-size:36px}.home-hero-copy p{font-size:14px}.home-hero-actions{margin-top:16px}.home-hero-note{display:none}.home-hero-media{min-height:215px;border-radius:16px}.hero-visual-fallback{min-height:215px}.daily-floating-card{left:10px;right:10px;bottom:10px;padding:10px 11px}.dashboard-summary.home-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.image-game-grid{grid-template-columns:1fr}.footer{flex-direction:column}.dashboard-section-head{align-items:flex-start}}
.sidebar-collapsed .brand-copy{display:none}.sidebar-collapsed .brand a{justify-content:center}.sidebar-collapsed .brand-logo{width:40px;height:40px}
@media(max-width:900px){.sidebar-collapsed .brand-copy{display:block}.sidebar-collapsed .brand a{justify-content:flex-start}}
.game-info-details{max-width:760px;margin:14px auto 0;border-top:1px solid var(--line);color:#526071}.game-info-details summary{cursor:pointer;padding:12px 2px;font-size:11px;font-weight:800;color:#667085}.game-info-content{padding:0 2px 14px;font-size:12px;line-height:1.7}.game-info-content h2{font-size:13px;margin:14px 0 4px;color:#344054}.game-info-content p{margin:0;color:#667085}

/* v0.3.1 — polished library navigation */
.game-topbar-title h1{margin:0;font-size:16px;line-height:1.15;letter-spacing:-.015em}.game-library-tools{display:flex;align-items:center;gap:10px;margin:10px 0 18px}.game-search-box{display:flex;align-items:center;gap:7px;min-width:220px;max-width:340px;flex:0 1 340px;padding:0 10px;border:1px solid var(--line);border-radius:11px;background:#fff}.game-search-box span{color:#8a96a8}.game-search-box input{width:100%;border:0;outline:0;background:transparent;padding:10px 0;color:var(--text);font-size:13px}.game-filter-pills{display:flex;gap:6px;overflow:auto;padding:2px;scrollbar-width:none}.game-filter-pills::-webkit-scrollbar{display:none}.game-filter-pills button{border:1px solid var(--line);border-radius:999px;background:#fff;color:#667085;padding:8px 11px;white-space:nowrap;font-size:11px;font-weight:750;cursor:pointer}.game-filter-pills button.is-active{background:#172033;border-color:#172033;color:#fff}.game-library-empty{padding:18px;border:1px dashed var(--line);border-radius:13px;color:var(--muted);text-align:center}.dashboard-category[hidden],.image-game-card[hidden]{display:none!important}.image-game-card{content-visibility:auto;contain-intrinsic-size:260px}.game-card-media:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 60%,rgba(15,23,42,.06));pointer-events:none}.game-info-details{background:#fff;border:1px solid var(--line);border-radius:14px;padding:0 13px}.game-info-details summary{list-style:none}.game-info-details summary::-webkit-details-marker{display:none}.game-info-details summary:after{content:"+";float:right;color:#94a3b8}.game-info-details[open] summary:after{content:"−"}
@media(max-width:900px){.game-library-tools{align-items:flex-start;flex-direction:column}.game-search-box{max-width:none;width:100%;flex-basis:auto}.game-filter-pills{width:100%}}
@media(max-width:640px){.game-topbar-title h1{font-size:13px}.game-library-tools{margin-bottom:12px}.game-filter-pills button{padding:7px 10px}.image-game-card{contain-intrinsic-size:330px}}

/* v0.3.2 — static content pages */
.content-page-v32{max-width:900px;margin:0 auto}.content-page-head{padding:18px 0 22px}.content-breadcrumb{display:flex;gap:7px;align-items:center;color:#64748b;font-size:12px;margin-bottom:16px}.content-breadcrumb a:hover{color:#1d4ed8}.content-page-head h1{margin:0;font-size:clamp(30px,5vw,50px);line-height:1.08;letter-spacing:-.035em}.content-page-head>p{max-width:760px;margin:12px 0 0;color:#64748b;font-size:16px;line-height:1.7}.content-cover{width:100%;height:auto;aspect-ratio:1200/630;object-fit:cover;border-radius:20px;margin-top:20px;border:1px solid #e2e8f0}.content-prose{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:clamp(20px,4vw,42px);font-size:16px;line-height:1.8}.content-prose h2,.content-prose h3,.content-prose h4{color:#111827;line-height:1.25;margin:1.6em 0 .65em}.content-prose h2{font-size:27px}.content-prose h3{font-size:21px}.content-prose p{margin:0 0 1.15em;color:#374151}.content-prose a{color:#2563eb;text-decoration:underline;text-underline-offset:3px}.content-prose blockquote{margin:1.4em 0;padding:14px 18px;border-left:4px solid #cbd5e1;background:#f8fafc;color:#475569;border-radius:0 10px 10px 0}.content-prose img{max-width:100%;height:auto;border-radius:12px}.content-prose table{width:100%;border-collapse:collapse;display:block;overflow:auto}.content-prose th,.content-prose td{border:1px solid #e5e7eb;padding:9px 10px;text-align:left}.page-faq-section{margin-top:26px}.page-faq-list{display:grid;gap:8px}.page-faq-list details{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden}.page-faq-list summary{padding:14px 16px;font-weight:800;cursor:pointer}.page-faq-list details>div{padding:0 16px 16px;color:#64748b;line-height:1.65}.footer>span:last-child{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:640px){.content-page-head{padding-top:8px}.content-prose{border-radius:14px;padding:18px}.content-page-head h1{font-size:32px}.content-page-head>p{font-size:14px}.content-cover{border-radius:14px}}

/* v0.3.6 — Ads & monetization */
.ad-slot{display:flex;align-items:center;justify-content:center;min-height:var(--ad-h,0px);border-radius:12px;overflow:hidden;color:#98a2b3;font-size:11px;text-align:center}.ad-slot .ad-placeholder{display:inline-flex;flex-direction:column;align-items:center;gap:3px;border:1px dashed #d0d5dd;padding:8px 14px;border-radius:8px;background:#fff}.ad-test-placeholder strong{font-size:11px;color:#475569}.ad-test-placeholder small{font-size:9px;letter-spacing:.08em;color:#94a3b8}.ad-device-mobile{display:none}.home-ad-after-hero,.page-ad-after-content{max-width:980px;margin:14px auto}.page-ad-after-content{margin-top:26px;margin-bottom:8px}.game-page .ad-mode-result_only{display:none}.game-page.has-result .ad-mode-result_only{display:flex}.game-page.is-playing .game-ad-after,.game-page.is-playing .ad-mode-result_only{display:none!important}.game-is-playing .sidebar-ad{visibility:hidden;pointer-events:none}.focus-mode .sidebar-ad{display:none}
@media(max-width:900px){.ad-slot{min-height:var(--ad-h-mobile,var(--ad-h,0px))}.ad-device-desktop{display:none!important}.ad-device-mobile{display:flex}.sidebar-ad{display:none!important}.home-ad-after-hero,.page-ad-after-content{margin:10px auto}}

/* v0.4.0 — User accounts & leaderboard */
.nav-home.nav-secondary{background:transparent;color:#cbd5e1;border:1px solid rgba(148,163,184,.12)}.nav-home.nav-secondary:hover{background:#1f2937;color:#fff}.account-pill{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:6px 10px;border:1px solid #dfe4eb;border-radius:11px;background:#fff;color:#334155;font-size:12px;font-weight:800;white-space:nowrap}.account-pill:hover,.topbar-rank-link:hover{background:#f8fafc;border-color:#cbd5e1}.account-avatar-mini{display:inline-flex;align-items:center;justify-content:center;width:23px;height:23px;border-radius:999px;background:#172033;color:#fff;font-size:11px}.compact-account-pill{width:34px;height:34px;min-height:34px;padding:0;justify-content:center;border-radius:10px}.topbar-rank-link{display:inline-flex;align-items:center;gap:5px;padding:7px 10px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;color:#475569;font-size:12px;font-weight:750}.site-topbar .install-btn{margin-left:0}
.account-wrap{display:flex;justify-content:center;padding:28px 0 60px}.account-card{width:min(100%,460px);background:#fff;border:1px solid #e4e8ef;border-radius:22px;padding:26px;box-shadow:0 16px 44px rgba(15,23,42,.06)}.account-card-wide{width:min(100%,520px)}.account-head{margin-bottom:20px}.account-kicker{display:block;font-size:10px;font-weight:900;letter-spacing:.13em;color:#64748b}.account-head h1,.profile-hero h1,.leaderboard-head h1{margin:5px 0 7px;letter-spacing:-.035em}.account-head h1{font-size:30px}.account-head p,.leaderboard-head p,.profile-hero p{margin:0;color:#667085;line-height:1.55}.account-form{display:grid;gap:13px}.account-form label{display:grid;gap:6px;color:#344054;font-size:12px;font-weight:750}.account-form input[type=text],.account-form input[type=email],.account-form input[type=password]{width:100%;min-height:44px;border:1px solid #d9e0e8;border-radius:11px;padding:10px 12px;background:#fff;color:#18212f;font-size:15px;outline:none}.account-form input:focus{border-color:#8eb3f5;box-shadow:0 0 0 3px #eff6ff}.account-submit{min-height:44px;margin-top:3px}.account-switch{margin-top:18px;padding-top:16px;border-top:1px solid #edf0f4;color:#667085;font-size:13px;text-align:center}.account-switch a{color:#2563eb;font-weight:800}.account-note{margin:14px 0 0;color:#7b8798;font-size:12px;line-height:1.55}.form-alert{margin:0 0 15px;padding:11px 13px;border-radius:11px;font-size:13px}.form-alert.error{background:#fff1f2;border:1px solid #fecdd3;color:#9f1239}.form-alert.success{background:#ecfdf3;border:1px solid #bbf7d0;color:#166534}
.profile-page,.leaderboard-page{max-width:1080px;margin:0 auto}.profile-hero,.leaderboard-head{display:flex;align-items:center;gap:16px;margin:6px 0 18px}.profile-avatar{display:flex;align-items:center;justify-content:center;width:62px;height:62px;border-radius:18px;background:#172033;color:#fff;font-size:25px;font-weight:900}.profile-hero h1,.leaderboard-head h1{font-size:30px}.profile-logout{margin-left:auto}.profile-logout button{border:1px solid #e2e8f0;background:#fff;border-radius:10px;padding:8px 11px;color:#475569;cursor:pointer}.profile-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.profile-stats>div,.profile-panel,.leaderboard-panel{background:#fff;border:1px solid #e4e8ef;border-radius:16px}.profile-stats>div{padding:14px}.profile-stats span{display:block;color:#7a8797;font-size:11px;margin-bottom:4px}.profile-stats strong{font-size:19px}.profile-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:14px}.profile-panel{padding:18px}.profile-panel h2,.profile-panel h3{margin:0 0 12px}.profile-panel-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.profile-panel-head p{margin:3px 0 0;color:#7b8798;font-size:12px}.profile-panel-head a{color:#2563eb;font-size:12px;font-weight:800}.profile-game-list{display:grid;margin-top:12px}.profile-game-list>a{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 2px;border-top:1px solid #eef1f5}.profile-game-list>a:first-child{border-top:0}.profile-game-list span{display:grid;gap:2px}.profile-game-list small{color:#8a94a3}.profile-game-metric{font-variant-numeric:tabular-nums;font-weight:850;color:#334155}.compact-account-form{gap:9px}.compact-account-form button{justify-self:start;border:0;background:#172033;color:#fff;border-radius:9px;padding:8px 12px;font-weight:800;cursor:pointer}.check-row{display:flex!important;grid-template-columns:none!important;align-items:center;gap:8px!important}.check-row input{width:17px;height:17px}.profile-panel hr{border:0;border-top:1px solid #eef1f5;margin:18px 0}.profile-recent{margin-top:14px}.profile-history-table>div{display:grid;grid-template-columns:minmax(0,1fr) 160px 90px;align-items:center;gap:12px;padding:10px 0;border-top:1px solid #eef1f5}.profile-history-table>div:first-child{border-top:0}.profile-history-table a{display:flex;gap:8px;align-items:baseline}.profile-history-table small,.profile-history-table span{color:#7b8798;font-size:12px}.profile-history-table b{text-align:right;font-variant-numeric:tabular-nums}.empty-copy{color:#7b8798;font-size:13px}
.leaderboard-head{justify-content:space-between;align-items:flex-end}.leaderboard-tabs{display:flex;gap:5px;flex-wrap:wrap;margin:0 0 14px}.leaderboard-tabs a{padding:7px 11px;border:1px solid #e1e6ed;background:#fff;border-radius:10px;color:#526071;font-size:12px;font-weight:800}.leaderboard-tabs a.is-active{background:#172033;border-color:#172033;color:#fff}.leaderboard-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px}.leaderboard-panel{padding:16px}.leaderboard-panel h2{margin:0 0 10px;font-size:16px}.rank-list{display:grid}.rank-row{display:grid;grid-template-columns:42px minmax(150px,1fr) 90px 90px 90px;align-items:center;gap:8px;min-height:48px;padding:7px 3px;border-top:1px solid #eef1f5;font-size:12px}.rank-row:first-child{border-top:0}.rank-no{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:9px;background:#f1f5f9;font-weight:900;color:#475569}.rank-row:nth-child(1) .rank-no{background:#fff7d6;color:#8a6500}.rank-row:nth-child(2) .rank-no{background:#f1f5f9;color:#536070}.rank-row:nth-child(3) .rank-no{background:#fff0e5;color:#9a4f18}.rank-row>span:not(.rank-no){color:#7b8798}.rank-row>b{text-align:right}.leaderboard-games{display:flex;flex-direction:column}.leaderboard-games>a{display:flex;align-items:center;justify-content:space-between;padding:10px 2px;border-top:1px solid #eef1f5;font-size:13px;font-weight:750}.leaderboard-games>a:first-of-type{border-top:0}.back-link{display:inline-block;margin-bottom:5px;color:#64748b;font-size:12px;font-weight:800}.play-from-rank{display:inline-flex}
@media(max-width:900px){.topbar-rank-link span,.account-pill:not(.compact-account-pill)>span:last-child{display:none}.account-pill{padding:6px}.leaderboard-layout,.profile-grid{grid-template-columns:1fr}.profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.rank-row{grid-template-columns:36px minmax(120px,1fr) 72px 72px 80px}.leaderboard-games{order:-1}}
@media(max-width:640px){.account-wrap{padding:8px 0 32px}.account-card{border-radius:15px;padding:18px}.profile-hero,.leaderboard-head{align-items:flex-start;flex-wrap:wrap}.profile-avatar{width:48px;height:48px;border-radius:14px;font-size:20px}.profile-hero h1,.leaderboard-head h1{font-size:24px}.profile-logout{width:100%;margin-left:0}.profile-stats{gap:7px}.profile-stats>div{padding:11px}.profile-panel{padding:14px}.profile-history-table>div{grid-template-columns:minmax(0,1fr) 78px}.profile-history-table>div>b{grid-column:2;grid-row:1;text-align:right}.profile-history-table>div>span{grid-column:1 / -1}.rank-row{grid-template-columns:34px minmax(100px,1fr) 62px}.rank-row>span:nth-of-type(n+3){display:none}.rank-row>b{font-size:11px}.play-from-rank{width:100%;justify-content:center}.topbar-rank-link{display:none}}

/* v0.4.1 — Fair leaderboards + account email */
.leaderboard-configs{margin:12px 0 14px;padding:14px;border:1px solid #e3e8ef;border-radius:16px;background:#fff}.leaderboard-config-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.leaderboard-config-head strong{font-size:13px}.leaderboard-config-head span{font-size:10px;color:#7b8798}.leaderboard-config-list{display:flex;gap:7px;overflow-x:auto;padding-bottom:2px}.leaderboard-config-list a{display:flex;min-width:170px;flex:0 0 auto;flex-direction:column;gap:3px;padding:9px 10px;border:1px solid #e2e8f0;border-radius:11px;background:#fbfcfe}.leaderboard-config-list a strong{font-size:11px}.leaderboard-config-list a small{font-size:9px;color:#7b8798}.leaderboard-config-list a.is-active{border-color:#172033;background:#172033;color:#fff}.leaderboard-config-list a.is-active small{color:#cbd5e1}.leaderboard-selected{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 10px;padding:8px 10px;border-radius:11px;background:#eef4ff;color:#334155;font-size:10px}.leaderboard-selected span{color:#64748b}.leaderboard-selected strong{font-size:11px}.leaderboard-selected small{margin-left:auto;color:#64748b}.leaderboard-note{margin:11px 2px 0;color:#7b8798;font-size:10px;line-height:1.5}.account-primary-link{display:inline-flex;align-items:center;justify-content:center;margin-top:8px}.email-verify-panel{display:flex;align-items:center;justify-content:space-between;gap:16px}.email-verify-panel h2{margin:0 0 4px;font-size:16px}.email-verify-panel p{margin:0;color:#667085;font-size:12px}.email-verify-panel button{border:0;border-radius:9px;background:#172033;color:#fff;padding:9px 12px;font-weight:750;cursor:pointer}.account-alt{display:flex;justify-content:flex-end;margin-top:10px;font-size:12px}.account-alt a{color:#475569;font-weight:700}
@media(max-width:640px){.leaderboard-config-head{align-items:flex-start;flex-direction:column}.leaderboard-config-list a{min-width:155px}.leaderboard-selected small{width:100%;margin-left:0}.email-verify-panel{align-items:flex-start;flex-direction:column}}

/* v0.4.2 — Game Session Engine */
.legacy-game-start{display:none!important}.game-root-wrap{position:relative;min-height:0;flex:1;display:flex;flex-direction:column}.session-control-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}.session-config-summary{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#667085;font-size:12px;font-weight:650}.session-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}.session-btn{min-height:34px;padding:7px 11px;border:1px solid #dfe5ed;border-radius:9px;background:#fff;color:#344054;font-size:12px;font-weight:750;cursor:pointer}.session-btn:hover{background:#f8fafc;border-color:#cbd5e1}.session-btn:disabled{opacity:.45;cursor:not-allowed}.session-primary{min-height:34px;padding:7px 14px;border-radius:9px;font-size:12px}.session-settings span{display:inline}.session-overlay{position:absolute;inset:0;z-index:8;display:none;align-items:center;justify-content:center;padding:16px;background:rgba(248,250,252,.97);backdrop-filter:blur(7px);border-radius:14px}.session-overlay.is-visible{display:flex}.session-overlay-card{width:min(100%,420px);text-align:center;padding:22px 18px}.session-overlay-kicker{font-size:10px;font-weight:900;letter-spacing:.13em;color:#64748b}.session-overlay-main{margin:8px 0 5px;font-size:clamp(24px,4vw,42px);line-height:1.05;font-weight:900;letter-spacing:-.04em;color:#172033}.session-overlay-copy{max-width:360px;margin:0 auto;color:#667085;font-size:13px;line-height:1.55}.session-overlay-actions{display:flex;justify-content:center;gap:7px;flex-wrap:wrap;margin-top:16px}.session-overlay-btn{min-width:112px}.session-overlay[data-kind="countdown"] .session-overlay-main{font-size:clamp(64px,10vw,110px);font-variant-numeric:tabular-nums}.session-overlay[data-kind="paused"]{background:rgba(248,250,252,.985)}.session-overlay[data-kind="expired"] .session-overlay-main{font-size:26px}.session-result-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.session-rank-note{margin:9px 0 0;padding:8px 10px;border-radius:9px;background:#f8fafc;border:1px solid #e2e8f0;color:#64748b;font-size:11px;line-height:1.45}.game-page.is-paused .game-root{filter:blur(5px);pointer-events:none;user-select:none}.game-page.is-paused .game-ad-after,.game-page.is-playing .game-ad-after{display:none!important}.number-play-hud{justify-content:flex-start}.number-play-hud .mini-hint{margin-left:auto}.number-settings-dialog{width:min(620px,calc(100% - 28px))}.number-settings-dialog .dialog-section{margin-bottom:10px}.number-settings-dialog .dialog-choice-grid{gap:6px}.number-settings-dialog .seg-btn{min-height:34px;padding:7px 11px}.compact-stage{display:flex;flex-direction:column}.compact-game-root{min-height:0;flex:1}

@media(max-width:900px){.session-control-bar{padding:6px 0}.session-config-summary{font-size:11px}.session-btn,.session-primary{min-height:32px;padding:6px 9px}.session-overlay{border-radius:11px}.number-settings-dialog{width:100%;max-width:none;margin:auto 0 0;border-radius:18px 18px 0 0;max-height:82%;}.number-settings-dialog::backdrop{background:rgba(15,23,42,.5)}.number-settings-dialog .dialog-head{border-radius:18px 18px 0 0}.number-settings-dialog[open]{animation:brain-sheet-in .16s ease-out}.number-play-hud .mini-hint{display:none}}
@media(max-width:640px){.session-control-bar{gap:5px}.session-config-summary{max-width:45%;font-size:10px}.session-actions{gap:4px}.session-settings span{display:none}.session-btn{padding:6px 8px}.session-primary{padding:6px 10px}.session-overlay-card{padding:18px 10px}.session-overlay-main{font-size:26px}.session-overlay-copy{font-size:12px}.session-result-actions{gap:5px}.number-play-hud{gap:4px}.number-play-hud .number-progress-count{display:none}}
@keyframes brain-sheet-in{from{transform:translateY(16px);opacity:.6}to{transform:translateY(0);opacity:1}}

/* v0.4.3 — Session hardening + unified settings */
.game-settings-dialog{width:min(560px,calc(100% - 28px));max-height:min(720px,calc(100dvh - 40px));padding:0;border:1px solid #e0e6ee;border-radius:18px;background:#fff;color:#18212f;box-shadow:0 24px 70px rgba(15,23,42,.25);overflow:auto}.game-settings-dialog .dialog-choice-grid{display:flex;gap:6px;flex-wrap:wrap}.game-settings-dialog .seg-btn{min-height:34px;padding:7px 11px;border:1px solid #e2e8f0;background:#fff;border-radius:9px}.game-settings-dialog .seg-btn.is-active{background:#172033;border-color:#172033;color:#fff}.history-status{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-right:5px;border-radius:999px;background:#f1f5f9;color:#64748b;font-size:10px;font-style:normal;vertical-align:1px}.game-root[aria-hidden="true"]{user-select:none}.session-overlay[data-kind="conflict"] .session-overlay-main{font-size:clamp(24px,3vw,34px)}
@media(max-width:900px){.game-settings-dialog{width:100%;max-width:none;margin:auto 0 0;border-radius:18px 18px 0 0;max-height:82%;}.game-settings-dialog::backdrop{background:rgba(15,23,42,.5)}.game-settings-dialog .dialog-head{border-radius:18px 18px 0 0}.game-settings-dialog[open]{animation:brain-sheet-in .16s ease-out}}

/* v0.4.4 — Guest Nearby Leaderboard + Cultivation Realms */
.rank-view-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px}.rank-view-tabs a{padding:8px 12px;border:1px solid #dfe5ed;border-radius:11px;background:#fff;color:#526071;font-size:12px;font-weight:800}.rank-view-tabs a.is-active{background:#172033;border-color:#172033;color:#fff}.realm-summary{display:flex;align-items:center;gap:16px;margin:0 0 14px;padding:17px 18px;border:1px solid #dfe6ef;border-radius:18px;background:linear-gradient(135deg,#fff,#f8fafc)}.realm-emblem{display:flex;align-items:center;justify-content:center;width:62px;height:62px;flex:0 0 auto;border-radius:18px;background:#172033;color:#fff;font-size:24px;font-weight:900}.realm-main{min-width:0;flex:1}.realm-kicker{display:block;font-size:9px;font-weight:900;letter-spacing:.13em;color:#7b8798}.realm-main h2{margin:3px 0 5px;font-size:21px;letter-spacing:-.025em}.realm-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:#64748b;font-size:11px}.realm-meta strong{font-size:14px;color:#172033}.realm-progress{height:6px;margin:10px 0 7px;overflow:hidden;border-radius:999px;background:#e8edf3}.realm-progress i{display:block;height:100%;border-radius:inherit;background:#334155;transition:width .35s ease}.realm-main p{margin:0;color:#667085;font-size:11px}.rank-delta-live{padding:3px 7px;border-radius:999px;font-weight:850}.rank-delta-live.is-up{background:#ecfdf3;color:#166534}.rank-delta-live.is-down{background:#fff1f2;color:#9f1239}.nearby-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:8px}.nearby-head h2{margin:0 0 3px!important}.nearby-head p{margin:0;color:#7b8798;font-size:11px}.nearby-head>strong{font-size:22px;letter-spacing:-.03em}.rank-row-v2{grid-template-columns:70px minmax(170px,1fr) 74px 100px;transition:background .2s,transform .25s}.rank-row-v2 .rank-no{width:auto;min-width:58px;padding:0 7px}.rank-person{display:grid;gap:2px;min-width:0}.rank-person strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rank-person small{color:#8a94a3;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rank-row-v2.is-me{position:relative;background:#eef4ff;border-radius:11px;padding-left:8px;padding-right:8px;border-top-color:transparent}.rank-row-v2.is-me .rank-no{background:#172033;color:#fff}.rank-row-v2.rank-arrived{animation:rank-arrive .45s ease both}@keyframes rank-arrive{from{opacity:.5;transform:translateY(8px)}to{opacity:1;transform:none}}.nearby-empty{text-align:center;padding:28px}.nearby-empty h2{margin-bottom:6px}.nearby-empty p{max-width:620px;margin:0 auto 14px;color:#667085;line-height:1.6}
.result-leaderboard-context{margin-top:10px}.result-rank-box{padding:11px;border:1px solid #dfe6ef;border-radius:13px;background:#f8fafc}.result-rank-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.result-rank-head>span{font-size:9px;font-weight:900;letter-spacing:.1em;color:#7b8798}.result-rank-head>strong{font-size:15px}.result-rank-head>b{margin-left:auto;padding:3px 7px;border-radius:999px;font-size:10px}.result-rank-head>b.up{background:#ecfdf3;color:#166534}.result-rank-head>b.down{background:#fff1f2;color:#9f1239}.result-realm{display:grid;gap:4px;margin-top:9px}.result-realm>span{font-size:9px;color:#7b8798}.result-realm>strong{font-size:13px}.result-realm>small{color:#667085;font-size:10px}.result-realm-bar{height:5px;border-radius:999px;background:#e2e8f0;overflow:hidden}.result-realm-bar i{display:block;height:100%;border-radius:inherit;background:#334155}.result-rank-link{display:inline-flex;margin-top:8px;color:#2563eb;font-size:11px;font-weight:800}.guest-rank-form{display:grid;gap:7px;margin-top:10px;padding-top:10px;border-top:1px solid #e2e8f0}.guest-rank-form>div:first-child{display:grid;gap:2px}.guest-rank-form>div:first-child span{font-size:12px;font-weight:850}.guest-rank-form>div:first-child small{color:#7b8798;font-size:10px}.guest-rank-input-row{display:flex;gap:6px}.guest-rank-input-row input{min-width:0;flex:1;min-height:36px;border:1px solid #d7dee8;border-radius:9px;padding:7px 9px;font-size:13px}.guest-rank-input-row button{border:0;border-radius:9px;background:#172033;color:#fff;padding:7px 11px;font-weight:800;cursor:pointer}.guest-rank-feedback{margin:0;color:#7b8798;font-size:10px}.guest-rank-saved{display:grid;gap:5px;margin-top:10px;padding-top:10px;border-top:1px solid #e2e8f0;font-size:11px}.guest-rank-saved>strong{color:#166534}.guest-rank-saved>span{color:#667085}
@media(max-width:640px){.realm-summary{align-items:flex-start;padding:13px}.realm-emblem{width:48px;height:48px;border-radius:14px;font-size:19px}.realm-main h2{font-size:17px}.rank-row-v2{grid-template-columns:58px minmax(110px,1fr) 82px}.rank-row-v2>span:nth-of-type(3){display:none}.rank-row-v2>b{font-size:11px}.guest-rank-input-row{flex-direction:column}.guest-rank-input-row button{min-height:38px}.nearby-head{align-items:center}}
@media(prefers-reduced-motion:reduce){.rank-row-v2.rank-arrived{animation:none}.realm-progress i{transition:none}}

/* v0.4.4.1 — gameplay bootstrap/mobile layout hotfix */
.game-root-wrap{min-height:min(620px,calc(100dvh - 190px))}
.session-overlay{overflow:auto}
@media(max-width:640px){
  .game-root-wrap{min-height:max(320px,calc(100dvh - 178px))}
  .session-control-bar[data-state="playing"] .session-config-summary,
  .session-control-bar[data-state="paused"] .session-config-summary,
  .session-control-bar[data-state="countdown"] .session-config-summary{display:none}
  .session-control-bar[data-state="playing"] .session-actions,
  .session-control-bar[data-state="paused"] .session-actions,
  .session-control-bar[data-state="countdown"] .session-actions{width:100%;justify-content:flex-end}
}

/* v0.4.4.2 — Professional frontend shell + polished gameplay workspace */
:root{--bg:#f3f6fa;--panel:#fff;--text:#172033;--muted:#687386;--line:#e2e8f0;--accent:#2563eb;--accent-strong:#1d4ed8;--sidebar:238px;--shadow-sm:0 1px 2px rgba(15,23,42,.04),0 4px 14px rgba(15,23,42,.035);--shadow-md:0 16px 45px rgba(15,23,42,.08)}
html{background:#f3f6fa}body{background:radial-gradient(circle at 75% -10%,rgba(59,130,246,.065),transparent 28rem),#f3f6fa;color:#172033}.app-shell{min-height:100dvh}.main-wrap{min-width:0;min-height:100dvh}.main-content{position:relative}.sidebar{scrollbar-width:thin;scrollbar-color:#2c3a50 transparent}.sidebar::-webkit-scrollbar{width:5px}.sidebar::-webkit-scrollbar-thumb{background:#2c3a50;border-radius:99px}
.sidebar{background:linear-gradient(180deg,#0c1424 0%,#111b2e 64%,#0c1424 100%);border-right:1px solid rgba(255,255,255,.06);box-shadow:14px 0 38px rgba(15,23,42,.06)}.brand a,.app-shell-game .brand a{display:flex;flex-direction:row;align-items:center;gap:11px;padding:8px 8px 18px}.brand-logo{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:13px;background:rgba(255,255,255,.08);overflow:hidden;border:1px solid rgba(255,255,255,.08)}.brand-logo img{width:100%;height:100%;object-fit:contain}.brand-logo-fallback{background:linear-gradient(145deg,#3b82f6,#1d4ed8);color:#fff;font-size:12px;font-weight:950;letter-spacing:.03em}.brand-copy{display:grid;gap:2px;min-width:0}.brand strong,.app-shell-game .brand strong{font-size:16px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brand small,.app-shell-game .brand small{font-size:10px;line-height:1.2;color:#7f91ab;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-nav{gap:4px}.nav-home,.app-shell-game .nav-home{display:flex;align-items:center;gap:9px;min-height:40px;padding:9px 10px;border-radius:11px;background:transparent;color:#dbe4f1;font-size:12px;font-weight:750}.nav-home:hover,.app-shell-game .nav-home:hover{background:rgba(255,255,255,.075)}.nav-secondary{margin-bottom:7px}.nav-group{margin-top:2px}.nav-group-title,.app-shell-game .nav-group-title{padding:10px 9px 5px;color:#667892;font-size:9px;font-weight:900;letter-spacing:.105em}.nav-game,.app-shell-game .nav-game{position:relative;margin:1px 0;padding:8px 10px 8px 28px;border-radius:10px;color:#aebbd0;font-size:11.5px;line-height:1.25}.nav-game:before{content:"";position:absolute;left:13px;top:50%;width:4px;height:4px;border-radius:50%;background:#52647e;transform:translateY(-50%)}.app-shell-game .nav-game:hover,.nav-game:hover{background:rgba(255,255,255,.055);color:#fff}.app-shell-game .nav-game.is-active,.nav-game.is-active{background:linear-gradient(90deg,rgba(37,99,235,.25),rgba(59,130,246,.10));color:#eff6ff;font-weight:850;box-shadow:inset 2px 0 0 #60a5fa}.app-shell-game .nav-game.is-active:before,.nav-game.is-active:before{background:#93c5fd;box-shadow:0 0 0 3px rgba(147,197,253,.12)}.sidebar-ad{padding:6px}.sidebar-scrim{display:none}
.topbar{min-height:64px;padding:10px 22px;border-bottom:1px solid rgba(226,232,240,.9);background:rgba(248,250,252,.88);backdrop-filter:blur(18px);box-shadow:0 1px 0 rgba(255,255,255,.75)}.site-topbar .topbar-title{display:grid;gap:1px;line-height:1.15}.site-topbar .topbar-title strong{font-size:14px}.site-topbar .topbar-title span{color:#8490a3;font-size:10px}.icon-btn,.help-circle,.focus-circle,.mini-icon-btn{transition:background .15s,border-color .15s,box-shadow .15s,transform .15s}.icon-btn:hover,.help-circle:hover,.focus-circle:hover,.mini-icon-btn:hover{box-shadow:0 4px 14px rgba(15,23,42,.07)}.icon-btn:active,.help-circle:active,.focus-circle:active,.mini-icon-btn:active{transform:translateY(1px)}
.game-topbar{min-height:64px;padding:8px 18px;background:rgba(255,255,255,.94);box-shadow:0 4px 18px rgba(15,23,42,.035)}.game-topbar .icon-btn{width:38px;height:38px;border:1px solid #e3e8ef;background:#fff}.game-topbar-title{max-width:min(320px,27vw);gap:2px}.game-topbar-title span{color:#8290a3;font-size:8.5px;letter-spacing:.11em}.game-topbar-title h1{margin:0;min-width:0;color:#172033;font-size:15px;line-height:1.15;font-weight:900;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-topbar-stats{gap:6px}.stat-chip{min-height:36px;padding:6px 10px;border-color:#e3e8ef;border-radius:11px;background:#f8fafc}.stat-chip span{font-size:8px;color:#8793a5}.stat-chip strong{font-size:12px}.focus-circle,.help-circle,.compact-account-pill{width:36px;height:36px;border-radius:11px;border:1px solid #e3e8ef;background:#fff}.compact-account-pill{display:grid;place-items:center;flex:0 0 auto;color:#334155;font-size:12px;font-weight:900}.compact-account-pill:hover{background:#f8fafc}.focus-circle.is-active{background:#172033;border-color:#172033;color:#fff}
.game-main-content{padding:16px 20px 24px}.game-page-compact{max-width:1260px}.compact-stage{min-height:calc(100dvh - 105px);margin:0;padding:14px 16px 16px;border:1px solid #dfe6ee;border-radius:20px;background:#fff;box-shadow:var(--shadow-md)}.compact-toolbar{min-height:40px;padding:0 2px 11px;border-bottom:1px solid #edf1f5}.game-status-line{gap:9px;color:#344054;font-size:12px}.status-dot{width:8px;height:8px;background:#94a3b8;box-shadow:0 0 0 4px #f1f5f9}.game-page.is-playing .status-dot{background:#22c55e;box-shadow:0 0 0 4px #dcfce7}.game-toolbar-actions{gap:9px}.mini-icon-btn{width:32px;height:32px;border-radius:10px;background:#fbfcfe}.game-timer{min-width:100px;padding:5px 9px;border:1px solid #e6ebf1;border-radius:10px;background:#f8fafc;text-align:center;font-size:16px!important;font-weight:900;color:#101828}
.session-control-bar{min-height:54px;padding:9px 2px;border-bottom:1px solid #edf1f5}.session-config-summary{display:flex;align-items:center;max-width:65%;min-height:30px;padding:5px 9px;border:1px solid #e8edf3;border-radius:9px;background:#f8fafc;color:#667085;font-size:10.5px;font-weight:700}.session-actions{gap:7px}.session-btn,.session-primary{min-height:36px;padding:7px 12px;border-radius:10px;font-size:11px;font-weight:850}.session-btn{border-color:#dfe5ed;background:#fff;color:#344054}.session-btn:hover{background:#f8fafc}.session-primary{padding-left:16px;padding-right:16px;background:linear-gradient(180deg,#2563eb,#1d4ed8);box-shadow:0 5px 14px rgba(37,99,235,.19)}.session-primary:hover{filter:brightness(.985)}
.game-root-wrap{min-height:min(650px,calc(100dvh - 215px));overflow:hidden;border-radius:16px;background:linear-gradient(180deg,#fff 0%,#fcfdff 100%)}.compact-game-root{padding:14px 4px 4px}.session-overlay{padding:22px;background:rgba(244,247,251,.78);backdrop-filter:blur(10px) saturate(.9);border-radius:16px}.session-overlay-card{width:min(440px,100%);padding:26px 24px;border:1px solid rgba(226,232,240,.92);border-radius:21px;background:rgba(255,255,255,.96);box-shadow:0 24px 65px rgba(15,23,42,.14),0 2px 8px rgba(15,23,42,.04)}.session-overlay-kicker{font-size:9px;color:#8190a3;letter-spacing:.14em}.session-overlay-main{margin:9px 0 7px;font-size:clamp(26px,3.4vw,40px);color:#111827}.session-overlay-copy{color:#6b7689;font-size:12px;line-height:1.65}.session-overlay-actions{gap:8px;margin-top:19px}.session-overlay-btn{min-width:118px;min-height:40px;border-radius:11px}.session-overlay[data-kind="paused"]{background:rgba(239,243,248,.84)}.session-overlay[data-kind="countdown"] .session-overlay-card{width:min(330px,100%)}.session-overlay[data-kind="countdown"] .session-overlay-main{font-size:clamp(68px,11vw,116px)}
.compact-result{top:72px;width:min(410px,calc(100% - 28px));padding:22px 22px 19px;border:1px solid #dfe6ef;border-radius:20px;background:rgba(255,255,255,.985);box-shadow:0 28px 80px rgba(15,23,42,.19),0 3px 12px rgba(15,23,42,.06)}.compact-result .result-close{top:10px;right:10px;width:32px;height:32px;border:1px solid #e8edf3;border-radius:10px;background:#f8fafc}.result-kicker{font-size:9px;color:#8490a3}.result-time{font-size:34px}.session-result-actions{justify-content:center;gap:7px;margin-top:13px}.result-action{min-height:38px;padding:8px 12px;border:1px solid #dfe5ed;border-radius:10px;background:#fff;color:#344054;font-weight:800;cursor:pointer}.result-action.primary-lite{border-color:#172033;background:#172033;color:#fff}.session-rank-note{margin-top:11px;border-color:#e3e8ef;border-radius:11px;background:#f8fafc}
.brain-dialog,.game-settings-dialog{border:0;border-radius:21px;box-shadow:0 28px 90px rgba(15,23,42,.25)}.brain-dialog::backdrop,.game-settings-dialog::backdrop{background:rgba(15,23,42,.55);backdrop-filter:blur(5px)}.dialog-head{padding:19px 20px 13px;border-bottom-color:#edf1f5}.dialog-head h2{font-size:19px}.dialog-close{border-radius:10px}.dialog-section{margin-left:20px;margin-right:20px;border-radius:13px;background:#f8fafc}.game-info-details{max-width:840px;margin:14px auto 0;border:1px solid #e3e8ef;border-radius:13px;background:rgba(255,255,255,.8);overflow:hidden}.game-info-details summary{padding:11px 14px;color:#667085;font-size:11px;font-weight:800;cursor:pointer}.game-info-content{padding:0 14px 14px;color:#667085;font-size:12px;line-height:1.65}
/* Home/dashboard polish */
.main-content:not(.game-main-content){max-width:1240px;padding:30px}.home-hero-v3{border:1px solid rgba(255,255,255,.1);border-radius:26px;box-shadow:0 24px 65px rgba(15,23,42,.12)}.summary-tile,.dashboard-panel,.image-game-card,.leaderboard-panel,.profile-panel,.account-card{box-shadow:var(--shadow-sm)}.summary-tile,.dashboard-panel,.image-game-card{border-color:#e2e8f0}.image-game-card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.image-game-card:hover{transform:translateY(-3px);border-color:#cbd5e1;box-shadow:0 15px 35px rgba(15,23,42,.08)}.game-search-box{box-shadow:0 1px 2px rgba(15,23,42,.03)}.game-filter-pills button{transition:.15s}.leaderboard-panel,.profile-panel{border-radius:18px}.realm-summary{box-shadow:var(--shadow-sm)}
/* Mobile navigation */
@media(max-width:900px){body:has(.app-shell:not(.sidebar-collapsed)){overflow:hidden}.sidebar{position:fixed;z-index:80;top:0;bottom:0;left:0;width:min(318px,86vw);height:100dvh;padding:16px 12px;transform:translateX(-104%);transition:transform .2s ease;box-shadow:22px 0 60px rgba(15,23,42,.26)}.app-shell:not(.sidebar-collapsed) .sidebar{transform:translateX(0)}.sidebar-scrim{position:fixed;z-index:70;inset:0;display:block;border:0;background:rgba(15,23,42,.46);backdrop-filter:blur(2px);opacity:0;visibility:hidden;transition:.18s;cursor:default}.app-shell:not(.sidebar-collapsed) .sidebar-scrim{opacity:1;visibility:visible}.app-shell.sidebar-collapsed .brand-copy,.app-shell.sidebar-collapsed .nav-group-title span,.app-shell.sidebar-collapsed .nav-game,.app-shell.sidebar-collapsed .sidebar-ad{display:initial}.game-main-content{padding:12px}.compact-stage{min-height:calc(100dvh - 88px);border-radius:17px;padding:12px}.game-root-wrap{min-height:max(390px,calc(100dvh - 205px))}.session-overlay{border-radius:14px}.main-content:not(.game-main-content){padding:20px 16px}.topbar{padding-left:14px;padding-right:14px}}
@media(max-width:640px){.topbar{min-height:56px;padding:7px 9px}.game-topbar{gap:6px}.game-topbar .icon-btn{width:36px;height:36px}.game-topbar-title{max-width:min(32vw,138px)}.game-topbar-title h1{font-size:12.5px}.game-topbar-title span{display:none}.game-topbar-stats{margin-left:auto}.stat-chip{display:none}.stat-chip:first-child{display:flex;min-height:34px;padding:5px 8px}.stat-chip:first-child span{display:none}.focus-circle{display:none}.help-circle,.compact-account-pill{width:34px;height:34px}.game-main-content{padding:7px}.compact-stage{min-height:calc(100dvh - 70px);padding:9px;border-radius:14px;box-shadow:0 8px 30px rgba(15,23,42,.07)}.compact-toolbar{min-height:36px;padding-bottom:7px}.game-status-line{font-size:11px}.game-timer{min-width:84px;padding:4px 7px;font-size:14px!important}.session-control-bar{min-height:46px;padding:6px 0}.session-config-summary{max-width:48%;padding:4px 7px;font-size:9.5px}.session-actions{gap:5px}.session-btn,.session-primary{min-height:34px;padding:6px 9px;font-size:10.5px}.session-control-bar[data-state="playing"] .session-actions,.session-control-bar[data-state="paused"] .session-actions,.session-control-bar[data-state="countdown"] .session-actions{justify-content:stretch}.session-control-bar[data-state="playing"] .session-actions>button,.session-control-bar[data-state="paused"] .session-actions>button{flex:1}.game-root-wrap{min-height:max(340px,calc(100dvh - 166px));border-radius:12px}.compact-game-root{padding-top:9px}.session-overlay{padding:12px}.session-overlay-card{padding:22px 16px;border-radius:18px}.session-overlay-main{font-size:25px}.session-overlay-actions{display:grid;grid-template-columns:1fr;gap:7px}.session-overlay-btn{width:100%;min-height:42px}.compact-result{position:fixed;z-index:65;top:auto;right:10px;bottom:max(10px,env(safe-area-inset-bottom));left:10px;width:auto;max-height:72dvh;overflow:auto;transform:none;padding:20px 16px;border-radius:20px}.session-result-actions{display:grid;grid-template-columns:1fr 1fr}.session-result-actions .result-action:first-child:last-child{grid-column:1/-1}.game-info-details{margin-top:9px}.main-content:not(.game-main-content){padding:14px 10px}.home-hero-v3{border-radius:20px}.brain-dialog,.game-settings-dialog{border-radius:22px 22px 0 0}}
@media(prefers-reduced-motion:reduce){.sidebar,.sidebar-scrim,.image-game-card{transition:none}}
.app-shell-game{--sidebar:238px}.sidebar-collapsed .brand a{justify-content:center}.sidebar-collapsed .brand-logo{width:42px;height:42px}.sidebar-collapsed .nav-home{justify-content:center}.sidebar-collapsed .nav-home span{display:none}
@media(max-width:900px){.app-shell.sidebar-collapsed .brand a{justify-content:flex-start}.app-shell.sidebar-collapsed .brand-copy{display:grid}.app-shell.sidebar-collapsed .nav-home{justify-content:flex-start}.app-shell.sidebar-collapsed .nav-home span{display:inline}.app-shell.sidebar-collapsed .nav-group-title span{display:inline}.app-shell.sidebar-collapsed .nav-game{display:block}.app-shell.sidebar-collapsed .sidebar-ad{display:block}}
/* v0.4.5.1 — Adaptive community leaderboard */
.community-strip{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:-2px 0 12px;padding:9px 11px;border:1px solid #e5eaf0;border-radius:12px;background:#fff;color:#64748b;font-size:10px}.community-strip span{display:inline-flex;align-items:center;gap:4px;padding-right:8px;border-right:1px solid #edf1f5}.community-strip span:last-child{border-right:0}.community-strip strong{color:#172033;font-size:11px}.community-system-note{color:#7c6f45!important}.rank-row-v2.is-system{background:linear-gradient(90deg,#fbfaf5,#fff);border-radius:10px;border-top-color:transparent;opacity:.88}.rank-row-v2.is-system .rank-no{background:#f5f0df;color:#8a6f2b}.rank-row-v2.is-system .rank-person strong{color:#5f6672}.rank-row-v2.is-system .rank-person small{color:#9a8350}.rank-row-v2.is-system b{color:#6b7280}.rank-row-v2.is-system:hover{opacity:1}
@media(max-width:640px){.community-strip{align-items:flex-start;gap:5px}.community-strip span{border-right:0;padding-right:4px}.community-system-note{width:100%;padding-top:2px}.rank-row-v2.is-system{opacity:.92}}

/* v0.4.5.2 — Sidebar toggle hotfix
   Desktop hamburger now truly hides the navigation instead of leaving a broken icon rail.
   Mobile keeps the existing off-canvas drawer behavior. */
@media(min-width:901px){
  .app-shell{
    transition:grid-template-columns .2s ease;
  }
  .app-shell .sidebar{
    width:var(--sidebar);
    min-width:0;
    transition:transform .2s ease,opacity .16s ease,width .2s ease,padding .2s ease,border-color .2s ease,box-shadow .2s ease;
  }
  .app-shell.sidebar-collapsed{
    grid-template-columns:0 minmax(0,1fr);
  }
  .app-shell.sidebar-collapsed .sidebar{
    width:0;
    padding-left:0;
    padding-right:0;
    border-right-color:transparent;
    box-shadow:none;
    opacity:0;
    transform:translateX(-100%);
    overflow:hidden;
    pointer-events:none;
  }
  .app-shell.sidebar-collapsed .sidebar *{
    pointer-events:none;
  }
  .app-shell.sidebar-collapsed .brand-copy,
  .app-shell.sidebar-collapsed .nav-group-title span,
  .app-shell.sidebar-collapsed .nav-game,
  .app-shell.sidebar-collapsed .sidebar-ad,
  .app-shell.sidebar-collapsed .nav-home span{
    display:initial;
  }
}

/* v0.4.6 — Cultivation Profile */
.progress-page{max-width:1120px;margin:0 auto}.progress-head{margin-bottom:18px}.progress-account-link{display:inline-flex;align-items:center;justify-content:center;padding:9px 12px;border:1px solid #dbe3ed;border-radius:11px;background:#fff;color:#334155;font-size:12px;font-weight:850}.cultivation-wrap{display:grid;gap:14px;margin:0 0 16px}.cultivation-overall{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:18px;align-items:center;padding:20px;border:1px solid #dbe3ed;border-radius:22px;background:linear-gradient(135deg,#fff 0%,#f8fafc 58%,#eef4ff 100%);box-shadow:0 16px 42px rgba(15,23,42,.06);overflow:hidden;position:relative}.cultivation-overall:after{content:"";position:absolute;right:-90px;top:-100px;width:240px;height:240px;border-radius:50%;background:radial-gradient(circle,rgba(59,130,246,.10),rgba(59,130,246,0) 70%);pointer-events:none}.cultivation-emblem{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;width:72px;height:72px;border-radius:22px;background:#111827;color:#fff;font-size:34px;font-weight:900;box-shadow:0 12px 28px rgba(15,23,42,.18)}.cultivation-overall-main{position:relative;z-index:1;min-width:0}.cultivation-overall-main h2{margin:4px 0 7px;font-size:26px;letter-spacing:-.035em}.cultivation-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:#64748b;font-size:12px}.cultivation-meta strong{color:#1e293b}.realm-protected{padding:3px 7px;border-radius:999px;background:#fff7ed;color:#9a3412;font-size:10px;font-weight:850}.cultivation-progress{height:7px;margin:13px 0 8px;border-radius:999px;background:#e2e8f0;overflow:hidden}.cultivation-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#334155,#2563eb)}.cultivation-next{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#64748b;font-size:11px}.cultivation-next b{color:#334155}.cultivation-protection-note{margin:9px 0 0;color:#9a3412;font-size:11px}.cultivation-coverage{position:relative;z-index:1;display:grid;gap:3px;text-align:right}.cultivation-coverage span{font-size:10px;color:#7b8798}.cultivation-coverage strong{font-size:26px;letter-spacing:-.04em}.cultivation-skills{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.cultivation-skill{padding:14px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.035)}.cultivation-skill.is-untrained{background:#fafbfc}.cultivation-skill-head{display:flex;align-items:center;gap:9px}.cultivation-skill-icon{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;background:#f1f5f9;font-size:17px}.cultivation-skill-head>div{display:grid;gap:1px;min-width:0}.cultivation-skill-head strong{font-size:13px}.cultivation-skill-head small{font-size:9px;color:#8a94a3}.cultivation-skill-realm{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;margin-top:13px}.cultivation-skill-realm b{font-size:12px;color:#253047}.cultivation-skill-realm span{font-size:9px;color:#7b8798;text-align:right}.cultivation-skill-realm.muted{display:grid;gap:3px;align-items:start}.cultivation-skill-realm.muted b{color:#94a3b8}.cultivation-skill-bar{height:5px;margin-top:8px;border-radius:999px;background:#edf1f5;overflow:hidden}.cultivation-skill-bar i{display:block;height:100%;border-radius:inherit;background:#475569}.cultivation-rule-note{display:flex;gap:9px;align-items:flex-start;padding:11px 13px;border-radius:13px;background:#f8fafc;border:1px solid #e5eaf0;color:#64748b;font-size:10px;line-height:1.55}.cultivation-rule-note strong{color:#334155;white-space:nowrap}.cultivation-empty{padding:24px;border:1px dashed #cbd5e1;border-radius:20px;background:#fff;text-align:center}.cultivation-empty h2{margin:5px 0 7px;font-size:22px}.cultivation-empty p{max-width:650px;margin:0 auto;color:#667085;line-height:1.6}.cultivation-start,.progress-actions a{display:inline-flex;align-items:center;justify-content:center;margin-top:14px;padding:9px 13px;border-radius:10px;background:#172033;color:#fff;font-size:12px;font-weight:850}.cultivation-empty-page{margin-top:12px}.progress-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.progress-actions a.secondary{background:#fff;color:#334155;border:1px solid #dbe3ed}.guest-progress-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px;padding:12px 14px;border-radius:14px;background:#eef6ff;border:1px solid #d7e8ff}.guest-progress-banner>div{display:grid;gap:2px}.guest-progress-banner strong{font-size:13px}.guest-progress-banner span{font-size:10px;color:#64748b}.guest-progress-banner a{padding:8px 11px;border-radius:9px;background:#172033;color:#fff;font-size:11px;font-weight:800}.profile-page>.cultivation-wrap{margin-top:2px}
@media(max-width:900px){.cultivation-skills{grid-template-columns:repeat(2,minmax(0,1fr))}.cultivation-overall{grid-template-columns:auto minmax(0,1fr)}.cultivation-coverage{grid-column:1/-1;grid-template-columns:1fr auto;align-items:center;text-align:left;padding-top:10px;border-top:1px solid #e8edf3}.cultivation-coverage strong{font-size:20px}}
@media(max-width:640px){.progress-page{padding:0}.cultivation-overall{gap:12px;padding:15px;border-radius:18px}.cultivation-emblem{width:52px;height:52px;border-radius:15px;font-size:24px}.cultivation-overall-main h2{font-size:19px}.cultivation-meta{font-size:10px}.cultivation-next{align-items:flex-start;flex-direction:column;gap:2px}.cultivation-skills{grid-template-columns:1fr}.cultivation-rule-note{display:grid}.cultivation-rule-note strong{white-space:normal}.guest-progress-banner{align-items:flex-start;flex-direction:column}.guest-progress-banner a{width:100%;text-align:center}.progress-account-link{width:100%}}

/* v0.4.7 — Tu Vi & Daily Training */
.training-summary-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,220px);gap:16px;align-items:stretch;margin:14px 0;padding:18px;border:1px solid #e2e8f0;border-radius:20px;background:linear-gradient(145deg,#fff 0%,#fbfdff 64%,#f6f9ff 100%);box-shadow:var(--shadow-sm)}
.training-summary-main{display:grid;align-content:start;gap:8px;min-width:0}.training-summary-main p,.training-summary-card>div>p{margin:0;color:#667085;font-size:11px;line-height:1.55}.training-summary-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.training-summary-title h2{margin:0;font-size:23px;line-height:1.1;color:#182033}.training-summary-title span{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-size:10px;font-weight:850}.training-summary-today{display:grid;align-content:center;justify-items:start;gap:4px;padding:15px 16px;border:1px solid #dbe7f7;border-radius:16px;background:#f7fbff}.training-summary-today>span{font-size:9px;font-weight:900;letter-spacing:.09em;color:#64748b}.training-summary-today>strong{font-size:24px;line-height:1;color:#172033}.training-summary-today>small{font-size:10px;color:#708096}.training-summary-today>a,.training-summary-action{display:inline-flex;align-items:center;justify-content:center;margin-top:7px;padding:8px 10px;border-radius:10px;background:#172033;color:#fff;font-size:10px;font-weight:850}.training-summary-action{justify-self:end;align-self:center;white-space:nowrap}.tuvi-progress{height:7px;border-radius:999px;background:#e9eef5;overflow:hidden}.tuvi-progress>i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#f59e0b,#fb923c);transition:width .3s ease}
.daily-training-page{display:grid;gap:14px}.training-page-head{align-items:flex-start}.training-onboard-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;padding:20px;border:1px solid #dde5ef;border-radius:20px;background:#fff;box-shadow:var(--shadow-sm)}.training-onboard-icon{display:grid;place-items:center;width:50px;height:50px;border-radius:15px;background:#f2f6fb;color:#334155;font-size:24px}.training-onboard-card h2{margin:3px 0 5px;font-size:20px}.training-onboard-card p{margin:0;color:#667085;font-size:11px;line-height:1.55}.training-onboard-card>a{padding:9px 12px;border-radius:10px;background:#172033;color:#fff;font-size:11px;font-weight:850;white-space:nowrap}
.training-hero-card{display:grid;grid-template-columns:1.25fr 1fr 1fr;gap:0;border:1px solid #e2e8f0;border-radius:20px;background:#fff;overflow:hidden;box-shadow:var(--shadow-sm)}.training-hero-card>div{display:grid;align-content:center;gap:5px;min-height:128px;padding:18px}.training-hero-card>div+div{border-left:1px solid #edf1f5}.training-hero-card span{font-size:9px;font-weight:900;letter-spacing:.095em;color:#7b8798}.training-hero-card strong{font-size:24px;line-height:1.08;color:#172033}.training-hero-card small{font-size:10px;line-height:1.45;color:#738096}.training-tuvi-block strong{font-size:31px}.training-tuvi-block .tuvi-progress{margin-top:5px;max-width:390px}.training-streak-block strong{color:#9a3412}
.daily-task-section{padding:18px;border:1px solid #e2e8f0;border-radius:20px;background:#fff;box-shadow:var(--shadow-sm)}.daily-task-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:13px}.daily-task-head h2{margin:3px 0 0;font-size:19px}.daily-task-count{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:10px;font-weight:850;white-space:nowrap}.daily-task-count.is-complete{background:#ecfdf3;color:#067647}.daily-task-list{display:grid;gap:9px}.daily-task-card{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;gap:11px;align-items:center;padding:12px;border:1px solid #e6ebf2;border-radius:15px;background:#fbfcfe}.daily-task-card.is-complete{background:#f5fcf8;border-color:#d7efe0}.daily-task-number{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#172033;color:#fff;font-size:10px;font-weight:900}.daily-task-card.is-complete .daily-task-number{background:#15803d}.daily-task-icon{font-size:22px}.daily-task-card>div{display:grid;gap:2px;min-width:0}.daily-task-card small{font-size:9px;color:#7c8798}.daily-task-card strong{font-size:12px;color:#202a3b}.daily-task-card p{margin:0;color:#718096;font-size:9.5px;line-height:1.4}.daily-task-card>a{padding:8px 10px;border:1px solid #d9e2ee;border-radius:9px;background:#fff;color:#253047;font-size:10px;font-weight:850;white-space:nowrap}.daily-task-card>a:hover{border-color:#b8c7dc;background:#f8fafc}.daily-complete-banner{display:flex;align-items:center;gap:11px;margin-top:12px;padding:12px 14px;border-radius:14px;background:#ecfdf3;border:1px solid #d1fadf}.daily-complete-banner>span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#15803d;color:#fff;font-weight:900}.daily-complete-banner>div{display:grid;gap:2px}.daily-complete-banner strong{font-size:12px;color:#14532d}.daily-complete-banner p{margin:0;color:#4d7c5e;font-size:10px}
.training-rules-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.training-rules-grid article{padding:14px;border:1px solid #e5eaf0;border-radius:15px;background:#f8fafc}.training-rules-grid strong{font-size:11px;color:#293449}.training-rules-grid p{margin:5px 0 0;color:#6c7788;font-size:10px;line-height:1.5}.result-training-reward{display:grid;gap:6px;margin-top:10px;padding:10px 12px;border:1px solid #fed7aa;border-radius:12px;background:#fffaf2;text-align:left}.result-training-reward>strong{font-size:12px;color:#9a3412}.result-training-reward ul{display:grid;gap:2px;margin:0;padding:0;list-style:none}.result-training-reward li{font-size:9.5px;color:#7c4a1f}.result-training-reward small{color:#8a6a4d;font-size:9px}.result-training-reward a{font-size:9.5px;font-weight:850;color:#9a3412}.guest-training-mini{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;padding:8px 9px;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:9.5px}.training-server-cta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding:9px 10px;border:1px solid #dce7f6;border-radius:11px;background:#f7fbff;color:#26364d;font-size:10px;font-weight:850}.training-server-cta:hover{background:#eff6ff;border-color:#c8daf1}.training-server-cta b{color:#2563eb}
@media(max-width:900px){.training-hero-card{grid-template-columns:1fr 1fr}.training-tuvi-block{grid-column:1/-1}.training-hero-card>div+div{border-left:0}.training-streak-block{border-top:1px solid #edf1f5;border-right:1px solid #edf1f5}.training-day-block{border-top:1px solid #edf1f5}.training-rules-grid{grid-template-columns:1fr}.training-summary-card{grid-template-columns:1fr}.training-summary-today{grid-template-columns:1fr auto;align-items:center}.training-summary-today>small,.training-summary-today>a{grid-column:1/-1}.training-summary-action{justify-self:start}}
@media(max-width:640px){.training-summary-card{padding:14px;border-radius:17px}.training-summary-title h2{font-size:20px}.training-summary-today{padding:12px}.training-hero-card{grid-template-columns:1fr;border-radius:17px}.training-hero-card>div{min-height:0;padding:14px}.training-hero-card>div+div,.training-streak-block,.training-day-block{border-left:0;border-right:0;border-top:1px solid #edf1f5}.training-tuvi-block{grid-column:auto}.training-tuvi-block strong{font-size:27px}.training-streak-block strong,.training-day-block strong{font-size:20px}.daily-task-section{padding:13px;border-radius:17px}.daily-task-head{align-items:flex-start;flex-direction:column}.daily-task-card{grid-template-columns:auto auto minmax(0,1fr);gap:9px}.daily-task-card>a{grid-column:1/-1;width:100%;text-align:center}.training-onboard-card{grid-template-columns:auto minmax(0,1fr);padding:15px}.training-onboard-card>a{grid-column:1/-1;text-align:center}.training-page-head{gap:10px}.training-page-head .progress-account-link{width:auto}.result-training-reward{padding:9px}.guest-training-mini{align-items:flex-start;flex-direction:column}}
@media(prefers-reduced-motion:reduce){.tuvi-progress>i{transition:none}}
.result-training-reward>div{display:flex;align-items:center;justify-content:space-between;gap:10px}.result-training-reward>div>span{font-size:8px;font-weight:900;letter-spacing:.09em;color:#a16207}.result-training-reward>div>strong{font-size:20px;color:#c2410c}.result-training-reward>p{display:grid;gap:2px;margin:0}.result-training-reward>p>span{font-size:9.5px;color:#7c4a1f}

/* v0.4.9 — Profile V2 + achievements */
.profile-v2-page{display:grid;gap:14px}.profile-v2-hero{padding:18px;border:1px solid #e2e8f0;border-radius:22px;background:linear-gradient(135deg,#fff 0%,#f8fafc 70%,#f1f5f9 100%);box-shadow:var(--shadow-sm)}.profile-hero-copy{min-width:0;flex:1}.profile-hero-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.profile-hero-tags span{display:inline-flex;align-items:center;padding:5px 8px;border:1px solid #e2e8f0;border-radius:999px;background:#fff;color:#475569;font-size:10px;font-weight:850}.profile-hero-actions{display:grid;gap:7px;margin-left:auto;justify-items:end}.profile-hero-actions>a,.public-profile-hero .profile-hero-actions>a{display:inline-flex;align-items:center;justify-content:center;padding:8px 11px;border:1px solid #dbe3ed;border-radius:10px;background:#fff;color:#334155;font-size:10px;font-weight:850;white-space:nowrap}.profile-v2-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.profile-v2-stats>div{display:grid;align-content:start;gap:3px;min-width:0;padding:14px;border:1px solid #e4e8ef;border-radius:16px;background:#fff}.profile-v2-stats span{font-size:9px;font-weight:900;letter-spacing:.08em;color:#8290a3;text-transform:uppercase}.profile-v2-stats strong{overflow:hidden;color:#1e293b;font-size:17px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.profile-v2-stats small{color:#778397;font-size:9.5px;line-height:1.35}.profile-v2-grid{margin-top:0}.profile-history-total{color:#64748b;font-size:10px;font-weight:850}.profile-settings-panel .check-row span{line-height:1.4}.public-profile-page{display:grid;gap:14px}.public-profile-games{margin-top:0}
.achievement-panel{display:grid;gap:14px;margin:0}.achievement-panel-head{align-items:center}.achievement-summary{display:grid;justify-items:end;min-width:70px}.achievement-summary strong{font-size:22px;line-height:1;color:#172033}.achievement-summary span{margin-top:3px;color:#8490a0;font-size:9px;font-weight:850}.achievement-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.achievement-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;min-width:0;padding:12px;border:1px solid #e5eaf0;border-radius:15px;background:#fff}.achievement-card.is-locked{background:#fafbfc;opacity:.78}.achievement-icon{display:grid;place-items:center;width:38px;height:38px;border:1px solid #e5eaf0;border-radius:12px;background:#f8fafc;font-size:18px}.achievement-card.is-unlocked .achievement-icon{background:#fff7ed;border-color:#fed7aa}.achievement-body{display:grid;align-content:start;gap:4px;min-width:0}.achievement-title-row{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.achievement-title-row strong{color:#263349;font-size:11px;line-height:1.25}.achievement-title-row span{flex:none;padding:2px 5px;border-radius:999px;background:#f1f5f9;color:#7b8798;font-size:7.5px;font-weight:850}.achievement-body p{margin:0;color:#6f7c8f;font-size:9.5px;line-height:1.45}.achievement-body small{color:#8793a3;font-size:8.5px}.achievement-card.is-unlocked .achievement-body small{color:#9a3412;font-weight:800}.achievement-progress{height:4px;margin-top:2px;overflow:hidden;border-radius:999px;background:#e8edf3}.achievement-progress i{display:block;height:100%;border-radius:inherit;background:#64748b}.result-achievements{display:grid;gap:7px;margin-top:9px;padding:10px 12px;border:1px solid #dbeafe;border-radius:12px;background:#f8fbff}.result-achievements>span{font-size:8px;font-weight:900;letter-spacing:.09em;color:#2563eb}.result-achievement-list{display:grid;gap:5px}.result-achievement-item{display:flex;align-items:center;gap:8px}.result-achievement-item>b{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#fff;border:1px solid #dbeafe;font-size:14px}.result-achievement-item>div{display:grid;gap:1px}.result-achievement-item strong{font-size:10px;color:#26364d}.result-achievement-item small{font-size:8.5px;color:#708096}.result-achievements>a{font-size:9px;font-weight:850;color:#2563eb}
@media(max-width:900px){.profile-v2-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.achievement-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-hero-actions{width:100%;margin-left:78px;grid-auto-flow:column;justify-content:start;justify-items:start}}
@media(max-width:640px){.profile-v2-page,.public-profile-page{gap:10px}.profile-v2-hero{padding:14px;border-radius:17px}.profile-hero-actions{width:100%;margin-left:0;grid-auto-flow:row;grid-template-columns:1fr 1fr}.profile-hero-actions>a,.profile-hero-actions form,.profile-hero-actions button{width:100%}.profile-v2-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.profile-v2-stats>div{padding:11px}.profile-v2-stats>div:first-child{grid-column:1/-1}.achievement-grid{grid-template-columns:1fr}.achievement-panel-head{align-items:flex-start}.achievement-summary{justify-items:start}.achievement-card{padding:10px}.achievement-title-row{display:grid;gap:3px;justify-content:start}.achievement-title-row span{justify-self:start}}
.rank-person strong>a,.rank-row>strong>a{color:inherit;text-decoration:none}.rank-person strong>a:hover,.rank-row>strong>a:hover{text-decoration:underline;text-underline-offset:2px}

/* v0.5.0 production accessibility */
:where(a,button,input,select,textarea,[tabindex]):focus-visible{outline:3px solid #93c5fd;outline-offset:3px}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* v0.5.1 — Mobile UI refresh + responsive cleanup */
.mobile-dock,.mobile-topbar-profile,.sidebar-mobile-close,.sidebar-install-btn{display:none}
@media(max-width:900px){
  html,body{max-width:100%;overflow-x:clip}
  html.mobile-nav-open,html.mobile-nav-open body{overflow:hidden;overscroll-behavior:none}
  .sidebar{overscroll-behavior:contain;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom))}
  .sidebar .brand a{padding-right:52px}
  .sidebar-mobile-close{position:absolute;z-index:3;top:max(12px,env(safe-area-inset-top));right:10px;display:grid;place-items:center;width:42px;height:42px;padding:0;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(255,255,255,.08);color:#e5edf8;font-size:24px;line-height:1;cursor:pointer}
  .sidebar-install-btn:not([hidden]){display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin:12px 0 4px;padding:9px 12px;border:1px solid rgba(147,197,253,.18);border-radius:11px;background:rgba(37,99,235,.18);color:#dbeafe;font-size:11px;font-weight:850;cursor:pointer}
  .site-topbar{gap:8px;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
  .site-topbar .topbar-title{min-width:0;flex:1}
  .site-topbar .topbar-title strong,.site-topbar .topbar-title span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .site-topbar .topbar-rank-link,.site-topbar>.account-pill,.site-topbar>.install-btn{display:none!important}
  .mobile-topbar-profile{display:grid;place-items:center;width:40px;height:40px;flex:0 0 40px;border:1px solid #dfe5ed;border-radius:12px;background:#fff;color:#334155;font-size:12px;font-weight:900;box-shadow:0 2px 9px rgba(15,23,42,.04)}
  .mobile-dock{position:fixed;z-index:60;right:0;bottom:0;left:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;padding:6px max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));border-top:1px solid rgba(218,225,234,.96);background:rgba(255,255,255,.96);backdrop-filter:blur(18px) saturate(1.15);box-shadow:0 -10px 30px rgba(15,23,42,.08);transition:transform .18s ease,opacity .18s ease}
  .mobile-dock a{position:relative;display:grid;place-items:center;align-content:center;gap:2px;min-width:0;min-height:52px;border-radius:12px;color:#718096;font-size:18px;font-weight:800;-webkit-tap-highlight-color:transparent}
  .mobile-dock a small{max-width:100%;overflow:hidden;font-size:9px;font-weight:800;line-height:1.15;text-overflow:ellipsis;white-space:nowrap}
  .mobile-dock a.is-active{background:#f1f5f9;color:#172033}
  .mobile-dock a.is-active:before{content:"";position:absolute;top:4px;left:50%;width:18px;height:2px;border-radius:99px;background:#2563eb;transform:translateX(-50%)}
  .mobile-dock-avatar{display:grid;place-items:center;width:23px;height:23px;border-radius:999px;background:#172033;color:#fff;font-size:10px;font-weight:900}
  body.has-mobile-dock .footer{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  body.mobile-keyboard-active .mobile-dock{opacity:0;transform:translateY(115%);pointer-events:none}
  .leaderboard-tabs,.rank-view-tabs{flex-wrap:nowrap;overflow-x:auto;padding:2px 1px 6px;scrollbar-width:none;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
  .leaderboard-tabs::-webkit-scrollbar,.rank-view-tabs::-webkit-scrollbar,.leaderboard-config-list::-webkit-scrollbar{display:none}
  .leaderboard-tabs a,.rank-view-tabs a{flex:0 0 auto;scroll-snap-align:start;min-height:40px;display:inline-flex;align-items:center}
  .leaderboard-config-list{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .leaderboard-config-list a{scroll-snap-align:start}
  .profile-panel,.leaderboard-panel,.daily-task-section,.training-onboard-card,.training-hero-card,.profile-v2-hero{max-width:100%;overflow-wrap:anywhere}
}
@media(max-width:640px){
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),textarea,select{font-size:16px!important}
  .topbar{min-height:58px;padding-top:max(7px,env(safe-area-inset-top));padding-bottom:7px}
  .site-topbar .icon-btn,.mobile-topbar-profile{width:42px;height:42px;flex-basis:42px}
  .site-topbar .topbar-title strong{font-size:13px}.site-topbar .topbar-title span{display:none}
  .main-content:not(.game-main-content){padding:12px 10px 18px}
  .home-hero-copy{padding:10px 2px 2px}.home-hero-copy h1{font-size:clamp(32px,10.5vw,38px);line-height:1.01}.home-hero-copy p{font-size:13.5px;line-height:1.58}
  .home-hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;width:100%;margin-top:15px}.hero-primary,.hero-secondary{min-height:44px;padding:9px 10px;text-align:center}
  .home-hero-media{min-height:200px}.hero-visual-fallback{min-height:200px}.daily-floating-card{left:8px;right:8px;bottom:8px}
  .dashboard-panel{overflow:hidden}.dashboard-summary.home-summary{gap:6px}.summary-tile{min-width:0}.summary-tile em{white-space:normal;line-height:1.25}
  .game-search-box{min-height:46px;border-radius:13px}.game-filter-pills{margin-right:-10px;padding-right:10px}.game-filter-pills button{min-height:38px}
  .footer{gap:10px;padding-left:12px;padding-right:12px;font-size:11px;line-height:1.55}.footer>span:last-child{justify-content:flex-start}
  .account-wrap{padding:4px 0 20px}.account-card{padding:17px 15px;border-radius:17px}.account-head{margin-bottom:16px}.account-head h1{font-size:26px}.account-form{gap:11px}.account-form input[type=text],.account-form input[type=email],.account-form input[type=password],.account-submit{min-height:46px}
  .profile-hero,.leaderboard-head{width:100%;margin-top:2px;margin-bottom:13px}.leaderboard-head{flex-direction:column;align-items:stretch;gap:10px}.leaderboard-head>div{min-width:0}.leaderboard-head h1{font-size:24px}.leaderboard-head p{font-size:12px;line-height:1.5}.play-from-rank{min-height:44px}
  .leaderboard-panel{padding:12px;border-radius:15px}.leaderboard-configs{padding:11px;margin:9px 0 11px;border-radius:14px}.leaderboard-config-head{gap:4px;margin-bottom:8px}.leaderboard-config-list{margin-right:-11px;padding-right:11px}.leaderboard-config-list a{min-width:min(74vw,240px);padding:10px 11px}.leaderboard-selected{align-items:flex-start}.community-strip{padding:8px 9px;border-radius:11px}.rank-row,.rank-row-v2{min-width:0;gap:6px;min-height:50px}.rank-row-v2{grid-template-columns:46px minmax(0,1fr) 78px}.rank-row-v2 .rank-no{min-width:40px;padding:0 4px}.rank-person strong,.rank-person small{max-width:100%}.nearby-head{gap:8px}.nearby-head p{font-size:10px}.nearby-empty{padding:20px 13px}.realm-summary{gap:10px}.realm-main p{line-height:1.45}
  .profile-v2-hero{padding:13px}.profile-hero{gap:11px}.profile-hero-copy{width:calc(100% - 60px)}.profile-hero-actions{grid-template-columns:1fr 1fr;gap:6px}.profile-hero-actions>a,.profile-hero-actions button{min-height:42px}.profile-v2-stats strong{font-size:16px}.profile-panel{padding:13px;border-radius:15px}.profile-history-table>div{gap:7px}
  .achievement-card{grid-template-columns:36px minmax(0,1fr);gap:8px}.achievement-icon{width:36px;height:36px}.achievement-body p{font-size:9.5px;line-height:1.4}
  .training-summary-card,.training-onboard-card,.training-hero-card,.daily-task-section{border-radius:16px}.daily-task-card{padding:10px}.daily-task-card>a{min-height:42px;display:grid;place-items:center}
  .brain-dialog{width:100%;max-width:none;max-height:min(86dvh,760px);margin:auto 0 0;border-radius:22px 22px 0 0}.brain-dialog[open]{animation:brain-sheet-in .16s ease-out}.brain-dialog .dialog-head{padding:16px 16px 11px}.brain-dialog .dialog-lead{margin-left:16px;margin-right:16px}.brain-dialog .dialog-section{margin-left:16px;margin-right:16px}.history-dialog .history-list{padding-left:16px;padding-right:16px;padding-bottom:max(18px,env(safe-area-inset-bottom))}.dialog-close{width:40px;height:40px;flex:0 0 40px}
  .game-topbar{padding-left:max(7px,env(safe-area-inset-left));padding-right:max(7px,env(safe-area-inset-right));padding-top:max(7px,env(safe-area-inset-top));min-height:58px}.game-topbar .icon-btn,.help-circle,.compact-account-pill{width:38px;height:38px;flex-basis:38px}.game-topbar-title{max-width:min(31vw,130px)}
  .compact-result{right:8px;bottom:max(8px,env(safe-area-inset-bottom));left:8px;max-height:76dvh;padding:18px 14px}.compact-result .result-close{width:38px;height:38px}.session-result-actions .result-action{min-height:42px}
  .session-control-bar[data-state="ready"]{align-items:stretch;flex-direction:column;gap:6px}.session-control-bar[data-state="ready"] .session-config-summary{width:100%;max-width:none;min-height:34px}.session-control-bar[data-state="ready"] .session-actions{display:grid;grid-template-columns:minmax(0,1fr) 44px;width:100%}.session-control-bar[data-state="ready"] .session-actions>button{min-height:40px}.session-control-bar[data-state="ready"] .session-settings{width:44px;padding-left:0;padding-right:0}.session-control-bar[data-state="ready"] .session-settings span{display:none}
  .game-info-details summary{min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:8px}.game-info-details summary:after{float:none;margin-left:auto}
  .mobile-dock{padding-top:5px}.mobile-dock a{min-height:50px}.mobile-dock a small{font-size:8.5px}
}
@media(max-width:420px){
  .game-topbar-stats{display:none}.game-topbar-title{max-width:none;flex:1}.game-topbar-title h1{font-size:12.5px}.game-topbar{gap:5px}
  .home-hero-actions{grid-template-columns:1fr}.home-hero-media{min-height:185px}.hero-visual-fallback{min-height:185px}
  .dashboard-summary.home-summary{grid-template-columns:1fr 1fr}.summary-tile{padding:9px}.summary-icon{display:none}.summary-tile strong{font-size:17px}
  .profile-v2-stats{grid-template-columns:1fr 1fr}.profile-v2-stats>div{padding:10px}.profile-hero-actions{grid-template-columns:1fr}
  .leaderboard-tabs a,.rank-view-tabs a{padding-left:10px;padding-right:10px;font-size:11px}
  .rank-row-v2{grid-template-columns:42px minmax(0,1fr) 72px}.rank-row-v2 .rank-no{min-width:36px}.rank-row-v2>b{font-size:10.5px}
  .session-result-actions{grid-template-columns:1fr}.session-result-actions .result-action{grid-column:auto!important}
}
@media(max-width:900px) and (orientation:landscape) and (max-height:520px){
  .game-topbar{min-height:48px;padding-top:5px;padding-bottom:5px}.game-topbar-stats,.focus-circle{display:none}.game-topbar-title{max-width:none;flex:1}.game-main-content{padding:5px 7px}.compact-stage{min-height:calc(100dvh - 57px);padding:7px 9px}.compact-toolbar{min-height:30px;padding-bottom:4px}.game-root-wrap{min-height:max(220px,calc(100dvh - 132px))}.session-control-bar{min-height:38px}.session-overlay-card{padding:14px}.session-overlay-main{font-size:22px}.brain-dialog,.game-settings-dialog{max-height:92dvh}
}
@media(hover:none){.image-game-card:hover,.game-card:hover,.dashboard-game-card:hover{transform:none}.icon-btn:hover,.help-circle:hover,.focus-circle:hover,.mini-icon-btn:hover{box-shadow:none}}
@media(max-width:900px){.app-shell.sidebar-collapsed .sidebar{visibility:hidden;pointer-events:none}.app-shell:not(.sidebar-collapsed) .sidebar{visibility:visible;pointer-events:auto}}

/* v0.5.1.2 — Mobile Home Layout Fix */
@media(max-width:640px){
  html,body{max-width:100%;overflow-x:hidden}
  .main-wrap,.main-content,.brain-dashboard,.brain-home-v3,.brain-home-v3>*,.dashboard-grid,.dashboard-grid>*,.home-game-library,.home-game-library>*{min-width:0;max-width:100%}
  .main-wrap{width:100%}
  .main-content:not(.game-main-content){width:100%;padding:10px 10px calc(82px + env(safe-area-inset-bottom))}
  .brain-home-v3{width:100%;gap:12px;overflow:visible}

  /* Hero: prevent oversized typography and horizontal stretching. */
  .home-hero-v3{width:100%;min-width:0;grid-template-columns:minmax(0,1fr);gap:10px;border-radius:18px;overflow:hidden}
  .home-hero-copy{min-width:0;min-height:0;padding:15px 14px 9px}
  .home-overline{font-size:9px;line-height:1.35;letter-spacing:.12em}
  .home-hero-copy h1{max-width:100%;margin:8px 0 10px;font-size:clamp(28px,8.3vw,34px);line-height:1.04;letter-spacing:-.045em;overflow-wrap:break-word}
  .home-hero-copy p{max-width:100%;font-size:13px;line-height:1.52;overflow-wrap:anywhere}
  .home-hero-actions{grid-template-columns:minmax(0,1fr);gap:7px;margin-top:13px}
  .hero-primary,.hero-secondary{width:100%;min-width:0;min-height:44px;padding:10px 12px}
  .home-hero-media{width:100%;min-width:0;min-height:0;aspect-ratio:16/9;border-radius:0 0 18px 18px}
  .home-hero-media>img{position:absolute;inset:0}
  .hero-visual-fallback{min-height:0;height:100%;aspect-ratio:16/9;gap:5px}
  .hero-visual-fallback span{font-size:46px}.hero-visual-fallback strong{font-size:15px}.hero-visual-fallback small{font-size:10px}
  .daily-floating-card{left:8px;right:8px;bottom:8px;min-width:0;padding:9px 10px;border-radius:11px}
  .daily-floating-card strong,.daily-floating-card small{white-space:normal;overflow-wrap:anywhere}

  /* Summary: always stays inside the viewport. */
  .dashboard-summary.home-summary{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .home-summary .summary-tile{min-width:0;min-height:78px;padding:10px;border-radius:13px;gap:8px;overflow:hidden}
  .home-summary .summary-icon{width:31px;height:31px;flex:0 0 31px}
  .home-summary .summary-tile div{min-width:0}
  .home-summary .summary-tile small,.home-summary .summary-tile em{max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .home-summary .summary-tile strong{max-width:100%;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  .dashboard-panel{width:100%;min-width:0;padding:13px;border-radius:15px;overflow:hidden}
  .panel-head{min-width:0;gap:8px}.panel-head>div{min-width:0}.panel-head h2{font-size:17px;overflow-wrap:anywhere}

  /* Keep all seven days visible instead of making the whole dashboard wider. */
  .week-chart{width:100%;min-width:0;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;height:142px;padding-top:2px;overflow:hidden}
  .week-column{min-width:0;gap:2px}
  .week-bar-track{width:100%;height:96px;border-radius:7px}
  .week-bar{width:min(72%,26px)}
  .week-bar span{font-size:8px;top:-15px}
  .week-column strong{min-width:0;font-size:8px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:clip}
  .week-column small{font-size:7.5px;white-space:nowrap}
  .skill-label{min-width:0}.skill-label strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  /* Library header must collapse to one column on phones. */
  .home-game-library{width:100%;min-width:0;padding-top:2px;overflow:visible}
  .home-game-library .dashboard-section-head{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;width:100%;min-width:0;margin:9px 0 12px}
  .home-game-library .dashboard-section-head>div{min-width:0;width:100%}
  .home-game-library .dashboard-section-head h2{margin:3px 0 5px;font-size:27px;line-height:1.05;letter-spacing:-.035em}
  .home-game-library .dashboard-section-head p{max-width:100%;margin:0;font-size:12.5px;line-height:1.5;overflow-wrap:anywhere}
  .home-game-library .dashboard-continue{width:100%;min-width:0;max-width:100%;padding:11px 12px}
  .home-game-library .dashboard-continue strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  .game-library-tools{width:100%;min-width:0;gap:8px;margin:8px 0 13px}
  .game-search-box{width:100%;min-width:0;max-width:100%;flex:0 0 auto}
  .game-filter-pills{width:100%;max-width:100%;margin:0;padding:2px 0 5px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
  .game-filter-pills button{flex:0 0 auto;scroll-snap-align:start}

  .dashboard-category{width:100%;min-width:0;margin:16px 0 20px}
  .dashboard-category-head{min-width:0}.dashboard-category-head div{min-width:0}.dashboard-category-head strong{overflow-wrap:anywhere}
  .image-game-grid{width:100%;min-width:0;grid-template-columns:minmax(0,1fr);gap:9px}

  /* Mobile cards use compact horizontal media instead of a huge 16:9 block. */
  .image-game-card{width:100%;min-width:0;min-height:112px;grid-template-columns:112px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;align-items:stretch!important;contain-intrinsic-size:112px!important;border-radius:14px}
  .image-game-card .game-card-media{grid-column:1;grid-row:1/3;width:112px;height:100%;min-height:112px;aspect-ratio:auto;border-right:1px solid #edf0f4}
  .image-game-card .game-card-fallback{width:100%;height:100%;min-height:112px;font-size:32px}
  .image-game-card .dashboard-game-copy{grid-column:2;grid-row:1;min-width:0;padding:12px 11px 3px;align-content:start}
  .image-game-card .dashboard-game-copy small{font-size:8.5px}
  .image-game-card .dashboard-game-copy strong{font-size:14px;line-height:1.2;overflow-wrap:anywhere}
  .image-game-card .dashboard-game-copy span{min-height:0;font-size:10.5px;line-height:1.4;-webkit-line-clamp:2}
  .image-game-card>b{grid-column:2;grid-row:2;padding:3px 11px 11px;font-size:11px}

  .footer{max-width:100%;overflow-wrap:anywhere}
}
@media(max-width:380px){
  .main-content:not(.game-main-content){padding-left:8px;padding-right:8px}
  .home-hero-copy{padding-left:12px;padding-right:12px}
  .home-hero-copy h1{font-size:clamp(27px,8.7vw,32px)}
  .home-summary .summary-icon{display:none}
  .home-summary .summary-tile{min-height:72px;padding:9px}
  .image-game-card{grid-template-columns:96px minmax(0,1fr)!important;min-height:104px}
  .image-game-card .game-card-media{width:96px;min-height:104px}
  .image-game-card .game-card-fallback{min-height:104px;font-size:28px}
  .home-game-library .dashboard-section-head h2{font-size:25px}
}
.week-label-mobile{display:none}
@media(max-width:640px){.week-label-full{display:none}.week-label-mobile{display:inline}}

/* v0.5.1.3 — Mobile QA across the full public UI */
@media(max-width:900px){
  html{min-height:100%;scroll-padding-bottom:calc(78px + env(safe-area-inset-bottom))}
  body,.app-shell,.main-wrap{min-height:100dvh}
  body{width:100%;max-width:100%;overflow-x:clip}
  .app-shell,.main-wrap,.main-content{width:100%;min-width:0;max-width:100%}
  .sidebar{height:100dvh;max-height:100dvh;padding-bottom:max(18px,env(safe-area-inset-bottom));overscroll-behavior:contain}
  .sidebar .brand,.sidebar .game-nav,.sidebar .nav-group,.sidebar .nav-home,.sidebar .nav-game{min-width:0}
  .sidebar .nav-game,.sidebar .nav-home span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .sidebar-scrim{touch-action:none}
  img,video,canvas,svg{max-width:100%}
  .main-content :where(section,article,div,form,nav,header,footer){min-width:0}
  body.has-mobile-dock .main-content:not(.game-main-content){padding-bottom:calc(86px + env(safe-area-inset-bottom))}
  body.mobile-dialog-open .mobile-dock{opacity:0;transform:translateY(115%);pointer-events:none}
  [id]{scroll-margin-top:76px}
}

@media(max-width:640px){
  /* Shared typography/content guards: long names, e-mails and generated labels must not widen the viewport. */
  .main-content :where(h1,h2,h3,p,strong,small,span,a,label){overflow-wrap:anywhere}
  .main-content :where(pre,code){max-width:100%;overflow:auto}
  button,input,textarea,select{max-width:100%}

  /* Account flows */
  .account-wrap{width:100%;min-width:0;padding:2px 0 16px}
  .account-card,.account-card-wide{width:100%;max-width:520px;min-width:0;padding:17px 14px;border-radius:16px}
  .account-form,.account-form label{min-width:0}
  .account-form input[type=text],.account-form input[type=email],.account-form input[type=password],.account-form select,.account-form textarea{width:100%;min-width:0}
  .account-form .primary,.account-submit,.account-primary-link{width:100%;min-height:46px;justify-content:center;text-align:center}
  .account-alt{justify-content:flex-start}
  .account-switch{line-height:1.5}
  .form-alert{overflow-wrap:anywhere}
  .email-verify-panel{min-width:0}
  .email-verify-panel button{width:100%;min-height:44px}

  /* Daily training */
  .daily-training-page,.training-summary-card,.training-onboard-card,.training-hero-card,.daily-task-section,.training-rules-grid{width:100%;min-width:0;max-width:100%}
  .training-page-head .progress-account-link{width:100%;min-height:44px}
  .training-onboard-card{grid-template-columns:42px minmax(0,1fr);gap:10px;padding:13px}
  .training-onboard-icon{width:42px;height:42px;border-radius:12px;font-size:20px}
  .training-onboard-card h2{font-size:18px}
  .training-onboard-card>a{grid-column:1/-1;width:100%;min-height:42px;display:grid;place-items:center}
  .training-hero-card>div{padding:13px}
  .training-summary-today{min-width:0}
  .training-summary-today>a,.training-summary-action{min-height:42px}
  .daily-task-card{width:100%;min-width:0;grid-template-columns:28px 28px minmax(0,1fr);gap:8px;padding:10px}
  .daily-task-number{width:28px;height:28px}
  .daily-task-icon{font-size:19px;text-align:center}
  .daily-task-card>div{overflow:hidden}
  .daily-task-card strong,.daily-task-card p,.daily-task-card small{max-width:100%}
  .daily-task-card>a{grid-column:1/-1;width:100%;min-height:42px;display:grid;place-items:center}
  .daily-complete-banner{align-items:flex-start}
  .daily-complete-banner>div{min-width:0}
  .training-server-cta{align-items:flex-start;flex-direction:column}
  .guest-progress-banner{width:100%;min-width:0}

  /* Progress / cultivation */
  .progress-page,.cultivation-wrap,.cultivation-overall,.cultivation-skills,.cultivation-skill{width:100%;min-width:0;max-width:100%}
  .cultivation-overall{grid-template-columns:48px minmax(0,1fr);gap:10px;padding:13px}
  .cultivation-emblem{width:48px;height:48px;border-radius:14px;font-size:22px}
  .cultivation-overall-main h2{font-size:18px}
  .cultivation-coverage{grid-column:1/-1;width:100%}
  .cultivation-next{min-width:0}
  .cultivation-skill-head>div,.cultivation-skill-realm{min-width:0}
  .cultivation-skill-realm b,.cultivation-skill-realm span{overflow-wrap:anywhere}
  .progress-actions{display:grid;grid-template-columns:1fr;width:100%}
  .progress-actions a{width:100%;min-height:44px;margin-top:0}

  /* Profile V2 */
  .profile-page,.profile-v2-page,.public-profile-page,.profile-v2-hero,.profile-panel,.profile-v2-stats{width:100%;min-width:0;max-width:100%}
  .profile-v2-hero{display:grid;grid-template-columns:48px minmax(0,1fr);gap:10px;padding:13px}
  .profile-avatar{width:48px;height:48px}
  .profile-hero-copy{width:auto;min-width:0}
  .profile-hero-copy h1{font-size:22px}
  .profile-hero-tags{grid-column:1/-1}
  .profile-hero-tags span{max-width:100%;white-space:normal}
  .profile-hero-actions{grid-column:1/-1;width:100%;margin:0;grid-template-columns:1fr;grid-auto-flow:row}
  .profile-hero-actions>a,.profile-hero-actions form,.profile-hero-actions button{width:100%;min-width:0;min-height:42px}
  .profile-v2-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .profile-v2-stats>div:first-child{grid-column:1/-1}
  .profile-v2-stats strong{white-space:normal;overflow:visible;text-overflow:clip}
  .profile-panel-head{align-items:flex-start;flex-direction:column}
  .profile-panel-head>*{min-width:0;max-width:100%}
  .profile-game-list>a{min-width:0}
  .profile-game-list>a>span:first-child{min-width:0;overflow:hidden}
  .profile-game-list strong,.profile-game-list small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .profile-game-metric{flex:0 0 auto}
  .profile-history-table>div{min-width:0;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px}
  .profile-history-table a{min-width:0;overflow:hidden}
  .profile-history-table a>*{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .profile-history-table>div>span{grid-column:1/-1;overflow-wrap:anywhere}
  .achievement-panel-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
  .achievement-summary{min-width:0;justify-items:end}
  .achievement-card,.achievement-body,.achievement-title-row{min-width:0}

  /* Leaderboards */
  .leaderboard-page,.leaderboard-layout,.leaderboard-panel,.leaderboard-configs,.rank-list{width:100%;min-width:0;max-width:100%}
  .leaderboard-tabs,.rank-view-tabs,.leaderboard-config-list{max-width:100%;overscroll-behavior-inline:contain}
  .leaderboard-tabs a,.rank-view-tabs a{min-height:42px}
  .leaderboard-config-list{margin-left:0}
  .leaderboard-config-list a{min-width:min(78vw,250px);max-width:min(78vw,250px)}
  .leaderboard-selected{width:100%;min-width:0;overflow-wrap:anywhere}
  .community-strip,.realm-summary{width:100%;min-width:0;max-width:100%}
  .rank-row,.rank-row-v2{width:100%;max-width:100%;overflow:hidden}
  .rank-person{min-width:0;overflow:hidden}
  .rank-person strong,.rank-person small,.rank-row>strong,.rank-row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .rank-row-v2{grid-template-columns:42px minmax(0,1fr) 72px}
  .rank-row-v2 .rank-no{min-width:36px}
  .nearby-head{align-items:flex-start;flex-direction:column}
  .nearby-head>*{min-width:0;max-width:100%}

  /* Game route */
  body.is-game-route,.app-shell-game,.app-shell-game .main-wrap{height:auto;min-height:100dvh;overflow-x:clip}
  .game-main-content{width:100%;min-width:0;padding:6px max(6px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}
  .game-page,.game-page-compact,.compact-stage,.game-root-wrap,.compact-game-root{width:100%;min-width:0;max-width:100%}
  .compact-stage{min-height:calc(100dvh - 68px);padding:8px}
  .game-toolbar,.session-control-bar,.session-actions{min-width:0}
  .game-status-line{min-width:0;overflow:hidden}
  .game-status-line strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .game-toolbar-actions{flex:0 0 auto}
  .session-config-summary{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .session-control-bar[data-state="playing"],.session-control-bar[data-state="paused"],.session-control-bar[data-state="countdown"]{gap:6px}
  .session-control-bar[data-state="playing"] .session-config-summary,.session-control-bar[data-state="paused"] .session-config-summary,.session-control-bar[data-state="countdown"] .session-config-summary{flex:1;max-width:38%}
  .session-control-bar[data-state="playing"] .session-actions,.session-control-bar[data-state="paused"] .session-actions,.session-control-bar[data-state="countdown"] .session-actions{min-width:0;flex:1}
  .session-control-bar[data-state="playing"] .session-actions>button,.session-control-bar[data-state="paused"] .session-actions>button,.session-control-bar[data-state="countdown"] .session-actions>button{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .game-root-wrap{min-height:max(320px,calc(100dvh - 162px));overflow:hidden}
  .compact-game-root{min-height:0}
  .session-overlay{inset:0;max-width:100%;overflow:auto;overscroll-behavior:contain}
  .session-overlay-card{max-width:100%}
  .session-overlay-copy{overflow-wrap:anywhere}
  .compact-result{right:max(7px,env(safe-area-inset-right));bottom:max(7px,env(safe-area-inset-bottom));left:max(7px,env(safe-area-inset-left));max-height:min(78dvh,680px);overscroll-behavior:contain}
  .result-rank-box,.result-training-reward,.result-achievements{max-width:100%;overflow-wrap:anywhere}
  .game-info-details{width:100%;max-width:100%}
  .game-info-content{overflow-wrap:anywhere}
  .brain-dialog,.game-settings-dialog{max-width:100vw;max-height:calc(100dvh - max(8px,env(safe-area-inset-top)));overscroll-behavior:contain}
  .history-list>div{min-width:0;align-items:flex-start;flex-wrap:wrap}
  .history-list>div>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
}

@media(max-width:380px){
  .main-content:not(.game-main-content){padding-left:8px;padding-right:8px}
  .account-card,.account-card-wide,.profile-panel,.leaderboard-panel,.daily-task-section{padding-left:11px;padding-right:11px}
  .profile-v2-stats{grid-template-columns:1fr}
  .profile-v2-stats>div:first-child{grid-column:auto}
  .achievement-panel-head{grid-template-columns:1fr}
  .achievement-summary{justify-items:start}
  .rank-row-v2{grid-template-columns:38px minmax(0,1fr) 64px}
  .rank-row-v2 .rank-no{min-width:32px}
  .game-topbar{gap:4px}
  .game-topbar .icon-btn,.help-circle,.compact-account-pill{width:36px;height:36px;flex-basis:36px}
  .game-topbar-title h1{font-size:12px}
  .session-control-bar[data-state="playing"],.session-control-bar[data-state="paused"],.session-control-bar[data-state="countdown"]{align-items:stretch;flex-direction:column}
  .session-control-bar[data-state="playing"] .session-config-summary,.session-control-bar[data-state="paused"] .session-config-summary,.session-control-bar[data-state="countdown"] .session-config-summary{width:100%;max-width:none}
  .session-control-bar[data-state="playing"] .session-actions,.session-control-bar[data-state="paused"] .session-actions,.session-control-bar[data-state="countdown"] .session-actions{width:100%}
  .daily-complete-banner{flex-direction:column}
}

@media(max-width:900px) and (orientation:landscape) and (max-height:520px){
  body.has-mobile-dock .main-content:not(.game-main-content){padding-bottom:calc(72px + env(safe-area-inset-bottom))}
  .mobile-dock{padding-top:3px;padding-bottom:max(3px,env(safe-area-inset-bottom))}
  .mobile-dock a{min-height:43px}
  .mobile-dock a small{font-size:8px}
  .game-main-content{padding-top:4px;padding-bottom:4px}
  .compact-stage{min-height:calc(100dvh - 54px)}
  .game-root-wrap{min-height:max(190px,calc(100dvh - 122px))}
  .session-overlay{padding:8px}
  .session-overlay-card{padding:12px}
  .compact-result{max-height:88dvh}
}
@media(max-width:900px){body:has(dialog[open]) .mobile-dock{opacity:0;transform:translateY(115%);pointer-events:none}}

/* v0.5.2 — Daily & Retention V2 */
.home-smart-next{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;border:1px solid #dce6f2;border-radius:20px;background:linear-gradient(135deg,#f8fbff,#fff);box-shadow:var(--shadow-sm)}
.home-smart-next>div{display:grid;gap:3px;min-width:0}.home-smart-next>div strong{font-size:15px;color:#172033}.home-smart-next>div small{font-size:10px;color:#758195}
.home-smart-next>a{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;min-width:260px;padding:11px 13px;border-radius:14px;background:#172033;color:#fff}.home-smart-next>a>span{font-size:21px}.home-smart-next>a b{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-smart-next>a em{font-style:normal;font-size:10px;font-weight:850;color:#dbeafe}
.retention-v2-page{gap:16px}.retention-today-hero{display:grid;grid-template-columns:minmax(0,1fr) 160px;gap:20px;align-items:center;padding:20px;border:1px solid #dce6f2;border-radius:22px;background:linear-gradient(135deg,#172033 0%,#22324b 100%);color:#fff;box-shadow:var(--shadow-sm)}
.retention-today-copy{display:grid;gap:7px;min-width:0}.retention-today-copy .account-kicker{color:#9db4d1}.retention-today-copy h2{margin:0;font-size:24px;line-height:1.15;color:#fff}.retention-today-copy>p{margin:0;color:#c7d2e2;font-size:11px;line-height:1.55}
.retention-primary-cta{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;margin-top:7px;padding:11px 12px;border:1px solid rgba(255,255,255,.16);border-radius:14px;background:rgba(255,255,255,.09);color:#fff}.retention-primary-cta>span{font-size:24px}.retention-primary-cta>div{display:grid;gap:2px;min-width:0}.retention-primary-cta small{font-size:9px;color:#a8bad0}.retention-primary-cta strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.retention-primary-cta>b{font-size:10px;white-space:nowrap;color:#bfdbfe}
.retention-progress-ring{--retention-progress:0%;display:grid;place-items:center;width:132px;height:132px;border-radius:50%;background:conic-gradient(#60a5fa var(--retention-progress),rgba(255,255,255,.11) 0);padding:9px;justify-self:end}.retention-progress-ring:before{content:"";grid-area:1/1;width:100%;height:100%;border-radius:50%;background:#172033}.retention-progress-ring>div{grid-area:1/1;z-index:1;display:grid;place-items:center;gap:1px}.retention-progress-ring strong{font-size:24px}.retention-progress-ring span{font-size:9px;color:#b8c6d9}
.daily-task-explain{margin:5px 0 0;color:#728096;font-size:10px;line-height:1.5;max-width:650px}
.weekly-retention-section{display:grid;gap:15px;padding:18px;border:1px solid #e2e8f0;border-radius:20px;background:#fff;box-shadow:var(--shadow-sm)}.weekly-retention-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.weekly-retention-head h2{margin:3px 0 2px;font-size:19px}.weekly-retention-head p{margin:0;color:#7a8798;font-size:10px}.weekly-focus-badge{display:inline-flex;align-items:center;gap:5px;padding:7px 10px;border-radius:999px;background:#fff7ed;color:#9a3412;font-size:10px;font-weight:850;white-space:nowrap}
.weekly-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.weekly-metric-grid article{display:grid;gap:3px;padding:12px;border:1px solid #e8edf3;border-radius:14px;background:#fbfcfe}.weekly-metric-grid span{font-size:9px;font-weight:800;color:#7a8798}.weekly-metric-grid strong{font-size:19px;color:#1f2937}.weekly-metric-grid small{font-size:8.5px;color:#8792a2;line-height:1.35}
.weekly-day-chart{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;min-height:118px}.weekly-day-column{display:grid;grid-template-rows:1fr auto auto;gap:4px;min-width:0;text-align:center}.weekly-day-track{display:flex;align-items:flex-end;justify-content:center;min-height:76px;border-radius:10px;background:#f5f7fa;overflow:hidden}.weekly-day-track i{display:block;width:52%;min-height:3px;border-radius:6px 6px 2px 2px;background:#41536b}.weekly-day-column strong{font-size:9px;color:#4c5b6e}.weekly-day-column small{font-size:8px;color:#98a2b3}
.weekly-skill-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.weekly-skill-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;padding:9px 10px;border-radius:11px;background:#f8fafc}.weekly-skill-row span{font-size:16px}.weekly-skill-row strong{font-size:10px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weekly-skill-row em{font-style:normal;font-size:9px;color:#7a8798;white-space:nowrap}
.retention-rules-grid{margin-bottom:2px}
@media(max-width:760px){.home-smart-next{align-items:stretch;flex-direction:column;padding:14px}.home-smart-next>a{min-width:0;width:100%}.retention-today-hero{grid-template-columns:minmax(0,1fr) 118px;padding:16px}.retention-progress-ring{width:106px;height:106px}.weekly-metric-grid{grid-template-columns:1fr 1fr}.weekly-skill-grid{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.retention-today-hero{grid-template-columns:1fr;gap:14px;padding:14px;border-radius:18px}.retention-progress-ring{justify-self:start;width:92px;height:92px}.retention-progress-ring strong{font-size:19px}.retention-today-copy h2{font-size:21px}.retention-primary-cta{grid-template-columns:auto minmax(0,1fr)}.retention-primary-cta>b{grid-column:1/-1;padding-left:34px}.weekly-retention-section{padding:13px;border-radius:17px}.weekly-retention-head{flex-direction:column}.weekly-focus-badge{white-space:normal}.weekly-day-chart{gap:3px}.weekly-day-track{min-height:64px}.weekly-day-track i{width:60%}.weekly-metric-grid{gap:7px}.weekly-metric-grid article{padding:10px}.weekly-metric-grid strong{font-size:17px}.weekly-skill-grid{grid-template-columns:1fr}.weekly-skill-row{padding:8px 9px}}
@media(max-width:360px){.weekly-metric-grid{grid-template-columns:1fr}.weekly-day-column small{display:none}.weekly-day-track{min-height:58px}.home-smart-next>a{grid-template-columns:auto minmax(0,1fr)}.home-smart-next>a em{grid-column:1/-1;padding-left:30px}}

/* v0.5.3 — Game UX V2 */
.game-settings-dialog .setting-note{margin:8px 0 0;color:#7b8798;font-size:11px;line-height:1.5}.choice-hotkey{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-right:6px;border:1px solid #d8e0e9;border-radius:5px;background:#f8fafc;color:#8490a3;font-size:9px;font-weight:900;vertical-align:1px}.compact-choices button.choice-correct .choice-hotkey{border-color:#86efac;background:#dcfce7;color:#166534}.compact-choices button.choice-wrong .choice-hotkey{border-color:#fda4af;background:#ffe4e6;color:#9f1239}.result-coach{margin:12px 0 2px;padding:11px 12px;border:1px solid #dfe6ef;border-radius:12px;background:#f8fafc;text-align:left}.result-coach>span{display:block;margin-bottom:3px;color:#7c8798;font-size:9px;font-weight:900;letter-spacing:.1em}.result-coach>strong{display:block;color:#253044;font-size:13px}.result-coach>p{margin:4px 0 0!important;color:#667085!important;font-size:11.5px!important;line-height:1.45}.memory-cell.memory-missed{background:#fff7ed!important;border-color:#fdba74!important;box-shadow:inset 0 0 0 2px rgba(249,115,22,.18)}
@media(max-width:640px){.choice-hotkey{display:none}.game-settings-dialog .setting-note{font-size:12px}.result-coach{margin-top:10px;padding:10px 11px}.result-coach>p{font-size:11px!important}}

/* v0.5.4 — Profile & Sharing V2 */
.profile-showcase-panel{display:grid;gap:14px}.showcase-headline{margin-top:5px!important;color:#334155!important;font-size:13px!important;font-weight:700}.showcase-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.showcase-game,.showcase-badges{display:grid;gap:9px;min-width:0;padding:14px;border:1px solid #e5eaf0;border-radius:15px;background:#fafcff}.showcase-game>span,.showcase-badges>span{font-size:8.5px;font-weight:900;letter-spacing:.1em;color:#8390a2}.showcase-game>a{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;color:#172033}.showcase-game>a strong{font-size:14px}.showcase-game>a small{grid-column:1;color:#7b8798;font-size:9.5px}.showcase-game>a b{grid-column:2;grid-row:1/3;align-self:center;color:#2563eb;font-size:10px}.showcase-game>p,.showcase-badges>p{margin:0;color:#7b8798;font-size:11px}.showcase-badge-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.showcase-badge-list>div{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px;align-items:center;min-width:0;padding:8px;border:1px solid #edf1f5;border-radius:11px;background:#fff}.showcase-badge-list>div>b{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#fff7ed;font-size:15px}.showcase-badge-list>div>span{display:grid;gap:1px;min-width:0}.showcase-badge-list strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:#344054}.showcase-badge-list small{font-size:7.5px;color:#98a2b3}
.share-profile-panel{display:grid;gap:14px}.share-card-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(220px,.7fr);gap:14px;align-items:start}.profile-share-canvas{display:block;width:100%;height:auto;border:1px solid #dfe6ef;border-radius:16px;background:#101827;box-shadow:var(--shadow-sm)}.share-card-actions{display:grid;gap:9px}.share-card-actions label{display:grid;gap:5px;color:#475569;font-size:10px;font-weight:800}.share-card-actions select,.showcase-settings-form select{width:100%;min-height:42px;border:1px solid #d9e0e8;border-radius:10px;padding:8px 10px;background:#fff;color:#172033;font:inherit}.share-card-actions button{min-height:42px;border:0;border-radius:10px;background:#172033;color:#fff;font-weight:850;cursor:pointer}.share-card-actions button.secondary{border:1px solid #dbe3ed;background:#fff;color:#334155}.share-card-actions p{min-height:18px;margin:0;color:#64748b;font-size:9px;line-height:1.4}.share-private-note{padding:9px 10px;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:9px;line-height:1.45}.showcase-settings-panel{display:grid;gap:14px}.showcase-settings-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.showcase-settings-form>label:first-of-type,.showcase-badge-picker{grid-column:1/-1}.showcase-settings-form button{justify-self:start;align-self:end;min-height:42px;border:0;border-radius:10px;padding:9px 14px;background:#172033;color:#fff;font-weight:850;cursor:pointer}.showcase-badge-picker{margin:0;padding:12px;border:1px solid #e5eaf0;border-radius:14px}.showcase-badge-picker legend{padding:0 6px;color:#344054;font-size:11px;font-weight:850}.showcase-badge-picker legend small{color:#98a2b3;font-weight:650}.showcase-badge-picker>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.showcase-badge-picker label{display:flex!important;align-items:center;gap:7px!important;min-width:0;padding:8px;border:1px solid #edf1f5;border-radius:10px;background:#fff;cursor:pointer}.showcase-badge-picker label:has(input:checked){border-color:#93c5fd;background:#eff6ff}.showcase-badge-picker input{flex:0 0 auto}.showcase-badge-picker label>span{display:flex;align-items:center;gap:6px;min-width:0}.showcase-badge-picker label b{font-size:16px}.showcase-badge-picker label strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px}.showcase-badge-picker input:disabled+span{opacity:.45}
@media(max-width:760px){.showcase-grid,.share-card-layout{grid-template-columns:1fr}.showcase-settings-form{grid-template-columns:1fr}.showcase-settings-form>label:first-of-type,.showcase-badge-picker{grid-column:auto}.showcase-badge-picker>div{grid-template-columns:repeat(2,minmax(0,1fr))}.share-card-actions{grid-template-columns:1fr 1fr}.share-card-actions label,.share-card-actions p,.share-private-note{grid-column:1/-1}}
@media(max-width:520px){.showcase-badge-list{grid-template-columns:1fr}.showcase-badge-picker>div{grid-template-columns:1fr}.share-card-actions{grid-template-columns:1fr}.share-card-actions>*{grid-column:auto!important}.showcase-game,.showcase-badges{padding:11px}.profile-share-canvas{border-radius:12px}}


/* v0.6.0 — Focus Mode layout hardening
   Keep the gameplay workspace in the only grid track even when an older sidebar-collapsed
   preference is present. This fixes the zero-width main column seen on desktop focus mode. */
@media(min-width:901px){
  .app-shell.app-shell-game.focus-mode,
  .app-shell.app-shell-game.focus-mode.sidebar-collapsed{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .app-shell-game.focus-mode .sidebar{display:none!important}
  .app-shell-game.focus-mode .main-wrap{
    grid-column:1/-1!important;
    width:100%;min-width:0;max-width:none;
  }
  .app-shell-game.focus-mode .game-main-content{
    width:100%;min-width:0;max-width:none;margin:0 auto;
    padding-left:clamp(10px,2vw,28px);padding-right:clamp(10px,2vw,28px);
  }
  .app-shell-game.focus-mode .game-page-compact{
    width:min(100%,1440px);max-width:1440px;margin-left:auto;margin-right:auto;
  }
  .app-shell-game.focus-mode .compact-stage{width:100%;min-width:0}
}

/* v0.6.0 — Adaptive Training */
.adaptive-training-banner{display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,260px);gap:14px;align-items:center;margin:0 0 14px;padding:17px 18px;border:1px solid #dbe7f7;border-radius:20px;background:linear-gradient(135deg,#f8fbff 0%,#fff 58%,#f6f9ff 100%);box-shadow:var(--shadow-sm)}
.adaptive-training-copy h2{margin:4px 0 5px;font-size:21px;letter-spacing:-.025em}.adaptive-training-copy p{margin:0;color:#667085;font-size:11px;line-height:1.55}.adaptive-training-confidence{display:grid;gap:2px;padding:13px 14px;border:1px solid #e4eaf2;border-radius:15px;background:#fff}.adaptive-training-confidence span{font-size:9px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;color:#7b8798}.adaptive-training-confidence strong{font-size:25px;letter-spacing:-.04em;color:#172033}.adaptive-training-confidence small{font-size:10px;line-height:1.45;color:#7b8798}
.adaptive-map-section{display:grid;gap:13px;margin:14px 0;padding:18px;border:1px solid #e2e8f0;border-radius:20px;background:#fff;box-shadow:var(--shadow-sm)}.adaptive-map-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.adaptive-map-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 11px;border:1px solid #e7ebf1;border-radius:13px;background:#fbfcfe}.adaptive-map-row.is-focus{border-color:#bfdbfe;background:#f5f9ff}.adaptive-map-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#fff;border:1px solid #e8edf3;font-size:17px}.adaptive-map-main{min-width:0;display:grid;gap:6px}.adaptive-map-main>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:8px;min-width:0}.adaptive-map-main strong{font-size:12px}.adaptive-map-main small{min-width:0;color:#7b8798;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.adaptive-priority-track{height:5px;border-radius:999px;background:#edf1f5;overflow:hidden}.adaptive-priority-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#64748b,#2563eb)}.adaptive-map-row>b{min-width:28px;text-align:right;color:#334155;font-size:15px;font-variant-numeric:tabular-nums}
@media(max-width:700px){.adaptive-training-banner{grid-template-columns:1fr;padding:14px;border-radius:17px}.adaptive-training-confidence{grid-template-columns:minmax(0,1fr) auto;align-items:center}.adaptive-training-confidence strong{grid-row:1/3;grid-column:2;font-size:22px}.adaptive-map-section{padding:13px;border-radius:17px}.adaptive-map-grid{grid-template-columns:1fr}.adaptive-map-main>div:first-child{align-items:flex-start;flex-direction:column;gap:2px}.adaptive-map-main small{white-space:normal}}

/* v0.6.1 — Adaptive Training V2: calibration, hysteresis and coaching */
.adaptive-map-note{display:block;color:#64748b;font-size:9px;line-height:1.4}.adaptive-map-row.is-focus .adaptive-map-note{color:#475569}.result-adaptive-coach{margin-top:10px;padding:13px 14px;border:1px solid #dbe4ef;border-radius:14px;background:linear-gradient(135deg,#f8fbff,#fff);display:grid;gap:4px}.result-adaptive-coach>span{font-size:9px;font-weight:900;letter-spacing:.09em;color:#64748b}.result-adaptive-coach>strong{font-size:14px;color:#172033}.result-adaptive-coach>p{margin:0;color:#667085;font-size:11px;line-height:1.55}.result-adaptive-coach>small{color:#64748b;font-size:10px}.result-adaptive-coach.is-changed{border-color:#bfdbfe;background:linear-gradient(135deg,#eff6ff,#fff)}


/* v0.6.2 — Adaptive session goals */
.session-goal-banner{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,.55fr);gap:14px;align-items:center;padding:16px 18px;border:1px solid #dbe6f3;border-radius:20px;background:linear-gradient(135deg,#f8fbff,#fff);box-shadow:var(--shadow-sm)}
.session-goal-banner h2{margin:3px 0 4px;font-size:18px}.session-goal-banner p{margin:0;color:#667085;font-size:10.5px;line-height:1.55}.session-goal-status{display:grid;gap:4px;padding:11px 13px;border-radius:13px;background:#fff;border:1px solid #e5ebf3}.session-goal-status strong{font-size:12px;color:#253047}.session-goal-status small{font-size:9px;color:#7b8798;line-height:1.45}.session-goal-banner.is-achieved{border-color:#bbebcb;background:linear-gradient(135deg,#f0fdf4,#fff)}.session-goal-banner.is-achieved .session-goal-status strong{color:#15803d}
.daily-task-goal{display:flex;flex-wrap:wrap;gap:5px 8px;align-items:center;margin-top:4px;padding-top:5px;border-top:1px dashed #e4e9f0;color:#475569;font-size:9px}.daily-task-goal b{font-size:9px}.daily-task-goal em{font-style:normal;color:#7b8798}.daily-task-goal.is-achieved b{color:#15803d}
.result-session-goal{margin-top:10px;padding:13px 14px;border:1px solid #d7e3f2;border-radius:14px;background:linear-gradient(135deg,#f8fbff,#fff);display:grid;gap:4px}.result-session-goal>span{font-size:9px;font-weight:900;letter-spacing:.09em;color:#64748b}.result-session-goal>strong{font-size:14px;color:#172033}.result-session-goal>p{margin:0;color:#667085;font-size:11px;line-height:1.55}.result-session-goal>small{color:#64748b;font-size:10px}.result-session-goal.is-achieved{border-color:#bbebcb;background:linear-gradient(135deg,#f0fdf4,#fff)}.result-session-goal.is-achieved>strong{color:#15803d}
@media(max-width:700px){.session-goal-banner{grid-template-columns:1fr;padding:14px;border-radius:17px}.session-goal-status{padding:10px 11px}.daily-task-goal{display:grid;gap:2px}}

/* v0.6.3 — Adaptive Goal Memory */
.goal-memory-section{display:grid;gap:13px;margin:14px 0;padding:18px;border:1px solid #e2e8f0;border-radius:20px;background:linear-gradient(135deg,#fff 0%,#fbfdff 100%);box-shadow:var(--shadow-sm)}
.goal-memory-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.goal-memory-metrics article{display:grid;gap:3px;padding:12px 13px;border:1px solid #e7ebf1;border-radius:14px;background:#fff}.goal-memory-metrics span{font-size:9px;font-weight:850;letter-spacing:.07em;text-transform:uppercase;color:#7b8798}.goal-memory-metrics strong{font-size:20px;letter-spacing:-.03em;color:#172033}.goal-memory-metrics small{font-size:10px;color:#7b8798}
.goal-memory-recent{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.goal-memory-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;align-items:center;padding:10px 11px;border:1px solid #e7ebf1;border-radius:13px;background:#fbfcfe}.goal-memory-item>span{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#fff;border:1px solid #e8edf3}.goal-memory-item div{min-width:0;display:grid;gap:2px}.goal-memory-item strong{font-size:11px}.goal-memory-item small{font-size:9px;color:#7b8798;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.goal-memory-item>b{color:#94a3b8}.goal-memory-item.is-achieved{border-color:#bbf7d0;background:#f7fff9}.goal-memory-item.is-achieved>b{color:#16a34a}.daily-task-memory-note{display:block;margin-top:4px;color:#7b8798;font-size:9px;line-height:1.4}
@media(max-width:700px){.goal-memory-section{padding:13px;border-radius:17px}.goal-memory-metrics{grid-template-columns:1fr 1fr}.goal-memory-metrics article:first-child{grid-column:1/-1}.goal-memory-recent{grid-template-columns:1fr}.goal-memory-item small{white-space:normal}}

/* v0.6.4 — Adaptive Weekly Review & Training Balance */
.weekly-review-section{display:grid;gap:13px;margin:14px 0;padding:18px;border:1px solid #dfe7f2;border-radius:20px;background:linear-gradient(135deg,#f8fbff 0%,#fff 55%,#f9fbff 100%);box-shadow:var(--shadow-sm)}
.weekly-review-score{display:grid;grid-template-columns:auto 1fr;align-items:baseline;gap:6px;padding:9px 12px;border:1px solid #dce6f2;border-radius:14px;background:#fff;white-space:nowrap}.weekly-review-score b{font-size:24px;line-height:1;color:#172033;letter-spacing:-.04em}.weekly-review-score small{font-size:9px;color:#718096;font-weight:800}
.weekly-review-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.weekly-review-metrics article{display:grid;gap:3px;padding:12px 13px;border:1px solid #e6ebf2;border-radius:14px;background:#fff}.weekly-review-metrics article.is-highlight{border-color:#cfe1fb;background:#f8fbff}.weekly-review-metrics span{font-size:9px;font-weight:850;letter-spacing:.07em;text-transform:uppercase;color:#7b8798}.weekly-review-metrics strong{font-size:18px;color:#172033;letter-spacing:-.025em;overflow-wrap:anywhere}.weekly-review-metrics small{font-size:9px;line-height:1.45;color:#7b8798}
.weekly-review-focus{display:grid;gap:8px}.weekly-review-focus>span{font-size:9px;font-weight:900;letter-spacing:.09em;color:#64748b}.weekly-review-focus>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.weekly-review-focus article{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;align-items:center;padding:10px 11px;border:1px solid #e6ebf2;border-radius:13px;background:#fff}.weekly-review-focus article>b{display:grid;place-items:center;width:32px;height:32px;border:1px solid #edf1f5;border-radius:10px;background:#fbfcfe}.weekly-review-focus article>div{display:grid;gap:2px;min-width:0}.weekly-review-focus strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weekly-review-focus small{font-size:9px;color:#7b8798}.weekly-review-focus em{font-style:normal;font-size:15px;font-weight:900;color:#334155;font-variant-numeric:tabular-nums}
@media(max-width:760px){.weekly-review-section{padding:13px;border-radius:17px}.weekly-review-score{justify-self:start}.weekly-review-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.weekly-review-focus>div{grid-template-columns:1fr}.weekly-review-focus strong{white-space:normal}}
@media(max-width:420px){.weekly-review-metrics{grid-template-columns:1fr}}


/* v0.6.6 — Adaptive Plateau Detection & Recovery */
.plateau-recovery-banner{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;margin:18px 0;padding:18px 20px;border:1px solid rgba(245,158,11,.3);border-radius:20px;background:linear-gradient(135deg,rgba(255,251,235,.96),rgba(255,255,255,.98));box-shadow:0 12px 30px rgba(120,53,15,.06)}
.plateau-recovery-banner h2{margin:3px 0 6px;font-size:22px}.plateau-recovery-banner p{margin:0;color:#64748b;line-height:1.6}.plateau-recovery-stats{display:flex;min-width:220px;flex-direction:column;gap:3px;padding:13px 15px;border-radius:15px;background:rgba(255,255,255,.86);border:1px solid rgba(245,158,11,.2)}.plateau-recovery-stats strong{font-size:18px}.plateau-recovery-stats small{color:#64748b}.plateau-recovery-stats em{font-size:10px;color:#92400e;font-style:normal;font-weight:800;line-height:1.45}
.weekly-plateau-list{margin-top:14px}.weekly-plateau-list>span{display:block;margin-bottom:8px;font-size:10px;font-weight:900;letter-spacing:.12em;color:#92400e}.weekly-plateau-list>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.weekly-plateau-list article{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;align-items:center;padding:10px 11px;border:1px solid rgba(245,158,11,.22);border-radius:13px;background:#fffaf0}.weekly-plateau-list article>b{font-size:20px}.weekly-plateau-list article div{min-width:0;display:flex;flex-direction:column;gap:2px}.weekly-plateau-list article strong{font-size:11px}.weekly-plateau-list article small{font-size:9px;color:#7c6f64;line-height:1.35}.weekly-plateau-list article em{font-style:normal;font-size:10px;font-weight:900;color:#92400e}
@media(max-width:760px){.plateau-recovery-banner{grid-template-columns:1fr;padding:14px;border-radius:17px}.plateau-recovery-stats{min-width:0}.weekly-plateau-list>div{grid-template-columns:1fr}}


/* v0.6.6 — Intervention Effectiveness */
.intervention-effectiveness-banner{display:flex;justify-content:space-between;gap:18px;align-items:center;margin:14px 0;padding:16px 18px;border:1px solid var(--border);border-radius:18px;background:var(--panel)}
.intervention-effectiveness-banner h3{margin:4px 0 6px}.intervention-effectiveness-banner p{margin:0;color:var(--muted)}
.intervention-effectiveness-banner>div:last-child{text-align:right;min-width:160px}.intervention-effectiveness-banner>div:last-child strong{display:block;font-size:22px}.intervention-effectiveness-banner>div:last-child small{display:block;color:var(--muted);margin-top:4px}
@media(max-width:640px){.intervention-effectiveness-banner{align-items:flex-start;flex-direction:column}.intervention-effectiveness-banner>div:last-child{text-align:left;min-width:0}}


/* v0.6.7 — Adaptive Strategy Memory */
.strategy-memory-banner{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;margin:14px 0;padding:16px 18px;border:1px solid #dbe5f1;border-radius:18px;background:linear-gradient(135deg,#f8fbff 0%,#fff 72%)}
.strategy-memory-banner.is-proven{border-color:#bfdbfe;background:linear-gradient(135deg,#eff6ff 0%,#fff 74%)}.strategy-memory-banner h3{margin:4px 0 6px}.strategy-memory-banner p{margin:0;color:var(--muted);line-height:1.55}.strategy-memory-stats{display:flex;min-width:190px;flex-direction:column;gap:3px;text-align:right}.strategy-memory-stats strong{font-size:18px}.strategy-memory-stats small{font-size:10px;color:var(--muted)}.strategy-memory-stats em{font-size:9px;font-style:normal;font-weight:800;color:#64748b}
@media(max-width:640px){.strategy-memory-banner{grid-template-columns:1fr;padding:14px}.strategy-memory-stats{min-width:0;text-align:left}}

/* v0.6.8 — Living Competition */
.competition-live-strip{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin:10px 0 14px;padding:10px 12px;border:1px solid #dfe7f1;border-radius:14px;background:linear-gradient(135deg,#f8fbff,#fff);color:#64748b;font-size:10px}.competition-live-strip span{display:inline-flex;gap:4px;align-items:baseline}.competition-live-strip strong{font-size:12px;color:#172033}.competition-disclosure{margin:14px 0 0;border:1px solid #e3e9f0;border-radius:14px;background:#fbfcfe;overflow:hidden}.competition-disclosure summary{cursor:pointer;padding:11px 13px;font-size:10px;font-weight:850;color:#536277;list-style:none}.competition-disclosure summary::-webkit-details-marker{display:none}.competition-disclosure summary:after{content:'+';float:right;font-weight:900}.competition-disclosure[open] summary:after{content:'−'}.competition-disclosure p{margin:0;padding:0 13px 13px;color:#748093;font-size:10px;line-height:1.55}.leaderboard-layout-v068,.leaderboard-layout-v069{align-items:start}.realm-community-panel{margin-top:14px}.realm-community-list{display:grid;gap:6px}.realm-community-row .rank-person small{display:block}.leaderboard-living-v068 .rank-row.is-simulated-rival,.leaderboard-community-v068 .rank-row.is-simulated-rival,.leaderboard-living-v069 .rank-row.is-simulated-rival,.leaderboard-community-v069 .rank-row.is-simulated-rival{opacity:1}.leaderboard-living-v068 .rank-row-v2,.leaderboard-living-v069 .rank-row-v2,.realm-community-row{transition:transform .16s ease,box-shadow .16s ease}.leaderboard-living-v068 .rank-row-v2:hover,.leaderboard-living-v069 .rank-row-v2:hover,.realm-community-row:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(15,23,42,.05)}
@media(max-width:760px){.competition-live-strip{display:grid;grid-template-columns:1fr 1fr;margin-top:8px}.competition-live-strip span:last-child:nth-child(odd){grid-column:1/-1}.realm-community-panel{padding:13px}.realm-community-row{grid-template-columns:38px minmax(0,1fr) 66px}.realm-community-row>b{grid-column:2/4;font-size:10px;justify-self:start}.competition-disclosure{border-radius:12px}}
@media(max-width:420px){.competition-live-strip{grid-template-columns:1fr}.competition-live-strip span:last-child:nth-child(odd){grid-column:auto}}


/* v0.6.9 — Living Competition V2: Rival personalities & rivalry memory */
.rivalry-card-v069{margin:12px 0 14px;padding:14px;border:1px solid #dce6f3;border-radius:16px;background:linear-gradient(135deg,#f8fbff 0%,#fff 68%);box-shadow:0 7px 20px rgba(15,23,42,.035)}
.rivalry-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.rivalry-card-head span{font-size:10px;font-weight:900;letter-spacing:.08em;color:#64748b}.rivalry-card-head strong{font-size:15px;color:#172033}
.rivalry-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.rivalry-target{min-width:0;padding:11px 12px;border:1px solid #e6edf5;border-radius:13px;background:#fff}.rivalry-target small{display:block;margin-bottom:4px;color:#7a8797;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.rivalry-target>strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#172033;font-size:13px}.rivalry-target>span{display:block;margin-top:4px;color:#64748b;font-size:10px;line-height:1.45}.rivalry-target b{color:#283a55}
@media (max-width:560px){.rivalry-card-v069{padding:11px}.rivalry-card-grid{grid-template-columns:1fr}.rivalry-target{padding:10px 11px}}

/* v0.7.0 - Rival Challenge & Rank Movement */
.leaderboard-living-v070 .rank-no,.leaderboard-community-v070 .rank-no{display:grid;grid-auto-flow:row;align-content:center;justify-items:start;gap:1px;overflow:visible}
.rank-movement{display:inline-flex;align-items:center;min-width:22px;height:15px;padding:0 4px;border-radius:999px;background:#eef2f7;color:#7b8797;font-size:8px;font-style:normal;font-weight:900;line-height:1}
.rank-movement.is-up{background:#ecfdf5;color:#047857}.rank-movement.is-down{background:#fff1f2;color:#be123c}.rank-movement.is-steady{background:#f1f5f9;color:#64748b}
.rank-row.rank-moving-up{box-shadow:inset 3px 0 0 #86efac}.rank-row.rank-moving-down{box-shadow:inset 3px 0 0 #fecdd3}
.rival-challenge-v070{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:14px;align-items:center;margin:12px 0 10px;padding:15px 16px;border:1px solid #dbe5f2;border-radius:18px;background:linear-gradient(135deg,#f8fbff 0%,#fff 70%);box-shadow:0 8px 22px rgba(15,23,42,.04)}
.rival-challenge-v070.is-hot{border-color:#fecaca;background:linear-gradient(135deg,#fff7ed,#fff)}.rival-challenge-v070.is-close{border-color:#bfdbfe}.rival-challenge-v070.is-chase{border-color:#ddd6fe}
.rival-challenge-copy{min-width:0}.rival-challenge-copy>span{display:block;margin-bottom:4px;color:#64748b;font-size:9px;font-weight:900;letter-spacing:.08em}.rival-challenge-copy h3{margin:0;color:#172033;font-size:16px}.rival-challenge-copy p{margin:4px 0;color:#5f6c7d;font-size:10px;line-height:1.5}.rival-challenge-copy>small{display:block;color:#8a96a5;font-size:8px;line-height:1.45}
.rival-challenge-gap{display:grid;min-width:108px;justify-items:end}.rival-challenge-gap small{color:#7c8999;font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.rival-challenge-gap strong{margin-top:2px;color:#172033;font-size:18px}.rival-challenge-gap em{font-size:9px;font-style:normal;font-weight:800;color:#64748b}
.rival-challenge-cta{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 13px;border-radius:12px;background:#172033;color:#fff;font-size:10px;font-weight:900;white-space:nowrap}
.rank-event-strip{margin:0 0 12px;padding:9px 12px;border:1px dashed #dbe3ed;border-radius:12px;background:#fbfcfe;color:#697789;font-size:9px;line-height:1.45}.rank-event-strip.is-win{border-color:#bbf7d0;background:#f0fdf4;color:#166534}.rank-event-strip.is-alert{border-color:#fed7aa;background:#fff7ed;color:#9a3412}
@media(max-width:700px){.rival-challenge-v070{grid-template-columns:minmax(0,1fr) auto;padding:13px}.rival-challenge-cta{grid-column:1/-1;width:100%}.rival-challenge-gap{min-width:88px}.rival-challenge-gap strong{font-size:15px}}
@media(max-width:440px){.rival-challenge-v070{grid-template-columns:1fr}.rival-challenge-gap{justify-items:start}.rank-movement{min-width:19px;padding:0 3px;font-size:7px}}
.leaderboard-living-v070 .rank-row.is-simulated-rival,.leaderboard-community-v070 .rank-row.is-simulated-rival{opacity:1}
.leaderboard-living-v070 .rank-row-v2,.leaderboard-community-v070 .rank-row-v2{transition:transform .16s ease,box-shadow .16s ease}
.leaderboard-living-v070 .rank-row-v2:hover,.leaderboard-community-v070 .rank-row-v2:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(15,23,42,.05)}

/* v0.7.1 - Weekly Rival League */
.weekly-race-v071{margin:14px 0;padding:16px;border:1px solid var(--line,#26344a);border-radius:16px;background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.012));box-shadow:0 10px 30px rgba(0,0,0,.08)}
.weekly-race-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.weekly-race-head small{display:block;font-size:11px;letter-spacing:.08em;opacity:.7}.weekly-race-head h2{margin:3px 0 0;font-size:20px}.weekly-race-head>strong{font-size:25px;line-height:1}
.weekly-race-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.weekly-race-grid>div{padding:11px 12px;border-radius:12px;background:rgba(255,255,255,.035);min-width:0}.weekly-race-grid span,.weekly-race-grid small{display:block;opacity:.72;font-size:12px}.weekly-race-grid b{display:block;margin:4px 0;font-size:15px;overflow-wrap:anywhere}.weekly-race-memory{display:flex;justify-content:space-between;gap:12px;margin-top:12px;font-size:12px;opacity:.9}.weekly-race-memory .is-up{font-weight:700}.weekly-race-memory .is-down{font-weight:700}.weekly-race-progress{height:6px;margin-top:9px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.08)}.weekly-race-progress i{display:block;height:100%;border-radius:inherit;background:currentColor;opacity:.7;transition:width .35s ease}.weekly-race-cta{display:inline-flex;margin-top:12px;font-weight:700;text-decoration:none}
@media(max-width:700px){.weekly-race-grid{grid-template-columns:1fr}.weekly-race-memory{flex-direction:column;gap:4px}.weekly-race-head h2{font-size:18px}.weekly-race-head>strong{font-size:22px}}

/* v0.7.2 - Game Core V2 */
.game-core-kind{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:4px 8px;border:1px solid #e4eaf1;border-radius:999px;background:#f8fafc;color:#64748b;font-size:8px;font-weight:900;letter-spacing:.08em;white-space:nowrap}
.game-core-kind[data-kind="training"]{border-color:#dbeafe;background:#eff6ff;color:#2563eb}
.game-core-kind[data-kind="circuit"]{border-color:#ddd6fe;background:#f5f3ff;color:#6d28d9}
.game-core-toggle[aria-pressed="true"]{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}
.game-page[data-game-page] button,.game-page[data-game-page] [role="button"]{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.game-page.is-playing .game-root{overscroll-behavior:contain}
.result-core-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:10px 0;padding:9px;border:1px solid #e3e9f1;border-radius:13px;background:#fff}
.result-core-summary>div{display:grid;gap:2px;min-width:0;padding:7px 8px;border-radius:9px;background:#f8fafc}
.result-core-summary>div>span{color:#8491a3;font-size:7.5px;font-weight:900;letter-spacing:.07em;text-transform:uppercase}
.result-core-summary>div>strong{overflow:hidden;color:#243247;font-size:11px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums}
.result-core-summary>div.is-pb{background:#fff7ed}
.result-core-summary>div.is-pb>strong{color:#c2410c}
.result-core-summary>small{grid-column:1/-1;color:#8a97a8;font-size:8px;line-height:1.4}
.session-control-bar{position:relative}.session-control-bar::after{content:"Enter/Space: bắt đầu · P: tạm dừng · R: chơi lại";display:none;color:#98a2b3;font-size:8px;font-weight:700;white-space:nowrap}
@media(min-width:1100px){.session-control-bar[data-state="ready"]::after{display:block;position:absolute;right:2px;bottom:-13px}}
@media(max-width:640px){
  .game-core-kind{display:none}
  .result-core-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:7px}
  .result-core-summary>div{padding:6px}
  .result-core-summary>div:nth-child(4),.result-core-summary>div:nth-child(5){grid-column:auto}
  .result-core-summary>small{font-size:7.5px}
  .math-choices button,.stroop-choices button,.sequence-choices button,.dialog-choice-grid button{min-height:44px}
  .reaction-pad{touch-action:none}
}
@media(max-width:380px){.result-core-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.result-core-summary>div:last-of-type{grid-column:1/-1}}

/* v0.7.3 - Existing Games V2 */
.stroop-rule-banner{
  display:inline-flex;align-items:center;justify-content:center;min-height:32px;
  padding:6px 11px;border:1px solid var(--border);border-radius:999px;
  font-size:.78rem;font-weight:800;letter-spacing:.045em;margin:0 auto 10px;
  background:var(--surface-soft,rgba(127,127,127,.08));
}
.stroop-rule-banner.is-switched{transform:scale(1.02);box-shadow:0 0 0 3px rgba(127,127,127,.08)}
.rule-switch-badge{
  display:inline-flex;align-items:center;min-height:24px;padding:3px 7px;margin-left:6px;
  border:1px dashed currentColor;border-radius:999px;font-size:.68rem;font-style:normal;font-weight:900;
  letter-spacing:.06em;vertical-align:middle;
}
.memory-grid.is-recall-delay .memory-cell{opacity:.7;pointer-events:none}
.memory-grid.is-recall-delay{filter:saturate(.85)}
@media(max-width:520px){
  .stroop-rule-banner{font-size:.72rem;min-height:30px;padding:5px 9px}
  .rule-switch-badge{font-size:.62rem;margin-left:4px}
}

/* v0.7.4 - New Games Pack I */
.choice-reaction-stage,.nback-stage{display:grid;justify-items:center;align-content:center;gap:16px;min-height:360px;padding:20px}
.choice-reaction-signal,.nback-symbol{display:grid;place-items:center;width:150px;height:150px;border:1px solid var(--border);border-radius:28px;background:var(--surface-soft,rgba(127,127,127,.08));font-size:72px;font-weight:900;line-height:1;transition:transform .12s ease,box-shadow .12s ease}
.choice-reaction-signal.is-live,.nback-symbol.is-live{transform:scale(1.04);box-shadow:0 12px 32px rgba(15,23,42,.12)}
.nback-symbol.is-wrong{transform:translateX(4px)}
.choice-reaction-buttons{display:grid;grid-template-columns:repeat(4,minmax(62px,84px));gap:9px}.choice-reaction-buttons button,.nback-actions button{min-height:58px;border-radius:14px;font-size:24px;font-weight:900}
.nback-actions{display:grid;grid-template-columns:repeat(2,minmax(120px,170px));gap:10px}.nback-actions button{font-size:16px}
@media(max-width:520px){.choice-reaction-stage,.nback-stage{min-height:300px;padding:14px}.choice-reaction-signal,.nback-symbol{width:118px;height:118px;font-size:58px;border-radius:22px}.choice-reaction-buttons{grid-template-columns:repeat(2,minmax(100px,1fr));width:100%;max-width:280px}.nback-actions{grid-template-columns:1fr 1fr;width:100%;max-width:320px}.choice-reaction-buttons button,.nback-actions button{min-height:54px}}

/* v0.7.6 - New Games Pack II + Brain Circuit */
.tap-target-stage,.math-compare-stage,.spatial-rotation-stage{display:grid;justify-items:center;align-content:center;gap:16px;min-height:360px;padding:20px}
.tap-target-board{--target-grid:4;display:grid;grid-template-columns:repeat(var(--target-grid),minmax(48px,76px));gap:8px;padding:12px;border:1px solid var(--border);border-radius:20px;background:var(--surface-soft,rgba(127,127,127,.06))}
.tap-target-cell{display:grid;place-items:center;aspect-ratio:1;border:1px solid var(--border);border-radius:16px;background:var(--surface,#fff);padding:0;transition:transform .08s ease,background .08s ease,border-color .08s ease}.tap-target-cell span{width:38%;height:38%;border-radius:999px;background:rgba(100,116,139,.16);transition:transform .08s ease,background .08s ease,box-shadow .08s ease}.tap-target-cell.is-target{transform:scale(1.04);border-color:#0f172a}.tap-target-cell.is-target span{transform:scale(1.65);background:#111827;box-shadow:0 0 0 8px rgba(15,23,42,.08)}.tap-target-cell.is-wrong{background:#fff1f2;border-color:#fb7185}
.math-compare-expressions{display:grid;grid-template-columns:minmax(110px,1fr) 34px minmax(110px,1fr);align-items:center;gap:12px;width:min(100%,620px)}.math-compare-expressions strong{display:grid;place-items:center;min-height:118px;padding:12px;border:1px solid var(--border);border-radius:20px;background:var(--surface-soft,rgba(127,127,127,.06));font-size:clamp(24px,4vw,42px);text-align:center}.math-compare-expressions span{font-size:32px;font-weight:900;text-align:center}.math-compare-actions,.rotation-actions{display:grid;grid-template-columns:repeat(3,minmax(82px,120px));gap:10px}.math-compare-actions button,.rotation-actions button{min-height:58px;border-radius:14px;font-size:26px;font-weight:900}
.rotation-start{display:grid;justify-items:center;gap:5px}.rotation-start span,.rotation-question{font-size:12px;color:#64748b;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.rotation-start strong{display:grid;place-items:center;width:118px;height:118px;border:1px solid var(--border);border-radius:24px;background:var(--surface-soft,rgba(127,127,127,.06));font-size:68px;line-height:1}.rotation-steps{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.rotation-steps span{padding:8px 11px;border:1px solid var(--border);border-radius:999px;background:var(--surface,#fff);font-size:15px;font-weight:850}.rotation-actions{grid-template-columns:repeat(4,minmax(62px,86px))}.rotation-actions button{font-size:30px}
.circuit-game-status{margin:0 0 10px;padding:9px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft,rgba(127,127,127,.06));font-size:12px;font-weight:750}.circuit-game-status strong{margin-right:6px}.circuit-next-action{border-color:#111827!important;background:#111827!important;color:#fff!important}
.brain-circuit-page{display:grid;gap:18px}.circuit-hero{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(240px,.8fr);gap:18px;padding:24px;border:1px solid var(--border);border-radius:24px;background:var(--surface,#fff)}.circuit-hero h1{margin:6px 0 10px;font-size:clamp(28px,4vw,44px)}.circuit-hero p{margin:0;color:#64748b;max-width:760px}.circuit-hero-side{display:grid;align-content:center;gap:8px;padding:18px;border-radius:18px;background:#111827;color:#fff}.circuit-hero-side strong{font-size:34px}.circuit-hero-side small{opacity:.72}.circuit-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.circuit-actions button,.circuit-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border-radius:12px;font-weight:850}.circuit-actions .primary{background:#111827;color:#fff;border:1px solid #111827}.circuit-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.circuit-step{display:grid;gap:8px;padding:16px;border:1px solid var(--border);border-radius:18px;background:var(--surface,#fff)}.circuit-step.is-complete{box-shadow:inset 0 0 0 1px #16a34a}.circuit-step-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.circuit-step-head span{font-size:11px;font-weight:900;color:#64748b;letter-spacing:.08em}.circuit-step-head b{font-size:12px}.circuit-step strong{font-size:18px}.circuit-step small{color:#64748b;line-height:1.45}.circuit-step-result{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:4px}.circuit-step-result span{padding:7px 6px;border-radius:9px;background:var(--surface-soft,rgba(127,127,127,.06));font-size:11px;text-align:center}.circuit-summary{padding:18px;border:1px solid var(--border);border-radius:20px;background:var(--surface,#fff)}.circuit-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}.circuit-summary-grid div{padding:12px;border-radius:12px;background:var(--surface-soft,rgba(127,127,127,.06))}.circuit-summary-grid span{display:block;font-size:10px;color:#64748b;text-transform:uppercase}.circuit-summary-grid strong{font-size:20px}.circuit-empty{color:#64748b}
@media(max-width:720px){.tap-target-stage,.math-compare-stage,.spatial-rotation-stage{min-height:300px;padding:12px}.tap-target-board{gap:5px;padding:8px}.tap-target-cell{border-radius:11px}.math-compare-expressions{grid-template-columns:1fr 24px 1fr;gap:7px}.math-compare-expressions strong{min-height:92px;border-radius:15px;font-size:22px}.math-compare-actions{width:100%;grid-template-columns:repeat(3,1fr)}.rotation-start strong{width:96px;height:96px;font-size:56px}.rotation-actions{width:100%;grid-template-columns:repeat(4,1fr)}.circuit-hero{grid-template-columns:1fr;padding:18px}.circuit-steps{grid-template-columns:1fr}.circuit-summary-grid{grid-template-columns:1fr 1fr}}

/* v0.7.6 Brain Circuit V2 */
.circuit-mode-tabs{display:flex;gap:8px;flex-wrap:wrap}.circuit-mode-tabs a{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 14px;border:1px solid var(--border);border-radius:999px;background:var(--surface,#fff);font-size:12px;font-weight:850;color:inherit}.circuit-mode-tabs a.is-active{background:#111827;color:#fff;border-color:#111827}
.circuit-progress-panel{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.circuit-progress-panel>div{padding:14px 15px;border:1px solid var(--border);border-radius:16px;background:var(--surface,#fff)}.circuit-progress-panel span{display:block;margin-bottom:5px;color:#64748b;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.05em}.circuit-progress-panel strong{font-size:20px;color:#172033}.circuit-steps{grid-template-columns:repeat(var(--circuit-cols,3),minmax(0,1fr))}.circuit-summary-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.circuit-summary-head>div{display:grid;gap:4px}.circuit-summary-head>[data-circuit-server-state]{font-size:11px;font-weight:900;color:#166534}.circuit-submit-note{margin:12px 0 0;padding:10px 12px;border-radius:12px;background:var(--surface-soft,rgba(127,127,127,.06));color:#475569;font-size:12px;line-height:1.5}.circuit-warning{border-color:#fed7aa;background:#fffaf5}.circuit-leaderboard-panel{padding:18px;border:1px solid var(--border);border-radius:20px;background:var(--surface,#fff)}.circuit-rank-list .rank-row{grid-template-columns:54px minmax(150px,1.4fr) .7fr .6fr .8fr}.circuit-rank-list .rank-person{display:grid}.circuit-rank-list .rank-person small{color:#7c8999;font-size:9px}.circuit-rank-list .rank-row>b{text-align:right}
@media(max-width:900px){.circuit-progress-panel{grid-template-columns:repeat(3,minmax(0,1fr))}.circuit-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.circuit-rank-list .rank-row{grid-template-columns:46px minmax(120px,1fr) .7fr .7fr}.circuit-rank-list .rank-row>span:nth-of-type(4){display:none}}
@media(max-width:640px){.circuit-mode-tabs{display:grid;grid-template-columns:repeat(3,1fr)}.circuit-mode-tabs a{padding:7px 8px}.circuit-progress-panel{grid-template-columns:1fr 1fr}.circuit-progress-panel>div:last-child{grid-column:1/-1}.circuit-steps{grid-template-columns:1fr}.circuit-summary-head{align-items:flex-start;flex-direction:column}.circuit-rank-list .rank-row{grid-template-columns:38px minmax(0,1fr) auto}.circuit-rank-list .rank-row>span:nth-of-type(3),.circuit-rank-list .rank-row>span:nth-of-type(4){display:none}.circuit-rank-list .rank-row>b{font-size:12px}}
.circuit-history-panel{padding:18px;border:1px solid var(--border);border-radius:20px;background:var(--surface,#fff)}.circuit-history-list{display:grid;gap:7px}.circuit-history-row{display:grid;grid-template-columns:minmax(180px,1.4fr) .7fr .8fr .7fr .55fr;gap:10px;align-items:center;padding:10px 12px;border-radius:12px;background:var(--surface-soft,rgba(127,127,127,.05));font-size:11px}.circuit-history-row>span:first-child{display:grid}.circuit-history-row small{color:#7c8999;font-size:9px}.circuit-history-row>b{text-align:right;font-size:13px}.circuit-history-row>em{text-align:right;font-style:normal;font-weight:850;color:#166534}@media(max-width:700px){.circuit-history-row{grid-template-columns:minmax(0,1fr) auto auto}.circuit-history-row>span:nth-of-type(2),.circuit-history-row>span:nth-of-type(3){display:none}}

/* v0.7.7 Mission Hub */
.mission-hub{display:grid;gap:16px;padding:20px;border:1px solid #dce6f2;border-radius:22px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:var(--shadow-sm)}
.mission-hub-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.mission-hub-head h2{margin:3px 0 5px;font-size:24px;color:#172033}.mission-hub-head p{margin:0;max-width:720px;color:#64748b;font-size:12px;line-height:1.6}.mission-today-score{min-width:190px;padding:13px 15px;border-radius:16px;background:#172033;color:#fff}.mission-today-score span,.mission-today-score small{display:block}.mission-today-score span{font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#bfdbfe}.mission-today-score strong{display:block;margin:3px 0;font-size:25px}.mission-today-score small{font-size:9px;line-height:1.4;color:#dbeafe}
.mission-personal-goal{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:13px 15px;border:1px solid #d9e7ff;border-radius:17px;background:linear-gradient(135deg,#f5f9ff,#fff);color:#172033}.mission-personal-icon{font-size:26px}.mission-personal-goal>span:nth-child(2){display:grid;gap:2px}.mission-personal-goal small{font-size:8px;font-weight:900;letter-spacing:.07em;color:#2563eb}.mission-personal-goal strong{font-size:13px}.mission-personal-goal em{font-style:normal;font-size:10px;color:#64748b}.mission-personal-goal b{padding:6px 8px;border-radius:999px;background:#e0ecff;color:#1d4ed8;font-size:9px}.mission-personal-goal i{font-style:normal;font-size:10px;font-weight:900;color:#2563eb}
.mission-section-title{display:flex;align-items:end;justify-content:space-between;gap:12px}.mission-section-title>div{display:grid;gap:2px}.mission-section-title strong{font-size:15px;color:#172033}.mission-section-title>small{font-size:9px;color:#8a96a7}.mission-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.mission-card{display:grid;gap:8px;padding:14px;border:1px solid #e2e8f0;border-radius:17px;background:#fff}.mission-card.is-complete{border-color:#bbf7d0;background:#fbfffc}.mission-card.is-claimed{opacity:.82}.mission-card-top{display:flex;align-items:center;justify-content:space-between}.mission-card-top>span{font-size:22px}.mission-card-top>b{font-size:9px;color:#166534}.mission-card>strong{font-size:13px;color:#172033}.mission-card>p{margin:0;min-height:34px;font-size:10px;line-height:1.55;color:#6b7788}.mission-progress{height:6px;overflow:hidden;border-radius:999px;background:#edf2f7}.mission-progress>span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2563eb,#16a34a)}.mission-card-foot{display:flex;align-items:center;justify-content:space-between;gap:8px}.mission-card-foot small{font-size:9px;font-weight:800;color:#64748b}.mission-card-foot a,.mission-card-foot button,.mission-weekly-row a,.mission-weekly-row button,.mission-milestone a,.mission-milestone button{border:0;border-radius:9px;padding:6px 9px;background:#172033;color:#fff;font:inherit;font-size:9px;font-weight:900;cursor:pointer}.mission-claimed{font-size:9px;font-weight:900;color:#15803d}
.mission-weekly-wrap{display:grid;gap:9px}.mission-weekly-list{display:grid;gap:7px}.mission-weekly-row{display:grid;grid-template-columns:34px minmax(0,1fr) 46px 48px 62px;align-items:center;gap:9px;padding:10px 11px;border:1px solid #e5eaf1;border-radius:14px;background:#fff}.mission-weekly-row.is-complete{border-color:#d1fae5}.mission-weekly-icon{font-size:19px}.mission-weekly-copy{display:grid;gap:2px}.mission-weekly-copy strong{font-size:11px;color:#172033}.mission-weekly-copy small{font-size:9px;color:#7b8797}.mission-weekly-copy i{display:block;height:4px;overflow:hidden;border-radius:999px;background:#eef2f7}.mission-weekly-copy i span{display:block;height:100%;background:#2563eb}.mission-weekly-progress,.mission-weekly-row>b{font-size:9px;text-align:center}.mission-weekly-row>b{color:#166534}.mission-weekly-row em{font-style:normal;font-size:9px;font-weight:900;color:#15803d;text-align:center}
.mission-milestones{border-top:1px dashed #d8e0ea;padding-top:12px}.mission-milestones summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none}.mission-milestones summary::-webkit-details-marker{display:none}.mission-milestones summary span{display:grid}.mission-milestones summary small{font-size:8px;font-weight:900;color:#64748b}.mission-milestones summary strong{font-size:13px;color:#172033}.mission-milestones summary>b{font-size:9px;color:#2563eb}.mission-milestone-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.mission-milestone{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:8px;padding:9px 10px;border:1px solid #e5eaf1;border-radius:13px;background:#fff}.mission-milestone>span{font-size:19px}.mission-milestone>div{display:grid;gap:2px}.mission-milestone strong{font-size:10px}.mission-milestone small{font-size:8px;color:#7c8999}.mission-milestone.is-complete{border-color:#bbf7d0}.mission-milestone>em{font-style:normal;color:#15803d}.mission-status{margin:0;padding:10px 12px;border-radius:11px;background:#ecfdf5;color:#166534;font-size:10px;font-weight:750;line-height:1.5}.mission-status.is-error{background:#fff1f2;color:#be123c}
@media(max-width:820px){.mission-hub-head{align-items:stretch;flex-direction:column}.mission-today-score{min-width:0}.mission-card-grid{grid-template-columns:1fr}.mission-personal-goal{grid-template-columns:auto minmax(0,1fr) auto}.mission-personal-goal b{display:none}.mission-weekly-row{grid-template-columns:30px minmax(0,1fr) 38px 52px}.mission-weekly-row>b{display:none}.mission-milestone-grid{grid-template-columns:1fr}}
@media(max-width:520px){.mission-hub{padding:14px}.mission-hub-head h2{font-size:20px}.mission-personal-goal{grid-template-columns:auto minmax(0,1fr)}.mission-personal-goal i{grid-column:2}.mission-weekly-row{grid-template-columns:26px minmax(0,1fr) auto}.mission-weekly-progress{display:none}.mission-section-title{align-items:flex-start;flex-direction:column}}

/* v0.7.8 Growth Games + Challenge Links */
.growth-games-section{display:grid;gap:16px;margin:20px 0 26px;padding:20px;border:1px solid #e1e7ef;border-radius:24px;background:linear-gradient(145deg,#ffffff 0%,#f7f9fc 100%);box-shadow:0 18px 50px rgba(15,23,42,.06)}
.growth-games-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.growth-games-head>div{display:grid;gap:5px}.growth-games-head h2{margin:0;color:#172033;font-size:clamp(21px,2.5vw,30px);line-height:1.15}.growth-games-head p{max-width:690px;margin:0;color:#66758a;font-size:12px;line-height:1.6}.growth-share-note{white-space:nowrap;padding:8px 11px;border:1px solid #dbe4ef;border-radius:999px;background:#fff;color:#334155;font-size:10px;font-weight:900}
.growth-game-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.growth-game-card{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;min-height:116px;padding:16px;border:1px solid #e2e8f0;border-radius:19px;background:#fff;color:#172033;text-decoration:none;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.growth-game-card:hover{transform:translateY(-2px);border-color:#cbd5e1;box-shadow:0 16px 35px rgba(15,23,42,.09)}.growth-game-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:#f1f5f9;font-size:23px;font-weight:900;overflow:hidden}.growth-game-copy{display:grid;gap:3px;min-width:0}.growth-game-copy small{font-size:8px;font-weight:900;letter-spacing:.08em;color:#64748b}.growth-game-copy strong{font-size:15px;line-height:1.25}.growth-game-copy em{font-style:normal;color:#6b7788;font-size:10px;line-height:1.45}.growth-game-card>b{align-self:end;font-size:10px;color:#2563eb}
.growth-game-card--tim-hinh-khac-biet .growth-game-icon{background:#eef2ff}.growth-game-card--2048-toc-do .growth-game-icon{background:#fff7ed;font-size:14px}.growth-game-card--sudoku-mini .growth-game-icon{background:#ecfdf5}

.incoming-challenge-banner{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 14px;padding:12px 14px;border:1px solid #d7e3f4;border-radius:15px;background:linear-gradient(135deg,#f8fbff,#fff);color:#172033}.incoming-challenge-banner>div{display:grid;gap:3px}.incoming-challenge-banner small{font-size:8px;font-weight:900;letter-spacing:.08em;color:#64748b}.incoming-challenge-banner strong{font-size:13px}.incoming-challenge-banner span{font-size:10px;color:#64748b}.incoming-challenge-banner>b{white-space:nowrap;padding:7px 10px;border-radius:999px;background:#172033;color:#fff;font-size:10px}
.result-share-action{border:0;border-radius:11px;padding:9px 12px;background:#172033;color:#fff;font:inherit;font-size:10px;font-weight:900;cursor:pointer}.result-share-action[hidden]{display:none!important}.result-share-action:disabled{opacity:.6;cursor:wait}
.result-challenge-compare{display:grid;gap:4px;margin-top:11px;padding:11px 12px;border:1px solid #e2e8f0;border-radius:13px;background:#f8fafc}.result-challenge-compare small{font-size:8px;font-weight:900;letter-spacing:.07em;color:#64748b}.result-challenge-compare strong{font-size:12px}.result-challenge-compare span{font-size:10px;color:#64748b}.result-challenge-compare.is-win{border-color:#bbf7d0;background:#f0fdf4}.result-challenge-compare.is-win strong{color:#15803d}.result-challenge-compare.is-loss{border-color:#fee2e2;background:#fff7f7}.result-challenge-compare.is-loss strong{color:#b91c1c}.result-challenge-compare.is-tie{border-color:#fde68a;background:#fffbeb}

.shared-challenge-page{max-width:820px;margin:0 auto;padding:24px 16px 50px}.shared-challenge-card{overflow:hidden;border:1px solid #e2e8f0;border-radius:26px;background:#fff;box-shadow:0 25px 65px rgba(15,23,42,.09)}.shared-challenge-hero{display:grid;gap:10px;padding:28px;background:linear-gradient(145deg,#111827,#1e293b);color:#fff}.shared-challenge-hero small{font-size:9px;font-weight:900;letter-spacing:.12em;color:#cbd5e1}.shared-challenge-hero h1{margin:0;font-size:clamp(25px,4vw,40px);line-height:1.08}.shared-challenge-hero p{max-width:620px;margin:0;color:#d9e2ef;font-size:12px;line-height:1.65}.shared-challenge-target{display:grid;grid-template-columns:1fr auto;align-items:center;gap:16px;padding:20px 28px;border-bottom:1px solid #e5e7eb}.shared-challenge-target>div{display:grid;gap:3px}.shared-challenge-target small{font-size:9px;font-weight:900;color:#64748b}.shared-challenge-target strong{font-size:25px}.shared-challenge-target span{font-size:11px;color:#64748b}.shared-challenge-target>b{font-size:36px}.shared-challenge-actions{display:flex;align-items:center;gap:10px;padding:22px 28px}.shared-challenge-play{display:inline-flex;align-items:center;justify-content:center;padding:12px 17px;border-radius:13px;background:#172033;color:#fff;text-decoration:none;font-size:12px;font-weight:900}.shared-challenge-note{padding:0 28px 24px;margin:0;color:#64748b;font-size:10px;line-height:1.6}

.odd-one-out-stage,.speed-2048-stage,.sudoku-mini-stage{display:grid;justify-items:center;gap:12px;padding:8px 0 4px}.odd-one-out-board{--odd-cols:4;display:grid;grid-template-columns:repeat(var(--odd-cols),minmax(0,1fr));gap:6px;width:min(100%,560px);aspect-ratio:1;padding:8px;border:1px solid #dfe6ef;border-radius:20px;background:#f8fafc;touch-action:manipulation}.odd-one-out-board.is-idle{display:grid;place-items:center;aspect-ratio:auto;min-height:330px}.odd-idle{display:grid;justify-items:center;gap:8px;color:#64748b}.odd-idle strong{font-size:56px;color:#172033}.odd-idle span{font-size:12px;font-weight:800}.odd-cell{display:grid;place-items:center;min-width:0;border:1px solid transparent;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(15,23,42,.05);font:inherit;cursor:pointer;user-select:none;transition:transform .08s ease,border-color .08s ease,background .08s ease}.odd-cell span{font-size:clamp(17px,4vw,32px);line-height:1}.odd-cell:hover{transform:scale(1.025);border-color:#cbd5e1}.odd-cell.is-wrong{background:#fff1f2;border-color:#fecdd3;transform:scale(.94)}.odd-cell.is-correct{background:#ecfdf5;border-color:#86efac;transform:scale(1.05)}

.speed-2048-board{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;width:min(92vw,440px);aspect-ratio:1;padding:10px;border-radius:20px;background:#d6cec3;outline:none;touch-action:none;user-select:none}.tile-2048{display:grid;place-items:center;border-radius:12px;background:rgba(255,255,255,.42);min-width:0}.tile-2048 span{font-size:clamp(18px,5vw,34px);font-weight:950;letter-spacing:-.04em}.tile-2048.has-value{background:#f7f3eb;color:#172033;box-shadow:inset 0 0 0 1px rgba(15,23,42,.05)}.tile-2048[data-value="4"]{background:#f2ead9}.tile-2048[data-value="8"]{background:#ffe0b6}.tile-2048[data-value="16"]{background:#ffd09b}.tile-2048[data-value="32"]{background:#ffc2a3}.tile-2048[data-value="64"]{background:#ffad91}.tile-2048[data-value="128"],.tile-2048[data-value="256"],.tile-2048[data-value="512"]{background:#ffe18d}.tile-2048[data-value="1024"],.tile-2048[data-value="2048"]{background:#172033;color:#fff}

.sudoku-board{--sudoku-size:4;display:grid;grid-template-columns:repeat(var(--sudoku-size),1fr);width:min(92vw,460px);aspect-ratio:1;border:2px solid #172033;border-radius:12px;overflow:hidden;background:#fff}.sudoku-cell{position:relative;display:grid;place-items:center;border:0;border-right:1px solid #cbd5e1;border-bottom:1px solid #cbd5e1;background:#fff;color:#172033;font:inherit;font-size:clamp(18px,5vw,30px);font-weight:800;cursor:pointer}.sudoku-cell.is-given{background:#f1f5f9;color:#475569;cursor:default}.sudoku-cell.is-selected{box-shadow:inset 0 0 0 3px #2563eb;background:#eff6ff}.sudoku-cell.is-filled{color:#1d4ed8}.sudoku-cell.is-wrong{background:#fff1f2;color:#be123c}.sudoku-board[data-size="4"] .sudoku-cell:nth-child(2n){border-right-width:2px;border-right-color:#64748b}.sudoku-board[data-size="4"] .sudoku-cell:nth-child(n+5):nth-child(-n+8){border-bottom-width:2px;border-bottom-color:#64748b}.sudoku-board[data-size="6"] .sudoku-cell:nth-child(3n){border-right-width:2px;border-right-color:#64748b}.sudoku-board[data-size="6"] .sudoku-cell:nth-child(n+7):nth-child(-n+12),.sudoku-board[data-size="6"] .sudoku-cell:nth-child(n+19):nth-child(-n+24){border-bottom-width:2px;border-bottom-color:#64748b}.sudoku-idle{grid-column:1/-1;display:grid;place-items:center;align-content:center;gap:8px;color:#64748b}.sudoku-idle strong{font-size:54px;color:#172033}.sudoku-idle span{font-size:11px;font-weight:800}.sudoku-pad{display:flex;flex-wrap:wrap;justify-content:center;gap:7px}.sudoku-pad button,.sudoku-actions button{min-width:43px;height:40px;border:1px solid #dbe3ed;border-radius:10px;background:#fff;color:#172033;font:inherit;font-size:14px;font-weight:900;cursor:pointer}.sudoku-actions button{min-width:100px;padding:0 12px;font-size:10px;background:#f8fafc}

@media(max-width:820px){.growth-games-head{align-items:flex-start;flex-direction:column}.growth-game-grid{grid-template-columns:1fr}.growth-game-card{min-height:94px}.incoming-challenge-banner{align-items:flex-start;flex-direction:column}.shared-challenge-target{grid-template-columns:1fr}.shared-challenge-target>b{display:none}.shared-challenge-actions{align-items:stretch;flex-direction:column}.shared-challenge-play{width:100%}.odd-one-out-board{gap:4px;padding:6px}.odd-cell{border-radius:9px}}
@media(max-width:520px){.growth-games-section{padding:14px;border-radius:19px}.growth-game-card{padding:13px}.growth-game-copy em{font-size:9px}.growth-share-note{display:none}.shared-challenge-page{padding:12px 10px 35px}.shared-challenge-hero,.shared-challenge-target,.shared-challenge-actions{padding:18px}.shared-challenge-note{padding:0 18px 18px}.odd-one-out-board.is-idle{min-height:250px}.speed-2048-board{gap:5px;padding:7px;border-radius:15px}.tile-2048{border-radius:9px}}
/* Challenge landing markup */
.shared-challenge-card{display:grid;justify-items:center;text-align:center;padding:30px}.challenge-overline{font-size:9px;font-weight:950;letter-spacing:.12em;color:#64748b}.challenge-game-icon{display:grid;place-items:center;width:66px;height:66px;margin-top:10px;border-radius:20px;background:#f1f5f9;font-size:30px;font-weight:950}.challenge-copy{margin:6px 0 0;color:#64748b;font-size:12px}.shared-challenge-card h1{margin:0;color:#172033;font-size:clamp(26px,4vw,42px)}.challenge-target{display:grid;justify-items:center;gap:4px;width:min(100%,430px);margin:10px 0;padding:18px;border:1px solid #e2e8f0;border-radius:18px;background:#f8fafc}.challenge-target span{font-size:8px;font-weight:950;letter-spacing:.1em;color:#64748b}.challenge-target strong{font-size:clamp(28px,5vw,44px);line-height:1}.challenge-target small{font-size:9px;color:#64748b}.challenge-question{margin:2px 0 0;font-size:13px;font-weight:900;color:#334155}.challenge-play{display:inline-flex;align-items:center;justify-content:center;min-width:190px;margin-top:6px;padding:13px 18px;border-radius:13px;background:#172033;color:#fff;text-decoration:none;font-size:12px;font-weight:950}.challenge-facts{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin-top:12px}.challenge-facts span{padding:6px 8px;border-radius:999px;background:#f1f5f9;color:#64748b;font-size:8px;font-weight:800}.challenge-how{display:grid;gap:4px;margin-top:12px;padding:16px 18px;border:1px solid #e2e8f0;border-radius:17px;background:#fff}.challenge-how h2{margin:0;font-size:13px;color:#172033}.challenge-how p{margin:0;font-size:10px;line-height:1.6;color:#64748b}
/* Incoming banner actual markup is flat, keep it compact. */
.incoming-challenge-banner>span{font-size:8px;font-weight:950;letter-spacing:.08em;color:#64748b}.incoming-challenge-banner>strong{font-size:12px}.incoming-challenge-banner>small{font-size:9px;line-height:1.45;color:#64748b}
@media(max-width:520px){.shared-challenge-card{padding:20px 16px}.challenge-facts{display:grid}.incoming-challenge-banner{display:grid;gap:3px}}
.result-challenge-compare p{margin:0;font-size:10px;line-height:1.5;color:#64748b}.result-challenge-compare.is-won{border-color:#bbf7d0;background:#f0fdf4}.result-challenge-compare.is-won strong{color:#15803d}.result-challenge-compare.is-lost{border-color:#fee2e2;background:#fff7f7}.result-challenge-compare.is-lost strong{color:#b91c1c}


/* v0.7.8.1 hotfix — 2048 board, Sudoku stability, desktop result layout */
.speed-2048-board{grid-template-rows:repeat(4,minmax(0,1fr));align-items:stretch}
.tile-2048{width:100%;aspect-ratio:1/1;min-height:0}
.tile-2048 span{line-height:1}
.sudoku-board{grid-auto-rows:1fr}
.sudoku-cell{aspect-ratio:1/1;min-width:0;min-height:0}
@media (min-width: 960px){
  .compact-result{top:82px;width:min(520px,calc(100% - 48px));max-height:min(calc(100vh - 118px),760px);overflow:auto;padding:24px 24px 20px;text-align:left}
  .compact-result .result-kicker,.compact-result .result-time{text-align:center}
  .compact-result .result-time{margin-bottom:8px}
  .result-core-summary{gap:9px;padding:12px}
  .result-core-summary>div{padding:10px 10px}
  .result-core-summary>div>span{font-size:8px}
  .result-core-summary>div>strong{font-size:12px}
  .result-rank-box,.result-coach,.result-adaptive-coach,.result-challenge-compare{padding:13px 14px}
  .result-rank-head>strong{font-size:16px}
}


/* v0.7.8.2 — Stability & UX */
.nav-featured-games{display:grid;gap:3px;margin:6px 0 3px;padding:8px 0 10px;border-bottom:1px solid rgba(148,163,184,.12)}
.nav-featured-title{padding:7px 10px 4px;color:#94a3b8;font-size:11px;font-weight:850;letter-spacing:.06em;text-transform:uppercase}
.nav-game-featured{color:#fff;background:rgba(37,99,235,.11)}
.nav-group-collapsible{border-radius:10px}
.nav-group-collapsible>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:5px;user-select:none}
.nav-group-collapsible>summary::-webkit-details-marker{display:none}
.nav-group-collapsible>summary:after{content:'›';margin-left:auto;color:#64748b;font-size:16px;transform:rotate(0deg);transition:transform .15s ease}
.nav-group-collapsible[open]>summary:after{transform:rotate(90deg)}
.nav-group-games{display:grid;gap:1px;padding-bottom:4px}
.result-time.result-dnf{font-size:24px;color:#b45309;letter-spacing:-.02em}
@media (min-width:960px){
  .compact-result{width:min(760px,calc(100% - 56px));max-height:min(calc(100vh - 124px),780px);display:grid;grid-template-columns:1fr;gap:0 16px;text-align:left}
  .compact-result.has-rank-context{grid-template-columns:minmax(0,1.08fr) minmax(250px,.92fr)}
  .compact-result>.result-kicker{grid-column:1/-1;text-align:center}
  .compact-result>#resultBody{grid-column:1/-1;min-width:0}
  .compact-result.has-rank-context>#resultBody{grid-column:1}
  .compact-result>#resultLeaderboardContext{grid-column:2;grid-row:2;min-width:0;margin-top:0;align-self:start}
  .compact-result>.session-result-actions,.compact-result>.session-rank-note{grid-column:1/-1}
  .compact-result .result-time{text-align:center}
  .compact-result.has-rank-context .result-core-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .compact-result.has-rank-context .result-core-summary>small{grid-column:1/-1}
  .compact-result.has-rank-context .result-rank-box{margin-top:0;background:#fbfcfe}
}
.sidebar-collapsed .nav-featured-title span{display:none}

/* v0.7.9 Growth Games Pack II */
.match-pairs-stage,.flash-count-stage,.quantity-stage{display:grid;justify-items:center;gap:12px;padding:8px 0 4px}
.match-pairs-board{--pair-cols:4;display:grid;grid-template-columns:repeat(var(--pair-cols),minmax(0,1fr));gap:8px;width:min(92vw,560px);min-height:320px;padding:10px;border:1px solid #dfe6ef;border-radius:20px;background:#f8fafc}
.match-pairs-idle{grid-column:1/-1;display:grid;place-items:center;align-content:center;gap:8px;min-height:290px;color:#64748b}.match-pairs-idle strong{font-size:58px}.match-pairs-idle span{font-size:12px;font-weight:800}
.pair-card{position:relative;aspect-ratio:1;border:1px solid #dbe3ed;border-radius:13px;background:#172033;color:#fff;cursor:pointer;overflow:hidden;box-shadow:0 4px 12px rgba(15,23,42,.08);transition:transform .12s ease,background .12s ease,border-color .12s ease}.pair-card:hover{transform:translateY(-1px)}.pair-card .pair-back,.pair-card .pair-front{position:absolute;inset:0;display:grid;place-items:center;font-weight:950}.pair-card .pair-back{font-size:24px}.pair-card .pair-front{font-size:clamp(22px,4vw,36px);opacity:0}.pair-card.is-open,.pair-card.is-matched{background:#fff;color:#172033;border-color:#cbd5e1}.pair-card.is-open .pair-back,.pair-card.is-matched .pair-back{opacity:0}.pair-card.is-open .pair-front,.pair-card.is-matched .pair-front{opacity:1}.pair-card.is-matched{background:#ecfdf5;border-color:#86efac}
.flash-count-field{position:relative;width:min(92vw,620px);height:min(48vw,360px);min-height:260px;border:1px solid #dfe6ef;border-radius:22px;background:#f8fafc;overflow:hidden}.flash-count-field.is-live{background:#fff}.flash-count-idle,.flash-count-question{position:absolute;inset:0;display:grid;place-items:center;align-content:center;gap:8px;color:#64748b}.flash-count-idle strong{font-size:48px;letter-spacing:8px;color:#172033}.flash-count-idle span,.flash-count-question{font-size:13px;font-weight:850}.flash-count-question{font-size:clamp(24px,4vw,38px);color:#172033}.flash-dot,.quantity-panels button span i{position:absolute;width:var(--dot);height:var(--dot);border-radius:50%;background:#172033;transform:translate(-50%,-50%);box-shadow:0 1px 3px rgba(15,23,42,.12)}
.flash-count-choices{display:grid;grid-template-columns:repeat(4,minmax(70px,1fr));gap:8px;width:min(92vw,480px)}.flash-count-choices button{min-height:52px;border:1px solid #dbe3ed;border-radius:12px;background:#fff;color:#172033;font-weight:900;font-size:18px;cursor:pointer}.flash-count-choices button:hover{background:#eff6ff;border-color:#bfdbfe}
.quantity-panels{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:min(94vw,760px)}.quantity-panels button{position:relative;min-height:330px;border:1px solid #dfe6ef;border-radius:22px;background:#fff;cursor:pointer;overflow:hidden}.quantity-panels button:hover{border-color:#bfdbfe;background:#f8fbff}.quantity-panels button>span{position:absolute;inset:16px 16px 42px}.quantity-panels button>b{position:absolute;right:0;bottom:0;left:0;padding:10px;color:#64748b;font-size:10px;letter-spacing:.12em}.quantity-panels.is-hidden button>span{opacity:0}.quantity-panels.is-hidden button{background:#f8fafc}.quantity-panels.is-hidden button::after{content:'?';position:absolute;inset:0;display:grid;place-items:center;color:#94a3b8;font-size:52px;font-weight:900}.quantity-panels.is-hidden button>b{z-index:2}.quantity-panels.is-idle button>span{display:grid;place-items:center;color:#64748b}.quantity-panels.is-idle button>span em{font-style:normal;font-size:24px;line-height:1.5}
.growth-game-card--ghep-cap-sieu-toc .growth-game-icon{background:#f5f3ff}.growth-game-card--dem-chop-nhoang .growth-game-icon{background:#eff6ff}.growth-game-card--ben-nao-nhieu-hon .growth-game-icon{background:#f0fdf4}
@media(max-width:640px){.match-pairs-board{gap:5px;padding:7px;border-radius:16px;min-height:280px}.pair-card{border-radius:9px}.flash-count-field{height:310px;min-height:250px}.flash-count-choices{grid-template-columns:repeat(2,1fr)}.flash-count-choices button{min-height:48px}.quantity-panels{gap:7px}.quantity-panels button{min-height:280px;border-radius:16px}.quantity-panels button>span{inset:10px 10px 38px}}


/* v0.7.10 - Growth Funnel & Replay UX */
.result-action.result-share-action.is-growth-share{border-color:#f59e0b;background:#fff7ed;color:#9a3412}
.result-action.result-share-action.is-growth-share:hover{background:#ffedd5;border-color:#fb923c}
.result-action.result-share-action.is-rematch-share{border-color:#f59e0b;background:#f59e0b;color:#fff;box-shadow:0 8px 22px rgba(245,158,11,.18)}
.result-next-growth{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.result-card.is-growth-result .session-result-actions{padding-top:2px}
.result-card.is-growth-result .result-action[data-session-new]{background:#172033;color:#fff;border-color:#172033}
.result-challenge-compare[data-challenge-verdict="won"]{position:relative;overflow:hidden;border-color:#86efac;background:linear-gradient(135deg,#ecfdf5,#f0fdf4)}
.result-challenge-compare[data-challenge-verdict="won"] strong{font-size:15px;color:#15803d}
.result-challenge-compare[data-challenge-verdict="won"]::after{content:'✓';position:absolute;right:10px;top:8px;color:#16a34a;font-size:28px;font-weight:950;opacity:.18}
.result-challenge-compare[data-challenge-verdict="lost"]{border-color:#fecaca;background:linear-gradient(135deg,#fff7f7,#fff)}
.result-challenge-compare[data-challenge-verdict="lost"] strong{font-size:14px;color:#b91c1c}
.result-challenge-compare[data-challenge-verdict="tie"]{border-color:#fde68a;background:#fffbeb}
.shared-challenge-card{background:linear-gradient(180deg,#fff,#fbfdff)}
.challenge-overline{padding:6px 9px;border-radius:999px;background:#fff7ed;color:#9a3412}
.challenge-target{border-color:#dbeafe;background:linear-gradient(135deg,#eff6ff,#fff)}
.challenge-play{min-width:min(100%,280px);min-height:48px;background:#172033;box-shadow:0 12px 28px rgba(15,23,42,.16);transition:transform .12s ease,box-shadow .12s ease}
.challenge-play:hover{transform:translateY(-1px);box-shadow:0 15px 34px rgba(15,23,42,.2)}
.challenge-question{color:#475569;font-weight:750}
@media(min-width:960px){
  .result-card.is-growth-result .session-result-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
  .result-card.is-growth-result .session-result-actions .result-action{min-height:42px}
  .result-card.is-growth-result .session-result-actions [data-session-settings-result]{grid-column:auto}
}
@media(max-width:640px){
  .result-card.is-growth-result .session-result-actions{grid-template-columns:1fr 1fr}
  .result-card.is-growth-result .result-share-action.is-rematch-share{grid-column:1/-1;order:-1}
  .challenge-play{width:100%}
}
.result-next-growth[hidden]{display:none!important}


/* v0.7.11 Growth Onboarding & Share UX */
.growth-result-share-card{display:grid;gap:5px;margin:10px 0 12px;padding:14px 15px;border:1px solid #fde68a;border-radius:15px;background:linear-gradient(135deg,#fffbeb,#fff);text-align:left;box-shadow:0 8px 22px rgba(146,64,14,.06)}
.growth-result-share-card>span{color:#92400e;font-size:8px;font-weight:950;letter-spacing:.1em;text-transform:uppercase}
.growth-result-share-card>strong{color:#172033;font-size:24px;line-height:1.05;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.growth-result-share-card>div{display:flex;align-items:center;justify-content:space-between;gap:10px}
.growth-result-share-card b{color:#b45309;font-size:10px}.growth-result-share-card em{color:#78716c;font-size:9px;font-style:normal;text-align:right}
.result-copy-share{border-style:dashed!important}.result-copy-share[hidden]{display:none!important}
@media(min-width:960px){.result-card.is-growth-result .growth-result-share-card{grid-column:1/-1}.result-card.is-growth-result .session-result-actions{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:640px){.growth-result-share-card{padding:12px 13px}.growth-result-share-card>strong{font-size:22px}.growth-result-share-card>div{align-items:flex-start;flex-direction:column;gap:3px}.growth-result-share-card em{text-align:left}.result-card.is-growth-result .session-result-actions{grid-template-columns:1fr 1fr}.result-card.is-growth-result .result-share-action.is-rematch-share{grid-column:1/-1;order:-2}.result-card.is-growth-result .result-copy-share:not([hidden]){grid-column:1/-1;order:-1}}

/* v0.7.12 — SEO & Social Discovery */
.game-discovery-content{max-width:900px;margin:18px auto 0;padding:24px;border:1px solid #e3e8ef;border-radius:20px;background:#fff;box-shadow:0 8px 28px rgba(15,23,42,.04)}
.game-discovery-head{display:grid;gap:5px;margin-bottom:12px}.game-discovery-kicker{color:#64748b;font-size:9px;font-weight:900;letter-spacing:.12em}.game-discovery-head h2{margin:0;color:#172033;font-size:clamp(22px,3vw,30px);line-height:1.18;letter-spacing:-.025em}.game-discovery-copy{display:grid;gap:8px}.game-discovery-copy p{margin:0;color:#566274;font-size:14px;line-height:1.72}.game-discovery-highlights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;margin:18px 0 0;padding:0;list-style:none}.game-discovery-highlights li{position:relative;padding:10px 12px 10px 31px;border-radius:12px;background:#f8fafc;color:#344054;font-size:12px;font-weight:750}.game-discovery-highlights li:before{content:'✓';position:absolute;left:11px;top:9px;color:#16a34a;font-weight:950}.game-faq-block{margin-top:22px;padding-top:18px;border-top:1px solid #e7ebf0}.game-faq-block h3,.related-growth-head h3{margin:0;color:#202a3a;font-size:16px}.game-faq-item{border-bottom:1px solid #edf0f4}.game-faq-item summary{padding:12px 2px;color:#344054;font-size:13px;font-weight:800;cursor:pointer}.game-faq-item p{margin:0;padding:0 2px 13px;color:#667085;font-size:12.5px;line-height:1.65}.related-growth-games{margin-top:22px;padding-top:18px;border-top:1px solid #e7ebf0}.related-growth-head{display:flex;align-items:end;justify-content:space-between;gap:10px;margin-bottom:10px}.related-growth-head span{color:#8490a3;font-size:10px;font-weight:700}.related-growth-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.related-growth-card{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:4px 9px;min-width:0;padding:12px;border:1px solid #e4e9f0;border-radius:13px;background:#fbfcfe;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}.related-growth-card:hover{transform:translateY(-1px);border-color:#cbd5e1;box-shadow:0 7px 18px rgba(15,23,42,.05)}.related-growth-card>span{grid-row:1/3;font-size:23px}.related-growth-card>strong{min-width:0;overflow:hidden;color:#253044;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.related-growth-card>small{color:#2563eb;font-size:9px;font-weight:850}
@media(max-width:640px){.game-discovery-content{margin-top:10px;padding:18px 15px;border-radius:16px}.game-discovery-copy p{font-size:13px}.game-discovery-highlights{grid-template-columns:1fr;gap:6px}.related-growth-grid{grid-template-columns:1fr}.related-growth-head{align-items:start;flex-direction:column}.game-faq-item summary{font-size:12.5px}}

/* v0.7.13 — subtler hard rounds for Tìm hình khác biệt */
.odd-cell .odd-svg{width:clamp(28px,66%,48px);height:auto;display:block;color:#263244;overflow:visible}
.odd-one-out-board[style*="--odd-cols: 7"] .odd-svg,.odd-one-out-board[style*="--odd-cols: 8"] .odd-svg{width:72%}

/* v0.7.13 — 2048 progress and move efficiency */
.speed-2048-progress{display:grid;gap:5px;width:min(92vw,440px)}
.speed-2048-progress>div{height:6px;border-radius:999px;background:#e7e0d7;overflow:hidden}.speed-2048-progress i{display:block;width:0;height:100%;border-radius:inherit;background:#334155;transition:width .18s ease}
.speed-2048-progress>span{color:#64748b;font-size:10px;font-weight:750;text-align:center;font-variant-numeric:tabular-nums}


/* v0.7.15 Challenge Viral V2 */
.challenge-social-proof{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #eef2f7;width:min(100%,430px)}
.challenge-social-proof span{display:grid;gap:1px;min-width:92px;padding:8px 10px;border-radius:12px;background:#f8fafc;color:#64748b;font-size:9px}
.challenge-social-proof strong{color:#172033;font-size:15px;font-variant-numeric:tabular-nums}
.challenge-how small{margin-top:4px;color:#8490a3;font-size:9px;line-height:1.55}
.challenge-viral-panel{border-color:#dbeafe;background:linear-gradient(180deg,#fff,#fbfdff)}
.challenge-viral-metrics{grid-template-columns:repeat(7,minmax(0,1fr));margin:12px 0 16px}
.challenge-viral-table td,.challenge-viral-table th{white-space:nowrap}
@media(max-width:1100px){.challenge-viral-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){.challenge-viral-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.challenge-social-proof{display:grid;grid-template-columns:repeat(3,1fr)}.challenge-social-proof span{min-width:0}}

/* v0.7.17 Gameplay Quality Pass II */
.nback-actions.is-disabled{opacity:.5}
.nback-actions button:disabled{cursor:default;filter:saturate(.45)}

/* v0.7.19 · Gameplay Quality Pass IV */
.number-board.is-idle-preview{display:flex;align-items:center;justify-content:center;min-height:min(520px,calc(100dvh - 245px));aspect-ratio:1/1;border:1px dashed #d8dee8;border-radius:16px;background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(248,250,252,.9))}
.number-hidden-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:24px;text-align:center;color:#64748b}
.number-hidden-preview strong{font-size:52px;line-height:1;filter:grayscale(.2)}
.number-hidden-preview span{max-width:250px;font-size:12px;line-height:1.5;font-weight:800}
@media(max-width:640px){.number-board.is-idle-preview{width:min(100%,calc(100dvw - 38px));min-height:min(calc(100dvw - 38px),calc(100dvh - 226px))}.number-hidden-preview strong{font-size:44px}}

/* v0.7.20 · Gameplay Polish & Retention */
.game-feedback-layer{position:absolute;z-index:6;inset:0;pointer-events:none;overflow:hidden;border-radius:inherit}
.game-feedback-mark{position:absolute;top:12px;right:12px;display:grid;width:38px;height:38px;place-items:center;border-radius:999px;background:rgba(255,255,255,.92);box-shadow:0 8px 22px rgba(15,23,42,.10);font-size:22px;font-weight:950;opacity:0;transform:scale(.78)}
.game-feedback-layer.show-mark .game-feedback-mark{animation:gameFeedbackMark .22s ease-out both}
.game-feedback-combo{position:absolute;top:14px;left:50%;padding:7px 11px;border:1px solid #fed7aa;border-radius:999px;background:rgba(255,247,237,.96);box-shadow:0 9px 24px rgba(154,52,18,.10);color:#9a3412;font-size:11px;font-weight:900;opacity:0;transform:translate(-50%,-6px)}
.game-feedback-layer.show-combo .game-feedback-combo{animation:gameComboPop .76s ease both}
.game-root-wrap.feedback-correct{box-shadow:inset 0 0 0 2px rgba(34,197,94,.14)}
.game-root-wrap.feedback-wrong{box-shadow:inset 0 0 0 2px rgba(239,68,68,.16)}
.game-root-wrap.feedback-correct .game-feedback-mark{color:#15803d}.game-root-wrap.feedback-wrong .game-feedback-mark{color:#b91c1c}
@keyframes gameFeedbackMark{0%{opacity:0;transform:scale(.72)}38%{opacity:.88;transform:scale(1.04)}100%{opacity:0;transform:scale(.96)}}
@keyframes gameComboPop{0%{opacity:0;transform:translate(-50%,-6px) scale(.94)}18%,72%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-4px) scale(.98)}}
.result-card:not([hidden]){animation:resultCardIn .2s ease-out both}
.result-card.has-new-pb{border-color:#fed7aa;box-shadow:0 18px 44px rgba(154,52,18,.10)}
.result-retention-nudge{display:grid;gap:3px;margin:9px 0 2px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;text-align:left}
.result-retention-nudge>span{color:#7c8798;font-size:8px;font-weight:950;letter-spacing:.1em}
.result-retention-nudge>strong{color:#253044;font-size:13px}.result-retention-nudge>small{color:#667085;font-size:10.5px;line-height:1.45}
.result-retention-nudge.is-pb{border-color:#fed7aa;background:#fff7ed}.result-retention-nudge.is-pb>span,.result-retention-nudge.is-pb>strong{color:#9a3412}
.result-retention-nudge.is-clean{border-color:#bbf7d0;background:#f0fdf4}.result-retention-nudge.is-clean>strong{color:#166534}
.result-retention-nudge.is-streak{border-color:#fde68a;background:#fffbeb}.result-retention-nudge.is-streak>strong{color:#92400e}
.result-retention-nudge.is-incomplete{border-color:#e5e7eb;background:#fafafa}
.result-core-summary{grid-template-columns:repeat(6,minmax(0,1fr))}
@keyframes resultCardIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px){.result-core-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.game-feedback-combo{top:10px}.game-feedback-mark{width:34px;height:34px;font-size:20px}}
@media(max-width:380px){.result-core-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.game-feedback-layer.show-mark .game-feedback-mark,.game-feedback-layer.show-combo .game-feedback-combo,.result-card:not([hidden]){animation:none}.game-feedback-layer.show-mark .game-feedback-mark{opacity:.72}.game-feedback-layer.show-combo .game-feedback-combo{opacity:1;transform:translate(-50%,0)}}
@media(max-width:380px){.result-core-summary>div:last-of-type{grid-column:auto}}

/* v0.7.21.1 hotfix — result card must obey the native hidden state.
   Desktop v0.7.8.2 added display:grid to .compact-result, which otherwise
   overrides the browser [hidden]{display:none} rule. */
.compact-result[hidden]{display:none!important}

/* v0.7.22 — Realm / Stage / Level / EXP progression */
.cultivation-flash{margin:0 0 14px;padding:12px 14px;border:1px solid var(--line,#273449);border-radius:12px;background:rgba(255,255,255,.03);font-weight:700}.cultivation-flash.is-ok{border-color:rgba(42,180,120,.55)}.cultivation-flash.is-warn{border-color:rgba(230,166,58,.55)}
.cultivation-decay-note{margin:10px 0 0;padding:9px 11px;border-radius:10px;background:rgba(230,166,58,.10);font-size:.9rem}
.breakthrough-panel,.realm-rank-panel{margin-top:16px;padding:18px;border:1px solid var(--line,#273449);border-radius:16px;background:var(--panel,#121a26)}
.breakthrough-panel.is-ready{box-shadow:0 0 0 1px rgba(82,196,140,.25) inset}.breakthrough-head,.realm-rank-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.breakthrough-head h3,.realm-rank-head h3,.cultivation-section-head h3{margin:4px 0 0}.breakthrough-head>strong{white-space:nowrap;font-size:1.05rem}
.breakthrough-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}.breakthrough-checks>div{display:flex;flex-direction:column;gap:4px;padding:12px;border:1px solid var(--line,#273449);border-radius:12px}.breakthrough-checks>div.is-done{border-color:rgba(82,196,140,.45);background:rgba(82,196,140,.06)}.breakthrough-checks span,.breakthrough-rule-copy,.breakthrough-missing{font-size:.88rem;opacity:.78}.breakthrough-missing{display:flex;flex-wrap:wrap;gap:8px 16px}.breakthrough-form{margin-top:14px}.breakthrough-form button{padding:11px 16px;border:0;border-radius:10px;font-weight:800;cursor:pointer}
.realm-rank-chase{margin:6px 0 0;color:#7c8798;font-size:11px;line-height:1.5}.realm-rank-chase b{color:#334155}.realm-rank-chase strong{color:#2563eb}.realm-rank-chase.is-top{color:#15803d;font-weight:800}
.realm-rank-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.realm-rank-columns h4{margin:0 0 8px}.realm-rank-list{display:flex;flex-direction:column;gap:6px}.realm-rank-row{display:grid;grid-template-columns:54px minmax(100px,1fr) auto;gap:10px;align-items:center;padding:9px 10px;border:1px solid var(--line,#273449);border-radius:10px}.realm-rank-row.is-me{outline:2px solid rgba(82,196,140,.45);background:rgba(82,196,140,.06)}.realm-rank-row small{text-align:right;opacity:.72}.cultivation-section-head{margin:18px 2px 10px}.cultivation-section-head p{margin:5px 0 0;opacity:.75}.cultivation-coverage small{display:block;font-size:.72rem;opacity:.65}
@media(max-width:760px){.breakthrough-checks,.realm-rank-columns{grid-template-columns:1fr}.breakthrough-head,.realm-rank-head{flex-direction:column}.realm-rank-row{grid-template-columns:46px 1fr}.realm-rank-row small{grid-column:2;text-align:left}}

/* v0.7.22.2 breakthrough coach */
.breakthrough-coach{margin-top:14px;padding-top:14px;border-top:1px solid var(--line,#273449)}.breakthrough-coach-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:9px}.breakthrough-coach-head>div{display:grid;gap:2px}.breakthrough-coach-head b{font-size:.96rem}.breakthrough-coach-head span,.breakthrough-coach-head small{font-size:.78rem;opacity:.7}.breakthrough-coach-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.breakthrough-coach-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 12px;align-items:center;padding:11px 12px;border:1px solid var(--line,#273449);border-radius:12px;background:rgba(255,255,255,.025);color:inherit;text-decoration:none}.breakthrough-coach-card:hover{border-color:rgba(82,196,140,.55);background:rgba(82,196,140,.055)}.breakthrough-coach-title,.breakthrough-coach-score{display:grid;gap:2px;min-width:0}.breakthrough-coach-title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.breakthrough-coach-title small,.breakthrough-coach-score small{font-size:.72rem;opacity:.68}.breakthrough-coach-score{text-align:right}.breakthrough-coach-score b{font-size:.9rem}.breakthrough-coach-cta{grid-column:1/-1;font-size:.78rem;font-weight:800;color:var(--primary,#4da3ff)}
@media(max-width:760px){.breakthrough-coach-head{align-items:flex-start;flex-direction:column}.breakthrough-coach-list{grid-template-columns:1fr}.breakthrough-coach-card{grid-template-columns:minmax(0,1fr) auto}}


/* v0.7.23 — cultivation level/stage/realm celebrations + recovery */
.cultivation-celebration{width:min(92vw,560px);padding:0;border:0;border-radius:22px;background:transparent;color:inherit;overflow:visible}.cultivation-celebration::backdrop{background:rgba(5,10,18,.72);backdrop-filter:blur(5px)}.cultivation-celebration-card{position:relative;display:grid;justify-items:center;gap:10px;padding:30px 26px 24px;border:1px solid rgba(148,163,184,.28);border-radius:22px;background:linear-gradient(180deg,#172131,#101722);box-shadow:0 28px 90px rgba(0,0,0,.42);text-align:center}.cultivation-celebration-icon{display:grid;width:66px;height:66px;place-items:center;border:1px solid rgba(77,163,255,.45);border-radius:999px;background:rgba(77,163,255,.10);font-size:31px;font-weight:900;box-shadow:0 0 0 10px rgba(77,163,255,.035)}.cultivation-celebration h2{margin:0;font-size:1.65rem}.cultivation-celebration p{max-width:430px;margin:0;color:#aeb9c9;line-height:1.55}.cultivation-celebration small{color:#92a0b4;font-weight:750}.cultivation-celebration-path{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:7px 10px;padding:9px 12px;border-radius:12px;background:rgba(255,255,255,.04);font-size:.88rem}.cultivation-celebration-path span{color:#8f9bad}.cultivation-celebration-path strong{color:#f4f7fb}.cultivation-celebration-path b{color:#64748b}.cultivation-celebration-confirm{margin-top:4px;padding:11px 18px;border:0;border-radius:11px;background:#eef4ff;color:#172033;font-weight:900;cursor:pointer}.cultivation-celebration-close{position:absolute;top:12px;right:13px;width:34px;height:34px;border:0;border-radius:999px;background:rgba(255,255,255,.06);color:#c7d0dc;font-size:22px;cursor:pointer}.cultivation-celebration.is-stage .cultivation-celebration-icon{border-color:rgba(245,158,11,.5);background:rgba(245,158,11,.1);box-shadow:0 0 0 10px rgba(245,158,11,.035)}.cultivation-celebration.is-realm .cultivation-celebration-card{border-color:rgba(250,204,21,.32);background:radial-gradient(circle at 50% 0,rgba(250,204,21,.10),transparent 42%),linear-gradient(180deg,#1b2230,#101722)}.cultivation-celebration.is-realm .cultivation-celebration-icon{border-color:rgba(250,204,21,.55);background:rgba(250,204,21,.12);box-shadow:0 0 0 10px rgba(250,204,21,.04);font-size:34px}@media(max-width:600px){.cultivation-celebration-card{padding:27px 17px 20px}.cultivation-celebration h2{font-size:1.38rem}.cultivation-celebration-path{font-size:.8rem}.cultivation-celebration-icon{width:58px;height:58px;font-size:27px}}@media(prefers-reduced-motion:no-preference){.cultivation-celebration[open] .cultivation-celebration-card{animation:cultivationCelebrationIn .28s ease-out both}.cultivation-celebration[open] .cultivation-celebration-icon{animation:cultivationCelebrationIcon .5s .06s ease-out both}@keyframes cultivationCelebrationIn{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:none}}@keyframes cultivationCelebrationIcon{0%{transform:scale(.72);opacity:.2}65%{transform:scale(1.08);opacity:1}100%{transform:scale(1);opacity:1}}}

/* v0.7.23 cultivation recovery */
.cultivation-recovery-panel{margin-top:16px;padding:18px;border:1px solid var(--line,#273449);border-radius:16px;background:var(--panel,#121a26)}
.cultivation-recovery-panel.is-active{border-color:rgba(82,196,140,.38);box-shadow:0 0 0 1px rgba(82,196,140,.10) inset}
.cultivation-recovery-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.cultivation-recovery-head h3{margin:4px 0 0}.cultivation-recovery-head>strong{white-space:nowrap;padding:6px 9px;border-radius:999px;background:rgba(82,196,140,.10);font-size:.83rem}
.cultivation-recovery-route{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center;margin:14px 0}.cultivation-recovery-route>div{display:grid;gap:3px;padding:12px;border:1px solid var(--line,#273449);border-radius:12px}.cultivation-recovery-route span{font-size:.76rem;opacity:.68}.cultivation-recovery-route i{font-style:normal;opacity:.55}.cultivation-recovery-copy{margin:0;font-size:.88rem;opacity:.8;line-height:1.5}.cultivation-recovery-gain{margin-top:10px;padding:9px 11px;border-radius:10px;background:rgba(82,196,140,.08);font-size:.86rem}
.cultivation-decay-history{margin-top:14px;border-top:1px solid var(--line,#273449);padding-top:12px}.cultivation-decay-history summary{cursor:pointer;font-weight:800;font-size:.88rem}.cultivation-decay-list{display:grid;gap:7px;margin-top:9px}.cultivation-decay-row{display:grid;grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr);gap:12px;padding:9px 10px;border-radius:10px;background:rgba(255,255,255,.025);font-size:.82rem}.cultivation-decay-row>span:first-child{display:grid;gap:2px}.cultivation-decay-row small{font-size:.7rem;opacity:.62}.cultivation-decay-row>span:last-child{text-align:right}.cultivation-decay-row i{font-style:normal;opacity:.5;margin:0 4px}
@media(max-width:760px){.cultivation-recovery-head{flex-direction:column}.cultivation-recovery-route{grid-template-columns:1fr}.cultivation-recovery-route>i{transform:rotate(90deg);justify-self:center}.cultivation-decay-row{grid-template-columns:1fr}.cultivation-decay-row>span:last-child{text-align:left}}

/* v0.7.23.1 cultivation risk + recovery guidance */
.cultivation-risk{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding:10px 12px;border:1px solid rgba(230,166,58,.32);border-radius:11px;background:rgba(230,166,58,.08)}.cultivation-risk.is-danger{border-color:rgba(239,100,100,.38);background:rgba(239,100,100,.08)}.cultivation-risk>span{display:grid;gap:2px}.cultivation-risk b{font-size:.86rem}.cultivation-risk small{font-size:.72rem;opacity:.7}.cultivation-risk a,.cultivation-recovery-actions a{display:inline-flex;align-items:center;justify-content:center;padding:8px 10px;border-radius:9px;background:var(--primary,#4da3ff);color:#fff;text-decoration:none;font-size:.78rem;font-weight:800;white-space:nowrap}.cultivation-recovery-meter{display:grid;gap:7px;margin:12px 0;padding:12px;border:1px solid rgba(82,196,140,.24);border-radius:12px;background:rgba(82,196,140,.045)}.cultivation-recovery-meter>div:first-child{display:flex;justify-content:space-between;gap:10px;font-size:.82rem}.cultivation-recovery-meter small{font-size:.72rem;opacity:.7;line-height:1.45}.cultivation-recovery-bar{height:7px;border-radius:999px;background:rgba(255,255,255,.09);overflow:hidden}.cultivation-recovery-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#52c48c,#4da3ff)}.cultivation-recovery-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}.cultivation-recovery-actions a.secondary{background:transparent;color:inherit;border:1px solid var(--line,#273449)}
@media(max-width:640px){.cultivation-risk{align-items:flex-start;flex-direction:column}.cultivation-risk a{width:100%}.cultivation-recovery-actions{display:grid;grid-template-columns:1fr}.cultivation-recovery-actions a{width:100%}}

/* v0.7.23.2 · Progression pace guidance */
.cultivation-pace{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid rgba(255,255,255,.07)}.cultivation-pace>span{display:grid;gap:2px}.cultivation-pace b{font-size:.78rem}.cultivation-pace small{font-size:.7rem;opacity:.66}@media(max-width:640px){.cultivation-pace{display:grid;grid-template-columns:1fr 1fr;gap:10px}.cultivation-pace>span{min-width:0}}


/* v0.7.24.3 — result UX: viewport-centered modal + clean ready reset */
.game-page.has-result:not(.result-mode-inline)::before{content:"";position:fixed;inset:0;z-index:60;background:rgba(15,23,42,.38);backdrop-filter:blur(2px)}
.game-page.has-result:not(.result-mode-inline) .compact-result{position:fixed!important;z-index:65!important;top:50%!important;right:auto!important;bottom:auto!important;left:50%!important;width:min(760px,calc(100vw - 40px))!important;max-height:min(84dvh,780px)!important;overflow:auto!important;transform:translate(-50%,-50%)!important;margin:0!important;overscroll-behavior:contain}
.game-page.has-result:not(.result-mode-inline) .compact-result.has-rank-context{width:min(820px,calc(100vw - 40px))!important}
.game-page.result-mode-inline .compact-result{position:relative!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;width:100%!important;max-height:none!important;transform:none!important;margin:14px 0 0!important}
.game-page.result-mode-inline.has-result::before{display:none!important}
@media(max-width:700px){.game-page.has-result:not(.result-mode-inline)::before{background:rgba(15,23,42,.5)}.game-page.has-result:not(.result-mode-inline) .compact-result,.game-page.has-result:not(.result-mode-inline) .compact-result.has-rank-context{top:auto!important;right:max(8px,env(safe-area-inset-right))!important;bottom:max(8px,env(safe-area-inset-bottom))!important;left:max(8px,env(safe-area-inset-left))!important;width:auto!important;max-height:min(82dvh,720px)!important;transform:none!important;border-radius:20px!important}}

/* v0.7.25 — canonical community cultivation leaderboard */
.realm-me-summary{display:grid;grid-template-columns:minmax(150px,.7fr) minmax(220px,1.3fr) auto;gap:18px;align-items:center;margin:14px 0 18px;padding:16px 18px;border:1px solid var(--line,#dfe5ee);border-radius:16px;background:var(--panel-soft,#f8fafc)}
.realm-me-summary>div{display:flex;flex-direction:column;gap:4px}.realm-me-summary>div:first-child strong{font-size:22px}.realm-me-summary>div small{opacity:.7}.realm-me-summary>span{font-size:13px;opacity:.78;text-align:right}.realm-me-summary.is-top{box-shadow:inset 3px 0 0 #f59e0b}.realm-board-subtitle{margin:16px 0 8px;font-size:14px}.realm-board-total{font-size:12px;opacity:.7;white-space:nowrap}.realm-community-row.is-me{box-shadow:inset 3px 0 0 #2563eb;background:rgba(37,99,235,.045)}.realm-around-community{margin-top:20px;padding-top:4px;border-top:1px solid var(--line,#e5e7eb)}
@media(max-width:760px){.realm-me-summary{grid-template-columns:1fr;gap:10px}.realm-me-summary>span{text-align:left}.realm-community-row{grid-template-columns:52px minmax(0,1fr) auto}.realm-community-row>span:nth-child(3){display:none}}

/* v0.7.25 - Puzzle Pack: Minesweeper, Sudoku 9x9, Kakuro */
.minesweeper-stage,.sudoku-full-stage,.kakuro-stage{display:grid;justify-items:center;gap:10px;padding:8px 0 4px}.minesweeper-hud{flex-wrap:wrap}.xp-face{width:38px;height:34px;border:2px outset #d1d5db;border-radius:2px;background:#d4d0c8;font-size:20px;line-height:1;cursor:pointer}.mine-flag-mode.is-active{background:#fff1f2;border-color:#fb7185}.minesweeper-frame{max-width:100%;overflow:auto;padding:7px;border:3px ridge #d4d0c8;background:#c0c0c0;box-shadow:inset 1px 1px #fff,inset -1px -1px #808080}.minesweeper-board{display:grid;grid-template-columns:repeat(var(--mine-cols),24px);grid-template-rows:repeat(var(--mine-rows),24px);gap:0;background:#bdbdbd;touch-action:manipulation;user-select:none}.mine-cell{display:grid;place-items:center;width:24px;height:24px;padding:0;border:2px outset #ececec;border-radius:0;background:#c0c0c0;color:#111827;font:900 15px/1 Arial,sans-serif;cursor:pointer}.mine-cell.is-open{border:1px solid #8b8b8b;background:#c0c0c0}.mine-cell.is-flag{color:#dc2626}.mine-cell.is-mine{background:#d1d5db}.mine-cell.is-exploded{background:#ef4444}.mine-cell.n1{color:#0000ff}.mine-cell.n2{color:#008000}.mine-cell.n3{color:#ff0000}.mine-cell.n4{color:#000080}.mine-cell.n5{color:#800000}.mine-cell.n6{color:#008080}.mine-cell.n7{color:#000}.mine-cell.n8{color:#666}.mine-counter{background:#111;border-radius:2px;border:2px inset #d4d0c8}.mine-counter span{color:#fca5a5}.mine-counter strong{color:#ff2b2b;font-family:monospace;font-size:17px}

.sudoku-full-board{display:grid;grid-template-columns:repeat(9,1fr);width:min(92vw,500px);aspect-ratio:1;border:3px solid #172033;background:#172033;gap:1px}.sudoku-full-idle{grid-column:1/-1;display:grid;place-items:center;align-content:center;gap:5px;background:#f8fafc;color:#64748b}.sudoku-full-idle strong{font-size:44px;color:#172033}.sudoku-full-cell{position:relative;display:grid;place-items:center;min-width:0;padding:0;border:0;background:#fff;color:#172033;font:800 clamp(18px,4vw,28px)/1 system-ui;cursor:pointer}.sudoku-full-cell:nth-child(3n):not(:nth-child(9n)){box-shadow:2px 0 0 #172033}.sudoku-full-cell:nth-child(n+19):nth-child(-n+27),.sudoku-full-cell:nth-child(n+46):nth-child(-n+54){box-shadow:0 2px 0 #172033}.sudoku-full-cell:nth-child(3n):not(:nth-child(9n)):nth-child(n+19):nth-child(-n+27),.sudoku-full-cell:nth-child(3n):not(:nth-child(9n)):nth-child(n+46):nth-child(-n+54){box-shadow:2px 0 0 #172033,0 2px 0 #172033}.sudoku-full-cell.is-given{background:#eef2f7;color:#0f172a}.sudoku-full-cell.is-peer{background:#f8fafc}.sudoku-full-cell.is-same{background:#e0f2fe}.sudoku-full-cell.is-selected{background:#dbeafe;outline:2px solid #2563eb;outline-offset:-2px}.sudoku-full-cell.is-wrong{animation:sudokuWrong .2s ease;background:#fee2e2}.sudoku-notes{position:absolute;inset:2px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);align-items:center;justify-items:center;font-size:clamp(7px,1.7vw,10px);font-weight:650;color:#64748b}.sudoku-notes i{font-style:normal}.sudoku-full-pad,.kakuro-pad{display:grid;grid-template-columns:repeat(9,1fr);gap:4px;width:min(92vw,500px)}.sudoku-full-pad button,.kakuro-pad button,.sudoku-full-actions button,.kakuro-actions button{min-height:38px;border:1px solid #d9e0e8;border-radius:9px;background:#fff;font-weight:850;cursor:pointer}.sudoku-full-actions,.kakuro-actions{display:flex;gap:8px}.sudoku-full-hud{flex-wrap:wrap}@keyframes sudokuWrong{50%{transform:scale(.93)}}

.kakuro-board{display:grid;grid-template-columns:repeat(var(--k-cols),minmax(46px,64px));gap:1px;padding:3px;border:2px solid #172033;background:#172033;max-width:100%;overflow:auto}.kakuro-idle{grid-column:1/-1;min-width:300px;min-height:260px;display:grid;place-items:center;align-content:center;gap:8px;background:#f8fafc;color:#64748b}.kakuro-idle strong{font-size:48px;color:#172033}.kakuro-fill,.kakuro-clue{aspect-ratio:1;min-width:0;border:0}.kakuro-fill{display:grid;place-items:center;background:#fff;color:#172033;font:850 clamp(17px,3vw,26px)/1 system-ui;cursor:pointer}.kakuro-fill.is-selected{background:#dbeafe;outline:2px solid #2563eb;outline-offset:-2px}.kakuro-fill.is-wrong{background:#fee2e2}.kakuro-clue{position:relative;background:#253044;color:#fff}.kakuro-clue.has-clue:after{content:"";position:absolute;inset:0;background:linear-gradient(to top right,transparent 49%,#94a3b8 49.5%,#94a3b8 50.5%,transparent 51%);pointer-events:none}.kakuro-down,.kakuro-across{position:absolute;z-index:1;font-size:10px;font-weight:800;line-height:1}.kakuro-across{top:6px;right:6px}.kakuro-down{bottom:6px;left:6px}

@media(max-width:700px){.minesweeper-board{grid-template-columns:repeat(var(--mine-cols),22px);grid-template-rows:repeat(var(--mine-rows),22px)}.mine-cell{width:22px;height:22px;font-size:13px}.sudoku-full-board{width:min(96vw,460px)}.kakuro-board{grid-template-columns:repeat(var(--k-cols),minmax(38px,52px))}.kakuro-down,.kakuro-across{font-size:9px}.sudoku-full-pad,.kakuro-pad{width:min(96vw,460px)}}


/* v0.7.25.1 - Puzzle Pack II: Nonogram + Tower of Hanoi */
.nonogram-stage,.hanoi-stage{display:grid;justify-items:center;gap:12px;padding:8px 0 4px}.nonogram-wrap{display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;gap:2px;max-width:100%;overflow:auto;padding:4px}.nonogram-corner{grid-column:1;grid-row:1;min-width:52px}.nonogram-col-clues{grid-column:2;grid-row:1;display:grid;grid-template-columns:repeat(var(--nonogram-size),minmax(24px,34px));gap:1px}.nonogram-col-clues>div{min-height:52px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;padding:2px;font-size:10px;font-weight:800;color:#475569}.nonogram-row-clues{grid-column:1;grid-row:2;display:grid;grid-template-rows:repeat(var(--nonogram-size),minmax(24px,34px));gap:1px}.nonogram-row-clues>div{min-width:52px;display:flex;align-items:center;justify-content:flex-end;padding:0 5px;font-size:10px;font-weight:800;color:#475569;white-space:nowrap}.nonogram-board{grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(var(--nonogram-size),minmax(24px,34px));grid-template-rows:repeat(var(--nonogram-size),minmax(24px,34px));gap:1px;background:#94a3b8;border:2px solid #334155}.nonogram-cell{display:grid;place-items:center;min-width:24px;aspect-ratio:1;border:0;background:#fff;color:#94a3b8;font-weight:900;font-size:16px;cursor:pointer}.nonogram-cell.is-filled{background:#172033;color:#fff}.nonogram-cell.is-crossed{background:#f8fafc;color:#94a3b8}.nonogram-idle{grid-column:1/-1;min-width:260px;min-height:220px;display:grid;place-items:center;align-content:center;gap:8px;background:#f8fafc;color:#64748b}.nonogram-idle strong{font-size:46px;color:#172033}.nonogram-actions button{min-height:38px;border:1px solid #d9e0e8;border-radius:9px;background:#fff;font-weight:850;cursor:pointer}
.hanoi-board{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:12px;width:min(94vw,720px);min-height:310px;align-items:end;padding:18px 12px 10px;border:1px solid #dbe2ea;border-radius:18px;background:linear-gradient(#f8fafc,#eef2f7)}.hanoi-peg{position:relative;height:270px;border:0;background:transparent;cursor:pointer;padding:0}.hanoi-peg.is-selected{background:rgba(37,99,235,.06);border-radius:12px}.hanoi-pole{position:absolute;left:50%;bottom:28px;width:10px;height:210px;transform:translateX(-50%);border-radius:8px 8px 0 0;background:#8b5e3c}.hanoi-base{position:absolute;left:8%;right:8%;bottom:20px;height:12px;border-radius:8px;background:#70452d}.hanoi-stack{position:absolute;left:4%;right:4%;bottom:32px;display:flex;flex-direction:column-reverse;align-items:center;gap:2px}.hanoi-disc{display:block;height:24px;width:calc(30% + (var(--disc) / var(--max))*62%);border-radius:8px;background:linear-gradient(180deg,#60a5fa,#2563eb);border:1px solid rgba(15,23,42,.22);box-shadow:inset 0 1px rgba(255,255,255,.4)}.hanoi-disc:nth-child(2n){background:linear-gradient(180deg,#f59e0b,#d97706)}.hanoi-disc:nth-child(3n){background:linear-gradient(180deg,#34d399,#059669)}
@media(max-width:700px){.nonogram-col-clues{grid-template-columns:repeat(var(--nonogram-size),24px)}.nonogram-row-clues{grid-template-rows:repeat(var(--nonogram-size),24px)}.nonogram-board{grid-template-columns:repeat(var(--nonogram-size),24px);grid-template-rows:repeat(var(--nonogram-size),24px)}.nonogram-cell{font-size:14px}.hanoi-board{grid-template-columns:repeat(3,minmax(88px,1fr));gap:4px;min-height:250px}.hanoi-peg{height:220px}.hanoi-pole{height:165px}.hanoi-disc{height:20px}}


/* v0.7.25.2 - Game Surface Responsiveness & Touch Pass */
.game-root-wrap,.compact-game-root,.mini-game-shell{max-width:100%;min-width:0}
.minesweeper-frame,.sudoku-full-scroll,.kakuro-board,.nonogram-wrap{overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
.minesweeper-frame{width:fit-content;max-width:100%;margin-inline:auto}
.minesweeper-board{--mine-cell:28px;grid-template-columns:repeat(var(--mine-cols),var(--mine-cell));grid-template-rows:repeat(var(--mine-rows),var(--mine-cell));width:max-content}
.mine-cell{width:var(--mine-cell);height:var(--mine-cell);font-size:16px}
.sudoku-full-scroll{display:flex;justify-content:center;width:100%;max-width:100%;overflow-x:auto;padding:1px}
.dense-board-mobile-tip{display:none;max-width:520px;color:#64748b;font-size:11px;font-weight:700;line-height:1.45;text-align:center}
.nonogram-wrap{--nonogram-cell:34px}
.nonogram-col-clues{grid-template-columns:repeat(var(--nonogram-size),var(--nonogram-cell))}
.nonogram-row-clues{grid-template-rows:repeat(var(--nonogram-size),var(--nonogram-cell))}
.nonogram-board{grid-template-columns:repeat(var(--nonogram-size),var(--nonogram-cell));grid-template-rows:repeat(var(--nonogram-size),var(--nonogram-cell))}
.nonogram-cell{min-width:var(--nonogram-cell);min-height:var(--nonogram-cell)}

@media(max-width:700px){
  /* Keep page width stable. Dense boards scroll locally instead of shrinking tap targets. */
  .game-root-wrap,.compact-game-root,.mini-game-shell,.minesweeper-stage,.sudoku-full-stage,.kakuro-stage,.nonogram-stage,.hanoi-stage{width:100%;max-width:100%;min-width:0}
  .minesweeper-frame,.sudoku-full-scroll,.kakuro-board,.nonogram-wrap{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;touch-action:pan-x pan-y pinch-zoom}
  .dense-board-mobile-tip:not([hidden]){display:block;padding:0 10px}

  /* Primary game controls need finger-sized targets. */
  .mini-primary,.mini-hud button,.session-control-bar button,.sudoku-full-actions button,.kakuro-actions button,.nonogram-actions button{min-height:42px}
  .mini-primary,.session-btn,.session-primary{padding-top:8px;padding-bottom:8px}
  .xp-face{width:42px;height:42px}
  .game-settings-dialog .dialog-close{min-width:42px;min-height:42px}
  .game-settings-dialog .dialog-choice-grid button{min-height:44px}

  /* Minesweeper: no more 22px cells. Easy fits most phones; larger boards scroll horizontally. */
  .minesweeper-board{--mine-cell:36px}
  .minesweeper-shell[data-difficulty="easy"] .minesweeper-board{--mine-cell:max(32px,min(40px,calc((100vw - 38px)/9)))}
  .mine-cell{font-size:18px;border-width:2px}
  .mine-cell.is-open{border-width:1px}
  .mine-counter{min-height:42px}

  /* Sudoku: preserve readable ~38px cells even on narrow phones; board scrolls only when required. */
  .sudoku-full-board{width:max(342px,min(96vw,460px));flex:0 0 auto}
  .sudoku-full-pad{width:min(100%,460px);gap:5px}
  .sudoku-full-pad button{min-height:44px;font-size:16px}
  .sudoku-full-actions{width:min(100%,460px);flex-wrap:wrap;justify-content:center}
  .sudoku-full-actions button{min-width:112px;padding-inline:14px}
  .sudoku-notes{font-size:9px}

  /* Kakuro: 38px was marginal. Keep 42px cells and use a local scroller on 320px phones. */
  .kakuro-board{grid-template-columns:repeat(var(--k-cols),42px);justify-content:start}
  .kakuro-fill,.kakuro-clue{width:42px;height:42px;min-width:42px}
  .kakuro-fill{font-size:20px}
  .kakuro-down,.kakuro-across{font-size:9px}
  .kakuro-pad{width:min(100%,460px);gap:5px}
  .kakuro-pad button{min-height:44px;font-size:16px}

  /* Nonogram: size-dependent touch cells; medium/hard scroll locally instead of collapsing to 24px. */
  .nonogram-wrap{--nonogram-cell:36px;width:100%;justify-content:start}
  .nonogram-shell[data-size="5"] .nonogram-wrap{--nonogram-cell:44px}
  .nonogram-shell[data-size="10"] .nonogram-wrap{--nonogram-cell:36px}
  .nonogram-shell[data-size="15"] .nonogram-wrap{--nonogram-cell:32px}
  .nonogram-cell{font-size:17px}
  .nonogram-col-clues>div{min-height:58px;font-size:10px}
  .nonogram-row-clues>div{min-width:58px;font-size:10px}

  /* Hanoi already has large pegs; make the whole board fit down to 320px without page overflow. */
  .hanoi-board{width:100%;grid-template-columns:repeat(3,minmax(82px,1fr));padding-left:6px;padding-right:6px}
  .hanoi-peg{min-width:0;touch-action:manipulation}
}

@media(max-width:380px){
  .minesweeper-board{--mine-cell:34px}
  .minesweeper-shell[data-difficulty="easy"] .minesweeper-board{--mine-cell:32px}
  .kakuro-board{grid-template-columns:repeat(var(--k-cols),40px)}
  .kakuro-fill,.kakuro-clue{width:40px;height:40px;min-width:40px}
  .nonogram-shell[data-size="10"] .nonogram-wrap{--nonogram-cell:34px}
  .nonogram-shell[data-size="15"] .nonogram-wrap{--nonogram-cell:32px}
  .session-config-summary{max-width:42%}
}

/* v0.7.25.5 — Full 26-game mobile/desktop interaction pass */
@media(max-width:700px){
  /* Shared: primary controls stay finger-friendly without inflating passive stat chips. */
  .mini-primary,
  .session-control-bar button,
  .game-toolbar-actions button,
  .compact-choices button,
  .digit-span-keypad button,
  .sudoku-pad button,
  .sudoku-actions button,
  .flash-count-choices button,
  .math-compare-actions button,
  .rotation-actions button,
  .choice-reaction-buttons button,
  .nback-actions button,
  .dialog-choice-grid button{min-height:44px}
  .mini-hud{flex-wrap:wrap;row-gap:5px}
  .mini-hint{flex-basis:100%;text-align:center;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.35}
  .compact-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .compact-choices button{font-size:14px;padding:10px 8px}

  /* Number Search: enlarge the actual hit box while keeping the handwritten look. */
  .number-board.layout-free{overflow:hidden}
  .scatter-num{min-width:36px;min-height:36px;display:inline-flex;align-items:center;justify-content:center;touch-action:manipulation}
  .scatter-num.small{min-width:34px;min-height:34px}
  .scatter-num.tiny{min-width:32px;min-height:32px}

  /* Visual Search: dense 7-10 grids scroll locally rather than collapsing to tiny targets. */
  .visual-search-center{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;justify-content:flex-start;padding-bottom:2px}
  .visual-search-board{flex:0 0 auto}
  .visual-search-board[data-size="7"],
  .visual-search-board[data-size="8"],
  .visual-search-board[data-size="9"],
  .visual-search-board[data-size="10"]{grid-template-columns:repeat(var(--visual-cols),40px);width:max-content;max-width:none;aspect-ratio:auto}
  .visual-search-board[data-size="7"] .visual-cell,
  .visual-search-board[data-size="8"] .visual-cell,
  .visual-search-board[data-size="9"] .visual-cell,
  .visual-search-board[data-size="10"] .visual-cell{width:40px;height:40px;font-size:18px;touch-action:manipulation}

  /* Odd-one-out: same policy for the densest boards. */
  .odd-one-out-stage{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
  .odd-one-out-board[data-size="7"],
  .odd-one-out-board[data-size="8"]{grid-template-columns:repeat(var(--odd-cols),42px);width:max-content;max-width:none;aspect-ratio:auto;justify-self:start}
  .odd-one-out-board[data-size="7"] .odd-cell,
  .odd-one-out-board[data-size="8"] .odd-cell{width:42px;height:42px;touch-action:manipulation}

  /* Memory / matching games already fit; enforce a minimum practical tap target. */
  .compact-memory-grid .memory-cell{min-width:44px;min-height:44px;touch-action:manipulation}
  .pair-card{min-width:44px;min-height:44px;touch-action:manipulation}

  /* Mini Sudoku: keypad/action controls were still 40px high. */
  .sudoku-pad button,.sudoku-actions button{height:auto;min-height:44px}
  .sudoku-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:7px}

  /* Tap Target / matrix / reaction families. */
  .tap-target-cell{min-width:48px;min-height:48px;touch-action:manipulation}
  .matrix-option{min-height:72px;touch-action:manipulation}
  .compact-reaction-pad,.go-no-go-pad{touch-action:manipulation}
  .choice-reaction-buttons,.nback-actions,.math-compare-actions,.rotation-actions{max-width:100%}

  /* 2048 uses swipes: preserve the board and prevent page scrolling only during a board gesture. */
  .speed-2048-board{width:min(96vw,440px);max-width:100%;touch-action:none}

  /* Quantity / Flash Count / general dense stages. */
  .flash-count-field,.quantity-panels,.match-pairs-board,.matrix-stage,.tap-target-stage,.math-compare-stage,.spatial-rotation-stage{max-width:100%;min-width:0}
  .quantity-panels button{touch-action:manipulation}

  /* Dialogs and small toolbar controls need usable tap areas too. */
  .brain-dialog .dialog-close{min-width:44px;min-height:44px}
  .help-circle,.focus-circle{min-width:40px;min-height:40px}
}

/* Very narrow phones: prioritize usable controls over squeezing everything into 320px. */
@media(max-width:380px){
  .game-main-content{padding-left:6px;padding-right:6px}
  .compact-stage{padding-left:6px;padding-right:6px}
  .mini-hud{gap:4px}
  .mini-chip{padding-left:5px;padding-right:5px}
  .compact-choices{gap:6px}
  .visual-search-board[data-size="7"],
  .visual-search-board[data-size="8"],
  .visual-search-board[data-size="9"],
  .visual-search-board[data-size="10"]{grid-template-columns:repeat(var(--visual-cols),38px)}
  .visual-search-board[data-size="7"] .visual-cell,
  .visual-search-board[data-size="8"] .visual-cell,
  .visual-search-board[data-size="9"] .visual-cell,
  .visual-search-board[data-size="10"] .visual-cell{width:38px;height:38px}
  .odd-one-out-board[data-size="7"],.odd-one-out-board[data-size="8"]{grid-template-columns:repeat(var(--odd-cols),40px)}
  .odd-one-out-board[data-size="7"] .odd-cell,.odd-one-out-board[data-size="8"] .odd-cell{width:40px;height:40px}
}

/* Short desktop/tablet landscape: reduce empty vertical space, never the tap targets. */
@media(min-width:701px) and (max-height:620px){
  .choice-reaction-stage,.nback-stage,.tap-target-stage,.math-compare-stage,.spatial-rotation-stage{min-height:250px;padding-top:8px;padding-bottom:8px}
  .go-no-go-pad,.compact-reaction-pad{min-height:190px;max-height:290px}
  .flash-count-field{min-height:220px;height:250px}
  .quantity-panels button{min-height:240px}
  .hanoi-board{min-height:250px}
  .hanoi-peg{height:220px}
}

/* v0.7.25.6 — Minesweeper mobile scrollport clipping fix */
.minesweeper-frame{box-sizing:border-box;min-width:0;scroll-padding-inline:8px}
.minesweeper-board{box-sizing:border-box}
@media(max-width:700px){
  .minesweeper-stage{overflow:visible}
  .minesweeper-frame{box-sizing:border-box;width:100%;max-width:100%;padding:7px;overflow-x:auto;overflow-y:hidden}
  .minesweeper-shell[data-difficulty="easy"] .minesweeper-frame{width:fit-content;max-width:100%;overflow-x:hidden}
  .minesweeper-scroll-tip:not([hidden]){display:block;order:-1;width:100%;margin:0 0 2px;padding:7px 10px;border:1px solid #dbe2ea;border-radius:10px;background:#f8fafc;color:#475569;font-size:12px;font-weight:800;text-align:center}
  .minesweeper-board{flex:0 0 auto;margin-inline:0}
}

/* v0.7.25.11 — Mobile game surface integrity */
.speed-2048-board{box-sizing:border-box;min-width:0}
.quantity-panels{box-sizing:border-box;min-width:0}
.sudoku-full-scroll{justify-content:flex-start;box-sizing:border-box;min-width:0;scroll-padding-inline:1px}
.sudoku-full-board{box-sizing:border-box;margin-inline:auto}
@media(max-width:700px){
  .speed-2048-board{width:min(100%,440px)}
  .quantity-panels{width:min(100%,760px)}
  .sudoku-full-pad,.kakuro-pad{grid-template-columns:repeat(5,minmax(44px,1fr));width:min(100%,360px);gap:5px}
  .sudoku-full-pad button,.kakuro-pad button{min-width:44px;min-height:44px}
  .sudoku-pad button{min-width:44px}
}
@media(max-width:700px){
  .mini-primary,.session-btn,.session-primary{min-height:44px}
  .sudoku-full-board{width:max(374px,min(96vw,460px))}
}
@media(max-width:380px){
  .kakuro-board{grid-template-columns:repeat(var(--k-cols),42px)}
  .kakuro-fill,.kakuro-clue{width:42px;height:42px;min-width:42px}
}

/* v0.7.25.18 — connection/outbox feedback. Kept outside the app shell so it remains
   visible in game focus mode and on narrow mobile screens. */
.network-status{position:fixed;left:50%;top:max(12px,env(safe-area-inset-top));z-index:12000;transform:translateX(-50%);max-width:min(92vw,620px);padding:9px 14px;border:1px solid #d8dee8;border-radius:999px;background:#fff;color:#334155;box-shadow:0 10px 30px rgba(15,23,42,.14);font-size:13px;font-weight:800;line-height:1.35;text-align:center}.network-status[hidden]{display:none}.network-status[data-kind="offline"]{background:#fff7ed;border-color:#fed7aa;color:#9a3412}.network-status[data-kind="pending"]{background:#fffbeb;border-color:#fde68a;color:#92400e}.network-status[data-kind="online"]{background:#f0fdf4;border-color:#bbf7d0;color:#166534}@media(max-width:600px){.network-status{top:max(8px,env(safe-area-inset-top));font-size:12px;padding:8px 12px}}

/* v0.7.25.21 — Puzzle board clarity & whole-board mobile visibility */
/* Sudoku 9x9: 1x1 lines stay light; 3x3 regions use a clearly heavier divider. */
.sudoku-full-board{
  gap:0;
  overflow:hidden;
  border:3px solid #172033;
  border-radius:8px;
  background:#fff;
}
.sudoku-full-cell{
  box-sizing:border-box;
  border-right:1px solid #d6dde7;
  border-bottom:1px solid #d6dde7;
  box-shadow:none;
}
.sudoku-full-cell:nth-child(3n):not(:nth-child(9n)),
.sudoku-full-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-full-cell:nth-child(n+46):nth-child(-n+54),
.sudoku-full-cell:nth-child(3n):not(:nth-child(9n)):nth-child(n+19):nth-child(-n+27),
.sudoku-full-cell:nth-child(3n):not(:nth-child(9n)):nth-child(n+46):nth-child(-n+54){box-shadow:none}
.sudoku-full-cell:nth-child(9n){border-right:0}
.sudoku-full-cell:nth-child(n+73){border-bottom:0}
.sudoku-full-cell:nth-child(9n+3),
.sudoku-full-cell:nth-child(9n+6){border-right:3px solid #334155}
.sudoku-full-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-full-cell:nth-child(n+46):nth-child(-n+54){border-bottom:3px solid #334155}

/* Mini Sudoku uses the same hierarchy so its 2x2 / 2x3 regions read immediately. */
.sudoku-board{box-sizing:border-box;border-width:3px;border-color:#334155}
.sudoku-board[data-size="4"] .sudoku-cell:nth-child(2n){border-right-width:1px;border-right-color:#cbd5e1}
.sudoku-board[data-size="4"] .sudoku-cell:nth-child(4n+2){border-right-width:3px;border-right-color:#475569}
.sudoku-board[data-size="4"] .sudoku-cell:nth-child(4n){border-right-width:0}
.sudoku-board[data-size="4"] .sudoku-cell:nth-child(n+5):nth-child(-n+8){border-bottom-width:3px;border-bottom-color:#475569}
.sudoku-board[data-size="4"] .sudoku-cell:nth-child(n+13){border-bottom-width:0}
.sudoku-board[data-size="6"] .sudoku-cell:nth-child(3n){border-right-width:1px;border-right-color:#cbd5e1}
.sudoku-board[data-size="6"] .sudoku-cell:nth-child(6n+3){border-right-width:3px;border-right-color:#475569}
.sudoku-board[data-size="6"] .sudoku-cell:nth-child(6n){border-right-width:0}
.sudoku-board[data-size="6"] .sudoku-cell:nth-child(n+7):nth-child(-n+12),
.sudoku-board[data-size="6"] .sudoku-cell:nth-child(n+19):nth-child(-n+24){border-bottom-width:3px;border-bottom-color:#475569}
.sudoku-board[data-size="6"] .sudoku-cell:nth-child(n+31){border-bottom-width:0}

/* Nonogram: make 5-cell blocks visually scannable without changing board size. */
.nonogram-cell{box-sizing:border-box}
.nonogram-shell[data-size="10"] .nonogram-cell:nth-child(10n+5){border-right:2px solid #334155}
.nonogram-shell[data-size="10"] .nonogram-cell:nth-child(n+41):nth-child(-n+50){border-bottom:2px solid #334155}
.nonogram-shell[data-size="15"] .nonogram-cell:nth-child(15n+5),
.nonogram-shell[data-size="15"] .nonogram-cell:nth-child(15n+10){border-right:2px solid #334155}
.nonogram-shell[data-size="15"] .nonogram-cell:nth-child(n+61):nth-child(-n+75),
.nonogram-shell[data-size="15"] .nonogram-cell:nth-child(n+136):nth-child(-n+150){border-bottom:2px solid #334155}

@media(max-width:700px){
  /* Sudoku 9x9 must be visible as one whole puzzle. Never use horizontal scrolling. */
  .sudoku-full-stage{width:100%;max-width:100%;min-width:0;padding-inline:0}
  .sudoku-full-scroll{
    width:100%;
    max-width:100%;
    min-width:0;
    padding:0;
    overflow:visible;
    justify-content:center;
    touch-action:manipulation;
    scrollbar-gutter:auto;
  }
  .sudoku-full-board{
    width:min(100%,460px);
    max-width:100%;
    min-width:0;
    flex:0 1 auto;
    margin-inline:auto;
  }
  .sudoku-full-cell{font-size:clamp(15px,5vw,24px)}
  .sudoku-notes{inset:1px;font-size:clamp(6px,2.1vw,9px)}

  /* Sudoku Mini also stays inside the actual game container, not merely 92vw. */
  .sudoku-board{width:min(100%,460px);max-width:100%}

  /* Kakuro tops out at 8x8: fit the whole puzzle on mobile instead of hiding columns. */
  .kakuro-board{
    box-sizing:border-box;
    grid-template-columns:repeat(var(--k-cols),minmax(0,1fr));
    width:min(100%,420px);
    max-width:100%;
    overflow:visible;
    justify-content:stretch;
  }
  .kakuro-fill,.kakuro-clue{width:auto;height:auto;min-width:0}
  .kakuro-fill{font-size:clamp(16px,5vw,20px)}
  .kakuro-down,.kakuro-across{font-size:clamp(7px,2.4vw,9px)}

  /* Visual-search games are reaction/scan tasks: every candidate must be visible at once. */
  .visual-search-center{overflow-x:visible;justify-content:center;padding-bottom:0}
  .visual-search-board[data-size="7"],
  .visual-search-board[data-size="8"],
  .visual-search-board[data-size="9"],
  .visual-search-board[data-size="10"]{
    grid-template-columns:repeat(var(--visual-cols),minmax(0,1fr));
    width:min(100%,520px,calc(100dvh - 190px));
    max-width:100%;
    aspect-ratio:1;
    margin-inline:auto;
    padding:4px;
    gap:2px;
  }
  .visual-search-board[data-size="9"],
  .visual-search-board[data-size="10"]{padding:3px;gap:1px}
  .visual-search-board[data-size="7"] .visual-cell,
  .visual-search-board[data-size="8"] .visual-cell,
  .visual-search-board[data-size="9"] .visual-cell,
  .visual-search-board[data-size="10"] .visual-cell{
    width:auto;
    height:auto;
    min-width:0;
    aspect-ratio:1;
    border-radius:5px;
    font-size:clamp(12px,4vw,18px);
    touch-action:manipulation;
  }

  .odd-one-out-stage{overflow-x:visible}
  .odd-one-out-board[data-size="7"],
  .odd-one-out-board[data-size="8"]{
    grid-template-columns:repeat(var(--odd-cols),minmax(0,1fr));
    width:min(100%,520px);
    max-width:100%;
    aspect-ratio:1;
    justify-self:center;
    padding:4px;
    gap:3px;
  }
  .odd-one-out-board[data-size="7"] .odd-cell,
  .odd-one-out-board[data-size="8"] .odd-cell{
    width:auto;
    height:auto;
    min-width:0;
    aspect-ratio:1;
    border-radius:6px;
    touch-action:manipulation;
  }
  .odd-one-out-board[data-size="7"] .odd-cell span,
  .odd-one-out-board[data-size="8"] .odd-cell span{font-size:clamp(14px,4.4vw,22px)}
}


/* v0.7.25.21 — Kakuro clue orientation: upper triangle = across, lower triangle = down. */


/* v0.7.25.21 — honest puzzle input: keep guesses, show only rule conflicts, support multi-candidate notes. */
.sudoku-full-cell.is-conflict,.sudoku-cell.is-conflict,.kakuro-fill.is-conflict{background:#fff1f2;color:#b91c1c;box-shadow:inset 0 0 0 2px #fda4af}
.sudoku-mini-notes{position:absolute;inset:2px;display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:1fr;align-items:center;justify-items:center;font-size:clamp(7px,2.2vw,11px);font-weight:700;color:#64748b;line-height:1}.sudoku-board[data-size="4"] .sudoku-mini-notes{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}.sudoku-board[data-size="6"] .sudoku-mini-notes{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr)}.sudoku-mini-notes i{font-style:normal}
.kakuro-fill{position:relative}.kakuro-notes{position:absolute;inset:2px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);align-items:center;justify-items:center;font-size:clamp(6px,1.8vw,9px);font-weight:700;color:#64748b;line-height:1}.kakuro-notes i{font-style:normal}
@media(max-width:700px){.sudoku-mini-notes{inset:1px;font-size:clamp(6px,2.4vw,9px)}.kakuro-notes{inset:1px;font-size:clamp(5px,2vw,8px)}}

/* v0.7.25.22 — Mobile modal viewport centering & safe-area integrity */
@media(max-width:900px){
  body.is-game-route:has(.session-overlay.is-visible),
  body.is-game-route:has(.game-page.has-result:not(.result-mode-inline)),
  body.is-game-route:has(dialog[open]){overflow:hidden}

  /* Session states (ready/countdown/pause/conflict/expired) must center in the real viewport,
     not in the game-root rectangle that starts below toolbar + controls. */
  body.is-game-route .game-page-compact .session-overlay{
    position:fixed!important;
    inset:0!important;
    z-index:92!important;
    align-items:center!important;
    justify-content:center!important;
    padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;
    border-radius:0!important;
    background:rgba(15,23,42,.48)!important;
    backdrop-filter:blur(8px) saturate(.92)!important;
    overflow:hidden!important;
  }
  body.is-game-route .game-page-compact .session-overlay-card{
    width:min(440px,100%)!important;
    max-width:100%!important;
    max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    margin:auto!important;
    overflow:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    padding:22px 18px!important;
    border-radius:20px!important;
    background:rgba(255,255,255,.985)!important;
    box-shadow:0 28px 80px rgba(15,23,42,.26),0 4px 16px rgba(15,23,42,.10)!important;
  }

  /* Result popup: preserve the desktop centered-modal model on mobile. */
  body.is-game-route .game-page.has-result:not(.result-mode-inline)::before{
    z-index:90!important;
    background:rgba(15,23,42,.50)!important;
    backdrop-filter:blur(4px)!important;
  }
  body.is-game-route .game-page.has-result:not(.result-mode-inline) .compact-result,
  body.is-game-route .game-page.has-result:not(.result-mode-inline) .compact-result.has-rank-context{
    position:fixed!important;
    z-index:95!important;
    top:calc(50% + (env(safe-area-inset-top) - env(safe-area-inset-bottom))/2)!important;
    right:auto!important;
    bottom:auto!important;
    left:50%!important;
    width:min(560px,calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)))!important;
    max-width:calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right))!important;
    max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    margin:0!important;
    transform:translate(-50%,-50%)!important;
    overflow:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    border-radius:20px!important;
  }

  /* Native dialogs on game pages use the same centered viewport contract instead of a bottom sheet. */
  body.is-game-route .brain-dialog[open],
  body.is-game-route .game-settings-dialog[open],
  body.is-game-route .number-settings-dialog[open]{
    width:min(560px,calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)))!important;
    max-width:calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right))!important;
    max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    margin:auto!important;
    border-radius:20px!important;
    overflow:auto!important;
    overscroll-behavior:contain;
  }
  body.is-game-route .brain-dialog[open] .dialog-head,
  body.is-game-route .game-settings-dialog[open] .dialog-head,
  body.is-game-route .number-settings-dialog[open] .dialog-head{border-radius:20px 20px 0 0!important}
}

@media(max-width:700px){
  body.is-game-route .game-page.has-result:not(.result-mode-inline) .compact-result.has-rank-context{grid-template-columns:1fr!important}
  body.is-game-route .game-page.has-result:not(.result-mode-inline) .compact-result.has-rank-context>#resultBody,
  body.is-game-route .game-page.has-result:not(.result-mode-inline) .compact-result>#resultLeaderboardContext{grid-column:1!important;grid-row:auto!important}
  body.is-game-route .game-page.has-result:not(.result-mode-inline) .compact-result>#resultLeaderboardContext{margin-top:10px!important}
}

@media(max-width:420px){
  body.is-game-route .game-page-compact .session-overlay{padding:max(9px,env(safe-area-inset-top)) max(9px,env(safe-area-inset-right)) max(9px,env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left))!important}
  body.is-game-route .game-page-compact .session-overlay-card{padding:18px 14px!important;border-radius:18px!important}
  body.is-game-route .game-page.has-result:not(.result-mode-inline) .compact-result,
  body.is-game-route .game-page.has-result:not(.result-mode-inline) .compact-result.has-rank-context{
    width:calc(100vw - 18px - env(safe-area-inset-left) - env(safe-area-inset-right))!important;
    max-width:calc(100vw - 18px - env(safe-area-inset-left) - env(safe-area-inset-right))!important;
    max-height:calc(100dvh - 18px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    padding:18px 14px!important;
    border-radius:18px!important;
  }
}

@media(max-width:900px) and (orientation:landscape) and (max-height:520px){
  body.is-game-route .game-page-compact .session-overlay-card{max-height:calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;padding:14px!important}
  body.is-game-route .game-page.has-result:not(.result-mode-inline) .compact-result,
  body.is-game-route .game-page.has-result:not(.result-mode-inline) .compact-result.has-rank-context{max-height:calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}
}

/* v0.7.25.25 — result-exit freedom + true container-fit Minesweeper mobile board */
.session-overlay-card{position:relative}
.session-overlay-close{position:absolute;z-index:2;top:8px;right:8px;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;color:#475569;font-size:22px;line-height:1;cursor:pointer}
.session-overlay-close:hover{background:#eef2f7;border-color:#cbd5e1}
.session-overlay-close[hidden]{display:none!important}
@media(max-width:700px){
  .session-overlay-close{width:44px;height:44px;top:7px;right:7px}

  /* Easy 9x9 must fit the ACTUAL game container, not 100vw. The frame owns the
     border/padding; the board consumes only its content box, so the ninth column
     can never sit underneath the right edge on narrow phones. */
  .minesweeper-shell[data-difficulty="easy"] .minesweeper-stage{width:100%;max-width:100%;min-width:0}
  .minesweeper-shell[data-difficulty="easy"] .minesweeper-frame{width:min(100%,380px);max-width:100%;min-width:0;margin-inline:auto;overflow:hidden}
  .minesweeper-shell[data-difficulty="easy"] .minesweeper-board{
    --mine-cell:auto;
    width:100%;max-width:100%;min-width:0;
    aspect-ratio:1/1;
    grid-template-columns:repeat(9,minmax(0,1fr));
    grid-template-rows:repeat(9,minmax(0,1fr));
    overflow:hidden;
  }
  .minesweeper-shell[data-difficulty="easy"] .mine-cell{
    width:auto;height:auto;min-width:0;min-height:0;aspect-ratio:1/1;
    font-size:clamp(13px,4.1vw,18px);
  }
}

/* v0.7.26.1 — cognitive taxonomy */
.game-format-filters{flex:1}.game-taxonomy-badges{display:flex!important;gap:5px;flex-wrap:wrap;margin-top:3px;font-style:normal}.game-taxonomy-badge{display:inline-flex!important;min-height:20px!important;align-items:center;width:max-content;padding:2px 7px;border:1px solid #dbe3ec;border-radius:999px;background:#f8fafc;color:#64748b!important;font-size:8.5px!important;line-height:1!important;font-style:normal}.game-taxonomy-badge--core{background:#ecfdf3;border-color:#bbf7d0;color:#166534!important}.game-taxonomy-badge--warmup{background:#fff7ed;border-color:#fed7aa;color:#9a3412!important}.game-taxonomy-badge--upgrade{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8!important}@media(max-width:900px){.game-format-filters{width:100%}}


/* v0.7.26.1 - Core Game Depth Pack I */
.nback-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;width:min(100%,240px);aspect-ratio:1/1;padding:8px;border:1px solid var(--line);border-radius:22px;background:var(--surface-soft,#f8fafc)}
.nback-cell{display:grid;place-items:center;min-width:0;border:1px solid #dce3eb;border-radius:14px;background:#fff;font-size:clamp(30px,8vw,52px);font-weight:900;line-height:1;transition:.12s}
.nback-cell.is-live{background:#eff6ff;border-color:#60a5fa;box-shadow:0 5px 18px rgba(37,99,235,.12);transform:scale(1.03)}
.nback-cell.is-wrong{background:#fff1f2;border-color:#fda4af}
.nback-key{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;margin-right:6px;border-radius:6px;background:#f1f5f9;color:#64748b;font-size:10px;font-weight:900}
.nback-actions:has(button:nth-child(4)){grid-template-columns:repeat(2,minmax(120px,170px));max-width:360px}
.compact-memory-grid .memory-cell.is-decoy{background:#fef3c7;border-color:#f59e0b;box-shadow:0 0 0 2px rgba(245,158,11,.08) inset}
@media(max-width:520px){.nback-grid{width:min(100%,210px);gap:5px;padding:6px;border-radius:18px}.nback-cell{border-radius:11px;font-size:34px}.nback-actions:has(button:nth-child(4)){grid-template-columns:1fr 1fr;max-width:340px}.nback-actions:has(button:nth-child(4)) button{font-size:14px}}

/* v0.7.26.2 — Core Puzzle Depth Pack II */
.nonogram-row-clues .is-complete,
.nonogram-col-clues .is-complete{
  opacity:.52;
  text-decoration:line-through;
  text-decoration-thickness:2px;
}

/* v0.7.26.3 — Nonogram state-flow + responsive board scale */
.nonogram-stage{
  width:100%;
  max-width:100%;
  align-content:start;
  padding:14px 12px 8px;
  box-sizing:border-box;
}
.nonogram-wrap{
  width:max-content;
  max-width:100%;
  margin-inline:auto;
  justify-content:center;
  padding:8px 10px 10px;
  box-sizing:border-box;
  overflow:auto;
  --nonogram-cell:44px;
}
.nonogram-shell[data-size="5"] .nonogram-wrap{--nonogram-cell:60px}
.nonogram-shell[data-size="10"] .nonogram-wrap{--nonogram-cell:44px}
.nonogram-shell[data-size="15"] .nonogram-wrap{--nonogram-cell:34px}
.nonogram-corner{min-width:72px;min-height:68px}
.nonogram-row-clues>div{
  min-width:72px;
  padding-inline:8px;
  font-size:12px;
  line-height:1.15;
}
.nonogram-col-clues>div{
  min-height:68px;
  padding:4px 2px;
  font-size:12px;
  line-height:1.1;
}
.nonogram-shell[data-size="15"] .nonogram-corner{min-width:84px;min-height:88px}
.nonogram-shell[data-size="15"] .nonogram-row-clues>div{min-width:84px;font-size:11px}
.nonogram-shell[data-size="15"] .nonogram-col-clues>div{min-height:88px;font-size:11px}
.nonogram-board{box-sizing:border-box}
.nonogram-actions{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}
.nonogram-actions button{min-height:42px;padding:8px 12px}

@media(max-width:700px){
  .nonogram-stage{padding-inline:4px}
  .nonogram-wrap{
    width:100%;
    max-width:100%;
    margin-inline:0;
    justify-content:start;
    overflow-x:auto;
    overflow-y:auto;
    padding:6px 4px 8px;
    --nonogram-cell:34px;
    scrollbar-gutter:auto;
  }
  .nonogram-shell[data-size="5"] .nonogram-wrap{--nonogram-cell:48px}
  .nonogram-shell[data-size="10"] .nonogram-wrap{--nonogram-cell:34px}
  .nonogram-shell[data-size="15"] .nonogram-wrap{--nonogram-cell:30px}
  .nonogram-corner{min-width:58px;min-height:62px}
  .nonogram-row-clues>div{min-width:58px;padding-inline:5px;font-size:10px}
  .nonogram-col-clues>div{min-height:62px;font-size:10px}
  .nonogram-shell[data-size="15"] .nonogram-corner{min-width:66px;min-height:78px}
  .nonogram-shell[data-size="15"] .nonogram-row-clues>div{min-width:66px;font-size:10px}
  .nonogram-shell[data-size="15"] .nonogram-col-clues>div{min-height:78px;font-size:10px}
  .nonogram-actions{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding-inline:4px}
  .nonogram-actions button{min-width:0;padding-inline:7px;font-size:12px}
}
@media(max-width:380px){
  .nonogram-shell[data-size="5"] .nonogram-wrap{--nonogram-cell:44px}
  .nonogram-shell[data-size="10"] .nonogram-wrap{--nonogram-cell:32px}
  .nonogram-shell[data-size="15"] .nonogram-wrap{--nonogram-cell:28px}
  .nonogram-actions{grid-template-columns:1fr 1fr}
  .nonogram-actions button:first-child{grid-column:1/-1}
}

/* v0.7.26.4 — Sudoku/Kakuro session flow + predictable board scale */
.sudoku-full-actions,.kakuro-actions{
  box-sizing:border-box;
  width:min(100%,560px);
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.sudoku-full-actions button,.kakuro-actions button{
  min-width:0;
  min-height:42px;
  padding:8px 10px;
}

@media(min-width:701px){
  .sudoku-full-stage,.kakuro-stage{width:100%;max-width:100%;min-width:0}
  .sudoku-full-scroll{width:100%;max-width:100%;overflow:visible;justify-content:center}
  .sudoku-full-board{width:min(100%,560px);max-width:560px}
  .sudoku-full-pad{width:min(100%,560px);max-width:560px}

  .kakuro-board{
    --k-cell:64px;
    box-sizing:border-box;
    width:max-content;
    max-width:100%;
    grid-template-columns:repeat(var(--k-cols),var(--k-cell));
    overflow:auto;
    justify-content:center;
  }
  .kakuro-shell[data-size="6"] .kakuro-board{--k-cell:72px}
  .kakuro-shell[data-size="7"] .kakuro-board{--k-cell:64px}
  .kakuro-shell[data-size="8"] .kakuro-board{--k-cell:58px}
  .kakuro-fill,.kakuro-clue{width:var(--k-cell);height:var(--k-cell);min-width:var(--k-cell)}
  .kakuro-fill{font-size:clamp(20px,2vw,28px)}
  .kakuro-down,.kakuro-across{font-size:11px}
  .kakuro-pad{width:min(100%,540px);max-width:540px}
  .kakuro-actions{width:min(100%,540px)}
}

@media(max-width:700px){
  .sudoku-full-actions,.kakuro-actions{
    width:min(100%,460px);
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
  }
  .sudoku-full-actions button,.kakuro-actions button{min-height:44px;padding-inline:8px}

  .kakuro-board{
    box-sizing:border-box;
    width:min(100%,460px);
    max-width:100%;
    grid-template-columns:repeat(var(--k-cols),minmax(0,1fr));
    overflow:visible;
    justify-content:stretch;
  }
  .kakuro-fill,.kakuro-clue{width:auto;height:auto;min-width:0;aspect-ratio:1}
  .kakuro-fill{font-size:clamp(16px,5vw,21px)}
  .kakuro-pad{width:min(100%,460px)}
}


/* v0.7.26.5 — Nonogram ready/play layout separation and hard-board fit */
.nonogram-shell[data-phase="ready"] .nonogram-wrap{
  display:block;
  width:min(100%,520px);
  max-width:520px;
  margin-inline:auto;
  padding:0;
  overflow:visible;
  scrollbar-gutter:auto;
}
.nonogram-shell[data-phase="ready"] .nonogram-corner,
.nonogram-shell[data-phase="ready"] .nonogram-row-clues,
.nonogram-shell[data-phase="ready"] .nonogram-col-clues{display:none}
.nonogram-shell[data-phase="ready"] .nonogram-board{
  display:block;
  width:100%;
  min-width:0;
  min-height:0;
  border:0;
  background:transparent;
}
.nonogram-shell[data-phase="ready"] .nonogram-idle{
  width:100%;
  min-width:0;
  min-height:220px;
  padding:28px 20px;
  border:1px dashed #cbd5e1;
  border-radius:18px;
  background:#f8fafc;
  text-align:center;
}
.nonogram-idle small{max-width:360px;color:#94a3b8;font-size:11px;line-height:1.5}
.nonogram-shell[data-phase="ready"] .mini-hud [data-mode],
.nonogram-shell[data-phase="ready"] .mini-hud [data-undo],
.nonogram-shell[data-phase="ready"] .mini-hud [data-redo],
.nonogram-shell[data-phase="ready"] [data-hint]{opacity:.52;cursor:not-allowed}
.nonogram-corner{min-width:var(--nonogram-row-clue-width,72px);min-height:var(--nonogram-col-clue-height,68px)}
.nonogram-row-clues>div{min-width:var(--nonogram-row-clue-width,72px)}
.nonogram-col-clues>div{min-height:var(--nonogram-col-clue-height,68px)}
@media(min-width:701px){
  .nonogram-shell[data-phase="playing"] .nonogram-wrap,
  .nonogram-shell[data-phase="finished"] .nonogram-wrap{
    overflow:visible;
    scrollbar-gutter:auto;
  }
  .nonogram-shell[data-size="5"] .nonogram-wrap{--nonogram-cell:clamp(48px,calc((100dvh - 300px)/5),60px)}
  .nonogram-shell[data-size="10"] .nonogram-wrap{--nonogram-cell:clamp(34px,calc((100dvh - 300px)/10),44px)}
  .nonogram-shell[data-size="15"] .nonogram-wrap{--nonogram-cell:clamp(26px,calc((100dvh - 300px)/15),34px)}
}
@media(max-width:700px){
  .nonogram-shell[data-phase="ready"] .nonogram-wrap{width:min(100%,460px);padding-inline:4px}
  .nonogram-shell[data-phase="ready"] .nonogram-idle{min-height:180px;padding:22px 14px}
  .nonogram-shell[data-phase="playing"] .nonogram-wrap,
  .nonogram-shell[data-phase="finished"] .nonogram-wrap{overflow-x:auto;overflow-y:hidden}
}
