@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');
:root{--paper:#f4eee4;--ink:#362b2d;--wine:#733342;--muted:#796e6c;--line:#d9cfc5;--accent:#d8a16c;font-family:'DM Sans',Arial,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,input{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #bc7039;outline-offset:5px}button{touch-action:manipulation}h1,h2,h3,p{margin:0}a{color:inherit}button{border:0}button.primary{background:var(--wine);color:#fff8ef;border:1px solid var(--wine);padding:18px 25px;border-radius:5px;font-weight:600;min-height:56px;display:inline-flex;gap:32px;align-items:center;justify-content:space-between}button.primary:hover{filter:brightness(1.12)}.mono,.eyebrow{font-family:'Space Mono',monospace}.eyebrow{text-transform:uppercase;font-size:12px;letter-spacing:.17em}.topbar{max-width:1240px;margin:auto;padding:28px 48px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{font-family:Georgia,serif;font-size:22px;font-style:italic}.seal{font-size:12px;color:var(--muted);display:flex;gap:10px;align-items:center}.seal:before{content:'';height:6px;width:6px;background:#788773;border-radius:50%}.intro{max-width:1144px;margin:0 auto;padding:80px 0 66px;display:grid;grid-template-columns:1.08fr 1fr;gap:75px;align-items:center}.intro h1{font-family:Georgia,serif;font-weight:400;letter-spacing:-.055em;font-size:clamp(64px,6.5vw,92px);line-height:1.02;margin:24px 0}.intro h1 em{color:var(--wine);font-weight:400}.intro p{max-width:355px;font-size:18px;line-height:1.75;color:#766565}.signature{margin-top:26px;font-family:Georgia,serif;font-size:25px!important;color:var(--wine)!important;font-style:italic}.hero-photo{position:relative;transform:rotate(2deg);padding:12px 12px 39px;background:#fffcf5;box-shadow:0 14px 40px #4c263017}.hero-photo img{display:block;aspect-ratio:1.08;object-fit:cover;width:100%;background:#ad7670}.photo-note{position:absolute;bottom:12px;left:0;right:0;text-align:center;font:italic 17px Georgia,serif;color:#756156}.scroll-note{max-width:1144px;margin:auto;padding:0 0 35px;color:var(--muted);font-size:12px;letter-spacing:.1em;display:flex;gap:20px;align-items:center}.scroll-note:after{content:'';height:1px;background:var(--line);flex:1}.letter{max-width:720px;margin:90px auto;text-align:center;padding:0 28px}.letter h2{font:400 clamp(32px,4vw,45px)/1.2 Georgia,serif;letter-spacing:-.03em}.letter p{color:var(--muted);line-height:1.85;margin:24px auto;font-size:17px;max-width:510px}.gift-section{padding:0 24px 95px}.gift{max-width:840px;margin:auto;background:#e9e0d6;border:1px solid #d9c8bc;border-radius:8px;padding:40px;display:flex;gap:36px;align-items:center;justify-content:space-between}.gift h2{font:400 34px Georgia,serif;margin:12px 0}.gift p{color:#756764;font-size:15px;line-height:1.6}.gift .primary{white-space:nowrap}.footer{border-top:1px solid var(--line);padding:28px;text-align:center;color:var(--muted);font-size:12px}.verification{min-height:100svh;padding:35px 24px 60px}.verify-top{max-width:950px;margin:0 auto;display:flex;justify-content:space-between;gap:20px;color:var(--muted)}.verify-wrap{max-width:490px;margin:75px auto 0}.verify-wrap h1{font:400 42px/1.12 Georgia,serif;letter-spacing:-.04em;margin:16px 0}.intro-copy{font-size:16px;line-height:1.7;color:var(--muted);margin-bottom:28px}.verify-card{background:#fffcf7;border:1px solid var(--line);padding:25px;border-radius:8px;box-shadow:0 12px 35px #34202a07}.checkbox{display:flex;gap:18px;align-items:center;width:100%;padding:22px 16px;background:#f7f5f1;border:1px solid #cecac4;border-radius:3px;text-align:left}.check-square{width:29px;height:29px;background:white;border:2px solid #908e86;border-radius:3px;display:grid;place-items:center;color:#428058}.captcha-brand{font-size:11px;color:#888;text-align:center;margin-left:auto}.fine{font-size:12px;line-height:1.7;color:var(--muted);margin-top:20px}.status{min-height:28px;font-size:14px;color:var(--wine);margin-top:15px}.puzzle{height:195px;background:linear-gradient(0deg,#92aaa3 0 34%,#bfc4b4 34% 52%,#e7ccaf 52%);position:relative;overflow:hidden;border-radius:4px}.puzzle:before{content:'✦';position:absolute;left:40px;top:8px;font-size:85px;color:#fae5bb}.puzzle-hole,.puzzle-piece{position:absolute;top:70px;width:49px;height:57px;clip-path:polygon(0 0,35% 0,35% 14%,65% 14%,65% 0,100% 0,100% 35%,85% 35%,85% 65%,100% 65%,100% 100%,0 100%);border:2px solid white}.puzzle-hole{left:68%;background:#35443c8c}.puzzle-piece{left:0;background:#e8c695;box-shadow:0 0 5px #fff}input[type=range]{width:100%;margin:25px 0 8px;accent-color:var(--wine);height:32px;touch-action:pan-y}.grid-title{background:#4b6990;color:white;padding:21px;border-radius:5px 5px 0 0;font-size:15px;line-height:1.6}.grid-title strong{font-size:23px;display:block}.laundry-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:5px 0 18px}.laundry-tile{aspect-ratio:1;background-image:url('assets/laundry.png');background-size:300% 300%;border:3px solid transparent;position:relative}.laundry-tile.selected{border-color:#4b6990;transform:scale(.94)}.laundry-tile.selected:after{content:'✓';position:absolute;right:3px;top:3px;width:24px;height:24px;border-radius:50%;background:#4b6990;color:#fff;display:grid;place-items:center}.wide{width:100%}.loading-ring{width:55px;height:55px;margin:24px 0;border-radius:50%;border:2px solid #dbd2c5;border-top-color:var(--wine);animation:turn 1s linear infinite}@keyframes turn{to{transform:rotate(360deg)}}
body.game-mode{background:#101212;color:#eee9dc;overscroll-behavior:none}.game-shell{max-width:920px;margin:auto;padding:20px 24px 22px}.game-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:17px}.game-header .eyebrow{color:#b4aca0;font-size:11px;letter-spacing:.1em}.game-header h1{font:400 25px Georgia,serif;margin-top:5px}.icon-button{background:#262825;border:1px solid #4c4b40;border-radius:5px;color:#dedaca;padding:10px 12px;min-height:44px}.game-stage{position:relative;border:1px solid #635342;background:#13100f;overflow:hidden;box-shadow:0 18px 55px #0005}.game-stage canvas{width:100%;display:block;aspect-ratio:3/2;image-rendering:pixelated;touch-action:none}.hud{display:flex;justify-content:space-between;gap:10px;padding:11px 14px;background:#1f201b;border-bottom:1px solid #514533;font-family:'Space Mono',monospace;font-size:13px;color:#e3ce9c}.health{color:#e8937f}.game-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center;background:linear-gradient(#151110d9,#151110ef);z-index:2;gap:15px}.game-overlay[hidden]{display:none}.game-overlay h2{font:400 clamp(28px,5vw,47px)/1.08 Georgia,serif;color:#f0ddac;max-width:500px}.game-overlay p{max-width:430px;font-size:15px;color:#beb9a9;line-height:1.65}.game-overlay .primary{background:#ac603d;border-color:#ac603d;min-height:48px;padding:13px 25px}.game-overlay .eyebrow{color:#dba06d}.controls{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:16px;user-select:none;-webkit-user-select:none}.dpad{width:154px;height:135px;display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);gap:4px}.pad-btn,.action-btn{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;color:#e1d6bf;border:1px solid #5a584c;background:linear-gradient(#363832,#22241f);box-shadow:0 4px 0 #080907;min-height:42px;border-radius:6px;font-size:20px}.pad-btn.active,.action-btn.active{background:#695b3f;transform:translateY(2px);box-shadow:0 2px 0 #080907}.pad-btn[data-key=up]{grid-area:1/2}.pad-btn[data-key=left]{grid-area:2/1}.pad-btn[data-key=right]{grid-area:2/3}.pad-btn[data-key=down]{grid-area:3/2}.pad-center{grid-area:2/2;display:grid;place-items:center;color:#686658}.actions{display:flex;gap:14px;align-items:center}.action-btn{border-radius:50%;width:78px;height:78px;font-size:14px;font-weight:700;line-height:1.4}.action-btn.major{background:linear-gradient(#963f37,#542924);border-color:#c2785b}.action-btn.minor{background:linear-gradient(#3e6560,#233d39);border-color:#6f9690}.control-label{color:#918e80;text-align:center;font-size:11px;margin-top:9px}.game-hint{text-align:center;color:#b7ae9c;font-size:13px;line-height:1.6;margin-top:12px}.game-footer{font-size:11px;color:#7e8073;text-align:center;margin-top:10px}.race-theme .game-header h1{font-family:Arial,sans-serif;font-style:italic;font-weight:900;text-transform:uppercase;color:#f4d960}.race-theme .game-stage{border-color:#536c8b}.adventure-theme .game-stage{border-color:#718157}.doom{background:#100d0d!important;color:#e9d7bc;min-height:100svh}.doom-wrap{max-width:720px;margin:auto;padding:90px 28px 60px;text-align:center}.doom .eyebrow{color:#c6654e}.doom h1{font:400 clamp(49px,8vw,85px)/.98 Georgia,serif;letter-spacing:-.04em;margin:30px 0}.doom h1 em{color:#c86f4f}.doom p{color:#b4a398;font-size:17px;line-height:1.8;max-width:520px;margin:20px auto}.doom-rule{height:1px;background:linear-gradient(90deg,transparent,#77513d,transparent);margin:36px 0}.reward-rule{display:flex;justify-content:space-around;gap:12px;margin:26px auto}.reward-rule strong{display:block;font:35px Georgia,serif;color:#e8c987}.reward-rule span{font-size:12px;color:#a48f7e}.doom .primary{background:#8e3c2d;border-color:#ad6246;min-width:250px}.score{font:400 clamp(85px,15vw,140px)/1 Georgia,serif;color:#e8c987;margin:24px}.receipt{border:1px solid #6c5341;background:#201813;max-width:420px;padding:24px;margin:28px auto;text-align:left}.receipt-row{display:flex;justify-content:space-between;font-size:14px;margin:10px 0}.receipt-row.total{border-top:1px solid #6c5341;padding-top:16px;font-size:20px}.text-button{background:none;color:inherit;padding:12px;text-decoration:underline;text-underline-offset:5px;font-size:13px}.toast{position:absolute;top:22%;left:0;right:0;z-index:1;text-align:center;pointer-events:none;background:#310906db;border-block:1px solid #d45839;padding:14px 5px;color:#ffb795}.toast strong{display:block;font:32px Georgia,serif}.toast span{font-size:12px}.toast[hidden]{display:none}.resume-banner{padding:16px;border:1px solid var(--line);margin-bottom:20px;font-size:14px}.resume-banner button{padding:8px;background:var(--wine);color:white;margin-left:8px;border-radius:3px}
@media(max-width:850px){.topbar{padding:22px 26px}.intro{padding:55px 28px;gap:28px}.intro h1{font-size:65px}.intro p{font-size:16px}.scroll-note{margin:0 28px}.gift{padding:30px}.game-shell{max-width:740px}}
@media(max-width:600px){.topbar{padding:21px 23px}.seal{font-size:10px}.brand{font-size:21px}.intro{display:flex;flex-direction:column;align-items:stretch;padding:45px 28px 42px;gap:37px}.intro h1{font-size:65px;margin:20px 0}.intro p{max-width:300px}.signature{margin-top:18px}.hero-photo{width:85%;align-self:center;padding:9px 9px 32px;transform:rotate(3deg)}.hero-photo img{aspect-ratio:1.25}.photo-note{font-size:14px;bottom:10px}.letter{margin:65px auto}.letter h2{font-size:34px}.gift{display:block;padding:27px}.gift .primary{width:100%;margin-top:23px}.gift h2{font-size:30px}.gift-section{padding-bottom:65px}.verify-wrap{margin-top:48px}.verify-wrap h1{font-size:36px}.verification{padding:24px 20px 40px}.verify-card{padding:18px}.game-shell{padding:13px 10px max(13px,env(safe-area-inset-bottom))}.game-header{margin:0 3px 12px}.game-header h1{font-size:21px}.game-header .eyebrow{font-size:10px}.game-stage canvas{aspect-ratio:6/5}.game-overlay{padding:19px;gap:11px}.game-overlay h2{font-size:32px}.game-overlay p{font-size:14px;line-height:1.5}.hud{font-size:11px;padding:10px}.controls{gap:10px;margin:15px 8px 0}.dpad{width:145px;height:134px}.actions{gap:11px}.action-btn{width:69px;height:69px;font-size:12px}.doom-wrap{padding:60px 24px 45px}.doom h1{font-size:58px}.reward-rule strong{font-size:29px}.game-hint{font-size:12px;margin-top:10px}}
@media(max-height:600px) and (orientation:landscape){.game-shell{max-width:800px;display:grid;grid-template-columns:1fr 190px;gap:8px;padding:8px}.game-header{grid-column:1/-1;margin:0}.game-header h1{font-size:18px}.game-stage canvas{height:calc(100svh - 118px);aspect-ratio:auto}.controls{flex-direction:column;justify-content:center;margin:0;gap:3px}.dpad{height:108px;width:125px}.pad-btn{min-height:32px}.action-btn{width:57px;height:57px}.control-label{display:none}.game-hint{grid-column:1/-1;margin:0}.game-footer{display:none}.game-overlay h2{font-size:25px}.game-overlay p{font-size:12px}.game-overlay{gap:8px;padding:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;scroll-behavior:auto!important;transition:none!important}}
body.game-mode{min-height:100svh}.game-header>div:last-child{flex-shrink:0}.game-header #sound{white-space:nowrap;min-width:60px}.game-header>div:first-child{min-width:0}.hero-photo{margin:0}.game-stage canvas{aspect-ratio:4/3}
.doom .reward-title{font-size:clamp(32px,9.7vw,70px)}.dpad{touch-action:none}.game-header h1{overflow-wrap:break-word}
@media(max-width:360px){.controls{margin-inline:0;gap:5px}.dpad{width:128px;height:122px}.actions{gap:8px}.action-btn{width:62px;height:62px}.game-overlay h2{font-size:27px}.game-overlay p{font-size:13px}.game-overlay{gap:8px;padding:12px}.game-header h1{font-size:19px}.game-header .eyebrow{font-size:9px}.game-header #sound{min-width:49px;padding:9px}.game-header #pause{padding:9px}.intro h1{font-size:56px}}
@media(max-width:600px){.game-stage:has(.game-overlay:not([hidden])){min-height:335px}}
@media(max-width:360px){.dpad{height:134px}}
.topbar .brand{max-width:72%;font-size:clamp(16px,2vw,23px);overflow-wrap:anywhere}.intro .hero-photo img{aspect-ratio:3/4;object-fit:contain}.intro .hero-photo{padding-bottom:48px}.photo-note{padding:0 7px;line-height:1.35}.gift-section{padding-top:28px}.dungeon-objective{background:#18130e;padding:10px 14px;border-bottom:1px solid #5b4731}.dungeon-objective[hidden]{display:none}.objective-line{display:flex;justify-content:space-between;gap:12px;color:#d5bd8c;font:11px 'Space Mono',monospace;line-height:1.6}.charge-track{height:6px;background:#392f24;margin-top:7px}.charge-track>div{height:100%;background:#cfaa65}.hp-track{height:4px;background:#331b17;margin-top:5px}.hp-track>div{height:100%;background:#b44731}.game-stage:has(.dungeon-objective:not([hidden])) canvas{image-rendering:auto}
@media(max-width:600px){.topbar{align-items:flex-start;gap:12px}.topbar .seal{font-size:9px;max-width:80px;line-height:1.5}.intro .hero-photo{width:100%}.objective-line{font-size:10px}.game-stage:has(.dungeon-objective:not([hidden])):has(.game-overlay:not([hidden])){min-height:390px}}
/* Immersive game layout: viewport-sized playfield, floating readouts and thumb controls. */
body.game-mode{height:100dvh;min-height:0;overflow:hidden;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.game-mode #app,.game-mode #game-root{height:100%;width:100%}.game-shell{position:fixed;inset:0;max-width:none;width:100%;height:100dvh;padding:0;margin:0;display:flex;flex-direction:column;gap:0;background:#100e0b}
.game-header{flex:none;min-height:60px;margin:0;padding:calc(7px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));background:#141511;z-index:4}.game-header .eyebrow{font-size:9px;letter-spacing:.07em}.game-header h1{font-size:20px;margin-top:2px}.utility-buttons{display:flex;gap:6px}.game-header .icon-button{padding:7px;min-height:40px}
.game-stage,.game-stage:has(.game-overlay:not([hidden])),.game-stage:has(.dungeon-objective:not([hidden])):has(.game-overlay:not([hidden])){flex:1;min-height:0;min-width:0;width:100%;border:0;box-shadow:none;position:relative}
.game-stage canvas{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;display:block;touch-action:none;image-rendering:auto}
.game-readouts{position:absolute;inset:0 0 auto;pointer-events:none;z-index:1;background:linear-gradient(#0a0c0bd9,#0a0c0b66,transparent);padding-bottom:12px}.hud{background:transparent;border:0;padding:10px 15px;font-size:12px;font-variant-numeric:tabular-nums;text-shadow:0 2px 4px #000}.dungeon-objective{background:#17120c99;border:0;margin:0 12px;padding:8px 10px;border-radius:5px;max-width:580px}.objective-line{font-size:10px}.reward-live{text-align:center;display:flex;flex-direction:column;gap:0}.reward-live>span{font:9px 'Space Mono',monospace;letter-spacing:.18em;color:#d5cbb7}.reward-live strong{font:bold clamp(39px,7vw,60px)/1.1 Georgia,serif;color:#fce1a2;font-variant-numeric:tabular-nums;text-shadow:0 3px 12px #000}.stamina{max-width:340px;margin:9px auto 0;width:72%;padding:7px 10px;border-radius:8px;background:#101a19d9;color:#9be6c5}.stamina>div:first-child{display:flex;justify-content:space-between;gap:8px;font:10px 'Space Mono',monospace}.stamina-track{height:10px;margin-top:6px;background:#303e38;border-radius:5px;overflow:hidden}.stamina-track>div{height:100%;background:linear-gradient(90deg,#4b9979,#a3f0bf)}.stamina.exhausted{color:#ffb886}.stamina.exhausted .stamina-track>div{background:#b76936}.action-btn.cooldown{filter:saturate(.25);border-color:#e0a77b}
.controls{position:absolute;inset:auto 0 0;margin:0;padding:12px max(18px,env(safe-area-inset-right)) max(17px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));height:180px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:14px;background:linear-gradient(transparent,#080b0980);z-index:3;pointer-events:none}.controls>*{pointer-events:auto}.joystick{position:relative;width:144px;height:144px;flex:none;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border-radius:50%;background:#14211db3;border:2px solid #a9b6a24d;box-shadow:inset 0 0 28px #0009,0 3px 15px #0005}.joystick-ring{position:absolute;inset:24px;border:1px solid #b9c7ad44;border-radius:50%}.joystick:before,.joystick:after{content:'';position:absolute;background:#bac7af33;left:calc(50% - 1px);top:8px;width:2px;height:calc(100% - 16px)}.joystick:after{transform:rotate(90deg)}.joystick-knob{position:absolute;left:calc(50% - 29px);top:calc(50% - 29px);width:58px;height:58px;border-radius:50%;background:radial-gradient(at 35% 28%,#aab7a1,#536451 65%,#263e32);border:2px solid #c6d0b989;box-shadow:0 5px 14px #0008;will-change:transform;pointer-events:none;z-index:1}.joystick.active{border-color:#dbdfad99}.actions,.steering{display:flex;gap:12px;align-items:center}.action-btn{width:76px;height:76px;font-size:14px;border-width:2px;background:linear-gradient(#393e37ee,#192019ed);box-shadow:0 5px 14px #0007;touch-action:none}.action-btn.major{width:84px;height:84px}.game-overlay{z-index:5;overflow:auto;padding:26px;gap:17px;background:linear-gradient(#0b0d0de8,#14100fed);justify-content:center}.game-overlay h2{font-size:clamp(30px,5vw,52px)}.game-overlay p{font-size:15px;line-height:1.6}.game-overlay .primary{flex:none}.game-hint,.game-footer{display:none}
.toast{top:170px;left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:90%;padding:6px 12px;border:1px solid #b46e45;border-radius:20px;background:#38170ae8;display:flex;align-items:center;gap:9px;z-index:2;pointer-events:none}.toast strong{font:bold 14px Georgia,serif}.toast span{font-size:10px;color:#e3bd9f}.toast[hidden]{display:none}
.score{font-size:clamp(65px,16vw,130px);font-variant-numeric:tabular-nums;margin:24px 0}
@media(max-width:360px){.game-header h1{font-size:17px}.game-header .eyebrow{font-size:8px}.joystick{width:126px;height:126px}.controls{padding-inline:12px;gap:8px;height:160px}.actions{gap:8px}.action-btn{width:64px;height:64px;font-size:12px}.action-btn.major{width:70px;height:70px}.game-overlay{padding:20px;gap:13px}.game-overlay p{font-size:14px}.reward-live strong{font-size:40px}.toast{top:163px}}
@media(orientation:landscape) and (max-height:600px){.game-header{min-height:45px;padding-block:4px}.game-header h1{font-size:17px}.game-header .eyebrow{display:none}.game-header .icon-button{min-height:34px;padding:4px 9px}.hud{padding:7px 14px}.controls{height:132px;padding:8px 20px}.joystick{width:112px;height:112px}.action-btn{width:63px;height:63px}.action-btn.major{width:72px;height:72px}.game-overlay h2{font-size:29px}.game-overlay p{font-size:13px;max-width:520px}.game-overlay{gap:10px;padding:16px}.reward-live strong{font-size:37px}.stamina{margin-top:4px;padding:5px 10px;max-width:260px}.toast{top:135px}.dungeon-objective{margin:auto;max-width:450px}.reward-live>span{font-size:8px}}
.adventure-theme .game-stage canvas{image-rendering:pixelated}.adventure-objective{max-width:520px;margin:4px auto;padding:10px 14px;background:#173326ef;border:1px solid #baa260;color:#ffedb2;font-size:14px;line-height:1.5;text-align:center;border-radius:6px}.adventure-objective[hidden]{display:none}.action-btn.exit-ready{border-color:#ffeb98;box-shadow:0 0 0 4px #ffe28a55,0 0 20px #e5d28c55;font-size:12px}.toast.hell-notice{width:min(340px,90%);border-radius:9px;display:block;text-align:center;padding:8px 12px}.toast.hell-notice strong{font-size:13px;margin-bottom:3px}.toast.hell-notice span{font-size:11px;line-height:1.35;display:block}
