@import url('./system-fonts.css');
:root{--ink:#183f39;--muted:#56695f;--mint:#e2f1e6;--paper:#fbfcf7;--accent:#1a7259;--line:#dce7df}*{box-sizing:border-box}body{margin:0;background:var(--paper);font:16px/1.6 EduThai,system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--ink)}button,select,input{font:inherit}button,a,select{touch-action:manipulation}button{cursor:pointer;border:0}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #c38317;outline-offset:4px}button{min-height:44px}a{color:inherit}header{max-width:1320px;margin:auto;display:flex;align-items:center;gap:32px;padding:24px 40px;border-bottom:1px solid var(--line)}.brand{display:inline-flex;align-items:center;gap:9px;font-size:25px;letter-spacing:-1px;text-decoration:none;font-weight:750;white-space:nowrap}.brand-net{font-weight:450}.brand-mark{background:#285e4b;color:#fff;width:39px;height:39px;border-radius:12px 12px 6px 12px;text-align:center;line-height:36px;font-size:29px}.brand-mark span{color:#f4cb69}nav{display:flex;gap:7px;flex:1}.nav{background:transparent;color:var(--muted);border-radius:24px;padding:10px 16px}.nav.active{background:#e9f2e8;color:var(--accent);font-weight:650}.preview-pill{font-size:12px;background:#f5ead0;border:1px solid #e5d6b0;border-radius:20px;padding:6px 12px;white-space:nowrap}.skip{position:absolute;left:-1000px}.skip:focus{left:10px;top:10px;z-index:20;background:white}main{max-width:1240px;padding:0 36px;margin:auto}.hero{display:grid;grid-template-columns:1.2fr 1fr;gap:50px;align-items:center;padding:64px 0 60px}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:750;color:#54775f;margin:0 0 16px}h1{font-size:clamp(36px,4.2vw,59px);letter-spacing:-2.2px;line-height:1.12;margin:0 0 23px;font-weight:740}h2{font-size:27px;line-height:1.25;letter-spacing:-.8px;margin:0 0 12px}h3{font-size:20px;margin:0}.lead{font-size:17px;color:var(--muted);margin:0 0 25px}.primary,.secondary{border-radius:12px;padding:12px 20px;font-weight:650}.primary{background:var(--accent);color:white}.secondary{background:#fff;border:1px solid #cbded0;color:#295e4b}.hero-actions{display:flex;gap:12px;flex-wrap:wrap}.subtle{font-size:12px;color:var(--muted);line-height:1.7}.hero-board{min-height:285px;padding:30px;border-radius:25px;background:#e9f3e6;transform:rotate(-3deg);border:1px solid #d6e8d2;box-shadow:0 18px 0 -10px #d1e3cd;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px}.board-caption{font-size:10px;letter-spacing:2px}.word-tiles,.math-tiles{display:flex;gap:9px}.word-tiles span,.math-tiles span{width:58px;height:62px;border-radius:10px;background:#fff8e5;box-shadow:0 4px 0 #d8c8a1;display:grid;place-items:center;font-size:32px;font-weight:700}.math-tiles span{width:46px;height:49px;background:#fdfdf8;font-size:27px;box-shadow:0 3px 0 #c1d9bc}.board-foot{font-size:12px;color:#637b61}.small-star{font-size:22px;color:#c69136;margin-right:8px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.section-head .eyebrow{margin-bottom:8px}.age-label{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:10px}select{padding:10px;border:1px solid #d2dfd2;border-radius:10px;background:white;color:var(--ink);max-width:100%}.filters{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0 25px}.filter{border-radius:22px;background:transparent;color:var(--muted);padding:8px 16px;border:1px solid transparent;font-size:13px}.filter.selected{background:var(--ink);color:white}.game-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.game-card{border:1px solid var(--line);border-radius:17px;overflow:hidden;background:#fff;display:flex;flex-direction:column;min-width:0}.card-art{height:135px;display:flex;align-items:center;justify-content:center;position:relative}.mint{background:#dceee2}.amber{background:#f5e8c8}.sky{background:#dfeef4}.lavender{background:#ece5f4}.peach{background:#f5e2d6}.card-symbol{min-width:69px;height:69px;display:grid;place-items:center;padding:0 12px;background:#ffffffaa;border:2px solid #ffffffc7;border-radius:16px;box-shadow:0 5px 0 #0000000b;font-size:29px;font-weight:750;letter-spacing:-1px;transform:rotate(-8deg)}.card-tag{position:absolute;left:12px;top:11px;font-size:9px;font-weight:700;letter-spacing:1px;padding:3px 8px;border-radius:7px;background:#ffffffb3}.card-body{padding:17px;display:flex;flex-direction:column;flex:1}.card-meta{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;margin:6px 0 17px;gap:8px}.game-card button{width:100%;border-radius:9px;background:#eaf3e9;color:#23684e;font-size:12px;font-weight:700;margin-top:auto;padding:8px}.game-card button:disabled{cursor:default;color:#768179;background:#f2f5ef}.family-strip{margin:46px 0;background:#eaf2e5;border-radius:20px;padding:27px;display:flex;align-items:center;gap:22px}.family-strip h2{font-size:23px}.family-strip p{margin:0;font-size:13px;color:var(--muted)}.strip-symbol{font-size:50px;color:#cb9b43}.family-strip .secondary{margin-left:auto;white-space:nowrap;font-size:12px}.tab:not(#tab-play){padding:60px 0 80px;min-height:70vh}.info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;margin-top:28px}#tab-community .info-grid{grid-template-columns:1fr 1fr}.panel{padding:26px;background:#fff;border:1px solid var(--line);border-radius:20px}.panel h2{font-size:22px}.panel p,.panel li{color:var(--muted);font-size:14px}.panel ul{padding-left:20px}.phrase-list{display:flex;gap:10px;flex-wrap:wrap}.phrase-list button{background:var(--mint);color:var(--ink);border-radius:20px;padding:8px 16px}.phrase-log{background:#f4f6f0;padding:18px;border-radius:12px;margin-top:22px}.reward-icon{font-size:45px;color:#bd8e38}.reward strong{font-size:12px}.notice,.store-note{background:#f5edda;padding:17px;border-radius:12px;font-size:13px}.store-note{margin-top:20px}.store-note:empty{display:none}footer{max-width:1240px;margin:auto;padding:24px 36px 36px;display:flex;justify-content:space-between;gap:20px;align-items:center;border-top:1px solid var(--line)}footer p{font-size:12px;color:var(--muted)}dialog{border:0;border-radius:18px;width:min(1100px,96vw);max-height:96dvh;padding:0;color:var(--ink)}dialog::backdrop{background:#173b37b8}.dialog-top{padding:16px 20px;display:flex;justify-content:space-between;gap:15px;align-items:center}.dialog-top h2{font-size:22px;margin:0}.dialog-top p{margin:2px 0}.dialog-top button{padding:7px 15px;border-radius:10px;background:#e9f2e9;color:var(--ink)}iframe{width:100%;height:73dvh;border:0;display:block;background:#f8fbf5}.lang{background:#fff;border:1px solid #cbded0;color:#295e4b;border-radius:20px;padding:6px 14px;font-size:13px;font-weight:650;white-space:nowrap}.test-banner{background:#7a2e14;color:#fff;text-align:center;font-size:13px;font-weight:650;padding:8px 16px}.playing-as{font-size:13px;font-weight:650;color:var(--accent);min-height:1em}.panel.account{margin:28px 0}.account-status:empty,.account-message:empty{display:none}.account-message{color:#8a2d12;font-size:14px}.account-forms{display:grid;grid-template-columns:1fr 1fr;gap:22px}.stack{display:flex;flex-direction:column;gap:10px;align-items:stretch}.stack h3{font-size:17px}.stack label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}input{padding:10px 12px;border:1px solid #d2dfd2;border-radius:10px;background:#fff;color:var(--ink);min-height:44px;font:inherit}input:focus-visible{outline:3px solid #c38317;outline-offset:2px}.row{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0}.profile-list{list-style:none;padding:0;margin:0 0 12px;display:grid;gap:10px}.profile-list li{border:1px solid var(--line);border-radius:14px;padding:12px 14px}.profile-list li.active{border-color:var(--accent);box-shadow:0 0 0 2px #1a72592e}.profile-head{display:flex;justify-content:space-between;gap:10px}.profile-list p{margin:2px 0}.count{background:#ffffff26;margin-left:5px;padding:2px 6px;border-radius:9px}.coins{border-top:1px solid var(--line);margin-top:18px;padding-top:12px}.coins-balance{font-weight:700;color:var(--accent)}.shop{list-style:none;padding:0;display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}.shop-item{border:1px solid var(--line);border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:4px}.shop-kind{font-size:11px;letter-spacing:1px;text-transform:uppercase;color:var(--muted)}.brand-logo{width:44px;height:44px;flex:none;display:block;border-radius:10px}.brand-lockup{height:72px;width:auto;display:block}.brand-lockup-sm{height:48px}header{padding-top:14px;padding-bottom:14px}@media(max-width:650px){.brand-lockup{height:52px}.brand-lockup-sm{height:40px}}[hidden]{display:none!important}@media(max-width:1000px){header{gap:15px;padding:20px}.preview-pill{display:none}.nav{padding:9px}.hero{gap:26px}.game-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.word-tiles span{width:45px;height:51px}.hero-board{padding:20px}.family-strip{flex-wrap:wrap}.family-strip .secondary{margin:0}.info-grid{grid-template-columns:1fr 1fr}}@media(max-width:650px){header{flex-wrap:wrap;padding:17px 20px;gap:13px}.brand{font-size:23px}nav{width:100%;flex-basis:100%;justify-content:space-between;gap:0}.nav{font-size:12px;padding:7px 9px;white-space:nowrap}main{padding:0 20px}.hero{padding:37px 0;grid-template-columns:1fr;gap:28px}h1{letter-spacing:-1.4px}.lead{font-size:15px}.hero-board{min-height:224px;margin:0 9px 10px;gap:17px}.word-tiles span{width:51px;height:54px}.section-head{align-items:start;flex-direction:column}.age-label{width:100%;justify-content:space-between}.age-label select{max-width:69%;font-size:12px}.game-grid{grid-template-columns:1fr 1fr;gap:12px}.card-art{height:115px}.card-body{padding:13px}.card-body h3{font-size:17px}.card-meta{flex-direction:column;gap:1px;font-size:10px}.card-symbol{height:58px;min-width:58px;font-size:24px}.filter{padding:6px 11px;font-size:11px}.filters{gap:3px}.family-strip{padding:21px;gap:12px}.strip-symbol{font-size:33px}.family-strip h2{font-size:20px}.info-grid,#tab-community .info-grid,.account-forms{grid-template-columns:1fr}.tab:not(#tab-play){padding:35px 0}footer{padding:25px 20px;align-items:start;flex-direction:column;gap:4px}footer p{margin:2px 0}.dialog-top{padding:12px}.dialog-top p{font-size:10px}.dialog-top h2{font-size:19px}iframe{height:77dvh}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.collections{display:flex;flex-direction:column;gap:26px}.collection-title{font-size:18px;margin:0 0 12px;letter-spacing:-.3px}.card-art.has-img{overflow:hidden;background:#eef4ec;height:auto;aspect-ratio:4/3}.card-art.has-img img{width:100%;height:100%;object-fit:cover;display:block}.card-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}.card-tag{z-index:1}
dialog.lobby{width:min(640px,96vw)}.lobby-body{padding:0 20px 20px}.lobby-choices{display:flex;flex-direction:column;gap:14px}.lobby-choice{border:1px solid var(--line);border-radius:14px;padding:14px 16px;background:#fbfdf9}.lobby-choice h3{font-size:18px;margin:0 0 2px}.lobby-choice h4{font-size:15px;margin:14px 0 0}.lobby-choice p{margin:2px 0 10px}.lobby-why{background:#f5ead0;border:1px solid #e5d6b0;border-radius:10px;padding:10px 12px;font-size:14px;line-height:1.5}.lobby-clock{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}.lobby-clock select,.lobby-code-form input{min-height:44px;border:1px solid #cbded0;border-radius:10px;padding:8px 10px;background:#fff;color:var(--ink)}.friend-list{list-style:none;padding:0;margin:6px 0;display:flex;flex-direction:column;gap:8px}.friend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;border:1px solid var(--line);border-radius:12px;padding:8px 10px;background:#fff}.friend strong{flex:1;min-width:0;overflow-wrap:anywhere}.friend .row{display:flex;gap:6px;flex-wrap:wrap}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:750;color:#fff;background:#1a7259;flex:none}.nubnub{background:#b5651d}.mali{background:#3d6fb6}.dao{background:#8a4fa8}.kai{background:#2e8b8b}button.small{min-height:40px;padding:6px 12px;font-size:13px}.lobby-code{font-weight:650;overflow-wrap:anywhere}.lobby-code-form{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end}.lobby-code-form label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted);flex:1;min-width:180px}.lobby-code-form input{text-transform:uppercase;letter-spacing:2px;font-weight:650}.lobby-wait{display:flex;flex-direction:column;align-items:center;gap:12px;padding:28px 10px;text-align:center}.spinner{width:38px;height:38px;border-radius:50%;border:4px solid #dce7df;border-top-color:var(--accent);animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:650px){.lobby-body{padding:0 12px 14px}.lobby-choice{padding:12px}.collection-title{font-size:16px}}
dialog.lobby{overflow:auto;overscroll-behavior:contain}#lobby-game{letter-spacing:.5px;font-size:12px;margin-bottom:4px}
.tour-bar{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;margin:22px 0 4px}.tour-bar .playing-as{margin:0}.tour-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;margin-top:18px}.tour-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px}.tour-card{border:1px solid var(--line);border-radius:14px;padding:14px 16px;background:#fbfdf9;min-width:0}.tour-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.tour-head h3{font-size:17px;overflow-wrap:anywhere}.tour-status{font-size:11px;font-weight:700;border-radius:8px;padding:3px 8px;background:#eef3ec;color:var(--muted);white-space:nowrap}.tour-status.open{background:#e2f1e6;color:var(--accent)}.tour-status.running{background:#fff1cf;color:#7a5200}.tour-badges{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 4px}.tour-badge{font-size:11px;border:1px solid var(--line);border-radius:8px;padding:2px 8px;background:#fff}.tour-badge.practice{background:#f5ead0;border-color:#e5d6b0}.tour-badge.ranked{background:#e2f1e6;border-color:#bcd9c4;color:var(--accent);font-weight:700}.tour-card p{margin:4px 0}.tour-ok{font-weight:700;color:var(--accent);align-self:center}.tour-round{display:flex;align-items:center;gap:10px;margin:8px 0}.tour-round strong{overflow-wrap:anywhere}.tour-standings h4{margin:12px 0 6px}.tour-table-wrap{overflow-x:auto}.tour-table{border-collapse:collapse;width:100%;font-size:13px}.tour-table th,.tour-table td{text-align:left;padding:6px 8px;border-bottom:1px solid var(--line)}.tour-table tr.mine td{font-weight:700;background:#eef7f0}.tour-circuit-panel{margin:22px 0}@media(max-width:1000px){.tour-grid{grid-template-columns:minmax(0,1fr)}}.tour-grid>.panel,.tour-circuit-panel{min-width:0}@media(max-width:650px){nav{flex-wrap:wrap;justify-content:flex-start;gap:2px}.tour-card{padding:12px}#tab-tournaments .panel{padding:16px}}
.sticker-book,.festival-panel{margin-top:28px}.sticker-top{display:flex;justify-content:space-between;gap:16px;align-items:start;flex-wrap:wrap}.sticker-status{font-weight:650;color:var(--accent);font-size:15px}.sticker-family{margin-top:18px}.sticker-family h3{font-size:16px;margin-bottom:10px}.sticker-grid{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}.sticker{border:1px solid var(--line);border-radius:18px;padding:14px 12px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;background:#fff}.sticker-art{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;font-size:34px;background:#fff;box-shadow:0 4px 0 #0000000f;border:3px solid #fff}.mascot-pip{border-color:#5fbf98}.mascot-nubnub{border-color:#8ea9c6}.mascot-mali{border-color:#f4b6a6}.mascot-dao{border-color:#f5c443}.mascot-kai{border-color:#e9b93b}.sticker.locked{background:var(--paper)!important;border-style:dashed;color:var(--muted)}.sticker.locked .sticker-art{background:#f1f4ee;color:#8a978e;box-shadow:none;border-color:#dfe6df;font-size:26px}.sticker-name{font-size:14px;line-height:1.3}.sticker-desc{font-size:12px;color:var(--muted);line-height:1.45}.sticker-state{font-size:11px;font-weight:700;letter-spacing:.5px;color:#295e4b;margin-top:auto;padding-top:4px}.sticker.locked .sticker-state{color:var(--muted)}.sticker.new{animation:sticker-pop .7s ease-out both}@keyframes sticker-pop{0%{transform:scale(.85) rotate(-6deg)}60%{transform:scale(1.06) rotate(2deg)}100%{transform:none}}.sticker-celebrate{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;background:#fff6dc;border:1px solid #f0dca4;border-radius:16px;padding:12px 16px;margin:12px 0}.sticker-celebrate button{margin-left:auto}.sticker-more summary{cursor:pointer;color:var(--accent);font-weight:650;font-size:14px;min-height:44px;display:flex;align-items:center}.sticker-more .sticker-grid{margin-top:8px}.festival-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}.festival{border:1px solid var(--line);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:2px}.festival.now{border-color:#e5c56b;background:#fffaf0}.festival-emoji{font-size:30px}.festival-looks{font-size:12px;color:#295e4b}.curriculum{margin:28px 0}.curriculum .notice{margin:10px 0 14px}.curriculum-filter{margin:6px 0 12px}.learn-list{list-style:none;padding:0;margin:0;display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.learn-game{border:1px solid var(--line);border-radius:14px;padding:12px 14px}.learn-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:6px}.learn-junior{font-size:11px;background:#eaf3e9;color:#23684e;border-radius:8px;padding:2px 8px;white-space:nowrap}.learn-chips{list-style:none;padding:0;margin:4px 0;display:flex;flex-wrap:wrap;gap:6px}.learn-chip{font-size:12px;border-radius:10px;padding:3px 8px;background:#f2f6f0;display:inline-flex;gap:5px;flex-wrap:wrap}.learn-fw{font-weight:700;color:#295e4b}.fw-cambridge-primary-maths{background:#f5e8c8}.fw-cambridge-primary-english{background:#dfeef4}.fw-ib-pyp{background:#ece5f4}.fw-thai-moe{background:#dceee2}.card-learn{font-size:12px;margin:-8px 0 12px}.card-learn summary{cursor:pointer;color:var(--accent);font-weight:650;min-height:44px;display:flex;align-items:center}.card-learn p{margin:4px 0}.card-learn .learn-chip{font-size:11px}@media(max-width:650px){.sticker-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sticker-art{width:54px;height:54px;font-size:28px}.learn-list,.festival-list{grid-template-columns:1fr}.sticker-celebrate button{margin-left:0}}@media(prefers-reduced-motion:reduce){.sticker.new{animation:none!important}}
.panel .sticker-grid,.panel .festival-list,.panel .learn-list,.panel .learn-chips{padding-left:0}
/* Game player: fills the viewport so a game never has to scroll inside the launcher; compact one-line bar on top. */
#game-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;overflow:hidden;overscroll-behavior:contain}#game-dialog[open]{display:flex;flex-direction:column}#game-dialog .dialog-top{flex:none;padding:6px 12px;min-height:52px;border-bottom:1px solid var(--line)}#game-dialog .dialog-top>div{display:flex;align-items:baseline;gap:12px;min-width:0}#game-dialog .dialog-top h2{font-size:18px;white-space:nowrap}#game-dialog .dialog-top p{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#game-dialog iframe{flex:1;height:auto;min-height:0}@media(max-width:650px){#game-dialog .dialog-top{min-height:48px;padding:4px 10px}#game-dialog .dialog-top h2{font-size:16px}#game-dialog .dialog-top p{display:none}#game-dialog iframe{height:auto}}

/* ---- Mobile ease-of-play pass (2026-10-22) ---- */
html{-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;text-size-adjust:100%}
html:has(dialog[open]){overflow:hidden}
button,summary,.card-art.tappable{-webkit-touch-callout:none;user-select:none}
summary{touch-action:manipulation}
summary:focus-visible,input:focus-visible{outline:3px solid #c38317;outline-offset:2px}
button:active:not(:disabled){transform:translateY(1px);filter:brightness(.94)}
@media(prefers-reduced-motion:reduce){button:active:not(:disabled){transform:none}}
.subtle{font-size:14px}
.filter{font-size:14px}
.count{font-size:14px}
.lang{font-size:14px;min-height:44px}
.test-banner{font-size:14px}
.age-label{font-size:14px}
.brand-header{min-height:44px}
.nav{display:inline-flex;align-items:center;gap:6px}
.nav-short{display:none}
.nav-ico{display:none}
/* Cards: one reserved shape whether the cover, the colour block or nothing has loaded yet (no layout shift). */
.card-art{height:auto;aspect-ratio:4/3}
.card-art.tappable{cursor:pointer}
.card-meta{font-size:14px}
.game-card button.card-play{font-size:15px;min-height:44px}
.card-soon{margin:auto 0 0;text-align:center;border:1px dashed #c9d6cc;border-radius:9px;padding:9px 6px;font-size:14px;font-weight:650;color:var(--muted);background:#f6f8f3;cursor:default}
.game-card.soon .card-art{filter:saturate(.45);opacity:.72}
.game-card.soon{background:#fcfdfa}
.card-learn summary{font-size:14px}
.learn-chip,.card-learn .learn-chip{font-size:13px}
/* Lobby: the quickest route first; friend tools folded so the choices fit a phone screen. */
.lobby-fold{margin-top:12px;border-top:1px solid var(--line);padding-top:4px}
.lobby-fold>summary{cursor:pointer;font-weight:700;font-size:15px;min-height:44px;display:flex;align-items:center;color:var(--ink)}
.lobby-fold>summary::after{content:'▾';margin-left:8px;color:var(--accent)}
.lobby-fold[open]>summary::after{content:'▴'}
#lobby-practice,#lobby-quick{width:100%;font-size:17px;min-height:52px}
#lobby-close,.close-game{min-width:44px;min-height:44px}
/* Game player: Close stays top-right, away from game controls, inside the safe area. */
#game-dialog .dialog-top{padding:max(4px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 4px max(12px,env(safe-area-inset-left))}
.game-head{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;min-width:0}
#game-dialog .game-head>div{display:flex;align-items:baseline;gap:12px;min-width:0}
#game-dialog .dialog-top>div.game-head{display:flex}
#game-dialog .dialog-top button.close-game{flex:none;padding:8px 16px;font-weight:700;border:1px solid #cbded0;background:#fff;margin-left:8px}
.leave-confirm{display:flex;align-items:center;justify-content:space-between;gap:8px 14px;width:100%;flex-wrap:wrap}
.leave-text{display:flex;flex-direction:column;min-width:0;font-size:14px;line-height:1.35}
.leave-text strong{font-size:16px}
.leave-actions{display:flex;gap:10px;margin-left:auto}
.leave-actions button{min-height:44px;padding:8px 16px}
#game-dialog .dialog-top{flex-wrap:wrap}
@media(max-width:650px){
  body{padding-bottom:calc(68px + env(safe-area-inset-bottom))}
  /* Compact header: logo + language on one row; the menu becomes a thumb-reachable bottom tab bar. */
  header{flex-wrap:nowrap;justify-content:space-between;padding:max(8px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left));gap:10px}
  .brand-lockup{height:44px}
  nav{position:fixed;left:0;right:0;bottom:0;z-index:40;width:auto;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;background:#fffffff5;border-top:1px solid var(--line);box-shadow:0 -4px 16px #183f3914;padding:4px max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left))}
  .nav{flex-direction:column;justify-content:center;gap:0;padding:4px 2px;min-height:56px;border-radius:12px;font-size:14px;line-height:1.15;white-space:normal;text-align:center;overflow-wrap:anywhere}
  .nav-ico{display:block;font-size:20px;line-height:1.2}
  .nav-long{display:none}
  .nav-short{display:inline}
  main{padding:0 max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left))}
  /* Hero: short, so the game grid starts on the first screen. The tile board is decoration only. */
  .hero{padding:18px 0 22px;gap:0}
  .hero-board{display:none}
  .hero .eyebrow{margin-bottom:8px}
  h1{font-size:30px;margin-bottom:10px}
  .lead{font-size:15px;margin-bottom:14px}
  .hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .hero-actions button{padding:10px 8px}
  .hero .subtle{margin:10px 0 0}
  .age-label select,select,input{font-size:16px} /* 16px: iOS does not zoom on focus */
  .age-label select{max-width:62%;min-height:44px}
  .filters{gap:6px;margin:14px 0 18px}
  .filter{padding:6px 12px;font-size:14px;border-color:var(--line)}
  .card-meta{font-size:14px;line-height:1.35}
  .card-body{padding:10px}
  .card-body h3{font-size:16px;line-height:1.3;overflow-wrap:anywhere}
  .card-learn{display:none} /* grown-up detail; the full list stays in the Grown-ups tab */
  .family-strip p{font-size:14px}
  .family-strip .secondary{font-size:14px}
  footer{padding-bottom:24px}
  footer p{font-size:13px}
  /* Lobby: a bottom sheet that fits a 360x640 phone without scrolling. */
  dialog.lobby{width:100vw;max-width:100vw;margin:auto 0 0;border-radius:18px 18px 0 0;max-height:100dvh;padding-bottom:env(safe-area-inset-bottom)}
  dialog.lobby .dialog-top{padding:12px 16px 8px}
  .lobby-choices{gap:10px}
  .lobby-choice{padding:12px}
  .lobby-choice:first-child h3{display:none} /* the button says it */
  .lobby-choice p{font-size:14px;line-height:1.4}
  .lobby-why{font-size:14px}
  #game-dialog .dialog-top{min-height:52px}
  #game-dialog .dialog-top h2{font-size:16px;overflow:hidden;text-overflow:ellipsis}
  .leave-actions{width:100%}
  .leave-actions button{flex:1}
  .panel p,.panel li{font-size:14px}
  .tour-table{font-size:14px}
}
@media(max-width:380px){
  .game-grid{gap:10px}
  .card-body h3{font-size:15px}
  h1{font-size:27px}
}
.dialog-top .leave-actions button.primary{background:var(--accent);color:#fff}
.dialog-top .leave-actions button.secondary{background:#fff;border:1px solid #cbded0;color:#295e4b}
.playing-as:empty{display:none}
/* Thai has no letter-case; tracking pulls vowels and tone marks apart. */
:lang(th) .eyebrow,:lang(th) .board-caption,:lang(th) .card-tag{letter-spacing:0}
@media(max-width:650px){.hero .subtle{font-size:14px;line-height:1.5}.section-head h2{font-size:23px}}

/* Held invisible until app.mjs has applied the language and drawn the grid (max ~600 ms): no layout shift. */
html:not([data-ready]) body{visibility:hidden;animation:eduploys-reveal 0s 3s forwards}
@keyframes eduploys-reveal{to{visibility:visible}}
select{min-height:44px}
.family-strip .secondary{font-size:14px}
.card-learn{font-size:14px}
.card-learn .learn-chip,.learn-chip{font-size:14px}
.stack label,.lobby-clock,.lobby-code-form label{font-size:14px}
.notice,.store-note{font-size:14px}
.reward strong{font-size:14px}
.playing-as{font-size:14px}
header nav{flex-wrap:nowrap}
.nav{white-space:nowrap}
/* Header labels: "Grown-ups" is enough until the header has room for "Grown-ups & store". */

@media(min-width:651px) and (max-width:1279px){header{flex-wrap:wrap;row-gap:6px;justify-content:space-between}header nav{order:3;flex-basis:100%;justify-content:space-between}.brand-lockup{height:56px}}
.nav{min-width:44px;justify-content:center}
@media(min-width:651px) and (max-width:1479px){header .brand-lockup{height:56px}}
.card-learn p,.card-learn .subtle{font-size:14px}
.family-strip p{font-size:14px}
@media(max-width:650px){.section-head{gap:6px}.section-head h2{margin-bottom:4px}#age-disclaimer{margin:6px 0 0;line-height:1.45}.hero-actions+.subtle{line-height:1.5}}
@media(min-width:651px){header .nav-short{display:none!important}header .nav-long{display:inline!important}}
@media(max-width:650px){.nav{padding:4px 0}}
@media(min-width:1280px) and (max-width:1479px){header{gap:18px}header .nav{padding:10px 12px}}
.dialog-top button{white-space:nowrap;flex:none}
@media(max-width:650px){#lobby-online-ready>h4:first-of-type{display:none}.lobby-choice h4{margin-top:8px}.lobby-clock{gap:2px}}

/* Header "Sign in" → /signin/ landing. Phones: a 44px person icon (label stays as aria-label); the logo may shrink. */
.signin-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;background:var(--accent);border-color:var(--accent);color:#fff}
.signin-ico{display:none;font-size:20px;line-height:1}
@media(max-width:650px){header .signin-link{width:44px;min-width:44px;height:44px;padding:0;border-radius:50%;flex:none}.signin-link .signin-ico{display:inline}.signin-link .signin-text{display:none}header:has(.signin-link:not([hidden])){flex-wrap:nowrap;gap:8px;padding-left:16px;padding-right:16px}header:has(.signin-link:not([hidden])) .brand-header{flex:0 1 auto;min-width:0;margin-right:auto}header:has(.signin-link:not([hidden])) .brand-lockup{height:auto;width:202px;max-width:100%}header .lang{flex:none}}
@media(min-width:1280px) and (max-width:1639px){header:has(.signin-link:not([hidden])) .preview-pill{display:none}}
.site-notice{background:#e2f1e6;color:#14533f;border-bottom:1px solid #bcd9c4;text-align:center;font-size:15px;font-weight:650;padding:10px 16px}.site-notice.warning{background:#f5ead0;color:#6b4a00;border-color:#e5d6b0}
