:root{
  --bg:#f7f8f6;
  --surface:#ffffff;
  --surface-soft:#f0f4ef;
  --text:#17202a;
  --muted:#667085;
  --border:#dfe5df;
  --brand:#26664f;
  --brand-dark:#1f513f;
  --accent:#e8f2ed;
  --good:#18794e;
  --bad:#b42318;
  --warning:#9a6700;
  --shadow:0 12px 30px rgba(23,32,42,.07);
  --radius:20px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text);line-height:1.5}
a{color:inherit;text-decoration:none}
button,input{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.55}
.site-shell{width:min(1120px,calc(100% - 32px));margin:0 auto}
.site-header{position:sticky;top:0;z-index:20;background:rgba(247,248,246,.94);backdrop-filter:blur(12px);border-bottom:1px solid rgba(223,229,223,.85)}
.nav{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:flex;align-items:center;gap:10px;font-weight:900;letter-spacing:.08em}
.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--brand);color:white;font-size:16px;letter-spacing:0}
.nav-links{display:flex;align-items:center;gap:22px;color:#364152;font-size:14px;font-weight:700}
.nav-cta,.btn-primary,.btn-secondary,.btn-ghost{min-height:46px;border-radius:13px;padding:0 18px;border:1px solid transparent;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.18s ease}
.nav-cta,.btn-primary{background:var(--brand);color:white}
.nav-cta:hover,.btn-primary:hover{background:var(--brand-dark)}
.btn-secondary{background:var(--surface);border-color:var(--border);color:var(--text)}
.btn-secondary:hover,.btn-ghost:hover{border-color:#bfc9bf;background:#fafbfa}
.btn-ghost{background:transparent;border-color:var(--border);color:#46505b}
.hero{padding:64px 0 42px;display:grid;grid-template-columns:1.05fr .95fr;gap:54px;align-items:center}
.eyebrow{font-size:13px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:var(--brand)}
h1{font-size:clamp(44px,7vw,78px);line-height:.95;letter-spacing:-.05em;margin:12px 0 14px}
.hero-tagline{font-size:clamp(25px,4vw,40px);font-weight:850;letter-spacing:-.035em;margin:0 0 18px}
.hero-copy{font-size:18px;color:#53606c;max-width:600px;margin:0 0 28px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap}
.hero-note{font-size:13px;color:var(--muted);margin-top:14px}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}
.demo-card{padding:24px}
.mini-stats{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:13px;font-weight:800;margin-bottom:16px}
.challenge-label{font-size:13px;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.challenge-text{font-size:clamp(28px,6vw,44px);font-weight:900;letter-spacing:-.03em;margin:10px 0 20px;overflow-wrap:anywhere}
.answer-input{width:100%;min-height:52px;border:1.5px solid var(--border);border-radius:14px;padding:14px 15px;font-size:16px;background:white;color:var(--text);outline:none}
.answer-input:focus{border-color:var(--brand);box-shadow:0 0 0 4px rgba(38,102,79,.1)}
.demo-actions,.game-actions{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.feedback{min-height:28px;margin-top:12px;font-weight:800}
.feedback.good{color:var(--good)}
.feedback.bad{color:var(--bad)}
.feedback.hint{color:var(--warning)}
.demo-next{margin-top:14px}
.demo-next .btn-primary{width:auto}
.ai-message-section{padding:18px 0 20px}
.ai-message{max-width:760px;margin:0 auto;text-align:center;padding:30px 24px;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.ai-message h2{font-size:clamp(27px,4.5vw,40px);letter-spacing:-.035em;line-height:1.08;margin:0 0 10px}
.ai-message p{max-width:650px;margin:0 auto;color:var(--muted);font-size:17px}
.section{padding:58px 0}
.section-head{max-width:720px;margin-bottom:24px}
.section h2{font-size:clamp(30px,5vw,48px);letter-spacing:-.04em;line-height:1.05;margin:0 0 12px}
.section p.lead{font-size:18px;color:var(--muted);margin:0}
.three-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.feature{padding:22px}
.feature .num{width:36px;height:36px;border-radius:12px;background:var(--accent);display:grid;place-items:center;color:var(--brand);font-weight:900;margin-bottom:16px}
.feature h3{margin:0 0 8px;font-size:19px}
.feature p{margin:0;color:var(--muted)}
.example-strip{padding:28px;display:grid;grid-template-columns:1fr auto 1fr;gap:22px;align-items:center}
.example-wrong,.example-right{font-size:clamp(22px,4vw,34px);font-weight:900;overflow-wrap:anywhere}
.example-wrong{color:#6f4e4e;text-decoration:line-through;text-decoration-thickness:2px}
.example-right{color:var(--good)}
.arrow{font-size:26px;color:var(--muted)}
.site-footer{border-top:1px solid var(--border);padding:28px 0 44px;color:var(--muted);font-size:14px}
.footer-row{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}

/* Game */
.game-wrap{padding:34px 0 64px;max-width:760px;margin:0 auto}
.game-top{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}
.game-top h1{font-size:30px;letter-spacing:-.035em;margin:0}
.stat-row{display:flex;gap:8px;flex-wrap:wrap}
.stat-pill{background:var(--surface);border:1px solid var(--border);border-radius:999px;padding:8px 12px;font-size:13px;font-weight:900}
.mode-card{padding:24px;margin-top:20px}
.play-greeting{margin:12px 0 18px;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--soft);color:var(--text);font-weight:750;line-height:1.45}
.mode-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:16px}
.mode-btn{min-height:68px;border:1.5px solid var(--border);border-radius:15px;background:var(--surface);font-weight:900;color:var(--text);padding:10px}
.mode-btn small{display:block;color:var(--muted);font-weight:700;margin-top:3px}
.mode-btn:hover,.mode-btn.active{border-color:var(--brand);background:var(--accent);color:var(--brand)}
.game-card{padding:26px;margin-top:18px}
.progress-row{display:flex;align-items:center;justify-content:space-between;gap:16px;color:var(--muted);font-size:13px;font-weight:800}
.game-progress-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.game-switch-btn{min-height:36px;border:1px solid var(--border);border-radius:10px;background:transparent;color:#46505b;padding:0 12px;font:inherit;font-weight:800;cursor:pointer;transition:.18s ease}
.game-switch-btn:hover{border-color:#bfc9bf;background:#fafbfa}
.game-switch-btn:focus-visible{outline:3px solid rgba(38,102,79,.22);outline-offset:2px}
.progress-track{height:7px;background:#edf0ed;border-radius:999px;overflow:hidden;margin:12px 0 22px}
.progress-bar{height:100%;background:var(--brand);width:10%;transition:width .2s ease}
.game-challenge{font-size:clamp(29px,7vw,48px);font-weight:900;letter-spacing:-.035em;line-height:1.08;margin:12px 0 24px;overflow-wrap:anywhere}
/* the single misspelled word to fix (spelling word-only mode) */
.game-challenge .bk-misspell{text-decoration:underline wavy #d1603a;text-decoration-thickness:2.5px;text-underline-offset:7px;color:#b8431f}
.game-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
.meta-tag{font-size:12px;font-weight:800;color:var(--muted);background:var(--surface-soft);border-radius:999px;padding:6px 9px}
.result-panel{display:none;padding:26px;margin-top:18px;text-align:center}
.result-panel.show{display:block}
.result-panel h2{font-size:36px;letter-spacing:-.04em;margin:0 0 10px}
.result-score{font-size:52px;font-weight:950;letter-spacing:-.05em;color:var(--brand);margin:8px 0 18px}
.result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}
.result-box{border:1px solid var(--border);border-radius:14px;padding:14px;background:#fbfcfb}
.result-box strong{display:block;font-size:22px}
.result-box span{font-size:12px;color:var(--muted);font-weight:700}
.hidden{display:none!important}

/* content pages */
.content-page{max-width:760px;padding:54px 0 70px}
.content-page h1{font-size:clamp(40px,7vw,64px)}
.content-page h2{font-size:26px;letter-spacing:-.03em;margin-top:34px}
.content-page p,.content-page li{font-size:17px;color:#53606c}
.steps{counter-reset:steps;list-style:none;padding:0;margin:30px 0}
.steps li{counter-increment:steps;display:grid;grid-template-columns:42px 1fr;gap:14px;align-items:start;margin:18px 0}
.steps li:before{content:counter(steps);width:42px;height:42px;border-radius:13px;background:var(--accent);display:grid;place-items:center;color:var(--brand);font-weight:900}

@media(max-width:820px){
  .hero{grid-template-columns:1fr;gap:28px;padding-top:44px}
  .three-grid{grid-template-columns:1fr}
  .example-strip{grid-template-columns:1fr;gap:12px}
  .arrow{transform:rotate(90deg);justify-self:start}
  .nav-links a:not(.nav-cta){display:none}
  .mode-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:480px){
  .site-shell{width:min(100% - 22px,1120px)}
  .nav{min-height:62px}
  .brand{font-size:14px}
  .brand-mark{width:31px;height:31px}
  .nav-cta{min-height:42px;padding:0 14px}
  .hero{padding:36px 0 30px}
  .hero-copy{font-size:16px}
  .hero-actions>*{width:100%}
  .demo-card,.mode-card,.game-card,.result-panel{padding:18px}
  .mode-grid{grid-template-columns:1fr 1fr}
  .game-top{align-items:flex-start;flex-direction:column}
  .game-progress-actions{gap:7px}
  .game-switch-btn{min-height:38px;padding:0 10px}
  .game-actions>*{flex:1 1 100%}
  .result-grid{grid-template-columns:1fr}
  .footer-row{flex-direction:column}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Special challenge modes */
.special-divider{height:1px;background:var(--border);margin:26px 0 22px}
.special-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:8px}
.special-head h3{margin:4px 0 0;font-size:22px;letter-spacing:-.03em}
.special-prompt{margin:0 0 14px;color:var(--muted);font-size:14px}
.special-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.special-mode-btn{min-height:78px;text-align:left;border:1.5px solid var(--border);border-radius:15px;background:var(--surface);color:var(--text);padding:13px 14px;transition:.18s ease}
.special-mode-btn strong{display:block;font-size:14px;line-height:1.25}
.special-mode-btn small{display:block;margin-top:5px;color:var(--muted);font-weight:700;line-height:1.3}
.special-mode-btn:hover,.special-mode-btn:focus-visible{border-color:var(--brand);background:var(--accent);outline:none}
.surprise-btn{white-space:nowrap}
.timer-pill{display:inline-flex;align-items:center;gap:3px;border-radius:999px;background:#fff6df;border:1px solid #ead7a2;color:#7a5700;padding:6px 9px;font-weight:900}
.timer-pill.urgent{background:#fff0ee;border-color:#f2bbb4;color:var(--bad)}
.special-status{margin-top:12px;padding:10px 12px;border-radius:12px;background:var(--surface-soft);color:var(--muted);font-size:13px;font-weight:800}

@media(max-width:600px){
  .special-head{align-items:flex-start;flex-direction:column}
  .surprise-btn{width:100%}
  .special-grid{grid-template-columns:1fr}
}

/* Surprise events, records, and retention */
.combo-pill{background:#fff6df;border-color:#ead7a2;color:#7a5700;animation:comboPop .24s ease}
@keyframes comboPop{0%{transform:scale(.94)}100%{transform:scale(1)}}
.event-banner{margin:0 0 16px;padding:12px 14px;border:1px solid var(--border);border-radius:13px;background:var(--surface-soft);font-size:14px;font-weight:900;line-height:1.4}
.event-banner.event-boss{background:#fff3e8;border-color:#e9c6a4;color:#7a4200}
.event-banner.event-mystery{background:#f3efff;border-color:#d6c9f4;color:#503788}
.event-banner.event-rare{background:#fff9dc;border-color:#e6cf70;color:#6c5600}
.event-banner.event-revenge{background:#eef8f3;border-color:#b8dccb;color:#1f654b}
.event-banner.event-double{background:#fff0f5;border-color:#e8bfd0;color:#7a3152}
.game-card.event-boss{border-color:#e9c6a4}
.game-card.event-mystery{border-color:#d6c9f4}
.game-card.event-rare{border-color:#d7b83f;box-shadow:0 14px 36px rgba(122,87,0,.10)}
.game-card.event-revenge{border-color:#b8dccb}
.game-card.event-double{border-color:#e8bfd0}
.bonus-offer{margin:14px 0 0;padding:16px;border:1.5px solid #e8bfd0;border-radius:15px;background:#fff8fb}
.bonus-offer strong{font-size:16px}
.bonus-offer p{margin:6px 0 0;color:var(--muted);font-size:14px;line-height:1.45}
.bonus-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.records-panel{margin-top:22px;border-top:1px solid var(--border);padding-top:18px}
.records-panel summary{cursor:pointer;font-weight:900;color:var(--text);list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px}
.records-panel summary::-webkit-details-marker{display:none}
.records-panel summary:after{content:'+';font-size:22px;color:var(--muted)}
.records-panel[open] summary:after{content:'–'}
.records-intro{margin:6px 0 14px;color:var(--muted);font-size:13px}
.records-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.record-box{border:1px solid var(--border);border-radius:13px;padding:12px;background:#fbfcfb;min-width:0}
.record-box strong{display:block;font-size:20px;color:var(--brand);overflow-wrap:anywhere}
.record-box span{display:block;margin-top:3px;color:var(--muted);font-size:11px;font-weight:800;line-height:1.25}
@media(max-width:600px){.records-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bonus-actions>*{flex:1 1 100%}}

/* Engagement layer: practice, missions, achievements, sharing, settings */
.mode-title{margin:6px 0 0;font-size:25px;letter-spacing:-.03em}
.best-line{margin-bottom:0}
.shield-pill{background:#eef6ff;border-color:#c9ddf4;color:#315f8c}
.habit-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:16px 0 4px}
.habit-item{border:1px solid var(--border);border-radius:13px;background:#fbfcfb;padding:11px 12px;min-width:0}
.habit-item span{display:block;color:var(--muted);font-size:11px;font-weight:800;line-height:1.25}
.habit-item strong{display:block;margin-top:3px;color:var(--brand);font-size:17px;overflow-wrap:anywhere}
.practice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:18px}
.practice-action{min-height:76px;text-align:left;border:1.5px solid var(--border);border-radius:15px;background:var(--surface-soft);color:var(--text);padding:13px 14px;transition:.18s ease}
.practice-action strong{display:block;font-size:14px;line-height:1.25}.practice-action small{display:block;margin-top:5px;color:var(--muted);font-weight:700;line-height:1.35}
.practice-action:hover:not(:disabled),.practice-action:focus-visible:not(:disabled){border-color:var(--brand);background:var(--accent);outline:none}.practice-action:disabled{background:#f5f6f5;opacity:1;cursor:default}
.retention-panel{margin-top:18px;border-top:1px solid var(--border);padding-top:14px}
.retention-panel summary{cursor:pointer;font-weight:900;color:var(--text);list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px}
.retention-panel summary::-webkit-details-marker{display:none}.retention-panel summary:after{content:'+';font-size:22px;color:var(--muted)}.retention-panel[open] summary:after{content:'–'}
.retention-panel summary span{margin-left:auto;margin-right:8px;color:var(--muted);font-size:12px}
.missions-grid{display:grid;gap:9px}.mission-card{border:1px solid var(--border);border-radius:13px;padding:12px;background:#fbfcfb}
.mission-top{display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:13px;font-weight:850}.mission-top span:last-child{color:var(--muted);font-size:12px;white-space:nowrap}
.mission-bar{height:7px;background:#e9eeea;border-radius:999px;overflow:hidden;margin-top:9px}.mission-bar>span{display:block;height:100%;background:var(--brand);border-radius:999px}
.mission-card.complete{background:#eff8f3;border-color:#bfddcc}.mission-card.complete .mission-top:first-child{color:var(--good)}
.achievements-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.achievement-card{border:1px solid var(--border);border-radius:13px;padding:12px;background:#f7f8f7;opacity:.62}
.achievement-card.unlocked{opacity:1;background:#fffaf0;border-color:#e9d6a4}.achievement-card strong{display:block;font-size:13px}.achievement-card span{display:block;margin-top:3px;color:var(--muted);font-size:11px;font-weight:700;line-height:1.3}
.setting-row{display:flex;gap:12px;flex-wrap:wrap}.toggle-label{min-height:44px;display:flex;align-items:center;gap:9px;padding:0 13px;border:1px solid var(--border);border-radius:12px;background:#fbfcfb;font-weight:800}.toggle-label input{width:18px;height:18px;accent-color:var(--brand)}
.share-panel{margin-top:16px;padding:15px;border:1px solid var(--border);border-radius:14px;background:#fbfcfb;text-align:left}.share-panel p{margin:5px 0 10px;color:var(--muted);font-size:13px}
.share-link-input,.share-textarea{width:100%;border:1px solid var(--border);border-radius:11px;background:white;color:var(--text);padding:11px 12px;font:inherit;font-size:13px}.share-textarea{min-height:110px;resize:vertical}
.mini-saver{display:inline-flex;align-items:center;gap:3px;border-radius:999px;background:#eef6ff;border:1px solid #c9ddf4;color:#315f8c;padding:5px 8px;font-weight:900}
.achievement-toast{margin:12px auto 0;max-width:560px;padding:12px 14px;border-radius:13px;background:#fff8df;border:1px solid #ead7a2;color:#705500;font-weight:850;font-size:14px}
.adaptive-card{margin:18px 0 0;padding:15px;border:1px solid #c9ddf4;border-radius:14px;background:#f4f8fd;display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left}.adaptive-card p{margin:4px 0 0;color:var(--muted);font-size:13px}.adaptive-card .btn-secondary{flex:0 0 auto}
.result-message{margin:8px auto 0;max-width:560px;text-align:center}
.share-card-preview{max-width:460px;margin:22px auto 0;border:1px solid var(--border);border-radius:18px;background:linear-gradient(160deg,#fff,#f0f4ef);padding:22px;text-align:left;box-shadow:0 8px 20px rgba(23,32,42,.05)}
.share-card-brand{font-weight:950;letter-spacing:.11em;font-size:13px;color:var(--brand)}.share-card-tag{font-size:13px;color:var(--muted);margin:2px 0 18px}.share-card-preview>strong{display:block;font-size:25px;letter-spacing:-.03em}.share-card-preview>span{display:block;margin-top:7px;font-size:15px;font-weight:850}.share-card-preview>small{display:block;margin-top:20px;color:var(--muted);font-weight:800}
.result-main-actions,.result-share-actions{justify-content:center}.result-share-actions{margin-top:8px}
.friend-result{border-color:#c9ddf4}.mastery-result{border-color:#b8dccb}

@media(max-width:600px){
  .habit-strip{grid-template-columns:1fr}.practice-grid{grid-template-columns:1fr}.achievements-grid{grid-template-columns:1fr}.adaptive-card{align-items:stretch;flex-direction:column}.adaptive-card .btn-secondary{width:100%}.result-share-actions>*{flex:1 1 100%}
}

/* Share BrainKong + BrainKong Grid */
.practice-link{display:block;text-decoration:none;cursor:pointer}
.center-actions{justify-content:center}
.home-share-panel{max-width:560px;margin:18px auto 0;padding:15px;border:1px solid var(--border);border-radius:14px;background:var(--surface);text-align:left}
.home-share-panel[hidden]{display:none}
.home-share-panel p{margin:0 0 10px;color:var(--muted);font-size:14px}

.grid-wrap{max-width:940px;padding:34px 0 68px}
.grid-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:18px}
.grid-page-head h1{font-size:clamp(38px,7vw,62px);line-height:1;letter-spacing:-.045em;margin:8px 0 10px}
.grid-subtitle{margin:0;color:var(--muted);font-size:17px;max-width:650px}
.grid-mode-card,.grid-game-card,.grid-result-panel{padding:24px}
.grid-mode-card h2,.grid-game-card h2,.grid-result-panel h2{font-size:clamp(26px,4vw,36px);letter-spacing:-.035em;line-height:1.08;margin:7px 0 10px}
.grid-intro{margin:0 0 18px;color:var(--muted);font-size:15px}
.grid-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.grid-mode-btn{min-height:92px;text-align:left;border:1.5px solid var(--border);border-radius:16px;background:var(--surface);color:var(--text);padding:15px 16px;transition:.18s ease}
.grid-mode-btn strong{display:block;font-size:16px;line-height:1.25}.grid-mode-btn small{display:block;margin-top:6px;color:var(--muted);font-size:12px;font-weight:750}
.grid-mode-btn:hover,.grid-mode-btn:focus-visible{border-color:var(--brand);background:var(--accent);outline:none}
.daily-grid-btn{background:#fffdf7}
.grid-stats-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:18px}
.grid-stats-strip>div{border:1px solid var(--border);border-radius:13px;background:#fbfcfb;padding:11px 12px}
.grid-stats-strip span{display:block;color:var(--muted);font-size:11px;font-weight:800;line-height:1.25}.grid-stats-strip strong{display:block;margin-top:3px;color:var(--brand);font-size:17px}
.grid-mode-actions{display:flex;justify-content:flex-end;margin-top:14px}
.grid-game-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.grid-game-stats{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 12px}
.grid-game-stats span{border:1px solid var(--border);border-radius:999px;background:#fbfcfb;padding:6px 9px;color:var(--muted);font-size:12px;font-weight:800}
.grid-rule{padding:10px 12px;border-radius:12px;background:var(--surface-soft);color:#53606c;font-size:13px;font-weight:750;margin-bottom:14px}
.language-grid{--grid-size:3;width:min(100%,720px);margin:0 auto;display:grid;grid-template-columns:repeat(var(--grid-size),minmax(0,1fr));border:2px solid #8da197;border-radius:12px;overflow:hidden;background:#8da197;gap:1px;aspect-ratio:1/1}
.grid-cell{min-width:0;min-height:0;border:0;border-radius:0;background:white;color:var(--text);padding:2px;font-size:clamp(9px,2.6vw,14px);font-weight:900;line-height:1.05;overflow-wrap:anywhere;word-break:normal;display:grid;place-items:center;text-align:center;outline:none;transition:.14s ease}
.grid-cell.given{background:#eef3ef;color:var(--brand);cursor:default}
.grid-cell:not(.given):hover,.grid-cell:not(.given):focus-visible{background:#f2f8f5;box-shadow:inset 0 0 0 3px rgba(38,102,79,.20)}
.grid-cell.selected{background:#dff2e8!important;box-shadow:inset 0 0 0 4px var(--brand)!important;position:relative;z-index:1}
.grid-cell.box-left{border-left:3px solid #71887c}.grid-cell.box-top{border-top:3px solid #71887c}
.grid-cell.wrong-flash{animation:gridWrong .34s ease}
@keyframes gridWrong{0%,100%{background:white}45%{background:#fdecea}}
.language-grid[data-size="9"] .grid-cell{font-size:clamp(6.5px,1.8vw,10px);letter-spacing:-.06em;white-space:nowrap;overflow:hidden;padding:0}
.language-grid[data-size="6"] .grid-cell{font-size:clamp(9px,2.2vw,13px)}

.grid-play-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,340px);grid-template-areas:"board assist";gap:22px;align-items:start}
.grid-board-column{grid-area:board;min-width:0}
.grid-assist-panel{grid-area:assist;min-width:0;position:sticky;top:84px;border:1px solid var(--border);border-radius:17px;background:#fbfcfb;padding:16px}
.grid-board-help{margin:0 0 9px;color:var(--muted);font-size:12px;font-weight:800;text-align:center}
.grid-selected-position{display:inline-flex;margin-top:7px;padding:5px 9px;border-radius:999px;background:#e2f1ea;color:var(--brand);font-size:12px;font-weight:900}
.grid-answer-panel{padding-top:2px}
.grid-assist-panel .grid-clue-card{margin:0 0 14px;padding:14px;background:white}
.grid-assist-panel .grid-game-actions{margin-top:14px}
.grid-assist-panel .grid-game-actions>*{flex:1 1 100%}
.grid-clue-card{margin:16px 0;padding:16px;border:1px solid var(--border);border-radius:15px;background:#fbfcfb}
.grid-clue{margin:7px 0 0;font-size:clamp(18px,3vw,25px);font-weight:850;letter-spacing:-.02em;line-height:1.25}
.grid-word-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}
.grid-word-btn{min-height:46px;border:1.5px solid var(--border);border-radius:12px;background:white;color:var(--text);font-weight:900;padding:7px 8px;overflow-wrap:anywhere}
.grid-word-btn:hover,.grid-word-btn:focus-visible{border-color:var(--brand);background:var(--accent);outline:none}
.grid-game-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.grid-result-panel{text-align:center}
.grid-result-panel:not(.hidden){display:block}
.grid-result-score{margin:14px auto 6px;max-width:320px;padding:16px;border-radius:16px;background:var(--accent)}
.grid-result-score span{display:block;color:var(--muted);font-size:12px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.grid-result-score strong{display:block;color:var(--brand);font-size:46px;letter-spacing:-.045em;line-height:1.1;margin-top:3px}
.grid-result-actions{justify-content:center}

@media(max-width:760px){
  .grid-play-layout{grid-template-columns:1fr;grid-template-areas:"assist" "board";gap:14px}
  .grid-assist-panel{position:static;padding:14px}
  .grid-page-head{align-items:flex-start;flex-direction:column}.grid-page-head>.btn-secondary{width:100%}
  .grid-mode-grid{grid-template-columns:1fr 1fr}.grid-stats-strip{grid-template-columns:1fr}.grid-mode-actions>*{width:100%}
  .grid-mode-card,.grid-game-card,.grid-result-panel{padding:18px}.grid-word-tray{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-game-actions>*{flex:1 1 calc(50% - 5px)}
}
@media(max-width:420px){
  .grid-mode-grid{grid-template-columns:1fr}.language-grid{border-radius:9px}.grid-cell.box-left{border-left-width:2px}.grid-cell.box-top{border-top-width:2px}.grid-game-actions>*{flex:1 1 100%}.grid-word-btn{font-size:13px;padding:5px 4px}.grid-game-top{flex-direction:column}.grid-game-top .game-switch-btn{width:100%}
}

/* BrainKong Brain Games */
.brain-wrap{padding-top:34px;padding-bottom:54px}.brain-top{align-items:flex-end}.brain-menu h1{margin:.2rem 0 .45rem}.brain-game-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:22px}.brain-game-card{appearance:none;text-align:left;border:1px solid var(--border,#d9e0dc);background:#fff;border-radius:17px;padding:18px;min-height:116px;cursor:pointer;color:inherit;transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease}.brain-game-card strong{display:block;font-size:1rem;margin-bottom:7px}.brain-game-card small{display:block;color:#5f6d75;line-height:1.35}.brain-game-card span{display:block;margin-top:10px;font-size:.78rem;font-weight:800;color:#26664f}.brain-game-card:hover{border-color:#8db6a5;transform:translateY(-1px);box-shadow:0 8px 24px rgba(25,53,43,.06)}.brain-menu-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.brain-stage{margin-top:0}.brain-stage-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.brain-stage-stats{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.brain-prompt{margin:28px 0 18px}.brain-prompt h3{font-size:1.45rem;margin:.35rem 0 .4rem}.brain-prompt p{color:#627078}.brain-arena{min-height:180px}.brain-feedback{min-height:34px;margin-top:16px}.brain-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.brain-choice,.connection-word{border:1px solid #d8e0dc;background:#fff;border-radius:13px;padding:14px;font-weight:750;min-height:52px;cursor:pointer;color:#142337}.brain-choice:hover,.connection-word:hover{border-color:#78a992}.brain-choice.wrong{border-color:#d86b6b;background:#fff5f5}.brain-choice.correct{border-color:#2b7a5c;background:#f1fbf6}.scramble-output,.memory-reveal,.raw-sentence,.missing-sentence,.speed-word,.ladder-current{border:1px solid #dbe3df;background:#f8faf9;border-radius:15px;padding:20px;font-size:1.25rem;font-weight:800;line-height:1.5;margin-bottom:15px}.word-chip-wrap{display:flex;flex-wrap:wrap;gap:9px}.word-chip{border:1px solid #cfdad4;background:#fff;border-radius:999px;padding:11px 15px;font-weight:750;cursor:pointer}.word-chip:disabled{opacity:.35}.spot-sentence{font-size:1.35rem;line-height:2.1}.spot-word{border:0;background:#f6f8f7;border-radius:8px;padding:5px 7px;font:inherit;font-weight:750;cursor:pointer}.spot-word:hover{background:#e8f3ed}.connection-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.connection-word.selected{background:#dff1e8;border-color:#477d67}.brain-textarea{width:100%;min-height:112px;border:1px solid #d7dfdb;border-radius:15px;padding:14px 16px;font:inherit;font-size:16px;margin-bottom:12px;resize:vertical}.speed-word{text-align:center;font-size:2.4rem;letter-spacing:.02em}.brain-controls{margin-top:14px}.timer-danger{background:#fff0f0!important;border-color:#e7a1a1!important;color:#a62e2e!important}.result-panel.hidden{display:none!important}
@media(max-width:640px){.brain-game-grid{grid-template-columns:1fr}.brain-stage-head{display:block}.brain-stage-stats{justify-content:flex-start;margin-top:12px}.brain-choice-grid{grid-template-columns:1fr}.connection-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.brain-game-card{min-height:auto}.brain-prompt h3{font-size:1.25rem}.spot-sentence{font-size:1.15rem}.speed-word{font-size:2rem}}

@keyframes brainPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}
.timer-danger{animation:brainPulse .55s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){.timer-danger{animation:none}.brain-game-card{transition:none}}


/* Central Games Hub */
.games-hub-wrap{padding-top:42px;padding-bottom:64px}.games-hub-head{text-align:center;max-width:760px;margin:0 auto 26px}.games-hub-head h1{font-size:clamp(42px,7vw,68px);line-height:1;letter-spacing:-.05em;margin:8px 0 14px}.games-hub-head .lead{margin:0 auto;color:var(--muted)}.game-family{border:1px solid var(--border);border-radius:22px;background:white;padding:24px;margin-top:16px}.family-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:16px}.family-head h2{font-size:clamp(25px,4vw,34px);letter-spacing:-.035em;margin:5px 0 6px}.family-head p{margin:0;color:var(--muted);max-width:650px}.family-game-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.family-game-grid-five{grid-template-columns:repeat(5,minmax(0,1fr))}.family-game-card{display:block;min-height:88px;border:1.5px solid var(--border);border-radius:15px;background:#fbfcfb;color:var(--text);padding:14px;text-decoration:none;transition:.16s ease}.family-game-card strong{display:block;line-height:1.25}.family-game-card small{display:block;color:var(--muted);font-size:12px;font-weight:700;line-height:1.35;margin-top:6px}.family-game-card:hover,.family-game-card:focus-visible{border-color:var(--brand);background:var(--accent);outline:none;transform:translateY(-1px)}.family-surprise{background:#fffdf7}.family-grid{background:#fbfdfb}.family-brain{background:#fcfcfb}.family-typing{background:#f8faf9}.family-coming{display:inline-flex;border:1px solid var(--border);border-radius:999px;padding:8px 11px;color:var(--brand);font-size:12px;font-weight:900;white-space:nowrap}.typing-preview-grid{display:flex;flex-wrap:wrap;gap:8px}.typing-preview-grid span{border:1px solid var(--border);border-radius:999px;background:white;padding:8px 11px;color:var(--muted);font-size:12px;font-weight:800}.games-hub-bottom{text-align:center;padding:34px 0 0}.games-hub-bottom p{color:var(--muted);margin:0 0 12px}.game-family-note{margin:7px 0 0;font-size:13px}.game-family-note a{color:var(--brand);font-weight:850;text-decoration:none}
@media(max-width:900px){.family-game-grid-five{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.family-head{align-items:flex-start;flex-direction:column}.family-head>a,.family-coming{width:100%;text-align:center;justify-content:center}.family-game-grid,.family-game-grid-five{grid-template-columns:repeat(2,minmax(0,1fr))}.game-family{padding:18px}}
@media(max-width:420px){.family-game-grid,.family-game-grid-five{grid-template-columns:1fr}.games-hub-wrap{padding-top:28px}.games-hub-head h1{font-size:42px}}

/* Typing Games */
.typing-wrap{padding:34px 0 64px;max-width:980px}.typing-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:16px}.typing-hero h1{font-size:clamp(38px,7vw,64px);letter-spacing:-.05em;line-height:1;margin:7px 0 10px}.typing-hero p{color:var(--muted);max-width:700px}.progression-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:16px 0 22px}.progression-strip>div{border:1px solid var(--border);border-radius:14px;background:#fbfcfb;padding:11px}.progression-strip span{display:block;color:var(--muted);font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.05em}.progression-strip strong{display:block;margin-top:4px;font-size:15px}.typing-game-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.typing-game-card{min-height:106px;text-align:left;border:1.5px solid var(--border);border-radius:16px;background:white;color:var(--text);padding:15px;cursor:pointer;transition:.16s ease}.typing-game-card strong{display:block;font-size:15px;line-height:1.25}.typing-game-card small{display:block;color:var(--muted);font-weight:700;line-height:1.35;margin-top:6px}.typing-game-card span{display:block;color:var(--brand);font-size:11px;font-weight:900;margin-top:8px}.typing-game-card:hover,.typing-game-card:focus-visible{border-color:var(--brand);background:var(--accent);outline:none;transform:translateY(-1px)}.typing-game-card .locked-note{color:#8b6500}.typing-stage{padding:24px;margin-top:18px}.typing-stage-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.typing-stage-head h2{margin:4px 0 0;font-size:29px;letter-spacing:-.035em}.typing-live-stats{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.typing-live-stats span{border:1px solid var(--border);border-radius:999px;background:#fbfcfb;padding:7px 10px;font-size:12px;font-weight:850}.typing-prompt{margin:22px 0 8px;color:var(--muted);font-size:13px;font-weight:850;text-transform:uppercase;letter-spacing:.05em}.typing-target{border:1px solid var(--border);border-radius:16px;background:#f8faf9;padding:20px;font-size:clamp(19px,3vw,28px);font-weight:850;line-height:1.45;min-height:78px}.typing-target.flash-hidden{color:transparent;user-select:none;background:repeating-linear-gradient(135deg,#f3f6f4,#f3f6f4 10px,#edf2ef 10px,#edf2ef 20px)}.typing-target.flash-hidden:after{content:'Sentence hidden — type from memory 👀';color:var(--muted);font-size:15px;font-weight:800}.typing-input{width:100%;min-height:145px;border:2px solid var(--border);border-radius:16px;padding:16px;margin-top:14px;font:inherit;font-size:18px;line-height:1.5;resize:vertical;color:var(--text);background:white}.typing-input:focus{outline:3px solid rgba(38,102,79,.14);border-color:var(--brand)}.typing-results.show{display:block}.typing-results{max-width:760px;margin:20px auto 0}.typing-results .achievement-toast{margin:12px 0}.hub-progress{display:grid;grid-template-columns:1.7fr repeat(3,1fr) auto;gap:8px;align-items:stretch;margin:0 0 18px}.hub-progress>*{border:1px solid var(--border);border-radius:14px;background:white;padding:11px 12px;text-decoration:none;color:var(--text)}.hub-progress-rank{display:flex;align-items:center;gap:10px}.hub-progress-rank>span{font-size:25px}.hub-progress small{display:block;color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}.hub-progress strong{display:block;margin-top:3px}.hub-progress-link{display:flex;align-items:center;justify-content:center;color:var(--brand);font-weight:900}.progress-page{padding:44px 0 70px;max-width:980px}.progress-head{text-align:center;max-width:720px;margin:0 auto 24px}.progress-head h1{font-size:clamp(40px,7vw,64px);letter-spacing:-.05em;margin:7px 0 10px}.progress-head p{color:var(--muted)}.progression-rank-card{display:flex;align-items:center;gap:20px;padding:24px}.rank-icon{font-size:54px}.rank-main{flex:1}.rank-main h2{font-size:36px;margin:4px 0 10px}.mini-progress{height:8px;border-radius:999px;background:#e9eeeb;overflow:hidden}.mini-progress span{display:block;height:100%;background:var(--brand);border-radius:999px}.progress-two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.progress-section{padding:22px;margin-top:14px}.progress-section h2{margin:5px 0 14px;font-size:25px}.goal-list,.mastery-map{display:grid;gap:12px}.goal-row>div:first-child,.mastery-row>div:first-child{display:flex;justify-content:space-between;gap:10px;margin-bottom:6px}.goal-row span,.mastery-row span{color:var(--muted);font-size:13px;font-weight:800}.unlock-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.unlock-card{border:1px solid var(--border);border-radius:14px;padding:14px;background:#fafbfa}.unlock-card.unlocked{background:#eff8f3;border-color:#b8dccb}.unlock-card strong,.unlock-card span,.unlock-card small{display:block}.unlock-card span{color:var(--muted);font-size:13px;margin:5px 0}.unlock-card small{color:var(--brand);font-weight:850}.progress-page .records-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:820px){.typing-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.progression-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.hub-progress{grid-template-columns:repeat(2,minmax(0,1fr))}.hub-progress-link{grid-column:1/-1}.progress-two-col{grid-template-columns:1fr}.progress-page .records-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.typing-hero,.typing-stage-head{flex-direction:column;align-items:flex-start}.typing-hero>.btn-secondary{width:100%}.typing-game-grid{grid-template-columns:1fr}.typing-live-stats{justify-content:flex-start}.typing-input{font-size:16px;min-height:130px}.progression-strip{grid-template-columns:1fr 1fr}.hub-progress{grid-template-columns:1fr 1fr}.unlock-grid{grid-template-columns:1fr}.progress-page .records-grid{grid-template-columns:1fr}.progression-rank-card{align-items:flex-start;flex-direction:column}}
.hub-comeback{grid-column:1/-1;background:#fff9dc!important;border-color:#e6cf70!important;color:#6c5600!important;font-weight:900;text-align:center}

/* Grid Games engagement parity: live score, combos, tension and auto-continuation */
.grid-stats-strip{grid-template-columns:repeat(5,minmax(0,1fr))}
.grid-game-stats span:first-child,.grid-game-stats span:nth-child(2){color:var(--text);background:#f4faf6;border-color:#c7ded2}
.grid-energy-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-height:32px;margin:-2px 0 12px}
.grid-combo-pill,.grid-run-pill{display:inline-flex;align-items:center;min-height:30px;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:950;letter-spacing:.02em}
.grid-combo-pill{background:#fff3d6;border:1px solid #e8c979;color:#775100}
.grid-run-pill{background:#edf7f1;border:1px solid #bddac9;color:var(--brand)}
.grid-tension-line{display:inline-block;color:#8c4d00;font-size:12px;font-weight:900;line-height:1.35}
.grid-next-countdown{max-width:520px;margin:14px auto 2px;border:1px solid #c8ddcf;background:#f1f8f4;border-radius:14px;padding:10px 14px;color:var(--brand);font-weight:900;text-align:center}
.grid-cell.selected{box-shadow:inset 0 0 0 3px var(--brand),0 0 0 3px rgba(38,102,79,.10)}
.grid-word-btn:active{transform:translateY(1px) scale(.99)}
@media(max-width:980px){.grid-stats-strip{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.grid-stats-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-game-stats{gap:6px}.grid-game-stats span{font-size:11px;padding:6px 8px}.grid-energy-row{align-items:flex-start}.grid-tension-line{width:100%}}
.grid-cell.solved{background:#edf7f1;color:var(--brand);font-weight:900;cursor:default}

.seasonal-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.seasonal-badge{font-size:.75rem;font-weight:800;letter-spacing:.06em;padding:6px 9px;border-radius:999px;background:#edf6f0;color:#24634c}.seasonal-progress-top{display:flex;justify-content:space-between;gap:12px;margin:18px 0 8px;font-size:.9rem}.seasonal-progress-bar{height:10px;border-radius:999px;background:#e8eeea;overflow:hidden}.seasonal-progress-bar span{display:block;height:100%;width:0;background:#26755a;transition:width .25s ease}.seasonal-goals{display:grid;gap:9px;margin:14px 0}.seasonal-goal{display:flex;justify-content:space-between;gap:12px;padding:11px 13px;border:1px solid #dce4de;border-radius:13px}.seasonal-goal.complete{background:#f1f8f4;border-color:#bcd8c9}.seasonal-reward{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;margin-top:12px;border-radius:13px;background:#fff7df;border:1px solid #ecd591}.seasonal-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}.seasonal-status{margin-top:10px;color:#5d6a63;font-size:.92rem}

/* QA consistency improvements */
.brain-help-actions{margin-top:10px;padding-top:10px;border-top:1px solid var(--border,#dce4de)}
.seasonal-progress-wrap{margin:18px 0 12px}.seasonal-progress-top{display:flex;justify-content:space-between;gap:16px;font-size:.9rem;margin-bottom:8px}.seasonal-progress-bar{height:10px;border-radius:999px;background:#e9eeea;overflow:hidden}.seasonal-progress-bar span{display:block;height:100%;width:0;background:#26755a;transition:width .25s ease}.seasonal-goals{display:grid;gap:10px;margin:14px 0}.seasonal-goal{display:flex;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #dce4de;border-radius:14px;background:#fff}.seasonal-goal.complete{background:#f1f8f4;border-color:#bcd8c9}.seasonal-reward{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;margin-top:12px;border-radius:14px;background:#fff7df;border:1px solid #ecd591}.seasonal-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.seasonal-status{margin-top:10px;color:#5d6a63;font-size:.92rem}.seasonal-badge{font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;padding:6px 9px;border-radius:999px;background:#edf6f0;color:#24634c}.progress-card-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
@media(max-width:560px){.seasonal-goal,.seasonal-reward,.seasonal-progress-top{align-items:flex-start}.seasonal-goal{flex-direction:column;gap:6px}}

.feedback-shell{max-width:860px}.feedback-form{padding:28px;display:grid;gap:22px}.feedback-form label>span,.feedback-fieldset legend{display:block;font-weight:800;margin-bottom:8px;color:#26364c}.feedback-form input[type="email"],.feedback-form select,.feedback-form textarea{width:100%;font:inherit;border:1px solid #d5ddd8;border-radius:14px;background:#fff;padding:13px 14px;color:#102238;box-sizing:border-box}.feedback-form textarea{resize:vertical;min-height:150px}.feedback-fieldset{border:0;padding:0;margin:0}.rating-row{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.rating-row label{cursor:pointer}.rating-row input{position:absolute;opacity:0;pointer-events:none}.rating-row span{display:flex;min-height:78px;border:1px solid #d8e0da;border-radius:14px;align-items:center;justify-content:center;flex-direction:column;gap:5px;font-size:1.55rem;background:#fff}.rating-row small{font-size:.76rem;color:#59667a;font-weight:700}.rating-row input:checked+span{border-color:#26755a;background:#eef7f2;box-shadow:0 0 0 2px rgba(38,117,90,.12)}.rating-row input:focus-visible+span{outline:3px solid rgba(38,117,90,.25);outline-offset:2px}.feedback-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field-note{display:block;margin-top:6px;color:#68758a}.feedback-actions{display:flex;gap:10px;flex-wrap:wrap}.feedback-local-note{padding:12px 14px;border-radius:12px;background:#fff7df;border:1px solid #ecd591;color:#6c5200;font-weight:700}.feedback-thanks{text-align:center;padding:46px 30px;max-width:720px;margin:auto}.site-footer a{color:inherit}.feedback-invite{margin-top:14px;padding-top:14px;border-top:1px solid #e2e7e3;font-size:.9rem}.feedback-invite a{font-weight:800;color:#26755a;text-decoration:none}@media(max-width:640px){.rating-row{grid-template-columns:repeat(3,1fr)}.feedback-grid{grid-template-columns:1fr}.feedback-form{padding:20px}.rating-row span{min-height:70px}}


/* BrainKong universal player feedback */
.itlence-feedback-inline{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid var(--border, #dfe6e1);
  font-size:.95rem;
}
.itlence-feedback-inline a{
  color:var(--green, #1f6f56);
  font-weight:700;
  text-decoration:none;
}
.itlence-feedback-inline a:hover{text-decoration:underline;}

.itlence-feedback-result{
  display:block;
  margin-top:22px;
  padding:18px 20px;
  border:1px solid var(--border, #dfe6e1);
  border-radius:16px;
  background:#f7faf8;
  color:inherit;
  text-decoration:none;
  cursor:pointer;
  transition:transform .14s ease, border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
/* whole card is clickable — lift + brand highlight on hover / keyboard focus */
.itlence-feedback-result:hover,
.itlence-feedback-result:focus-visible{
  transform:translateY(-2px);
  border-color:var(--brand, #1f6f56);
  background:#eef7f2;
  box-shadow:0 14px 28px -16px rgba(31,111,86,.5);
  outline:none;
}
.itlence-feedback-result strong{
  display:block;
  margin-bottom:5px;
  color:#0c2340;
  font-size:1.05rem;
}
.itlence-feedback-result p{
  margin:0 0 12px;
  color:#5e6877;
}
.itlence-feedback-result .itlence-feedback-cue{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:10px 15px;
  border-radius:12px;
  background:#1f6f56;
  color:#fff;
  font-weight:800;
  text-decoration:none;
  transition:transform .14s ease, filter .14s ease;
}
.itlence-feedback-result:hover .itlence-feedback-cue,
.itlence-feedback-result:focus-visible .itlence-feedback-cue{filter:brightness(1.08);transform:translateX(2px)}
@media(max-width:640px){
  .itlence-feedback-result{padding:16px;}
}


/* =========================================================
   GAME AREA ALIGNMENT SYSTEM — release QA
   One visual content edge across every playable game family.
   ========================================================= */
:root{--game-pad:24px;--game-pad-mobile:18px;--green:var(--brand);--soft:var(--surface-soft)}

/* Every primary playable surface gets the same internal inset. */
.game-card,
.brain-stage,
.typing-stage,
.grid-game-card,
.result-panel,
.grid-result-panel{
  box-sizing:border-box;
}

/* Brain Games previously lacked card padding entirely. */
.brain-stage{
  padding:var(--game-pad);
}

/* Keep all Brain Game content on one clean vertical axis. */
.brain-stage-head,
.brain-prompt,
.brain-arena,
.brain-feedback,
.brain-controls,
.brain-help-actions{
  width:100%;
  box-sizing:border-box;
  margin-left:0;
  margin-right:0;
}
.brain-stage-head{margin-bottom:0}
.brain-prompt{margin:24px 0 16px}
.brain-prompt>.eyebrow,
.brain-prompt>h3,
.brain-prompt>p{margin-left:0;margin-right:0}
.brain-arena>*:first-child{margin-top:0}
.brain-arena>*:last-child{margin-bottom:0}
.brain-controls,.brain-help-actions{justify-content:flex-start}

/* Form controls must not create their own horizontal offset. */
.answer-input,
.brain-textarea,
.typing-input,
.typing-target,
.grid-rule,
.grid-clue-card{
  box-sizing:border-box;
}
.brain-textarea,.typing-input{display:block;margin-left:0;margin-right:0}

/* Normalize the content rhythm across the other game families. */
.game-card{padding:var(--game-pad)}
.typing-stage{padding:var(--game-pad)}
.grid-game-card{padding:var(--game-pad)}
.game-card .progress-row,
.game-card .progress-track,
.game-card .game-challenge,
.game-card .answer-input,
.game-card .game-actions,
.game-card .game-meta,
.typing-stage-head,
.typing-prompt,
.typing-target,
.typing-input,
.typing-stage .game-actions,
.grid-game-top,
.grid-game-stats,
.grid-rule,
.grid-play-layout,
.grid-game-actions{
  margin-left:0;
  margin-right:0;
}

/* In-game feedback follows the same inset as the game content instead
   of aligning to the outside border of the card. */
.itlence-feedback-inline{
  box-sizing:border-box;
  margin-left:var(--game-pad);
  margin-right:var(--game-pad);
}

/* Result feedback stays aligned with result-panel content. */
.result-panel .itlence-feedback-result,
.grid-result-panel .itlence-feedback-result,
.typing-results .itlence-feedback-result{
  margin-left:0;
  margin-right:0;
}

@media(max-width:760px){
  .game-card,
  .brain-stage,
  .typing-stage,
  .grid-game-card,
  .result-panel,
  .grid-result-panel{
    padding:var(--game-pad-mobile);
  }
  .itlence-feedback-inline{
    margin-left:var(--game-pad-mobile);
    margin-right:var(--game-pad-mobile);
  }
  .brain-prompt{margin:20px 0 14px}
}

/* Progressive Grid difficulty */
.grid-difficulty-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin:14px 0 16px;
  padding:11px 14px;
  border:1px solid var(--border,#dfe6e1);
  border-radius:12px;
  background:#f7faf8;
}
.grid-difficulty-strip strong{
  color:#173e32;
  font-size:.92rem;
}
.grid-difficulty-strip span{
  color:#65716d;
  font-size:.85rem;
  font-weight:650;
}
@media(max-width:640px){
  .grid-difficulty-strip{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
  }
}

.feedback-success-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  max-width:1120px;
  margin:18px auto 0;
  padding:14px 18px;
  border:1px solid var(--border,#dfe6e1);
  border-radius:14px;
  background:#f3faf6;
  color:#153b30;
}
.feedback-success-banner.hidden{display:none;}
.feedback-success-banner div{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.feedback-success-banner strong{font-size:1rem;}
.feedback-success-banner span{font-size:.92rem;color:#5f6d68;}
.feedback-success-banner button{
  border:0;
  background:transparent;
  font-size:1.5rem;
  line-height:1;
  cursor:pointer;
  color:#42534d;
}
@media(max-width:640px){
  .feedback-success-banner{
    margin:12px 16px 0;
    align-items:flex-start;
  }
}


/* =========================================================
   BRAINKONG V1 — MOBILE GRID COMPACT LAYOUT
   Keeps all information while moving the playable board
   much higher on small screens.
   ========================================================= */
@media (max-width: 700px) {
  /* Compact global mobile header on game pages */
  .site-header .site-shell,
  .header-inner {
    min-height: 76px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .brand-name,
  .site-brand strong {
    font-size: 1.05rem;
    letter-spacing: .12em;
  }

  .nav-cta,
  .site-header .btn-primary {
    min-height: 48px;
    padding: 0 20px;
    border-radius: 16px;
  }

  /* Grid page hero/header area */
  .grid-page .page-intro,
  .grid-page .game-page-intro,
  body:has(#gridGamePanel) .page-intro,
  body:has(#gridGamePanel) .game-page-intro {
    padding-top: 22px;
    padding-bottom: 14px;
  }

  body:has(#gridGamePanel) .page-intro h1,
  body:has(#gridGamePanel) .game-page-intro h1,
  body:has(#gridGamePanel) h1 {
    margin-bottom: 8px;
  }

  body:has(#gridGamePanel) .page-intro p,
  body:has(#gridGamePanel) .game-page-intro p {
    margin-bottom: 0;
    line-height: 1.4;
  }

  /* Back button no longer consumes a tall standalone block */
  body:has(#gridGamePanel) .back-to-games,
  body:has(#gridGamePanel) a[href="games.html"].btn-secondary,
  body:has(#gridGamePanel) a[href="games.html"].btn-ghost {
    min-height: 46px;
    padding: 10px 16px;
  }

  /* Main Grid card */
  .grid-game-card {
    padding: 16px;
    border-radius: 22px;
  }

  .grid-game-card .game-card-header,
  .grid-game-card .grid-game-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .grid-game-card h2,
  .grid-game-card h3 {
    margin-bottom: 4px;
  }

  /* Change Grid / New Puzzle controls */
  .grid-game-card .game-card-actions,
  .grid-game-card .grid-top-actions {
    gap: 8px;
  }

  .grid-game-card .game-card-actions .btn-secondary,
  .grid-game-card .game-card-actions .btn-ghost,
  .grid-game-card .grid-top-actions .btn-secondary,
  .grid-game-card .grid-top-actions .btn-ghost {
    min-height: 46px;
    padding: 8px 14px;
  }

  /* Difficulty strip: same content, less vertical weight */
  .grid-difficulty-strip {
    padding: 14px 16px;
    margin: 10px 0 12px;
    border-radius: 16px;
  }

  .grid-difficulty-strip strong,
  #gridDifficultyTier {
    font-size: 1rem;
    line-height: 1.2;
  }

  .grid-difficulty-strip span,
  #gridDifficultyProgress {
    margin-top: 4px;
    font-size: .88rem;
    line-height: 1.35;
  }

  /* Stats wrap more tightly */
  .grid-stats,
  .grid-live-stats,
  .game-stats {
    gap: 8px;
    margin: 10px 0;
  }

  .grid-stats .stat-pill,
  .grid-live-stats .stat-pill,
  .grid-game-card .stat-pill {
    min-height: 38px;
    padding: 7px 11px;
    font-size: .86rem;
  }

  /* Grid run + tension commentary */
  #gridRunPill {
    margin-top: 2px;
  }

  #gridTensionLine,
  .grid-tension-line {
    margin: 8px 0 10px;
    font-size: .92rem;
    line-height: 1.3;
  }

  /* Rule/instruction panel */
  .grid-rule,
  #gridRule {
    padding: 12px 14px;
    margin: 10px 0 12px;
    border-radius: 15px;
    line-height: 1.35;
  }

  /* Pull actual playable board upward */
  #gridAssistPanel,
  .grid-assist-panel,
  .grid-play-area {
    margin-top: 10px;
  }

  .grid-board-wrap,
  .language-grid-wrap {
    margin-top: 10px;
  }

  /* Prevent oversized vertical gaps from shared section spacing */
  body:has(#gridGamePanel) main > section,
  body:has(#gridGamePanel) .section-block {
    margin-bottom: 20px;
  }
}

/* Extra-tight treatment for narrow phones */
@media (max-width: 430px) {
  body:has(#gridGamePanel) .site-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  body:has(#gridGamePanel) h1 {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
    line-height: .98;
  }

  .grid-game-card {
    padding: 14px;
  }

  .grid-difficulty-strip {
    padding: 12px 14px;
  }

  .grid-stats,
  .grid-live-stats,
  .game-stats {
    gap: 6px;
  }

  .grid-stats .stat-pill,
  .grid-live-stats .stat-pill,
  .grid-game-card .stat-pill {
    padding: 6px 10px;
    font-size: .82rem;
  }

  #gridTensionLine,
  .grid-tension-line {
    margin-top: 6px;
    margin-bottom: 8px;
  }
}


/* =========================================================
   BRAINKONG V2 — BRAIN SWITCH
   ========================================================= */
.switch-wrap{max-width:820px;margin:0 auto;padding:34px 0 64px}
.switch-intro h1{font-size:clamp(36px,7vw,58px);letter-spacing:-.055em;line-height:.98;margin:.2rem 0 .55rem}
.switch-brief{display:flex;justify-content:space-between;gap:24px;align-items:center;padding:22px 24px;margin-top:18px}
.switch-brief>div:first-child{max-width:530px}
.switch-brief strong{display:block;font-size:1.08rem;line-height:1.45;margin:5px 0}
.switch-brief p{color:var(--muted);margin:6px 0 0;line-height:1.5}
.switch-kicker,.switch-rule-label{font-size:.72rem;font-weight:900;letter-spacing:.09em;color:var(--green);text-transform:uppercase}
.switch-brief-stats{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}
.switch-brief-stats span{border:1px solid var(--border);border-radius:999px;padding:7px 10px;background:#fbfcfb;font-size:.78rem;font-weight:800;white-space:nowrap}
.switch-start{padding:24px;margin-top:18px}
.switch-start-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.switch-start h2{font-size:clamp(29px,5vw,38px);letter-spacing:-.04em;margin:6px 0 7px}
.switch-start p{color:var(--muted);margin:0;line-height:1.5}
.switch-level-badge{border-radius:999px;background:#edf7f1;color:var(--green);font-weight:900;font-size:.78rem;padding:8px 12px;white-space:nowrap}
.switch-preview-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}
.switch-preview-grid>div{border:1px solid var(--border);border-radius:15px;padding:15px;text-align:center;background:#fbfcfb}
.switch-preview-grid strong{display:block;font-size:1.45rem}
.switch-preview-grid span{display:block;color:var(--muted);font-size:.78rem;font-weight:800;margin-top:2px}
.switch-play-btn{width:100%;min-height:52px;font-size:1rem}
.switch-fair-note{text-align:center!important;font-size:.78rem;margin-top:10px!important}
.switch-stage{padding:24px;margin-top:18px}
.switch-stage-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}
.switch-stage-head h2{margin:5px 0 0;font-size:1.85rem;letter-spacing:-.04em}
.switch-live-stats{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}
.switch-live-stats span{border:1px solid var(--border);border-radius:999px;padding:7px 10px;background:#fbfcfb;font-size:.78rem;font-weight:800}
.switch-timer-pill{background:#fff8ea!important;border-color:#ead6a1!important}
.switch-announcement{margin:14px 0 10px;border:1px solid #e2c46d;background:#fff8df;border-radius:16px;padding:12px 14px;display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:8px}
.switch-announcement>span{font-size:1.25rem}
.switch-announcement>strong{font-size:1rem;letter-spacing:.035em}
.switch-announcement>small{color:#7a681f;font-weight:700}
.switch-pop{animation:switchPop .4s ease both}
@keyframes switchPop{0%{transform:scale(.96);opacity:.3}60%{transform:scale(1.02)}100%{transform:scale(1);opacity:1}}
.switch-rule-card{margin:16px 0;border:1px solid #bcd9ca;background:#f3faf6;border-radius:18px;padding:17px 18px}
.switch-rule-card strong{display:block;font-size:1.25rem;margin:4px 0}
.switch-rule-card small{color:var(--muted);font-weight:700}
.switch-stimulus{min-height:150px;border:1px solid var(--border);border-radius:20px;background:white;display:flex;align-items:center;justify-content:center;padding:22px;margin:14px 0}
.switch-word-stimulus,.switch-case-stimulus,.switch-number-stimulus{font-size:clamp(46px,11vw,82px);font-weight:950;letter-spacing:-.04em}
.switch-compare-stimulus{display:flex;align-items:center;gap:28px}
.switch-compare-stimulus span{font-size:clamp(44px,10vw,76px);font-weight:950}
.switch-compare-stimulus b{font-size:.78rem;color:var(--muted);letter-spacing:.08em}
.switch-direction-stimulus{display:flex;align-items:center;gap:28px}
.switch-direction-stimulus span{font-size:clamp(60px,14vw,98px);line-height:1}
.switch-direction-stimulus strong{font-size:clamp(28px,7vw,48px)}
.switch-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.switch-choice{appearance:none;border:1px solid var(--border);border-radius:16px;background:#fbfcfb;color:var(--text);padding:15px 12px;min-height:54px;font:inherit;font-weight:900;cursor:pointer;transition:transform .12s ease,border-color .12s ease,background .12s ease}
.switch-choice:hover:not(:disabled){transform:translateY(-1px);border-color:#a8cdbb;background:#f4faf6}
.switch-choice.correct{border-color:#71b38f;background:#eaf7ef;color:#155c39}
.switch-choice.wrong{border-color:#df9a9a;background:#fff0f0;color:#9a2929}
.switch-choice:disabled{cursor:default}
.switch-feedback{min-height:24px;margin-top:12px;font-weight:800}
.switch-recovery,.switch-controls{margin-top:10px}
.switch-result{max-width:820px;margin:18px auto 0;text-align:center}
.switch-result-grid{grid-template-columns:repeat(4,1fr)}
.switch-level-up{border:1px solid #bcd9ca;background:#edf8f1;border-radius:16px;padding:14px 16px;margin:14px 0;text-align:left}
.switch-level-up strong{display:block;color:var(--green);font-size:.95rem}
.switch-level-up span{display:block;color:var(--muted);font-size:.85rem;margin-top:4px;line-height:1.4}
.switch-xp{font-weight:900;color:var(--green)}
.family-v2{border-color:#c8ddcf;background:linear-gradient(180deg,#fbfefc 0%,#f4faf6 100%)}
.family-v2 .challenge-label{color:var(--green)}
.family-v2 .family-game-card{background:white}

@media (max-width:700px){
  .switch-wrap{padding:20px 0 42px}
  .switch-intro .game-top{gap:10px;margin-bottom:12px}
  .switch-intro h1{font-size:clamp(38px,12vw,50px)}
  .switch-brief{display:block;padding:16px;margin-top:12px}
  .switch-brief-stats{justify-content:flex-start;margin-top:12px}
  .switch-start,.switch-stage,.switch-result{padding:16px;margin-top:12px;border-radius:20px}
  .switch-start-head,.switch-stage-head{display:block}
  .switch-level-badge{display:inline-block;margin-top:10px}
  .switch-preview-grid{gap:7px;margin:14px 0}
  .switch-preview-grid>div{padding:11px 7px}
  .switch-preview-grid strong{font-size:1.2rem}
  .switch-live-stats{justify-content:flex-start;gap:6px;margin-top:10px}
  .switch-live-stats span{padding:6px 9px;font-size:.75rem}
  .switch-announcement{margin:10px 0 8px;padding:10px 12px;grid-template-columns:auto auto}
  .switch-announcement small{grid-column:1/-1}
  .switch-rule-card{margin:10px 0;padding:13px 14px}
  .switch-rule-card strong{font-size:1.08rem}
  .switch-stimulus{min-height:118px;margin:10px 0;padding:14px}
  .switch-choice-grid{gap:8px}
  .switch-choice{min-height:50px;padding:12px 9px}
  .switch-feedback{margin-top:9px}
  .switch-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:430px){
  .switch-wrap{padding-top:16px}
  .switch-brief{padding:14px}
  .switch-start,.switch-stage,.switch-result{padding:14px}
  .switch-word-stimulus,.switch-case-stimulus,.switch-number-stimulus{font-size:clamp(42px,14vw,62px)}
  .switch-direction-stimulus{gap:18px}
  .switch-direction-stimulus span{font-size:60px}
  .switch-direction-stimulus strong{font-size:30px}
}


/* =========================================================
   BRAINKONG V2 — PRIORITY GAME SYSTEM
   What Changed · Rapid Recall · Pattern Panic · Distractor · Brain Gauntlet
   ========================================================= */
.v2-wrap{max-width:820px;margin:0 auto;padding:34px 0 64px}.v2-intro h1{font-size:clamp(38px,7vw,58px);letter-spacing:-.055em;line-height:.98;margin:.2rem 0 .55rem}.v2-brief{padding:20px 22px;margin-top:18px}.v2-brief strong{display:block;font-size:1.06rem}.v2-brief p{color:var(--muted);margin:6px 0 0;line-height:1.5}.v2-start,.v2-stage,.v2-result{padding:24px;margin-top:18px}.v2-start-head,.v2-stage-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.v2-start h2,.v2-stage h2{margin:5px 0 7px;font-size:clamp(28px,5vw,36px);letter-spacing:-.04em}.v2-start p{color:var(--muted);margin:0;line-height:1.5}.v2-level-badge{border-radius:999px;background:#edf7f1;color:var(--green);font-weight:900;font-size:.78rem;padding:8px 12px;white-space:nowrap}.v2-preview-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.v2-preview-grid>div{border:1px solid var(--border);border-radius:15px;padding:14px;text-align:center;background:#fbfcfb}.v2-preview-grid strong{display:block;font-size:1.35rem}.v2-preview-grid span{display:block;color:var(--muted);font-size:.78rem;font-weight:800;margin-top:2px}.v2-play{width:100%;min-height:52px}.v2-live-stats{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}.v2-live-stats span{border:1px solid var(--border);border-radius:999px;padding:7px 10px;background:#fbfcfb;font-size:.78rem;font-weight:800}.v2-phase{margin:14px 0 8px;color:var(--green);font-size:.76rem;font-weight:950;letter-spacing:.09em}.v2-question{font-size:1.2rem;font-weight:900;line-height:1.35;margin:15px 0 10px}.v2-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.v2-choice{appearance:none;border:1px solid var(--border);border-radius:16px;background:#fbfcfb;color:var(--text);padding:14px 12px;min-height:52px;font:inherit;font-weight:850;cursor:pointer;text-align:center}.v2-choice:hover:not(:disabled){border-color:#a8cdbb;background:#f4faf6}.v2-choice.correct,.gauntlet-hunt-cell.correct{border-color:#71b38f;background:#eaf7ef;color:#155c39}.v2-choice.wrong,.gauntlet-hunt-cell.wrong{border-color:#df9a9a;background:#fff0f0;color:#9a2929}.v2-feedback{min-height:24px;margin-top:11px;font-weight:800}.v2-result{text-align:center}.v2-result-grid{grid-template-columns:repeat(4,1fr)}.v2-level-up{border:1px solid #bcd9ca;background:#edf8f1;border-radius:16px;padding:14px 16px;margin:14px 0;text-align:left}.v2-level-up strong{color:var(--green)}.v2-xp{font-weight:900;color:var(--green)}
.memory-scene{display:flex;gap:9px;flex-wrap:wrap;align-items:center;justify-content:center;min-height:150px;border:1px solid var(--border);border-radius:20px;padding:20px;background:#fff}.memory-token{position:relative;display:flex;align-items:center;justify-content:center;min-width:92px;min-height:54px;border:1px solid #d8e4dd;border-radius:14px;background:#f7fbf8;font-weight:900;padding:10px 13px}.memory-token small{position:absolute;top:3px;left:7px;color:#99a59f;font-size:.62rem}.memory-hidden{display:flex;align-items:center;justify-content:center;min-height:120px;color:var(--muted);font-weight:900}.recall-memory{min-height:150px;border:1px solid var(--border);border-radius:20px;background:#fff;padding:20px;display:flex;flex-direction:column;justify-content:center}.recall-memory p{font-size:1.08rem;line-height:1.55;margin:4px 0}.pattern-sequence{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:9px;min-height:145px;border:1px solid var(--border);border-radius:20px;padding:18px;background:#fff}.pattern-sequence span{display:inline-flex;align-items:center;justify-content:center;min-width:54px;min-height:52px;border-radius:13px;background:#f3faf6;font-size:1.35rem;font-weight:950}.pattern-sequence b{color:var(--muted)}.pattern-missing{background:#fff6dd!important;color:#986900}.pattern-hint{min-height:22px;margin:8px 0;color:var(--muted);font-size:.82rem;font-weight:800;text-align:center}.distractor-instruction{margin:15px 0 12px;border:1px solid #bcd9ca;background:#f3faf6;border-radius:17px;padding:14px 16px;text-align:center;font-size:1.15rem;font-weight:850}.distractor-board{--ds-cols:4;display:grid;grid-template-columns:repeat(var(--ds-cols),minmax(0,1fr));gap:8px}.distractor-cell{appearance:none;border:1px solid var(--border);background:#fff;border-radius:13px;min-height:58px;font:inherit;font-size:1.05rem;font-weight:950;cursor:pointer;padding:6px}.distractor-cell:hover:not(:disabled){background:#f4faf6;border-color:#a8cdbb}.distractor-cell.correct{border-color:#71b38f;background:#eaf7ef;color:#155c39}.distractor-cell.wrong{border-color:#df9a9a;background:#fff0f0;color:#9a2929}
.gauntlet-brief{padding:22px 24px;margin-top:18px;background:linear-gradient(135deg,#102c25,#173c31);color:#fff}.gauntlet-brief p{color:#dcebe4;line-height:1.5}.gauntlet-lives{font-size:1.35rem;letter-spacing:.12em;margin-top:10px}.gauntlet-banner{margin:14px 0 12px;border:1px solid #e4c35e;background:#fff7d9;border-radius:16px;padding:12px 14px;font-weight:950;text-align:center}.gauntlet-arena{min-height:220px}.gauntlet-switch-word{font-size:clamp(52px,12vw,82px);font-weight:950;text-align:center;padding:34px 10px}.gs-red{color:#c53b3b}.gs-blue{color:#2767b0}.gs-green{color:#25734f}.gs-orange{color:#c96a24}.gauntlet-pattern{font-size:clamp(21px,5vw,32px);font-weight:950;text-align:center;border:1px solid var(--border);border-radius:18px;padding:30px 15px;background:#fff}.gauntlet-language-bad{font-size:1.2rem;font-weight:850;line-height:1.45;border:1px solid var(--border);border-radius:18px;padding:22px;background:#fff4f1;margin-bottom:12px}.gauntlet-hunt{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.gauntlet-hunt-cell{appearance:none;border:1px solid var(--border);border-radius:13px;background:#fff;min-height:58px;font:inherit;font-weight:950;font-size:1.1rem}.gauntlet-type-phrase{font-size:1.25rem;line-height:1.5;font-weight:900;border:1px solid var(--border);border-radius:18px;background:#fff;padding:26px;text-align:center}.gauntlet-type-input{width:100%;box-sizing:border-box;min-height:120px;margin-top:10px}.gauntlet-submit{width:100%;margin-top:10px}.gauntlet-reveal{margin-top:12px;border:1px solid #bcd9ca;background:#edf8f1;border-radius:14px;padding:12px;font-weight:850}
@media(max-width:700px){.v2-wrap{padding:20px 0 42px}.v2-intro .game-top{gap:10px;margin-bottom:12px}.v2-intro h1{font-size:clamp(38px,12vw,50px)}.v2-brief,.gauntlet-brief{padding:15px 16px;margin-top:12px}.v2-start,.v2-stage,.v2-result{padding:16px;margin-top:12px;border-radius:20px}.v2-start-head,.v2-stage-head{display:block}.v2-level-badge{display:inline-block;margin-top:9px}.v2-preview-grid{gap:7px;margin:13px 0}.v2-preview-grid>div{padding:10px 6px}.v2-preview-grid strong{font-size:1.16rem}.v2-live-stats{justify-content:flex-start;gap:6px;margin-top:9px}.v2-live-stats span{padding:6px 8px;font-size:.74rem}.v2-phase{margin:10px 0 7px}.v2-question{font-size:1.08rem;margin:12px 0 9px}.v2-choice-grid{gap:8px}.v2-choice{min-height:50px;padding:11px 8px;font-size:.9rem}.v2-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.memory-scene,.recall-memory,.pattern-sequence{min-height:118px;padding:13px}.memory-token{min-width:72px;min-height:46px;padding:8px 9px;font-size:.84rem}.recall-memory p{font-size:.98rem}.pattern-sequence{gap:6px}.pattern-sequence span{min-width:43px;min-height:44px;font-size:1.1rem}.distractor-board{gap:6px}.distractor-cell{min-height:50px;font-size:.94rem}.gauntlet-arena{min-height:185px}.gauntlet-banner{margin:10px 0;padding:10px 12px}.gauntlet-hunt{gap:6px}.gauntlet-hunt-cell{min-height:50px}.gauntlet-type-input{min-height:100px}}
@media(max-width:430px){.v2-wrap{padding-top:16px}.v2-start,.v2-stage,.v2-result{padding:14px}.memory-token{min-width:64px;font-size:.78rem}.distractor-cell{min-height:46px;padding:4px}.v2-choice{font-size:.86rem}.gauntlet-switch-word{font-size:52px;padding:25px 8px}}


/* =========================================================
   BRAINKONG V2 — RESULT SCREEN RUNTIME SAFEGUARD
   V1 result panels still use their original .show contract.
   V2 result panels are guaranteed visible whenever not hidden.
   ========================================================= */
.switch-result:not(.hidden),
.v2-result:not(.hidden){
  display:block;
}


/* BRAINKONG — LOGIC SPRINT */
.logic-sprint-question{
  border:1px solid #dbe3df;
  background:#f8faf9;
  border-radius:15px;
  padding:20px;
  font-size:1.2rem;
  font-weight:850;
  line-height:1.5;
  margin-bottom:15px;
}
@media (max-width:700px){
  .logic-sprint-question{
    padding:15px;
    font-size:1.05rem;
    line-height:1.4;
    margin-bottom:10px;
  }
}


/* =========================================================
   BRAINKONG — V2 PROGRESS + HOW-TO
   ========================================================= */
.v2-progress-intro{color:var(--muted);margin:.35rem 0 1rem;line-height:1.5}
.v2-progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.v2-progress-card{border:1px solid var(--border);border-radius:17px;background:#fbfcfb;padding:16px}
.v2-progress-card.played{border-color:#bfd9cb;background:#f7fbf8}
.v2-progress-card-head{display:flex;align-items:center;gap:10px}
.v2-progress-card-head>div{display:flex;flex-direction:column;gap:2px}
.v2-progress-card-head strong{font-size:1rem}
.v2-progress-card-head small{font-size:.72rem;color:var(--green);font-weight:900;letter-spacing:.04em}
.v2-progress-icon{font-size:1.55rem}
.v2-progress-records{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:14px 0 10px}
.v2-progress-records span{border:1px solid var(--border);border-radius:11px;background:white;padding:9px 6px;text-align:center}
.v2-progress-records b{display:block;font-size:.9rem}
.v2-progress-records small{display:block;font-size:.64rem;color:var(--muted);margin-top:2px}
.v2-progress-card .btn-secondary{display:block;text-align:center;margin-top:12px}
.v2-howto-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}
.v2-howto-grid>div{border:1px solid var(--border);border-radius:14px;background:#fbfcfb;padding:14px}
.v2-howto-grid strong{display:block;margin-bottom:4px}
.v2-howto-grid span{display:block;color:var(--muted);font-size:.9rem;line-height:1.45}
@media(max-width:700px){
  .v2-progress-grid,.v2-howto-grid{grid-template-columns:1fr}
  .v2-progress-card{padding:14px}
  .v2-progress-records{grid-template-columns:repeat(2,1fr)}
}


/* =========================================================
   BRAINKONG — WORD CONNECTIONS RUNTIME + UX FIX
   ========================================================= */
.connection-selection-status{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fbfcfb;
}
.connection-selection-status strong{color:var(--green)}
.connection-selection-status span{color:var(--muted);font-size:.84rem;font-weight:700}
.connection-tools{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:12px;
}
.connection-tools button{min-height:46px}
.connection-tools button:disabled{opacity:.45;cursor:not-allowed}
.connection-solved-list{display:grid;gap:8px;margin-bottom:12px}
.connection-solved-group{
  border:1px solid #bcd9ca;
  border-radius:13px;
  background:#eef8f2;
  padding:11px 13px;
}
.connection-solved-group.revealed{
  border-color:#e4d49b;
  background:#fff9e8;
}
.connection-solved-group strong{display:block;margin-bottom:3px}
.connection-solved-group span{display:block;color:var(--muted);font-size:.84rem}
.connection-complete-card{
  border:1px solid #bcd9ca;
  border-radius:15px;
  background:#f3faf6;
  padding:16px;
  text-align:center;
}
.connection-complete-card strong{display:block;font-size:1.08rem;color:var(--green)}
.connection-complete-card span{display:block;color:var(--muted);margin-top:4px}
@media(max-width:700px){
  .connection-selection-status{align-items:flex-start;flex-direction:column;gap:2px}
  .connection-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
  .connection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* BRAINKONG V2 FINAL — Brain Gauntlet dashboard labels */
.v2-progress-records.gauntlet-records{grid-template-columns:repeat(3,1fr)}
@media(max-width:700px){
  .v2-progress-records.gauntlet-records{grid-template-columns:repeat(3,1fr)}
}

/* =========================================================
   BRAINKONG V3 — UNIFIED BRAIN GAMES
   ========================================================= */
.brain-journey-card,.brain-recommended-card{margin:14px 0;padding:18px}
.brain-journey-link{display:flex;align-items:center;gap:14px;text-decoration:none;color:inherit}
.brain-journey-link>span:nth-child(2){display:flex;flex-direction:column;gap:3px;flex:1}
.brain-journey-link small{color:var(--muted);font-weight:700}
.brain-journey-icon{font-size:1.8rem}
.brain-recommended-card{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#f4faf6;border-color:#bfd9cb}
.brain-recommended-card h2{margin:.3rem 0 .3rem}
.brain-recommended-card p{margin:0;color:var(--muted);max-width:620px}
.brain-browse-head{display:flex;justify-content:space-between;align-items:end;gap:18px;margin:24px 0 12px}
.brain-browse-head h2{margin:.25rem 0 0}.brain-browse-head p{margin:0;color:var(--muted)}
.brain-card-progress{display:block;margin-top:8px;color:var(--green)!important;font-weight:900!important;font-size:.74rem!important}
.brain-switch-recommendation{border:1px solid #d7b83f;background:#fff9e5;border-radius:16px;padding:16px;margin:14px 0;text-align:left}
.brain-switch-recommendation h3{margin:.35rem 0 .3rem;font-size:1.35rem}
.brain-switch-recommendation p{margin:0;color:#66571d;line-height:1.45}
.brain-switch-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:13px}
.unified-brain-family{border-color:#bfd9cb;background:linear-gradient(180deg,#fbfefc 0%,#f5faf7 100%)}
.unified-brain-howto{border-top:1px solid var(--border);padding-top:24px}
@media(max-width:700px){
 .brain-recommended-card,.brain-browse-head,.brain-journey-link{display:block}
 .brain-recommended-card .btn-primary,.brain-journey-link .btn-primary{display:block;text-align:center;margin-top:14px}
 .brain-journey-icon{display:block;margin-bottom:6px}
 .brain-browse-head p{margin-top:6px}
 .brain-switch-actions>*{width:100%}
}

/* =========================================================
   GAME AREA ALIGNMENT SYSTEM — release QA
   One visual content edge across every playable game family.
   ========================================================= */
:root{--game-pad:24px;--game-pad-mobile:18px}

/* Every primary playable surface gets the same internal inset. */
.game-card,
.brain-stage,
.typing-stage,
.grid-game-card,
.result-panel,
.grid-result-panel{
  box-sizing:border-box;
}

/* Brain Games previously lacked card padding entirely. */
.brain-stage{
  padding:var(--game-pad);
}

/* Keep all Brain Game content on one clean vertical axis. */
.brain-stage-head,
.brain-prompt,
.brain-arena,
.brain-feedback,
.brain-controls,
.brain-help-actions{
  width:100%;
  box-sizing:border-box;
  margin-left:0;
  margin-right:0;
}
.brain-stage-head{margin-bottom:0}
.brain-prompt{margin:24px 0 16px}
.brain-prompt>.eyebrow,
.brain-prompt>h3,
.brain-prompt>p{margin-left:0;margin-right:0}
.brain-arena>*:first-child{margin-top:0}
.brain-arena>*:last-child{margin-bottom:0}
.brain-controls,.brain-help-actions{justify-content:flex-start}

/* Form controls must not create their own horizontal offset. */
.answer-input,
.brain-textarea,
.typing-input,
.typing-target,
.grid-rule,
.grid-clue-card{
  box-sizing:border-box;
}
.brain-textarea,.typing-input{display:block;margin-left:0;margin-right:0}

/* Normalize the content rhythm across the other game families. */
.game-card{padding:var(--game-pad)}
.typing-stage{padding:var(--game-pad)}
.grid-game-card{padding:var(--game-pad)}
.game-card .progress-row,
.game-card .progress-track,
.game-card .game-challenge,
.game-card .answer-input,
.game-card .game-actions,
.game-card .game-meta,
.typing-stage-head,
.typing-prompt,
.typing-target,
.typing-input,
.typing-stage .game-actions,
.grid-game-top,
.grid-game-stats,
.grid-rule,
.grid-play-layout,
.grid-game-actions{
  margin-left:0;
  margin-right:0;
}

/* In-game feedback follows the same inset as the game content instead
   of aligning to the outside border of the card. */
.itlence-feedback-inline{
  box-sizing:border-box;
  margin-left:var(--game-pad);
  margin-right:var(--game-pad);
}

/* Result feedback stays aligned with result-panel content. */
.result-panel .itlence-feedback-result,
.grid-result-panel .itlence-feedback-result,
.typing-results .itlence-feedback-result{
  margin-left:0;
  margin-right:0;
}

@media(max-width:760px){
  .game-card,
  .brain-stage,
  .typing-stage,
  .grid-game-card,
  .result-panel,
  .grid-result-panel{
    padding:var(--game-pad-mobile);
  }
  .itlence-feedback-inline{
    margin-left:var(--game-pad-mobile);
    margin-right:var(--game-pad-mobile);
  }
  .brain-prompt{margin:20px 0 14px}
}

/* Progressive Grid difficulty */
.grid-difficulty-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin:14px 0 16px;
  padding:11px 14px;
  border:1px solid var(--border,#dfe6e1);
  border-radius:12px;
  background:#f7faf8;
}
.grid-difficulty-strip strong{
  color:#173e32;
  font-size:.92rem;
}
.grid-difficulty-strip span{
  color:#65716d;
  font-size:.85rem;
  font-weight:650;
}
@media(max-width:640px){
  .grid-difficulty-strip{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
  }
}

.feedback-success-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  max-width:1120px;
  margin:18px auto 0;
  padding:14px 18px;
  border:1px solid var(--border,#dfe6e1);
  border-radius:14px;
  background:#f3faf6;
  color:#153b30;
}
.feedback-success-banner.hidden{display:none;}
.feedback-success-banner div{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.feedback-success-banner strong{font-size:1rem;}
.feedback-success-banner span{font-size:.92rem;color:#5f6d68;}
.feedback-success-banner button{
  border:0;
  background:transparent;
  font-size:1.5rem;
  line-height:1;
  cursor:pointer;
  color:#42534d;
}
@media(max-width:640px){
  .feedback-success-banner{
    margin:12px 16px 0;
    align-items:flex-start;
  }
}


/* =========================================================
   BRAINKONG V1 — MOBILE GRID COMPACT LAYOUT
   Keeps all information while moving the playable board
   much higher on small screens.
   ========================================================= */
@media (max-width: 700px) {
  /* Compact global mobile header on game pages */
  .site-header .site-shell,
  .header-inner {
    min-height: 76px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .brand-name,
  .site-brand strong {
    font-size: 1.05rem;
    letter-spacing: .12em;
  }

  .nav-cta,
  .site-header .btn-primary {
    min-height: 48px;
    padding: 0 20px;
    border-radius: 16px;
  }

  /* Grid page hero/header area */
  .grid-page .page-intro,
  .grid-page .game-page-intro,
  body:has(#gridGamePanel) .page-intro,
  body:has(#gridGamePanel) .game-page-intro {
    padding-top: 22px;
    padding-bottom: 14px;
  }

  body:has(#gridGamePanel) .page-intro h1,
  body:has(#gridGamePanel) .game-page-intro h1,
  body:has(#gridGamePanel) h1 {
    margin-bottom: 8px;
  }

  body:has(#gridGamePanel) .page-intro p,
  body:has(#gridGamePanel) .game-page-intro p {
    margin-bottom: 0;
    line-height: 1.4;
  }

  /* Back button no longer consumes a tall standalone block */
  body:has(#gridGamePanel) .back-to-games,
  body:has(#gridGamePanel) a[href="games.html"].btn-secondary,
  body:has(#gridGamePanel) a[href="games.html"].btn-ghost {
    min-height: 46px;
    padding: 10px 16px;
  }

  /* Main Grid card */
  .grid-game-card {
    padding: 16px;
    border-radius: 22px;
  }

  .grid-game-card .game-card-header,
  .grid-game-card .grid-game-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .grid-game-card h2,
  .grid-game-card h3 {
    margin-bottom: 4px;
  }

  /* Change Grid / New Puzzle controls */
  .grid-game-card .game-card-actions,
  .grid-game-card .grid-top-actions {
    gap: 8px;
  }

  .grid-game-card .game-card-actions .btn-secondary,
  .grid-game-card .game-card-actions .btn-ghost,
  .grid-game-card .grid-top-actions .btn-secondary,
  .grid-game-card .grid-top-actions .btn-ghost {
    min-height: 46px;
    padding: 8px 14px;
  }

  /* Difficulty strip: same content, less vertical weight */
  .grid-difficulty-strip {
    padding: 14px 16px;
    margin: 10px 0 12px;
    border-radius: 16px;
  }

  .grid-difficulty-strip strong,
  #gridDifficultyTier {
    font-size: 1rem;
    line-height: 1.2;
  }

  .grid-difficulty-strip span,
  #gridDifficultyProgress {
    margin-top: 4px;
    font-size: .88rem;
    line-height: 1.35;
  }

  /* Stats wrap more tightly */
  .grid-stats,
  .grid-live-stats,
  .game-stats {
    gap: 8px;
    margin: 10px 0;
  }

  .grid-stats .stat-pill,
  .grid-live-stats .stat-pill,
  .grid-game-card .stat-pill {
    min-height: 38px;
    padding: 7px 11px;
    font-size: .86rem;
  }

  /* Grid run + tension commentary */
  #gridRunPill {
    margin-top: 2px;
  }

  #gridTensionLine,
  .grid-tension-line {
    margin: 8px 0 10px;
    font-size: .92rem;
    line-height: 1.3;
  }

  /* Rule/instruction panel */
  .grid-rule,
  #gridRule {
    padding: 12px 14px;
    margin: 10px 0 12px;
    border-radius: 15px;
    line-height: 1.35;
  }

  /* Pull actual playable board upward */
  #gridAssistPanel,
  .grid-assist-panel,
  .grid-play-area {
    margin-top: 10px;
  }

  .grid-board-wrap,
  .language-grid-wrap {
    margin-top: 10px;
  }

  /* Prevent oversized vertical gaps from shared section spacing */
  body:has(#gridGamePanel) main > section,
  body:has(#gridGamePanel) .section-block {
    margin-bottom: 20px;
  }
}

/* Extra-tight treatment for narrow phones */
@media (max-width: 430px) {
  body:has(#gridGamePanel) .site-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  body:has(#gridGamePanel) h1 {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
    line-height: .98;
  }

  .grid-game-card {
    padding: 14px;
  }

  .grid-difficulty-strip {
    padding: 12px 14px;
  }

  .grid-stats,
  .grid-live-stats,
  .game-stats {
    gap: 6px;
  }

  .grid-stats .stat-pill,
  .grid-live-stats .stat-pill,
  .grid-game-card .stat-pill {
    padding: 6px 10px;
    font-size: .82rem;
  }

  #gridTensionLine,
  .grid-tension-line {
    margin-top: 6px;
    margin-bottom: 8px;
  }
}


/* =========================================================
   BRAINKONG V2 — BRAIN SWITCH
   ========================================================= */
.switch-wrap{max-width:820px;margin:0 auto;padding:34px 0 64px}
.switch-intro h1{font-size:clamp(36px,7vw,58px);letter-spacing:-.055em;line-height:.98;margin:.2rem 0 .55rem}
.switch-brief{display:flex;justify-content:space-between;gap:24px;align-items:center;padding:22px 24px;margin-top:18px}
.switch-brief>div:first-child{max-width:530px}
.switch-brief strong{display:block;font-size:1.08rem;line-height:1.45;margin:5px 0}
.switch-brief p{color:var(--muted);margin:6px 0 0;line-height:1.5}
.switch-kicker,.switch-rule-label{font-size:.72rem;font-weight:900;letter-spacing:.09em;color:var(--brand);text-transform:uppercase}
.switch-brief-stats{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}
.switch-brief-stats span{border:1px solid var(--border);border-radius:999px;padding:7px 10px;background:#fbfcfb;font-size:.78rem;font-weight:800;white-space:nowrap}
.switch-start{padding:24px;margin-top:18px}
.switch-start-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.switch-start h2{font-size:clamp(29px,5vw,38px);letter-spacing:-.04em;margin:6px 0 7px}
.switch-start p{color:var(--muted);margin:0;line-height:1.5}
.switch-level-badge{border-radius:999px;background:#edf7f1;color:var(--brand);font-weight:900;font-size:.78rem;padding:8px 12px;white-space:nowrap}
.switch-preview-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}
.switch-preview-grid>div{border:1px solid var(--border);border-radius:15px;padding:15px;text-align:center;background:#fbfcfb}
.switch-preview-grid strong{display:block;font-size:1.45rem}
.switch-preview-grid span{display:block;color:var(--muted);font-size:.78rem;font-weight:800;margin-top:2px}
.switch-play-btn{width:100%;min-height:52px;font-size:1rem}
.switch-fair-note{text-align:center!important;font-size:.78rem;margin-top:10px!important}
.switch-stage{padding:24px;margin-top:18px}
.switch-stage-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}
.switch-stage-head h2{margin:5px 0 0;font-size:1.85rem;letter-spacing:-.04em}
.switch-live-stats{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}
.switch-live-stats span{border:1px solid var(--border);border-radius:999px;padding:7px 10px;background:#fbfcfb;font-size:.78rem;font-weight:800}
.switch-timer-pill{background:#fff8ea!important;border-color:#ead6a1!important}
.switch-announcement{margin:14px 0 10px;border:1px solid #e2c46d;background:#fff8df;border-radius:16px;padding:12px 14px;display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:8px}
.switch-announcement>span{font-size:1.25rem}
.switch-announcement>strong{font-size:1rem;letter-spacing:.035em}
.switch-announcement>small{color:#7a681f;font-weight:700}
.switch-pop{animation:switchPop .4s ease both}
@keyframes switchPop{0%{transform:scale(.96);opacity:.3}60%{transform:scale(1.02)}100%{transform:scale(1);opacity:1}}
.switch-rule-card{margin:16px 0;border:1px solid #bcd9ca;background:#f3faf6;border-radius:18px;padding:17px 18px}
.switch-rule-card strong{display:block;font-size:1.25rem;margin:4px 0}
.switch-rule-card small{color:var(--muted);font-weight:700}
.switch-stimulus{min-height:150px;border:1px solid var(--border);border-radius:20px;background:white;display:flex;align-items:center;justify-content:center;padding:22px;margin:14px 0}
.switch-word-stimulus,.switch-case-stimulus,.switch-number-stimulus{font-size:clamp(46px,11vw,82px);font-weight:950;letter-spacing:-.04em}
.switch-compare-stimulus{display:flex;align-items:center;gap:28px}
.switch-compare-stimulus span{font-size:clamp(44px,10vw,76px);font-weight:950}
.switch-compare-stimulus b{font-size:.78rem;color:var(--muted);letter-spacing:.08em}
.switch-direction-stimulus{display:flex;align-items:center;gap:28px}
.switch-direction-stimulus span{font-size:clamp(60px,14vw,98px);line-height:1}
.switch-direction-stimulus strong{font-size:clamp(28px,7vw,48px)}
.switch-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.switch-choice{appearance:none;border:1px solid var(--border);border-radius:16px;background:#fbfcfb;color:var(--text);padding:15px 12px;min-height:54px;font:inherit;font-weight:900;cursor:pointer;transition:transform .12s ease,border-color .12s ease,background .12s ease}
.switch-choice:hover:not(:disabled){transform:translateY(-1px);border-color:#a8cdbb;background:#f4faf6}
.switch-choice.correct{border-color:#71b38f;background:#eaf7ef;color:#155c39}
.switch-choice.wrong{border-color:#df9a9a;background:#fff0f0;color:#9a2929}
.switch-choice:disabled{cursor:default}
.switch-feedback{min-height:24px;margin-top:12px;font-weight:800}
.switch-recovery,.switch-controls{margin-top:10px}
.switch-result{max-width:820px;margin:18px auto 0;text-align:center}
.switch-result-grid{grid-template-columns:repeat(4,1fr)}
.switch-level-up{border:1px solid #bcd9ca;background:#edf8f1;border-radius:16px;padding:14px 16px;margin:14px 0;text-align:left}
.switch-level-up strong{display:block;color:var(--brand);font-size:.95rem}
.switch-level-up span{display:block;color:var(--muted);font-size:.85rem;margin-top:4px;line-height:1.4}
.switch-xp{font-weight:900;color:var(--brand)}
.family-v2{border-color:#c8ddcf;background:linear-gradient(180deg,#fbfefc 0%,#f4faf6 100%)}
.family-v2 .challenge-label{color:var(--brand)}
.family-v2 .family-game-card{background:white}

@media (max-width:700px){
  .switch-wrap{padding:20px 0 42px}
  .switch-intro .game-top{gap:10px;margin-bottom:12px}
  .switch-intro h1{font-size:clamp(38px,12vw,50px)}
  .switch-brief{display:block;padding:16px;margin-top:12px}
  .switch-brief-stats{justify-content:flex-start;margin-top:12px}
  .switch-start,.switch-stage,.switch-result{padding:16px;margin-top:12px;border-radius:20px}
  .switch-start-head,.switch-stage-head{display:block}
  .switch-level-badge{display:inline-block;margin-top:10px}
  .switch-preview-grid{gap:7px;margin:14px 0}
  .switch-preview-grid>div{padding:11px 7px}
  .switch-preview-grid strong{font-size:1.2rem}
  .switch-live-stats{justify-content:flex-start;gap:6px;margin-top:10px}
  .switch-live-stats span{padding:6px 9px;font-size:.75rem}
  .switch-announcement{margin:10px 0 8px;padding:10px 12px;grid-template-columns:auto auto}
  .switch-announcement small{grid-column:1/-1}
  .switch-rule-card{margin:10px 0;padding:13px 14px}
  .switch-rule-card strong{font-size:1.08rem}
  .switch-stimulus{min-height:118px;margin:10px 0;padding:14px}
  .switch-choice-grid{gap:8px}
  .switch-choice{min-height:50px;padding:12px 9px}
  .switch-feedback{margin-top:9px}
  .switch-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:430px){
  .switch-wrap{padding-top:16px}
  .switch-brief{padding:14px}
  .switch-start,.switch-stage,.switch-result{padding:14px}
  .switch-word-stimulus,.switch-case-stimulus,.switch-number-stimulus{font-size:clamp(42px,14vw,62px)}
  .switch-direction-stimulus{gap:18px}
  .switch-direction-stimulus span{font-size:60px}
  .switch-direction-stimulus strong{font-size:30px}
}


/* =========================================================
   BRAINKONG V2 — PRIORITY GAME SYSTEM
   What Changed · Rapid Recall · Pattern Panic · Distractor · Brain Gauntlet
   ========================================================= */
.v2-wrap{max-width:820px;margin:0 auto;padding:34px 0 64px}.v2-intro h1{font-size:clamp(38px,7vw,58px);letter-spacing:-.055em;line-height:.98;margin:.2rem 0 .55rem}.v2-brief{padding:20px 22px;margin-top:18px}.v2-brief strong{display:block;font-size:1.06rem}.v2-brief p{color:var(--muted);margin:6px 0 0;line-height:1.5}.v2-start,.v2-stage,.v2-result{padding:24px;margin-top:18px}.v2-start-head,.v2-stage-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.v2-start h2,.v2-stage h2{margin:5px 0 7px;font-size:clamp(28px,5vw,36px);letter-spacing:-.04em}.v2-start p{color:var(--muted);margin:0;line-height:1.5}.v2-level-badge{border-radius:999px;background:#edf7f1;color:var(--brand);font-weight:900;font-size:.78rem;padding:8px 12px;white-space:nowrap}.v2-preview-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.v2-preview-grid>div{border:1px solid var(--border);border-radius:15px;padding:14px;text-align:center;background:#fbfcfb}.v2-preview-grid strong{display:block;font-size:1.35rem}.v2-preview-grid span{display:block;color:var(--muted);font-size:.78rem;font-weight:800;margin-top:2px}.v2-play{width:100%;min-height:52px}.v2-live-stats{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}.v2-live-stats span{border:1px solid var(--border);border-radius:999px;padding:7px 10px;background:#fbfcfb;font-size:.78rem;font-weight:800}.v2-phase{margin:14px 0 8px;color:var(--brand);font-size:.76rem;font-weight:950;letter-spacing:.09em}.v2-question{font-size:1.2rem;font-weight:900;line-height:1.35;margin:15px 0 10px}.v2-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.v2-choice{appearance:none;border:1px solid var(--border);border-radius:16px;background:#fbfcfb;color:var(--text);padding:14px 12px;min-height:52px;font:inherit;font-weight:850;cursor:pointer;text-align:center}.v2-choice:hover:not(:disabled){border-color:#a8cdbb;background:#f4faf6}.v2-choice.correct,.gauntlet-hunt-cell.correct{border-color:#71b38f;background:#eaf7ef;color:#155c39}.v2-choice.wrong,.gauntlet-hunt-cell.wrong{border-color:#df9a9a;background:#fff0f0;color:#9a2929}.v2-feedback{min-height:24px;margin-top:11px;font-weight:800}.v2-result{text-align:center}.v2-result-grid{grid-template-columns:repeat(4,1fr)}.v2-level-up{border:1px solid #bcd9ca;background:#edf8f1;border-radius:16px;padding:14px 16px;margin:14px 0;text-align:left}.v2-level-up strong{color:var(--brand)}.v2-xp{font-weight:900;color:var(--brand)}
.memory-scene{display:flex;gap:9px;flex-wrap:wrap;align-items:center;justify-content:center;min-height:150px;border:1px solid var(--border);border-radius:20px;padding:20px;background:#fff}.memory-token{position:relative;display:flex;align-items:center;justify-content:center;min-width:92px;min-height:54px;border:1px solid #d8e4dd;border-radius:14px;background:#f7fbf8;font-weight:900;padding:10px 13px}.memory-token small{position:absolute;top:3px;left:7px;color:#99a59f;font-size:.62rem}.memory-hidden{display:flex;align-items:center;justify-content:center;min-height:120px;color:var(--muted);font-weight:900}.recall-memory{min-height:150px;border:1px solid var(--border);border-radius:20px;background:#fff;padding:20px;display:flex;flex-direction:column;justify-content:center}.recall-memory p{font-size:1.08rem;line-height:1.55;margin:4px 0}.pattern-sequence{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:9px;min-height:145px;border:1px solid var(--border);border-radius:20px;padding:18px;background:#fff}.pattern-sequence span{display:inline-flex;align-items:center;justify-content:center;min-width:54px;min-height:52px;border-radius:13px;background:#f3faf6;font-size:1.35rem;font-weight:950}.pattern-sequence b{color:var(--muted)}.pattern-missing{background:#fff6dd!important;color:#986900}.pattern-hint{min-height:22px;margin:8px 0;color:var(--muted);font-size:.82rem;font-weight:800;text-align:center}.distractor-instruction{margin:15px 0 12px;border:1px solid #bcd9ca;background:#f3faf6;border-radius:17px;padding:14px 16px;text-align:center;font-size:1.15rem;font-weight:850}.distractor-board{--ds-cols:4;display:grid;grid-template-columns:repeat(var(--ds-cols),minmax(0,1fr));gap:8px}.distractor-cell{appearance:none;border:1px solid var(--border);background:#fff;border-radius:13px;min-height:58px;font:inherit;font-size:1.05rem;font-weight:950;cursor:pointer;padding:6px}.distractor-cell:hover:not(:disabled){background:#f4faf6;border-color:#a8cdbb}.distractor-cell.correct{border-color:#71b38f;background:#eaf7ef;color:#155c39}.distractor-cell.wrong{border-color:#df9a9a;background:#fff0f0;color:#9a2929}
.gauntlet-brief{padding:22px 24px;margin-top:18px;background:linear-gradient(135deg,#102c25,#173c31);color:#fff}.gauntlet-brief p{color:#dcebe4;line-height:1.5}.gauntlet-lives{font-size:1.35rem;letter-spacing:.12em;margin-top:10px}.gauntlet-banner{margin:14px 0 12px;border:1px solid #e4c35e;background:#fff7d9;border-radius:16px;padding:12px 14px;font-weight:950;text-align:center}.gauntlet-arena{min-height:220px}.gauntlet-switch-word{font-size:clamp(52px,12vw,82px);font-weight:950;text-align:center;padding:34px 10px}.gs-red{color:#c53b3b}.gs-blue{color:#2767b0}.gs-green{color:#25734f}.gs-orange{color:#c96a24}.gauntlet-pattern{font-size:clamp(21px,5vw,32px);font-weight:950;text-align:center;border:1px solid var(--border);border-radius:18px;padding:30px 15px;background:#fff}.gauntlet-language-bad{font-size:1.2rem;font-weight:850;line-height:1.45;border:1px solid var(--border);border-radius:18px;padding:22px;background:#fff4f1;margin-bottom:12px}.gauntlet-hunt{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.gauntlet-hunt-cell{appearance:none;border:1px solid var(--border);border-radius:13px;background:#fff;min-height:58px;font:inherit;font-weight:950;font-size:1.1rem}.gauntlet-type-phrase{font-size:1.25rem;line-height:1.5;font-weight:900;border:1px solid var(--border);border-radius:18px;background:#fff;padding:26px;text-align:center}.gauntlet-type-input{width:100%;box-sizing:border-box;min-height:120px;margin-top:10px}.gauntlet-submit{width:100%;margin-top:10px}.gauntlet-reveal{margin-top:12px;border:1px solid #bcd9ca;background:#edf8f1;border-radius:14px;padding:12px;font-weight:850}
@media(max-width:700px){.v2-wrap{padding:20px 0 42px}.v2-intro .game-top{gap:10px;margin-bottom:12px}.v2-intro h1{font-size:clamp(38px,12vw,50px)}.v2-brief,.gauntlet-brief{padding:15px 16px;margin-top:12px}.v2-start,.v2-stage,.v2-result{padding:16px;margin-top:12px;border-radius:20px}.v2-start-head,.v2-stage-head{display:block}.v2-level-badge{display:inline-block;margin-top:9px}.v2-preview-grid{gap:7px;margin:13px 0}.v2-preview-grid>div{padding:10px 6px}.v2-preview-grid strong{font-size:1.16rem}.v2-live-stats{justify-content:flex-start;gap:6px;margin-top:9px}.v2-live-stats span{padding:6px 8px;font-size:.74rem}.v2-phase{margin:10px 0 7px}.v2-question{font-size:1.08rem;margin:12px 0 9px}.v2-choice-grid{gap:8px}.v2-choice{min-height:50px;padding:11px 8px;font-size:.9rem}.v2-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.memory-scene,.recall-memory,.pattern-sequence{min-height:118px;padding:13px}.memory-token{min-width:72px;min-height:46px;padding:8px 9px;font-size:.84rem}.recall-memory p{font-size:.98rem}.pattern-sequence{gap:6px}.pattern-sequence span{min-width:43px;min-height:44px;font-size:1.1rem}.distractor-board{gap:6px}.distractor-cell{min-height:50px;font-size:.94rem}.gauntlet-arena{min-height:185px}.gauntlet-banner{margin:10px 0;padding:10px 12px}.gauntlet-hunt{gap:6px}.gauntlet-hunt-cell{min-height:50px}.gauntlet-type-input{min-height:100px}}
@media(max-width:430px){.v2-wrap{padding-top:16px}.v2-start,.v2-stage,.v2-result{padding:14px}.memory-token{min-width:64px;font-size:.78rem}.distractor-cell{min-height:46px;padding:4px}.v2-choice{font-size:.86rem}.gauntlet-switch-word{font-size:52px;padding:25px 8px}}


/* =========================================================
   BRAINKONG V2 — RESULT SCREEN RUNTIME SAFEGUARD
   V1 result panels still use their original .show contract.
   V2 result panels are guaranteed visible whenever not hidden.
   ========================================================= */
.switch-result:not(.hidden),
.v2-result:not(.hidden){
  display:block;
}


/* BRAINKONG — LOGIC SPRINT */
.logic-sprint-question{
  border:1px solid #dbe3df;
  background:#f8faf9;
  border-radius:15px;
  padding:20px;
  font-size:1.2rem;
  font-weight:850;
  line-height:1.5;
  margin-bottom:15px;
}
@media (max-width:700px){
  .logic-sprint-question{
    padding:15px;
    font-size:1.05rem;
    line-height:1.4;
    margin-bottom:10px;
  }
}


/* =========================================================
   BRAINKONG — V2 PROGRESS + HOW-TO
   ========================================================= */
.v2-progress-intro{color:var(--muted);margin:.35rem 0 1rem;line-height:1.5}
.v2-progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.v2-progress-card{border:1px solid var(--border);border-radius:17px;background:#fbfcfb;padding:16px}
.v2-progress-card.played{border-color:#bfd9cb;background:#f7fbf8}
.v2-progress-card-head{display:flex;align-items:center;gap:10px}
.v2-progress-card-head>div{display:flex;flex-direction:column;gap:2px}
.v2-progress-card-head strong{font-size:1rem}
.v2-progress-card-head small{font-size:.72rem;color:var(--brand);font-weight:900;letter-spacing:.04em}
.v2-progress-icon{font-size:1.55rem}
.v2-progress-records{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:14px 0 10px}
.v2-progress-records span{border:1px solid var(--border);border-radius:11px;background:white;padding:9px 6px;text-align:center}
.v2-progress-records b{display:block;font-size:.9rem}
.v2-progress-records small{display:block;font-size:.64rem;color:var(--muted);margin-top:2px}
.v2-progress-card .btn-secondary{display:block;text-align:center;margin-top:12px}
.v2-howto-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}
.v2-howto-grid>div{border:1px solid var(--border);border-radius:14px;background:#fbfcfb;padding:14px}
.v2-howto-grid strong{display:block;margin-bottom:4px}
.v2-howto-grid span{display:block;color:var(--muted);font-size:.9rem;line-height:1.45}
@media(max-width:700px){
  .v2-progress-grid,.v2-howto-grid{grid-template-columns:1fr}
  .v2-progress-card{padding:14px}
  .v2-progress-records{grid-template-columns:repeat(2,1fr)}
}


/* =========================================================
   BRAINKONG — WORD CONNECTIONS RUNTIME + UX FIX
   ========================================================= */
.connection-selection-status{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fbfcfb;
}
.connection-selection-status strong{color:var(--brand)}
.connection-selection-status span{color:var(--muted);font-size:.84rem;font-weight:700}
.connection-tools{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:12px;
}
.connection-tools button{min-height:46px}
.connection-tools button:disabled{opacity:.45;cursor:not-allowed}
.connection-solved-list{display:grid;gap:8px;margin-bottom:12px}
.connection-solved-group{
  border:1px solid #bcd9ca;
  border-radius:13px;
  background:#eef8f2;
  padding:11px 13px;
}
.connection-solved-group.revealed{
  border-color:#e4d49b;
  background:#fff9e8;
}
.connection-solved-group strong{display:block;margin-bottom:3px}
.connection-solved-group span{display:block;color:var(--muted);font-size:.84rem}
.connection-complete-card{
  border:1px solid #bcd9ca;
  border-radius:15px;
  background:#f3faf6;
  padding:16px;
  text-align:center;
}
.connection-complete-card strong{display:block;font-size:1.08rem;color:var(--brand)}
.connection-complete-card span{display:block;color:var(--muted);margin-top:4px}
@media(max-width:700px){
  .connection-selection-status{align-items:flex-start;flex-direction:column;gap:2px}
  .connection-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
  .connection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* BRAINKONG V2 FINAL — Brain Gauntlet dashboard labels */
.v2-progress-records.gauntlet-records{grid-template-columns:repeat(3,1fr)}
@media(max-width:700px){
  .v2-progress-records.gauntlet-records{grid-template-columns:repeat(3,1fr)}
}

/* ===== Engage: Today's BrainKong, Continue, Game of the Day, challenge links, hints ===== */
.continue-wrap{padding-top:22px}
.continue-wrap .continue-main{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;background:var(--surface);border:1.5px solid var(--brand);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px 18px;text-decoration:none;color:var(--text);margin-bottom:12px}
.continue-icon{font-size:2rem;line-height:1}
.continue-main small{display:block;font-size:12px;font-weight:900;letter-spacing:.14em;color:var(--brand)}
.continue-main strong{display:block;font-size:1.25rem;line-height:1.2;margin:2px 0}
.continue-main em{display:block;font-style:normal;color:var(--muted);font-size:.92rem}
.continue-btn{padding:10px 20px;border-radius:12px;font-weight:900}
.continue-today{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px 16px}
.continue-today-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.continue-today-head span{font-weight:900;color:var(--brand)}
.today-tasks{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.today-tasks li a{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:12px 14px;border:1.5px solid var(--border);border-radius:14px;background:#fbfcfb;color:var(--text);text-decoration:none;transition:.16s ease}
.today-tasks li a:hover{border-color:var(--brand);background:white}
.today-tasks li.done a{background:#edf8f1;border-color:#bcd9ca}
.today-tasks li.gotd:not(.done) a{border-color:#e6cf70;background:#fffbe6}
.today-check{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-size:1.15rem;background:var(--surface-soft)}
.today-tasks li.done .today-check{background:var(--brand);color:white;font-weight:900}
.today-task-text strong{display:block;font-size:1rem;line-height:1.2}
.today-task-text small{display:block;color:var(--muted);font-size:.86rem;margin-top:2px}
.today-go{font-weight:900;color:var(--brand);font-size:.9rem}
.today-tasks li.done .today-go{color:var(--good)}
.today-tasks.compact li a{padding:9px 12px}
.today-streak{display:flex;flex-wrap:wrap;gap:10px 18px;margin-top:12px;color:var(--muted);font-size:.92rem}
.today-streak strong{color:var(--text)}
.today-hub{display:grid;gap:12px;margin:0 0 22px}
.today-strip{padding:16px 18px}
.today-strip-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 16px;align-items:flex-end;margin-bottom:12px}
.today-strip-head h2{font-size:1.15rem;margin:4px 0 0;line-height:1.25}
.today-strip-head .today-streak{margin:0}
.gotd-card{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;padding:16px 18px;text-decoration:none;color:var(--text);border:1.5px solid #e6cf70;background:#fffbe6}
.gotd-card:hover{border-color:var(--brand)}
.gotd-icon{font-size:2rem;line-height:1}
.gotd-card strong{display:block;font-size:1.2rem;margin:2px 0}
.gotd-card small{display:block;color:var(--muted)}
.gotd-card .btn-primary{padding:10px 20px;border-radius:12px}
.today-page{padding-top:28px;padding-bottom:40px;display:grid;gap:16px}
.today-card{padding:20px}
.today-card .today-streak{margin:0 0 14px;font-size:1rem}
.today-card h2{margin:6px 0 8px}
.today-note{margin:14px 0 0;color:var(--muted);font-size:.92rem;line-height:1.5}
.v2-hint{border-color:#e6cf70!important;background:#fffbe6!important}
.v2-hint strong{display:block;color:#6c5600}
.v2-hint span{display:block;color:var(--text);margin-top:4px;line-height:1.45}
.challenge-banner{border:1.5px solid #e6cf70;background:#fffbe6;border-radius:14px;padding:12px 14px;margin:0 0 14px;display:grid;gap:3px}
.challenge-banner strong{color:#6c5600}
.challenge-banner span{color:var(--text);line-height:1.45}
.itl-share-row{display:grid;gap:10px;margin:0 0 14px}
.itl-verdict{margin:0;padding:12px 14px;border-radius:14px;font-weight:800;line-height:1.4}
.itl-verdict.win{background:#edf8f1;border:1.5px solid #bcd9ca;color:var(--good)}
.itl-verdict.miss{background:#fffbe6;border:1.5px solid #e6cf70;color:#6c5600}
.itl-challenge-btn{width:100%}
.itl-toast{position:fixed;left:50%;bottom:18px;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:60;background:var(--text);color:white;border-radius:16px;padding:12px 18px;box-shadow:0 14px 34px rgba(23,32,42,.28);display:grid;gap:2px;max-width:min(92vw,440px);transition:.25s ease}
.itl-toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.itl-toast strong{font-size:.98rem}
.itl-toast span{font-size:.88rem;opacity:.9}
.itl-toast a{color:#9fe1c1;font-weight:800}
@media(max-width:640px){
  .continue-wrap .continue-main{grid-template-columns:auto 1fr;padding:14px}
  .continue-btn{grid-column:1/-1;text-align:center}
  .gotd-card{grid-template-columns:auto 1fr;padding:14px}
  .gotd-card .btn-primary{grid-column:1/-1;text-align:center}
  .today-strip-head{align-items:flex-start}
  .today-page{padding-top:18px}
}


/* =========================================================
   BRAINKONG V3 — UNIFIED BRAIN GAMES
   ========================================================= */
.brain-journey-card,.brain-recommended-card{margin:14px 0;padding:18px}
.brain-journey-link{display:flex;align-items:center;gap:14px;text-decoration:none;color:inherit}
.brain-journey-link>span:nth-child(2){display:flex;flex-direction:column;gap:3px;flex:1}
.brain-journey-link small{color:var(--muted);font-weight:700}
.brain-journey-icon{font-size:1.8rem}
.brain-recommended-card{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#f4faf6;border-color:#bfd9cb}
.brain-recommended-card h2{margin:.3rem 0 .3rem}
.brain-recommended-card p{margin:0;color:var(--muted);max-width:620px}
.brain-browse-head{display:flex;justify-content:space-between;align-items:end;gap:18px;margin:24px 0 12px}
.brain-browse-head h2{margin:.25rem 0 0}.brain-browse-head p{margin:0;color:var(--muted)}
.brain-card-progress{display:block;margin-top:8px;color:var(--brand)!important;font-weight:900!important;font-size:.74rem!important}
.brain-switch-recommendation{border:1px solid #d7b83f;background:#fff9e5;border-radius:16px;padding:16px;margin:14px 0;text-align:left}
.brain-switch-recommendation h3{margin:.35rem 0 .3rem;font-size:1.35rem}
.brain-switch-recommendation p{margin:0;color:#66571d;line-height:1.45}
.brain-switch-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:13px}
.unified-brain-family{border-color:#bfd9cb;background:linear-gradient(180deg,#fbfefc 0%,#f5faf7 100%)}
.unified-brain-howto{border-top:1px solid var(--border);padding-top:24px}
@media(max-width:700px){
 .brain-recommended-card,.brain-browse-head,.brain-journey-link{display:block}
 .brain-recommended-card .btn-primary,.brain-journey-link .btn-primary{display:block;text-align:center;margin-top:14px}
 .brain-journey-icon{display:block;margin-bottom:6px}
 .brain-browse-head p{margin-top:6px}
 .brain-switch-actions>*{width:100%}
}


/* =========================================================
   BRAINKONG V3 — HOMEPAGE QUICK PLAY
   ========================================================= */
.home-quick-play-section{padding:0 0 18px;margin-top:14px;position:relative;z-index:1}
.home-quick-play-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:0 0 11px}
.home-quick-play-head h2{margin:.2rem 0 .3rem;font-size:clamp(24px,3.2vw,32px);letter-spacing:-.035em}
.home-quick-play-head p{margin:0;color:var(--muted);font-size:.9rem;line-height:1.4}
.home-quick-play-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.home-quick-play-card{display:flex;align-items:center;gap:10px;min-width:0;min-height:82px;padding:11px 12px;border:1px solid var(--border);border-radius:15px;background:#fff;color:inherit;text-decoration:none;transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease}
.home-quick-play-card:hover{transform:translateY(-1px);border-color:#9fc7b4;box-shadow:0 6px 16px rgba(26,48,38,.06)}
.quick-play-icon{display:flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;border-radius:11px;background:#f0f7f3;font-size:1.2rem}
.quick-play-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:1px}
.quick-play-copy small{font-size:.62rem;font-weight:950;letter-spacing:.065em;color:var(--brand)}
.quick-play-copy strong{font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quick-play-copy>span{font-size:.69rem;color:var(--muted);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quick-play-go{font-size:.7rem;color:var(--brand);font-weight:900;white-space:nowrap}
@media(max-width:900px){.home-quick-play-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
  .home-quick-play-section{padding:4px 0 14px}
  .home-quick-play-head{align-items:flex-start;margin-bottom:9px}
  .home-quick-play-head p{font-size:.82rem}
  .quick-play-browse{display:none}
  .home-quick-play-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .home-quick-play-card{min-height:76px;padding:9px}
  .quick-play-icon{width:34px;height:34px;flex-basis:34px;font-size:1.05rem}
  .quick-play-copy strong{font-size:.83rem}
  .quick-play-copy>span{font-size:.64rem}
  .quick-play-go{display:none}
}
@media(max-width:390px){.home-quick-play-grid{grid-template-columns:1fr}}

/* v4-29: compact mobile-first player progress strip on game/play pages */
.itl-player-status-shell{padding-top:10px;padding-bottom:0}
.itl-player-status{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-width:430px;margin-left:auto}
.itl-player-stat{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;padding:8px 11px;border:1px solid var(--border,#dfe5df);border-radius:12px;background:#fff;color:inherit;text-decoration:none;box-shadow:0 3px 12px rgba(20,35,27,.04)}
.itl-player-stat span{font-size:.68rem;font-weight:800;letter-spacing:.045em;text-transform:uppercase;color:var(--muted,#667085);white-space:nowrap}
.itl-player-stat strong{font-size:.94rem;line-height:1;color:var(--green,#26664f);white-space:nowrap;font-variant-numeric:tabular-nums}
.itl-player-stat:hover{border-color:#b9cbbf;background:#fbfdfb}
.itl-player-stat:focus-visible{outline:3px solid rgba(38,102,79,.22);outline-offset:2px}
@media (max-width:640px){
  .itl-player-status-shell{padding-top:8px}
  .itl-player-status{max-width:none;width:100%;gap:6px}
  .itl-player-stat{padding:8px 9px;border-radius:10px;box-shadow:none}
  .itl-player-stat span{font-size:.62rem;letter-spacing:.035em}
  .itl-player-stat strong{font-size:.88rem}
}
@media (max-width:360px){
  .itl-player-stat{display:block;padding:7px 9px}
  .itl-player-stat span,.itl-player-stat strong{display:block}
  .itl-player-stat strong{margin-top:3px}
}



/* BrainKong header controls */
.header-controls{display:flex;align-items:center;gap:10px;margin-left:0;flex:0 0 auto}
.header-controls .audio-control-button{min-height:40px}
@media(max-width:700px){
  .nav{flex-wrap:wrap;gap:8px 12px;padding:8px 0}
  .brand{order:1}
  .header-controls{order:2;margin-left:auto;gap:7px}
  .nav-links{order:3;width:100%;justify-content:center;gap:18px}
}
@media(max-width:390px){
  .header-controls{gap:6px}
  .header-controls .itl-music-toggle{padding:0 9px;font-size:11px}
  .header-controls .audio-control-button{padding:8px 9px}
  .nav-links{gap:14px}
}

/* BrainKong first-visit homepage */
.brainkong-first-visit{padding:48px 0 56px;display:flex;flex-direction:column;align-items:center;text-align:center}
.brainkong-first-copy{max-width:1080px;margin:0 auto 24px}
.brainkong-first-copy h1{margin:12px auto 8px;font-size:clamp(52px,6.4vw,84px);line-height:1;letter-spacing:-.055em;max-width:1100px}
.brainkong-first-tagline{margin:0 0 12px;color:var(--brand);font-size:clamp(30px,3.3vw,42px);font-weight:950;letter-spacing:-.035em}
.brainkong-first-sub{max-width:760px;margin:0 auto;color:var(--muted);font-size:18px;line-height:1.55}
.brainkong-proof-card{width:min(1040px,100%);background:#fff;border:1px solid var(--border);border-radius:22px;box-shadow:0 14px 40px rgba(23,32,42,.07);padding:26px 28px;text-align:left}
.brainkong-proof-head{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.brainkong-proof-head strong{display:block;margin-top:2px;font-size:21px}
.brainkong-proof-icon{width:48px;height:48px;border-radius:15px;background:#eef8f4;display:grid;place-items:center;font-size:25px}
.brainkong-proof-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.brainkong-proof-options button{min-height:56px;border:1px solid #d7dfdb;border-radius:14px;background:#fbfcfb;color:var(--text);font:800 16px/1.2 inherit;cursor:pointer;transition:.15s ease}
.brainkong-proof-options button:hover,.brainkong-proof-options button:focus-visible{border-color:var(--brand);background:#f5fbf8;outline:none;transform:translateY(-1px)}
.brainkong-proof-options button.is-correct{background:#e9f7ef;border-color:#67ad8a;color:#145a3e}
.brainkong-proof-options button.is-wrong{background:#fff0f0;border-color:#d98d8d;color:#8a2f2f}
.brainkong-proof-feedback{min-height:26px;margin:14px 0 0;font-weight:800;line-height:1.4}
.brainkong-proof-feedback.good{color:#176b4b}.brainkong-proof-feedback.bad{color:#8a4a26}
.brainkong-proof-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;justify-content:center}
body.is-returning-player .brainkong-first-visit{display:none}
body.is-first-player .returning-default-hero{display:none}
@media(max-width:820px){.brainkong-first-visit{padding:38px 0 40px}.brainkong-first-copy{margin-bottom:20px}.brainkong-proof-card{max-width:680px;padding:22px}.brainkong-proof-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.brainkong-first-visit{padding:28px 0 30px}.brainkong-first-copy h1{font-size:clamp(42px,13vw,58px)}.brainkong-first-tagline{font-size:30px}.brainkong-first-sub{font-size:16px}.brainkong-proof-card{padding:18px;border-radius:20px}.brainkong-proof-options button{min-height:50px}.brainkong-proof-actions>*{width:100%}}
.home-audience-pending .brainkong-first-visit,.home-audience-pending .returning-default-hero{visibility:hidden}

/* BrainKong v1.2 returning-player home dashboard */
.brainkong-returning-dashboard{padding-top:34px;padding-bottom:52px}
.brainkong-returning-dashboard:not(.hidden){display:block}
.brainkong-returning-dashboard .btn-primary,.brainkong-returning-dashboard .btn-secondary{min-height:44px}
.bk-return-hero{text-align:center;padding:8px 12px 22px}
.bk-return-hero .eyebrow{color:var(--brand);letter-spacing:.14em}
.bk-return-hero h1{margin:8px 0 10px;font-size:clamp(2.4rem,5vw,4rem);line-height:1;letter-spacing:-.055em}
.bk-return-stats{margin:0 auto;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:8px 18px;flex-wrap:wrap;font-size:.98rem}
.bk-return-stats strong{color:var(--text)}
.bk-return-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:20px}
.bk-return-two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:0}
.bk-return-card{background:var(--surface);border:1px solid var(--border);border-radius:24px;box-shadow:var(--shadow);padding:22px 24px}
.bk-continue-card{display:flex;min-height:230px;flex-direction:column;align-items:flex-start}
.bk-continue-card h2,.bk-goals-card h2,.bk-ladder-card h2{margin:5px 0 5px;font-size:1.35rem;letter-spacing:-.025em}
.bk-continue-card p{margin:0;color:var(--muted)}
.bk-continue-card .btn-primary{margin-top:auto;min-width:132px;text-align:center}
.bk-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}
.bk-card-head>span{font-size:.82rem;font-weight:800;color:var(--muted);text-align:right}
.bk-xp-pill{display:inline-flex;align-items:center;white-space:nowrap;border:1px solid var(--border);border-radius:999px;padding:7px 10px;color:var(--text)!important;background:#fff;font-size:.8rem!important}
.bk-goal-list{display:grid;gap:8px}
.bk-goal-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:11px;background:#f7f9f8;border:1px solid #e4e9e6;border-radius:13px;padding:10px 12px;color:var(--text);text-decoration:none;min-height:56px}
.bk-goal-row:hover{border-color:#a8caba;background:#fff}
.bk-goal-row.done{background:#edf8f3;border-color:#b9dfcc}
.bk-goal-check{width:27px;height:27px;border-radius:999px;background:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:900}
.bk-goal-row.done .bk-goal-check{color:var(--brand);background:#dff2e9}
.bk-goal-row strong{display:block;font-size:.92rem;line-height:1.2}
.bk-goal-row small{display:block;color:var(--muted);margin-top:3px}
.bk-goal-go{font-size:.82rem;font-weight:900;color:var(--brand);white-space:nowrap}
.bk-return-section{margin-top:26px}
.bk-section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:12px}
.bk-section-head h2{margin:4px 0 0;font-size:1.5rem;letter-spacing:-.025em}
.bk-section-head>a{font-size:.9rem;font-weight:800;color:var(--brand);text-decoration:none}
.bk-quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.bk-quick-card{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:start;min-width:0;min-height:104px;background:#f2f5f3;border:1px solid transparent;border-radius:16px;padding:15px 14px;color:var(--text);text-decoration:none}
.bk-quick-card:hover{background:#fff;border-color:#a8caba;box-shadow:0 6px 18px rgba(31,68,53,.06)}
.bk-quick-icon{font-size:1.3rem;line-height:1.2}
.bk-quick-card small{display:block;color:var(--brand);font-weight:900;font-size:.68rem;letter-spacing:.08em;text-transform:uppercase}
.bk-quick-card strong{display:block;margin-top:4px;font-size:.95rem;line-height:1.2}
.bk-quick-card em{display:block;color:var(--muted);font-size:.78rem;line-height:1.3;font-style:normal;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bk-ladder-card{margin-top:26px}
.bk-ladder-current{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;border:1.5px solid var(--brand);border-radius:15px;padding:12px 14px;color:var(--text);text-decoration:none}
.bk-ladder-badge{width:35px;height:35px;border-radius:999px;background:#f1f7f4;display:inline-flex;align-items:center;justify-content:center}
.bk-ladder-current strong,.bk-ladder-locked strong{display:block}
.bk-ladder-current small,.bk-ladder-locked small{display:block;color:var(--muted);margin-top:3px}
.bk-ladder-locked{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:14px;margin-top:9px;border:1px dashed #d9e0dc;border-radius:15px;padding:12px 14px;color:#5e6b66}
.bk-ladder-complete{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center;border:1px solid #b9dfcc;background:#edf8f3;border-radius:15px;padding:14px}
.bk-ladder-complete>span{font-size:1.4rem}.bk-ladder-complete strong,.bk-ladder-complete small{display:block}.bk-ladder-complete small{color:var(--muted);margin-top:3px}
.bk-return-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:26px;border:1px solid var(--border);border-radius:22px;background:#fff;box-shadow:var(--shadow);overflow:hidden}
.bk-return-strip article{padding:18px 18px 17px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;border-right:1px solid var(--border)}
.bk-return-strip article:last-child{border-right:0}
.bk-return-strip h3{margin:7px 0 6px;font-size:1.02rem;line-height:1.25}
.bk-return-strip p{margin:0 0 15px;color:var(--muted);font-size:.84rem;line-height:1.35}
.bk-return-strip .btn-secondary{margin-top:auto;min-height:38px;padding:8px 13px;font-size:.86rem}
body.is-returning-player .returning-default-hero,body.is-returning-player .home-family-section,body.is-returning-player .home-how-section,body.is-returning-player #itlPersonalGreeting,body.is-returning-player #homeQuickPlay{display:none}
@media(max-width:900px){
  .bk-return-two-col{grid-template-columns:1fr}.bk-continue-card{min-height:190px}
  .bk-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bk-return-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bk-return-strip article:nth-child(2){border-right:0}.bk-return-strip article:nth-child(-n+2){border-bottom:1px solid var(--border)}
}
@media(max-width:640px){
  .brainkong-returning-dashboard{padding-top:20px;padding-bottom:36px}
  .bk-return-hero{padding:2px 0 18px;text-align:left}
  .bk-return-hero h1{font-size:2.35rem}
  .bk-return-stats,.bk-return-actions{justify-content:flex-start}
  .bk-return-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .bk-return-actions a:first-child{grid-column:1/-1}
  .bk-return-card{padding:18px 16px;border-radius:19px}
  .bk-card-head{align-items:flex-start}.bk-xp-pill{font-size:.72rem!important}
  .bk-quick-grid{grid-template-columns:1fr 1fr;gap:7px}.bk-quick-card{min-height:98px;padding:12px 11px}
  .bk-ladder-current{grid-template-columns:auto 1fr}.bk-ladder-current .btn-primary{grid-column:1/-1;text-align:center}
  .bk-return-strip{grid-template-columns:1fr;border-radius:18px}
  .bk-return-strip article{border-right:0;border-bottom:1px solid var(--border)}.bk-return-strip article:last-child{border-bottom:0}
  .bk-section-head{align-items:flex-end}.bk-section-head h2{font-size:1.35rem}
}
@media(max-width:390px){.bk-quick-grid{grid-template-columns:1fr}.bk-return-actions{grid-template-columns:1fr}.bk-return-actions a:first-child{grid-column:auto}}

/* BrainKong V1.3 — first-visitor prove-it flow */
.brainkong-first-visit{padding:34px 0 54px}
.brainkong-brand-promise{max-width:980px;margin:0 auto 42px;text-align:center}
.brainkong-brand-promise h1{margin:8px 0 10px;font-size:clamp(56px,7vw,92px);line-height:.98;letter-spacing:-.06em}
.brainkong-brand-tagline{margin:0 0 14px;font-size:clamp(27px,3vw,39px);font-weight:950;letter-spacing:-.035em;color:var(--text)}
.brainkong-brand-copy{max-width:760px;margin:0 auto;color:var(--muted);font-size:18px;line-height:1.55}
.brainkong-first-copy{margin-bottom:22px}
.brainkong-first-copy h2{margin:10px auto 4px;font-size:clamp(40px,5.2vw,68px);line-height:1.03;letter-spacing:-.05em;max-width:1040px}
.brainkong-first-tagline{margin:0 0 10px}
.brainkong-proof-result{margin-top:18px;border:1.5px solid #4c9f84;border-radius:18px;padding:16px;background:#fff}
.brainkong-proof-verdict{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:start;padding:2px 2px 14px;text-align:left}
.brainkong-proof-result-icon{font-size:30px;line-height:1.1;padding-top:4px}
.brainkong-proof-verdict strong{display:block;font-size:1.25rem;line-height:1.25;margin:2px 0 4px}
.brainkong-proof-verdict small{display:block;color:var(--muted);font-size:.94rem;line-height:1.45}
.brainkong-proof-next{display:block;text-decoration:none;color:inherit;background:#eaf6f1;border:1px solid #b7d8ca;border-radius:14px;padding:14px 16px;text-align:left;transition:.15s ease}
.brainkong-proof-next:hover,.brainkong-proof-next:focus-visible{border-color:var(--brand);background:#e2f2eb;outline:3px solid rgba(38,102,79,.12);outline-offset:2px}
.brainkong-proof-next small{display:block;color:var(--brand);font-size:11px;font-weight:950;letter-spacing:.11em;margin-bottom:4px}
.brainkong-proof-next strong{display:block;font-size:1rem;line-height:1.35;margin-bottom:4px}
.brainkong-proof-next em{display:block;color:var(--muted);font-style:normal;font-size:.9rem;line-height:1.45}
.brainkong-proof-result-actions{justify-content:flex-start;margin-top:10px;padding-top:0}
.brainkong-proof-result-actions .btn-primary,.brainkong-proof-result-actions .btn-secondary{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
.brainkong-proof-text-action{display:inline-flex;align-items:center;min-height:44px;padding:0 8px;color:var(--brand);font-weight:850;text-decoration:none}
.brainkong-proof-text-action:hover,.brainkong-proof-text-action:focus-visible{text-decoration:underline;outline:none}
@media(max-width:720px){
  .brainkong-first-visit{padding:24px 0 36px}
  .brainkong-brand-promise{margin-bottom:32px}
  .brainkong-brand-promise h1{font-size:clamp(48px,15vw,68px)}
  .brainkong-brand-tagline{font-size:clamp(24px,7vw,31px)}
  .brainkong-brand-copy{font-size:16px}
  .brainkong-first-copy h2{font-size:clamp(36px,11vw,50px)}
  .brainkong-proof-result{padding:13px}
  .brainkong-proof-result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .brainkong-proof-result-actions>*{width:100%;margin:0}
  .brainkong-proof-text-action{justify-content:center}
}
@media(max-width:430px){.brainkong-proof-result-actions{grid-template-columns:1fr}.brainkong-proof-verdict{grid-template-columns:auto 1fr;gap:10px}}

/* BrainKong V1.3 — unmistakable click affordance for first-visitor next actions */
.brainkong-proof-next{
  cursor:pointer;
  position:relative;
  transition:transform .15s ease,border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
.brainkong-proof-next:hover,.brainkong-proof-next:focus-visible{
  transform:translateY(-2px);
  border-color:var(--brand);
  background:#dff1e9;
  box-shadow:0 10px 24px rgba(23,70,52,.10);
}
.brainkong-proof-next:active{transform:translateY(0)}
.brainkong-proof-result-actions>a,.brainkong-proof-result-actions>button{
  cursor:pointer;
  transition:transform .14s ease,border-color .14s ease,background .14s ease,box-shadow .14s ease;
}
.brainkong-proof-result-actions>a:hover,.brainkong-proof-result-actions>button:hover,
.brainkong-proof-result-actions>a:focus-visible,.brainkong-proof-result-actions>button:focus-visible{
  transform:translateY(-1px);
  box-shadow:0 6px 15px rgba(23,70,52,.08);
}
.brainkong-proof-result-actions>a:active,.brainkong-proof-result-actions>button:active{transform:translateY(0)}
.brainkong-proof-text-action{
  border:1px solid var(--border);
  border-radius:12px;
  padding:0 12px;
  text-decoration:none;
}
.brainkong-proof-text-action:hover,.brainkong-proof-text-action:focus-visible{
  border-color:#a9cdbb;
  background:#f4faf6;
  text-decoration:none;
  outline:3px solid rgba(38,102,79,.12);
  outline-offset:2px;
}

/* BrainKong V1.4 — clean first-visit home + full-card returning interactions */
.brainkong-first-visit{padding:42px 0 56px;min-height:calc(100vh - 170px);justify-content:flex-start}
.brainkong-first-copy{max-width:1120px;margin:0 auto 24px;text-align:center}
.brainkong-first-brandline{font-size:.82rem;letter-spacing:.15em;color:var(--brand)}
.brainkong-first-copy h1{margin:12px auto 6px;font-size:clamp(54px,6.6vw,86px);line-height:.98;letter-spacing:-.055em;max-width:1120px}
.brainkong-first-tagline{margin:0 0 10px;font-size:clamp(32px,3.4vw,44px)}
.brainkong-first-sub{font-size:18px}
.brainkong-proof-card{width:min(1040px,100%);padding:26px 28px 24px}
.brainkong-proof-result{margin-top:16px}
body.is-first-player #installCard,body.is-first-player #itlPersonalGreeting,body.is-first-player #homeQuickPlay{display:none}

/* Returning dashboard: every single-destination card is the link. */
.bk-card-link,.bk-return-strip-card{color:var(--text);text-decoration:none;cursor:pointer;transition:transform .15s ease,border-color .15s ease,background .15s ease,box-shadow .15s ease}
.bk-card-link:hover,.bk-card-link:focus-visible,.bk-return-strip-card:hover,.bk-return-strip-card:focus-visible,.bk-quick-card:hover,.bk-quick-card:focus-visible,.bk-ladder-current:hover,.bk-ladder-current:focus-visible,.bk-goal-row:hover,.bk-goal-row:focus-visible{
  transform:translateY(-2px);border-color:#7eb69e;background:#fff;box-shadow:0 10px 24px rgba(31,68,53,.10);outline:none
}
.bk-card-link:active,.bk-return-strip-card:active,.bk-quick-card:active,.bk-ladder-current:active,.bk-goal-row:active{transform:translateY(0)}
.bk-card-link .btn-primary,.bk-return-strip-card .btn-secondary{pointer-events:none}
.bk-return-strip-card{padding:18px 18px 17px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;border-right:1px solid var(--border);background:#fff}
.bk-return-strip-card:last-child{border-right:0}
.bk-return-strip-card h3{margin:7px 0 6px;font-size:1.02rem;line-height:1.25}
.bk-return-strip-card p{margin:0 0 15px;color:var(--muted);font-size:.84rem;line-height:1.35}
.bk-return-strip-card .btn-secondary{margin-top:auto;min-height:38px;padding:8px 13px;font-size:.86rem;display:inline-flex;align-items:center}
.bk-quick-card,.bk-ladder-current,.bk-goal-row{cursor:pointer;transition:transform .15s ease,border-color .15s ease,background .15s ease,box-shadow .15s ease}
@media(max-width:900px){
  .bk-return-strip-card:nth-child(2){border-right:0}.bk-return-strip-card:nth-child(-n+2){border-bottom:1px solid var(--border)}
}
@media(max-width:640px){
  .brainkong-first-visit{padding:28px 0 36px;min-height:0}
  .brainkong-first-copy h1{font-size:clamp(42px,12.5vw,58px)}
  .brainkong-first-brandline{font-size:.72rem;line-height:1.45}
  .brainkong-first-sub{font-size:16px}
  .brainkong-proof-card{padding:18px 16px;border-radius:20px}
  .bk-return-strip-card{border-right:0;border-bottom:1px solid var(--border)}.bk-return-strip-card:last-child{border-bottom:0}
}


/* BrainKong V1.5 — sitewide feedback callout (all visible pages except Home) */
.bk-feedback-cta-section{padding:42px 0 34px}
.bk-feedback-cta{
  width:100%;
  border:1px solid var(--border);
  border-radius:22px;
  background:#fff;
  box-shadow:var(--shadow);
  padding:30px 24px 28px;
  text-align:center;
}
.bk-feedback-cta .eyebrow{margin-bottom:8px}
.bk-feedback-cta h2{margin:0 0 8px;font-size:clamp(26px,3vw,34px);line-height:1.15;letter-spacing:-.035em}
.bk-feedback-cta p{margin:0 auto 18px;max-width:720px;color:var(--muted);font-size:1rem;line-height:1.5}
.bk-feedback-cta-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;text-decoration:none;cursor:pointer}
.bk-feedback-cta-button:hover,.bk-feedback-cta-button:focus-visible{
  transform:translateY(-1px);
  border-color:var(--brand);
  background:#f2f8f5;
  box-shadow:0 7px 18px rgba(31,68,53,.08);
}
@media(max-width:640px){
  .bk-feedback-cta-section{padding:28px 0 24px}
  .bk-feedback-cta{padding:24px 18px 22px;border-radius:18px}
  .bk-feedback-cta h2{font-size:26px}
  .bk-feedback-cta p{font-size:.95rem}
  .bk-feedback-cta-button{width:100%}
}

/* BrainKong V1.6 — advanced first-visit logic test */
.brainkong-proof-sequence{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  min-height:72px;
  margin-bottom:4px;
  border:1px solid #d7dfdb;
  border-radius:16px;
  background:#f5f8f6;
  color:var(--text);
  font-size:clamp(24px,3vw,34px);
  font-weight:900;
  letter-spacing:.035em;
  font-variant-numeric:tabular-nums;
}
.brainkong-proof-sequence span{color:var(--brand);font-size:.8em}
@media(max-width:520px){
  .brainkong-proof-sequence{min-height:64px;gap:7px;font-size:clamp(22px,7vw,29px)}
}

/* BrainKong V1.7 — first-visit See It. Fix It. proof challenge */
.brainkong-proof-sentence{
  margin:0 0 14px;
  padding:20px 22px;
  border:1px solid #d7dfdb;
  border-radius:16px;
  background:#f4f7f5;
  color:var(--text);
  font-size:clamp(19px,2vw,24px);
  line-height:1.5;
  font-weight:750;
  letter-spacing:.01em;
}
.brainkong-proof-form{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}
.brainkong-proof-form label{grid-column:1/-1;font-size:.82rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--brand)}
.brainkong-proof-input{
  width:100%;min-height:56px;padding:14px 16px;border:1.5px solid #cfd9d4;border-radius:14px;background:#fff;color:var(--text);font:700 16px/1.3 inherit;outline:none;transition:.15s ease
}
.brainkong-proof-input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(38,102,79,.12)}
.brainkong-proof-input.is-correct{border-color:#67ad8a;background:#f1faf5}
.brainkong-proof-input.is-wrong{border-color:#d98d8d;background:#fff7f7}
.brainkong-proof-check{min-height:56px;white-space:nowrap}
@media(max-width:640px){
  .brainkong-proof-sentence{padding:16px;font-size:18px}
  .brainkong-proof-form{grid-template-columns:1fr}
  .brainkong-proof-check{width:100%}
}
/* BrainKong mobile/accessibility release hardening */
.build-id{display:block;margin-top:.75rem;font-size:.72rem;opacity:.72;letter-spacing:.02em}
button,a,input,textarea,select{touch-action:manipulation}
button,.btn-primary,.btn-secondary,.btn-ghost{min-height:44px}
:focus-visible{outline:3px solid #f0b429;outline-offset:3px}
@media (max-width:430px){
  .game-actions>*{min-height:48px}
  input,textarea,select{font-size:16px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}
