:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",sans-serif;color:#473c33;background:#f5f0e8;font-synthesis:none;--line:#e4dace;--accent:#77634d}*{box-sizing:border-box}body{margin:0}main{max-width:1040px;margin:auto;padding:22px 22px 30px}header,.panelhead{display:flex;align-items:center;justify-content:space-between;gap:12px}header{margin-bottom:17px}h1,h2,p{margin:0}h1{font-size:clamp(27px,5vw,40px);letter-spacing:.06em;line-height:1.3}header p{font-size:13px;color:#8a796a;margin-top:5px}.eyebrow{font-size:10px;letter-spacing:.18em;color:#967e66;font-weight:700}.version{font-size:11px;color:#8d7c6d;border:1px solid var(--line);border-radius:99px;padding:6px 10px}#stage{height:clamp(350px,61vh,650px);position:relative;background:#e5d8c8;border:1px solid #ded1c1;border-radius:22px;overflow:hidden;isolation:isolate}canvas{display:block;width:100%;height:100%;touch-action:none;outline:none}#loading{position:absolute;inset:0;z-index:4;background:#e9dfd0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:13px;padding:22px;text-align:center}#loading[hidden]{display:none}progress{width:min(72%,240px);accent-color:#9b8269}#loading small{font-size:12px;color:#786c60}#state{position:absolute;top:13px;left:13px;padding:7px 11px;border-radius:99px;background:#fffaf1e8;font-size:12px;pointer-events:none}.tools{position:absolute;right:12px;bottom:12px;display:flex;gap:7px}.tools button{background:#fffaf1e8;font-size:12px;min-height:40px}.hint{font-size:12px;line-height:1.7;color:#8a796a;margin:9px 2px}.panel{background:#fffcf6;border:1px solid var(--line);border-radius:16px;padding:17px;margin-top:14px}h2{font-size:18px}.actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:8px;margin:13px 0}button,select{font:inherit;color:inherit;border:1px solid #e2d5c6;border-radius:10px;background:#f7efe4;padding:10px 13px;min-height:42px;cursor:pointer}button{font-size:13px}button:hover:not(:disabled){background:#eadcca}button.active,button[aria-pressed=true]{background:#796650;color:#fff;border-color:#796650}button:disabled,select:disabled,input:disabled{opacity:.48;cursor:default}button:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid #96795b;outline-offset:2px}.settings,.debug{display:flex;gap:14px;flex-wrap:wrap;align-items:center;border-top:1px solid var(--line);padding-top:12px;font-size:13px}.settings label,.debug label{display:flex;align-items:center;gap:5px}input[type=checkbox],input[type=range]{accent-color:#796650}summary{cursor:pointer;font-size:14px;font-weight:600}.debug select{max-width:100%;flex:1}.timeline{display:block;margin-top:12px;font-size:12px}.timeline output{float:right}.timeline input{display:block;width:100%;margin-top:9px}footer{text-align:center;color:#978679;font-size:12px;margin-top:23px}@media(max-width:600px){main{padding:13px 12px 22px}#stage{height:clamp(320px,55dvh,510px);border-radius:16px}.panel{padding:13px}.actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.actions button{padding:8px 3px;font-size:12px}.settings{gap:9px}.tools{bottom:9px;right:9px}.panelhead button{font-size:12px;padding:8px}}

#petStatus{position:absolute;top:13px;right:13px;padding:7px 12px;border-radius:99px;background:#fffaf1e8;font-size:12px;pointer-events:none}#petStatus[hidden]{display:none}canvas.petting{cursor:grabbing}

canvas.lifting{cursor:grabbing}

