:root{--lo:#8c8577;--ink:#1f1c18;--title-a:#4a2c63;--title-b:#a2456f}*{box-sizing:border-box}html,body{height:100%;margin:0}body{color:var(--ink);overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;background:#f5e2c8;font:12px/1.35 Tahoma,MS Sans Serif,Geneva,Verdana,sans-serif;overflow:hidden}h1,h2,p{margin:0}button,input{font:inherit;color:inherit}.toybox{background:#fffdf6;border:1px solid #3d3a3440;border-radius:10px;overflow:hidden;box-shadow:0 8px 28px #28190a38}.toybox-head{height:30px;color:var(--title-a);border-bottom:1px solid #efe6d6;align-items:center;gap:6px;padding:0 6px 0 10px;display:flex}.toybox-head h1{white-space:nowrap;text-overflow:ellipsis;flex:1;font-size:13px;font-weight:700;overflow:hidden}.paw{width:14px;height:14px;fill:var(--title-b);flex:none}.head-btn{cursor:pointer;background:0 0;border:0;border-radius:6px;width:22px;height:22px;padding:0;position:relative}.head-btn:hover{background:#f3ebdc}.head-btn:before{content:"";border-top:2px solid var(--ink);border-radius:1px;position:absolute;top:10px;left:6px;right:6px}.toybox.min .head-btn:before{border:1.5px solid var(--ink);border-top-width:2.5px;border-radius:2px;top:6px;bottom:6px}.hud{z-index:10;pointer-events:none;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px;padding:10px;display:flex;position:fixed;top:0;left:0;right:0}.hud-status,.hud-menu{pointer-events:auto;background:#fffdf6db;border:1px solid #3d3a3440;box-shadow:2px 3px #0000001f}.hud-status{gap:4px;min-width:0;max-width:100%;padding:6px 9px;display:grid}.hud-menu{gap:2px;padding:2px;display:flex}.hud-menu button{cursor:pointer;background:0 0;border:0;border-radius:6px;padding:4px 9px}.hud-menu button:hover{background:#f3ebdc}:focus-visible{outline:2px solid var(--title-b);outline-offset:1px}.room{touch-action:none;cursor:grab;width:100%;height:100%;display:block;position:fixed;inset:0}.room:active{cursor:grabbing}.room.tooling{cursor:none}.toybox{z-index:20;width:280px;max-width:calc(100vw - 16px);position:fixed;top:0;left:0}.toybox-head{cursor:move;touch-action:none}.toybox-body{gap:8px;padding:8px;display:grid}.toybox.min .toybox-head{border-bottom:0}.toybox.min .toybox-body{display:none}.palette{border-top:1px solid #efe6d6;flex-wrap:wrap;align-items:center;gap:5px;padding-top:8px;display:flex}.palette[hidden]{display:none}.swatch{cursor:pointer;border:2px solid #fff;border-radius:50%;width:22px;height:22px;padding:0;box-shadow:0 0 0 1px #3d3a3440}.swatch[aria-pressed=true]{box-shadow:0 0 0 2px var(--ink)}.wash{cursor:pointer;background:#fff;border:1px solid #d3c4ab;border-radius:6px;flex:1;padding:4px 8px}.wash:hover{background:#faf4e8}.shelf{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;display:grid}.slot{white-space:nowrap;touch-action:none;cursor:grab;background:#fff;border:1px solid #e6dccb;border-radius:8px;flex-direction:column;align-items:center;min-width:0;padding:4px 0 3px;font-size:11px;display:flex}.slot:hover{background:#fffaf1;border-color:#d3c4ab}.slot canvas{pointer-events:none;width:44px;height:44px}.slot span{text-overflow:ellipsis;max-width:100%;overflow:hidden}.slot-tool{cursor:pointer}.slot.out{color:#8b8476;cursor:pointer;background:#f7f1e6;border-style:dashed;border-color:#d3c4ab}.slot.out canvas{opacity:.2;filter:grayscale()}.slot[aria-pressed=true]{border-color:var(--title-b);box-shadow:inset 0 0 0 1px var(--title-b);background:#fdf1f5;font-weight:700}.status-text{white-space:nowrap;text-overflow:ellipsis;font-weight:700;overflow:hidden}.meters{flex-wrap:wrap;gap:2px 12px;display:flex}.meter{align-items:center;gap:5px;display:flex}.meter-track{border:1px solid var(--lo);background:#fffdf6;gap:1px;padding:1px;display:flex}.meter-track i{background:#e3ddd0;width:5px;height:9px}.meter-food i.on{background:#c8632b}.meter-water i.on{background:#2f7fd0}.meter-energy i.on{background:#d19a12}.meter-happy i.on{background:#c0447a}.meter.low .meter-label{color:#b3261e;font-weight:700}.ghost{z-index:50;pointer-events:none;margin:-22px 0 0 -22px;position:fixed;top:0;left:0}.ghost canvas{filter:drop-shadow(2px 4px #00000040);width:44px;height:44px}.dialog{width:min(92vw,420px);color:var(--ink);background:#fffdf6;border:1px solid #3d3a3440;border-radius:10px;padding:0;box-shadow:0 12px 40px #28190a4d}.dialog::backdrop{background:#28190a59}#dlg-photo{width:min(94vw,560px)}.dialog-body{gap:14px;padding:18px 18px 16px;font-size:13px;display:grid}.dialog-title{color:var(--title-a);font-size:16px;font-weight:700}.coats{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;display:grid}.coats[hidden]{display:none}.coat{cursor:pointer;background:#fff;border:2px solid #e6dccb;border-radius:8px;flex-direction:column;align-items:center;gap:2px;padding:6px 2px 4px;display:flex}.coat:hover{border-color:#d3c4ab}.coat input{opacity:0;pointer-events:none;position:absolute}.coat canvas{aspect-ratio:84/78;width:84px;max-width:100%;height:auto}.coat:has(input:checked){border-color:var(--title-b);background:#fdf1f5;font-weight:700}.coat:has(input:focus-visible){outline:2px solid var(--title-b);outline-offset:2px}.field{align-items:center;gap:10px;display:flex}.field input{-webkit-user-select:text;user-select:text;background:#fff;border:1px solid #d3c4ab;border-radius:6px;flex:1;min-width:0;padding:6px 9px;font-size:14px}.field input:focus-visible{outline:2px solid var(--title-b);outline-offset:0;border-color:#0000}.dialog-actions{justify-content:flex-end;gap:8px;display:flex}.btn{text-align:center;min-width:84px;color:var(--ink);cursor:pointer;background:#fff;border:1px solid #d3c4ab;border-radius:6px;padding:6px 14px;text-decoration:none}.btn:hover{background:#faf4e8}.btn[hidden]{display:none}.btn:focus-visible{outline:2px solid var(--title-b);outline-offset:2px}.btn-default{color:#fff;background:var(--title-b);border-color:var(--title-b);font-weight:700}.btn-default:hover{background:#8e3a60}.photo{border-radius:6px;width:100%;height:auto;display:block;box-shadow:0 2px 8px #28190a33}@media (width<=640px){.hud{padding:6px}.coats{grid-template-columns:repeat(2,minmax(0,1fr))}}.palette-debug{z-index:100;background:#fffdf6;border:1px solid #3d3a3440;border-radius:10px;width:min(520px,100vw - 24px);font-size:13px;position:fixed;top:12vh;left:50%;overflow:hidden;transform:translate(-50%);box-shadow:0 16px 48px #28190a4d}.palette-debug[hidden]{display:none}.palette-debug input{-webkit-user-select:text;user-select:text;background:0 0;border:0;border-bottom:1px solid #efe6d6;outline:none;width:100%;padding:12px 14px;font-size:15px;display:block}.palette-debug ul{max-height:min(360px,60vh);margin:0;padding:4px;list-style:none;overflow-y:auto}.palette-debug li{cursor:pointer;border-radius:6px;justify-content:space-between;align-items:baseline;gap:12px;padding:7px 10px;display:flex}.palette-debug li small{color:#8b8476;text-transform:uppercase;letter-spacing:.04em;font-size:11px}.palette-debug li[aria-selected=true]{box-shadow:inset 0 0 0 1px var(--title-b);background:#fdf1f5}.debug-stats{z-index:90;color:#f5efe2;pointer-events:none;white-space:pre;background:#1f1c18d1;border-radius:8px;margin:0;padding:8px 10px;font:11px/1.45 ui-monospace,Menlo,Consolas,monospace;position:fixed;bottom:10px;right:10px}.debug-stats[hidden]{display:none}
