#home-nav{display:flex;gap:8px;margin:16px 0}#home-nav[hidden],#home-view[hidden]{display:none}.home-heading h1{font-size:clamp(25px,6vw,36px);line-height:1.15}.home-heading p{color:#667366}.home-controls{display:flex;gap:8px;margin:20px 0}.home-controls select{min-width:0;flex:1}.home-messages{display:flex;flex-direction:column;gap:12px;max-height:60vh;overflow:auto;overscroll-behavior:contain;padding:4px}.home-message{white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;border:1px solid #dce4da;border-radius:18px;padding:16px;margin:0;font-size:16px;line-height:1.6}.home-message.user{background:#e8eee5;margin-left:24px}.home-message.assistant{margin-right:12px}.home-status{display:block;color:#637565;font-size:12px;margin-top:10px}.home-composer{display:grid;gap:10px;margin:16px 0 28px}.home-composer textarea,#home-policy{width:100%;box-sizing:border-box}.home-message pre{white-space:pre-wrap;font-size:12px;max-height:240px;overflow:auto}#home-artifacts small{display:block}#home-policy-versions{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
#home-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;position:sticky;top:0;z-index:2;background:#f6f5ef;padding:8px 0}#home-nav button{min-height:48px;padding:8px;font-size:14px;overflow-wrap:anywhere}.view-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.view-heading h1{font-size:28px}.view-controls{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.view-controls input{min-width:0;flex:1 1 140px}.view-records{display:grid;gap:12px}.view-record{border:1px solid #dce4da;border-radius:16px;background:white;padding:16px;overflow-wrap:anywhere}.view-record h2{font-size:20px;margin:0 0 10px}.view-record p{margin:5px 0}.view-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.view-actions button,.view-controls button{min-height:44px}.view-form{display:grid;gap:14px}.view-form label{display:grid;gap:6px}.view-form input,.view-form select,.view-form textarea{width:100%;min-width:0;box-sizing:border-box;font-size:16px;min-height:48px}.view-dialog{max-width:500px;width:calc(100% - 28px);max-height:85dvh;overflow:auto;box-sizing:border-box;padding:20px}.view-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere}.view-help{font-size:14px;line-height:1.5;color:#526958}#household-views[hidden]{display:none}@media(max-width:360px){.home-controls{flex-wrap:wrap}#home-nav button{font-size:12px}.view-dialog{padding:14px}}main{padding-bottom:max(24px,env(safe-area-inset-bottom))}
.private-photos{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.private-photos>div{max-width:140px}.private-photos img,.chat-photo{display:block;max-width:100%;width:140px;height:140px;object-fit:contain;border:1px solid #dce4da;border-radius:12px;background:white}.chat-photo{margin-top:12px;width:180px;height:180px}#home-photo-input{width:100%;min-width:0;font-size:14px;min-height:44px}#household-views input[type=date],#household-views input[type=month]{max-width:100%}.home-composer{padding-bottom:env(safe-area-inset-bottom)}.view-form select[multiple]{min-height:140px}

/* Mobile conversation shell: navigation and management live in the drawer. */
:root{background:#fff;color:#24372f}main{max-width:760px;padding:16px 20px}.brand{margin:0 0 24px;min-height:48px}.brand-name{font-family:Georgia,serif;font-size:29px;font-weight:600;letter-spacing:-1px}.brand-caption,.brand-mark{display:none}.brand .menu-toggle{margin:0 8px 0 0;font-size:23px;border:0;padding:4px 10px}.home-active .brand #logout{display:none}.home-active main{height:var(--app-height,100dvh);display:flex;flex-direction:column;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:0}.home-active .brand{flex-shrink:0;margin-bottom:8px}.home-active #notice:empty{display:none}.home-active #notice:not(:empty){flex-shrink:0;margin-bottom:8px;padding:10px}.home-active #home-view{min-height:0;flex:1;display:flex;flex-direction:column}.home-heading{text-align:center;margin:auto 0;padding:24px 8px}.home-heading h1{font-family:inherit;font-size:27px;font-weight:600;letter-spacing:-.8px;margin:16px 0 8px}.home-heading p{font-size:15px;max-width:300px;margin:auto;color:#7b857e}.welcome-icon{width:92px;height:92px}.home-messages{flex:1;min-height:0;max-height:none;gap:22px;padding:16px 0;overflow-y:auto;scroll-behavior:smooth}.home-messages:empty{flex:0}.home-message{font-size:16px;line-height:1.65;border:0;border-radius:20px;padding:12px 16px;background:transparent}.home-message.user{background:#f0f3ee;align-self:flex-end;max-width:90%;margin-left:24px;white-space:pre-wrap}.home-message.assistant{padding:0 4px;margin:0;max-width:100%}.home-status{font-size:11px;color:#839087}.home-composer{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:end;gap:5px;flex-shrink:0;border:1px solid #dfe5de;background:#f8faf7;border-radius:26px;padding:6px;margin:12px 0 max(12px,env(safe-area-inset-bottom));box-shadow:0 4px 18px #254c3c08}.home-composer textarea{background:transparent;border:0;padding:12px 4px;min-height:44px;max-height:160px;resize:none;border-radius:12px;line-height:1.4}.home-composer .primary{border-radius:50%;width:42px;height:42px;min-height:42px;padding:0;display:grid;place-items:center;font-size:25px;align-self:end}.attach-button{border:0;font-size:26px;padding:0;width:44px;height:44px;align-self:end}.home-composer .private-photos{grid-column:1/-1;margin:0 8px}.home-composer .private-photos:empty{display:none}.home-composer .private-photos img{width:72px;height:72px}.home-composer .private-photos button{font-size:11px;padding:4px}#home-nav{display:flex;flex-direction:column;position:static;background:none;margin:12px 0;padding:0;gap:3px}#home-nav button{text-align:left;border:0;min-height:48px;padding:12px 16px;font-size:16px;border-radius:12px}#home-nav button:hover{background:#edf2ea}.home-drawer{margin:0;height:100dvh;max-height:100dvh;width:min(340px,88vw);max-width:88vw;border:0;border-radius:0 20px 20px 0;padding:max(16px,env(safe-area-inset-top)) 16px max(20px,env(safe-area-inset-bottom));background:#fafbf8;overflow:auto}.home-drawer::backdrop{background:#10251b66;backdrop-filter:blur(2px)}.drawer-heading{display:flex;align-items:center;justify-content:space-between}.drawer-heading strong{font:30px Georgia,serif}.drawer-heading button{border:0}.drawer-panel .home-controls{flex-direction:column;gap:8px}.drawer-panel .summary{margin-top:12px;padding:12px 0;font-size:14px}.drawer-panel .quiet{font-size:14px}.profile-caption{display:block;color:#718173;margin:12px 0}.home-active #household-views,.home-active #ledger-view{overflow-y:auto;flex:1;min-height:0;padding:8px 0 24px}.view-record{box-shadow:0 3px 12px #254c3c04;border-color:#e4e9e1}.view-heading h1{font-family:inherit;font-weight:600;letter-spacing:-.6px}.view-dialog{border-radius:20px}.view-form label{font-size:14px}.view-form .primary{margin:6px 0}.view-help{font-size:13px}#inventory-proposals:not(:empty),#home-proposals:not(:empty),#home-approvals:not(:empty){max-height:35vh;overflow:auto;flex-shrink:0;border-top:1px solid #dfe5de;padding-top:10px}.login-card{margin-top:32px;border:0;padding:24px 8px}.login-card h1{font-size:40px}.login-card input{background:#fafbf8}.login-card .eyebrow{font-size:11px}.login-card small{font-size:12px}@media(max-width:360px){main{padding:12px 14px}.home-heading h1{font-size:24px}.home-message{font-size:15px}.view-dialog{padding:16px}}@media(prefers-reduced-motion:reduce){.home-messages{scroll-behavior:auto}}

.home-message.assistant{white-space:normal}.home-message.assistant p{margin:0 0 12px}.home-message.assistant p:last-of-type{margin-bottom:0}.home-message.assistant h3{font-size:17px;margin:16px 0 8px}.home-message.assistant ul{padding-left:22px;margin:8px 0 14px}.home-message.assistant li{margin:6px 0}.home-message.assistant code{background:#eef2eb;border-radius:4px;padding:1px 4px;font-size:.88em}.home-message.assistant .chat-code{padding:14px;border-radius:12px;background:#eef2eb;white-space:pre;overflow:auto;max-height:340px}.home-message.assistant .chat-code code{padding:0}

.inventory-details{margin:14px 0;display:grid;gap:4px}.inventory-details dt{font-size:12px;color:#65776b;font-weight:600}.inventory-details dd{margin:0 0 8px;font-size:15px;white-space:pre-wrap}

body.home-active{height:var(--app-height,100dvh);overflow:hidden}.home-active main{overflow:hidden}.home-active .brand{position:relative;z-index:2;background:#fff}.menu-lines{display:block;width:18px;height:14px;background:repeating-linear-gradient(to bottom,currentColor 0,currentColor 2px,transparent 2px,transparent 6px)}.menu-toggle{display:grid;place-items:center;min-width:44px}

/* Keep long forms and private image details usable on small phones. */
.form-actions{position:sticky;bottom:-20px;display:flex;gap:8px;background:#fff;padding:12px 0 4px;border-top:1px solid #e4e9e1;z-index:1}.form-actions button{flex:1;min-height:48px;margin:0!important}.view-form{padding-bottom:4px}.view-dialog h2{font-size:23px;line-height:1.25;margin:4px 0 20px}.photo-dialog{width:min(680px,calc(100vw - 24px));max-height:90dvh;padding:12px;border:0;border-radius:18px;box-sizing:border-box}.photo-dialog img{display:block;width:100%;max-height:72dvh;object-fit:contain;margin-top:8px}.photo-dialog button{min-width:80px;min-height:44px}.photo-dialog::backdrop{background:#10251bcc}img[role=button]{cursor:zoom-in}img[role=button]:focus-visible{outline:3px solid #457763;outline-offset:3px}#home-artifacts{overflow-wrap:anywhere}#home-notices{max-height:38dvh;overflow-y:auto;overscroll-behavior:contain;border-block:1px solid #e4e9e1;margin:12px 0}#home-notices .home-message{font-size:14px;padding:12px 4px;border-bottom:1px solid #e4e9e1;border-radius:0}#drawer-inbox>button{display:block;width:100%;margin:8px 0}#home-reminders h3{font-size:15px}.reminder-card{padding:8px 0;border-bottom:1px solid #e4e9e1}.reminder-card p{margin:4px 0}.reminder-card small{color:#637565}.view-heading h1{font-size:clamp(23px,6.5vw,28px)}.view-heading button{flex-shrink:0;min-width:48px}.home-composer .primary{min-width:44px;min-height:44px;width:44px;height:44px}.home-composer .private-photos button{min-height:44px;font-size:12px}.home-controls button{min-height:48px}@media(max-width:360px){.form-actions{bottom:-16px}.home-composer textarea{font-size:16px}}

.view-form label{margin:0}.view-form textarea{min-height:90px}.view-form{gap:18px}.view-form input[type=file]{font-size:13px;padding:10px 6px}.view-form .error:empty{display:none}.view-form .error{margin:0}

.form-actions button{font-size:14px;padding:12px 10px}.view-form .error{font-size:14px;line-height:1.5}
.drawer-heading{position:sticky;top:-16px;z-index:4;background:#fafbf8;padding:8px 0;box-shadow:0 4px 8px #fafbf8}#home-policy{min-height:200px;max-height:42dvh;resize:vertical;font-size:14px;line-height:1.5}#home-policy-versions button{max-width:100%;overflow-wrap:anywhere}

.home-heading{min-height:0;overflow-y:auto}.compact-viewport .welcome-icon,.compact-viewport .home-heading p{display:none}.compact-viewport .home-heading{padding:8px}.compact-viewport .home-heading h1{font-size:22px;margin:8px 0}.compact-viewport .home-composer{margin-top:6px}#inventory-proposals:not(:empty),#home-proposals:not(:empty),#home-approvals:not(:empty){max-height:calc(var(--app-height,100dvh) * .3)}

.record-long-text{margin:8px 0}.record-long-text summary{cursor:pointer;line-height:1.55;min-height:44px}.long-label{font-size:13px;font-weight:600}.long-preview{display:block;color:#526958;font-size:14px}.long-more{display:block;color:#254c3c;text-decoration:underline;font-size:13px;padding:6px 0}.record-long-text[open] .long-preview,.record-long-text[open] .long-more{display:none}.record-long-text p{white-space:pre-wrap}#drawer-close{min-width:44px;min-height:44px;display:grid;place-items:center}.close-lines{position:relative;display:block;width:18px;height:18px}.close-lines::before,.close-lines::after{content:"";position:absolute;left:0;top:8px;width:18px;height:2px;background:currentColor;transform:rotate(45deg)}.close-lines::after{transform:rotate(-45deg)}

#close-dialog{min-width:44px;min-height:44px;display:grid;place-items:center}#expense-dialog .field-pair{display:grid;grid-template-columns:1fr}#expense-dialog input[type=date],#expense-dialog select{width:100%;min-width:0}.home-active .greeting h1{font-family:inherit;font-size:26px;font-weight:600}.home-active .composer p{font-family:inherit;font-size:18px}
