@font-face{font-family:Room Hand;src:url(room/hand.ttf) format("truetype");font-weight:400;font-display:swap}
:root{color-scheme:light;--ink:#514337;--edge:#b5a18a;--sheet:#fffbef;--green:#657852;--hand:"Room Hand","Trebuchet MS",sans-serif}
*{box-sizing:border-box}body{margin:0;color:var(--ink);font-family:var(--hand);background:#f7ecd8}button{color:inherit;font:inherit;touch-action:manipulation;cursor:pointer}button:focus-visible{outline:3px solid #966447;outline-offset:3px}button:disabled{cursor:default}[hidden]{display:none!important}button,img{-webkit-tap-highlight-color:transparent}img{user-select:none;-webkit-user-drag:none}.sr-only{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
#game{position:relative;isolation:isolate;display:grid;grid-template-rows:auto minmax(245px,1fr) auto;min-height:610px;height:100svh;overflow:hidden}
.wallpaper{position:absolute;inset:0;z-index:-2;pointer-events:none}.wall-0{background-color:#faf0da;background-image:url("room/sprig.svg");background-size:78px 68px}.wall-1{background-color:#e6e9da;background-image:repeating-linear-gradient(90deg,transparent 0 19px,#b8c3ae55 19px 23px,transparent 23px 42px)}.wall-2{background-color:#f5e3df;background-image:linear-gradient(90deg,#dbb5b52e 50%,transparent 50%),linear-gradient(#dbb5b52e 50%,transparent 50%);background-size:32px 32px}.wall-3{background-color:#dfeaf0;background-image:radial-gradient(ellipse at 50% 45%,#a1b9c7 1px,transparent 2px);background-size:19px 22px}.wall-4{background-color:#efe5ed;background-image:url("room/sprig.svg");background-size:68px 59px}.wall-5{background-color:#f7efdf;background-image:linear-gradient(110deg,#faf5ee70,transparent)}
header{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:19px clamp(16px,4vw,75px) 9px;gap:12px}h1,h2{margin:0;font-weight:400}h1{font-size:clamp(1.72rem,2.85vw,3rem);letter-spacing:-.035em;display:flex;align-items:center;gap:.17em;line-height:1.13}h1 span{color:#8c7158;margin-inline:.02em}.housemark{height:1.03em;width:1.13em;transform:rotate(-7deg);margin-right:.14em}.tools{display:flex;align-items:center;gap:10px}.utility,.reopen{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#fffaf0;border:1.5px solid #93806b;border-radius:17px 15px 17px 14px;box-shadow:0 2px 0 #bfa98a;height:42px;padding:0 17px;font-size:1.06rem}.utility.square{width:43px;padding:0}.icon{width:21px;height:21px;display:block;stroke:currentColor;fill:none;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.tools [data-icon],.reopen [data-icon]{display:block}.utility:active,.reopen:active{transform:translateY(2px);box-shadow:none}
.stage{container-type:size;min-height:0;position:relative;isolation:isolate;overflow:hidden}.floor{position:absolute;bottom:-1px;width:100%;height:28%;border-top:5px solid #cfb58d;box-shadow:0 -2px 0 #a7896480,inset 0 2px 0 #ffefd0,inset 0 9px 12px -10px #88683d}.floor-0{background-color:#ebd2a9;background-image:repeating-linear-gradient(1deg,transparent 0 44px,#bd9b733e 45px 46px,transparent 47px 49px),repeating-linear-gradient(95deg,transparent 0 220px,#cba78133 221px 222px,transparent 223px 448px)}.floor-1{background-color:#ceb59d;background-image:repeating-linear-gradient(0deg,transparent 0 30px,#a0836a66 31px 32px),repeating-linear-gradient(95deg,transparent 0 133px,#a0836a33 133px 135px,transparent 136px 270px)}.floor-2{background-color:#e6e3cd;background-image:repeating-conic-gradient(#c7ceb4 0 25%,transparent 0 50%);background-size:68px 34px}.floor-3{background-color:#ebd5bd;background-image:repeating-conic-gradient(#ccab91 0 25%,transparent 0 50%);background-size:56px 28px}.floor-4{background-color:#d5d4c9;background-image:repeating-linear-gradient(0deg,transparent 0 34px,#9d9c902e 35px 36px),repeating-linear-gradient(100deg,transparent 0 72px,#9d9c902e 73px 74px)}
#scene{position:absolute;width:min(96cqw,213cqh,1080px);aspect-ratio:2.13;left:50%;bottom:1%;transform:translateX(-50%);isolation:isolate}
.piece,.pet{display:block;border:0;padding:0;background:transparent;position:absolute;line-height:0;transform-origin:50% 96%}.piece img,.pet img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.piece:focus-visible,.pet:focus-visible{outline:2px dashed #826c50;outline-offset:2px;border-radius:20%}.piece.swap img{animation:settle .32s ease-out}.wall-art{width:10%;height:22%;left:49%;top:1%;transform:rotate(2deg)}.rug{left:18%;width:64%;height:35%;bottom:1.5%}.rug img{object-fit:fill}.lamp{left:7.5%;width:14.8%;height:66%;bottom:16.5%}.lamp img,.plant img,.toy img{object-position:bottom}.plant{right:7.5%;width:17%;height:39%;bottom:16%}.toy{right:18%;width:7%;height:13%;bottom:4.5%}.seat{position:absolute;left:50%;bottom:17%;transform:translateX(-50%);width:45%}.sofa{position:relative;width:100%}.pet{width:33%;bottom:var(--anchor,40%);z-index:2}.pet img{transform-origin:50% 94%;animation:breathing 5s ease-in-out infinite}.pet[data-pet=yoyo] img{animation-delay:-2s}.pet-name{position:absolute;left:50%;top:2%;transform:translate(-50%,-85%);background:var(--sheet);border:1px solid var(--edge);border-radius:45% 45% 45% 30%;padding:6px 10px 8px;white-space:nowrap;font:1.03rem/1 var(--hand);color:#82543f;opacity:0;pointer-events:none}.pet.reacting .pet-name{animation:bubble 1.35s both}.pet:focus-visible .pet-name{opacity:1}.reopen{position:absolute;z-index:4;bottom:16px;right:4%;height:42px}
#game::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(150deg,rgba(69,57,98,.28),rgba(125,90,103,.15));opacity:0;transition:opacity .6s}#game.evening::after{opacity:1}.evening .lamp:before{content:"";position:absolute;inset:-26% -44% 25%;z-index:-1;background:radial-gradient(ellipse,#fff3a78f,transparent 69%)}.drawer,header{z-index:3}
.drawer{background:var(--sheet);border-top:1.5px solid #a99477;box-shadow:0 -3px 0 #eee2c966;position:relative;padding:12px 0 max(11px,env(safe-area-inset-bottom));border-radius:21px 23px 0 0;margin-top:-2px}
.drawer-inner{width:min(1140px,94%);margin:auto}.drawer-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}.drawer-heading h2{display:flex;align-items:center;gap:8px;font-size:1.46rem;line-height:1.2}.drawer-heading .icon{width:24px;height:24px;color:#8b6b4f}.tuck,.shelf-arrow{display:grid;place-items:center;border:1px solid #d3c4ae;background:#f8f0df;border-radius:50%;padding:0;width:30px;height:30px}.tuck{border:0;background:transparent;width:38px}.categories{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;padding:2px 2px 8px;border-bottom:1px dashed #cab89e}.categories::-webkit-scrollbar,.items::-webkit-scrollbar{display:none}.category{display:flex;gap:5px;align-items:center;justify-content:center;border:1px solid transparent;background:transparent;border-radius:10px 12px 9px 11px;font-size:1.04rem;white-space:nowrap;padding:5px 12px}.category .icon{width:18px;height:18px}.category[aria-pressed=true]{background:#e5ead7;border-color:#a5b293;color:#495b3a}.shelf{position:relative}.items{display:flex;gap:9px;padding:10px 2px 2px;overflow:auto;scrollbar-width:none;overscroll-behavior-x:contain;scroll-snap-type:x proximity}.choice{position:relative;flex:0 0 118px;height:97px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:7px 5px 4px;background:#f6efdf;border:1px solid #ddcfb8;border-radius:12px 14px 11px 13px;scroll-snap-align:start;font-size:1rem;line-height:1.22}.choice[aria-pressed=true]{border:2px solid #87936d;background:#edf0df;padding:6px 4px 3px}.choice[aria-pressed=true]::after{content:"✓";position:absolute;top:3px;right:5px;border-radius:50%;width:14px;height:14px;color:white;background:#72845d;font:11px/14px sans-serif;text-align:center}.thumb{width:100%;height:59px;display:flex;align-items:center;justify-content:center}.thumb img{max-height:100%;max-width:93%;object-fit:contain}.thumb.swatch{height:53px;width:80%;border:1px solid #c9baa6;border-radius:6px}.thumb .icon{color:#998b79}.thumb.duo img{width:44%;object-fit:contain}.thumb.duo img+img{margin-left:-5px}.shelf-arrow{position:absolute;z-index:2;top:37%;box-shadow:0 1px 3px #715e4040;background:#fffaf0;right:-13px}.shelf-arrow:first-child{right:auto;left:-13px}#wardrobe-owner{display:flex;align-items:center;gap:4px;margin-top:7px}#wardrobe-owner button{border:1px solid #d5c7b2;background:#faf4e7;padding:2px 14px;border-radius:15px;font-size:.99rem}#wardrobe-owner [aria-pressed=true]{background:#dfebda;border-color:#a5b293}
@keyframes settle{0%{transform:translateY(-4px) scale(.98)}65%{transform:translateY(1px) scale(1.01)}100%{transform:none}}@keyframes breathing{50%{transform:scale(1.006,1.014)}}@keyframes bubble{0%{opacity:0;translate:0 5px}16%,76%{opacity:1;translate:0 0}100%{opacity:0;translate:0 -4px}}
@media(hover:hover){.category:hover,.tuck:hover{background:#f0e8d7}.choice:hover{border-color:#a3977e}.piece:hover img{filter:brightness(1.045)}.utility:hover{background:#fffdf6}.pet:hover img{filter:brightness(1.04)}}
@media(max-width:760px){header{padding:14px 15px 4px}.tools{gap:7px}.utility{height:39px;padding-inline:11px}.utility.square{width:39px}.drawer-inner{width:94%}.category{padding:6px 10px}.choice{flex-basis:100px;height:88px}.thumb{height:53px}#scene{width:min(98cqw,200cqh)}.drawer-heading{margin-bottom:5px}}
@media(max-width:600px) and (orientation:portrait){
 #game{min-height:570px;grid-template-rows:auto minmax(235px,1fr) auto}
 header{padding-top:max(16px,env(safe-area-inset-top));align-items:center}h1{font-size:1.8rem}.shuffle-label{display:none}#shuffle{width:39px;padding:0}
 #scene{width:100cqw;height:min(96cqh,109cqw);aspect-ratio:auto;bottom:2%}.seat{width:63%;bottom:18%}
 .wall-art{width:17%;height:17%;left:45%;top:6%}.lamp{width:19%;height:50%;left:0;bottom:21%}.plant{width:21%;height:29%;right:0;bottom:20%}.rug{width:83%;left:8.5%;height:24%;bottom:5%}.toy{width:10%;height:9%;right:11%;bottom:6%}.floor{height:23%}
 .drawer{padding-top:9px}.drawer-heading h2{font-size:1.33rem}.drawer-inner{width:100%}.drawer-heading{padding-inline:16px 8px}.categories,.items{padding-left:14px;padding-right:14px}.categories{gap:3px}.category{padding:6px 10px;font-size:1rem}.items{gap:7px;scroll-padding-left:14px}.shelf-arrow{display:none}#wardrobe-owner{padding-left:15px}.choice{flex-basis:96px}
}
@media(max-height:560px) and (orientation:landscape){#game{height:auto;min-height:100svh;grid-template-rows:48px minmax(245px,57svh) auto}header{padding-top:5px}h1{font-size:1.65rem}.drawer{padding-block:5px}.drawer-heading{margin-bottom:0}.choice{height:78px}.thumb{height:42px}#game.drawer-closed{height:100svh;grid-template-rows:48px 1fr}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.pet.reacting .pet-name{opacity:1}}
#scene{--seat-width:45%}
@media(max-width:600px) and (orientation:portrait){#scene{--seat-width:63%}}
#game{grid-template-columns:minmax(0,1fr)}
.stage,.drawer,.drawer-inner,.shelf{min-width:0}
.drawer-actions{display:flex;align-items:center;gap:9px}.drag-guide,.reset-layout{color:#746451;font:1rem/1 var(--hand)}.reset-layout{padding:6px 8px;border:1px solid #d6c7ad;border-radius:10px;background:transparent}.stage .piece,.stage .pet{touch-action:none;cursor:grab;user-select:none}.stage .dragging,.stage .dragging *{cursor:grabbing}.stage .dragging{filter:drop-shadow(0 4px 2px #59433030)}.stage .pet.dragging img{animation:none}
h1 .room-suffix{font:inherit;color:inherit;margin-left:-.17em}#study-strip{position:absolute;top:8px;left:50%;transform:translateX(-50%);z-index:5;max-width:94%;width:max-content}#study-manage{display:flex;align-items:center;gap:10px;border:1px solid #b8a990;border-radius:13px 11px 13px 10px;padding:7px 14px;background:#fffaef;box-shadow:0 2px 0 #bbac942e;max-width:100%;font-size:1.1rem}.clock-rule{width:1px;height:17px;background:#d7c7aa}#study-task{max-width:min(35vw,340px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#study-phase{color:#70624e;font-size:1rem}#study-count{font-family:ui-rounded,"Trebuchet MS",sans-serif;font-variant-numeric:tabular-nums;font-size:1.05rem;font-weight:600}#study-toggle{background:#dfebcf;color:#415035;border-color:#84956e;box-shadow:0 2px 0 #abb998}
@media(max-width:700px){.tools{gap:5px}.tools .utility{height:36px}.tools .square,#shuffle{width:35px}.tools .icon{width:18px;height:18px}.shuffle-label{display:none}#shuffle{padding:0}.focus-button{padding:0 8px;gap:4px}.focus-button .icon{width:15px}h1{font-size:1.65rem}}
@media(max-width:500px){h1 .room-suffix{display:none}.tools .utility{border-radius:12px}header{padding-inline:12px;gap:5px}h1{font-size:1.55rem}#study-strip{top:12px}}
@media(max-width:350px){header{padding-inline:9px}.housemark{width:23px}h1{font-size:1.32rem}.tools{gap:4px}.tools .square,#shuffle{width:31px}.tools .utility{height:34px}.focus-button .icon{display:none}}
.pet.in-motion img{animation:none;transform-origin:50% 96.875%}
.dish{width:7%;height:9%;bottom:7.5%}.dish img{object-position:bottom}.food-dish{left:25%}.water-dish{right:29%}.toy{right:13%;bottom:4%}.pet.napping img{scale:var(--nap-scale,1);animation:nap-breath 4.6s ease-in-out infinite;transform-origin:50% 97%}@keyframes nap-breath{50%{transform:scale(1.001,1.013)}}
@media(max-width:600px) and (orientation:portrait){.dish{width:10%;height:6.8%;bottom:10.5%}.food-dish{left:15%}.water-dish{right:19%}.toy{right:7%;bottom:4%}}
@media(prefers-reduced-motion:reduce){.pet.napping img{animation:none}}
