/* 限定小家页面的全幅房间。家具坐标与 home-world.js 使用同一张竖屏美术。 */
.home-room-open .editorial,.home-room-open .app-directory,.home-room-open .stage-caption,.home-room-open .orbit{display:none}
.home-room-open .presentation{display:block;padding:10px;min-height:0}
.home-room-open .device-stage{width:100%;display:block}
.home-room-open .device{height:calc(var(--visual-height,100dvh) - 88px);width:min(580px,calc((var(--visual-height,100dvh) - 180px)*.68));min-width:320px;border-width:5px;border-radius:25px;margin:auto}
.home-room-open .statusbar{height:22px;padding:0 20px;font-size:10px}
.home-room-open .home-indicator{height:14px}
.home-live-page{background:#d9e6f8!important;isolation:isolate;overflow:hidden}
.home-topbar{display:flex;align-items:center;gap:5px;padding:7px 10px;flex:none;background:linear-gradient(110deg,#eaf1ff,#fff6e7);border-bottom:1px solid #b9cbea;min-height:45px;z-index:4}
.home-topbar>div{flex:1;min-width:0;padding-left:2px}
.home-topbar b{display:block;font-size:14px;color:#29477e;letter-spacing:1px}
.home-topbar>div>span{display:block;font-size:7px;letter-spacing:2px;color:#6c83aa;margin-top:2px}
.home-topbar>button{width:32px;height:32px;flex:none;display:grid;place-items:center;background:transparent;color:#36578c;border:0;border-radius:50%}
.home-topbar svg{width:16px;height:16px}
.home-room-viewport{position:relative;flex:1;min-height:0;display:grid;place-items:center;overflow:hidden;container-type:size;background:#183b72}
.home-room-stage{position:relative;isolation:isolate;aspect-ratio:2/3;width:min(100cqw,66.6667cqh);height:auto;max-width:100%;max-height:100%;touch-action:manipulation;user-select:none;-webkit-user-select:none;overflow:hidden}
.home-room-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none}
.home-actor{position:absolute;width:17.6%;aspect-ratio:1;border:0;padding:0;transform:translate(-50%,-92%);background:none!important;touch-action:manipulation;outline-offset:-8px;cursor:pointer;transition:filter .18s}
.home-actor[data-who="user"]{width:16.8%}
.home-sprite{position:absolute;inset:0;display:block;background-repeat:no-repeat;transform-origin:50% 75%;filter:drop-shadow(0 1px 1px #513c2c22)}
.home-shadow{position:absolute;bottom:3%;left:27%;width:47%;height:7%;border-radius:50%;background:#463e5b3b;filter:blur(1px)}
.home-actor[data-pose="sleep"] .home-shadow{display:none}
.home-walking .home-sprite{animation:home-step .3s ease-in-out infinite}
.home-actor[data-pose="read"] .home-sprite,.home-actor[data-pose="rest"] .home-sprite{animation:home-breathe 4.5s ease-in-out infinite}
.home-actor[data-pose="sleep"] .home-sprite{animation:home-breathe 5s ease-in-out infinite;transform-origin:50% 25%}
.home-actor-name{display:none;position:absolute;left:50%;top:-20%;transform:translateX(-50%);font-size:10px;line-height:1.5;white-space:nowrap;padding:2px 5px;border:1px solid #f1dcc0;background:#fffdf0ed;border-radius:5px;color:#61503d;pointer-events:none}
.home-actor:focus-visible .home-actor-name,.home-actor.home-show-name .home-actor-name{display:block}
.home-affection{display:none;position:absolute;top:-14%;left:42%;font-size:18px;color:#da7e67;text-shadow:0 1px #fff;pointer-events:none}
.home-actor[data-pose="hug"] .home-affection,.home-actor[data-pose="cuddle"] .home-affection{display:block;animation:home-heart 2.6s ease-in-out infinite}
.home-hotspot{position:absolute;width:44px;height:44px;min-width:32px;min-height:32px;max-width:13%;max-height:9%;padding:0;border:0;background:transparent!important;border-radius:50%;z-index:8;transform:translate(-50%,-50%);touch-action:manipulation}
.home-hotspot:focus-visible{outline:2px dashed #fff2c1;background:#f8bc6370!important}
.home-bed-hotspot{left:16%;top:53%}.home-sofa-hotspot{left:81%;top:48%}.home-table-hotspot{left:50%;top:84%}
.home-bed-duvet,.home-dining-front{position:absolute;inset:0;pointer-events:none;background:url("assets/room-portrait.png") 0 0/100% 100% no-repeat;display:none}
.home-sleeping .home-bed-duvet{display:block;z-index:85;clip-path:polygon(0 51.5%,31% 51.5%,31% 69.5%,0 69.5%)}
.home-eating .home-dining-front{display:block;z-index:110;clip-path:ellipse(12.2% 6% at 50.1% 84%)}
.home-mode-badge{position:absolute;left:12px;top:11px;font-size:10px;color:#fff6d5;letter-spacing:.7px;background:#24437cbb;border:1px solid #fbe4b750;padding:4px 8px;border-radius:4px;pointer-events:none;z-index:120}
.home-status-peek{position:absolute;right:9px;top:8px;width:32px;height:32px;background:#fff4dcce;border:1px solid #f9dc96;border-radius:50%;display:grid;place-items:center;color:#9d6534;z-index:120}
.home-status-peek svg{width:16px;height:16px}
.home-dialogue{background:linear-gradient(140deg,#fff9ed,#f0f5ff);border-top:1px solid #c2d1e6;flex:none;padding:7px 15px 8px;min-height:68px;max-height:128px;color:#3b4f73}
.home-dialogue-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:3px}
.home-speaker{font-size:10px;font-weight:700;letter-spacing:1px;color:#8e623c}
.home-dialogue-top button{font-size:10px;display:flex;align-items:center;gap:4px;border:0;background:none;color:#6b7fa1;padding:2px}
.home-dialogue-top svg{width:12px;height:12px}
.home-latest-line{font-size:13px;line-height:1.6;max-height:79px;overflow:auto;overflow-wrap:anywhere;overscroll-behavior:contain;white-space:pre-wrap}
.home-composer{display:flex;align-items:flex-end;gap:8px;flex:none;padding:7px 12px max(8px,env(safe-area-inset-bottom));background:#f6f8ff;border-top:1px solid #dbe4f2}
.home-composer textarea{flex:1;min-width:0;min-height:37px;max-height:110px;resize:none;font-size:13px;line-height:1.5;padding:9px 11px;border:1px solid #c7d5e8;border-radius:10px;background:#fff;outline-color:#7e9cc4}
.home-composer>button{width:38px;height:37px;border:1px solid #4e69ac;border-radius:10px;background:linear-gradient(#6487cd,#36589b);color:white;display:grid;place-items:center;flex:none}
.home-composer>button:disabled{opacity:.45}.home-composer svg{width:16px;height:16px}
.home-offer:empty,.home-inline-error:empty{display:none}
.home-offer,.home-inline-error{position:absolute;z-index:140;bottom:10px;left:10px;right:10px;padding:9px 10px;border:1px solid #e9cc98;border-radius:8px;background:#fff8e9f5;color:#6d533a;font-size:12px;line-height:1.5;box-shadow:0 3px 13px #172f5a1a;max-height:40%;overflow:auto}
.home-offer{bottom:15px;display:flex;flex-wrap:wrap;align-items:center;gap:7px}.home-offer>span{flex-basis:100%}
.home-inline-error:not(:empty)~.home-offer{bottom:120px}
.home-small{background:#fdf6e7;border:1px solid #d9be96;color:#5e4c39;font-size:11px;padding:5px 7px;margin:4px 4px 0 0;border-radius:5px;line-height:1.5}
.home-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:10px 0}
.home-action-grid .secondary{min-height:43px;font-size:12px}
.home-record-list{max-height:52dvh;overflow:auto;overscroll-behavior:contain;padding:8px 0}
.home-record{display:block;max-width:90%;padding:10px 13px;border:1px solid #d2deef;border-radius:10px;background:#fff;text-align:left;margin:0 auto 10px 0;font-size:13px;overflow-wrap:anywhere;white-space:pre-wrap}
.home-record small{display:block;font-size:10px;color:#7d8da8;margin-bottom:5px}
.home-record.mine{margin-left:auto;margin-right:0;background:#eef4ff}
.home-destination{position:absolute;width:17px;height:10px;border:1px solid #fff9d3;box-shadow:0 0 0 2px #b58b5533;border-radius:50%;transform:translate(-50%,-50%);opacity:0;pointer-events:none;z-index:5}
.home-destination.show{animation:home-destination .6s ease-out}
@keyframes home-step{0%,100%{translate:0 0}50%{translate:0 -1.5px}}
@keyframes home-breathe{0%,100%{scale:1 1}50%{scale:1.008 1.012}}
@keyframes home-heart{0%,100%{translate:0 0;opacity:.6}50%{translate:0 -3px;opacity:1}}
@keyframes home-destination{0%{opacity:1;scale:.6}60%{opacity:.8}100%{opacity:0;scale:1.7}}
@media(max-width:700px){
 body.home-room-open{position:fixed;inset:0;height:var(--visual-height,100dvh);overflow:hidden;overscroll-behavior:none}
 .home-room-open .proposal-toolbar{display:none}.home-room-open .presentation{padding:0;min-height:0;height:var(--visual-height,100dvh)}
 .home-room-open .presentation{position:absolute;inset:0}
 .home-room-open .device{height:var(--visual-height,100dvh);width:100%;min-width:0;border:0;border-radius:0;box-shadow:none}
 .home-room-open .statusbar{display:none}.home-room-open .home-indicator{display:none}
 .home-topbar{padding-top:max(7px,env(safe-area-inset-top))}
}
@media(max-height:600px){
 .home-dialogue{min-height:43px;max-height:69px;padding-block:4px}.home-latest-line{max-height:40px;font-size:12px}
 .home-topbar{min-height:37px;padding-block:3px}.home-composer{padding-block:4px}
}
@media(prefers-reduced-motion:reduce){
 .home-walking .home-sprite,.home-actor .home-sprite,.home-affection,.home-destination.show{animation:none!important}
 .home-destination.show{opacity:.6}
}
/* 用户反馈：人物放大，竖屏房间尽量占满可用区域。 */
.home-room-stage{width:100%;height:100%;aspect-ratio:auto}
/* 键盘打开后将整间房间等比缩到可视高度，不裁切房间或压扁家具。 */
.home-keyboard-open .home-room-stage{width:min(100cqw,66.6667cqh);height:100%;aspect-ratio:2/3}
.home-actor{width:23.5%}
.home-actor[data-who="user"]{width:22.8%}
.home-actor[data-pose="sleep"]{width:22%}
.home-books-hotspot{left:62%;top:22%}.home-music-hotspot{left:87%;top:26%}
.home-window-hotspot{left:26%;top:23%}.home-plant-hotspot{left:90%;top:86%}
.home-light-hotspot{left:35%;top:42%}
.home-lamp-glow{position:absolute;z-index:6;left:34%;top:43%;width:12%;height:8%;transform:translate(-50%,-50%);border-radius:50%;background:#ffe9a12a;box-shadow:0 0 18px 6px #ffd38438;pointer-events:none;transition:opacity .25s}
.home-room-stage{transition:filter .3s}
.home-lights-off .home-room-stage{filter:brightness(.65) saturate(.85)}
.home-lights-off .home-lamp-glow{opacity:0}
.home-actor[data-pose="water"] .home-sprite{animation:home-water 2.8s ease-in-out infinite}
.home-actor[data-pose="view"] .home-sprite{transform-origin:50% 90%;rotate:-3deg}
.home-track-list{display:grid;gap:10px;max-height:40dvh;overflow:auto;overflow-wrap:anywhere}
@keyframes home-water{0%,100%{rotate:0deg}50%{rotate:2deg}}
@media(prefers-reduced-motion:reduce){.home-room-stage,.home-lamp-glow{transition:none}}
.home-pair{position:absolute;width:24.5%;aspect-ratio:1;transform:translate(-50%,-92%);background:url("assets/character-pairs.png") 0 0/200% 200% no-repeat;pointer-events:none;display:none;filter:drop-shadow(0 1px 1px #50352422)}
.home-paired .home-sprite,.home-paired .home-shadow,.home-paired .home-affection{opacity:0}
/* 点击区域对应人物躯干，透明精灵边缘不会挡住后方另一个人。 */
.home-actor{pointer-events:none}
.home-actor>span{pointer-events:none}
.home-actor>.home-actor-hit{pointer-events:auto;position:absolute;left:25%;right:25%;top:12%;bottom:8%;border-radius:40%}
.home-sleep-pair{display:none;position:absolute;left:1.5%;top:38%;width:29.6%;height:29.6%;object-fit:fill;pointer-events:none;z-index:86}
.home-dual-sleep .home-sleep-pair{display:block}
.home-dual-sleep .home-bed-duvet{display:none}
.home-sleep-paired .home-sprite,.home-sleep-paired .home-shadow{opacity:0}
/* 0.1.1：就地展开选项，没有全屏蒙层。 */
.home-controls[hidden],.home-speech[hidden]{display:none!important}
.home-controls{position:absolute;z-index:260;max-width:calc(100% - 14px);opacity:0;translate:0 5px;transition:opacity .16s,translate .16s;color:#4c5570}
.home-controls.is-open{opacity:1;translate:0 0}
.home-context-menu{width:max-content;filter:drop-shadow(0 2px 4px #223d6228);pointer-events:auto}
.home-menu-heading{display:flex;justify-content:center;align-items:center;gap:6px;font-size:10px;line-height:1.5;margin-bottom:5px}
.home-menu-heading>span{padding:1px 7px;background:#fff7e4ef;border:1px solid #eed7ae;border-radius:12px}
.home-menu-heading>button{height:21px;width:21px;padding:0;border-radius:50%;background:#fffbf2ef;color:#8c7461;border:1px solid #eddab9}
.home-menu-choices{display:flex;gap:5px;justify-content:center}
.home-context-choice{font-size:11px;white-space:nowrap;min-height:34px;padding:7px 10px;border-radius:18px;border:1px solid #f9dfb6;background:linear-gradient(145deg,#fffffff5,#fff0dbee);color:#5a6e8c;box-shadow:inset 0 1px #fff,0 2px 4px #33466c14;animation:home-choice-in .2s both;touch-action:manipulation}
.home-context-choice:nth-child(2){animation-delay:.035s}.home-context-choice:nth-child(3){animation-delay:.07s}
.home-menu-pager{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:5px;font-size:9px}
.home-menu-pager>span{background:#fff8eadb;padding:2px 7px;border-radius:10px}
.home-menu-page{font-size:12px;background:#fff8eaed;border:1px solid #f2dfc0;color:#657d9d;border-radius:12px;padding:2px 8px;min-height:24px}
.home-edge-panel{left:8px;right:8px;bottom:8px;max-height:35%;background:linear-gradient(130deg,#fffdf4f5,#f1f6fff5);border:1px solid #dfd6c0;border-radius:12px;box-shadow:0 3px 14px #20396b21;display:flex;flex-direction:column;overflow:hidden}
.home-panel-heading{display:flex;justify-content:space-between;align-items:center;padding:7px 11px;gap:8px;border-bottom:1px solid #dce5f126;flex:none}
.home-panel-heading>b{font-size:12px}.home-panel-heading>button{display:grid;place-items:center;width:25px;height:25px;border:1px solid #d6e0f0;border-radius:50%;background:#fff8;color:#6a809d;padding:5px}
.home-panel-heading svg{width:12px;height:12px}
.home-panel-content{overflow:auto;overscroll-behavior:contain;padding:7px 12px 12px;min-height:0;font-size:12px}
.home-panel-content .tip-note{font-size:10px;margin-block:5px}
.home-panel-content .entry-form{gap:8px}
.home-panel-content .entry-form label{font-size:11px}
.home-panel-content .entry-form input,.home-panel-content .entry-form select,.home-panel-content .entry-form textarea{font-size:12px;padding:7px;min-height:31px}
.home-panel-content .primary,.home-panel-content .secondary{font-size:11px;min-height:32px;padding:7px 9px}
.home-panel-content .home-record-list{max-height:none;overflow:visible}
.home-panel-content .card{padding:9px}.home-panel-content .home-action-grid{gap:5px;margin:5px 0}
.home-dialogue{min-height:25px;max-height:25px;padding:4px 12px}
.home-dialogue-top{margin:0}.home-latest-line{display:none}
.home-speaker{font-weight:400;letter-spacing:0;font-size:9px}
.home-speech{position:absolute;z-index:220;width:max-content;max-width:min(144px,38%);padding:5px 8px 7px;border:1px solid #d4dce8;border-radius:10px;background:#fffdf5f5;box-shadow:0 2px 6px #243c5d1c;color:#4e627e;opacity:0;translate:0 4px;transition:opacity .18s,translate .18s;pointer-events:auto}
.home-speech[data-speaker="user"]{background:#f2f6fff5;border-color:#c6d7ef;color:#45618d}
.home-speech.is-speaking{opacity:1;translate:0 0}
.home-speech:after{content:"";position:absolute;bottom:-5px;left:var(--tail-x,50%);height:8px;width:8px;background:inherit;border-right:1px solid #d4dce8;border-bottom:1px solid #d4dce8;transform:translateX(-50%) rotate(45deg);border-radius:0 0 2px 0}
.home-speech-name{display:block;font-size:8px;opacity:.65;margin-bottom:2px;line-height:1.4}
.home-speech-text{font-size:11px;line-height:1.55;max-height:69px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;overscroll-behavior:contain;scrollbar-width:thin}
.home-single-cover{display:none;position:absolute;left:1.2%;top:46.8%;width:29.5%;height:14%;z-index:86;pointer-events:none;border-radius:11% 12% 6% 4%;background-image:url("assets/room-portrait.png");background-size:339% 714.286%;background-position:1.7% 60.5%;box-shadow:0 -1px 1px #8c57362a}
.home-sleeping:not(.home-dual-sleep) .home-single-cover{display:block}
.home-dual-sleep .home-single-cover{display:none}
@keyframes home-choice-in{from{opacity:0;transform:translateY(5px) scale(.9)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:360px){.home-context-choice{font-size:10px;padding-inline:8px}.home-menu-choices{gap:4px}.home-speech{max-width:39%}}
@media(prefers-reduced-motion:reduce){.home-controls,.home-speech{transition:none}.home-context-choice{animation:none}}
/* 独立被子图层盖到肩下，保持原床架，避免裁切原图带出重复床沿。 */
.home-single-cover{left:1%;top:45.9%;width:30.4%;height:22%;background:url("assets/single-quilt.png") center/100% 100% no-repeat;border-radius:0;box-shadow:none}

/* 双人动作只轻入场，不做放大缩小；尺寸由实际精灵身高校准。 */
.home-pair{animation:home-pair-appear .14s ease-out}
@keyframes home-pair-appear{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.home-pair{animation:none}}

/* 小唱片气泡：沿用蓝橙奶油配色，只保留三个圆形播放按钮。 */
.home-music-bubble{width:228px;max-width:calc(100% - 24px);padding:11px 15px 14px;border:1px solid #f8ead4;border-radius:25px;background:linear-gradient(145deg,#fffdf6fa,#f2f6fff5);box-shadow:0 7px 24px #243d6520,inset 0 1px 0 #fff;backdrop-filter:blur(12px);pointer-events:auto}
.home-music-bubble:after{content:"";position:absolute;right:34px;bottom:-5px;width:10px;height:10px;background:#f4f7fc;border-right:1px solid #f4e6d1;border-bottom:1px solid #f4e6d1;border-radius:0 0 3px;transform:rotate(45deg)}
.home-music-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#8191ab;font-size:10px;letter-spacing:.08em}
.home-music-heading>span{display:flex;align-items:center;gap:7px}
.home-music-record{display:block;width:18px;height:18px;border-radius:50%;background:radial-gradient(circle,#f7b076 0 17%,#e9f0ff 18% 25%,#6380ad 26% 44%,#839cc0 45% 49%,#6380ad 50% 66%,#839cc0 67% 71%,#6380ad 72%);box-shadow:0 1px 3px #47608018}
.home-music-heading>button{display:grid;place-items:center;width:24px;height:24px;padding:5px;border:1px solid #dce5ef;border-radius:50%;background:#ffffffa3;color:#8b9cb5;flex:none}
.home-music-heading>button svg{width:11px;height:11px}
.home-music-copy{padding:7px 0 10px;text-align:center;min-width:0}
.home-music-copy b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:13px;line-height:1.5;font-weight:600;color:#405e88}
.home-music-copy>span{display:block;margin-top:3px;font-size:10px;line-height:1.5;color:#92a0b6}
.home-music-buttons{display:flex;align-items:center;justify-content:center;gap:19px}
.home-music-buttons>button{display:grid;place-items:center;width:36px;height:36px;padding:9px;flex:none;border:1px solid #eadfce;border-radius:50%;background:#fff8ec;color:#8b9db8;box-shadow:inset 0 1px #fff,0 2px 4px #435e8310;touch-action:manipulation}
.home-music-buttons>button svg{width:17px;height:17px}
.home-music-buttons>.home-music-play{width:46px;height:46px;padding:13px;border:1px solid #7695d0;background:linear-gradient(145deg,#7295d4,#4c71b1);color:#fff;box-shadow:inset 0 1px 0 #a6bde3,0 3px 7px #4d75b426}
.home-music-buttons>button:disabled{opacity:.38;box-shadow:none}
.home-music-error{margin-top:10px;padding-top:8px;border-top:1px solid #e4e9ef;font-size:10px;line-height:1.5;color:#9d785d;overflow-wrap:anywhere;max-height:82px;overflow:auto}
.home-music-error[hidden]{display:none}.home-music-error p{margin:0}
.home-music-retry{margin-top:6px;font-size:10px;border:1px solid #dde5f0;border-radius:12px;background:#fff9;padding:3px 10px;color:#7185a3}
.home-music-bubble.is-playing .home-music-record{animation:home-record-spin 10s linear infinite}
@keyframes home-record-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.home-music-bubble.is-playing .home-music-record{animation:none}}
