:root{--ink:#343e33;--muted:#858773;--cream:#fbf7ed;--green:#536b47;--orange:#c27c49;--line:#dedbc9;--serif:Georgia,'Times New Roman',serif;font-family:'Trebuchet MS',Arial,sans-serif;color:var(--ink);font-size:14px}*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#e8dfc8}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #aa6940;outline-offset:4px}button{color:inherit}button:disabled{opacity:.5;cursor:default}[hidden]{display:none!important}#world{position:fixed;width:100%;height:100%;inset:0;outline:none;touch-action:none}.vignette{position:fixed;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(239,230,211,.6),transparent 23%,transparent 75%,rgba(229,220,197,.62))}header{position:absolute;top:0;left:0;right:0;padding:25px 34px;display:flex;align-items:center;justify-content:space-between;gap:24px;pointer-events:none}header>*{pointer-events:auto}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--ink);font-size:25px;font-weight:bold;letter-spacing:-1px}.brand-symbol{font-size:43px;color:var(--green);line-height:1}.brand-light{font-weight:normal}.brand small{display:block;font-size:8px;letter-spacing:3px;margin-top:3px}.location{display:flex;align-items:center;gap:10px;font-family:var(--serif);font-size:24px}.location small{font-family:Arial,sans-serif;display:block;font-size:8px;letter-spacing:2px;margin-top:4px}.sun{font-size:31px;color:#ba8c4a}nav{display:flex;gap:9px}.round{border:1px solid #fdf9ee99;background:#fcf8eddf;border-radius:50%;width:38px;height:38px;font-size:20px;box-shadow:0 3px 12px #5d58320c}.round:hover{background:#fff}.welcome{position:absolute;left:7%;top:24%;max-width:440px;padding:0 32px 30px 0}.welcome:before{content:'';position:absolute;inset:-85px -130px -70px -120px;background:radial-gradient(ellipse at 30% 50%,#eee8d5ef 0%,#eee8d5ad 45%,transparent 70%);z-index:-1;pointer-events:none}.eyebrow{font-size:9px;font-weight:bold;letter-spacing:2px;line-height:1.6;color:#73785d}h1{font-family:var(--serif);font-size:clamp(44px,5.5vw,80px);line-height:1.04;letter-spacing:-3px;font-weight:normal;margin:24px 0}em{font-weight:normal;color:#73815d}.welcome p{font-size:14px;line-height:1.85;color:#6c705d;margin-bottom:28px}.primary{background:var(--green);border:0;border-radius:9px;color:#fffcef;padding:16px 22px;font-size:13px;box-shadow:0 5px 12px #3e4a2920;display:inline-flex;justify-content:space-between;align-items:center;gap:25px}.primary:hover{background:#3e5738;transform:translateY(-1px)}.secondary{background:transparent;border:1px solid var(--line);border-radius:8px;padding:12px 18px}.welcome .secondary{display:block;margin-top:12px;background:#f9f4e7bb}.welcome-foot{margin-top:25px;font-size:10px;color:#7d826d;display:flex;flex-direction:column;gap:9px}footer{position:absolute;bottom:0;left:0;right:0;padding:22px 32px;display:flex;justify-content:space-between;gap:18px;align-items:center;font-size:10px;color:#606b50;pointer-events:none}.status-dot{width:6px;height:6px;background:#6b8556;border-radius:50%;display:inline-block;margin-right:7px}.controls{display:flex;gap:18px}.controls span{display:flex;align-items:center;gap:7px}kbd{font:9px Arial,sans-serif;letter-spacing:1px;border:1px solid #929c7c55;padding:5px 6px;border-radius:4px;background:#faf5e7b0}.world-tag{white-space:nowrap}#save-status{font-size:8px;letter-spacing:1.5px}#quest-hud{position:absolute;top:123px;left:32px;width:252px;padding:21px 23px;background:#fcf8edeb;border:1px solid #fff9ed;border-radius:12px;box-shadow:0 6px 35px #564b2920}#quest-hud h2{font-family:var(--serif);font-size:23px;font-weight:normal;margin:10px 0 12px}#quest-line{font-size:12px;line-height:1.6;margin:0}.muted{font-size:10px;line-height:1.5;color:var(--muted)}#quest-english{font-size:13px;color:#5f5c50}.quest-track{height:3px;background:#e6e3d2;margin:16px 0 10px;border-radius:9px;overflow:hidden}.quest-track span{display:block;height:100%;background:#8a9c66;transition:width .5s}.tiny-star{color:#ba8c4a}#labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}.world-label{position:absolute;transform:translate(-50%,-100%);padding:5px 10px;background:#fff9e9e0;color:#5a604b;border:1px solid #fffff077;box-shadow:0 3px 8px #403d2020;border-radius:5px;font-size:10px;letter-spacing:.3px;white-space:nowrap;pointer-events:auto}.world-label:hover{background:white}.world-label .dot{color:#b98846;margin-right:4px}#interaction{position:absolute;bottom:98px;left:50%;transform:translateX(-50%)}#interact{background:#faf7ebf0;border:1px solid #fff;border-radius:10px;padding:11px 18px;box-shadow:0 4px 20px #453d3025;display:flex;align-items:center;gap:12px;white-space:nowrap}#interact kbd{background:#657854;color:#fff;border:0;font-size:12px}#interact-label{font-size:12px}.modal-backdrop{position:fixed;inset:0;background:#393e3055;backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;z-index:20;padding:24px}.creator-panel{display:grid;grid-template-columns:.9fr 1.1fr;background:var(--cream);border-radius:20px;max-width:800px;width:100%;max-height:92vh;overflow:auto;box-shadow:0 24px 100px #30352250}.creator-left{position:relative;background:linear-gradient(160deg,#e6e7d4,#d4dcc0);padding:36px 30px 10px;border-radius:20px 0 0 20px}.creator-left h2{font-family:var(--serif);font-size:43px;font-weight:normal;letter-spacing:-1.5px;margin:17px 0 13px}.creator-left p{font-size:11px;line-height:1.7;color:#6f785f}#avatar-preview{width:100%;height:255px;display:block}.preview-caption{display:block;text-align:center;font-size:8px;letter-spacing:3px;color:#7a8665;padding-bottom:20px}form{padding:36px 30px;display:flex;flex-direction:column;gap:18px}label,legend{display:block;font-size:11px;font-weight:bold}input,select{width:100%;padding:12px 10px;border:1px solid var(--line);border-radius:6px;background:#fffdf5;color:var(--ink);margin-top:8px;font-size:12px}fieldset{border:0;padding:0;margin:0}legend{margin-bottom:9px}.swatches{display:flex;gap:9px}.swatch{width:29px;height:29px;border:3px solid var(--cream);border-radius:50%;outline:1px solid transparent}.swatch[aria-pressed=true]{outline:2px solid #7d886a}.field-row{display:flex;gap:16px}.field-row>label{flex:1}.form-actions{display:flex;justify-content:space-between;gap:12px;margin-top:4px}.dialogue{position:fixed;bottom:65px;left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 40px));max-height:77vh;overflow:auto;background:var(--cream);padding:25px 30px 13px;border:1px solid #fffdf4;border-radius:17px;box-shadow:0 15px 75px #343b3540;z-index:15}.dialogue-top{display:flex;align-items:center;justify-content:space-between}.dialogue h2{font-family:var(--serif);font-weight:normal;font-size:26px;margin:3px 0}.dialogue .round{width:30px;height:30px;font-size:17px}.dialogue-top>div:last-child{display:flex;gap:6px}#target-line{font-family:var(--serif);font-size:25px;line-height:1.4;margin:15px 0 8px}.translation{font-size:17px;color:#5f5c50;line-height:1.5;margin:0 0 11px}.text-button{border:0;background:transparent;color:var(--green);font-size:13px;padding:4px 0;text-decoration:underline;text-underline-offset:3px}.choices{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.choice{flex:1;min-width:120px;padding:13px;background:#eef0e2;border:1px solid #dbe0c8;border-radius:8px;text-align:left;font-size:13px}.choice:hover{background:#e0e6ce}.choice small{display:block;font-size:14px;color:#5f5c50;margin-top:5px}.choice svg{width:45px;height:38px;display:block;margin-bottom:7px}.dialogue-foot{border-top:1px solid #e4e2d3;margin-top:16px;padding-top:10px;display:flex;justify-content:space-between;font-size:9px;color:#949783}#feedback{font-size:15px;line-height:1.6;color:#7c6447;margin:10px 0}.sheet{position:relative;background:var(--cream);padding:35px;border-radius:16px;max-width:580px;width:100%;max-height:88vh;overflow:auto;box-shadow:0 20px 80px #303a3044}.sheet .close{position:absolute;right:14px;top:14px}.sheet h2{font-family:var(--serif);font-size:36px;font-weight:normal;margin:13px 0 22px}.sheet h3{font-family:var(--serif);font-size:22px;font-weight:normal}.sheet p,.sheet li{font-size:13px;line-height:1.8;color:#757b65}.journal-item{padding:13px 0;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:15px}.journal-item small{display:block;color:#8a8b78;font-size:10px;margin-top:5px}.pill{border-radius:30px;padding:6px 9px;font-size:9px;background:#e5e9d8;color:#66764f}.inventory{display:flex;gap:10px;margin:16px 0}.inventory>div{background:#edeedd;border-radius:8px;padding:10px;flex:1;text-align:center;font-size:11px}.inventory svg{height:36px;width:45px;display:block;margin:auto}#toast{position:fixed;top:90px;left:50%;transform:translateX(-50%);background:#435a3bef;color:#fffbee;border-radius:30px;padding:12px 22px;box-shadow:0 5px 24px #24301925;z-index:40;font-size:12px;max-width:90vw;text-align:center}#loading{position:fixed;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#eee8d9;z-index:50}#loading p{color:#7f856c}#touch-controls{position:fixed;left:20px;bottom:70px;z-index:5;text-align:center}#touch-controls button{width:40px;height:40px;margin:2px;background:#fff8e5bd;border:1px solid #fff8e5;border-radius:9px;touch-action:none}#touch-controls div{display:flex}.error-message{max-width:460px;text-align:center;padding:20px;line-height:1.8}@media(max-width:800px){header{padding:18px 20px;gap:10px}.brand{font-size:21px}.brand-symbol{font-size:34px}.location{font-size:20px}.location small{font-size:7px;letter-spacing:1px}nav{gap:5px}.round{width:32px;height:32px}.welcome{left:7%;top:23%}h1{font-size:59px}#quest-hud{left:18px;top:98px;width:215px;padding:15px}.controls{display:none}footer{padding:18px}.creator-panel{max-width:640px}.creator-left{padding:25px 20px}.creator-left h2{font-size:35px}form{padding:25px 20px}.swatches{gap:5px}}@media(max-width:560px){.location{display:none}.welcome{top:22%}.welcome h1{font-size:55px}.welcome p{font-size:13px}.creator-panel{grid-template-columns:1fr;max-width:390px}.creator-left{padding:20px;border-radius:16px 16px 0 0;min-height:150px}.creator-left h2{font-size:27px;max-width:180px;margin:10px 0}.creator-left p{max-width:170px;margin-bottom:0}.creator-left .eyebrow{font-size:7px}#avatar-preview{position:absolute;right:0;bottom:0;width:160px;height:170px}.preview-caption{display:none}form{gap:13px;padding:20px}.dialogue{bottom:65px;padding:18px 20px 12px}#target-line{font-size:22px}.dialogue-foot{font-size:8px}#quest-hud{width:205px;top:85px;padding:12px 15px}#quest-hud h2{font-size:20px;margin:6px 0}.quest-track{margin:10px 0 0}footer #save-status{display:none}.world-tag{font-size:9px}.sheet{padding:25px}.world-label{font-size:9px}#interaction{bottom:84px}}
.illustrations{display:flex;gap:12px;flex-basis:100%;padding:8px 0}.illustrations>div{display:flex;align-items:center;gap:7px;font-size:11px;background:#eeeedf;padding:8px 12px;border-radius:9px}.illustrations svg{width:45px;height:36px}.glyphs{display:flex;gap:10px;flex-basis:100%;flex-wrap:wrap;padding:4px 0 8px}.glyphs>div{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:64px;padding:12px 14px 8px;background:#eeeedf;border-radius:12px;border:1px solid #dbe0c8}.glyphs .glyph{font-size:36px;line-height:1.1;color:#343e33}.glyphs .romaji{margin:6px 0 0;font-size:14px}.journal-routes{display:flex;flex-wrap:wrap;gap:7px}.journal-routes button{font-size:11px;padding:9px 12px}.welcome{isolation:isolate}.welcome:before{z-index:-1;background:radial-gradient(ellipse at 35% 50%,#eee8d5f5 0%,#eee8d5bc 46%,transparent 72%)}@media(max-width:560px){.illustrations{gap:5px}.illustrations>div{padding:5px;flex-direction:column;gap:3px}.choices .choice{min-width:80px}.glyphs>div{min-width:52px;padding:8px 10px 6px}.glyphs .glyph{font-size:28px}.location{display:none}}
#quest-hud{pointer-events:none}
[lang=ja]{font-family:"Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic","Meiryo","Noto Sans CJK JP","Noto Sans JP","Trebuchet MS",Arial,sans-serif;letter-spacing:.02em}h2[lang=ja],#target-line[lang=ja]{line-height:1.45}.romaji{display:block;font-size:15px;color:#5e6752;letter-spacing:.03em;margin:-4px 0 9px;font-style:italic}#quest-romaji{font-size:10px;margin:2px 0 0;font-style:italic}.choice small.romaji{margin-top:2px;color:#7f8a6c;font-style:italic}.illustrations .romaji{font-size:12px;margin:0;display:inline}.worlds{display:flex;gap:10px;margin:0 0 20px;flex-wrap:wrap}.world-card{flex:1;min-width:150px;display:flex;align-items:center;gap:10px;padding:12px 14px;background:#f9f4e7cc;border:1px solid var(--line);border-radius:10px;text-align:left;color:var(--ink);position:relative}.world-card:hover{background:#fffdf5}.world-card.selected{border-color:#6d8360;background:#fffdf5;box-shadow:0 0 0 2px #8a9c6650,0 5px 18px #3e4a2915}.world-card .world-symbol{font-size:24px;color:#ba8c4a;line-height:1}.world-card strong{display:block;font-size:13px}.world-card small{display:block;font-size:9px;letter-spacing:1px;color:#7d826d;margin-top:3px;text-transform:uppercase}.world-card em{display:block;font-style:normal;font-size:8px;letter-spacing:1px;text-transform:uppercase;color:#6d8360;margin-top:5px}#script-toggle{font-family:"Hiragino Sans","Yu Gothic","Meiryo","Noto Sans CJK JP","Noto Sans JP",sans-serif;font-size:17px;font-weight:bold;color:#536b47}@media(max-width:560px){.worlds{flex-direction:column}.world-card{min-width:0}.romaji{font-size:14px}}
@media(max-width:560px){.welcome{top:11%;max-height:86vh;overflow:auto;padding-right:16px}.welcome h1{font-size:46px;margin:14px 0}.welcome p{margin-bottom:16px}.worlds{gap:6px;margin-bottom:12px}.world-card{padding:9px 12px}.welcome-foot{margin-top:14px}}

.vignette{background:linear-gradient(180deg,rgba(236,210,150,.38),transparent 26%,transparent 72%,rgba(120,82,40,.22))}
.brand{font-family:var(--serif);font-weight:normal;letter-spacing:-.5px}
.brand-light{font-style:italic;font-weight:normal}
nav.toolbar{align-items:stretch}
.tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:64px;padding:8px 10px 6px;border:1px solid #fff6e4cc;background:#fbf4e4ee;border-radius:14px;box-shadow:0 4px 14px #5d4a2012;color:#5c5648}
.tool:hover{background:#fffaf0}
.tool-icon{font-size:16px;line-height:1}
.tool-label{font-size:8px;letter-spacing:.6px;text-transform:uppercase}
#quest-hud.parchment{top:108px;width:286px;padding:22px 26px 20px;background:linear-gradient(165deg,#fbf3e2 0%,#f3e4c4 100%);border:1px solid #e4d2a8;border-radius:18px 8px 16px 10px;box-shadow:0 12px 40px #5a431e18,inset 0 0 0 1px #fff8e8aa;position:absolute}
#quest-hud.parchment:after{content:'';position:absolute;right:14px;bottom:12px;width:42px;height:54px;background:radial-gradient(circle at 30% 30%,#8aa15f 0 6px,transparent 7px),radial-gradient(circle at 62% 48%,#c9784a 0 5px,transparent 6px),radial-gradient(circle at 48% 70%,#d7b15a 0 4px,transparent 5px);opacity:.55;pointer-events:none}
#quest-hud h2{font-size:26px;line-height:1.15;margin:8px 0 14px}
#quest-line{font-size:15px;line-height:1.55;color:#3f3a32}
#quest-english{font-size:13px;color:#6a6558;font-style:italic}
.controls{gap:10px}
.chip{background:#f7f0dce8;border:1px solid #efe6c8;border-radius:22px;padding:8px 12px;box-shadow:0 2px 8px #5d4a2010}
.dialogue{background:linear-gradient(180deg,#fbf6ea,#f4ead3);border:1px solid #efe3c4}
.world-label{background:#fbf4e4ee;border-radius:8px}
@media(max-width:800px){.tool{min-width:52px;padding:6px 7px}.tool-label{font-size:7px}#quest-hud.parchment{width:230px}}
@media(max-width:560px){.tool-label{display:none}.tool{min-width:40px;border-radius:50%;padding:8px}#quest-hud.parchment{width:210px;top:78px}}


/* Accounts. The panel borrows the creator's paper-and-ink treatment so signing
   in reads as part of the town rather than a form bolted onto it. */
.account-panel{position:relative;width:min(420px,92vw);max-height:88vh;overflow:auto;padding:30px 32px 26px;background:linear-gradient(170deg,#fbf6ea,#f3e8d0);border:1px solid #e6d8b6;border-radius:18px 10px 16px 12px;box-shadow:0 18px 60px #4a381828,inset 0 0 0 1px #fffaf0aa;color:var(--ink)}
.account-panel h2{font-family:var(--serif);font-size:30px;line-height:1.1;margin:6px 0 10px}
.account-panel p{font-size:14px;line-height:1.55;margin:0 0 16px;color:#5b5648}
.account-panel label{display:block;font-size:11px;letter-spacing:.7px;text-transform:uppercase;color:#6d6a5b;margin-bottom:12px}
.account-panel input{display:block;width:100%;margin-top:5px;padding:10px 12px;font:inherit;font-size:15px;text-transform:none;letter-spacing:normal;color:var(--ink);background:#fffdf6;border:1px solid #e0d3b2;border-radius:9px}
.account-panel input:focus{outline:2px solid #8a9c66;outline-offset:1px}
.account-panel .form-actions{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:nowrap;margin-top:4px}
#account-secondary{flex:0 1 auto;background:none;border:none;box-shadow:none;padding:4px 0;font-size:13px;color:#5f6b4f;text-decoration:underline;text-underline-offset:3px}
#account-secondary:hover{color:#3f4a33}
#account-submit{flex:0 0 auto;white-space:nowrap}
.account-panel .round.close{position:absolute;top:12px;right:12px}
#account-message:empty{display:none}
#account-message{font-size:13px;margin:0 0 12px;color:#6d6a5b}
#account-message.bad{color:#9c4f3c}
#account-message.good{color:#4f6b45}
#account-links{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-top:12px;padding-top:12px;border-top:1px solid #e7dcc0}
#save-status.unsaved{opacity:.85;color:#9c6b3c}
@media(max-width:560px){.account-panel{padding:24px 20px 20px}.account-panel h2{font-size:25px}}
#account-oauth{margin:4px 0 0}
.oauth-button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:11px 14px;font:inherit;font-size:15px;color:#3c3a33;background:#fff;border:1px solid #ddd0ae;border-radius:10px;box-shadow:0 2px 8px #5d4a2012}
.oauth-button:hover{background:#fffdf6;border-color:#c9b88c}
.oauth-button svg{flex:0 0 auto}
#account-or{display:flex;align-items:center;gap:12px;margin:16px 0 4px}
#account-or:before,#account-or:after{content:'';flex:1;height:1px;background:#e7dcc0}
#account-or span{font-size:11px;letter-spacing:.8px;text-transform:uppercase;color:#8a8574}
.reward-note{padding:10px 12px;border-radius:9px;background:#e7ead8;color:#536b47!important}

/* 2026 game-feel pass: a warmer, more tactile shell around the 3D world. */
:root{--sunflower:#e7b451;--coral:#d67859;--teal:#4f8b82;--paper:#fff9eb;--deep-ink:#2f382f}
body:after{content:'';position:fixed;inset:0;pointer-events:none;z-index:0;background:linear-gradient(120deg,rgba(255,219,145,.08),transparent 45%,rgba(83,107,71,.05));transition:background 1.2s ease}
body[data-period=evening]:after{background:linear-gradient(120deg,rgba(229,153,102,.16),transparent 48%,rgba(94,83,121,.1))}
body[data-period=night]:after{background:linear-gradient(120deg,rgba(74,80,123,.18),transparent 48%,rgba(30,54,68,.13))}
header,.welcome,#quest-hud,#player-hud,#interaction,footer{z-index:5}
.location{padding:9px 15px 9px 12px;background:rgba(255,249,235,.78);border:1px solid rgba(255,255,255,.75);border-radius:18px;box-shadow:0 6px 24px rgba(83,66,31,.1);backdrop-filter:blur(8px)}
.location>span:nth-child(2){min-width:112px}
.world-clock{display:grid;grid-template-columns:auto auto;gap:2px 10px;margin-left:4px;padding-left:14px;border-left:1px solid #d9cfb6;font-family:'Trebuchet MS',Arial,sans-serif;line-height:1.2}
.world-clock strong{font-size:13px;letter-spacing:.2px;white-space:nowrap}
.world-clock>span{font-size:12px;color:#6f725f;white-space:nowrap}
.world-clock small{grid-column:1/-1;margin:0;font-size:9px;letter-spacing:1.3px;color:#8f8062}
.player-hud{position:absolute;right:35px;top:105px;display:flex;gap:8px;padding:7px;background:rgba(255,249,235,.82);border:1px solid rgba(255,255,255,.75);border-radius:16px;box-shadow:0 7px 24px rgba(66,53,30,.1);backdrop-filter:blur(8px)}
.player-hud .stat{display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;column-gap:7px;min-width:64px;padding:5px 9px;color:#59634e}
.player-hud .stat>span{grid-row:1/3;align-self:center;color:var(--sunflower);font-size:17px}
.player-hud .stat.coin>span{color:#cc8a35}
.player-hud .stat strong{font:700 15px/1 'Trebuchet MS',Arial,sans-serif;color:var(--deep-ink)}
.player-hud .stat small{font:9px/1.2 'Trebuchet MS',Arial,sans-serif;text-transform:uppercase;letter-spacing:.5px;color:#777664}
#friend-stat>span{color:var(--coral)}
.tool,.round,.primary,.secondary,.choice{transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease}
.tool:hover,.round:hover{transform:translateY(-2px);box-shadow:0 7px 16px rgba(80,59,25,.13)}
.tool:active,.round:active,.primary:active,.secondary:active,.choice:active{transform:translateY(1px) scale(.98)}
.tool-icon{font-size:19px}.tool-label{font-size:9px;font-weight:700}
#quest-hud.parchment{overflow:visible;transition:width .22s ease,padding .22s ease,transform .22s ease}
.quest-toggle{position:absolute;right:-11px;top:-11px;width:28px;height:28px;padding:0;border:2px solid #fff8e9;border-radius:50%;background:#657854;color:#fff;font-size:18px;line-height:1;box-shadow:0 4px 12px rgba(61,54,35,.18)}
#quest-hud.collapsed{width:48px;height:48px;padding:0;border-radius:50%;background:#f7e8c7}
#quest-hud.collapsed .quest-body,#quest-hud.collapsed:after{display:none}
#quest-hud.collapsed .quest-toggle{right:9px;top:9px}
.quest-track{height:7px;border-radius:12px;background:rgba(113,104,75,.14)}
.quest-track span{background:linear-gradient(90deg,#7f9a67,#e0b14f);border-radius:12px}
.dialogue{width:min(720px,calc(100% - 42px));padding:22px 28px 15px;border:2px solid rgba(255,255,255,.82);box-shadow:0 20px 70px rgba(47,50,41,.28),inset 0 0 0 1px rgba(221,199,149,.42);animation:dialogue-in .22s ease-out}
@keyframes dialogue-in{from{opacity:0;transform:translate(-50%,12px) scale(.985)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
.speaker-lockup{display:flex;align-items:center;gap:13px}
.speaker-avatar,.person-avatar{display:grid;place-items:center;flex:0 0 auto;width:48px;height:48px;border:3px solid #fff9e9;border-radius:50%;background:linear-gradient(145deg,#7e9a6c,#536b47);box-shadow:0 4px 12px rgba(51,68,45,.2);font:700 21px/1 var(--serif);color:#fff}
.dialogue h2{font-size:29px}.dialogue-actions{display:flex;gap:7px}
.audio-button{background:#657854;color:#fff;border-color:#819172}.audio-button:hover{background:#4e663f}
#target-line{font-size:28px;color:#2e382e;margin-top:18px}
.translation{font-size:16px}
.help-button{display:inline-flex;padding:8px 11px;margin:1px 0 4px;border-radius:9px;background:#ebe9d7;text-decoration:none;font-weight:700;color:#536b47}
.help-button:hover{background:#dde2cc}
.choice{position:relative;min-height:68px;padding:13px 15px;background:#f0f2e3;border:2px solid #dce2c9;border-radius:13px;font-size:16px;font-weight:700;box-shadow:0 3px 0 #d2d6c0}
.choice:hover{background:#e5ecd3;border-color:#9eaf7c;transform:translateY(-2px);box-shadow:0 6px 0 #d2d6c0}
.choice.correct{background:#dce9c9;border-color:#7e9b65;box-shadow:0 3px 0 #bdd0a5}.choice.correct:after{content:'✓';position:absolute;right:10px;top:8px;color:#587546;font-size:18px}.choice.wrong{background:#f4dfd6;border-color:#cf8b72;box-shadow:0 3px 0 #e4bba9;animation:choice-shake .24s ease}.choice.wrong:after{content:'Try another';position:absolute;right:9px;top:7px;color:#9f604c;font-size:10px;text-transform:uppercase;letter-spacing:.5px}@keyframes choice-shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
.choice svg{width:56px;height:44px}
.activity-ribbon{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:16px;margin:-23px -29px 17px;padding:11px 18px;background:linear-gradient(90deg,#5e7965,#48685f);border-radius:16px 16px 0 0;color:#fff8e9;font-size:11px;letter-spacing:1.1px}
.activity-ribbon strong{font-size:12px}.activity-ribbon span:last-child{color:#f2ca6c;letter-spacing:4px}
.dialogue.cafe-mode{border-color:#d7b36a}.dialogue.cafe-mode .speaker-avatar{background:linear-gradient(145deg,#c98b50,#865b3e)}
.listening-state{display:flex;align-items:center;gap:12px;margin:18px 0 13px;padding:16px;background:#e7ecdc;border:1px solid #d5ddc5;border-radius:14px;color:#4c5c46}
.listening-state strong{font-size:16px}.listening-state>span:last-child{font-size:13px;color:#707a68}
.sound-wave{display:flex;align-items:center;gap:3px;height:25px}.sound-wave i{display:block;width:4px;height:8px;border-radius:5px;background:#708b61;animation:wave .8s ease-in-out infinite alternate}.sound-wave i:nth-child(2){height:20px;animation-delay:.15s}.sound-wave i:nth-child(3){height:14px;animation-delay:.3s}.sound-wave i:nth-child(4){height:23px;animation-delay:.45s}
@keyframes wave{to{transform:scaleY(.45);opacity:.55}}
.journal-summary{display:flex;justify-content:space-between;gap:18px;padding:15px 17px;margin:-4px 0 17px;border:1px solid #e4d7b9;border-radius:13px;background:#f3ead7}
.journal-summary>div{display:flex;flex-direction:column;gap:5px}.journal-summary>div:last-child{text-align:right}.journal-summary strong{font-size:15px}.journal-summary small{font-size:12px;color:#777464}
.journal-tabs{display:flex;gap:5px;overflow-x:auto;padding:0 0 12px;border-bottom:1px solid #e3d8bd}
.journal-tabs button{min-width:max-content;padding:9px 12px;border:0;border-radius:10px;background:transparent;color:#737664;font-weight:700;font-size:13px}
.journal-tabs button.active{background:#687d58;color:#fff}
.journal-panel{display:none;padding-top:10px;animation:panel-in .18s ease}.journal-panel.active{display:block}
@keyframes panel-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.story-card{padding:17px 18px;margin:18px 0;border:1px solid #dfd2b3;border-radius:14px;background:linear-gradient(145deg,#faf0d9,#f2e3bf)}
.story-card h3{margin:5px 0 9px}.story-card p{margin:7px 0}
.person-card{display:flex;gap:14px;align-items:center;padding:15px;border:1px solid #e0d8c2;border-radius:14px;background:#f8f2e5}.person-card>div{flex:1;display:flex;flex-direction:column;gap:5px}.person-card small{font-size:12px;color:#777464}.friend-meter{height:7px;overflow:hidden;border-radius:8px;background:#e8dfcf}.friend-meter span{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#d98363,#e6b054)}
.reward-toast{position:fixed;top:102px;left:50%;z-index:45;display:flex;align-items:center;gap:13px;min-width:330px;padding:15px 19px;border:2px solid #f7e1a4;border-radius:17px;background:linear-gradient(145deg,#fff8df,#f4e2af);box-shadow:0 15px 50px rgba(77,57,24,.25);transform:translateX(-50%);animation:reward-pop .45s cubic-bezier(.2,1.45,.4,1)}
.reward-toast[hidden]{display:none}.reward-spark{font-size:28px;color:#d39833}.reward-toast div{display:flex;flex-direction:column;gap:3px}.reward-toast strong{font:normal 21px/1.1 var(--serif)}.reward-toast div span{font-size:12px;color:#74664e}
@keyframes reward-pop{from{opacity:0;transform:translate(-50%,-12px) scale(.85)}to{opacity:1;transform:translate(-50%,0) scale(1)}}

@media(max-width:980px){header{align-items:flex-start}.location{position:absolute;top:92px;left:20px}.player-hud{top:92px}.tool-label{display:none}.tool{min-width:42px;width:42px;height:42px;padding:8px;border-radius:50%}#quest-hud.parchment{top:157px}}
@media(max-width:680px){header{padding:13px 14px}.brand{font-size:19px}.brand small{display:none}.toolbar{margin-left:auto}.toolbar .tool:nth-of-type(4),.toolbar .tool:nth-of-type(5){display:none}.location{top:70px;left:12px;right:12px;justify-content:center;padding:8px 10px}.location>span:nth-child(2){min-width:95px}.world-clock{margin-left:auto}.world-clock strong{font-size:12px}.player-hud{right:12px;top:130px;padding:4px}.player-hud .stat{min-width:51px;padding:4px 6px;column-gap:5px}.player-hud .stat small{font-size:8px}#quest-hud.parchment{left:12px;top:191px;width:218px}.dialogue{bottom:10px;width:calc(100% - 16px);max-height:70vh;padding:18px 16px 12px;border-radius:19px}.activity-ribbon{margin:-19px -17px 14px;padding:10px 13px;gap:8px}.activity-ribbon span:first-child{display:none}.speaker-avatar{width:40px;height:40px;font-size:18px}.dialogue h2{font-size:24px}#target-line{font-size:23px}.choices{display:grid;grid-template-columns:1fr 1fr}.choice{min-width:0;font-size:15px}.listening-state{align-items:flex-start;flex-wrap:wrap;padding:12px}.listening-state>span:last-child{flex-basis:100%;padding-left:38px}.journal-summary{flex-direction:column}.journal-summary>div:last-child{text-align:left}.sheet{width:calc(100% - 16px);max-height:92vh;padding:24px 18px}.reward-toast{top:75px;min-width:0;width:calc(100% - 28px)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

.practice-actions,.practice-surface{display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}.practice-prompt{font-size:24px!important;color:var(--ink)!important}.phrase-output{flex-basis:100%;min-height:50px;padding:12px;background:#e7ead8;border-radius:10px}.practice-table{display:flex;flex-basis:100%;gap:15px;padding:25px 16px;background:#cda97b;border:5px solid #aa8258;border-radius:35px}.table-place{flex:1;min-height:90px;border:2px dashed #fff4d4;border-radius:50%;background:#f7ebd1;font-size:25px}.practice-surface .choice[aria-pressed=true]{outline:3px solid #536b47}.practice-actions button{min-height:44px}#quest-toggle{pointer-events:auto}

/* Keep the screen edges consistent with the actual world lighting. */
body[data-period=night] .vignette{background:linear-gradient(180deg,rgba(12,23,49,.25),transparent 26%,transparent 72%,rgba(9,17,37,.22))}
body[data-period=evening] .vignette{background:linear-gradient(180deg,rgba(162,101,96,.2),transparent 26%,transparent 72%,rgba(41,34,66,.18))}

/* Large kana remain readable on touch screens and at browser zoom. */
.kana-card{display:flex;flex-direction:column;align-items:center;gap:12px;background:#edf0df;border-radius:16px;padding:24px;text-align:center}
.kana-card span{font-size:clamp(36px,9vw,64px);line-height:1.5;color:#344e3e}
.kana-card strong{font-size:22px;color:#485e42}
.kana-choices{display:flex;flex-wrap:wrap;gap:12px}
.kana-choices .choice{font-size:36px;text-align:center;min-height:76px;min-width:80px}
.practice-surface .choice:focus-visible,.kana-card~button:focus-visible{outline:3px solid #496a48;outline-offset:3px}
