/* Shared responsive layer for the family archive. */
:root{--sans:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;--accent:#855d4d;--muted:#78675c}
html{scroll-padding-top:24px;-webkit-text-size-adjust:100%}
body{line-height:1.5}
button,a{touch-action:manipulation}
input,textarea,select{min-width:0}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #9b7158;outline-offset:3px}
.mobile-dock,.mobile-wordmark{display:none}
.page-head>div,.header-right,.quick-card>div,.lower-grid>section{min-width:0}
.page-head h1,.modal-head h2,.crumb,.note-card h3,.album-card h3{overflow-wrap:anywhere}
.file-info{flex:1}
.file-info strong{max-width:none}
.icon-button.selected svg{fill:#aa795a;stroke:#aa795a}
.section-head .text-link{min-height:44px;flex:none}
.button,.icon-button,.favorite{min-height:44px}
.icon-button,.favorite{min-width:44px}
.favorite{width:44px;height:44px;top:12px;right:12px}
.favorite svg,.icon-button svg{width:20px;height:20px}
.file-row .icon-button{min-width:40px;min-height:44px}
dialog{max-height:calc(100dvh - 32px);overscroll-behavior:contain}
body:has(dialog[open]){overflow:hidden}
.modal-head{position:sticky;top:0;background:var(--paper);z-index:2;padding-bottom:14px}
.modal-head h2{min-width:0}
#sections-menu{width:min(540px,calc(100% - 32px));padding:24px}
#sections-menu .eyebrow{margin-bottom:8px}
.sections-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}
.sections-grid a{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:12px;min-height:104px;padding:18px;background:#f4e9dd;border:1px solid var(--line);border-radius:16px;color:var(--ink);font-size:14px;font-weight:600}
.sections-grid a svg{width:24px;height:24px;color:var(--accent)}
.sections-grid a.active{background:#ead5c2;border-color:#c8a58a}
.login-brand{display:flex}
.login-card input,.login-card .button{min-height:50px;font-size:16px}
.login-card>p:last-child{margin:20px 0 0}
.login-card>p:last-child .button{width:100%}
@media(min-width:1025px){
 .sidebar nav a{min-height:48px}
 .page-actions .button{font-size:13px}
 .file-info strong{font-size:13px;white-space:normal;overflow-wrap:anywhere}
 .file-info small{font-size:11px}
}
@media(max-width:1024px){
 :root{--dock-height:78px}
 .sidebar{display:none}
 .shell{margin-left:0;padding-bottom:calc(var(--dock-height) + env(safe-area-inset-bottom,0px) + 16px)}
 .topbar{height:auto;min-height:120px;padding:14px max(20px,env(safe-area-inset-left)) 16px;display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:12px 16px;background:var(--bg)}
 .address{font-size:22px;color:var(--ink);gap:10px;min-height:44px}
 .address svg{display:block;width:23px;height:23px;color:var(--accent)}
 .desktop-address{display:none}
 .mobile-wordmark{display:block;font-family:var(--serif);letter-spacing:-.5px}
 .header-right{display:contents}
 .avatar{grid-column:2;grid-row:1;width:46px;height:46px;font-size:23px;justify-self:end;box-shadow:0 3px 12px #855d4d10}
 .search{grid-column:1/-1;grid-row:2;gap:10px;min-height:48px;padding:0 15px;border:1px solid #e2d3c4;background:#fffaf3;border-radius:14px;color:#876e5c}
 .search svg{width:20px;height:20px;flex:none}
 .search input{width:100%;min-width:0;min-height:46px;font-size:16px}
 .search kbd{display:none}
 main{max-width:760px;min-height:calc(100dvh - 230px);padding:28px 24px 36px}
 .eyebrow{font-size:10px;letter-spacing:1.7px;margin-bottom:12px;color:#8a604a}
 h1{font-size:36px;line-height:1.16;letter-spacing:-1px;margin-bottom:12px}
 .page-head{display:flex;flex-direction:column;align-items:stretch;gap:20px;margin-bottom:26px}
 .page-head p{font-size:15px;line-height:1.65;color:#78695d;max-width:530px}
 .page-head>.button{align-self:flex-start}
 .button,.page-head .button{font-size:14px;line-height:1.4;min-height:48px;padding:12px 18px;border-radius:13px;white-space:normal;text-align:center;font-weight:600}
 .button svg{width:19px;height:19px;flex:none}
 .page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch;gap:10px;width:100%}
 .page-actions .button:first-child{grid-column:1/-1}
 .page-actions .button:not(:first-child){background:#f4e8da;color:#795c4a;border:1px solid #e2cdbb}
 .hero{height:auto;min-height:265px;padding:28px;border-radius:24px;margin-bottom:22px;align-items:center;background:linear-gradient(125deg,#efdfcb,#e1bfa2)}
 .hero-copy{max-width:77%}
 .hero .eyebrow{font-size:9px;margin-bottom:18px}
 .hero h2{font-size:34px;line-height:1.15;margin-bottom:16px}
 .hero p{font-size:14px;line-height:1.7;max-width:310px;color:#765c49}
 .family-hero-art{width:40%;right:-35px;top:25px;font-size:200px;line-height:260px;opacity:.34}
 .hero-note{display:none}
 .quick-grid{gap:10px;margin-bottom:30px}
 .quick-card{flex-direction:column;align-items:flex-start;padding:17px 14px;gap:14px;border-radius:18px}
 .quick-icon{width:42px;height:42px;border-radius:13px;flex:none}
 .quick-icon svg{width:23px;height:23px}
 .quick-card h3{font-size:14px;font-weight:600;line-height:1.35;margin-bottom:5px}
 .quick-card p{font-size:12px;color:#806e60}
 .quick-card .arrow{display:none}
 .section-head{gap:12px;margin-bottom:14px;flex-wrap:wrap}
 .section-head h2{font-size:27px;letter-spacing:-.5px}
 .text-link{font-size:13px;min-height:44px}
 .album-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 16px;margin-bottom:32px}
 .album-cover{height:auto;aspect-ratio:4/3;border-radius:20px}
 .album-cover .year{font-size:12px;padding:6px 10px;top:14px;left:14px;border-radius:8px}
 .album-card h3{font-size:17px;font-weight:600;line-height:1.45;margin:13px 2px 5px}
 .album-card p{font-size:13px;margin-left:2px;color:#806b5d}
 .lower-grid{grid-template-columns:1fr;gap:28px}
 .file-list{border-radius:18px}
 .file-row{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px 44px;gap:6px;padding:16px}
 .file-open{grid-column:1/-1;min-height:54px;gap:13px;align-items:flex-start;margin-bottom:6px}
 .file-row>.file-info{grid-column:1/-1}
 .file-row>.icon-button:first-of-type{grid-column:2}
 .file-open~.icon-button{background:#f4e9dd;border-radius:11px;color:#856049}
 .file-open~.delete-button{background:#fbece6;color:#a04e43}
 .file-symbol{width:43px;height:49px;border-radius:10px;font-size:11px}
 .file-info strong{font-size:15px;font-weight:600;line-height:1.5;white-space:normal;overflow-wrap:anywhere;max-width:none}
 .file-info small{font-size:12px;line-height:1.5;margin-top:5px;color:#806d5f;overflow-wrap:anywhere}
 .note-card{border-radius:20px;padding:24px}
 .note-card h3{font-size:26px;line-height:1.25;margin-top:16px}
 .note-card p{font-size:15px;line-height:1.75;color:#796451}
 .note-card .text-link{font-size:14px;font-weight:600}
 .notes-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .empty{padding:32px 22px;border-radius:20px}
 .empty h2{font-size:27px;line-height:1.25;margin-top:0}
 .empty p{font-size:15px;line-height:1.75}
 .crumb{font-size:13px;line-height:1.6;gap:9px;flex-wrap:wrap;margin-bottom:20px}
 .crumb a{min-height:44px;display:inline-flex;align-items:center}
 .crumb svg{flex:none}
 .photo-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
 .photo-tile{height:auto;aspect-ratio:1;border-radius:16px}
 .photo-caption{font-size:12px;line-height:1.5;margin:8px 0 0;padding:0}
 .photo-delete{width:40px;height:40px;min-height:40px;min-width:40px;top:8px;right:8px}
 .document-folders{gap:14px!important}
 .document-folder{min-height:190px!important;padding:26px 16px 20px!important;border-radius:20px!important;gap:20px!important}
 .document-folder strong{font-size:14px!important;line-height:1.55!important;overflow-wrap:normal!important}
 .document-folder small{font-size:12px!important;color:#806d60!important}
 .folder-symbol{width:72px!important;height:50px!important}
 .folder-symbol:before{width:34px;height:16px;top:-9px}
 .shelf-title{font-size:25px}
 footer{max-width:760px;padding:22px 24px;font-size:12px;line-height:1.7}
 footer>span:last-child{display:none}
 .mobile-dock{position:fixed;inset:auto 0 0;z-index:30;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;height:calc(var(--dock-height) + env(safe-area-inset-bottom,0px));margin:0;padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left));border-top:1px solid #e2d2c3;background:#fffaf3f5;box-shadow:0 -8px 30px #65402a06;backdrop-filter:blur(18px)}
 .mobile-dock a,.mobile-dock button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;min-width:0;min-height:58px;padding:7px 2px;border-radius:14px;font-size:11px;line-height:1.2;font-weight:500;color:#7e6a5e;background:transparent}
 .mobile-dock span{display:flex}
 .mobile-dock svg{width:23px;height:23px}
 .mobile-dock .active{background:#efdfce;color:#704634;font-weight:700}
 #toast{left:50%;bottom:calc(94px + env(safe-area-inset-bottom,0px));width:max-content;max-width:calc(100vw - 32px);font-size:14px;padding:15px 20px;border-radius:14px;z-index:50}
 dialog{padding:24px;border-radius:24px;width:calc(100% - 28px);max-height:calc(100dvh - 28px)}
 .modal-head{gap:12px;margin-bottom:16px}
 .modal-head h2{font-size:28px;line-height:1.2}
 .modal-head .icon-button{align-self:flex-start;background:#f2e5d7;border-radius:50%}
 #modal-body p,#modal-body ul{font-size:15px;line-height:1.75;color:#786453}
 .field{font-size:14px;line-height:1.5;margin:18px 0;color:#6f5949}
 .field input,.field textarea,.field select{font-size:16px;line-height:1.5;min-height:50px;padding:12px 14px;border-radius:12px}
 .field input[type=file]{max-width:100%;font-size:14px;padding:12px}
 .form-actions{margin-top:22px}
 .form-actions .button{flex:1}
 .form-error{font-size:14px!important;line-height:1.5;min-height:0}
 .profile-actions{display:grid;grid-template-columns:1fr;gap:10px}
 .profile-actions .button{width:100%;justify-content:flex-start;min-height:52px}
 .reading{font-size:16px;line-height:1.8;padding:20px;border-radius:14px}
 .preview-image{max-height:65dvh;border-radius:14px}
 .login-screen{min-height:100dvh;padding:max(24px,env(safe-area-inset-top)) 20px max(24px,env(safe-area-inset-bottom));background:radial-gradient(ellipse at 100% 0,#e7c5a5,transparent 58%),#f8f2e9}
 .login-card{padding:32px 26px;border-radius:26px;border-color:#e6d5c4;box-shadow:0 16px 55px #6f472010}
 .login-brand{display:flex!important;font-size:24px;gap:14px;margin-bottom:36px}
 .login-brand>span:last-child{display:block}
 .login-brand small{font-size:9px;letter-spacing:1.8px}
 .login-brand .brand-mark{width:47px;height:51px;line-height:47px;font-size:40px}
 .login-card h1{font-size:38px;line-height:1.15;margin-bottom:18px}
 .login-card>p:not(.eyebrow){font-size:15px;line-height:1.7}
 .storage-pending{white-space:normal;font-size:14px;border-radius:12px;padding:14px}
 /* A semantic table on desktop, complete cards on a phone. */
 .birthday-add{grid-template-columns:1fr;padding:66px 22px 22px;gap:18px;border-radius:20px;box-shadow:none}
 .birthday-add::before{left:22px;font-size:25px}
 .birthday-add label{font-size:12px;line-height:1.5;letter-spacing:.04em}
 .birthday-add input,.birthday-table input{font-family:var(--sans);font-size:16px;min-height:50px;height:50px;border-radius:12px;padding:10px 12px;max-width:100%;min-width:0}
 .birthday-add .button{width:100%;height:auto;min-height:50px;border-radius:12px}
 .birthday-table-wrap{overflow:visible;background:transparent;border:0;box-shadow:none}
 .birthday-table{display:block;min-width:0;width:100%;border:0}
 .birthday-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .birthday-table tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .birthday-table tr{display:grid;grid-template-columns:minmax(0,1fr) 86px;gap:18px 12px;min-width:0;padding:22px;background:var(--paper);border:1px solid var(--line);border-radius:20px}
 .birthday-table td,.birthday-table th:first-child,.birthday-table td:first-child{display:block;width:auto;padding:0;background:transparent!important;border:0;min-width:0;overflow-wrap:anywhere}
 .birthday-table td::before{content:attr(data-label);display:block;font:12px/1.4 var(--sans);color:#806d5f;margin-bottom:8px}
 .birthday-table td:first-child{grid-column:1/-1;font-size:17px;font-weight:600;line-height:1.6}
 .birthday-table td:nth-child(2){font-size:15px}
 .birthday-table .birthday-age{font:30px/1.2 var(--serif);color:#855d4d}
 .birthday-table .birthday-actions{grid-column:1/-1;display:flex;gap:10px;padding-top:16px;border-top:1px solid var(--line)}
 .birthday-actions::before{display:none!important}
 .birthday-actions .button{flex:1;height:48px;min-width:0;border-radius:12px}
 .birthday-actions .icon-button{width:48px;height:48px;border-radius:12px}
}
@media(max-width:600px){
 main{padding:26px 18px 30px}
 .topbar{padding-left:18px;padding-right:18px}
 h1{font-size:34px}
 .album-grid{grid-template-columns:1fr;gap:26px}
 .album-cover{aspect-ratio:1.5}
 .notes-grid,.birthday-table tbody{grid-template-columns:1fr}
 .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .document-folders{grid-template-columns:1fr!important;gap:12px!important}
 .document-folder{min-height:102px!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;text-align:left!important;gap:20px!important;padding:22px!important;border-radius:18px!important}
 .document-folder>span:nth-child(2){flex:1!important;width:auto!important}
 .document-folder strong{font-size:15px!important}
 .document-folder small{margin-top:5px!important;font-size:13px!important}
 .folder-symbol{width:52px!important;height:39px!important;margin-top:7px!important}
 .folder-symbol:before{width:26px;height:13px;top:-7px}
 .hero{min-height:282px;padding:26px}
 .hero-copy{max-width:88%}
 .hero h2{font-size:34px}
 .family-hero-art{right:-55px;top:62px;width:50%;opacity:.24;font-size:185px}
 .quick-card{padding:16px 11px}
 .quick-card h3{font-size:13px}
 .quick-card p{font-size:11px}
 .quick-icon{width:38px;height:38px;border-radius:12px}
 .section-head h2{font-size:26px}
 #sections-menu{padding:24px 20px}
 .birthday-table tr{padding:20px;grid-template-columns:minmax(0,1fr) 86px}
}
@media(max-width:359px){
 main{padding-left:14px;padding-right:14px}
 .topbar{padding-left:14px;padding-right:14px}
 .quick-grid{grid-template-columns:1fr}
 .quick-card{flex-direction:row;align-items:center;padding:16px;gap:14px}
 .quick-card h3{font-size:15px}
 .quick-card p{font-size:12px}
 .hero{padding:24px}.hero h2{font-size:31px}
 .mobile-dock a,.mobile-dock button{font-size:10px}
}
@media(prefers-reduced-motion:no-preference){.sections-grid a,.mobile-dock a,.mobile-dock button{transition:background .15s,color .15s}.album-card>a:hover .album-cover img{transform:scale(1.025);transition:transform .3s}}
@media print{.mobile-dock,#sections-menu{display:none!important}.shell{padding-bottom:0}}
body.nutrition-dialog-open{overflow:hidden}
.birthday-table textarea{display:block;width:100%;min-height:76px;resize:vertical;padding:12px;border:1px solid #dfcdbb;border-radius:12px;background:white;color:var(--ink);font:16px/1.5 var(--sans)}
@media(max-width:1024px){
 .file-open+.icon-button{grid-column:2}
 .file-row>.button{grid-column:1/-1;justify-self:stretch}
 .birthday-add .form-error:empty{display:none}
 .note-card p,.file-info small,.empty p{overflow-wrap:anywhere}
}
@media(max-width:1024px){
 .quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .quick-card{min-width:0}
 .quick-card h3{overflow-wrap:anywhere}
}
@media(min-width:360px) and (max-width:600px){
 .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .quick-card:last-child{grid-column:1/-1;flex-direction:row;align-items:center}
}
@media(max-width:359px){.quick-grid{grid-template-columns:1fr}}
