/* Family space 2.2: five destinations, calm cards, readable mobile layouts. */
.space-shell{max-width:1440px}.space-shell .workspace{min-width:0}.space-shell .toolbar{margin-bottom:22px}.space-shell .toolbar h2{font-size:2rem}.space-shell .sidebar-note>svg{width:32px;height:32px;color:#b47655}.space-shell .sidebar-note{margin-top:30px}.section-tabs{display:flex;gap:8px;margin:0 0 22px;flex-wrap:wrap}.section-tabs button{flex:1;border-radius:14px;white-space:nowrap}.section-tabs button[aria-pressed=true]{background:var(--brand);color:var(--paper);border-color:var(--brand)}
.family-room{border:1px solid var(--line);border-radius:28px;background:linear-gradient(130deg,#f3edda,#f0f1e5);padding:24px;overflow:hidden}.room-heading{display:flex;align-items:center;justify-content:space-between}.room-heading h3{font-size:1.6rem}.room-sun{font-size:3rem;color:#b48549;line-height:1}.room-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0}.room-controls .caption{text-align:center}.people-track{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(290px,calc((100% - 16px)/2));gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;padding:6px 3px 18px;scrollbar-width:thin;scrollbar-color:#adbaa1 transparent}.presence-card{scroll-snap-align:start;border:1px solid #ddd8c9;border-radius:24px;background:#fffdf6;overflow:hidden;min-width:0;box-shadow:0 5px 16px #52483709}.my-presence{border-color:#95a982}.presence-heading{display:flex;align-items:center;gap:8px;padding:15px 18px 0}.presence-heading strong{font-size:1.2rem}.mine-tag{font-size:.75rem;background:#e8edde;color:#486040;border-radius:20px;padding:0 10px}.character-scene{position:relative;height:318px;direction:ltr;margin:0 10px;isolation:isolate}.character-hit{position:absolute;right:0;bottom:0;width:132px;height:310px;border:0;border-radius:18px;padding:0;overflow:hidden;background:transparent;box-shadow:none}.character{display:block;height:100%;width:100%;background-image:url('/media/family-figures.png');background-repeat:no-repeat;background-size:400% 100%;border-radius:16px;pointer-events:none}.character-1{background-position:0% 0}.character-2{background-position:33.333333% 0}.character-3{background-position:66.666667% 0}.character-4{background-position:100% 0}.speech-cloud{position:absolute;left:2px;top:37px;width:calc(100% - 144px);min-width:108px;max-width:165px;border:1px solid #ddcba7;border-radius:30px 26px 8px 30px;padding:17px 12px;direction:rtl;text-align:right;background:#fff6de;color:#4b4637;font-weight:500;box-shadow:0 5px 20px #513f140a;z-index:2}.speech-cloud:after{content:'';position:absolute;right:-13px;bottom:17px;border-style:solid;border-width:8px 0 0 14px;border-color:transparent transparent transparent #ddcba7}.speech-cloud>span{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:1rem;line-height:1.8}.speech-cloud small{display:block;font-size:.7rem;color:#817456;margin-top:7px}.speech-invite,.quiet-presence{position:absolute;left:2px;top:47px;width:calc(100% - 145px);direction:rtl;text-align:right;line-height:1.9}.speech-invite{background:transparent;border:1px dashed var(--line);font-size:.9rem;padding:12px;border-radius:20px}.quiet-presence{font-size:.8rem;color:var(--muted);padding:14px}.presence-footer{padding:9px 16px 15px}.presence-footer>.caption{font-size:.72rem;min-height:22px}.day-summary{display:block;width:100%;text-align:right;background:#f0f2e8;border:0;font-weight:500;font-size:.88rem}.day-summary span{display:block;font-size:.78rem;color:var(--muted)}.room-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:7px;font-size:.82rem;color:var(--muted)}.room-bottom>span:first-child{display:flex;align-items:center;gap:9px}.room-bottom .avatar{width:32px;height:32px}.home-next{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:22px 0}.home-next>button{display:flex;align-items:center;justify-content:space-between;text-align:right;padding:18px;font-size:.87rem;background:var(--card);border-radius:18px}.home-next b{font-size:1.5rem;color:var(--brand);margin-left:8px}.home-next svg{width:25px;height:25px}.today-messages{margin-top:28px}.today-messages>.row{margin-bottom:13px}.today-list{display:grid;gap:10px}.today-message{display:grid;grid-template-columns:40px minmax(0,1fr) 20px;gap:12px;text-align:right;border:1px solid var(--line);padding:15px;border-radius:17px;background:var(--card);font-weight:400}.today-message>.avatar{width:40px;height:40px}.message-byline{display:block;font-size:.77rem;color:var(--muted)}.message-excerpt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;line-height:1.8;font-size:1rem}.all-messages{width:100%;margin-top:15px;background:transparent;border:1px solid var(--line)}.message-controls{margin-bottom:25px}.message-controls .actions{margin-top:0}.message-controls input{max-width:260px}.day-divider{text-align:center;font-size:.93rem;color:var(--muted);padding:14px 0;margin:12px 0;border-bottom:1px solid var(--line)}.program-tasks{margin-top:26px}.program-tasks>.card{margin-top:14px}.program-tasks>.row{margin-bottom:15px}.space-shell .sidebar-note svg{flex:none}.album-intro{margin-bottom:24px}.album-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.album-cover{text-align:right;padding:0 0 16px;border-radius:20px;overflow:hidden;display:flex;flex-direction:column;gap:6px;background:var(--card);transition:transform .15s}.album-cover:hover{transform:translateY(-3px)}.album-cover-image{height:190px;width:100%;background:var(--soft);display:grid;place-items:center}.album-cover-image img{width:100%;height:100%;object-fit:cover}.album-placeholder svg{width:45px;height:45px;color:var(--brand)}.album-title{padding:5px 14px 0;font-size:1.05rem}.album-cover>.caption{padding:0 14px;font-weight:400}.album-header{margin-bottom:22px}.album-header h3{font-size:1.6rem;margin:12px 0}.photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.gallery-card{background:var(--card);border:1px solid var(--line);border-radius:18px;overflow:hidden;min-width:0}.gallery-image{border:0;border-radius:0;background:var(--soft);display:block;width:100%;height:220px;padding:0}.gallery-image img{display:block;width:100%;height:100%;object-fit:contain}.gallery-caption{padding:12px}.gallery-caption p{font-size:.9rem}.gallery-caption small{display:block;color:var(--muted);font-size:.73rem}.line-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.gallery-stage{display:grid;place-items:center;min-height:160px;background:var(--soft);border-radius:14px;overflow:hidden;touch-action:pan-y pinch-zoom}.gallery-stage img{display:block;max-width:100%;max-height:62vh;object-fit:contain}.download-original{padding:8px 12px;min-height:44px;display:inline-block}.upload-zone{padding:16px;border:1px dashed var(--line);border-radius:16px;background:var(--soft)}.upload-zone input{background:var(--card);margin-top:10px;max-width:100%}.upload-item{border:1px solid var(--line);border-radius:14px;padding:14px;margin:10px 0}.upload-item b{display:block;direction:ltr;overflow-wrap:anywhere;font-size:.8rem}.upload-item progress{width:100%;height:12px;accent-color:var(--brand)}.upload-item [role=status]{display:block}.upload-item textarea{min-height:65px}.empty-symbol svg{width:40px;height:40px}.space-shell .body-text{overflow-wrap:anywhere}.space-shell .daily-board{margin-bottom:22px}.space-shell .nav-icon svg{width:26px;height:26px}
html[data-theme=dark] .family-room{background:linear-gradient(130deg,#2a3329,#21352b);border-color:var(--line)}html[data-theme=dark] .presence-card{background:#202e25;border-color:#485a47}html[data-theme=dark] .speech-cloud{background:#3f3d2b;border-color:#887a52;color:#f5ecd2}html[data-theme=dark] .speech-cloud:after{border-left-color:#887a52}html[data-theme=dark] .speech-cloud small{color:#c4b887}html[data-theme=dark] .day-summary{background:#304334;color:var(--ink)}html[data-theme=dark] .mine-tag{background:#3f503b;color:#deedcb}html[data-theme=dark] .upload-zone{background:var(--soft)}html[data-theme=dark] .section-tabs button[aria-pressed=true]{background:#425a40;color:#ecf5dd}html[data-theme=dark] .space-shell .toolbar h2{color:var(--ink)}html[data-theme=dark] .home-next>button,html[data-theme=dark] .today-message,html[data-theme=dark] .album-cover{background:var(--card)}
@media(min-width:1250px){.people-track{grid-auto-columns:calc((100% - 32px)/3)}.character-scene{height:300px}.character-hit{width:120px;height:295px}.speech-cloud{width:calc(100% - 133px);min-width:100px;padding:13px 10px}.speech-invite,.quiet-presence{width:calc(100% - 130px)}}
@media(max-width:900px){.album-grid,.photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.people-track{grid-auto-columns:90%}.character-hit{width:140px}.speech-cloud{width:calc(100% - 155px)}}
@media(max-width:600px){.space-shell .workspace{padding-top:14px}.space-shell .toolbar{gap:10px;margin:18px 0}.space-shell .toolbar h2{font-size:1.7rem}.space-shell .toolbar>.primary{font-size:.85rem;min-height:44px;padding:9px 13px}.space-shell .toolbar p{font-size:.85rem}.family-room{padding:16px 12px;border-radius:22px}.room-heading h3{font-size:1.3rem}.family-room>.hint{font-size:.78rem}.room-controls .caption{font-size:.65rem;max-width:120px}.room-controls button{font-size:.7rem;padding:5px}.people-track{grid-auto-columns:94%;gap:12px;padding-bottom:10px}.presence-heading{padding:12px 14px 0}.character-scene{height:292px}.character-hit{width:115px;height:285px}.speech-cloud{top:35px;width:calc(100% - 128px);min-width:105px;max-width:160px;padding:12px}.speech-cloud>span{font-size:.93rem}.speech-invite,.quiet-presence{width:calc(100% - 128px)}.presence-footer{padding:8px 13px 12px}.room-bottom{font-size:.75rem;gap:6px}.room-bottom>span:last-child{width:100%;padding-right:2px}.home-next{gap:10px;margin:16px 0}.home-next>button{padding:13px 11px;font-size:.77rem;gap:8px}.home-next>button span:last-child{line-height:1.6}.today-message{grid-template-columns:32px minmax(0,1fr) 12px;gap:9px;padding:12px}.today-message>.avatar{width:32px;height:32px}.message-byline{font-size:.7rem}.today-messages h3{font-size:1.2rem}.message-excerpt{font-size:.94rem}.album-grid,.photo-grid{gap:12px}.album-cover-image{height:155px}.album-title{font-size:.95rem;padding:4px 10px 0}.album-cover>.caption{font-size:.7rem;padding:0 10px}.gallery-image{height:165px}.gallery-caption{padding:9px}.gallery-caption p{font-size:.83rem}.gallery-caption small{font-size:.68rem}.gallery-caption button{font-size:.7rem;padding:4px;min-height:44px}.space-shell .navigation button{font-size:.75rem;min-height:65px}.space-shell .topbar{gap:10px}.space-shell .account-actions{gap:1px}.space-shell .account-actions button{font-size:.75rem;padding:7px}.section-tabs{gap:5px}.section-tabs button{font-size:.8rem;padding:8px}.gallery-stage img{max-height:55vh}}
@media(max-width:360px){.people-track{grid-auto-columns:100%}.speech-cloud{font-size:.88rem;min-width:94px}.character-hit{width:110px}.speech-cloud,.speech-invite,.quiet-presence{width:calc(100% - 122px)}.space-shell .toolbar{flex-direction:column;align-items:flex-start}.photo-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.album-cover{transition:none}.people-track{scroll-behavior:auto}}

/* Keep the generated full-body artwork at its original 3:8 cell ratio. */
.character-hit{width:116.25px}.speech-cloud{width:calc(100% - 130px)}
@media(min-width:1250px){.character-hit{width:110.625px}}
@media(max-width:600px){.character-hit{width:106.875px}.speech-cloud,.speech-invite,.quiet-presence{width:calc(100% - 120px)}}

html[data-theme=dark] .character-hit{background:transparent;border:0}
html[data-theme=dark] .space-shell .sidebar-note{background:#2b382d;border-color:var(--line);color:var(--muted)}
html[data-theme=dark] .space-shell .family-person{color:var(--muted)}
/* 2.2.2: the signed-in person stays in the header; large cards show everyone else. */
.self-profile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:58px;min-height:62px;padding:2px 6px;border:0;background:transparent;border-radius:15px;color:var(--brand);flex:none}
.self-profile>span:last-child{font-size:.67rem;line-height:1.4}.self-profile .greeting-avatar{margin:0}.self-profile:hover{background:var(--soft)}
.character-1{background-image:url('/media/avatars/ali-full.png?v=2.2.2');background-size:auto 100%;background-position:50% 0}
.presence-location{margin:7px 16px 0;padding:5px 10px;border-radius:10px;background:#f0f2e8;color:#4c6048;font-size:.82rem;overflow-wrap:anywhere;min-height:34px}
.self-panel-heading{display:flex;align-items:center;gap:12px;margin:18px 0}.self-panel-heading .avatar{width:60px;height:60px}.self-plan-summary{border:1px solid var(--line);border-radius:12px;padding:12px;margin:18px 0;font-size:.9rem}
html[data-theme=dark] .self-profile{background:transparent;color:var(--ink);border:0}html[data-theme=dark] .self-profile:hover{background:var(--soft)}
html[data-theme=dark] .presence-location{background:#304334;color:#dde9d7}
@media(min-width:1250px){.family-room .room-controls{display:none}.family-room>.hint{margin-bottom:14px}}
@media(max-width:600px){.self-profile{min-width:50px;min-height:59px;padding:2px}.presence-location{font-size:.8rem;margin:6px 13px 0}.family-room>.hint{font-size:.79rem}}

/* 2.2.2: compact face choices; one card opens on demand. */
.member-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-width:520px;margin:18px auto 10px}
.member-choice{display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0;min-height:104px;padding:10px 5px;border:1px solid transparent;background:transparent;border-radius:20px;color:var(--ink)}
.member-choice .avatar{width:66px;height:66px;border-radius:50%;border:2px solid var(--card);box-shadow:0 0 0 1px var(--line);flex:none}
.member-choice>span:last-child{font-size:.91rem;line-height:1.5}.member-choice:hover{background:var(--card)}
.member-choice[aria-expanded=true]{background:var(--card);border-color:var(--brand)}
.member-choice[aria-expanded=true] .avatar{box-shadow:0 0 0 2px var(--brand)}
.member-choice:focus-visible{outline:3px solid var(--brand);outline-offset:3px}
.presence-hint{text-align:center;color:var(--muted);font-size:.85rem;padding:12px 0 20px}
#presence-detail{scroll-margin-top:12px}
.selected-presence{max-width:460px;margin:16px auto 20px;animation:presence-in .18s ease-out}
.selected-presence .presence-heading{justify-content:space-between}.selected-presence .presence-heading button{min-width:64px;min-height:44px}
.selected-presence .character-scene{height:330px;max-width:380px;margin:0 auto;padding:0 10px}
.selected-presence .character-hit{right:10px;width:142px;height:320px}
.selected-presence .character{width:120px;margin:0 auto;border-radius:0}
.selected-presence .character-1{width:142px}
.selected-presence .speech-cloud{left:14px;top:36px;width:calc(100% - 172px);min-width:0;max-width:195px;padding:14px}
.selected-presence .quiet-presence{left:10px;top:40px;width:calc(100% - 170px);padding:12px}
.oslo-avatar{position:relative;overflow:hidden;background:var(--soft)}
.oslo-avatar img{position:absolute;max-width:none;width:200%!important;height:200%!important;left:-81%;top:-10%;object-fit:contain}
.oslo-figure{display:block;width:100%;height:310px;object-fit:contain;padding:12px 16px 0}
.oslo-presence h4{font-size:.93rem;margin:0 0 10px}.oslo-note{display:block;width:100%;text-align:right;background:var(--soft);padding:12px;border:1px solid var(--line);margin-bottom:12px;border-radius:14px;font-weight:400;overflow-wrap:anywhere}
.oslo-note small{display:block;color:var(--muted);font-size:.74rem;margin-top:8px}
.oslo-note>.caption{display:block;margin-top:7px}.family-room .room-bottom{justify-content:center}
html[data-theme=dark] .member-choice{background:transparent;border-color:transparent;color:var(--ink)}
html[data-theme=dark] .member-choice:hover,html[data-theme=dark] .member-choice[aria-expanded=true]{background:var(--card)}
html[data-theme=dark] .member-choice[aria-expanded=true]{border-color:var(--brand)}
@keyframes presence-in{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.member-picker{gap:3px;margin:14px auto 8px}.member-choice{padding:8px 3px;gap:7px;min-height:94px;border-radius:16px}.member-choice .avatar{width:54px;height:54px}.member-choice>span:last-child{font-size:.85rem}.presence-hint{font-size:.78rem}.selected-presence .character-scene{height:297px;margin:0 6px}.selected-presence .character-hit{right:0;width:128px;height:285px}.selected-presence .character{width:106.875px}.selected-presence .character-1{width:128px}.selected-presence .speech-cloud{left:4px;width:calc(100% - 143px);max-width:180px;padding:12px 10px}.selected-presence .quiet-presence{left:2px;width:calc(100% - 139px);padding:9px}.selected-presence .speech-cloud>span{font-size:.94rem}.oslo-figure{height:280px}.family-room .room-bottom>span:last-child{width:auto}}
@media(max-width:360px){.member-choice .avatar{width:47px;height:47px}.member-choice{min-height:88px}.selected-presence .speech-cloud>span{font-size:.9rem}.selected-presence .speech-cloud{padding:10px 8px}}
@media(prefers-reduced-motion:reduce){.selected-presence{animation:none}}
