@font-face{font-family:Garden;src:url('fonts/NotoSansJP.ttf') format('truetype');font-display:swap;font-weight:100 900}
:root{--paper:#faf7ee;--ink:#3e4b39;--muted:#757d68;--green:#526d49;--line:#dcdcca;--field:#e5ead8;--honey:#b28955;--shadow:0 10px 40px #46563718;font-family:Garden,'Yu Gothic',sans-serif;color:var(--ink);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:var(--field);overflow:hidden}button,input,select{font:inherit}button{color:inherit;border:0;cursor:pointer}button:disabled{opacity:.48;cursor:wait}button,input,select,summary{outline-offset:4px}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #ae7a32}button{touch-action:manipulation}button:hover:not(:disabled){filter:brightness(.97)}button:active:not(:disabled){transform:translateY(1px)}button svg,svg.dialog-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}svg{overflow:visible}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}h1,h2,p{margin:0}h2{font-size:21px;font-weight:650;letter-spacing:.05em}p{line-height:1.9}#app{height:100dvh;position:relative;isolation:isolate}#world{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}#canvas{display:block;width:100%;height:100%;outline:none;touch-action:none}#home-screen{position:absolute;inset:0;background:linear-gradient(90deg,#f6f3e9fc 0%,#f6f3e9f8 31%,#f6f3e96b 59%,#f6f3e900 90%);display:flex;align-items:center;padding:38px 8vw}#home-screen:after{content:'';position:absolute;inset:20px;border:1px solid #ffffff6b;border-radius:12px;pointer-events:none}.home-paper{width:380px;max-width:45%;text-align:center;z-index:1}.home-flourish{font-size:12px;letter-spacing:.22em;color:#7a8464;display:flex;justify-content:center;align-items:center}.home-flourish svg{width:21px;height:21px;stroke:#829267;fill:none;stroke-width:1.5}h1{font-weight:700;font-size:51px;line-height:1.4;letter-spacing:.12em;margin:17px 0;color:#526448}h1 span{font-size:67px;letter-spacing:.1em}.home-description{font-size:14px;letter-spacing:.09em;line-height:2.05;color:#727966}.home-pets{height:100px;display:flex;align-items:center;justify-content:center;margin:1px 0 8px}.home-pets img{width:114px;height:76px;object-fit:contain}.home-pets img:nth-child(2){width:140px;height:94px;margin:0 -19px;position:relative;z-index:1}.home-pets img:last-child{transform:scaleX(-1)}.primary{background:var(--green);color:#fffdf4;border:1px solid #526d49;border-radius:12px;min-height:48px;padding:12px 22px;display:inline-flex;align-items:center;justify-content:center;gap:10px;font-weight:600;letter-spacing:.04em;box-shadow:0 3px 0 #3c533834}.start-button{width:100%;font-size:17px;padding:16px 20px;border-radius:16px}.arrow{margin-left:auto;font-size:24px;font-weight:400}.start-button>svg{margin-right:auto}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:transparent;padding:12px 8px;min-height:44px;font-size:13px;text-decoration:underline;text-underline-offset:5px}.home-paper>.text-button{margin:12px 0 8px}.save-note{font-size:11px;color:#818774;display:flex;align-items:center;justify-content:center;gap:7px;letter-spacing:.015em}.save-note svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5}.quiet{background:transparent;padding:10px;font-size:12px;color:#68765b;min-height:44px}.home-paper>.quiet{font-size:11px;min-height:32px}.home-caption{position:absolute;right:9vw;bottom:12vh;color:#68785c;font-size:13px;letter-spacing:.08em;display:flex;align-items:center;gap:9px}.dot{display:inline-block;width:6px;height:6px;background:#88a270;border-radius:50%;flex-shrink:0}.progress-track{height:3px;background:#e2e2d5;border-radius:4px;overflow:hidden;margin:12px 0 6px}.progress-track span{height:100%;display:block;width:0;background:#849868;transition:width .2s}#load-label{font-size:10px;color:var(--muted)}
.topbar{position:absolute;top:0;left:0;right:0;height:78px;padding:0 max(34px,env(safe-area-inset-left));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #cbd2bc75;background:#f5f3e8cc;gap:14px}.brand{display:flex;align-items:center;gap:12px;background:none;font-size:18px;font-weight:650;letter-spacing:.08em;padding:10px 0;white-space:nowrap}.brand svg{width:26px;height:26px;color:#6d8959}.day-note{display:flex;align-items:center;gap:12px;color:#6f7c60;font-size:12px;white-space:nowrap}.day-note svg{width:20px;height:20px;fill:none;stroke:#ad985f;stroke-width:1.5}.divider{height:12px;width:1px;background:#c5ceb6}.top-actions{display:flex;align-items:center;gap:8px}#save-status{font-size:11px;color:#778567;white-space:nowrap}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;background:transparent;border-radius:12px}.icon-button:hover{background:#e4e8d8}.garden-heading{position:absolute;left:5.5vw;top:108px;pointer-events:none}.eyebrow{font-size:10px;letter-spacing:.14em;color:#829071;font-weight:500}.garden-heading h2{font-size:22px;font-weight:500;letter-spacing:.13em;margin-top:7px}.activity{position:absolute;top:121px;right:5.5vw;display:flex;align-items:center;gap:8px;color:#768262;font-size:11px;pointer-events:none}.bottom-bar{position:absolute;left:3vw;right:3vw;bottom:max(24px,env(safe-area-inset-bottom));height:82px;display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:#faf8eeed;border:1px solid #dcdccb;border-radius:22px;box-shadow:var(--shadow);gap:18px}.resident-chips{display:flex;gap:9px}.resident-chip{display:flex;align-items:center;gap:4px;padding:4px 12px 4px 2px;border-radius:12px;background:transparent;font-size:12px;min-height:46px}.resident-chip img{width:55px;height:37px;object-fit:contain}.main-actions{display:flex;gap:12px}.tool-button{background:transparent;display:flex;align-items:center;gap:10px;min-height:50px;padding:12px 18px;border-radius:13px;font-size:13px;white-space:nowrap}.tool-button:first-child{background:#e7ecd9;color:#4d6540}.tool-button[aria-pressed=true]{background:#e1e6d0}.names-button{font-size:11px;white-space:nowrap}.drawer{position:absolute;left:3vw;right:3vw;bottom:20px;background:var(--paper);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);padding:18px 22px;max-height:42vh;z-index:4}.drawer-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.drawer-head h2{font-size:18px;margin-top:3px}.drawer-head .eyebrow{font-size:10px}.row{display:flex;align-items:center;gap:8px}.compact{min-height:42px;padding:9px 17px;border-radius:11px;font-size:12px}.editor-body{display:flex;gap:22px;margin-top:12px}.catalog-area{flex:1;min-width:0}.categories{display:flex;gap:4px;margin-bottom:8px}.categories button{background:transparent;padding:8px 16px;border-radius:8px;font-size:11px;min-height:38px}.categories button[aria-pressed=true]{background:#e6ead8;color:#49613e}.catalog{display:flex;overflow-x:auto;gap:9px;padding:1px 2px 7px;scrollbar-width:thin;scrollbar-color:#b2bfa1 #efefe3}.catalog button{flex:0 0 110px;border:1px solid #e2e2d2;border-radius:12px;background:#f5f3e8;padding:3px 5px 10px;font-size:10px;line-height:1.5}.catalog button[aria-pressed=true]{outline:2px solid #7b945d;background:#eaf0dd}.catalog img{width:86px;height:70px;object-fit:contain;display:block;margin:0 auto}.selection-panel{width:237px;border-left:1px solid var(--line);padding-left:22px;flex-shrink:0}.selection-panel label{display:block;font-size:10px;color:var(--muted);margin-bottom:6px}.selection-panel select{width:100%;font-size:12px;background:white;border:1px solid var(--line);border-radius:8px;padding:7px;color:var(--ink);min-height:36px}.selection-panel p{font-size:10px;margin:10px 0;color:var(--muted)}.small-button{border:1px solid #d4d8c7;background:#f7f7ed;border-radius:9px;padding:9px 13px;font-size:12px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px}.move-pad{display:flex;gap:6px;margin-top:9px}.move-pad button{width:42px;height:36px;border:1px solid var(--line);background:#fffdf5;border-radius:7px}#item-count{font-size:11px;color:var(--muted);margin-left:9px;font-weight:400}#placement-hint{position:absolute;top:178px;left:50%;transform:translateX(-50%);background:#fcfaefe8;border:1px solid #d1dbc1;padding:10px 12px 10px 18px;border-radius:13px;font-size:12px;display:flex;gap:12px;align-items:center;z-index:5;white-space:nowrap}#placement-hint button{background:#e7ecd9;padding:8px;border-radius:6px;font-size:11px;min-height:34px}.pet-panel{position:absolute;right:3vw;top:101px;bottom:126px;width:310px;border:1px solid var(--line);border-radius:18px;background:#fbf9f0f5;padding:20px;box-shadow:var(--shadow);overflow-y:auto;z-index:3}.muted{color:var(--muted);font-size:13px}.pet-panel>.muted{font-size:11px;margin:7px 0 15px}.pet-card{display:flex;align-items:center;width:100%;background:none;border:1px solid transparent;border-bottom-color:#e2e4d4;padding:10px 7px;text-align:left;gap:12px;min-height:75px}.pet-card img{width:85px;height:57px;object-fit:contain}.pet-card strong{font-weight:600;font-size:14px}.pet-card small{display:block;margin-top:4px;color:var(--muted);font-size:11px}.pet-card[aria-pressed=true]{border:1px solid #c4d3b3;background:#edf1e2;border-radius:12px}.diary{margin-top:20px;border-top:1px dashed #ced5bc;padding-top:15px}.diary ul{list-style:none;padding:0;margin:8px 0 0}.diary li{font-size:11px;color:#7e856f;line-height:1.8;margin-bottom:8px}.diary li:before{content:'・';color:#97a780}#rename-form{margin-top:16px}#rename-form label{font-size:11px;color:var(--muted);display:block;margin-bottom:5px}input{min-width:0;border:1px solid #cfd7bf;background:#fffef9;border-radius:8px;padding:10px;color:var(--ink);width:100%}#call-pet{margin-top:12px;width:100%}
dialog{position:fixed;border:1px solid var(--line);border-radius:22px;padding:33px;width:min(440px,calc(100vw - 32px));background:var(--paper);color:var(--ink);max-height:88dvh;overflow-y:auto;box-shadow:0 22px 90px #273b2633}dialog::backdrop{background:#35402f65;backdrop-filter:blur(4px)}dialog h2{font-size:22px;line-height:1.5;margin:13px 0}dialog p{font-size:13px;margin:12px 0}dialog>.primary{width:100%;margin:7px 0}dialog .small{font-size:11px}dialog details{margin-top:18px;border-top:1px solid var(--line);padding-top:15px;font-size:11px}dialog details p{margin-bottom:0}.dialog-close{position:absolute;right:11px;top:11px}.dialog-icon{color:#7c925d;width:30px!important;height:30px!important}.file-button{width:100%;margin-top:6px;cursor:pointer}.file-button input{position:absolute;clip-path:inset(50%);width:1px;height:1px;padding:0}.file-button:focus-within{outline:3px solid #ae7a32}#install-instructions{padding:12px 15px;background:#e9eddc;border-radius:12px;margin:14px 0;font-size:13px;line-height:2}#toast{position:fixed;bottom:120px;left:50%;transform:translateX(-50%);background:#485e40f5;color:#fffdf3;padding:12px 22px;border-radius:12px;box-shadow:var(--shadow);font-size:12px;max-width:85vw;z-index:20}
body.editing .bottom-bar{display:none}body.editing #world{bottom:190px}body.editing .garden-heading,body.editing .activity{display:none}body.editing #placement-hint{top:91px}body.editing .topbar{height:65px}
@media(min-width:1600px){.home-paper{width:425px}h1{font-size:59px}h1 span{font-size:76px}.home-description{font-size:16px}.home-pets{height:125px}}
@media(max-width:1080px){.resident-chips{gap:0}.resident-chip{padding:3px 7px 3px 0}.resident-chip img{width:44px;height:30px}.names-button{display:none}.bottom-bar{padding:10px 15px}.main-actions{gap:5px}.tool-button{padding:10px 13px}.day-note{font-size:10px;gap:9px}.brand{font-size:16px}.garden-heading h2{font-size:19px}.activity{top:148px;left:5.5vw;right:auto}.selection-panel{width:210px;padding-left:15px}.drawer{padding:14px 16px}.editor-body{gap:15px}.catalog button{flex-basis:96px}.catalog img{width:78px;height:63px}}
@media(orientation:landscape) and (max-height:600px){#home-screen{padding:15px 7vw}.home-paper{width:310px;max-width:45%}.home-flourish{font-size:9px}h1{font-size:30px;margin:9px 0;line-height:1.35}h1 span{font-size:43px}.home-description{font-size:10px;line-height:1.9}.home-pets{height:64px;margin:0}.home-pets img{width:83px;height:55px}.home-pets img:nth-child(2){width:104px;height:69px}.start-button{font-size:13px;min-height:44px;padding:8px 14px;border-radius:12px}.home-paper>.text-button{margin:3px 0 0;font-size:10px;min-height:36px;padding:7px}.save-note{font-size:9px}.home-paper>.quiet{font-size:9px;min-height:25px;padding:4px}.home-caption{font-size:10px;right:7vw;bottom:10vh}#home-screen:after{inset:10px}#load-label{font-size:9px}.progress-track{margin:7px 0 3px}.topbar{height:53px;padding:0 max(18px,env(safe-area-inset-left))}.brand{font-size:13px;gap:7px}.brand svg{width:20px;height:20px}.top-actions{gap:1px}.top-actions .icon-button{width:40px;height:42px}#save-status{font-size:9px}.day-note{font-size:10px;gap:7px}.garden-heading{top:69px;left:4vw}.garden-heading h2{font-size:14px;margin-top:3px}.garden-heading .eyebrow{font-size:8px}.activity{top:80px;right:4vw;left:auto;font-size:9px;max-width:45%}.bottom-bar{left:2vw;right:2vw;bottom:max(9px,env(safe-area-inset-bottom));height:58px;border-radius:15px;padding:5px 13px;gap:7px}.resident-chip{font-size:10px;gap:0;min-height:44px}.resident-chip img{width:44px;height:30px}.tool-button{font-size:10px;gap:6px;padding:8px 10px;min-height:44px}.tool-button svg{width:19px;height:19px}.drawer{bottom:8px;left:2vw;right:2vw;padding:9px 12px;border-radius:13px;max-height:44vh}.drawer-head>.row{gap:3px}.drawer-head h2{font-size:13px;margin-top:0}.drawer-head .eyebrow{display:none}.drawer-head .icon-button{height:33px;width:38px}.compact{min-height:34px;font-size:10px;padding:6px 11px}.editor-body{margin-top:4px;gap:12px}.categories{margin-bottom:3px}.categories button{min-height:27px;font-size:9px;padding:4px 13px}.catalog{gap:6px;padding-bottom:3px}.catalog button{flex-basis:80px;font-size:8px;padding:0 3px 5px;border-radius:8px}.catalog img{width:66px;height:48px}.selection-panel{width:200px;padding-left:12px}.selection-panel label{font-size:9px;margin-bottom:3px}.selection-panel select{font-size:10px;min-height:28px;padding:3px 6px}.selection-panel p{font-size:9px;line-height:1.6;margin:4px 0}.selection-panel .small-button{font-size:9px;padding:4px 8px;min-height:28px}.move-pad{margin-top:5px}.move-pad button{height:26px;width:35px}.selection-panel:has(#selection-actions:not([hidden])) #selection-help{display:none}body.editing #world{bottom:128px}body.editing .topbar{height:45px}body.editing #placement-hint{top:50px;padding:5px 8px;font-size:10px}#placement-hint button{font-size:9px;min-height:27px;padding:4px}.pet-panel{top:63px;bottom:77px;width:265px;padding:12px 15px;right:2vw;border-radius:14px}.pet-panel h2{font-size:14px}.pet-panel .drawer-head .icon-button{height:28px}.pet-panel>.muted{margin:1px 0 5px;font-size:9px}.pet-card{padding:3px 5px;min-height:51px;gap:8px}.pet-card img{width:62px;height:42px}.pet-card strong{font-size:11px}.pet-card small{font-size:9px;margin-top:1px}.diary{margin-top:10px;padding-top:7px}.diary li{font-size:9px;margin-bottom:4px}#rename-form{margin-top:8px}#rename-form input{padding:6px;font-size:11px}#call-pet{font-size:10px;min-height:30px;margin-top:7px}#toast{bottom:80px;font-size:10px;padding:9px 16px}dialog{padding:22px 28px;max-height:90dvh}dialog h2{font-size:18px;margin:8px 0}dialog p{font-size:11px;line-height:1.8;margin:8px 0}.dialog-icon{width:23px!important;height:23px!important}}

@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Reserve real canvas space for editing instead of covering the habitat. */
body.editing #world{bottom:290px}
@media(orientation:landscape) and (max-height:600px){
 .garden-heading h2{display:none}.garden-heading{top:64px}.activity{top:65px}
 body.editing #world{bottom:0;right:280px}
 body.editing .drawer{left:auto;right:8px;top:53px;bottom:8px;width:264px;max-height:none;padding:10px 12px}
 body.editing .drawer-head h2{font-size:12px;letter-spacing:0}
 body.editing .drawer-head #item-count{display:none}
 body.editing .drawer-head .compact{min-height:36px;padding:6px 9px}
 body.editing .drawer-head .icon-button{width:30px}
 body.editing .editor-body{display:flex;flex-direction:column;gap:7px;max-height:calc(100% - 40px);overflow-y:auto}
 body.editing .categories{gap:0}
 body.editing .categories button{padding:6px 9px;min-height:32px}
 body.editing .catalog button{flex-basis:83px}
 body.editing .catalog img{height:52px}
 body.editing .selection-panel{width:auto;padding:7px 0 0;border-left:0;border-top:1px solid var(--line)}
 body.editing .selection-panel select{min-height:32px}
 body.editing .selection-panel .small-button{min-height:32px}
 body.editing .move-pad button{height:32px;width:46px}
 body.editing #selection-help{font-size:10px}
 body.editing #placement-hint{left:10px;right:286px;transform:none;top:54px;white-space:normal;flex-wrap:wrap;gap:5px;font-size:10px}
 body.editing #placement-hint button{font-size:9px}
}

/* Small resident portraits and a quiet, optional observation mode. */
button{transition:background-color .16s,border-color .16s,box-shadow .16s}
.tool-button:hover,.resident-chip:hover{background:#e9eddc}
.resident-chip.selected{background:#e7ecd9}
.resident-chip>span{text-align:left;line-height:1.6}
.resident-chip small{display:block;font-size:9px;color:#7c886c}
.resident-chip img{width:63px;height:42px}
.watch-button{display:flex;gap:14px;align-items:center;font-size:11px}
.watch-button span{font-size:18px;color:#85946c}
#exit-watch{position:absolute;right:30px;bottom:25px;border-color:#bccbac;background:#f9f8edce;color:#657953;z-index:5}
body.watching .topbar,body.watching .garden-heading,body.watching .activity,body.watching .bottom-bar{visibility:hidden;pointer-events:none}
#pet-list{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}
.pet-card{padding:6px 2px;min-height:90px;flex-direction:column;gap:0;text-align:center;border:1px solid #e3e5d5;border-radius:12px}
.pet-card img{width:75px;height:50px}
.pet-card strong{font-size:11px;font-weight:500}
.pet-card small{display:none}
.pet-portrait{display:flex;align-items:center;gap:5px;padding:14px 0 6px}
.pet-portrait img{width:132px;height:90px;object-fit:contain}
.pet-portrait h3{font-size:18px;font-weight:600;margin:0 0 3px}
#pet-coat{font-size:10px;color:#90977f;letter-spacing:.07em}
#pet-mood{font-size:11px;color:#61764e;margin-top:8px;white-space:nowrap}
.pet-detail-actions{display:flex;gap:4px;align-items:center;justify-content:space-between}
#call-pet{margin:0;width:auto;font-size:11px;flex:1;background:#edf0e2}
#rename-pet{font-size:10px;padding:8px;white-space:nowrap}
.diary summary{font-size:11px;color:#798965;cursor:pointer;min-height:28px}
#pet-panel #names{font-size:10px;padding:7px 0;min-height:34px}
.pet-panel{width:330px}
.catalog button{transition:background-color .15s,border-color .15s;position:relative}
.catalog button:hover{border-color:#9daf86;background:#edf1e2}
.catalog button[aria-pressed=true]:after{content:'✓';position:absolute;top:5px;right:5px;background:#678454;color:#fff;border-radius:50%;width:17px;height:17px;line-height:17px;font-size:11px}
@media(orientation:landscape) and (max-height:600px){
 .resident-chip img{width:46px;height:31px}.resident-chip small{font-size:8px;line-height:1.3}
 .watch-button{display:none}.pet-panel{width:282px;bottom:75px}
 .pet-panel>.muted{font-size:10px;margin-bottom:7px}
 .pet-card{min-height:57px;padding:2px}.pet-card img{width:54px;height:36px}.pet-card strong{font-size:10px}
 .pet-portrait{padding:6px 0 3px;gap:10px}.pet-portrait img{width:90px;height:60px}
 .pet-portrait h3{font-size:14px}#pet-mood{font-size:10px;margin-top:2px}#pet-coat{font-size:9px}
 #call-pet{min-height:34px;font-size:10px}.pet-detail-actions .quiet{min-height:34px}
 .diary{margin-top:9px;padding-top:7px}.diary summary{font-size:10px;min-height:25px}
 body.editing .catalog button{font-size:10px}body.editing .catalog img{height:47px}
 body.editing .selection-panel .small-button{font-size:10px}
 #exit-watch{right:18px;bottom:12px;font-size:10px;min-height:34px}
}

/* Indoor composition: a warm room framed by paper controls. */
:root{--field:#eee8dc;--line:#ddd6c6;--muted:#777363}
body{background:#eee8dc}
body.in-room #world{inset:150px 3vw 120px}
body.in-room.editing #world{inset:73px 3vw 292px}
body.in-room.watching #world{inset:15px 2vw 15px}
.topbar{background:#f6f2e8ed;border-bottom-color:#ded7c5}
.bottom-bar{border-color:#dfd7c6;background:#faf7edf5}
.garden-heading{top:94px}.garden-heading h2{font-size:20px;margin-top:4px}
.activity{top:112px}
.pet-panel{bottom:auto;max-height:calc(100dvh - 235px)}
#home-title span{letter-spacing:.14em}
@media(orientation:landscape) and (max-height:600px){
 body.in-room #world{inset:0 0 0}
 body.in-room.editing #world{inset:0 280px 0 0}
 body.in-room.watching #world{inset:0}
 .garden-heading,.activity{display:none}
 .pet-panel{bottom:auto;max-height:calc(100dvh - 138px)}
}
