/* Mobile-first portrait shell. Desktop previews retain the phone proportions. */
html,body{width:100%;height:100%;overflow:hidden;background:#e8e9e3}body{max-width:480px;margin:0 auto;background:#f8f8f3;position:relative;box-shadow:0 0 0 1px #cbd0c3;display:flex;flex-direction:column;height:100dvh}button{border-color:#252823;min-height:36px;padding:7px 10px;font-size:12px;background:transparent}header{height:74px;min-height:74px;padding:12px 17px;gap:8px;background:transparent}.brand{font-size:22px;letter-spacing:-.5px}.brand span{font-size:9px;letter-spacing:.4px}.header-actions{gap:5px}.header-actions button{font-size:10px;padding:6px;max-width:116px;line-height:1.4}.header-actions .badge{display:none}.rail,.heading p,.heading .eyebrow,.heading #overview,.rail-foot,footer,.mobile-nav{display:none!important}main{display:block;min-height:0;flex:1;overflow:hidden}.workspace{height:100%;padding:0;max-width:none;display:flex;flex-direction:column}.heading{padding:16px 20px 0;margin:0;flex-shrink:0}.heading h1{font-size:18px;margin:0;font-weight:500}.scene-wrap{height:auto!important;flex:1;min-height:180px;border:0;border-radius:0;background:#f8f8f3;margin:0;overflow:hidden}#scene{position:absolute;inset:0;width:100%;height:100%}.scene-top{top:15px;left:20px;right:20px;font-size:10px}.scene-top span:last-child{display:none}.rooms{bottom:36px;gap:5px;max-width:100%}.rooms button{padding:4px 11px;min-height:30px;font-size:11px;background:#f8f8f3e8}.rooms button.active{background:transparent;color:#252823;border-width:2px}#scene-note{bottom:12px;font-size:9px}#edit{position:absolute;right:14px;top:48px;width:38px;height:38px;min-height:38px;border-radius:50%;font-size:10px;padding:0;background:#f8f8f3e8;z-index:3}.under-scene{padding:9px 16px;margin:0;gap:7px;flex-shrink:0;flex-direction:column;align-items:stretch;border-top:1px solid #d6d7ce}.under-scene>div:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.under-scene strong{font-size:11px}.under-scene p{font-size:9px;display:none}.under-scene>div:last-child{display:flex;gap:8px}.under-scene button{flex:1;margin:0;min-height:32px;font-size:11px}.bottom-grid{display:block;padding:0 16px 10px;flex-shrink:0}.bottom-grid .card{padding:9px 0 0;border:0;border-radius:0;background:transparent}.bottom-grid .card:last-child{display:none}.card-head h2{font-size:11px}.card-head small{font-size:9px}.actions{gap:7px;margin:8px 0}.actions button{min-height:32px;font-size:11px}.empty{font-size:10px;padding:0}#invitations{max-height:75px;overflow-y:auto;font-size:10px}.invite{padding:5px 0}.invite button{font-size:10px;min-height:27px;margin-top:4px}.phone-nav{display:grid;grid-template-columns:repeat(4,1fr);flex-shrink:0;background:#f8f8f3;border-top:1px solid #333a30;padding:8px 9px max(10px,env(safe-area-inset-bottom));gap:6px;z-index:15;min-height:66px}.phone-nav button{border:0;min-height:42px;border-radius:0;color:#777e70;font-size:13px;position:relative}.phone-nav button.active{background:transparent;color:#242b20;font-weight:700}.phone-nav button.active:before{content:'';position:absolute;top:0;left:35%;right:35%;border-top:2px solid #252823}#drawer{position:absolute;top:0;bottom:66px;height:auto;width:100%;max-width:100%;padding:24px 20px 35px;border:0;z-index:12;background:#f8f8f3}#shade{position:absolute;z-index:11}#toast{max-width:440px;width:calc(100% - 32px);bottom:85px;text-align:center;font-size:12px}.drawer-head{padding-bottom:15px;margin-bottom:20px}.drawer-head h2{font-size:21px}.profile-stub{text-align:center;padding:30px 0 20px}#split{inset:0;z-index:2;background:#f8f8f3;display:grid;grid-template-columns:1fr 1fr;gap:0;padding:50px 0 12px}#split article{border:0;border-radius:0;background:#f8f8f3;padding:12px 10px;display:flex;flex-direction:column;justify-content:center;min-width:0}#split article+article{border-left:1px solid #333a30}#split h3{font-size:13px;margin:0}.text-avatar{font-size:13px;padding:45px 0}#split p{font-size:11px}.split-mode .rooms,.split-mode #scene-note,.split-mode #edit{display:none}.split-mode .scene-top{z-index:4}.split-mode #scene{visibility:hidden}@media(max-height:730px){header{height:62px;min-height:62px}.heading{padding-top:10px}.heading h1{font-size:16px}.scene-top{top:10px}.bottom-grid .card-head{display:none}.under-scene{padding:6px 16px}.phone-nav{min-height:58px;padding-top:4px;padding-bottom:6px}.phone-nav button{min-height:40px}#drawer{bottom:58px}}@media(min-width:600px){body{height:100dvh}}

#room-back{position:absolute;left:16px;top:46px;z-index:3;background:#f8f8f3df;font-size:10px;min-height:30px}.split-mode #room-back{display:none}#scene-note{bottom:15px}

.under-scene>div:last-child,.bottom-grid .actions,.bottom-grid .card-head{display:none!important}.under-scene{padding:10px 16px}.bottom-grid{display:none}body.has-invites .bottom-grid{display:block;padding-top:0}.under-scene #presence{font-size:11px}
.room-hotspot{position:absolute;z-index:2;transform:translate(-50%,-50%);border:0;border-radius:4px;background:#f8f8f3b8;font-size:10px;min-height:26px;padding:3px 8px;color:#525f49}.room-hotspot:hover{background:#f8f8f3}.avatar-hotspot{position:absolute;z-index:3;width:44px;height:66px;transform:translate(-50%,-50%);border:0;background:transparent!important;border-radius:40%;padding:0;touch-action:none;-webkit-touch-callout:none;user-select:none}.avatar-hotspot:focus-visible{outline:2px dashed #6a7c59}.split-mode .room-hotspot,.split-mode .avatar-hotspot{display:none}
#character-wheel{position:absolute;z-index:8;width:250px;height:250px;left:50%;top:50%;margin:-125px 0 0 -125px;border:1px solid #343d2e;border-radius:50%;background:#f9faf5f5;box-shadow:0 9px 36px #34462c33;transform-origin:50% 70%;animation:wheel-pop .38s cubic-bezier(.2,1.5,.45,1)}.wheel-center{position:absolute;inset:105px 75px;text-align:center;font-size:12px;color:#6d7963}#character-wheel button{position:absolute;width:64px;height:64px;border-radius:50%;padding:6px 0 3px;font-size:23px;background:transparent;min-height:0}#character-wheel small{display:block;font-size:9px;color:#444e3c}#character-wheel button:nth-of-type(1){left:93px;top:7px}#character-wheel button:nth-of-type(2){right:13px;top:52px}#character-wheel button:nth-of-type(3){right:13px;bottom:32px}#character-wheel button:nth-of-type(4){left:93px;bottom:5px}#character-wheel button:nth-of-type(5){left:13px;bottom:32px}#character-wheel button:nth-of-type(6){left:13px;top:52px}@keyframes wheel-pop{0%{transform:scale(.15);opacity:0}70%{transform:scale(1.08);opacity:1}100%{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){#character-wheel{animation:none!important}}

body.has-invites .bottom-grid,.bottom-grid{display:none!important}
#phone-icon{position:absolute;right:14px;top:96px;width:38px;height:44px;min-height:0;border:0;padding:7px;background:#f8f8f3e8;z-index:5;transform-origin:center 75%;border-radius:9px;color:#303b31}#phone-icon svg{display:block;margin:auto}.notification-dot{position:absolute;right:1px;top:1px;width:9px;height:9px;background:#e34444;border:2px solid #f8f8f3;border-radius:50%}#phone-icon.has-unread{animation:phone-shake 2.8s ease-in-out infinite}.sms-app{min-height:74px;border-radius:12px;font-size:16px;text-align:left;padding:20px}.sms-back{margin-bottom:20px}.phone-note{font-size:11px;margin-top:20px;color:#818976}#panel-body #invitations{max-height:none;overflow:visible;font-size:13px}#panel-body .invite{padding:18px 0}#panel-body .invite small{line-height:1.9;font-size:11px}#panel-body .invite button{font-size:12px;min-height:36px;padding:7px 14px}.has-unread.quiet-motion{animation:none!important}
@keyframes phone-shake{0%,30%,100%{transform:rotate(0)}4%,12%,20%{transform:rotate(-12deg)}8%,16%,24%{transform:rotate(12deg)}}@media(prefers-reduced-motion:reduce){#phone-icon.has-unread{animation:none!important}}

#top-notice{position:absolute;top:82px;left:16px;right:16px;z-index:30;background:#303b31;color:#fff;border-radius:8px;padding:12px 16px;font-size:12px;line-height:1.6;box-shadow:0 5px 18px #27352225;pointer-events:none}

/* v7: transient notices stay at the top, never over the bottom tabs. */
#toast{position:absolute;top:82px;bottom:auto;left:16px;right:16px;width:auto;max-width:none;transform:translateY(-180px);z-index:30;pointer-events:none;line-height:1.6;text-align:left}#toast.show{transform:translateY(0)}


#page-stage{position:relative;display:flex;flex-direction:column;flex:1;min-height:0;width:100%;background:#f8f8f3;transform-origin:50% 50%;isolation:isolate}#page-stage>main{flex:1;min-height:0}#page-stage #drawer{bottom:0}#page-stage.tab-transitioning{pointer-events:none;will-change:transform}#page-stage.tab-transitioning>*{user-select:none}.phone-nav{position:relative;transform:none!important;flex-shrink:0;z-index:40}#page-stage #toast{position:absolute}#page-stage #top-notice{position:absolute}

/* Fully hide inactive notices: off-screen transforms alone leak during page rotation. */
#toast{visibility:hidden;opacity:0}#toast.show{visibility:visible;opacity:1}#page-stage #shade{backdrop-filter:none;-webkit-backdrop-filter:none}#page-stage{rotate:0deg}#page-stage.tab-transitioning{will-change:transform,rotate}

/* Diagonal fold highlight: visual only, never blocks the fixed navigation. */
#page-stage.tab-transitioning{will-change:transform,clip-path,filter}#page-stage.tab-transitioning::after{content:'';position:absolute;inset:0;pointer-events:none;z-index:50;background:linear-gradient(135deg,transparent 38%,#49513d26 46%,#fffef5dd 49%,transparent 53%);opacity:0;animation:peel-fold 352ms linear both}@keyframes peel-fold{0%{opacity:0;transform:translate(70%,70%)}28%{opacity:.75}47%{opacity:1;transform:translate(-35%,-35%)}51%{opacity:.5;transform:translate(-35%,-35%)}67%,100%{opacity:0;transform:translate(-80%,-80%)}}



.inspect-object .scene-wrap :is(.room-hotspot,.avatar-hotspot,#edit,#phone-icon,#room-back,#home-play,.scene-top,#scene-note){display:none!important}.inspect-object #scene{pointer-events:none}.inspect-object .under-scene{display:none}.inspect-object #album-dock[open],.inspect-object #fridge-reader:not([hidden]){display:block!important;position:relative!important;inset:auto!important;margin:0!important;box-sizing:border-box;width:100%!important;max-height:33dvh!important;overflow:auto;flex:none;transform:none!important;background:#faf7ef}.inspect-object #album-dock header{min-height:0;padding:0}.inspect-object #album-dock section{display:flex!important;overflow-x:auto}.inspect-object #album-dock article{min-width:80px}.inspect-object #album-dock article img{height:44px!important}.inspect-object #album-dock p{margin:4px 0;font-size:12px}.inspect-object #fridge-reader textarea{display:block;width:100%}#release-control{position:absolute;bottom:106px;left:16px;pointer-events:auto}.avatar-hotspot[data-say]::after{content:attr(data-say);position:absolute;bottom:98%;left:50%;transform:translateX(-50%);width:max-content;max-width:145px;border:1px solid #708269;border-radius:14px 14px 14px 2px;background:#fffdf5;color:#34442e;padding:7px 10px;font-size:12px;pointer-events:none}.avatar-hotspot[data-say]{z-index:11}

body.album-inspect #scene{pointer-events:auto!important;touch-action:none} #album-dock article button{font-size:11px;padding:3px;min-height:32px}

.inspect-object .heading{display:none!important}.inspect-object .scene-wrap{flex:1;min-height:0}.album-inspect #scene{pointer-events:auto!important;touch-action:none}
#paper-tools,.inspect-object #fridge-reader:not([hidden]){position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;display:block!important;pointer-events:none;background:none!important;border:0!important;padding:0!important;box-shadow:none!important;overflow:visible!important;z-index:18}#paper-tools[hidden]{display:none!important}#paper-tools button,#fridge-reader button,#fridge-reader label{pointer-events:auto}
.paper-exit,.reader-heading{position:absolute;top:12px;left:12px}.paper-stack,#reader-compose{position:absolute;right:24px;bottom:26px;width:75px;height:88px;transform:rotate(-10deg);border:1px solid #aa9981;background:#fff9ed;border-radius:3px;padding:6px;box-shadow:3px 3px #e4d8c4,6px 6px #fff4df,8px 8px #aa9981}.paper-stack b{display:grid;place-items:center;background:#95938d;height:51px;color:white;font-size:27px}.paper-stack small,#reader-compose small{display:block;font-size:11px}.paper-bin{position:absolute;left:18px;bottom:18px;width:77px;height:52px;border-radius:5px 5px 16px 16px;background:repeating-linear-gradient(55deg,#d8ba8c 0 5px,#e5ccaa 6px 10px);transform:rotate(8deg);transition:transform .18s}.paper-bin:before{content:'';position:absolute;top:-4px;left:-3px;right:-3px;height:8px;border:2px solid #907956;border-radius:50%;background:#8a7459;transition:height .18s,top .18s}.paper-bin.near:before{height:20px;top:-15px}.paper-bin.near{transform:rotate(3deg) scale(1.12)}#paper-tools output{position:absolute;left:12px;top:64px}
.inspect-object #fridge-reader .reader-actions{position:static}.inspect-object #reader-next,.inspect-object #reader-prev{position:absolute;top:52%}.inspect-object #reader-prev{left:8px}.inspect-object #reader-next{right:8px}.inspect-object #fridge-reader .floating-note{position:absolute;right:12px;bottom:52px;width:min(180px,52%);background:#ffeecc;padding:8px;transform:rotate(-3deg)}.floating-note~button{position:absolute;bottom:10px;right:12px}.floating-note~button:last-child{right:95px}

#note-tools,.inspect-object #fridge-reader:not([hidden]){position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;display:block!important;pointer-events:none;background:none!important;border:0!important;padding:0!important;box-shadow:none!important;overflow:visible!important;z-index:18}#note-tools[hidden]{display:none!important}#note-tools button,#fridge-reader button,#fridge-reader label{pointer-events:auto}

.note-draft{pointer-events:auto;position:absolute;right:18px;bottom:130px;width:min(210px,60%);background:#ffe8b7;padding:10px;color:#473d31}.note-draft textarea{width:100%;min-height:75px}#note-tools .paper-stack{background:#ffe6ad}#note-tools .paper-stack b{background:#d4ad63}#note-tools output{position:absolute;left:12px;top:65px}