:root{color-scheme:light;--night:var(--theme-bg);--deep:var(--theme-accent);--ink:var(--theme-ink);--green:var(--theme-accent);--light:var(--theme-surface);--pale:var(--theme-paper);--muted:var(--theme-muted);--gold:var(--theme-cream);--line:var(--theme-line);font-family:'Courier New',Consolas,monospace;font-size:16px;--theme-bg:#2b1d3c;--theme-bg-rgb:43 29 60;--theme-surface:#ead9be;--theme-surface-rgb:234 217 190;--theme-paper:#f6ecdc;--theme-paper-rgb:246 236 220;--theme-ink:#392847;--theme-ink-rgb:57 40 71;--theme-muted:#765d76;--theme-muted-rgb:118 93 118;--theme-line:#bca4b4;--theme-line-rgb:188 164 180;--theme-accent:#634875;--theme-accent-rgb:99 72 117;--theme-cream:#e5ceae;--theme-cream-rgb:229 206 174;--theme-shadow:#25172f;--theme-shadow-rgb:37 23 47}
*{box-sizing:border-box}body{margin:0;min-height:100vh;color:var(--ink);background:var(--theme-bg);background-image:radial-gradient(ellipse at 35% 0,rgb(var(--theme-bg-rgb) / 0.5020),transparent 60%),radial-gradient(rgb(var(--theme-bg-rgb) / 0.2196) 1px,transparent 1px);background-size:auto,29px 29px}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible{outline:3px solid var(--theme-accent);outline-offset:4px}kbd{display:inline-flex;align-items:center;justify-content:center;min-width:24px;padding:4px 7px;border:1px solid var(--theme-line);border-bottom-width:3px;background:var(--theme-paper);color:var(--theme-ink);font:700 .9em 'Courier New',monospace;border-radius:4px;line-height:1.1;box-shadow:inset 0 1px var(--theme-shadow)}
.shell{max-width:1370px;margin:0 auto;padding:22px 28px 18px}.masthead{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:17px}.brand{display:flex;align-items:center;gap:19px}.brand-logo{width:160px;height:auto;display:block;object-fit:contain;filter:drop-shadow(0 3px 8px #07151890)}h1{margin:0 0 7px;font-size:30px;line-height:1;letter-spacing:1.5px;color:var(--theme-surface);text-shadow:2px 3px var(--theme-shadow)}.edition{font-size:12px;letter-spacing:2px;color:var(--theme-surface)}.masthead-end{display:flex;gap:24px;align-items:center}.save-status{color:var(--theme-surface);font-size:11px;letter-spacing:1px}.quiet{background:none;border:0;padding:6px 0;color:var(--theme-surface);font-size:14px}.quiet kbd{margin-right:6px;font-size:12px}
.console{display:grid;grid-template-columns:minmax(0,1fr) 286px;gap:14px;padding:13px;background:var(--theme-accent);border:2px solid var(--theme-line);border-radius:9px;box-shadow:inset 0 0 0 3px var(--theme-shadow),0 9px 0 var(--theme-shadow),0 18px 35px rgb(var(--theme-shadow-rgb) / 0.5020)}.play-column{min-width:0;display:flex;flex-direction:column;border:2px solid var(--theme-line);background:var(--light);box-shadow:0 0 0 1px var(--theme-shadow)}.screen-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;border-bottom:2px solid var(--theme-line);background:var(--theme-surface);color:var(--theme-ink);font-size:12px;font-weight:bold;min-height:46px}.screen-top>div{display:flex;align-items:center;gap:8px}.signal{height:7px;width:7px;background:var(--theme-accent);transform:rotate(45deg)}#lesson{text-align:right;font-size:11px;color:var(--theme-ink)}.viewport{position:relative;aspect-ratio:640/416;overflow:hidden;background:var(--theme-accent)}#world{display:block;width:100%;height:100%;image-rendering:pixelated}.map-label{position:absolute;left:16px;top:15px;padding:10px 13px;border:1px solid var(--theme-line);background:rgb(var(--theme-paper-rgb) / 0.9216);color:var(--theme-ink);box-shadow:3px 3px 0 rgb(var(--theme-shadow-rgb) / 0.3137);font-weight:bold;font-size:15px;letter-spacing:1px;pointer-events:none}.map-label:before{content:'◆';font-size:10px;color:var(--theme-muted);margin-right:8px}.map-label span{display:block;font-size:11px;font-weight:normal;letter-spacing:0;margin-top:5px}.map-chip{position:absolute;bottom:13px;left:15px;background:rgb(var(--theme-surface-rgb) / 0.9098);border:1px solid var(--theme-line);padding:7px 10px;font-size:12px;color:var(--theme-ink);pointer-events:none}.map-chip span{color:var(--theme-muted);margin-right:7px}.overlay{position:absolute;inset:0;display:flex;justify-content:center;align-items:center}.overlay:empty{pointer-events:none}
.panel{width:91%;max-height:95%;overflow:auto;padding:22px 25px;text-align:center;color:var(--theme-ink);background-color:var(--theme-surface);background-image:radial-gradient(rgb(var(--theme-accent-rgb) / 0.0941) .6px,transparent .6px);background-size:5px 5px;border:2px solid var(--theme-line);box-shadow:inset 0 0 0 4px var(--theme-shadow),inset 0 0 0 5px var(--theme-shadow),7px 9px 0 rgb(var(--theme-shadow-rgb) / 0.5020);border-radius:3px}.panel-eyebrow{margin:0 0 9px;font-size:11px;letter-spacing:2px;color:var(--theme-muted)}.panel h2{font:700 30px Georgia,'Times New Roman',serif;line-height:1.1;margin:0 0 10px;color:var(--theme-ink)}.panel p{font-size:14px;line-height:1.5;margin:8px 0 14px}.choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.choice{position:relative;display:flex;flex-direction:column;align-items:center;overflow:hidden;min-width:0;padding:10px 6px;background:var(--theme-surface);border:1px solid var(--theme-line);border-bottom:4px solid var(--theme-line);color:var(--theme-ink);transition:transform .15s,background .15s;box-shadow:inset 0 0 0 2px var(--theme-shadow)}.choice:hover,.choice:focus-visible{transform:translateY(-4px);background:var(--theme-paper)}.choice[data-id=moss]{background:linear-gradient(rgb(var(--theme-surface-rgb) / 0.4667),var(--theme-paper))}.choice[data-id=corali]{background:linear-gradient(rgb(var(--theme-surface-rgb) / 0.4667),var(--theme-paper))}.choice[data-id=pebble]{background:linear-gradient(rgb(var(--theme-surface-rgb) / 0.4667),var(--theme-paper))}.choice[data-id=moth]{background:linear-gradient(rgb(var(--theme-surface-rgb) / 0.4667),var(--theme-paper))}.choice canvas{width:112px;height:115px;max-width:100%;image-rendering:pixelated;filter:drop-shadow(0 5px 1px #69503938)}.choice strong{background:var(--theme-surface);border:1px solid var(--theme-line);border-bottom:3px solid var(--theme-line);border-radius:3px;width:36px;height:32px;font-size:25px;line-height:28px;margin:6px 0}.choice small{font-size:14px;font-weight:bold;line-height:1.25;min-height:21px}.origin{font-size:10px;letter-spacing:.6px;margin-top:7px;color:var(--theme-ink)}.key-line{font-size:12px!important;margin:15px 0 0!important;color:var(--theme-ink)}
.dialog{border-top:2px solid var(--theme-line);background:var(--theme-surface);min-height:169px;padding:16px 19px;flex:1;box-shadow:inset 0 5px 0 rgb(var(--theme-shadow-rgb) / 0.3137)}.dialog-label{font-size:11px;letter-spacing:1.5px;font-weight:bold;color:var(--theme-muted);display:flex;align-items:center;gap:8px;margin-bottom:10px}.dialog-label:before{content:'◆';font-size:8px;color:var(--theme-muted)}#dialog-content{font-size:16px;line-height:1.45}#dialog-content p{margin:0 0 9px}.dialog-small{font-size:13px;color:var(--theme-ink)}.action{background:var(--theme-accent);color:var(--theme-paper);border:1px solid var(--theme-line);border-bottom:3px solid var(--theme-line);padding:9px 13px;border-radius:3px;font-size:14px;font-weight:bold;box-shadow:0 2px 0 var(--theme-shadow)}.action kbd{color:var(--theme-paper);background:var(--theme-accent);border-color:var(--theme-line)}.action.light{color:var(--theme-ink);background:var(--theme-surface);border-color:var(--theme-line)}.action.light kbd{background:var(--theme-surface);color:var(--theme-ink);border-color:var(--theme-line)}.action-row{display:flex;flex-wrap:wrap;gap:12px;margin-top:11px}.screen-bottom{display:flex;justify-content:space-between;gap:8px;background:var(--theme-surface);border-top:1px solid var(--theme-line);padding:10px 15px;font-size:10px;font-weight:bold;letter-spacing:.5px;color:var(--theme-ink)}.spark{color:var(--theme-muted);margin-right:4px}
.journal{padding:15px 14px 8px;color:var(--theme-ink);background-color:var(--theme-surface);background-image:radial-gradient(rgb(var(--theme-accent-rgb) / 0.0863) .8px,transparent .8px);background-size:4px 4px;border:2px solid var(--theme-line);border-radius:2px;box-shadow:inset 0 0 0 3px var(--theme-shadow),inset 0 0 0 4px var(--theme-shadow)}.journal-heading{display:flex;justify-content:space-between;padding:0 0 13px;border-bottom:1px solid var(--theme-line);color:var(--theme-muted);font-size:12px;letter-spacing:2px}.companion-card{padding:15px 0 17px;border-bottom:1px solid var(--theme-line)}.friend-row{display:flex;gap:11px;align-items:center;margin-bottom:13px}.portrait{width:76px;height:76px;display:block;image-rendering:pixelated;background:var(--theme-surface);border:1px solid var(--theme-line);border-radius:3px;padding:3px}.friend-label{font-size:10px;letter-spacing:1px;color:var(--theme-muted);margin-bottom:4px}.friend-name{font:700 22px Georgia,serif;color:var(--theme-ink)}.species-label{font-size:11px;color:var(--theme-muted);line-height:1.4;margin-top:5px}.hp-label{display:flex;justify-content:space-between;font-size:11px;font-weight:bold;margin:9px 0 6px;color:var(--theme-ink)}.bar{height:10px;background:#bfaa78;border:1px solid #967346;border-radius:2px;padding:1px}.bar>span{display:block;height:100%;background:linear-gradient(#5caaa0,#2c7773);transition:width .18s}.stats{display:flex;justify-content:space-between;font-size:11px;color:var(--theme-muted);margin-top:11px}.stats strong{color:var(--theme-ink)}.section-row{display:flex;justify-content:space-between;gap:8px;align-items:center}h2{font-size:14px;margin:0}.section-row>span{font-size:10px;color:var(--theme-muted);text-align:right}.controls{padding:17px 0;border-bottom:1px solid var(--theme-line)}.direction-pad{display:grid;grid-template-columns:repeat(3,46px);grid-template-rows:repeat(2,50px);gap:5px;justify-content:center;margin:13px 0 9px}.direction{font-size:10px;text-align:center;color:var(--theme-muted)}.direction kbd{height:33px;width:39px;font-size:22px;box-shadow:0 2px 0 var(--theme-shadow);margin-bottom:3px;text-transform:uppercase}.direction.up{grid-column:2}.direction.left{grid-column:1;grid-row:2}.direction.down{grid-column:2;grid-row:2}.direction.right{grid-column:3;grid-row:2}.direction.locked{opacity:.4}.direction.locked kbd{font-size:12px}.controls p,.quest p{font-size:12px;line-height:1.5;margin:9px 0;color:var(--theme-ink)}.learned-keys{display:flex;gap:3px;flex-wrap:wrap;padding-top:5px}.learned-keys span{padding:3px 4px;border-bottom:2px solid var(--theme-line);text-transform:uppercase;font-size:12px;color:var(--theme-ink)}.learned-keys .waiting{opacity:.25}.quest{padding:16px 0 13px}.collection-mini{display:flex;gap:5px;margin:11px 0}.mini-slot{display:grid;place-items:center;width:39px;height:41px;border:1px solid var(--theme-line);background:var(--theme-surface);border-radius:3px;color:var(--theme-muted);font-size:20px}.mini-slot canvas{height:37px;width:37px;image-rendering:pixelated}.journal-button{width:100%;padding:8px 9px;background:var(--theme-surface);border:1px solid var(--theme-line);border-bottom:3px solid var(--theme-line);border-radius:3px;text-align:left;font-size:12px;color:var(--theme-ink)}.journal-button kbd{font-size:10px;margin-right:7px}.journal-foot{display:flex;gap:11px;align-items:center;border-top:1px solid var(--theme-line);padding:13px 0 5px;font-size:10px;line-height:1.6;color:var(--theme-muted)}.net-icon{font-size:27px;color:var(--theme-muted)}
.footer{display:flex;justify-content:space-between;gap:20px;margin-top:24px;color:var(--theme-surface);font-size:10px;letter-spacing:.6px}.footer>div{display:flex;align-items:center;gap:17px}.footer kbd{font-size:10px;background:var(--theme-accent);color:var(--theme-surface);border-color:var(--theme-line)}.footer .quiet{font-size:10px;color:var(--theme-surface)}
.battle-scene{position:absolute;inset:0;padding:18px 22px;background-image:linear-gradient(#14272b20,#14272b50),url('assets/mossbank-illustrated.webp');background-size:200% 200%;background-position:0 0;color:#5b3d29;isolation:isolate}.battle-scene[data-region=City]{background-position:100% 0}.battle-scene[data-region=Beach]{background-position:0 100%}.battle-scene[data-region=IceCAPS]{background-position:100% 100%}.battle-scene:after{content:'';position:absolute;inset:0;background:linear-gradient(transparent 45%,#f7dfac35);z-index:-1}.battle-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;position:relative;z-index:2}.enemy-info{width:54%;padding:12px 15px;background:rgb(var(--theme-paper-rgb) / 0.9608);border:1px solid var(--theme-line);border-bottom:3px solid var(--theme-line);border-radius:3px;box-shadow:3px 4px 0 rgb(var(--theme-shadow-rgb) / 0.2510)}.enemy-info h2{font:700 25px Georgia,serif;line-height:1.1}.enemy-info p{font-size:10px;letter-spacing:.5px;margin:5px 0 9px;color:var(--theme-muted)}.battle-tag{padding:8px 10px;background:rgb(var(--theme-paper-rgb) / 0.9098);border:1px solid var(--theme-line);border-radius:3px;font-size:10px;letter-spacing:1px;box-shadow:2px 3px rgb(var(--theme-shadow-rgb) / 0.1725)}.battle-art{position:absolute;inset:25% 5% 8%}.battle-art:before{content:'';position:absolute;bottom:12%;right:0;width:52%;height:20%;border-radius:50%;background:#cbb585c9;box-shadow:0 5px 0 #6f5936aa,0 0 0 3px #fff1c93b}.enemy-sprite{position:absolute;right:5%;bottom:17%;width:38%;aspect-ratio:1;image-rendering:pixelated;filter:drop-shadow(1px 5px 1px #23312d70);animation:float 3s ease-in-out infinite}.ally-platform{position:absolute;left:0;bottom:0;width:38%;height:15%;background:#bba06daa;border-radius:50%;box-shadow:0 5px 0 #7f623b90}.ally-sprite{position:absolute;left:6%;bottom:3%;width:27%;aspect-ratio:1;image-rendering:pixelated;filter:drop-shadow(1px 3px 0 #23312d55)}.bubble-art{position:absolute;left:1%;bottom:0;width:37%;image-rendering:pixelated;opacity:.8;filter:drop-shadow(0 0 8px #a4ffff)}.battle-ground{position:absolute;bottom:9px;right:18px;color:var(--theme-paper);text-shadow:1px 2px var(--theme-shadow);font-size:11px;letter-spacing:1px}
.typing-row{display:flex;justify-content:space-between;gap:14px;align-items:center}.typing-prompt{font-size:28px;line-height:1.3;font-weight:bold;letter-spacing:2px;min-height:36px;overflow-wrap:anywhere;color:var(--theme-ink)}.typing-prompt .correct{color:#2e8880}.typing-prompt .wrong{color:#fff7df;background:#b9563b;border-bottom:3px solid #943c28}.typing-prompt .caret{border-bottom:3px solid var(--theme-line)}.input-display{min-height:20px;font-size:12px;color:var(--theme-muted);white-space:pre-wrap;overflow-wrap:anywhere}.notice{font-size:12px;min-height:18px;margin-top:4px;color:var(--theme-ink)}.battle-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:9px}.battle-actions button{padding:6px 9px;background:var(--theme-surface);border:1px solid var(--theme-line);border-bottom:3px solid var(--theme-line);border-radius:3px;color:var(--theme-ink);font-size:12px}.battle-actions button.active{background:var(--theme-accent);border-color:var(--theme-accent);color:var(--theme-paper)}.battle-actions button.active kbd{background:var(--theme-accent);color:var(--theme-paper);border-color:var(--theme-accent)}.battle-actions button:disabled{opacity:.4;cursor:default}.battle-actions kbd{font-size:10px;padding:2px 4px;margin-right:5px;border-bottom-width:2px}
.menu-items{display:grid;gap:10px;max-width:320px;margin:16px auto 0}.menu-items button{text-align:left}.collection-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.pet-card{padding:11px;background:var(--theme-surface);border:1px solid var(--theme-line);border-bottom:3px solid var(--theme-line);border-radius:3px;color:var(--theme-ink);font-size:12px}.pet-card canvas{display:block;margin:auto;width:80px;height:80px;image-rendering:pixelated}.pet-card.selected{background:var(--theme-surface);border-color:var(--theme-accent);box-shadow:inset 0 0 0 2px var(--theme-shadow)}.pet-card.empty{opacity:.6}.pet-card strong{display:block;font:700 20px Georgia,serif;margin:5px 0}.pet-card div{font-size:10px;margin-top:6px}.guide{text-align:left}.guide h2{text-align:center}.guide p{font-size:13px;margin:8px 0}.guide-footer{text-align:center}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
@media(max-width:1100px){.shell{padding:18px}.console{grid-template-columns:minmax(0,1fr) 252px;gap:10px;padding:10px}.journal{padding:13px 11px}.choice canvas{width:90px;height:90px}.panel{padding:18px}.panel h2{font-size:26px}.screen-top{padding:11px;font-size:11px}.brand-logo{width:160px;height:auto}.masthead-end{gap:14px}.save-status{display:none}.map-label{font-size:13px;padding:8px 10px}.map-label span{display:none}.dialog{min-height:183px;padding:14px}.battle-art{inset:27% 4% 7%}.enemy-info h2{font-size:21px}}
@media(max-width:800px){.console{grid-template-columns:1fr;padding:8px}.journal{display:grid;grid-template-columns:1fr 1fr;gap:0 18px;padding:15px}.journal-heading{grid-column:1/-1;padding-bottom:10px}.companion-card{grid-column:1;padding:14px 0}.controls{grid-column:2;grid-row:2;padding:14px 0}.quest{grid-column:1/-1;padding:13px 0}.journal-foot{display:none}.direction-pad{margin:9px 0 6px}.controls p{margin:5px 0}.footer{flex-direction:column;gap:12px}.footer>div{justify-content:space-between}.masthead-end .quiet{font-size:0}.masthead-end .quiet kbd{font-size:13px}.brand{gap:12px}h1{font-size:24px}.edition{font-size:10px}.panel h2{font-size:28px}.choice canvas{width:105px;height:105px}.save-status{display:none}}
@media(max-width:500px){.shell{padding:14px 11px}.masthead{margin-bottom:13px}.brand-logo{width:136px;height:auto}.brand{gap:9px}h1{font-size:19px;letter-spacing:.5px}.edition{font-size:8px;letter-spacing:1px}.screen-top{font-size:10px;padding:9px;min-height:40px}#lesson{font-size:9px}.screen-bottom{font-size:8px;padding:9px}.panel{width:94%;padding:12px}.panel h2{font-size:21px}.panel p{font-size:12px;margin:6px 0 10px}.panel-eyebrow{font-size:9px;letter-spacing:1px}.choices{gap:6px}.choice{padding:6px 3px}.choice canvas{width:53px;height:58px}.choice strong{width:28px;height:26px;font-size:21px;line-height:22px;margin:4px 0}.choice small{font-size:11px;min-height:16px}.origin{font-size:8px;letter-spacing:0;margin-top:4px}.key-line{font-size:9px!important;margin:10px 0 0!important}.map-label{font-size:11px;top:9px;left:9px;padding:6px 8px}.map-chip{font-size:10px;padding:5px 7px;bottom:9px;left:9px}.journal{gap:0 12px}.portrait{width:65px;height:65px}.friend-row{gap:9px}.friend-name{font-size:19px}.species-label{font-size:10px}.direction-pad{grid-template-columns:repeat(3,39px)}.direction kbd{width:33px;height:29px;font-size:19px}.controls h2{font-size:12px}.section-row>span{font-size:8px}.battle-scene{padding:11px}.enemy-info{padding:7px 9px}.enemy-info h2{font-size:18px}.enemy-info p{font-size:8px;margin:4px 0 6px}.battle-tag{font-size:8px;padding:5px 7px}.hp-label{font-size:9px}.battle-ground{font-size:9px}.collection-list{gap:7px}.pet-card{padding:7px;font-size:10px}.pet-card canvas{width:44px;height:44px}.pet-card strong{font-size:16px}.pet-card div{font-size:8px}.guide p{font-size:11px}.typing-prompt{font-size:25px}.typing-row .dialog-small{font-size:10px;flex-shrink:0}.battle-actions{gap:7px}.battle-actions button{font-size:11px;padding:5px 6px}.dialog-small{font-size:12px}.footer{margin-top:20px;font-size:9px}.footer .quiet{font-size:9px}}