.custom-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px}.custom-field{display:flex;flex-direction:column;gap:7px;font-size:13px;min-width:0}.custom-field output{font-variant-numeric:tabular-nums;color:#8a796a}.custom-field input[type=range]{width:100%;min-height:34px}.fur-row{display:flex;flex-wrap:wrap;gap:5px;align-items:center}.fur-row button{padding:6px 9px;min-height:36px}.fur-row input[type=color]{width:40px;height:36px;padding:2px;border:1px solid var(--line);border-radius:8px;background:#fff;cursor:pointer}@media(max-width:600px){.custom-grid{grid-template-columns:1fr}}

.sound-settings{display:flex;align-items:center;gap:15px;margin-top:12px}.sound-settings label{flex:1;min-width:0;font-size:13px}.sound-settings output{float:right;color:#8a796a}.sound-settings input{display:block;width:100%;margin-top:8px;min-height:32px}

[hidden]{display:none!important}.complete-button{display:block;width:100%;margin-top:18px;background:#796650;color:#fff;border-color:#796650;font-weight:700;min-height:50px}.complete-button:hover:not(:disabled){background:#65523f}.floating-heart{position:absolute;z-index:3;pointer-events:none;color:#dc8499;font-size:clamp(23px,4vw,32px);line-height:1;text-shadow:0 1px 3px #fff9;will-change:transform,opacity;user-select:none}body.in-room #stage{height:clamp(380px,70dvh,720px)}@media(max-width:600px){body.in-room #stage{height:clamp(340px,62dvh,580px)}}

.cat-roster{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.cat-select::before{content:"";display:inline-block;width:15px;height:15px;border:1px solid #aa998a;background:var(--cat-color);border-radius:50%;vertical-align:middle;margin-right:7px}#cancelDraft{width:100%;margin-top:8px}

/* Release room: a single edge-to-edge canvas, with minimal overlays. */
html:has(body.in-room),body.in-room{overflow:hidden;overscroll-behavior:none;background:#e5d8c8}
body.in-room main{max-width:none;width:100%;height:100dvh;margin:0;padding:0}
body.in-room main>:not(#stage){display:none!important}
body.in-room #stage{position:fixed;inset:0;width:100%;height:100vh;height:100dvh;border:0;border-radius:0;overflow:hidden}
body.in-room #stage #state,body.in-room #stage #petStatus,body.in-room #stage .tools{display:none!important}
.room-title{position:absolute;z-index:3;top:calc(env(safe-area-inset-top,0px) + 18px);left:calc(env(safe-area-inset-left,0px) + 22px);pointer-events:none;text-shadow:0 1px 5px #fff8}
.room-title h1{font-size:clamp(24px,4vw,36px);line-height:1.15;letter-spacing:.08em;color:#57483b}
.room-title .eyebrow{color:#77634d;font-size:10px}
.room-menu{position:absolute;z-index:5;bottom:calc(env(safe-area-inset-bottom,0px) + 18px);left:50%;transform:translateX(-50%);width:min(360px,calc(100% - 28px));display:flex;flex-direction:column;align-items:center;gap:10px;pointer-events:none}
.room-menu button,.room-popover{pointer-events:auto}
.room-menu-toggle{display:flex;align-items:center;justify-content:center;gap:10px;padding:11px 19px;min-height:46px;border-radius:999px;background:#fffaf1ed;box-shadow:0 3px 16px #48372424;color:#655442;border:1px solid #e5d8c6;font-weight:600}
.menu-lines{display:flex;flex-direction:column;gap:4px;width:16px}.menu-lines i{width:100%;height:1.5px;border-radius:2px;background:currentColor}
.room-popover{width:100%;padding:16px;background:#fffcf7f5;border:1px solid #e4dace;border-radius:18px;box-shadow:0 8px 35px #48372426;max-height:calc(100dvh - 120px);overflow:auto;overscroll-behavior:contain}
.room-menu-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.room-menu-head h2{font-size:16px}.room-menu-head span{font-size:12px;color:#8a796a;white-space:nowrap}
.room-menu-actions{display:grid;gap:8px;grid-template-columns:1fr 1fr}.room-menu-actions button{font-size:12px;min-width:0;padding:9px 5px}
.room-popover .cat-roster button{flex:1;min-width:0;padding:9px 5px}.room-popover .cat-roster{margin:12px 0}
@media(max-width:600px){.room-title{top:calc(env(safe-area-inset-top,0px) + 12px);left:calc(env(safe-area-inset-left,0px) + 14px)}.room-menu{bottom:calc(env(safe-area-inset-bottom,0px) + 12px)}}
