/* Layout ownership: shared geometry lives here. Component colors remain in polish.css. */
:root{--content-width:1240px;--gutter:clamp(16px,3vw,36px);--nav-height:76px;--surface:#fffdfa}
html{scroll-padding-block:20px}body{line-height:1.5}button,a{overflow-wrap:anywhere}
h1,h2,h3{overflow-wrap:anywhere;text-wrap:balance}img,video{max-width:100%}
.button{line-height:1.4;text-align:center}.button:hover{background:#354867}
.button.secondary:hover{background:#edf1eb}.button.danger:hover{background:#f5d9d6}
.icon-button{min-width:44px;min-height:44px}.badge{white-space:normal}
.workspace-main{width:100%;max-width:var(--content-width);margin:0 auto;padding:0 var(--gutter) calc(var(--nav-height) + 32px + env(safe-area-inset-bottom))}
.workspace-top{height:auto;min-height:76px;gap:16px}.profile{flex-shrink:0}
.breadcrumb,.profile-text{min-width:0;overflow-wrap:anywhere}.breadcrumb{flex-wrap:wrap}
.page-heading{align-items:flex-start;gap:20px;margin:28px 0}.page-heading>div{min-width:0}
.page-heading h1{font-size:clamp(30px,3.4vw,42px);line-height:1.15;margin:6px 0 12px}
.page-heading p{font-size:15px;max-width:52ch}.heading-add{display:inline-flex;flex-shrink:0;align-self:center}
.bottom-nav{height:calc(var(--nav-height) + env(safe-area-inset-bottom));padding:8px 12px calc(8px + env(safe-area-inset-bottom));gap:6px}
.bottom-nav .nav-item{min-width:0;min-height:58px;font-size:12px;justify-content:center}
.mobile-add{display:none}.rail{overflow-y:auto;overscroll-behavior:contain}.rail .brand{margin-inline:8px}
.rail .calendar-dot{background:#cadcd0}.rail-bottom{flex-shrink:0}
.day-navigation{max-width:none;margin-bottom:24px;gap:4px}.day-navigation button{min-width:0;font-size:14px}
.dashboard-columns{grid-template-columns:minmax(0,1fr);gap:28px}
.support-column{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-content:start}
.support-column .support-card{margin:0}.support-column .support-card:last-child:nth-child(odd){grid-column:1/-1}
.next-card{padding:24px;background:#e7eee7;min-height:0}.next-card:after{content:none}
.next-card h2{font:700 28px/1.25 Georgia,serif;margin:14px 0 10px}.next-card p{font-size:15px;line-height:1.6}
.next-card-footer{gap:12px}.next-card-footer .badge{font-size:12px}
.section-heading,.month-heading{flex-wrap:wrap;gap:10px}.section-heading h2{font-size:19px}
.week-strip{gap:3px;padding:6px}.date-button{min-height:78px}.date-button span{font-size:12px}
.month-panel{padding:18px}.month-grid{gap:3px}.month-day{min-width:0;font-size:15px;min-height:48px}
.month-heading h2{font-size:20px}.month-weekday{font-size:12px}
.event{grid-template-columns:55px minmax(0,1fr);padding:20px;gap:12px 16px}
.event-title{align-items:flex-start}.event h3{font-size:17px;line-height:1.45}.event p{font-size:14px}
.event-time{font-size:14px}.event-time small{font-size:12px}.event-meta{font-size:12px}
.event-actions{grid-column:2;grid-row:auto;flex-direction:row;justify-content:flex-start;align-self:auto}
.event-actions button{font-size:13px;min-height:44px}.filter-chip{font-size:13px}
.day-caption{font-size:13px}.person-row{min-width:0}.person-row b{overflow-wrap:anywhere}
.person-row small{flex-shrink:0}.template-button{font-size:14px;min-height:84px}
.support-card{border-radius:22px}.support-card h2{font-size:21px;line-height:1.3}.support-card>p{font-size:14px}
.settings-overview{grid-template-columns:minmax(0,1fr);gap:20px;align-items:stretch}
.settings-overview .support-card{padding:26px;min-width:0;margin:0;display:flex;flex-direction:column}
.settings-overview h2{font-size:27px}.settings-overview p{font-size:15px}
.settings-overview .button{max-width:100%;align-self:flex-start}
.settings-overview .menu-row{font-size:15px;line-height:1.5;gap:12px;min-width:0}
.menu-row>.icon,.contact-edit>.icon{flex-shrink:0}.menu-row{overflow-wrap:anywhere}
.contact-edit{padding:14px 0}.contact-edit>span:nth-child(2){min-width:0;overflow-wrap:anywhere}
.contact-edit b{font-size:16px}.contact-edit small{font-size:13px}
.calendar-choice{min-width:0;overflow-wrap:anywhere}.danger-zone{grid-column:1/-1}
/* A bounded dialog scrolls as one surface; no controls float over its fields. */
.modal{padding:16px;align-items:center;overflow-y:auto}
.modal-card,.room-dialog .modal-card{width:min(580px,100%);max-width:100%;max-height:calc(100dvh - 32px);min-width:0;margin:auto;border-radius:24px;padding:28px;scrollbar-gutter:stable}
.modal-title{align-items:flex-start}.modal-title>div{min-width:0}.modal-title h2{font:700 27px/1.2 Georgia,serif}
.modal-title>.icon-button{flex:0 0 44px}.sheet-handle{display:none}
.field label{font-size:14px}.field input,.field textarea,.field select{max-width:100%;min-width:0;font-size:16px}
.field input[type=datetime-local]{appearance:none;display:block}
.two{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.actions{gap:12px}.actions .button{flex:1;min-width:0}.setting-row>div{min-width:0}
.template-strip{flex-wrap:wrap;overflow:visible}.template-strip button{white-space:normal}
.link-box{flex-wrap:wrap}.link-box input{flex:1 1 180px}.link-box .button{flex-shrink:0}
.auth-shell{background:linear-gradient(145deg,#f8eee7,var(--page) 65%);padding:24px var(--gutter)}
.auth-wrap{margin:clamp(24px,8vh,80px) auto;padding:30px;max-width:460px}
.auth-wrap h1,.booking-card h1{font:700 34px/1.15 Georgia,serif}
.auth-wrap>p,.booking-card>p{font-size:16px}.booking-page{padding:24px var(--gutter)}
.booking-card{padding:28px}.booking-card h1{font-size:clamp(28px,5vw,34px)}.security-code{overflow-wrap:anywhere;font-size:16px}
/* Content determines header height; the remaining space belongs to the conversation. */
body[data-workspace-view=family] .workspace{height:100dvh;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto}
body[data-workspace-view=family] .workspace-main{min-height:0;display:flex;flex-direction:column;padding:0}
body[data-workspace-view=family] .workspace-top{min-height:64px;flex:0 0 auto;padding:0 var(--gutter)}
body[data-workspace-view=family] .page-heading,body[data-workspace-view=family] .community-welcome,body[data-workspace-view=family] .workspace-footnote,.family-secondary{display:none}
body[data-workspace-view=family] #community-mount{flex:1;min-height:0;display:flex;flex-direction:column}
body[data-workspace-view=family] #community-mount>.empty{margin:16px;overflow:auto}
body[data-workspace-view=family] .family-room{height:auto;min-height:0;flex:1;display:flex;flex-direction:column;border-radius:22px 22px 0 0;border-width:1px 0 0;box-shadow:none}
body[data-workspace-view=family] .bottom-nav{position:static}
.room-header{padding:16px;gap:12px;flex-shrink:0;min-height:0}.room-header>div:nth-child(2){min-width:0;flex:1}
.room-header h2,.guest-room .room-header h2{font:700 21px/1.2 Georgia,serif;margin:0 0 6px;overflow-wrap:anywhere;text-wrap:initial}
.room-header>div>span{font-size:12px}.room-header .icon-button{width:44px;height:44px;min-width:44px}
.room-avatar{width:40px;height:44px}.room-header .call-entry{min-height:44px;background:#dce9df;color:#2c5043}
.channel-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:4px 12px 0;gap:4px;overflow:visible;flex-shrink:0}
.channel-tabs button,.guest-room .channel-tabs button{white-space:normal;min-width:0;min-height:48px;font-size:14px;line-height:1.3;padding:10px 4px}
.chat-encryption,.chat-composer{flex-shrink:0}.chat-encryption .text-button{min-height:40px;font-size:12px;padding:8px 12px;line-height:1.4}
.chat-messages,.guest-room .chat-messages{min-height:0;max-height:none;flex:1;overflow-y:auto;padding:24px 20px}
.chat-message{min-width:0}.chat-bubble{min-width:0;max-width:85%;padding:14px 16px}.chat-message.mine .chat-bubble{background:#e5ede5}
.chat-author{flex-wrap:wrap;gap:3px 12px}.chat-author b{overflow-wrap:anywhere;min-width:0}.chat-author time{white-space:nowrap}
.chat-bubble p{font-size:17px}.chat-bubble audio{width:260px;max-width:100%;min-width:0}
.chat-empty{flex-shrink:0;max-width:440px;padding:24px 8px}.chat-empty h3{font:700 28px/1.25 Georgia,serif}.chat-empty p{font-size:16px}
.chat-composer{padding:12px 16px 10px}.composer-row{gap:8px;align-items:flex-end}
.composer-row>.icon-button,.send-button{width:44px;height:48px;min-width:44px;min-height:48px}
.composer-row textarea{min-width:0;min-height:48px;flex:1;padding:13px 12px;font-size:16px}
.composer-status{font-size:12px;line-height:1.4;margin-top:8px}.attachment-preview{max-height:120px;overflow:auto}
.guest-room{height:100dvh;min-height:0;display:flex;flex-direction:column;padding:0;max-width:1000px}
.guest-header{height:auto;min-height:72px;flex-shrink:0;padding:12px 20px;flex-wrap:wrap}
.guest-room .family-room{flex:1;min-height:0;height:auto;display:flex;flex-direction:column}
.guest-room .chat-composer{padding-bottom:calc(12px + env(safe-area-inset-bottom))}
.guest-room .join-card{flex-shrink:0}.join-card{margin:24px auto;max-width:480px;padding:28px}
/* Safe, readable call controls in portrait and landscape. */
.call-room{padding:calc(20px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));gap:18px}
.call-header{margin:0;align-items:flex-start}.call-header>div{min-width:0}.call-header h2{font-size:28px}
.video-grid{grid-template-columns:minmax(0,1fr);gap:16px;min-width:0}
.video-tile{min-width:0;min-height:260px;border-radius:22px}.video-name{max-width:calc(100% - 36px);overflow-wrap:anywhere}
.video-placeholder{position:relative;min-height:inherit;padding:32px 24px 64px}
.video-placeholder .call-flower{font-size:76px}.video-placeholder h3{font-size:25px;margin:18px 0 12px}
.video-placeholder p{font-size:15px;margin:0}.call-status{font-size:15px;margin:0 auto}
.call-prejoin{padding:0;max-width:620px}.call-controls{flex-wrap:wrap;gap:12px;padding:0;width:100%}
.call-control{flex:0 1 76px;width:76px;min-height:76px;padding:10px 5px}.call-control span{font-size:12px}
.call-bottom{margin-top:0;gap:10px}.call-bottom .text-button,.call-bottom>span{font-size:13px}
/* Familiar senior home, with typography that fits each tile. */
.home-screen{padding:0 var(--gutter) 32px;max-width:var(--content-width)}
.home-top{flex-wrap:wrap;padding-block:16px;gap:12px}.home-top-actions{flex-wrap:wrap}
.welcome-block{border-radius:28px;padding:clamp(24px,4vw,44px);gap:28px;grid-template-columns:minmax(0,1fr)}
.welcome-copy,.welcome-next{min-width:0}.welcome-flower{opacity:.25;pointer-events:none}
.home-clock{font-size:clamp(72px,10vw,112px);letter-spacing:-3px;line-height:1.15}
.welcome-copy h1{font:700 clamp(28px,4vw,36px)/1.2 Georgia,serif}.welcome-copy p{font-size:20px}
.welcome-next h2{font-size:25px}.welcome-next p{font-size:18px}.welcome-next .button{width:100%}
.apps-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.app-tile{padding:22px 18px;min-height:180px;gap:14px;border-radius:22px}
.app-tile b{font-size:20px;line-height:1.25}.app-tile>span:not(.app-tile-icon):not(.app-tile-arrow){font-size:14px}
.app-tile:hover{transform:none}.app-tile-arrow{top:24px;right:16px}
.home-contact{padding:26px;min-width:0}.home-contact h2{font-size:28px}.home-contact p{font-size:18px}
.home-app-heading h1{font:700 36px/1.2 Georgia,serif}.home-app-heading>.button{margin-bottom:22px}
.home-footer{gap:16px}.home-footer .button{max-width:100%}.memory-status{flex-wrap:wrap}
.display-header{flex-wrap:wrap}.display-event{min-width:0}.media-player h2{font:700 32px/1.2 Georgia,serif}
/* Marketing uses the same measured spacing and restrained family palette. */
.family-site-nav,.family-hero,.family-how{max-width:var(--content-width);padding-inline:var(--gutter)}
.family-site-nav{min-height:88px;flex-wrap:wrap;gap:12px}
.family-hero{padding-top:36px;padding-bottom:64px;gap:40px;align-items:center}
.family-hero-copy{min-width:0}.family-hero h1{font:700 clamp(42px,5.5vw,72px)/1.06 Georgia,serif;letter-spacing:-2px;text-wrap:balance}
.family-hero-copy>p{font-size:18px;line-height:1.7;max-width:46ch}
.family-hero-photo{height:auto;min-height:0;max-height:none;aspect-ratio:1/1;border-radius:36px;isolation:isolate}
.family-hero-photo img{position:absolute;inset:0;height:100%;min-height:0;width:100%;object-fit:cover}
.photo-note{bottom:20px;font-size:14px;padding:16px;line-height:1.5}
.family-promise{background:#faeee6;gap:24px;padding:28px var(--gutter);flex-wrap:wrap;font-size:16px}
.family-how{padding-block:72px}.family-how>h2,.possibilities h2,.family-care h2{font-family:Georgia,serif;font-size:clamp(32px,4vw,48px);line-height:1.15;letter-spacing:-1px}
.how-steps{grid-template-columns:minmax(0,1fr);gap:36px}.step-art{border-radius:28px;height:210px;margin-bottom:22px}
.how-steps h3{font-size:23px}.how-steps p{font-size:16px}
.possibilities{padding:64px max(var(--gutter),calc((100vw - 1168px)/2));gap:36px}
.marketing-apps{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.marketing-apps .app-tile{min-height:150px}
.family-care{padding:64px var(--gutter);background:#e5ede5}.family-site-footer{padding:36px var(--gutter)}
@media(max-width:599px){
 .page-heading{flex-direction:column;gap:18px;margin:24px 0}.heading-add{align-self:stretch;width:100%}
 .support-column{grid-template-columns:minmax(0,1fr)}.settings-overview .support-card{padding:22px}
 .event{padding:18px 14px;grid-template-columns:46px minmax(0,1fr);gap:12px}.event-actions{grid-column:1/-1}
 .event-actions .button{flex:1}.section-heading{align-items:flex-start}.week-controls{margin-left:auto}
 .two{grid-template-columns:minmax(0,1fr);gap:0}.modal{padding:10px}
 .modal-card,.room-dialog .modal-card{max-height:calc(100dvh - 20px);padding:24px 18px;border-radius:20px}
 .auth-wrap{padding:24px 20px}.booking-card{padding:24px 18px}.privacy-note{padding:16px;gap:10px}
 .room-header{padding:12px;gap:8px}.room-header h2,.guest-room .room-header h2{font-size:18px}
 .room-avatar{display:none}.call-entry span{display:none}.channel-tabs{padding-inline:8px}
 .channel-tabs button,.guest-room .channel-tabs button{font-size:13px}
 .chat-encryption .text-button{font-size:11px}.chat-messages,.guest-room .chat-messages{padding:18px 12px}
 .chat-message>.avatar{display:none}.chat-bubble{max-width:94%}.chat-author{font-size:12px}.chat-author time{font-size:11px}
 .chat-composer{padding:10px 10px 8px}.composer-row{gap:6px}.composer-status{font-size:11px}
 .composer-row textarea{padding-inline:9px}.chat-empty h3{font-size:25px}.chat-empty p{font-size:15px}
 .guest-header{padding:12px 16px}.guest-room .join-card{margin:20px 16px}
 .call-header h2{font-size:24px}.call-controls{gap:8px}.call-control{flex-basis:66px;min-height:72px}
 .home-top .brand{font-size:21px}.home-top .button{font-size:13px}.home-date{font-size:16px}
 .family-hero{padding-block:24px 44px;gap:28px}.family-hero h1{letter-spacing:-1.3px}
 .family-hero-copy>p{font-size:17px}.family-hero-photo{aspect-ratio:4/5;border-radius:28px}
 .family-hero .hero-actions>.button{width:100%}.photo-note{font-size:13px;bottom:16px;left:14px;right:14px}
 .family-how{padding-block:48px}.family-care{padding-block:48px}.possibilities{padding-block:44px}
}
@media(max-width:359px){
 .apps-grid,.marketing-apps{grid-template-columns:minmax(0,1fr)}.home-top .brand{font-size:20px}
 .home-top-actions{gap:6px}.home-screen{padding-inline:16px}.home-top .button{padding-inline:10px}
 .next-card{padding:20px}.date-button span{font-size:11px}.month-panel{padding:12px}
 .bottom-nav .nav-item{font-size:11px}.chat-empty{padding-block:16px}.chat-empty h3{font-size:23px}
 .family-site-nav{align-items:center}.family-site-nav>.button{padding:10px;font-size:12px}
}
@media(min-width:600px){
 .apps-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.video-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .video-tile:only-child{grid-column:1/-1;min-height:360px}.call-prejoin{flex-direction:row}
 .call-entry span{display:inline}.guest-room{padding:0 24px 24px}.guest-room .family-room{border-radius:24px}
 .site-links{display:none}.family-site-nav{flex-wrap:nowrap}
}
@media(min-width:800px){
 .settings-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
 .welcome-block{grid-template-columns:1.1fr 1fr}.home-contacts{grid-template-columns:repeat(2,minmax(0,1fr))}
 .how-steps{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.step-art{height:190px}
 .marketing-apps{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:1000px){
 .workspace{grid-template-columns:220px minmax(0,1fr)}.workspace-main{padding:0 var(--gutter) 36px}
 .workspace-top{min-height:78px}.bottom-nav{display:none}.rail{padding:30px 18px}
 .apps-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.site-links{display:flex;gap:24px}
 .family-hero{grid-template-columns:1fr 1fr;gap:56px}.home-contacts{grid-template-columns:repeat(3,minmax(0,1fr))}
 body[data-workspace-view=family] .workspace{grid-template-rows:minmax(0,1fr)}
 body[data-workspace-view=family] .workspace-main{padding:0 var(--gutter) 24px}
 body[data-workspace-view=family] .workspace-top{padding:0;min-height:78px}
 body[data-workspace-view=family] .page-heading{display:flex;margin:24px 0;flex:0 0 auto}
 body[data-workspace-view=family] .page-heading h1{font-size:34px}
 body[data-workspace-view=family] .family-room{border:1px solid var(--line);border-radius:24px;min-height:0;height:auto}
}
@media(min-width:1200px){
 .dashboard-columns{grid-template-columns:minmax(0,1fr) 280px;gap:28px}.support-column{display:flex;flex-direction:column}
 .event{grid-template-columns:55px minmax(0,1fr)}.settings-overview .support-card{padding:28px}
}
@media(max-height:550px){
 body[data-workspace-view=family] .workspace{height:auto;min-height:100dvh;grid-template-rows:auto auto}
 body[data-workspace-view=family] .family-room{min-height:420px}
 body[data-workspace-view=family] .chat-messages{min-height:160px;max-height:55dvh}
 .guest-room{height:auto;min-height:100dvh}.guest-room .chat-messages{min-height:160px;max-height:55dvh}
 .video-tile,.video-tile:only-child{min-height:220px}.call-room{gap:14px}
}
@media print{.workspace{display:block}.workspace-main{padding:0}.dashboard-columns{display:block}.heading-add{display:none}}
