/* Shared touch, tablet, split-screen and installed-app layout. */
@media screen {
 body{font-size:16px;min-width:0}
 aside{overflow-y:auto;padding-bottom:max(24px,env(safe-area-inset-bottom))}
 nav a{font-size:14px;min-height:44px}
 header{padding-top:max(14px,env(safe-area-inset-top));height:auto}
 .shell,main,.actions,.hero-copy{min-width:0}
 .actions{flex-wrap:wrap}
 button,select{min-height:44px}
 input:not([type=checkbox]),textarea,select,.actions select{font-size:16px}
 .actions button{font-size:14px}
 .actions>span{font-size:12px}
 .section-tabs button{min-height:44px;font-size:14px}
 dialog{max-height:calc(100dvh - 32px);overflow:auto}
 .calendar-scroll{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .calendar,.weekdays{min-width:630px}
 .day textarea{font-size:16px;min-height:88px;height:88px;line-height:1.5}
 .day-num,.weekdays span{font-size:14px}
 .tracker-wrap{overscroll-behavior-x:contain}
 .tracker th,.tracker td{padding:4px}
 .track-dot{min-width:44px;min-height:44px;width:44px;height:44px;font-size:16px}
 .tracker th:first-child,.tracker td:first-child{min-width:180px}
 .mood-day select{min-height:44px}
 .store-nav,.store-nav>div,.simple-store-nav,.store-footer{flex-wrap:wrap;gap:16px}
 .store-wordmark small{letter-spacing:1px}
 .finance-row,.income-row{min-width:0}
 .finance-row input[type=checkbox]{width:28px;height:28px;margin:8px}
 footer{padding-bottom:env(safe-area-inset-bottom)}
}
@media screen and (max-width:1000px){
 aside{position:static;width:auto;padding:16px;border-right:0}
 .brand{flex-direction:row;justify-content:center;gap:18px}
 .brand span{font-size:42px}.side-title,.side-bottom{display:none}
 .workspace-links{display:flex;justify-content:center;flex-wrap:wrap;margin:12px 0}
 nav{display:flex;overflow-x:auto;gap:6px}nav a{white-space:nowrap;flex-shrink:0}
 nav a:first-child{margin:0;border:0}nav a.active:after{display:none}
 .shell{margin-left:0}header{padding-left:16px;padding-right:16px}
 .actions{justify-content:flex-start;width:100%;gap:8px}
 .actions>span{flex-basis:100%;order:2}
 .grid,.two-col{grid-template-columns:minmax(0,1fr)}
 .hero{gap:14px}.hero-copy h1{overflow-wrap:anywhere}
}
@media screen and (max-width:600px){
 main{padding:12px}.card{padding:14px}
 #store-root{padding:0 16px}.sales-cta,.preview-banner{flex-wrap:wrap}
 .sales-hero h1{font-size:36px}.sales-hero h1 em{font-size:44px}
 .cover{max-width:85vw}
 .finance-row{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) 44px;gap:4px}
 .year-grid{grid-template-columns:minmax(0,1fr)}
 html[data-theme="crowned"] .hero-copy{max-width:100%;padding-bottom:160px}
 html[data-theme="crowned"] .hero-art{top:auto;bottom:0;width:100%;height:170px;mask-image:linear-gradient(transparent,#000 20%)}
 .calendar-note{flex-wrap:wrap;gap:8px}
}

.brand span,.store-wordmark{letter-spacing:0;font-style:italic}.brand{letter-spacing:1px;text-align:center}.store-wordmark small{max-width:180px;line-height:1.6}.cover h2{font-size:32px}.cover h2 em{font-size:40px}

.health-log{width:100%;min-width:700px;border-collapse:collapse;text-align:left}.health-log th,.health-log td{padding:10px 8px;border-bottom:1px solid #e4dad2}.health-log th:first-child{width:80px}.health-log td:nth-child(2){width:120px}.health-log td:nth-child(4),.health-log td:nth-child(5){width:120px}.health-log input{min-height:44px}.health-log caption,.tracker caption{text-align:left;padding:12px 0;font-weight:600}.weight-unit{display:flex;align-items:center;gap:14px}.weight-unit select{padding:10px;border:1px solid #b88b9b;background:var(--paper);color:var(--ink)}.medication-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.medication-list fieldset{min-width:0;border:1px solid #e4dad2;border-radius:8px;padding:16px}.medication-list label{display:block;margin-top:12px}.medication-list legend{font-weight:600}@media(max-width:700px){.medication-list{grid-template-columns:minmax(0,1fr)}}@media print{.health-log{min-width:0;table-layout:fixed;font-size:10px}.health-log input{font-size:10px;min-height:24px}.health-log th,.health-log td{padding:4px}.medication-list{grid-template-columns:1fr 1fr}.medication-list fieldset{break-inside:avoid}}

.debt-account{padding:18px 0;margin-bottom:20px;border-bottom:1px solid #e4dad2}.debt-account label{display:block;margin:12px 0}.debt-payment-row,.debt-payment-labels{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1.4fr);gap:10px;align-items:center;margin:8px 0}.debt-payment-labels{font-size:14px;font-weight:600}.debt-payment-row input{min-width:0}[data-money-add]{margin-top:16px}.finance-row input,.income-row input{min-width:0}@media(max-width:600px){.debt-payment-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding-bottom:12px;border-bottom:1px solid #e4dad2}.debt-payment-row input:last-child{grid-column:1/-1}.debt-payment-labels{display:none}}@media print{[data-money-add]{display:none}.debt-account{break-inside:avoid}}
