/* Natural page flow. Insets reserve room for system bars and app navigation. */
:root{--system-top:env(safe-area-inset-top,0px);--system-bottom:env(safe-area-inset-bottom,0px);--visible-height:100svh}
:root.android-app{--system-top:max(env(safe-area-inset-top,0px),28px);--system-bottom:max(env(safe-area-inset-bottom,0px),48px)}
html{height:auto;min-height:100%;overflow-x:clip;overflow-y:auto;scroll-padding-top:calc(var(--system-top) + 90px);scroll-padding-bottom:calc(var(--system-bottom) + 110px);scroll-behavior:smooth}
body{height:auto;min-height:100svh;overflow:visible;overscroll-behavior-y:auto;padding:var(--system-top) env(safe-area-inset-right,0px) 0 env(safe-area-inset-left,0px)}
#app,.shell{height:auto;min-height:100svh}.main{height:auto;min-height:100svh;overflow:visible;display:block;padding:24px 30px 40px}.sidebar{top:var(--system-top);height:calc(100svh - var(--system-top));overflow-y:auto}.topbar{position:sticky;top:calc(var(--system-top) + 8px);z-index:30;margin-bottom:24px}.page-heading{margin-bottom:22px}.card{overflow:visible}.data-table-wrap{overflow-x:auto}.data-table{min-width:0!important;width:100%}.data-table td,.data-table th{overflow-wrap:anywhere}
.auth-layout{height:auto;min-height:calc(100svh - var(--system-top));grid-template-columns:1fr 1fr}.auth-story{padding:40px}.auth-form-side{height:auto;min-height:calc(100svh - var(--system-top));display:flex;justify-content:center;align-items:center;padding:76px 24px 36px;position:relative}.auth-form-side>div:not(.auth-preferences){width:100%;max-width:510px}.auth-card{width:100%;max-width:none;margin:0;border-radius:30px;padding:30px}.auth-preferences{top:20px;right:24px}.auth-card .spaced{margin-top:18px}.auth-card .field{margin-bottom:16px}.auth-card h2{margin-bottom:10px}.auth-description{margin-bottom:18px}.auth-switch{margin-top:18px}.demo-area{margin-top:22px;padding-top:18px}.auth-layout.registering .auth-form-side{align-items:flex-start}.auth-layout .form-grid{gap:16px}.brand-home{flex:none}.dob-selects{grid-template-columns:1.3fr 1fr 1fr}
dialog[open]{display:flex;flex-direction:column;position:fixed;inset:calc(var(--system-top) + 12px) 12px calc(var(--system-bottom) + 12px);margin:auto;height:fit-content;max-height:calc(var(--visible-height) - var(--system-top) - var(--system-bottom) - 24px);max-width:900px;width:calc(100% - 24px);overflow:hidden;padding:0;transform:none}.modal-head,.modal-footer{flex:0 0 auto;padding:18px}.modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:20px}.modal-footer{display:flex;flex-wrap:wrap;gap:8px}.modal-head h2{font-size:1.15rem}.modal-body .more-grid{gap:8px}.modal-body .more-grid button{min-height:52px}.modal-body .print-report{min-width:0}.modal-body table{table-layout:fixed;min-width:0}.modal-body td,.modal-body th{white-space:normal;overflow-wrap:anywhere}.modal-body .data-table-wrap{overflow:visible}.single-page-dialog[open]{top:calc(var(--system-top) + 12px)!important;bottom:calc(var(--system-bottom) + 12px)!important;transform:none!important}
.health-hero{border-radius:32px}.health-hero h2{margin:18px 0}.health-hero p{line-height:1.7}.single-question{animation:none}.question-mode .main{padding-bottom:calc(var(--system-bottom) + 32px)!important}input,textarea,select{scroll-margin:110px 0}.mobile-nav button{min-width:0}.keyboard-open .mobile-nav{display:none!important}#toast{bottom:calc(var(--system-bottom) + 100px);z-index:100}
@media(max-width:900px){.main{padding:12px 12px calc(var(--system-bottom) + 116px)!important}.question-mode .main{padding:12px 12px calc(var(--system-bottom) + 30px)!important}.topbar{padding:8px 10px;top:calc(var(--system-top) + 8px);margin-bottom:22px}.mobile-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;left:max(10px,env(safe-area-inset-left,0px));right:max(10px,env(safe-area-inset-right,0px));bottom:calc(var(--system-bottom) + 10px);width:auto;padding:7px 4px;z-index:50;min-height:72px}.mobile-nav button{min-height:58px;font-size:.83rem;padding:5px 1px;gap:4px}.mobile-nav svg{width:22px;height:22px}.auth-layout{display:block}.auth-story{display:none}.auth-form-side{padding:72px 10px calc(var(--system-bottom) + 28px);align-items:center;min-height:calc(100svh - var(--system-top))}.auth-layout.registering .auth-form-side{align-items:flex-start}.auth-form-side>div:not(.auth-preferences){max-width:510px}.auth-card{padding:24px 16px!important}.auth-preferences{top:14px;right:12px}.auth-card .form-grid{grid-template-columns:1fr}.auth-card .full{grid-column:1}.health-hero{padding:28px 22px}.stats{margin-top:20px}.page-heading h1{font-size:27px}.page-heading p{line-height:1.65}.single-question{padding:20px 14px}.single-question .question-text{font-size:21px;line-height:1.65}.question-footer{margin-top:22px;gap:14px}.question-top{margin-bottom:18px}.card{scroll-margin-top:110px}.top-actions{flex-wrap:nowrap}.top-actions .language-toggle{font-size:.85rem!important;padding:7px}.brand-name{font-size:21px}.sidebar{display:none}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@media print{html,body,.main{height:auto!important;overflow:visible!important;padding:0!important}.modal-body{overflow:visible}.mobile-nav{display:none!important}}
@media(pointer:coarse){.card,.auth-card{backdrop-filter:none;-webkit-backdrop-filter:none}}
.checkin-entry{display:flex;align-items:center;gap:20px;width:100%;padding:25px 28px;background:linear-gradient(115deg,#e9d9f8,#f6ebfb 70%,#fff4ee);color:#55346e;border:1px solid #dfc8ed;border-radius:28px;text-align:start;min-height:112px;box-shadow:0 8px 35px #a677bf0b}.checkin-entry>span:nth-child(2){flex:1}.checkin-entry strong{display:block;font-size:clamp(23px,3vw,32px);font-weight:650;line-height:1.3}.checkin-entry small{display:block;font-size:.95rem;margin-top:7px;color:#796184}.checkin-entry-icon{display:grid;place-items:center;width:54px;height:54px;flex:none;background:#fdf8ff99;border-radius:50%}.checkin-entry-icon svg{width:29px;height:29px}.checkin-entry>svg{width:25px;height:25px}.home-jumps{position:sticky;top:calc(var(--system-top) + var(--header-height,72px) + 20px);z-index:20;display:flex;gap:6px;margin:16px 0 20px;padding:7px;background:#fffaf6ed;backdrop-filter:blur(18px);border:1px solid #eadcf1;border-radius:20px;box-shadow:0 5px 20px #9f7ab00a}.home-jumps button{flex:1;min-width:0;min-height:44px;padding:8px 10px;border:0;background:transparent;color:#735186;border-radius:14px;font-size:.94rem}.home-jumps button:hover,.home-jumps button:focus-visible{background:#eee0f8}.home-section{margin-bottom:20px;scroll-margin-top:180px}.home-record-grid{gap:20px}.next-inline{margin:14px 0 6px;font-size:.95rem;color:#796382}.home-links{display:flex;flex-wrap:wrap;gap:18px;border-top:1px solid #e7d9ee;margin-top:18px;padding-top:16px}.home-section .calendar-day{min-height:43px}[data-theme=dark] .checkin-entry{background:linear-gradient(115deg,#493057,#35223e);color:#f4e6ff;border-color:#755283}[data-theme=dark] .checkin-entry small{color:#d2b9df}[data-theme=dark] .checkin-entry-icon{background:#6b4c783f}[data-theme=dark] .home-jumps{background:#281e32ed;border-color:#60456d}[data-theme=dark] .home-jumps button{color:#e5d0f3}[data-theme=dark] .home-jumps button:hover{background:#4c355c}[data-theme=dark] .next-inline{color:#cbb4d9}
@media(max-width:900px){.checkin-entry{padding:21px 18px;gap:13px;min-height:106px;border-radius:25px}.checkin-entry strong{font-size:25px}.checkin-entry small{font-size:.9rem}.checkin-entry-icon{width:44px;height:44px}.checkin-entry-icon svg{width:25px;height:25px}.home-jumps{gap:2px;padding:5px;margin:14px 0 18px;top:calc(var(--system-top) + var(--header-height,72px) + 16px)}.home-jumps button{padding:8px 3px;font-size:.9rem}.home-section{padding:22px 18px}.home-section>.between{flex-wrap:wrap;gap:8px}.home-section .btn.ghost{padding:5px 9px;min-height:44px;font-size:.9rem}.home-record-grid{gap:0}.home-section h2{font-size:1.25rem}.home-section .calendar-grid{gap:2px}}
.home-report-link{display:flex;align-items:center;gap:14px;text-align:start;background:transparent;color:var(--ink);border:0;border-bottom:1px solid var(--line);width:100%;padding:20px 0;min-height:76px}.home-report-link>span{flex:1}.home-report-link strong{display:block;font-size:1rem}.home-report-link small{display:block;margin-top:5px;color:var(--muted);font-size:.94rem}.home-report-link>svg{width:24px;height:24px;color:var(--green)}#home-records .report-info h3{font-size:1rem!important}
.checkin-entry{position:relative;isolation:isolate;background:linear-gradient(115deg,#edddff 0%,#d9bcf2 60%,#efdcfa 100%);border:1px solid #b88bd7;box-shadow:0 10px 30px #a477be25;transition:box-shadow .25s,transform .25s;animation:checkinInvitation 3.8s ease-in-out 5}.checkin-entry>span{flex:1}.checkin-entry strong{color:#49235f;font-weight:700;letter-spacing:-.45px}.checkin-entry small{color:#68437e;font-size:1rem;margin-top:8px}.checkin-entry>svg{width:58px;height:58px;flex:0 0 58px;padding:16px;border-radius:50%;background:#8b5aab;color:#fff;box-shadow:0 5px 14px #80529930;stroke-width:2;transition:transform .25s}.checkin-entry:hover{transform:translateY(-2px);box-shadow:0 14px 35px #9866b735}.checkin-entry:hover>svg{transform:translateX(3px)}.checkin-entry:focus-visible{outline:3px solid #8052a1;outline-offset:5px}.checkin-entry:active{transform:scale(.985)}@keyframes checkinInvitation{0%,100%{box-shadow:0 10px 30px #a477be25,0 0 0 0 #c4a0df00}50%{box-shadow:0 12px 35px #a477be35,0 0 0 6px #c4a0df20}}[data-theme=dark] .checkin-entry{background:linear-gradient(115deg,#6c4483,#4a2e60);border-color:#ad85c6}[data-theme=dark] .checkin-entry strong{color:#fff4ff}[data-theme=dark] .checkin-entry small{color:#ead7f6}[data-theme=dark] .checkin-entry>svg{background:#e1c3f4;color:#4b2b60}
@media(max-width:900px){.checkin-entry{min-height:118px;padding:23px 21px;gap:16px}.checkin-entry strong{font-size:26px;line-height:1.25}.checkin-entry small{font-size:.95rem}.checkin-entry>svg{width:54px;height:54px;flex-basis:54px;padding:14px}}
@media(prefers-reduced-motion:reduce){.checkin-entry,.checkin-entry>svg{animation:none;transition:none}}
/* Question reading area scrolls independently; the answer dock never moves. */
body.fixed-question{height:var(--visible-height);min-height:0;overflow:hidden}.fixed-question #app,.fixed-question .shell{height:100%;min-height:0}.fixed-question .main{height:100%;min-height:0;padding:12px 24px 0!important;display:flex;flex-direction:column;overflow:hidden}.fixed-question .topbar{position:relative;top:0;flex:none;margin-bottom:12px}.fixed-question #page{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.fixed-question .question-top{flex:none;width:100%;max-width:820px;margin:0 auto 10px}.fixed-question .single-question{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:820px;margin:0 auto;padding:0!important;overflow:hidden}.fixed-question .question-track{flex:none;margin:0 10px 10px}.fixed-question .single-question>.eyebrow{flex:none;margin:0 12px 8px}.fixed-question .question-scene{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px 14px 24px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}.fixed-question .question-scene .question-text{margin:4px 0 16px;font-size:22px;line-height:1.7}.question-dock{flex:none;padding:14px 14px calc(var(--system-bottom) + 10px);background:#fffdfa;border-top:1px solid #e6d5f0;border-radius:24px 24px 0 0;box-shadow:0 -8px 30px #ab86c00b;z-index:3}.fixed-question .answer-options{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;margin:0!important}.fixed-question .answer-option{display:flex!important;flex-direction:column;justify-content:center;align-items:center;gap:6px;min-height:72px!important;padding:10px 5px!important;border-radius:18px}.fixed-question .answer-option input{margin:0!important;width:18px!important;height:18px!important;flex:0 0 18px!important}.fixed-question .answer-option span{font-size:1rem!important;line-height:1.2;text-align:center}.fixed-question .question-footer{margin-top:10px;gap:8px}.fixed-question .question-footer .row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.fixed-question .question-footer .btn{width:100%;min-width:0;min-height:48px}.fixed-question #part-progress{font-size:.83rem!important;line-height:1.4;min-height:2.8em;display:flex;align-items:center}.fixed-question #retry-save{display:block;min-height:28px;margin:4px auto 0;padding:2px 12px;font-size:.85rem}.fixed-question .mobile-nav{display:none!important}[data-theme=dark] .question-dock{background:#241b30;border-color:#5d436f}
@media(max-width:900px){.fixed-question .main{padding:10px 10px 0!important}.fixed-question .question-scene{padding:6px 10px 20px}.question-dock{padding-left:8px;padding-right:8px}.fixed-question .question-scene .question-text{font-size:21px;line-height:1.65}}
@media(max-height:580px){.fixed-question .main .topbar{display:none}.fixed-question .question-top{margin-bottom:6px}.fixed-question .answer-option{min-height:48px!important;flex-direction:row;gap:5px}.fixed-question .question-footer{display:flex;flex-direction:row;align-items:center;gap:12px}.fixed-question #part-progress{flex:1;min-height:0}.fixed-question .question-footer .row{flex:2}.fixed-question #retry-save{min-height:22px;margin-top:0}.question-dock{padding-top:8px}}
.fixed-question #page{animation:none!important}
.home-action-layer{position:fixed;right:30px;bottom:var(--home-action-bottom,24px);z-index:45;width:min(520px,calc(100vw - 285px))}.home-action-layer[hidden]{display:none}.home-action-layer .checkin-entry{min-height:100px;padding:19px 23px;box-shadow:0 12px 35px #9e6ab432;backdrop-filter:blur(18px)}.home-action-layer .checkin-entry>svg{animation:homeActionArrow 2.8s ease-in-out 6}.home-action-visible .main{padding-bottom:calc(var(--home-action-height,110px) + var(--home-action-bottom,24px) + 28px)!important}@keyframes homeActionArrow{0%,65%,100%{transform:translateX(0)}78%{transform:translateX(4px)}88%{transform:translateX(0)}}
@media(max-width:900px){.home-action-layer{left:12px;right:12px;width:auto;bottom:var(--home-action-bottom,calc(var(--system-bottom) + 96px))}.home-action-layer .checkin-entry{border-radius:24px;min-height:96px;padding:17px 20px;gap:14px}.home-action-layer .checkin-entry strong{font-size:25px}.home-action-layer .checkin-entry small{font-size:.9rem;margin-top:5px}.home-action-layer .checkin-entry>svg{width:50px;height:50px;flex-basis:50px;padding:13px}}
@media(prefers-reduced-motion:reduce){.home-action-layer .checkin-entry>svg{animation:none}}@media print{.home-action-layer{display:none!important}}
