/* Slim, touch-friendly chrome. Home art is independent of all interface frames. */
:root { --ink:#59475e; --pink:#ed80a2; --cream:#fff9f0; }
body { background:radial-gradient(ellipse at top,#f8e3dd,#ece5ec 70%); color:var(--ink); }
.pet-device {
    width:min(100%,620px); max-width:620px; height:100dvh; max-height:none;
    border:0; border-radius:0; padding:8px 10px max(6px,env(safe-area-inset-bottom));
    background:linear-gradient(160deg,#fff8f1,#ffe9e7 70%,#f8e5ef);
    box-shadow:0 0 60px #886f861c; gap:0;
}
.header-bar { min-height:39px; margin:0 2px 3px; }
.main-screen-logo { width:145px; margin:0; }
.icon-badge { border:1px solid #e2c1c5; background:#fff4ee!important; color:var(--ink); border-radius:12px; padding:7px 11px; box-shadow:0 2px 0 #dcb8bd; }
.event-banner { min-height:26px; padding:4px 9px; border:0; background:#fff4dc; color:#9c7551; font-size:11px; border-radius:8px; margin:0 0 5px; }
.screen { border:0; border-radius:14px; padding:10px; margin-bottom:0; background-color:#fffaf5; }
.screen.tab-home { padding:0; background:transparent!important; color:var(--ink); }
#tab-content-home { position:relative; gap:0; min-height:0; }
.home-viewport { position:relative; flex:1 1 0; min-height:190px; width:100%; overflow:hidden; isolation:isolate; outline:none;
    background:radial-gradient(ellipse at 50% 65%,#f8e6d2 15%,#fff8ef 78%); border-radius:14px; touch-action:none; }
.home-viewport:focus-visible { outline:2px solid #af91bd; outline-offset:-2px; }
.home-toolbar { position:absolute; inset:7px 8px auto; display:flex; justify-content:space-between; align-items:center; z-index:600; pointer-events:none; }
.home-caption { display:flex; flex-direction:column; text-align:left; gap:2px; padding:3px 4px; }
.home-caption strong { font-size:13px; letter-spacing:1px; color:#926b5a; }
#home-hint { font-size:10px; color:#9d897b; max-width:260px; line-height:1.5; }
.home-toolbar button { pointer-events:auto; }
.home-toolbar-actions { display:flex; gap:5px; }
.home-pill { background:#fffaf2; color:#8c6c74; border:1px solid #e9d6c6; border-radius:12px; padding:9px 12px; min-height:36px; font-size:12px; box-shadow:0 2px 0 #ddc7b5; }
#home-world { position:absolute; width:640px; height:485px; left:50%; top:50%; transform-origin:center; overflow:visible;
    --wall-light:#fff6e5; --wall:#f5dfbb; --wall-shade:#edd3ac; --trim:#ca9e73; --floor:#edc397; --wood-edge:#ba885e; --window-leaf:#98bc92;
}
#home-world[data-theme="theme-beach"] { --wall-light:#f0ffff; --wall:#d3eef0; --wall-shade:#b9dce6; --trim:#a9c6c2; --floor:#f3d7a3; --wood-edge:#c6ac78; --window-leaf:#57b7d3; }
#home-world[data-theme="theme-park"] { --wall-light:#f4fae9; --wall:#dcebc7; --wall-shade:#ccddb0; --trim:#95b189; --floor:#dabf95; --wood-edge:#9b8568; --window-leaf:#71a672; }
#home-world[data-theme="theme-sakura"] { --wall-light:#fff2f5; --wall:#f6dce2; --wall-shade:#e9c6d2; --trim:#c89fae; --floor:#eac9bb; --wood-edge:#b18c81; --window-leaf:#e7abc6; }
#home-world.is-night { filter:brightness(.58) saturate(.76) hue-rotate(12deg); }
.home-viewport:has(.is-night) { background:#343549; }
.home-viewport:has(.is-night) .home-caption strong,.home-viewport:has(.is-night) #home-hint { color:#ece0ea; }
.home-world-svg { position:absolute; inset:0; width:640px; height:485px; pointer-events:none; }
#home-room { z-index:0; }
.floor-tile { fill:var(--floor); stroke:var(--trim); stroke-width:.65; }
.floor-tile.tile-1 { fill:var(--floor); filter:brightness(1.025); }
.floor-tile.tile-2 { fill:var(--floor); filter:brightness(.978); }
#home-grid { z-index:3; display:none; fill:transparent; stroke:#fff9; stroke-width:1; }
.is-editing #home-grid { display:block; }
#home-selection { z-index:4; fill:#69ba9566; stroke:#388465; stroke-width:2; }
#home-selection.invalid { fill:#ed758777; stroke:#c13952; }
.home-furniture { position:absolute; height:auto; margin:0; padding:0; background:transparent; border:0; border-radius:0; box-shadow:none; line-height:0; touch-action:none; transition:filter .15s,opacity .15s; }
.home-furniture img { width:100%; height:auto; display:block; image-rendering:pixelated; pointer-events:none; }
.home-furniture[data-layer="ground"] { pointer-events:none; }
.is-editing .home-furniture[data-layer="ground"] { pointer-events:auto; }
.home-furniture:active { box-shadow:none; }
.home-furniture.pet-behind { opacity:.55; }
.home-furniture.is-selected { filter:drop-shadow(0 0 3px #fff) drop-shadow(0 0 4px #e593bb); }
.is-editing .home-furniture { cursor:grab; }
.is-editing .home-furniture:active { cursor:grabbing; }
.home-viewport .pet-wrapper { position:absolute; width:130px; height:140px; transform:translate(-50%,-94%); margin:0; }
.home-viewport .pet-avatar { width:130px; height:130px; font-size:80px; }
.home-viewport .pet-wrapper::before { content:''; display:none; position:absolute; width:62px; height:22px; border-radius:50%; background:#80583738; bottom:1px; left:34px; }
.home-viewport .pet-wrapper.home-has-pet::before { display:block; }
.home-viewport .pet-img-element { filter:none; image-rendering:pixelated; }
.home-viewport .pet-thought-bubble { font-size:12px; max-width:180px; }
.home-viewport .pet-avatar-container { position:absolute; top:auto; left:0; bottom:8px; width:100%; transform:none; z-index:500; }
.home-viewport #adopt-center-box { max-width:85%; }
.home-viewport .adopt-center-btn { font-size:13px; padding:12px 16px; }
#home-poops { display:contents; }
.home-poop { position:absolute; font-size:23px; border:0; background:transparent; box-shadow:none; padding:7px; transform:translate(-50%,-70%); }
.home-poop:active { transform:translate(-50%,-70%) scale(.9); }
#poop-container { display:none; }
.home-viewport .top-left-buffs { top:45px; left:9px; z-index:590; max-width:48%; }
.home-viewport .top-left-buffs .weather-badge { font-size:10px; padding:4px 6px; background:#ffffffb0; }
.home-viewport .buff-tag { font-size:9px; white-space:normal; }
.home-viewport .top-right-status { top:51px; right:12px; z-index:590; }
.home-viewport #lamp-switch { top:50px; left:320px; width:65px; height:60px; transform:translateX(-50%); z-index:490; border:0; background:none; box-shadow:none; }
.home-viewport #return-home-btn { top:8px!important; left:auto!important; right:8px!important; z-index:610!important; font-size:11px!important; background:#e48e9f!important; }
.home-dashboard { width:100%; flex:0 0 auto; padding:10px 5px 7px; position:relative; background:linear-gradient(#fff9f2dd,#fff7f1); border-radius:16px 16px 0 0; }
#ui-info-action-row { padding:0 34px 0 1px!important; gap:6px; margin-bottom:10px!important; }
#pet-info-bar { max-width:65%; gap:5px; font-size:13px; color:#614e64; background:transparent; padding:0; }
#pet-title { font-size:10px; max-width:65px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#pet-name-display { max-width:130px; }
#ui-info-action-row > div:last-child { gap:10px!important; background:transparent!important; padding:0!important; }
#ui-info-action-row > div:last-child > div { font-size:23px!important; }
#ui-toggle-btn { position:absolute; right:3px; top:7px; border:1px solid #eddbce; color:#917080; background:#fff9f2; border-radius:9px; width:30px; height:30px; z-index:30; font-size:12px; }
#ui-progress-bars { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin-bottom:9px; }
.progress-row { display:grid; grid-template-columns:1fr; gap:5px; position:relative; text-align:left; }
.progress-label { width:auto; font-size:10px; color:#76637a; white-space:nowrap; }
.progress-val { width:auto; font-size:9px; color:#9a8497; text-align:right; }
.progress-bar-bg { flex:none; height:10px; margin:0; width:100%; background:#ece2e6; border:1px solid #d4bfcc; border-radius:5px; }
.progress-bar-fill { border-radius:3px; box-shadow:inset 0 2px 0 #ffffff66; }
.bg-hunger { background:linear-gradient(#f49cb2,#ee7e9d); }
.bg-thirst { background:linear-gradient(#86d4ee,#53b7e4); }
.bg-happiness { background:linear-gradient(#ffcf73,#edb451); }
.bg-affinity { background:linear-gradient(#b5d98a,#8ebc69); }
.bg-exp { background:linear-gradient(#c8b1ef,#aa8ad7); }
.controls-care-row { gap:7px; margin-top:0; }
.controls-care-row button { min-height:48px; border:1px solid; border-radius:13px; font-size:13px; color:#61455c; box-shadow:inset 0 2px 0 #ffffff88,0 3px 0 var(--button-edge); padding:7px 2px; }
.controls-care-row small { display:inline-block; margin-top:3px; font-size:9px!important; opacity:.8; font-weight:500; }
.controls-care-row .btn-feed { background:linear-gradient(#ffd8e2,#f3acc1); border-color:#df90aa; --button-edge:#d88da6; }
.controls-care-row .btn-drink { background:linear-gradient(#d5f2fb,#a6dbf0); border-color:#8ac4dd; --button-edge:#89bcd5; }
.controls-care-row .btn-pet { background:linear-gradient(#ffebc2,#f5d294); border-color:#dbbb80; --button-edge:#d2b276; }
.controls-care-row .btn-game { background:linear-gradient(#ebdefc,#d0b8ef); border-color:#b9a0d6; --button-edge:#ac92ce; }
.tab-bar { gap:4px; padding-top:6px; margin:0; border-top:1px solid #edd9dc; }
.tab-btn { min-height:42px; border-radius:11px; color:#9c8694; background:transparent; box-shadow:none; padding:10px 2px; font-size:12px; }
.tab-btn.active { background:#f9dce5!important; color:#b66387!important; box-shadow:inset 0 1px 0 #ffffff99; }
.modal-overlay { border-radius:0; }
.modal-content { border-color:#e3c4d2; border-radius:18px; }
.home-editor { position:absolute; bottom:8px; left:8px; right:8px; z-index:650; background:#fffcf6f5; padding:10px; border:1px solid #ead3c7; border-radius:14px; box-shadow:0 5px 24px #805d6120; }
.home-editor[hidden],.home-toolbar [hidden] { display:none!important; }
.home-editor-top { display:flex; align-items:center; justify-content:space-between; gap:5px; margin-bottom:8px; color:#84665e; font-size:11px; }
.home-editor-top div { display:flex; gap:6px; }
.home-editor button { min-height:34px; padding:6px 10px; border-radius:8px; color:#725869; background:#f6e8ee; border:1px solid #e7ccd6; box-shadow:0 2px 0 #dfc9d1; font-size:11px; }
.home-editor #home-save { color:white; background:#bd7c99; border-color:#b5708c; }
.home-editor-controls { display:flex; justify-content:space-between; gap:5px; align-items:center; }
.home-nudges { display:flex; gap:4px; }
.home-nudges button { min-width:34px; padding:5px; font-size:16px; }
#home-palette { display:flex; gap:5px; overflow-x:auto; padding:7px 0 2px; }
#home-palette button { flex:0 0 auto; font-size:10px; }
.pet-device:has(.home-viewport.is-editing) .home-dashboard { display:none; }
.is-editing .top-left-buffs,.is-editing .top-right-status,.is-editing .pet-avatar-container { display:none!important; }
.is-editing .pet-wrapper { opacity:.4; pointer-events:none; }
.is-editing .home-poop { display:none; }
@media(min-width:680px) { .pet-device { height:calc(100dvh - 24px); margin:12px; border-radius:20px; padding:10px 14px; } }
@media(max-width:360px) { .pet-device { padding-left:5px; padding-right:5px; } #ui-progress-bars { gap:5px; } .progress-label { font-size:9px; } .controls-care-row { gap:5px; } .tab-btn { font-size:11px; } }
@media(max-height:680px) { .header-bar { min-height:30px; } .main-screen-logo { width:118px; } .event-banner { min-height:22px; font-size:10px; padding:3px 7px; } .home-dashboard { padding-top:6px; } #ui-info-action-row { margin-bottom:6px!important; } .progress-val { display:none; } .controls-care-row button { min-height:42px; } #ui-progress-bars { margin-bottom:6px; } .tab-btn { min-height:36px; padding:8px 2px; } }
@media(max-height:480px) and (orientation:landscape) { .pet-device { width:100%; max-width:100%; height:100dvh; margin:0; border-radius:0; display:grid; grid-template-columns:1fr 1fr; grid-template-rows:32px 1fr 40px; gap:4px; } .header-bar { grid-column:1; } .event-banner { grid-column:2; } .screen { grid-column:1/-1; min-height:0; } .tab-bar { grid-column:1/-1; } #tab-content-home { flex-direction:row!important; } .home-viewport { height:100%; min-height:0; } .home-dashboard { width:43%; max-width:360px; padding:12px; } #ui-progress-bars { margin:12px 0; } .home-viewport .top-left-buffs { display:none!important; } }
@media(prefers-reduced-motion:reduce) { .home-viewport .animate-bounce,.home-walking { animation:none!important; } .home-furniture,.progress-bar-fill { transition:none; } }

