:root{color-scheme:light;--paper:#f6f2e9;--ink:#4c5a46;--muted:#89917d;--sage:#667a59;--line:#e2e3d5;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,a,input{ -webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}a{color:inherit;text-decoration:none}button,a{touch-action:manipulation}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #adbb97;outline-offset:5px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Dedicated gallery: images are renders of the actual five rooms, not stock art. */
.gallery-screen{min-height:100svh}.gallery-shell{max-width:1320px;margin:0 auto;padding:48px 44px 30px}.gallery-header{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 46px}.gallery-eyebrow{font-size:11px;letter-spacing:.22em;color:var(--muted)}.gallery-header h1{font-size:38px;font-weight:650;letter-spacing:.015em;margin:13px 0 12px}.gallery-header p{font-size:13px;color:var(--muted);margin:0}.gallery-progress{font-size:12px;white-space:nowrap;padding:11px 16px;border:1px solid var(--line);border-radius:40px;background:#f0f0e5}.chapter-group+.chapter-group{margin-top:34px}.group-heading{display:flex;justify-content:space-between;align-items:end;margin:0 0 16px;gap:12px}.group-heading>div{display:flex;align-items:baseline;gap:12px}.group-kicker{font-size:11px;letter-spacing:.08em;color:#a4aa95}.group-heading h2{font-size:18px;font-weight:600;margin:0}.group-heading p{font-size:11px;color:var(--muted);margin:0}.level-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.level-card{display:block;min-width:0;overflow:hidden;background:#fffdf7;border:1px solid #e4e4d8;border-radius:20px;box-shadow:0 5px 14px #66745a05;transition:transform .2s,box-shadow .2s,border-color .2s}.level-card:hover{transform:translateY(-4px);border-color:#bec9ae;box-shadow:0 10px 24px #66745a13}.room-preview{position:relative;background:#f0ecdf;aspect-ratio:1.5;overflow:hidden}.room-preview img{display:block;width:100%;height:100%;object-fit:contain}.chapter-number{position:absolute;left:11px;top:11px;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#fffdf3de;color:#64755a;font-size:11px;font-weight:650;box-shadow:0 1px 4px #485d4310}.room-label{position:relative;padding:16px 37px 17px 15px;min-height:80px}.room-label h3{font-size:14px;font-weight:600;margin:0 0 8px;white-space:nowrap}.completion-status{display:block;font-size:10px;line-height:1.5;color:#9aa18c;white-space:nowrap}.card-arrow{position:absolute;right:15px;top:20px;color:#99a28b;font-size:18px}.is-complete .completion-status{color:#6e865c}.is-complete .chapter-number{background:#738865;color:#fffdf5}.room-preview.image-unavailable::after{content:'✦';display:grid;place-items:center;width:100%;height:100%;color:#a6b495;font-size:36px}.gallery-footer{display:flex;justify-content:center;gap:26px;margin-top:36px;padding-top:20px;border-top:1px solid #e5e4d8;color:#9bA28e;font-size:10px}
/* Play screen: no chapter selector, bottom direction panel or reserved sidebar. */
.play-screen{width:100%;height:100svh;overflow:hidden}.app{width:100%;height:100svh;display:grid;grid-template-rows:64px minmax(0,1fr);overflow:hidden}.play-toolbar{display:flex;align-items:center;justify-content:space-between;padding:10px max(20px,env(safe-area-inset-right)) 6px max(20px,env(safe-area-inset-left));gap:12px}.toolbar-actions{display:flex;gap:8px}.icon-button{display:inline-grid;place-items:center;width:44px;height:44px;padding:0;background:#fffdf444;border:1px solid var(--line);border-radius:15px;color:#7b896d}.icon-button:hover{background:#efefdf;border-color:#c9d0bb}.icon-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.sound-off,.is-muted .sound-on{display:none}.is-muted .sound-off{display:block}.main-layout{position:relative;min-height:0;min-width:0;padding:0 14px max(12px,env(safe-area-inset-bottom));overflow:hidden}.stage{height:100%;width:100%;position:relative;min-height:0;overflow:hidden;border-radius:26px}.stage #game-canvas{display:block;width:100%;height:100%;touch-action:none;outline:none}.stage #game-canvas:focus-visible{outline:2px solid #b3c19f;outline-offset:-3px;border-radius:22px}[data-room="kitchen"] .stage{background:radial-gradient(ellipse at center,#f5eed8,#eff1e5)}[data-room="bedroom"] .stage{background:radial-gradient(ellipse at center,#f4e9ed,#f0e8e5)}[data-room="study"] .stage{background:radial-gradient(ellipse at center,#ecebdc,#e8eddf)}[data-room="bathroom"] .stage{background:radial-gradient(ellipse at center,#edf5f3,#e7eeee)}.loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted);font-size:13px;background:var(--paper)}.loading>span{font-size:24px;color:#a7b291;animation:breathe 1.4s ease-in-out infinite}.catch-toast{position:absolute;left:50%;bottom:6%;transform:translate(-50%,8px);border:1px solid #e6e4d3;background:#fffdf3ec;border-radius:24px;padding:10px 17px;font-size:12px;color:#728361;pointer-events:none;opacity:0;transition:opacity .2s,transform .2s;white-space:nowrap}.catch-toast.visible{opacity:1;transform:translate(-50%,0)}
/* Celebration occupies the screen; the card stays above it and interactive. */
.victory{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:20px;background:#efeedd77;backdrop-filter:blur(5px)}#celebration-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;z-index:0;pointer-events:none}.victory-card{position:relative;z-index:1;width:min(320px,100%);max-height:calc(100svh - 40px);overflow:auto;display:flex;flex-direction:column;align-items:stretch;gap:10px;text-align:center;border:1px solid #e3e5d5;background:#fffdf5f5;border-radius:28px;padding:28px 28px 22px;box-shadow:0 18px 60px #52644220;animation:card-in .3s ease-out}.victory-icon{align-self:center;width:68px;height:68px;display:grid;place-items:center;border-radius:24px;background:#ecefdc;color:#809469;margin-bottom:4px}.victory-icon svg{width:42px;height:42px;fill:currentColor}.victory-card h2{font-size:24px;font-weight:600;letter-spacing:.03em;margin:4px 0 16px}.primary-button,.secondary-button,.text-button{display:flex;align-items:center;justify-content:center;gap:15px;min-height:44px;width:100%;border-radius:14px;font-size:13px;font-weight:550;line-height:1.5;padding:11px 16px;cursor:pointer}.primary-button{border:1px solid var(--sage);background:var(--sage);color:#fffdf5}.primary-button:hover{background:#576c4c}.secondary-button{border:1px solid #dce1cd;background:#f5f5e9;color:#718361}.secondary-button:hover{background:#edefde}.text-button{border:0;background:transparent;color:#99a188;font-size:12px;font-weight:400}.text-button:hover{color:#596f4d}.error-panel{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;background:var(--paper);padding:24px;text-align:center}.error-panel h2{font-size:20px}.error-panel p{max-width:420px;line-height:1.7;color:var(--muted);font-size:13px}.error-panel .primary-button,.error-panel .text-button{max-width:240px}
@keyframes breathe{50%{transform:scale(1.15);opacity:.5}}@keyframes card-in{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@media(max-width:1000px){.gallery-shell{padding:32px 28px}.level-grid{gap:12px}.room-label{padding-left:12px;padding-right:28px}.room-label h3{font-size:12px}.card-arrow{right:11px}.completion-status{font-size:9px}}
@media(max-width:760px){.gallery-shell{padding:30px 20px 26px}.gallery-header{margin-bottom:32px;gap:12px}.gallery-header h1{font-size:29px}.gallery-header p{font-size:11px}.gallery-progress{font-size:10px;padding:9px 12px}.level-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.room-label h3{font-size:13px}.group-heading p{font-size:10px}.group-heading h2{font-size:17px}.app{grid-template-rows:60px minmax(0,1fr)}.play-toolbar{padding:8px max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left))}.main-layout{padding:0 4px max(8px,env(safe-area-inset-bottom))}.stage{border-radius:18px}.catch-toast{font-size:11px}.gallery-footer{gap:16px;flex-wrap:wrap}}
@media(max-width:520px){.gallery-shell{padding:26px 16px 24px}.gallery-header h1{font-size:27px}.gallery-header{align-items:flex-start}.gallery-progress{margin-top:20px}.level-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}.level-card{border-radius:18px}.group-heading{align-items:center}.group-heading>div{gap:8px}.group-kicker{font-size:9px}.group-heading h2{font-size:16px}.group-heading p{max-width:115px;text-align:right;line-height:1.5}.room-label{padding:13px 30px 13px 13px;min-height:74px}.room-label h3{font-size:13px}.completion-status{font-size:10px}.chapter-group+.chapter-group{margin-top:30px}.gallery-footer{font-size:9px;gap:14px}.chapter-number{width:25px;height:25px;top:8px;left:8px}.victory-card{padding:24px}.victory-card h2{font-size:22px}}
@media(max-width:340px){.gallery-header{flex-wrap:wrap}.gallery-progress{margin:0}.group-heading p{display:none}.completion-status{font-size:9px}.room-label h3{font-size:12px}}
@media(max-height:480px){.app{grid-template-rows:52px minmax(0,1fr)}.play-toolbar{padding-top:4px;padding-bottom:4px}.victory-card{padding:16px 24px;gap:7px}.victory-icon{width:42px;height:42px;border-radius:16px}.victory-icon svg{width:28px;height:28px}.victory-card h2{font-size:20px;margin:0 0 6px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.level-card:hover{transform:none}}

[data-room="dressing"] .stage{background:radial-gradient(ellipse at center,#F5E9E8,#F1EAE3)}
[data-room="storage"] .stage{background:radial-gradient(ellipse at center,#EFE9DB,#ECEADC)}
[data-room="gaming"] .stage{background:radial-gradient(ellipse at center,#EDEAF4,#E8E9EF)}
[data-room="plants"] .stage{background:radial-gradient(ellipse at center,#EEF1DF,#E7ECDD)}
[data-room="gym"] .stage{background:radial-gradient(ellipse at center,#EEF0E6,#E7ECE4)}

/* Journey chapter surfaces */
[data-room="laundry"] .stage{background:radial-gradient(ellipse at center,#F2EEE4,#DFEBED)}
[data-room="sewing"] .stage{background:radial-gradient(ellipse at center,#F2E0C9,#F2E1D1)}
[data-room="attic"] .stage{background:radial-gradient(ellipse at center,#DEC4A3,#E9D2AE)}
[data-room="music"] .stage{background:radial-gradient(ellipse at center,#E8D4B7,#DDE5E8)}
[data-room="garage"] .stage{background:radial-gradient(ellipse at center,#E2E1D5,#E0E4D6)}
[data-room="bakery"] .stage{background:radial-gradient(ellipse at center,#E8D2AD,#F0E5CB)}
[data-room="toys"] .stage{background:radial-gradient(ellipse at center,#ECE3D4,#E3ECE1)}
[data-room="post"] .stage{background:radial-gradient(ellipse at center,#E5D2B9,#E5E7E2)}
[data-room="pottery"] .stage{background:radial-gradient(ellipse at center,#E4D3C0,#EADDD2)}
[data-room="cinema"] .stage{background:radial-gradient(ellipse at center,#CDBDB4,#C8B5B4)}
[data-room="courtyard"] .stage{background:radial-gradient(ellipse at center,#D9DFD5,#E0E6DD)}
[data-room="camp"] .stage{background:radial-gradient(ellipse at center,#DDE0C4,#DCE5CD)}
[data-room="observatory"] .stage{background:radial-gradient(ellipse at center,#C4CBD6,#B6C1D4)}
[data-room="market"] .stage{background:radial-gradient(ellipse at center,#E3D0BA,#E3D4D7)}
[data-room="homecoming"] .stage{background:radial-gradient(ellipse at center,#E7D6BA,#EBE5D6)}
