@font-face{font-family:'Gaegu';font-style:normal;font-weight:400;font-display:swap;src:url('assets/fonts/Gaegu-Regular.woff2') format('woff2')}
@font-face{font-family:'Gaegu';font-style:normal;font-weight:700;font-display:swap;src:url('assets/fonts/Gaegu-Bold.woff2') format('woff2')}
:root{font-family:'Gaegu',sans-serif;color:#3b3934;font-synthesis:none;background:#dfc7ad}*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:4px solid #eac876;outline-offset:4px}button:disabled{cursor:default}[hidden]{display:none!important}#game{position:relative;height:100dvh;min-height:640px;overflow:hidden}#world{position:absolute;inset:0}#world canvas{display:block;width:100%;height:100%}#music{position:absolute;top:22px;right:24px;z-index:8;border:1px solid #ffffff80;background:#fff7e9e8;border-radius:30px;padding:11px 18px;font-size:13px;font-weight:600;color:#526c62;box-shadow:0 4px 15px #604b4010}#hud{position:absolute;left:24px;top:22px;display:flex;gap:16px;align-items:center;background:#fff8eaeF;border-radius:30px;padding:10px 20px;box-shadow:0 4px 18px #604b4018;font-size:13px}.heart{color:#ca7967;margin-right:5px;font-size:20px}.heart.empty{color:#d9d2c5}.score strong{font-size:20px;margin-left:8px}.speech{position:absolute;top:17%;left:50%;transform:translateX(-50%);width:min(680px,84%);padding:19px 28px;background:#fffbf1f5;border:1px solid #fff;border-radius:22px;box-shadow:0 8px 30px #64493921}.speech:after{content:'';position:absolute;bottom:-12px;left:50%;border-left:12px solid transparent;border-right:12px solid transparent;border-top:14px solid #fffbf1}.speech p{margin:0;font-size:clamp(16px,1.5vw,20px);line-height:1.8;font-weight:500;word-break:keep-all}#answer-panel{position:absolute;bottom:28px;left:50%;transform:translateX(-50%);width:min(860px,92%);padding:16px 20px 20px;border-radius:24px;background:#fcf7edeF;box-shadow:0 10px 40px #5e493c26}#hint{margin:0 0 13px;text-align:center;font-size:14px;line-height:1.6}#answers{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.answer{min-height:64px;border:1px solid #d6d5c8;border-radius:15px;background:#fffdf7;color:#3f554e;font-weight:700;font-size:21px;box-shadow:0 4px 0 #d8d8ca;transition:transform .18s,background .18s}.answer:hover:not(:disabled){transform:translateY(-3px);background:#e8eee2}.answer small{font-size:10px;display:inline-block;margin-right:8px;color:#91978a}.correct{background:#cae4ce;border-color:#79a685}.wrong{background:#f0c8ba;border-color:#d79279}.overlay{position:absolute;inset:0;z-index:5;display:grid;place-items:center;background:linear-gradient(#e4cdbb30,#d7b79b30)}.title-card{text-align:center;margin-top:-5vh;padding:52px 68px 58px;border-radius:38px;background:#fff9ecd9;box-shadow:0 25px 90px #66493926;backdrop-filter:blur(8px)}h1{font-size:clamp(40px,6vw,78px);letter-spacing:-.06em;margin:0 0 36px;font-weight:900;color:#3a665f;text-shadow:0 3px #fff6db}.primary{border:0;border-radius:16px;padding:17px 32px;background:#467c70;color:#fff8e8;box-shadow:0 5px 0 #315b51;font-size:19px;font-weight:700;min-width:190px}.primary:hover{background:#376e62}.ending-card{max-width:600px;width:90%;background:#fff8ec;padding:38px;text-align:center;border-radius:30px;box-shadow:0 25px 90px #66493930}.ending-card h1{font-size:44px;margin:10px 0 18px}.ending-card p{line-height:1.8;word-break:keep-all}.end-icon{font-size:54px}.receipt{border-top:1px dashed #baad95;border-bottom:1px dashed #baad95;padding:16px;margin:24px 0}.receipt strong{display:block;font-size:36px;color:#467c70}.receipt p{font-size:14px}dialog{border:0;border-radius:28px;padding:38px;max-width:min(640px,92vw);box-shadow:0 22px 100px #382b4050;background:#fff9ef;color:#3b3934;text-align:center}dialog::backdrop{background:#34372f60;backdrop-filter:blur(4px)}dialog h2{font-size:32px;margin:0 0 18px;letter-spacing:-.04em}dialog p{line-height:1.9;word-break:keep-all}dialog .primary{margin-top:10px}#meaning{padding:0;width:640px;overflow:hidden;max-height:90dvh}#scene{height:210px;background:linear-gradient(135deg,#e4d5c0,#c8d6c5);display:grid;place-items:center}#scene canvas{max-width:100%;height:210px}.meaning-text{padding:26px 32px}#word-kind{font-size:12px;color:#687a6e}#word{margin:7px 0 8px;font-size:37px}#definition{font-size:18px;margin:8px 0}#example{font-size:14px;color:#777363;margin:12px 0} @media(max-width:600px){#game{min-height:690px}#music{top:14px;right:12px;font-size:11px;padding:9px 11px}#hud{top:14px;left:12px;gap:8px;padding:7px 12px;font-size:11px}.heart{font-size:16px}.score strong{font-size:17px;margin-left:2px}.speech{top:13%;width:91%;padding:17px 20px}.speech p{font-size:16px;line-height:1.7}#answer-panel{bottom:18px;padding:15px;width:94%}#answers{grid-template-columns:repeat(2,1fr);gap:10px}.answer{min-height:55px;font-size:18px}#hint{font-size:12px}.title-card{padding:40px 30px}.title-card h1{font-size:46px}.primary{font-size:17px;min-width:170px}dialog{padding:26px}#scene{height:160px}#scene canvas{height:160px}.meaning-text{padding:20px}#word{font-size:30px}#definition{font-size:16px}#example{font-size:12px}.ending-card{padding:24px}.ending-card h1{font-size:36px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* The answers stand on their own, without an instruction row. */
#answer-panel{padding:20px}#hint[hidden]+#answers{margin:0}.answer small{display:none}@media(max-width:600px){#answer-panel{padding:15px}}

/* Larger handwritten type and direct two-dimensional explanation illustrations. */
.speech p{font-size:25px;line-height:1.55}.answer{font-size:28px}.primary{font-size:25px}#hint{font-size:21px}#word{font-size:44px}#definition{font-size:25px;line-height:1.5}#example{font-size:24px;line-height:1.55;color:#4f6258;background:#eaf0df;border-radius:12px;padding:12px 16px;margin:16px 0}#word-kind{font-size:17px}#scene{height:240px;background:#eee6d1}#scene>svg{width:100%;height:100%;display:block}.meaning-text{padding:20px 28px}dialog p{font-size:23px}.score,#music{font-family:'Gaegu',sans-serif;font-size:18px}.ending-card p{font-size:23px}.receipt p{font-size:21px}@media(max-width:600px){.speech p{font-size:23px;line-height:1.4}.answer{font-size:26px}.primary{font-size:24px}#scene{height:190px}#word{font-size:37px}#definition{font-size:22px}#example{font-size:22px;line-height:1.45;padding:10px 12px}#hint{font-size:20px}.meaning-text{padding:16px 20px}#music,.score{font-size:15px}#meaning{overflow:auto}.title-card h1{font-size:50px}}

#meaning{overflow:auto}@media(min-width:601px){.speech{top:12%}}

/* Meaning cards keep the illustration and its short reading cue together. */
#scene{height:270px;background:#f2ecdf}#scene>svg{max-width:640px}@media(max-width:600px){#scene{height:190px}}

#signature{position:absolute;right:16px;bottom:5px;z-index:9;font-size:19px;font-weight:700;color:#486258;text-shadow:0 1px 3px #fff9ef;pointer-events:none}@media(max-width:600px){#signature{right:12px;bottom:2px;font-size:16px}#answer-panel{bottom:26px}}

#hint{margin:16px 0 0;padding-top:12px;border-top:1px solid #d8d7c8;text-align:center;word-break:keep-all}#hint[hidden]{margin:0;padding:0;border:0}

#result-message{white-space:pre-line;text-align:center;text-wrap:balance;}

/* Ten visitors, earned rewards, and a closing metal shutter. */
#hud{z-index:4;border-radius:20px;gap:18px}.heart{display:inline-block;font-size:28px;color:#d84c55}.heart.empty{color:#514944}.score{position:relative}#sales-meter{display:block;width:150px;height:9px;accent-color:#467c70}#visitor{font-size:18px}#magnifier{position:absolute;z-index:8;right:24px;top:80px;border:1px solid #b6a177;border-radius:16px;padding:10px 15px;background:#fff2ca;color:#3a665f;font-size:21px}#magnifier:disabled{opacity:.55}.answer.vanished{visibility:hidden;pointer-events:none}.box-stamp{display:inline-block;color:#977044}.stamped .box-stamp{animation:stamp .45s ease-out}.stamped strong{animation:pop .45s ease-out}.recovered{animation:pop .6s}#danger{pointer-events:none;position:absolute;inset:0;z-index:12;opacity:0;box-shadow:inset 0 0 100px 35px #d62236}.flash{animation:danger 1s}#reward{position:absolute;z-index:15;top:50%;left:50%;pointer-events:none;transform:translate(-50%,-50%);text-align:center}.heart-reward{font-size:160px;color:#e72e48;text-shadow:0 0 35px #fff0cc;animation:heartbeat 1s}.heart-reward.fly{animation:fly .65s ease-in forwards}.hint-reward{white-space:nowrap;background:#fff2ca;padding:22px 30px;border-radius:24px;font-size:32px;color:#3a665f;animation:pop .5s}#rank-title{font-size:30px;color:#967037;margin:18px 0 8px}#rank-message{margin:0;text-wrap:balance}#ending{z-index:10;overflow:auto;padding:24px 0}.ending-card h1{font-size:40px}.ending-card p{margin:10px 0;font-size:22px}.receipt{margin:16px 0;padding:10px}#restart{max-width:100%;text-wrap:balance}#ending.shutter{background:repeating-linear-gradient(0deg,#9eaaa9 0px,#b8c2bf 7px,#d0d6d1 30px,#768682 32px,#65736f 34px);animation:shutter 1.45s cubic-bezier(.35,0,.75,1)}.shutter .ending-card{background:#edf0e7eF;border:2px solid #768682;box-shadow:0 10px 30px #263f3a40;animation:reveal 1.65s}.shutter #result-title{display:inline-block;border:5px double #a73530;border-radius:5px;color:#a73530;padding:8px 25px;transform:rotate(-4deg);text-shadow:none;animation:seal 1.8s}.shutter #rank-title{color:#68583c}@keyframes shutter{from{transform:translateY(-105%)}to{transform:translateY(0)}}@keyframes reveal{0%,85%{opacity:0}100%{opacity:1}}@keyframes seal{0%,80%{opacity:0;transform:scale(1.8) rotate(-4deg)}100%{opacity:1;transform:scale(1) rotate(-4deg)}}@keyframes stamp{from{transform:scale(2.4);opacity:.2}to{transform:scale(1);opacity:1}}@keyframes pop{50%{transform:scale(1.15)}}@keyframes heartbeat{25%,65%{transform:translate(-50%,-50%) scale(1.35)}45%,85%{transform:translate(-50%,-50%) scale(1)}}@keyframes fly{to{transform:translate(calc(-50% + var(--fly-x)),calc(-50% + var(--fly-y))) scale(.12);opacity:0}}@keyframes break-heart{30%{transform:rotate(20deg) scale(1.4);filter:blur(1px)}100%{transform:translateY(-20px) scale(.3);opacity:0;filter:blur(5px)}}@keyframes danger{0%,45%,85%{opacity:0}20%,65%{opacity:.85}100%{opacity:0}}
@media(max-width:600px){#hud{left:10px;top:12px;gap:10px;padding:7px 10px;max-width:calc(100% - 100px);flex-wrap:wrap}#visitor{font-size:15px}.heart{font-size:22px}#sales-meter{width:100px}#magnifier{top:75px;right:10px;font-size:17px;padding:8px 12px}.speech{top:21%;padding:14px 18px}.speech p{font-size:21px}.ending-card{padding:20px}.ending-card p{font-size:20px}#rank-title{font-size:26px}.hint-reward{font-size:25px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important}#danger{display:none}}

/* Readable status cards and a distinct earned title. */
#hud{background:none;box-shadow:none;padding:0;gap:10px;align-items:stretch}.life-card,#sales,#visitor{background:#fff9ecf5;border:2px solid #e1d6bc;border-radius:18px;box-shadow:0 4px 0 #ad9b7930;padding:8px 16px}.hud-label{display:block;font-size:16px;color:#806857}.heart{font-size:26px;margin:0 3px 0 0}#sales{color:#335f54;font-size:20px}#sales strong{font-size:27px}#visitor{display:flex;align-items:center;font-size:20px;color:#765931;font-weight:700}#magnifier{background:#fff0bf;border:2px solid #c5a45e;box-shadow:0 4px 0 #9f7d3930;color:#5d4b2a;font-weight:700}#magnifier:disabled{opacity:.65}.rank-badge{display:inline-block;max-width:100%;padding:14px 30px;margin:10px 0 14px;background:linear-gradient(135deg,#f8e7ae,#fff5d4);border:3px double #b98d36;border-radius:18px;box-shadow:0 5px 0 #bb934827}.rank-label{font-size:17px;color:#8f6e33}.rank-badge #rank-title{margin:4px 0 0;font-size:29px;color:#664b1e}.help-reward{font-size:125px;filter:drop-shadow(0 0 22px #ffe697)}#story,#hint,#rank-message,#definition,#example{white-space:pre-line;text-wrap:pretty;word-break:keep-all}.ending-card p{line-height:1.5}#greeting p{line-height:1.6}#ending{padding:16px 0}.ending-card{margin:auto}#music{z-index:11}
@media(max-width:600px){
 #game{min-height:100svh;height:auto;min-height:100dvh;display:flex;flex-direction:column;padding:115px 12px 30px;gap:10px}#world{position:relative;inset:auto;order:2;height:clamp(220px,35svh,330px);flex:none;margin:0 -12px}#world canvas{border-radius:0}#hud{position:absolute;top:10px;left:10px;right:10px;max-width:none;display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;padding:0;flex-wrap:nowrap}#hud .life-card,#sales,#visitor{padding:6px 8px;border-radius:13px;text-align:center;min-width:0}.hud-label{font-size:14px}.heart{font-size:22px;margin-right:1px}#sales{font-size:15px}#sales strong{font-size:22px;margin-left:2px}#sales-meter{width:100%;height:7px}#visitor{font-size:17px;justify-content:center}#music{top:80px;right:12px;font-size:15px;padding:5px 12px}#magnifier{top:80px;left:12px;right:auto;font-size:17px;padding:5px 14px}#stage{position:relative;order:1;top:auto;left:auto;transform:none;width:100%;padding:12px 16px;margin:0;background:#fffaf0;border-radius:18px}.speech p{font-size:21px;line-height:1.4}.speech:after{display:none}#answer-panel{position:relative;order:3;left:auto;bottom:auto;transform:none;width:100%;padding:12px;margin:0}#answers{gap:10px}.answer{min-height:48px;font-size:24px}#hint{font-size:20px;line-height:1.4}#reward{position:fixed}#danger{position:fixed}#start-screen,#ending{position:fixed;min-height:100dvh}.title-card{margin:0}.ending-card{padding:20px;width:92%}.ending-card h1{font-size:32px;margin:8px 0 12px}.ending-card p{font-size:20px}.rank-badge{padding:10px 18px;margin:8px 0}.rank-badge #rank-title{font-size:25px}#restart{font-size:21px;padding:12px 20px}#signature{position:fixed}dialog{max-height:92dvh;overflow:auto}#greeting{padding:22px}#greeting p{font-size:21px}.receipt{margin:12px 0;padding:8px}
}
@media(min-width:601px){#stage{top:130px;left:24px;transform:none;width:min(360px,32vw);max-height:calc(100dvh - 310px);overflow:auto;padding:20px 24px}.speech p{font-size:23px;line-height:1.5}.speech:after{display:none}}

/* A small drawn magnifier matches the shop's quiet palette. */
.glass-icon{display:inline-block;position:relative;width:18px;height:18px;border:3px solid #816843;border-radius:50%;background:#d7e7dbb0;margin-right:9px;vertical-align:middle;box-shadow:inset 2px 2px 0 #fff9}.glass-icon:after{content:'';position:absolute;width:10px;height:4px;background:#816843;border-radius:3px;right:-8px;bottom:-5px;transform:rotate(45deg)}.help-reward{width:150px;height:150px;display:grid;place-items:center;background:#fff7dcdf;border:2px solid #d4b66e;border-radius:50%;box-shadow:0 0 35px #ffeec0}.help-reward .glass-icon{width:75px;height:75px;border-width:9px;margin:0 10px 10px 0}.help-reward .glass-icon:after{width:38px;height:11px;right:-27px;bottom:-14px}#story{white-space:normal}
@media(max-width:600px){
 #game{display:block;height:100dvh;min-height:580px;padding:0;overflow:hidden}#world{position:absolute;inset:0;height:100%;margin:0}#stage{position:absolute;top:123px;left:12px;width:calc(100% - 24px);max-height:26dvh;overflow:auto;padding:10px 14px;background:#fffaf0ed}.speech p{font-size:19px;line-height:1.38}#answer-panel{position:absolute;bottom:25px;left:12px;width:calc(100% - 24px);padding:10px;background:#fffaf0ed}#answers{gap:8px}.answer{min-height:45px;font-size:23px}#hint{font-size:18px;line-height:1.3;max-height:16dvh;overflow:auto;margin-top:8px;padding-top:8px}#reward{position:fixed}#world canvas{height:100%}
}

/* Quiet, legible award and help controls. */
.rank-badge{display:block;position:relative;background:#edf3ed;border:0;border-left:5px solid #547b69;border-radius:8px;padding:17px 20px;margin:20px auto 16px;box-shadow:none;max-width:420px}.rank-label{display:block;font-family:system-ui,sans-serif;font-size:12px;font-weight:600;letter-spacing:.14em;color:#62766a}.rank-badge #rank-title{font-family:system-ui,sans-serif;font-size:26px;letter-spacing:-.055em;line-height:1.35;font-weight:750;color:#315d4a;margin-top:8px}.shutter .rank-badge{background:#e3ece4}.shutter #rank-title{color:#315d4a}#restart{white-space:pre-line;line-height:1.4}#magnifier{display:flex;align-items:center;gap:12px;background:#fff9ed;border:1px solid #b9c6b6;border-radius:12px;padding:9px 14px;box-shadow:0 3px 0 #b2bfa53b;color:#3d6352}#magnifier:disabled{opacity:.6}.help-label{font-size:20px}.help-count{display:grid;place-items:center;min-width:25px;height:25px;padding:0 5px;border-radius:8px;background:#547b69;color:#fff;font:700 15px system-ui,sans-serif}#magnifier:enabled:hover{background:#e9f0e6}.box-stamp{display:none}@media(max-width:600px){#magnifier{top:82px;padding:5px 12px;gap:10px}.help-label{font-size:17px}.help-count{min-width:22px;height:22px;font-size:13px}.rank-badge{padding:15px 16px;margin:16px auto}.rank-badge #rank-title{font-size:23px}}

/* Soft pastel shop stationery, with hand-drawn vector rewards. */
:root{background:#fff2e4;color:#405b53}#music,.life-card,#sales,#visitor{background:#fffdf3;border-color:#efdbc5;box-shadow:0 3px 0 #e8cdb335}.speech,#stage,#answer-panel{background:#fffdf3f2;border-color:#fff9e5}.answer{background:#fffefa;border-color:#c8ded2;box-shadow:0 4px 0 #c4dacb;color:#48685d}.answer:hover:not(:disabled){background:#edf9e9}.answer.correct{background:#d5efcb}.answer.wrong{background:#f9d9d8}.primary{background:#75ac99;box-shadow:0 5px 0 #4c8876}.primary:hover{background:#609d87}.title-card,.ending-card,dialog{background:#fffbee}.rank-badge{background:#e8f5e9;border-left-color:#8cbaa5}#magnifier{background:#fff4da;border-color:#edcf9b;border-radius:18px;box-shadow:0 3px 0 #ecd5b33b}.help-count{background:#8cbaa5}.heart{width:26px;height:28px;color:#f293ab;vertical-align:middle;font-size:0}.heart svg{display:block;width:100%;height:100%}.heart.empty{color:#f2e5df}.heart.empty svg{opacity:.45}.heart-reward{width:155px;height:155px;color:#f18ca8;font-size:0}.heart-reward>svg{width:100%;height:100%;filter:drop-shadow(0 5px 0 #cd6e8325)}.help-reward{background:transparent;border:0;box-shadow:none;filter:drop-shadow(0 0 18px #fff6d0)}@media(max-width:600px){.heart{width:22px;height:24px;margin-right:2px}#stage,#answer-panel{background:#fffdf3f0}}

/* Flat word tiles and a keepsake-style title medal. */
.answer,.answer:hover:not(:disabled),.answer:active{box-shadow:none;background-image:none;text-shadow:none;filter:none}.answer{border:2px solid #c8ded2}.rank-badge{max-width:450px;border:2px solid #e5c797;border-radius:24px;background:#fff5db;box-shadow:0 5px 0 #e8cda740;padding:13px 20px 18px;text-align:center;margin:12px auto}.award-mark{width:76px;height:76px;margin:-5px auto 3px}.award-mark svg{width:100%;height:100%}.rank-label{font-family:'Gaegu',sans-serif;font-size:19px;letter-spacing:0;color:#9a7545}.rank-badge #rank-title,.shutter .rank-badge #rank-title{font-family:'Gaegu',sans-serif;font-size:35px;font-weight:700;letter-spacing:-.035em;line-height:1.15;color:#805828;margin:5px 0 0}.rank-badge.skilled{background:#fff2d2;border-color:#d9b267}.rank-badge.legendary{background:linear-gradient(140deg,#fff1b4,#fff8df,#ffe4b2);border:3px double #bb8e30}.legendary .award-mark{filter:drop-shadow(0 0 8px #e5b95170)}.rank-badge.legendary #rank-title{color:#965d20}.shutter .rank-badge{background:#fff3d8}#auto-next{font-size:18px;color:#7f8b75;margin:14px 0 0}#auto-next:after{content:'';display:block;height:4px;width:100%;border-radius:8px;background:#b8d6be;margin-top:12px;transform-origin:left;animation:reading-time 5.2s linear forwards}@keyframes reading-time{to{transform:scaleX(0)}}@media(max-width:600px){.award-mark{width:60px;height:60px}.rank-badge{padding:10px 14px 14px;margin:10px auto}.rank-badge #rank-title,.shutter .rank-badge #rank-title{font-size:29px}.rank-label{font-size:17px}.ending-card{padding:17px}.ending-card p{font-size:19px;line-height:1.4}.receipt{margin:8px 0}#auto-next{font-size:17px}}

#result-visits,#auto-next{display:none!important}#success-sparkles{position:absolute;inset:0;pointer-events:none;overflow:hidden}.ending-card{position:relative;z-index:1}.celebrate .ending-card{animation:success-arrive .65s ease-out}.celebrate #rank-badge{animation:award-glow 1.4s ease-in-out 2}.celebrate #success-sparkles i{position:absolute;left:var(--x);top:-30px;width:var(--s);height:calc(var(--s)*1.5);border-radius:4px;background:var(--color);animation:petal-fall 3.4s var(--delay) ease-in both}@keyframes petal-fall{0%{transform:translateY(-30px) rotate(0);opacity:0}10%{opacity:1}100%{transform:translateY(105vh) rotate(390deg);opacity:0}}@keyframes success-arrive{from{opacity:0;transform:translateY(22px) scale(.95)}to{opacity:1;transform:none}}@keyframes award-glow{50%{box-shadow:0 0 28px #efd16c80;transform:scale(1.025)}}

#success-sparkles{z-index:3}.ending-card{z-index:1}

#restart{white-space:pre-line;text-align:center;text-wrap:wrap;line-height:1.4}

/* Clear status colours, earned titles and the neighbour's written reply. */
#hud .life-card{background:#ffe2ec;border:2px solid #c66f92;color:#763a53}#hud #sales{background:#dcf3eb;border:2px solid #568f7d;color:#244f43}#hud #visitor{background:#e0edff;border:2px solid #718eba;color:#304d78}
#live-rank{position:absolute;z-index:5;top:94px;left:24px;background:#f6eaff;border:1px solid #ab89c0;color:#604275;padding:5px 12px;border-radius:12px;font-size:18px;max-width:calc(100% - 200px)}
#rank-notice{position:absolute;z-index:25;left:50%;top:50%;transform:translate(-50%,-50%);width:min(90%,440px);padding:24px;border-radius:28px;border:3px solid #cbab6d;background:#fff6de;text-align:center;box-shadow:0 12px 60px #57412e55;pointer-events:none}#rank-notice svg{display:block;width:110px;height:120px;margin:auto}#rank-notice span{display:block;font-size:23px}#rank-notice strong{display:block;font-size:40px;color:#795124}#rank-notice p{font-size:23px;line-height:1.5;margin:12px 0 0}
#rank-message{white-space:pre-line;text-align:center;text-wrap:wrap;word-break:keep-all;line-height:1.5}
#typed-form label{display:block;font-size:21px;margin-bottom:7px}#typed-form>div{display:flex;gap:8px}#typed-answer{min-width:0;width:100%;border:2px solid #79a798;background:white;border-radius:12px;padding:9px;font:24px 'Gaegu',sans-serif}#typed-submit{border:0;border-radius:12px;background:#3c7c68;color:white;font:23px 'Gaegu',sans-serif;padding:8px 16px;white-space:nowrap}#learned-words{display:flex;flex-wrap:wrap;gap:6px;max-height:120px;overflow:auto;margin-top:10px}#learned-words button{border:1px solid #829d91;border-radius:10px;background:#f1f7ed;color:#355b4e;padding:6px 10px;font:21px 'Gaegu',sans-serif}
#typed-form[hidden],#learned-words[hidden],#answers[hidden],#rank-notice[hidden],#live-rank[hidden]{display:none!important}
@media(max-width:600px){#live-rank{top:117px;left:12px;max-width:calc(100% - 24px);font-size:16px;padding:5px 8px}#stage{top:159px;max-height:23dvh}#rank-notice{padding:18px}#rank-notice strong{font-size:34px}#rank-notice p{font-size:20px}#typed-form label{font-size:19px}#typed-answer{font-size:22px}#greeting{max-height:90dvh;overflow:auto}#greeting p{font-size:18px;line-height:1.5}#rank-message{font-size:18px} }

@media(max-width:600px){#game.typing{height:var(--answer-height,100dvh);min-height:0}#game.typing #live-rank{display:none}#game.typing #stage{top:123px;max-height:18vh}#game.typing #answer-panel{bottom:10px}#game.typing #learned-words{max-height:70px}}

/* A single quiet status panel, matching the shop's wood and cream palette. */
#hud{display:grid;grid-template-columns:1fr 1.25fr 1fr;gap:0;padding:9px 12px 0;background:#fffaf1f5;border:1px solid #b8aa8e;border-radius:18px;box-shadow:0 3px 9px #76634318;width:500px;max-width:calc(100% - 180px)}
#hud .life-card,#hud #sales,#hud #visitor{background:transparent;border:0;border-radius:0;box-shadow:none;color:#52695c;margin:0;padding:4px 12px;text-align:center;min-width:0}#hud .life-card,#hud #sales{border-right:1px solid #daceb8}#hud #visitor{display:flex;align-items:center;justify-content:center}#hud #sales-meter{width:100%;height:12px;accent-color:#8caa93;appearance:none;border:0;border-radius:8px;overflow:hidden;background:#e3eadc}#sales-meter::-webkit-progress-bar{background:#e3eadc;border-radius:8px}#sales-meter::-webkit-progress-value{background:#8caa93;border-radius:8px}#sales-meter::-moz-progress-bar{background:#8caa93;border-radius:8px}#hud #live-rank{position:static;grid-column:1/-1;max-width:none;border:0;border-top:1px solid #e2d8c5;border-radius:0;background:transparent;box-shadow:none;text-align:center;padding:7px 0;margin-top:6px;font-size:20px;font-weight:700;color:#60451f}
.rank-guide{border:1px solid #c4ad83;border-radius:16px;background:#f7efdd;padding:14px 18px;margin:16px 0;text-align:center;font-size:22px;line-height:1.6}.rank-guide strong{display:block;color:#846b45;font-size:19px;margin-bottom:6px}#rank-badge[hidden],#rank-message[hidden]{display:none!important}
#rank-notice.rank-change{animation:rank-bloom .7s ease-out}#rank-notice.rank-change svg{animation:medal-rise .9s ease-out}#rank-notice.rank-change:after{content:'';position:absolute;inset:-8px;border:2px solid #e4c686;border-radius:32px;pointer-events:none;animation:rank-ring 1.4s ease-out both}@keyframes rank-bloom{from{opacity:0;transform:translate(-50%,-45%) scale(.86)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@keyframes medal-rise{0%{transform:rotate(-12deg) scale(.5)}65%{transform:rotate(5deg) scale(1.12)}100%{transform:none}}@keyframes rank-ring{to{transform:scale(1.12);opacity:0}}
@media(max-width:600px){#hud{left:12px;right:12px;top:10px;width:auto;max-width:none;padding:7px 5px 0;border-radius:16px}#hud .life-card,#hud #sales,#hud #visitor{padding:3px 6px;font-size:15px}#hud #live-rank{font-size:18px;padding:5px 0;margin-top:5px;line-height:1.3}#hud .hud-label{font-size:14px}#hud #sales strong{font-size:21px}#music,#magnifier{top:119px}#magnifier{background:#f4efdf;border-color:#c5b89c;box-shadow:none;border-radius:12px}#music{background:#faf5e9;border-color:#cfc3ad}#stage{top:165px}#game.typing #stage{top:155px}.rank-guide{font-size:20px;line-height:1.55;padding:12px}.rank-guide strong{font-size:18px}}
@media(prefers-reduced-motion:reduce){#rank-notice.rank-change,#rank-notice.rank-change svg,#rank-notice.rank-change:after{animation:none}}

/* v57: centered review choices and an arrival announcement. */
#learned-words{justify-content:center;text-align:center}#learned-words button{text-align:center}
.bonus-reward{width:min(340px,85vw);padding:24px 18px;background:#fff5dcee;border:2px solid #d5b36a;border-radius:24px;box-shadow:0 8px 32px #84663b30;color:#76623d;animation:bonus-arrival .65s ease-out}
.bonus-reward strong{display:block;font-size:42px}.bonus-reward span{display:block;font-size:21px;margin-top:8px}
@keyframes bonus-arrival{from{opacity:0;transform:translate(-50%,-50%) scale(.65)}65%{transform:translate(-50%,-50%) scale(1.08)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@media(prefers-reduced-motion:reduce){.bonus-reward{animation:none}}

/* v59: brighter surfaces, clear submission feedback and reserved face space. */
:root{background:#fff8ef}#hud{background:#fffef8;border-color:#d5c5a8}#stage,#answer-panel{background:#fffff7f5}.title-card,.ending-card,dialog{background:#fffdf3}.rank-guide{background:#fff7df}.primary,#typed-submit{background:#79b7a4}.primary:hover{background:#66a994}.submitted-correct #typed-answer{border-color:#68a17c;background:#e8fae9}.submitted-wrong #typed-answer{border-color:#d29285;background:#fff0ea}#typed-submit{touch-action:manipulation}
@media(min-width:601px){#stage{width:min(360px,calc(var(--guest-left,50vw) - 48px));max-height:calc(100dvh - 310px)}}
@media(max-width:600px){#stage{max-height:max(55px,calc(var(--guest-top,38dvh) - 181px));overflow:auto}#game.typing #stage{max-height:max(50px,calc(var(--guest-top,38dvh) - 171px))}}
.bonus-reward{background:linear-gradient(140deg,#fff5c5,#fffaf0,#ffe2ee);border:3px double #d6ac52;box-shadow:0 0 0 8px #fff6da55,0 0 50px #ffe899aa;overflow:visible}.bonus-reward strong{color:#ad7541;text-shadow:0 2px #fff}.bonus-reward i{position:absolute;left:50%;top:50%;width:9px;height:14px;border-radius:3px;background:var(--c);animation:surprise-burst 1.5s ease-out infinite;pointer-events:none;z-index:-1}.bonus-reward:before{content:'';position:absolute;inset:-14px;border:2px solid #efcd7d;border-radius:32px;animation:rank-ring 1.5s ease-out infinite}
@keyframes surprise-burst{0%{opacity:0;transform:rotate(var(--a)) translateY(-35px) scale(.4)}25%{opacity:1}100%{opacity:0;transform:rotate(var(--a)) translateY(calc(-100px - var(--d))) rotate(90deg)}}
.rank-badge.ultimate{background:linear-gradient(135deg,#fff2a6,#fffdfa,#f9d7ec);border:4px double #c39c3e;box-shadow:0 0 30px #efcd7770}.rank-badge.ultimate #rank-title{font-size:clamp(26px,5vw,35px)}
@media(prefers-reduced-motion:reduce){.bonus-reward i,.bonus-reward:before{animation:none}}

/* v60: show the complete story; move the camera framing below it on phones. */
#stage,#game.typing #stage{max-height:none;overflow:visible;height:auto}#ending{z-index:40}#ending #success-sparkles{z-index:3}
@media(max-width:600px){#stage{top:158px;padding:10px 14px}.speech p{font-size:18px;line-height:1.38}#game.typing #stage{top:148px}.speech p{word-break:keep-all}}
@media(max-width:600px) and (max-height:700px){#hud{top:6px}#music,#magnifier{top:106px}#stage{top:143px}.speech p{font-size:17px;line-height:1.32}}

/* Keep the packing button free of an outer focus frame. */
#understood:focus,#understood:focus-visible{outline:none;outline-offset:0}#understood:focus-visible{background:#559681}

.rank-guide .secret-rank-note{display:block;margin-top:9px;font-size:.78em;line-height:1.4;color:#8a795b;font-weight:400}

/* One entrance for both question levels. */
.difficulty-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 18px}.difficulty-buttons .primary{min-width:0;white-space:nowrap;padding:17px 25px}.difficulty-buttons span{font-size:19px;color:#738373;text-align:center}
@media(max-width:600px){.title-card{width:calc(100% - 32px);padding:35px 20px 30px}.title-card h1{font-size:clamp(38px,11vw,50px)}.difficulty-buttons{gap:12px}.difficulty-buttons .primary{font-size:23px;padding:15px 8px}.difficulty-buttons span{font-size:17px}}

/* Stacked entrance and mode-specific choices. */
.difficulty-buttons{grid-template-columns:1fr;width:min(260px,100%);margin:auto;gap:17px}.difficulty-buttons .primary{width:100%}.easy-mode #answers{grid-template-columns:repeat(3,minmax(0,1fr))}#answers.review-choices{display:flex;justify-content:center;flex-wrap:wrap;gap:7px}#answers.review-choices .answer{flex:0 1 calc(25% - 7px);min-width:110px;min-height:46px;padding:8px;font-size:23px}.review-choices .answer[hidden]{display:none!important}
@media(max-width:600px){.easy-mode #answers .answer{font-size:21px;padding:7px 3px;overflow-wrap:anywhere;min-height:48px}#answers.review-choices .answer{flex-basis:calc(33.333% - 7px);min-width:0;min-height:40px}}

/* Keep the title in place and reveal it with a soft gold glow. */
#hud #live-rank{min-height:1.3em;line-height:1.3}
#rank-notice.rank-dismiss{animation:rank-dismiss .4s ease-out both}
#hud #live-rank.rank-arrived{animation:rank-reveal .9s ease-out both}
@keyframes rank-dismiss{from{opacity:1}to{opacity:0}}
@keyframes rank-reveal{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){#rank-notice.rank-dismiss,#hud #live-rank.rank-arrived{animation:none}}

#reward.rank-reward{position:fixed;z-index:26;width:120px;height:132px;filter:drop-shadow(0 0 18px #ffe8a0)}
@media(prefers-reduced-motion:reduce){#reward.rank-reward{animation:none}#reward.rank-reward.fly{animation:rank-dismiss .65s ease-out forwards}}

/* Used chances remain as stationary empty heart outlines. */
.heart.empty svg path:first-child{fill:none}
.heart.empty svg path+path{display:none}

@media(max-width:600px){#hud #sales-meter{height:10px}}
@media(max-width:600px) and (max-height:700px){#music,#magnifier{top:114px}#stage{top:151px}}

/* A quiet, consistent HUD and larger controls. */
#hud #visitor{gap:6px;flex-wrap:wrap;align-content:center}.visitor-icon{width:24px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
#music,#magnifier{min-height:44px;padding:8px 18px;font-size:21px}.help-label{font-size:22px}.help-count{min-width:28px;height:28px;font-size:16px}
@media(min-width:601px){
 html,body{height:100%;overflow:hidden}#game{width:100%;height:100dvh;min-height:0}
 #hud{top:16px;left:20px}#music{top:16px;right:20px}#magnifier{top:72px;right:20px;left:auto}
 #stage{left:50%;transform:translateX(-50%);width:min(660px,calc(100% - 48px));padding:14px 24px;max-height:none;overflow:visible;text-align:center}
 .speech p{font-size:clamp(20px,2.1vh,25px);line-height:1.4}.speech:after{display:block}
 #answer-panel{width:min(1060px,94%);bottom:22px;padding:14px 18px}.answer{min-height:58px}

}
@media(max-width:600px){#music,#magnifier{padding:7px 14px;font-size:18px;min-height:40px;top:116px}.help-label{font-size:19px}.help-count{height:25px;min-width:25px;font-size:15px}.visitor-icon{width:20px;height:22px}#hud #visitor{gap:3px}#stage,#game.typing #stage{top:168px}}
@media(max-width:600px) and (max-height:700px){#music,#magnifier{top:108px}#stage{top:158px}}

/* Clearer customer dialogue in both difficulty modes. */
#stage #story{font-weight:700}

/* Slightly larger stories and an easy-to-find earned hint control. */
@media(min-width:601px){#stage #story{font-size:clamp(22px,2.3vh,27px)}}
#magnifier{border:2px solid #8da578;color:#345641;font-weight:700}
#magnifier:enabled{background:#e8f2dc;box-shadow:0 3px 0 #b6cba0}
#magnifier:enabled:hover{background:#dceccb}
#magnifier:disabled{opacity:.75}
@media(max-width:600px){#stage #story{font-size:20px}#stage,#game.typing #stage{top:178px}}
@media(max-width:600px) and (max-height:700px){#stage #story{font-size:19px}#stage,#game.typing #stage{top:168px}}
