@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;650;700&family=Outfit:wght@400;500;600;650;700;750;800&display=swap');
:root{--ink:#203e36;--muted:#75817a;--green:#214e40;--lime:#d9f383;--paper:#f5f6ef;--line:#e4e8df}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px 'DM Sans',sans-serif}button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.55;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #956ce5;outline-offset:4px}header{height:96px;max-width:1400px;margin:auto;padding:0 6%;display:flex;align-items:center;gap:32px;border-bottom:1px solid var(--line)}.brand{font-family:Outfit,sans-serif;font-size:32px;letter-spacing:-1.5px;font-weight:750;display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none}.brand-dot{color:#83a642;margin-left:-10px}.brandmark{position:relative;background:var(--lime);border-radius:13px;width:42px;height:42px;display:grid;place-content:center;font-size:34px;line-height:1}.brandmark span{position:absolute;font-size:15px;right:3px;top:2px}.header-tag{font-size:11px;letter-spacing:1.8px;color:#8b9286;font-weight:700}.wallet{margin-left:auto;background:white;border:1px solid var(--line);border-radius:30px;padding:10px 18px;display:flex;gap:9px;align-items:center}.wallet span:last-child{font-size:14px;color:var(--muted)}.gem{color:#8c68d3;font-size:22px}main{max-width:1240px;margin:auto;padding:40px 32px 0}.topline{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.eyebrow{font-size:11px;font-weight:750;letter-spacing:1.8px;color:#718273}h1,h2,h3{font-family:Outfit,sans-serif;margin:0}h1{font-size:42px;line-height:1.12;letter-spacing:-1.3px;margin-top:11px;font-weight:650}.button{border:0;border-radius:13px;padding:15px 23px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:30px;transition:transform .18s,background .18s}.button:hover{transform:translateY(-2px)}.pale{background:#e8eddf;color:var(--ink);font-size:14px}.primary{background:var(--lime);color:#234432;box-shadow:0 4px 0 #b5d260}.primary:hover{background:#e3fa9e}.primary span{font-size:23px}.layout{display:grid;grid-template-columns:minmax(0,1fr) 322px;gap:26px}.adventure{border:1px solid #dce5da;border-radius:25px;overflow:hidden;background:white;box-shadow:0 8px 26px #23443206;align-self:start}.scene{height:400px;position:relative;background:#a1dfd9 url('island.png') center 57%/cover;overflow:hidden;padding:27px}.scene:before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#b9eee0aa,transparent 60%)}.scene-label,.scene-heading,.world-footer{position:relative}.scene-label{font-size:10px;letter-spacing:1.6px;font-weight:800;display:flex;gap:9px;align-items:center}.live-dot{height:7px;width:7px;border-radius:50%;background:#387864}.divider{opacity:.4;margin:0 2px}.scene-heading{margin-top:25px;max-width:250px}.scene h2{font-size:35px;line-height:1.04;letter-spacing:-.8px;font-weight:650}.scene p{font-size:13px;max-width:185px;line-height:1.5;margin-top:12px}.world-footer{position:absolute;bottom:22px;left:23px;right:23px;display:flex;justify-content:space-between;align-items:center;gap:8px}.island-pill,.level-pill{border-radius:20px;padding:9px 13px;background:#ffffffde;font-size:12px;font-weight:700;backdrop-filter:blur(8px)}.level-pill{font-size:10px;letter-spacing:1px;background:#214e40db;color:white}.play-panel{padding:25px 28px}.play-intro{display:flex;align-items:center;gap:15px;margin-bottom:22px}.round-icon{width:46px;height:46px;background:#edf3df;border-radius:15px;display:grid;place-items:center;color:#466841}.play-intro h3{font-size:22px;font-weight:600}.play-intro p{font-size:14px;color:var(--muted);margin:6px 0 0}.play-panel>.primary{width:100%;justify-content:space-between}.play-note{text-align:center;font-size:12px;color:#8a9387;margin-top:17px}aside{display:flex;flex-direction:column;gap:18px}.card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:25px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.card-head h2{font-size:22px;letter-spacing:-.4px;margin-top:8px;line-height:1.2;overflow-wrap:anywhere}.count-badge{border-radius:10px;padding:8px 10px;background:#f0f3e9;font-size:14px;font-weight:700}.muted{color:var(--muted);font-size:13px;margin:12px 0 20px}.word-chips{display:flex;flex-wrap:wrap;gap:8px}.chip{background:#f4f5ef;border:1px solid #e9ece3;border-radius:9px;padding:8px 11px;font-size:13px;overflow-wrap:anywhere;max-width:100%}.text-button{width:100%;border:0;border-top:1px solid var(--line);background:none;text-align:left;color:#3c6047;padding:18px 0 0;margin-top:23px;font-weight:700;font-size:14px;display:flex;justify-content:space-between}.small{color:var(--muted);font-size:12px;line-height:1.5}.word-card .small{margin-bottom:0}.quest-card{background:#eeeafb;border-color:#e6e0f5;display:grid;grid-template-columns:40px 1fr;gap:13px}.quest-icon{font-size:34px;color:#9774d9}.quest-card .eyebrow{color:#8774a1;font-size:10px;letter-spacing:1.3px}.quest-card h3{font-size:20px;margin:5px 0}.quest-card p{font-size:12px;color:#877895;margin:0}.track{grid-column:1/-1;background:#dcd5eb;height:7px;border-radius:9px;overflow:hidden;margin-top:5px}.track i{display:block;width:0;height:100%;background:#9b77d8;border-radius:9px;transition:width .4s}.progress-label{grid-column:1/-1;display:flex;justify-content:space-between;font-size:11px;color:#89769e}.tip{display:flex;gap:12px;padding:2px 15px;color:#818979}.tip>span{font-size:24px;color:#9d9c55}.tip p{font-size:12px;line-height:1.7;margin:0}.tip b{font-weight:600;color:#596a54}footer{display:flex;justify-content:space-between;font-size:11px;color:#92998c;padding:28px 0}.playing .scene{height:270px}.playing .scene-heading{display:none}.game-meta{display:flex;justify-content:space-between;font-size:13px;color:var(--muted);margin-bottom:12px}.game-track{height:5px;border-radius:4px;background:#eef1e8;margin-bottom:23px;overflow:hidden}.game-track i{display:block;background:#9ac853;height:100%}.listen-row{display:flex;gap:10px;margin:16px 0}.listen{background:#eaf0dd;border:1px solid #dbe5ca;color:#36583f;border-radius:12px;padding:12px 16px;font-weight:700}.listen.secondary{background:white;font-size:13px}.answer-row{display:flex;gap:10px}.answer-row input{min-width:0;width:100%;font-size:21px;border:2px solid #dce5d2;border-radius:12px;padding:13px 15px;color:var(--ink);outline:none}.answer-row input:focus{border-color:#7cac57}.feedback{min-height:25px;margin:14px 0;font-size:14px;line-height:1.6}.feedback.good{color:#387346}.feedback.retry{color:#936334}.game-actions{display:flex;justify-content:space-between;align-items:center;gap:14px}.plain{border:0;background:none;color:#7c8975;font-size:13px;padding:8px 0;text-decoration:underline;text-underline-offset:3px}.memory-word{font:600 30px Outfit,sans-serif;letter-spacing:2px;margin:12px 0}.result{text-align:center}.result .medal{font-size:48px;color:#9c79da}.result h2{font-size:30px}.stats{display:flex;justify-content:center;gap:30px;margin:24px 0}.stats b{display:block;font:600 28px Outfit}.stats span{font-size:12px;color:var(--muted)}.result p{line-height:1.6;font-size:14px;color:var(--muted)}.result .primary{width:100%}.result-words{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-bottom:20px}dialog{border:0;border-radius:24px;padding:30px;width:min(520px,calc(100% - 30px));color:var(--ink);box-shadow:0 30px 100px #183d3540;max-height:90vh}dialog::backdrop{background:#102d2970;backdrop-filter:blur(5px)}.dialog-head{display:flex;justify-content:space-between;gap:12px}.dialog-head h2{font-size:28px;margin-top:8px}.close{border:0;border-radius:50%;background:#eff2e9;width:35px;height:35px;font-size:24px;flex-shrink:0}dialog p{font-size:14px;line-height:1.5;color:var(--muted)}label{display:block;font-weight:600;font-size:14px;margin:18px 0 8px}label span{float:right;color:var(--muted);font-weight:400}dialog input,textarea{width:100%;border:1px solid #d7e0cf;padding:12px;border-radius:10px;color:var(--ink);background:#fafbf7}textarea{resize:vertical;line-height:1.6}dialog .primary{width:100%;margin-top:18px}.error{color:#ad4e35;min-height:0}#toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);background:#244d3f;color:white;padding:14px 24px;border-radius:14px;opacity:0;pointer-events:none;transition:.2s;z-index:5}#toast.show{opacity:1;transform:translate(-50%,0)}.earned{animation:pop .4s}@keyframes pop{50%{transform:scale(1.1)}}@media(min-width:1500px){main{padding-top:55px}.scene{height:450px}}@media(max-width:900px){main{padding:28px 22px 0}.layout{grid-template-columns:minmax(0,1fr) 280px;gap:18px}.card{padding:20px}.header-tag{display:none}.scene{padding:22px}.scene h2{font-size:30px}.scene-heading{max-width:190px}.scene-label{font-size:9px}.play-intro h3{font-size:20px}.play-intro p{font-size:12px}.level-pill{display:none}}@media(max-width:700px){header{height:78px;padding:0 22px}.brand{font-size:27px}main{padding:25px 18px 0}h1{font-size:32px}.topline{align-items:flex-start;gap:15px}.topline .button{padding:12px;font-size:12px;margin-top:25px;white-space:nowrap}.eyebrow{font-size:9px}.layout{grid-template-columns:1fr}.scene{height:340px}.scene-heading{max-width:210px}.scene h2{font-size:31px}.play-panel{padding:22px}.card{padding:24px}aside{gap:14px}.word-chips{gap:7px}.tip{padding:10px}.playing .scene{height:200px}.answer-row{flex-wrap:wrap}.answer-row .primary{width:100%;padding:11px}.wallet{padding:8px 13px}.wallet span:last-child{display:none}footer{font-size:10px}.listen-row{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* The world is now the playing surface. */
.scene.active-world,.playing .scene.active-world{height:auto;aspect-ratio:960/430;min-height:320px;background-position:center;background-size:cover;padding:0}.active-world:before{display:none}.active-world .scene-label,.active-world .scene-heading,.active-world .world-footer{display:none}#world,#world-hud,#touch-controls{display:none}.active-world #world{display:block;width:100%;height:100%;position:absolute;inset:0;outline:none;touch-action:none}.active-world #world-hud{position:absolute;inset:16px 18px auto;display:flex;justify-content:space-between;gap:12px;pointer-events:none;color:white;align-items:center}#world-objective{font-size:13px;font-weight:700;background:#173c4bdf;padding:9px 13px;border-radius:10px;max-width:80%}#sound-toggle{background:#173c4bcc;border:1px solid #ffffff44;border-radius:10px;padding:9px;color:white;font-size:12px;pointer-events:auto}.active-world #touch-controls{display:flex;position:absolute;bottom:12px;left:15px;right:15px;gap:8px;pointer-events:none}#touch-controls button{pointer-events:auto;touch-action:none;background:#183c55c9;color:white;border:1px solid #ffffff55;box-shadow:0 3px 0 #123b4fa6;border-radius:12px;min-width:48px;height:43px;font-weight:800;font-size:20px}#touch-controls #jump{margin-left:auto;font-size:13px;padding:0 17px}.explore-panel{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:14px}.explore-panel h3{font-size:25px;margin:8px 0}.explore-panel p{color:#75817a;font-size:14px;margin:0}.key-guide{display:flex;gap:8px;align-items:center;font-size:12px;color:#738272}.key-guide span{background:#edf2e5;border:1px solid #dce4d4;padding:7px;border-radius:5px;font-weight:700}.voice-card h2{font-size:21px;margin-top:6px}.voice-card select{width:100%;background:#f5f6ef;border:1px solid #dfe5d9;border-radius:9px;padding:10px;color:#284637;font:13px 'DM Sans',sans-serif}.voice-card .text-button{margin-top:12px;padding-top:12px}.voice-card .small{margin-bottom:0;line-height:1.6}.layout{grid-template-columns:minmax(0,1fr) 302px}.playing .play-panel{min-height:180px}.playing .scene.active-world{background-position:center}.quest-card{padding:20px}.tip{display:none}@media(min-width:1000px){main{max-width:1400px}.layout{grid-template-columns:minmax(0,1fr) 302px}.scene{height:440px}.active-world #world{object-fit:fill}}@media(max-width:700px){.layout{grid-template-columns:1fr}.scene.active-world,.playing .scene.active-world{min-height:260px}#world-objective{font-size:11px;padding:7px 9px}.active-world #world-hud{inset:10px 10px auto}.key-guide{display:none}.voice-card{order:1}.word-card{order:0}.quest-card{order:2}.topline h1{font-size:31px}}

#spell-hud{position:absolute;top:56px;left:12px;right:12px;text-align:center;pointer-events:none;z-index:2}.spell-toolbar{display:flex;justify-content:center;gap:7px;pointer-events:auto}.spell-toolbar button{border:1px solid #ffffff55;border-radius:9px;background:#193e50e8;color:white;padding:7px 12px;font-size:12px;font-weight:700}#spell-slots{display:flex;justify-content:center;flex-wrap:wrap;gap:4px;margin:10px auto 5px;max-width:95%}.spell-slot{display:inline-grid;place-items:center;min-width:23px;height:29px;padding:0 5px;border-radius:5px;background:#183b53dd;border-bottom:3px solid #b398e3;color:#d2c6e3;font-size:18px;font-weight:800}.spell-slot.filled{background:#dff28e;color:#294e3a;border-color:#9db951}#spell-message{display:inline-block;color:white;background:#173b50db;border-radius:7px;font-size:12px;margin:0;padding:5px 10px}.wrong-letter{background:#784731!important}.letter-block{position:absolute;top:46%;width:6.67%;height:11.2%;border-radius:10px;background:#e2bcff;color:#34264e;border:2px solid #fff8;box-shadow:0 6px 0 #7953a5,0 8px 25px #34214d66;font:800 clamp(18px,3vw,30px) Outfit,sans-serif;z-index:1;pointer-events:auto;touch-action:manipulation;transition:background .15s}.letter-block:hover{background:#f0d8ff}.letter-block:active{background:#d9f383;box-shadow:0 2px 0 #799744}.spell-success #spell-slots{filter:drop-shadow(0 0 10px #d9f383)}@media(max-width:700px){#spell-hud{top:47px}.spell-toolbar button{padding:5px 8px;font-size:11px}.spell-slot{height:23px;min-width:18px;font-size:15px;padding:0 3px}#spell-slots{margin:6px auto 3px;gap:3px}#spell-message{font-size:10px;padding:3px 6px}.letter-block{border-radius:6px;box-shadow:0 4px 0 #7953a5}.scene.active-world,.playing .scene.active-world{min-height:340px}}

.letter-block::after{content:attr(data-key);position:absolute;right:4px;bottom:1px;font:600 10px sans-serif;opacity:.55}

.tap-bank{display:none}.tap-bank[hidden]{display:none!important}@media(pointer:coarse),(max-width:900px){.tap-bank:not([hidden]){display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;padding:12px 16px;background:#23495a}.tap-bank button{min-height:52px;min-width:44px;border:2px solid #ffffff80;border-radius:10px;background:#e3c5ff;color:#34264e;box-shadow:0 4px 0 #9064b7;font:800 26px Outfit,sans-serif;touch-action:manipulation;-webkit-user-select:none;user-select:none}.tap-bank button:active{background:#d9f383;transform:translateY(2px)}#touch-controls button{min-width:50px;min-height:48px;touch-action:none}.spell-toolbar button{min-height:40px}}

.shop-open{background:#eae0fb;color:#654595;font-size:14px;margin-left:auto;white-space:nowrap}.wallet{margin-left:0}.music-card h2{font-size:19px}.music-toggle{border:0;background:#e3efd1;color:#36573b;border-radius:10px;padding:9px 13px;white-space:nowrap}.music-card label{font-size:13px;display:flex;justify-content:space-between}.music-card input{width:100%;accent-color:#5e8d48;min-height:32px}.music-card .small{margin-bottom:0;font-size:11px}#shop{width:min(780px,calc(100% - 24px));padding:28px;overflow:auto}.shop-balance{background:#eee7f8;padding:12px 16px;border-radius:12px;margin-top:16px;display:flex;justify-content:space-between;color:#664892}.shop-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.shop-item{padding:15px;border:1px solid #e4e6dc;border-radius:16px;display:flex;flex-direction:column;background:#f8faf4}.shop-art{height:110px;display:grid;place-items:center;background:radial-gradient(ellipse,#e3d6fa,transparent 70%);border-radius:12px}.shop-art img{width:106px;height:106px;object-fit:contain}.shop-art.jump,.shop-art.trail,.shop-art.music{font-size:65px;color:#9474ce}.shop-art.music{color:#3d6b4a}.shop-art.trail{color:#cc82bd}.shop-item h3{font-size:18px;margin:10px 0 0}.shop-item p{font-size:12px;line-height:1.5;flex:1;margin:8px 0 12px}.shop-item .primary{font-size:12px;padding:11px 6px;gap:5px}.shop-item .plain{text-align:left;margin-bottom:7px}#shop-reset{margin-top:20px}#shop>p.small{font-size:12px}@media(max-width:700px){header{gap:10px;padding:0 16px}.header-tag{display:none}.shop-open{font-size:12px;padding:10px;gap:5px}.brand{gap:6px;font-size:24px}.brandmark{width:34px;height:34px;font-size:28px}.wallet{padding:7px 10px;gap:4px}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#shop{padding:20px}.shop-item{padding:12px}.shop-item h3{font-size:16px}}

#hud-actions{display:flex;gap:8px;pointer-events:auto;flex-shrink:0}
#stage-size,#sound-toggle{pointer-events:auto;min-height:44px}
#stage-size{background:var(--lime);color:#234432;border:0;border-radius:10px;padding:9px 12px;font-size:13px;font-weight:800}
.active-world #world-hud{z-index:4}
#world-objective{max-width:calc(100% - 180px)}
@media(max-width:1200px){.layout{grid-template-columns:1fr}}
@media(pointer:coarse){
  .scene.active-world,.playing .scene.active-world{width:100%;max-width:100%;aspect-ratio:auto;height:min(68dvh,680px);min-height:0}
  #touch-controls button{min-width:72px;min-height:64px;height:auto;font-size:28px}
  #touch-controls #jump{min-width:128px;font-size:18px;padding:0 20px}
}
body.stage-expanded{overflow:hidden}
body.stage-expanded .scene.active-world{position:fixed;z-index:30;inset:0;width:auto;height:auto;min-height:0;aspect-ratio:auto;border-radius:0}
@media (orientation: landscape){
  body.stage-expanded .scene.active-world{width:100vw;height:100dvh;min-height:100dvh}
}
body.stage-cover{height:100lvh}
body.stage-cover .scene.active-world{
  top:0;
  left:0;
  width:100lvw;
  height:100lvh;
  min-height:100lvh;
}
.scene.active-world:fullscreen,.scene.active-world:-webkit-full-screen{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  min-height:100%;
  border-radius:0;
}
body.stage-expanded #touch-controls button{min-width:84px;min-height:72px;height:auto;font-size:32px}
body.stage-expanded #touch-controls #jump{min-width:148px;font-size:20px}
body.stage-expanded .active-world #touch-controls{bottom:calc(14px + env(safe-area-inset-bottom) + var(--stage-pad-bottom, 0px));left:calc(14px + env(safe-area-inset-left) + var(--stage-pad-left, 0px));right:calc(14px + env(safe-area-inset-right) + var(--stage-pad-right, 0px))}
body.stage-expanded .active-world #world-hud{inset:calc(12px + env(safe-area-inset-top) + var(--stage-pad-top, 0px)) calc(12px + env(safe-area-inset-right) + var(--stage-pad-right, 0px)) auto calc(12px + env(safe-area-inset-left) + var(--stage-pad-left, 0px))}
body.stage-expanded .tap-bank:not([hidden]){display:grid;position:fixed;z-index:31;left:0;right:0;bottom:0;padding-bottom:calc(12px + env(safe-area-inset-bottom) + var(--stage-pad-bottom, 0px))}
body.stage-expanded .scene .tap-bank:not([hidden]){position:absolute;z-index:8}
body.stage-expanded:has(.tap-bank:not([hidden])) .scene.active-world{bottom:calc(88px + env(safe-area-inset-bottom))}
body.stage-cover:has(.tap-bank:not([hidden])) .scene.active-world{bottom:0;height:100lvh}

/* Keep the painted world at 960×430 even when the play area is taller or wider. */
.scene.active-world,.playing .scene.active-world{container-type:size;background-image:none;background-color:#8ecfdd}
.active-world #world,.active-world #letter-blocks{position:absolute;inset:auto;width:min(100cqw,calc(100cqh * 960 / 430));height:min(100cqh,calc(100cqw * 430 / 960));left:50%;top:50%;translate:-50% -50%}
.active-world #world{display:block;background:#a1dfd9 url('island.png') center 57%/cover no-repeat;object-fit:fill;outline:none;touch-action:none}
.active-world #letter-blocks{z-index:1;pointer-events:none}
.active-world #spell-hud{top:max(52px,calc((100cqh - min(100cqh,100cqw * 430 / 960)) / 2 + 10px));left:calc((100cqw - min(100cqw,100cqh * 960 / 430)) / 2 + 8px);right:calc((100cqw - min(100cqw,100cqh * 960 / 430)) / 2 + 8px)}

#touch-controls button,.letter-block,.spell-toolbar button{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#touch-controls [data-move="-1"]::before{content:"←"}
#touch-controls [data-move="1"]::before{content:"→"}
#touch-controls #jump::before{content:"↑ JUMP"}

.word-card .list-picker{margin-block:0 16px}
.word-card .list-picker[hidden]{display:none}
.word-card .list-picker select{display:block;inline-size:100%;margin-block-start:8px;background:#f5f6ef;border:1px solid #dfe5d9;border-radius:9px;padding:10px 12px;color:var(--ink);font:600 14px 'DM Sans',sans-serif}
.word-card .list-picker select:focus-visible{outline:3px solid #956ce5;outline-offset:3px}
#editor{overflow:auto}
#list-pin{letter-spacing:.35em;font-variant-numeric:tabular-nums}
#journey-time{flex-shrink:0;font-size:13px;font-weight:700;background:#173c4bdf;padding:9px 12px;border-radius:10px;font-variant-numeric:tabular-nums}
#world-objective{max-width:calc(100% - 250px)}
#confetti{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3}
.stats{flex-wrap:wrap}
@media(max-width:43.75em){
  #journey-time{font-size:11px;padding:7px 9px}
  #world-objective{max-width:calc(100% - 200px)}
  .stats{gap:16px}
  .stats b{font-size:22px}
}
@media(prefers-reduced-motion:reduce){#confetti{display:none}}

.explorer-open{background:var(--lime);color:#234432;font-size:14px;margin-inline-start:auto;white-space:nowrap}
.explorer-open.is-on{background:#214e40;color:#fff}
.shop-open{margin-inline-start:0}
#explorer{width:min(40rem,calc(100% - 24px));overflow:auto}
.explorer-tabs{display:flex;gap:.5rem;margin-block:1rem}
.explorer-tabs button{flex:1;border:1px solid var(--line);background:#f4f5ef;border-radius:12px;padding:12px;font-weight:700;min-height:48px}
.explorer-tabs button.is-active{background:#214e40;color:#fff;border-color:#214e40}
.name-preview{font:700 clamp(1.15rem,1rem + 1vw,1.4rem) Outfit,sans-serif;text-align:center;min-height:1.4em;margin-block-start:.5rem}
.word-cloud{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-block:.9rem;padding:.75rem;background:#f3f6ec;border-radius:16px}
.word-cloud button{border:1px solid #d7e0cf;background:#fff;border-radius:999px;padding:10px 14px;font-weight:700;min-height:44px;color:var(--ink)}
.word-cloud button.picked{background:var(--lime);border-color:#b5d260}
#explorer-pin,#explorer-pin-confirm,#reset-code,#reset-pin,#reset-pin-confirm{letter-spacing:.35em;font-variant-numeric:tabular-nums}
#explorer-forgot,#explorer-welcome-back{margin-block-start:.75rem}

.onboard-actions{display:grid;gap:.7rem;margin-block-start:.4rem}
.onboard-actions .button{width:100%;justify-content:space-between}
.welcome-choice{display:flex;flex-direction:column;align-items:flex-start;gap:.35rem;width:100%;border:1px solid var(--line);background:#f7f8f2;border-radius:16px;padding:1rem 1.1rem;text-align:start;min-height:4.5rem;margin-block-start:.7rem}
.welcome-choice:hover{transform:none;background:#eef5d8;border-color:#c9d7a6}
.welcome-choice b{font:700 1.1rem Outfit,sans-serif;color:var(--ink)}
.welcome-choice span{color:var(--muted);font-size:.85rem;line-height:1.45}

.play-stack{
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  min-inline-size: 0;
  align-self: start;
}
.play-stack .adventure{
  align-self: stretch;
}
.layout > aside{
  align-self: start;
}
.board-card{
  --board-rank: 2rem;
  --board-score: 3.4rem;
  --board-words: 3.2rem;
  --board-runs: 3rem;
  --board-gems: 3.4rem;
  --board-time: 3.2rem;
  --board-cols: var(--board-rank) minmax(0,1.8fr) var(--board-score) var(--board-words) var(--board-runs) var(--board-gems) var(--board-time);
  margin-block: 0;
  padding: 1.6rem 1.75rem 1.3rem;
  container-type: inline-size;
  background: linear-gradient(180deg,#f8faf3,#fff 38%);
}
.board-card .card-head{
  align-items: flex-end;
}
.board-card .card-head h2{
  font-size: clamp(1.45rem, 1.1rem + 1vw, 1.9rem);
}
.board-hint{
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  max-inline-size: 16rem;
  text-align: end;
}
.board-legend,.board-row{
  display: grid;
  grid-template-columns: var(--board-cols);
  gap: .55rem;
  align-items: center;
}
.board-legend{
  margin-block-start: 1.1rem;
  padding-block-end: .55rem;
  border-block-end: 1px solid var(--line);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.board-legend span:nth-child(1){grid-column: 2}
.leaderboard{
  list-style: none;
  margin: .2rem 0 0;
  padding: 0;
  max-block-size: 28rem;
  overflow: auto;
}
.board-row{
  padding: .75rem .15rem;
  border-block-end: 1px solid #eef1e6;
  font-size: .92rem;
}
.who-btn{
  display: flex;
  align-items: center;
  gap: .7rem;
  min-inline-size: 0;
  min-block-size: 2.75rem;
  padding: .15rem .2rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: start;
}
.who-btn > span{
  display: grid;
  gap: .15rem;
  min-inline-size: 0;
}
.who-btn:hover{background: #f3f7e8}
.who-btn:focus-visible{outline: 3px solid #956ce5; outline-offset: 2px}
.who-skin{
  inline-size: 2.4rem;
  block-size: 2.4rem;
  object-fit: contain;
  flex: 0 0 auto;
}
.board-row .who{font-weight: 750; overflow-wrap: break-word}
.board-stats{display: contents}
.board-row .meta{color: var(--muted); font-size: .72rem}
.board-rank,.board-score,.board-words,.board-runs,.board-gems,.board-time{font-variant-numeric: tabular-nums}
.board-rank{
  display: grid;
  place-items: center;
  inline-size: 1.75rem;
  block-size: 1.75rem;
  border-radius: 999px;
  background: #eef2e6;
  font: 800 .75rem Outfit, sans-serif;
  color: #4f6556;
}
.board-score,.board-time,.board-words,.board-runs{font-weight: 750; font-family: Outfit, sans-serif}
.board-gems{color: #6d4fb3; font-weight: 700}
.board-time{color: #2f5d49}
.board-row.is-you{
  background: #eef6d6;
  margin-inline: -.45rem;
  padding-inline: .45rem;
  border-radius: 14px;
  border-block-end-color: transparent;
}
.board-row.is-gold .board-rank{background: #f6d56b; color: #5a4710}
.board-row.is-silver .board-rank{background: #d7dde6; color: #3d4856}
.board-row.is-bronze .board-rank{background: #efc09a; color: #6a3d1c}
@media (max-width: 43.75em){
  .board-card{padding-inline: 1rem}
}
@container (inline-size < 42rem){
  .board-card .card-head{
    flex-direction: column;
    align-items: flex-start;
  }
  .live-here{text-align: start}
  .board-legend,.board-row{grid-template-columns: var(--board-rank) minmax(0,1fr)}
  .board-legend,.board-hint{display: none}
  .board-row{align-items: start}
  .board-rank{margin-block-start: .35rem}
  .board-stats{
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .75rem;
    grid-column: 2;
    min-inline-size: 0;
    padding-inline-start: .2rem;
  }
  .board-stats [data-label]::before{
    content: attr(data-label) " ";
    color: var(--muted);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
  }
}
@media (max-width: 43.75em){
  .explorer-open{font-size: 12px; padding: 10px 12px; gap: 6px}
  .word-cloud button{min-height: 48px; padding: 11px 14px}
}

.profile-card{
  width: min(36rem, calc(100% - 24px));
  overflow: auto;
}
.profile-hero{
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block-start: 1.1rem;
}
.profile-skin{
  display: grid;
  place-items: center;
  inline-size: 6.5rem;
  block-size: 6.5rem;
  border-radius: 1.25rem;
  background: radial-gradient(ellipse at 50% 40%, #e7d9fb, #f7f8f2 72%);
}
.profile-skin img{
  inline-size: 5.6rem;
  block-size: 5.6rem;
  object-fit: contain;
}
.profile-look{
  margin: 0;
  font: 700 1.05rem Outfit, sans-serif;
  color: var(--ink);
}
.profile-stats{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .6rem;
  margin-block: 1.2rem .4rem;
}
.profile-stats div{
  background: #f4f6ee;
  border-radius: 12px;
  padding: .7rem .45rem;
  text-align: center;
}
.profile-stats b{
  display: block;
  font: 750 1.15rem Outfit, sans-serif;
}
.profile-stats span{
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.profile-heading{
  margin-block: 1.15rem .45rem;
  font-size: 1rem;
}
.profile-awards,.profile-loot{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.profile-awards li,.profile-loot li{
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbf6;
}
.profile-awards b{font-size: .92rem}
.profile-awards span,.profile-loot span{color: var(--muted); font-size: .8rem}
.profile-awards li{flex-direction: column; align-items: flex-start; gap: .15rem}
.profile-loot img,.loot-icon{
  inline-size: 2.1rem;
  block-size: 2.1rem;
  object-fit: contain;
}
.loot-icon{display: grid; place-items: center; font-size: 1.3rem}
.profile-awards .is-empty,.profile-loot .is-empty{
  border-style: dashed;
  color: var(--muted);
}
@media (max-width: 32em){
  .profile-stats{grid-template-columns: repeat(3, minmax(0, 1fr))}
}

.admin-link{
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#admin{width: min(40rem, calc(100% - 24px)); overflow: auto}
#admin-code,.admin-pin,.admin-pin-confirm{letter-spacing: .35em; font-variant-numeric: tabular-nums}
.admin-roster{
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: .8rem;
}
.admin-row{
  border: 1px solid var(--line);
  background: #f7f8f2;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  display: grid;
  gap: .7rem;
}
.admin-who{
  display: grid;
  gap: .2rem;
}
.admin-who b{font: 700 1.05rem Outfit, sans-serif}
.admin-who span{color: var(--muted); font-size: .85rem}
.admin-actions{display: flex; flex-wrap: wrap; gap: .4rem 1rem}
.admin-reset{
  display: grid;
  gap: .7rem;
  border-block-start: 1px solid var(--line);
  padding-block-start: .8rem;
}
.admin-reset[hidden]{display: none}
.admin-reset label{display: grid; gap: .35rem; font-size: .85rem; color: var(--muted)}
.admin-reset .primary{margin-block-start: 0}

.live-here{
  margin: .55rem 0 0;
  color: var(--green);
  font-size: .85rem;
  font-weight: 700;
}
.live-here[hidden]{display: none}
.live-float{
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}
.live-bar{
  display: grid;
  gap: .45rem;
  padding: .85rem 1.1rem .95rem;
  border-block-start: 1px solid var(--line);
  background: #f7f8f2;
}
.live-bar[hidden]{display: none}
.live-bar-copy{
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.4;
}
.live-bar-row{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.live-bar-row button{
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  inline-size: 2.2rem;
  block-size: 2.2rem;
  padding: 0;
  line-height: 1;
  font-size: 1.05rem;
}
.live-bar-row button:focus-visible{outline: 3px solid #956ce5; outline-offset: 3px}
.live-bit{
  position: absolute;
  inset-block-end: 12%;
  display: flex;
  align-items: center;
  gap: .35rem;
  max-inline-size: min(14rem, 70%);
  animation: live-rise 2.8s ease-out forwards;
}
.live-bit-emoji{font-size: 1.7rem; line-height: 1}
.live-bit-name{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: #173c4bdd;
  color: #fff;
  padding: .2rem .55rem;
  font-size: .72rem;
  font-weight: 700;
}
@keyframes live-rise{
  from{transform: translateY(0); opacity: 1}
  to{transform: translateY(-11rem); opacity: 0}
}
@media (prefers-reduced-motion: reduce){
  .live-bit{animation: live-pop .9s ease-out forwards}
  @keyframes live-pop{
    from{opacity: 1; transform: scale(1)}
    to{opacity: 0; transform: scale(1.05)}
  }
}

.play-hint{
  position: absolute;
  z-index: 6;
  inset-block-start: 4.2rem;
  inset-inline-end: 12px;
  max-inline-size: min(16rem, calc(100% - 24px));
  margin: 0;
  padding: .55rem .75rem;
  border: 0;
  border-radius: 12px;
  background: #173c4bed;
  color: #fff;
  font: 700 .8rem 'DM Sans', sans-serif;
  line-height: 1.35;
  text-align: start;
  pointer-events: auto;
}
.play-hint[hidden]{display: none}
.play-hint:focus-visible{outline: 3px solid #d9f383; outline-offset: 3px}
body.stage-expanded .play-hint{
  inset-block-start: calc(4.2rem + env(safe-area-inset-top) + var(--stage-pad-top, 0px));
  inset-inline-end: calc(12px + env(safe-area-inset-right) + var(--stage-pad-right, 0px));
}
#stage-size.is-nudge{
  box-shadow: 0 0 0 3px #fff8, 0 0 0 6px var(--lime);
  animation: nudge-bigger 1.2s ease-in-out 4;
}
@keyframes nudge-bigger{
  50%{transform: scale(1.06)}
}
@media (prefers-reduced-motion: reduce){
  #stage-size.is-nudge{animation: none}
}
.shop-art{position:relative}
.shop-item.is-rare{border-color:#efc3e2;background:linear-gradient(180deg,#fff6fb,#f8faf4 48%)}
.shop-rare,.shop-new{
  position:absolute;
  inset-block-start:.4rem;
  border-radius:999px;
  padding:.15rem .45rem;
  font:800 .62rem Outfit,sans-serif;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.shop-rare{
  inset-inline-end:.4rem;
  background:#f4c6e4;
  color:#7a2f62;
}
.shop-new{
  inset-inline-start:.4rem;
  background:var(--lime);
  color:var(--green);
}
