/* Mobile QA: preserve the visual system while keeping controls reachable. */
/* Shared form rhythm: labels and focus rings must not collide. */
label[for]{display:block;line-height:1.4}
label[for]+input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
label[for]+textarea,label[for]+select{display:block;margin-top:10px}
label:has(>input:not([type=checkbox]):not([type=radio]):not([type=hidden])),
label:has(>textarea),label:has(>select){display:grid;gap:10px;line-height:1.4}
body input:not([type=checkbox]):not([type=radio]):focus-visible,
body textarea:focus-visible,body select:focus-visible{outline:2px solid var(--theme-bright,#925cff);outline-offset:2px}
.experience-wizard #setupBody{display:flex;flex-direction:column;gap:0;min-width:0}
.experience-wizard #setupBody h2{margin:0 0 14px;line-height:1.15;overflow-wrap:anywhere}
.experience-wizard #setupBody p{margin:0 0 20px}
.experience-wizard #setupBody label{margin:4px 0 10px;font-size:14px;font-weight:600;color:#62566f}
.experience-wizard #setupBody input{display:block;min-height:54px;margin:0;padding:14px 16px;line-height:1.4}
.experience-wizard #setupBody .touch-options{margin:0 0 20px;gap:8px}
.experience-wizard #setupBody .touch-options button{min-height:48px;line-height:1.35;white-space:normal}
.experience-wizard #setupError:empty{display:none}
.experience-wizard #setupError:not(:empty){margin:16px 0 0;line-height:1.5}
.experience-wizard .experience-actions{margin-top:24px;gap:12px;align-items:center}
.experience-wizard #setupNext{margin-left:auto;min-width:128px;min-height:52px}
.experience-wizard .experience-top .mognu-wordmark{font-size:28px;color:#1d1d20;letter-spacing:-.085em;font-weight:800}
.experience-wizard .setup-portrait{flex-shrink:0;margin:0 auto 20px}
.experience-check{line-height:1.5;align-items:flex-start}.experience-check input{margin:2px 0 0}
.experience-offer h3{padding-right:48px;overflow-wrap:anywhere}.experience-offer>button{float:none;position:absolute;right:16px;top:16px}
html:has(dialog[open]),body:has(dialog[open]){overflow:hidden;overscroll-behavior:none}
dialog{overscroll-behavior:contain;scroll-padding-block:64px 24px}
.compact-header .mognu-wordmark{min-height:44px;display:inline-flex;align-items:center}
.welcome-top{min-width:0}.welcome-top #choosePartner{min-width:0;max-width:62%;overflow-wrap:anywhere;white-space:normal}
@media(max-width:760px){
 body .app main{padding-bottom:max(20px,env(safe-area-inset-bottom))!important}
 body .simple-home{padding-top:0;min-height:calc(100svh - 40px)}
 .welcome-top{margin-bottom:20px;min-height:44px}
 .welcome-art{flex:0 1 auto;min-height:80px;height:clamp(80px,19svh,180px);max-height:180px;margin:8px auto}
 .simple-home .home-actions{margin-top:8px}
 .home-actions .primary,body[data-mode] #homeCycle{min-height:52px;padding:12px 18px;font-size:16px}
 .home-note{margin-top:8px;padding-top:8px;font-size:12px}
 .compact-sheet{width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:16px}
 .sheet-header{top:-16px;padding:8px 0 12px}.sheet-header h2{overflow-wrap:anywhere}
 #dateDialog{width:100%;max-width:100%;max-height:calc(100dvh - env(safe-area-inset-top));padding:16px 8px max(12px,env(safe-area-inset-bottom));border-radius:24px 24px 0 0}
 #dateDialog .dialog-top{margin-bottom:8px}#dateDialog h2{font-size:23px;margin:10px 0}
 #dateDialog .touch-calendar{gap:0}#dateDialog .touch-calendar button{min-height:44px}
 #saveDateButton{position:static;box-shadow:none;margin-top:12px}
 .experience-wizard{max-height:calc(100dvh - 16px);scroll-padding-bottom:20px}
 #care #deckCard{min-height:0;padding:156px 20px 20px;margin-bottom:14px}
 body[data-mode] #care #deckCard::before{width:150px;height:150px;right:calc(50% - 75px);top:0}
 #deckMeta{margin-top:0}#deckCard h3{font-size:30px;margin:10px 0}#deckDescription{font-size:16px;line-height:1.45}
 .deck-actions{gap:8px}.deck-actions button{min-width:0;min-height:52px;padding:10px 6px;font-size:14px}
 #toast{pointer-events:none;bottom:max(12px,env(safe-area-inset-bottom));max-width:calc(100vw - 24px)}
}
@media(max-width:760px) and (max-height:700px){
 .simple-home #homeTitle{font-size:34px;line-height:1.05}
 .welcome-top{margin-bottom:12px}
 #homeCopy{font-size:14px;line-height:1.45;margin:12px 0 0}
 .welcome-art{height:70px;min-height:70px;max-height:70px;margin:4px auto}
 .simple-home .home-actions{gap:8px;margin-top:4px}
 .compact-header{margin-bottom:8px}.compact-active-profile{margin-bottom:8px}.care-toolbar{margin-bottom:10px}
 #care #deckCard{padding-top:110px}body[data-mode] #care #deckCard::before{width:108px;height:108px;right:calc(50% - 54px)}
 #deckCard h3{font-size:26px}
}

@media(max-width:360px){#dateDialog{padding-inline:4px}#calendar .calendar-card{margin-inline:-16px;padding-inline:4px}#calendar .calendar-grid{gap:0}#calendar .calendar-grid button{min-height:44px}}
