/* Growth views extend the existing dark palette. The display-clock theme is preserved. */
#growthRoot,#growthNav { display:none; }
body.growth-ready.gx-secondary:not(.simple-theme) #growthRoot { display:block; }
body.growth-ready.gx-secondary:not(.simple-theme) #app { display:none; }
body.growth-ready #growthNav { display:none !important; }
body.simple-theme #growthRoot,body.simple-theme #growthNav { display:none; }
#growthRoot { max-width:960px; margin:0 auto; padding:18px 18px calc(150px + env(safe-area-inset-bottom)); }
.gx-header { margin:0 0 18px; }
.gx-profile { display:flex; align-items:center; gap:12px; width:100%; text-align:left; color:var(--ink); background:transparent; padding:0; }
.gx-profile > span:nth-child(2) { flex:1; min-width:0; }
.gx-profile strong { font-size:22px; }.gx-profile small { display:block; color:var(--muted); margin-top:5px; line-height:1.5; }
.gx-avatar { display:grid; place-items:center; flex:0 0 50px; height:50px; border-radius:var(--radius); background:var(--card-2); font-size:27px; overflow:hidden; }.gx-avatar img { width:100%; height:100%; object-fit:cover; }
.gx-date { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; color:var(--muted); font-size:12px; }
#gxSync { cursor:pointer; font-size:11px; }
.gx-card { min-width:0;}
.gx-card h2 { font-size:16px; margin:0 0 14px; }.gx-card h3 { font-size:13px; margin:20px 0 10px; }.gx-muted,.gx-card small { color:var(--muted); font-size:12px; line-height:1.5; }
.gx-recent { display:flex; gap:12px; overflow-x:auto; }.gx-recent > div { flex:1 0 100px; }.gx-recent strong { display:block; font-size:21px; margin-top:5px; font-variant-numeric:tabular-nums; }
.gx-quick { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }.gx-quick button { display:flex; flex-direction:column; gap:8px; align-items:center; justify-content:center; min-height:72px; }.gx-quick button > span { font-size:24px; }
#growthRoot button:where(:not(.growth-history-row)), #growthDialog button { min-height:44px; border-radius:var(--radius); background:var(--card-2); color:var(--ink); padding:10px 12px; font-size:13px; }
#growthRoot .gx-profile { background:transparent; padding:0; }
.gx-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr));}.gx-stats strong { display:block; margin-top:6px; font-variant-numeric:tabular-nums;}
.gx-chips,.gx-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }.gx-chips > span { padding:8px; border-radius:8px; background:var(--card-2); }.gx-actions { margin:10px 0; }
#growthRoot .gx-chip { background:var(--card-2); color:#a8afaa; border:1px solid var(--line); }#growthRoot .gx-chip.done { color:#a3f0be; background:#234532; border-color:#54836a; }
#growthRoot .gx-link { background:transparent; color:#9bd9b1; margin-top:8px; padding-left:0; }
#growthRoot .gx-event,#growthDialog .gx-event { display:flex; align-items:center; gap:14px; width:100%; background:transparent; padding:14px 0; border-bottom:1px solid var(--line); border-radius:0; text-align:left; line-height:1.5; }
.gx-event time { flex:0 0 42px; font-size:12px; color:var(--blue); font-variant-numeric:tabular-nums; }.gx-event > span:nth-last-child(2) { flex:1; min-width:0; }.gx-event strong { font-size:13px; font-weight:600; overflow-wrap:anywhere; }.gx-event small { display:block; margin-top:3px; }
.gx-empty { color:var(--muted); padding:22px 0; text-align:center; font-size:13px; }.gx-summary { display:block; width:100%; text-align:left; margin-top:8px; }
.gx-subnav { display:flex; overflow-x:auto;}.gx-subnav button { flex-shrink:0;}
.gx-menu { display:grid; gap:10px; }.gx-menu button { text-align:left; }.gx-field { display:flex; flex-direction:column; gap:7px; margin:12px 0; font-size:13px; color:var(--muted); min-width:0; }
.gx-field input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.gx-field select,.gx-field textarea,.gx-range input,.gx-range select { display:block; width:100%; min-width:0; min-height:44px; border:1px solid var(--line); border-radius:var(--radius); background:var(--bg); color:var(--ink); padding:10px; font:inherit; color-scheme:dark; }
.gx-range { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }.gx-range label { flex:1; font-size:12px; min-width:100px; }.gx-range input,.gx-range select { margin-top:5px; }
.gx-table-wrap { overflow-x:auto; } .gx-table-wrap table { width:100%; border-collapse:collapse; font-size:12px; }.gx-table-wrap td,.gx-table-wrap th { text-align:left; padding:12px 8px; border-bottom:1px solid var(--line); white-space:nowrap; }
#growthNav { position:fixed; z-index:100; bottom:max(8px,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:min(560px,calc(100% - 20px)); height:64px; align-items:center; justify-content:space-around; border:1px solid #4a574e; border-radius:var(--radius); background:rgba(27,35,30,.96); box-shadow:0 4px 30px #0008; }
#growthNav button { flex:1; height:60px; background:transparent; color:#a5afa8; font-size:10px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; border-radius:var(--radius); }#growthNav button > span { font-size:21px; }#growthNav button.active { color:#adf1c1; background:#2e4938; }#growthNav [data-gx="plus"] span { background:#b8f2cb; border-radius:14px; color:#193421; width:38px; height:32px; font-size:29px; line-height:30px; }
#growthDialog { width:min(560px,calc(100% - 20px)); max-height:90dvh; padding:0; border:1px solid var(--line); border-radius:var(--radius); background:var(--card); color:var(--ink); overflow:hidden; z-index:1000; }
#growthDialog::backdrop { background:rgba(0,0,0,.7); }#gxForm { display:flex; flex-direction:column; max-height:88dvh; }#gxForm > header,#gxForm > footer { display:flex; gap:10px; align-items:center; justify-content:space-between; padding:14px 18px; background:var(--card-2); flex-shrink:0; }#gxForm h2 { font-size:18px; margin:0; }#gxForm > footer { justify-content:flex-end; }.gx-dialog-content { overflow-y:auto; padding:0 18px 18px; min-height:0; }#growthDialog .gx-primary { background:var(--green-2); color:#183922; min-width:100px; }#growthDialog .gx-danger { background:#4b252c; color:#ffbbc5; margin-top:24px; }
#growthDialog fieldset { border:1px solid var(--line); border-radius:var(--radius); padding:10px; margin:14px 0; }#growthDialog legend { font-size:12px; color:var(--muted); }#growthDialog details { border-top:1px solid var(--line); padding:14px 0; }#growthDialog summary { min-height:30px; font-size:13px; cursor:pointer; }
.gx-food-picker { display:flex; flex-wrap:wrap; gap:8px; }.gx-food-choice { display:flex; align-items:center; gap:5px; min-height:44px; padding:6px 10px; background:var(--card-2); border-radius:var(--radius); }.gx-food-choice[hidden] { display:none; }.gx-inline { display:flex; align-items:end; gap:8px; }.gx-inline .gx-field { flex:1; }.gx-inline button { margin-bottom:12px; }
.gx-photo { display:block; max-width:100%; max-height:260px; margin:10px 0; border-radius:var(--radius); object-fit:contain; }.gx-photo-card { width:100%; text-align:left; margin:10px 0; }.gx-module-setting { display:flex; gap:6px; align-items:center; margin:6px 0; }.gx-module-setting label { flex:1; font-size:13px; }.gx-check { display:flex; align-items:center; gap:10px; min-height:44px; font-size:13px; }
.gx-recommend { border-color:#637e48; background:#283725; }.gx-recommend p { color:#c4d4ba; font-size:13px; line-height:1.6; }
@media(max-width:600px) { #growthRoot { padding:14px 12px calc(160px + env(safe-area-inset-bottom)); }.gx-card {}.gx-profile strong { font-size:20px; }.gx-stats strong {}.gx-recent strong { font-size:18px; }#growthDialog { margin:auto auto max(8px,env(safe-area-inset-bottom)); }.gx-quick { gap:6px; }#growthRoot .gx-quick button { padding:8px 3px; font-size:12px; } }
@media(min-width:1100px) { #growthRoot { max-width:1000px; }.gx-card {}.gx-quick { grid-template-columns:repeat(4,1fr); } }
.gx-trend { width:100%; height:120px; }
/* Editor popovers must sit above legacy modal backdrops, below confirmations. */
.growth-ready .modal-backdrop { z-index:1200; }
.growth-ready :is(.time-picker-popover,.date-picker-popover,.choice-popover) { z-index:1300; }
.growth-ready #confirmModal { z-index:1400; }

/* Keep the original home, navigation and frequently used theme controls. */
.growth-entry-btn { min-height:30px; width:auto; flex-shrink:0; padding:0 8px; border:1px solid rgba(159,240,191,.2); border-radius:8px; color:#b6ddc4; background:rgba(53,197,107,.06); font-size:12px; }
body.simple-theme .growth-entry-btn,body.simple-theme .growth-recommend-inline { display:none !important; }
.gx-section-links { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.growth-history-entry { padding:8px 12px; min-height:36px; border-radius:8px; background:var(--card-2); color:#c5edcf; }
body.gx-secondary .floating-tabs .tab-btn.active { background:transparent; }
.growth-recommend-inline { color:var(--muted); font-size:11px; line-height:1.5; }
.med-option[hidden],#growthMealSummary[hidden] { display:none !important; }
#growthMealSummary { min-height:24px; font-size:11px; padding:3px 8px; }
/* Two added destinations; original home and record cards stay in place. */
body.growth-ready:not(.simple-theme) .floating-tabs { grid-template-columns:repeat(6,minmax(0,1fr)); width:336px; height:58px; left:calc(50% - 85px); padding:4px; gap:2px; }
body.growth-ready:not(.simple-theme) .floating-tabs .tab-btn { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:1px; min-height:44px; font-size:20px; }
body.growth-ready .floating-tabs .tab-btn small { font-size:9px; line-height:1; }
body.growth-ready:not(.simple-theme) .theme-toggle-btn { left:calc(50% + 92px); }
body.growth-ready:not(.simple-theme) .nightlight-btn { left:calc(50% + 152px); }
body.growth-ready:not(.simple-theme) .woodfish-btn { left:calc(50% + 212px); }
.records > .records-head { flex-wrap:wrap; }
#growthHomeActions { width:100%; min-width:0; }
.home-extra-quick { display:flex; gap:5px; flex-wrap:wrap; padding:3px 0; }
.home-extra-quick button { min-height:32px; padding:5px 10px; background:#223750; color:#dcecff; border:1px solid #344c63; border-radius:7px; font-size:11px; }
#growthHomeDigest { color:#a4c9b2; font-size:11px; padding:3px 0; }
#growthHomeDigest:empty { display:none; }
#homeUnifiedTimeline { min-height:0; overflow:auto; padding:0 12px 65px; }
#homeUnifiedTimeline .gx-event,.growth-day-section .gx-event,#homeExtraRecordGroup .gx-event { display:flex; align-items:center; gap:12px; width:100%; background:transparent; color:var(--ink); border-bottom:1px solid #283953; border-radius:0; padding:10px 0; text-align:left; min-height:44px; }
#homeUnifiedTimeline[hidden],.record-content[hidden],#homeExtraRecordGroup[hidden] { display:none !important; }
.record-content:has(#homeExtraRecordGroup:not([hidden])) { grid-template-columns:repeat(4,minmax(0,1fr)); }
body.growth-ready:not(.simple-theme) .dashboard > .tile { order:var(--home-card-order,0); }
body.growth-ready:not(.simple-theme) .dashboard > .tile[data-home-hidden="true"] { display:none; }
#homeExtraRecordGroup { overflow:auto; padding:0 8px; }.growth-day-section { padding:10px; }
@media(max-width:600px) {
 body.growth-ready:not(.simple-theme) .floating-tabs { left:50%; width:calc(100% - 22px); max-width:430px; bottom:max(10px,env(safe-area-inset-bottom)); height:56px; }
 body.growth-ready:not(.simple-theme) .theme-toggle-btn,body.growth-ready:not(.simple-theme) .nightlight-btn,body.growth-ready:not(.simple-theme) .woodfish-btn { bottom:calc(max(10px,env(safe-area-inset-bottom)) + 64px); width:44px; height:44px; }
 body.growth-ready:not(.simple-theme) .theme-toggle-btn { left:calc(50% - 76px); }body.growth-ready:not(.simple-theme) .nightlight-btn { left:calc(50% - 22px); }body.growth-ready:not(.simple-theme) .woodfish-btn { left:calc(50% + 32px); }
 body.growth-ready:not(.simple-theme) .app { padding-bottom:calc(145px + env(safe-area-inset-bottom)); }
 .record-content:has(#homeExtraRecordGroup:not([hidden])) { grid-template-columns:1fr; }
 .home-extra-quick button { min-height:40px; flex:1 0 28%; }
 #homeUnifiedTimeline { padding-bottom:12px; }
}
#growthStageNotice button { min-height:32px; padding:5px 10px; border-radius:8px; background:#304b36; color:#bde2c6; font-size:11px; margin:4px 0; }
.gx-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; text-align:center; margin:12px 0; }
#growthRoot .gx-calendar button { min-width:0; padding:5px 1px; min-height:46px; background:var(--card-2); }
.gx-calendar button small { display:block; min-height:16px; }.gx-calendar button.has-summary { outline:1px solid #82ae90; }

body.gx-secondary .floating-tabs .tab-btn.active { background:rgba(245,245,245,.92); color:#18241c; }

/* Shared surfaces across all five destinations. */
html:has(body.growth-ready:not(.simple-theme)),body.growth-ready:not(.simple-theme) { background:var(--bg); }
body.growth-ready:not(.simple-theme) .app,body.growth-ready:not(.simple-theme) #growthRoot { background:transparent; }
body.growth-ready:not(.simple-theme) .records,body.growth-ready:not(.simple-theme) .history-view,body.growth-ready:not(.simple-theme) .vaccine-view,.gx-card { background:var(--card); border-color:var(--line); }
body.growth-ready:not(.simple-theme) .records-head,body.growth-ready:not(.simple-theme) .record-content { background:var(--card); }
body.growth-ready:not(.simple-theme) .app:not(.history-mode):not(.vaccine-mode) { height:auto; overflow:visible; grid-template-rows:auto auto auto; }
body.growth-ready:not(.simple-theme) .dashboard { grid-template-rows:none; grid-auto-rows:minmax(220px,auto); }
body.growth-ready:not(.simple-theme) .tile.meal { grid-column:1 / -1; background:linear-gradient(135deg,rgba(111,166,216,.14),var(--card)); }
.tile.meal .button-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
body.simple-theme .tile.meal { display:none !important; }
body.growth-ready:not(.simple-theme) .record-content { grid-template-columns:repeat(3,minmax(0,1fr)); overflow:visible; }
.home-added-group[hidden] { display:none !important; }
.home-added-group .gx-event { display:flex; align-items:center; gap:14px; width:100%; min-height:34px; padding:8px 18px; background:transparent; color:var(--ink); border-bottom:1px solid var(--line); border-radius:0; text-align:left; }
.home-added-group .gx-event strong { font-size:11px; font-weight:500; }
.home-added-group .block-head { color:var(--blue); }
.home-added-group .gx-event time { font-size:11px; }
.home-added-group .gx-empty { font-size:11px; }
#growthRoot { padding-top:12px; }
.gx-card {}
.gx-header { padding:16px; border:1px solid var(--line); border-radius:var(--radius); background:var(--card); }
.growth-history-entry,.home-extra-quick button { background:var(--card-2); color:var(--ink); border:1px solid var(--line); }
#growthRoot button:focus-visible,#growthDialog button:focus-visible,.tile.meal button:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
body.gx-secondary .mobile-cloud-login:not([hidden]) { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:6px; max-width:964px; margin:8px auto 0; padding:8px; border:1px solid var(--line); border-radius:var(--radius); background:var(--card); }
body.gx-secondary .mobile-cloud-login input { min-width:0; height:40px; padding:0 9px; }
body.gx-secondary .mobile-cloud-login button { grid-column:1 / -1; height:44px; background:var(--green-2); border-radius:var(--radius); }
@media(max-width:760px) {
 body.growth-ready:not(.simple-theme) .record-content { grid-template-columns:1fr; }
 body.gx-secondary .mobile-cloud-login:not([hidden]) { margin:8px 8px 0; }
}
body.growth-ready:not(.simple-theme) .app { grid-template-columns:minmax(0,1fr); }
body.growth-ready:not(.simple-theme) .dashboard,body.growth-ready:not(.simple-theme) .records { min-width:0; }
body.growth-ready:not(.simple-theme) .records-title-line { flex-wrap:wrap; }
.tile.meal .choice-btn { background:var(--blue); color:#091623; }

/* The original growth overview is shared with Growth → Body. */
.growth-measurements { display:grid; gap:12px; min-width:0; }
#growthRoot .growth-history-row { min-width:0; }
.growth-measurements .growth-history-metric > span { color:var(--muted); }
/* Persistent settings controls retain their original event handlers and draft inputs. */
#settingsPage[hidden],#healthVaccineContent[hidden],#healthRecordsContent[hidden] { display:none !important; }
#settingsPage .settings-profile { width:100%; max-width:none; max-height:none; overflow:visible; margin:12px 0; }
#settingsPage .cloud-panel { margin:12px 0; padding:16px; }
#settingsPage .profile-inline-fields { margin:14px 0; }
#settingsPage .modal-actions { margin-top:16px; }
#settingsPage details { border-top:1px solid var(--line); padding:12px 0; }
#settingsPage summary { cursor:pointer; padding:8px 0; font-size:13px; }
#settingsPage .routine-inline { padding:8px; border:1px solid var(--line); border-radius:var(--radius); }
#settingsPage input:not([type=checkbox]):not([type=hidden]):not([type=file]) { min-width:0; max-width:100%; }
body.growth-ready:not(.simple-theme) .app.vaccine-mode { height:auto; min-height:100dvh; grid-template-rows:auto auto; padding-bottom:150px; }
#vaccineView { grid-template-rows:auto minmax(0,1fr); }
#healthVaccineContent { display:grid; grid-template-rows:auto minmax(0,1fr); min-width:0; }
.health-subnav { padding:12px; margin:0; }
.health-subnav button,#healthRecordsContent button { min-height:44px; padding:10px 12px; border-radius:var(--radius); background:var(--card-2); color:var(--ink); }

#healthRecordsContent .gx-event { display:flex; gap:14px; align-items:center; width:100%; background:transparent; border-bottom:1px solid var(--line); border-radius:0; text-align:left; }
body.simple-theme .tablet-care { display:block; max-width:94%; min-width:0; }
@media(max-width:600px) {
 #settingsPage .cloud-login-row,#settingsPage .profile-inline-fields { grid-template-columns:1fr; }
 body.simple-theme .tablet-care-item { font-size:11px; padding:5px 7px; }
}
#settingsPage input[type=checkbox] { width:18px; height:18px; min-height:18px; flex:0 0 18px; padding:0; margin:0; accent-color:var(--green-2); }
#settingsPage .gx-chips label { display:flex; align-items:center; gap:5px; min-height:36px; }
#settingsPage .gx-check { justify-content:flex-start; }
#settingsPage .gx-check input { display:inline-block; }
@media(max-width:600px) {
 body.simple-theme .tile.sleep .metric,body.simple-theme .tile.feed .metric { font-size:clamp(18px,5.6vw,32px); white-space:nowrap; letter-spacing:0; }
}
/* Shared legacy palette and control sizing, including the original quick login. */
body.growth-ready .mobile-cloud-login:not([hidden]) {
 display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:6px;
 position:relative; z-index:2; max-width:964px; margin:8px auto 0; padding:8px;
 border:1px solid rgba(53,197,107,.24); border-radius:var(--radius); background:var(--card);
}
body.growth-ready .mobile-cloud-login input { min-width:0; height:40px; padding:0 9px; font-size:14px; }
body.growth-ready .mobile-cloud-login button { grid-column:1/-1; min-height:44px; padding:0 12px; border-radius:var(--radius); background:var(--green-2); color:#071008; font-size:13px; font-weight:800; }
.mobile-cloud-login[hidden] { display:none !important; }
:where(#growthRoot,#growthDialog,#healthRecordsContent) { font-size:14px; line-height:1.5; }
.gx-card,.gx-header {}
.gx-header { margin-bottom:12px; }
.gx-card h2 { font-size:16px; line-height:1.4; margin-bottom:12px; }
.gx-actions h2 { margin:0; }
.gx-profile strong { font-size:18px; overflow-wrap:anywhere; }
.gx-avatar { flex-basis:44px; height:44px; border-radius:50%; }
#gxSync { cursor:default; }
:where(#growthRoot,#growthDialog,#healthRecordsContent) button { line-height:1.4; font-weight:700; max-width:100%; }
:where(#growthRoot,#growthDialog,#healthRecordsContent) button:disabled { opacity:.5; cursor:default; }
.gx-field { gap:6px; margin:12px 0; font-size:13px; font-weight:700; }
.gx-field :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select),.gx-range :is(input,select) {
 height:44px; min-height:44px; max-width:100%; padding:0 12px; border:1px solid var(--line); border-radius:var(--radius); background-color:var(--card-2); color:var(--ink); font-size:14px; font-weight:400; line-height:normal;
}
.gx-field select,.gx-range select { padding-right:36px; background-position:right 10px center; }
.gx-field textarea { min-height:88px; height:auto; resize:vertical; padding:10px 12px; background:var(--card-2); font-size:14px; font-weight:400; line-height:1.5; }
.gx-field input[type=file] { height:auto; min-height:44px; padding:8px; font-size:13px; background:var(--card-2); }
:where(#growthRoot,#growthDialog,#healthRecordsContent) :is(input[type=checkbox],input[type=radio]) {
 appearance:auto; -webkit-appearance:auto; display:inline-block; flex:0 0 18px;
 width:18px; height:18px; min-width:18px; min-height:18px; max-width:18px;
 padding:0; margin:0; border:0; border-radius:0; box-shadow:none; accent-color:var(--green-2); vertical-align:middle;
}
:where(#growthRoot,#growthDialog,#healthRecordsContent) :is(input[type=checkbox],input[type=radio]):focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
.gx-check,.gx-module-setting label { display:flex; align-items:center; justify-content:flex-start; gap:8px; line-height:1.5; min-width:0; }
.gx-chips label { display:flex; align-items:center; gap:6px; min-height:40px; }
#growthDialog fieldset { min-width:0; max-width:100%; border:0; padding:0; margin:16px 0; }
#growthDialog legend { font-weight:800; font-size:13px; color:var(--muted); padding:0; }
.gx-food-picker { gap:8px; }
.gx-food-choice { flex:0 1 auto; min-width:0; max-width:100%; min-height:44px; padding:10px; gap:8px; cursor:pointer; border:1px solid var(--line); background:var(--card-2); box-shadow:none; }
.gx-food-choice > span { display:block; min-width:0; white-space:nowrap; overflow-x:auto; font-size:14px; font-weight:500; }
.gx-food-choice:has(input:checked) { background:rgba(53,197,107,.12); border-color:rgba(53,197,107,.5); color:#bdf5d0; }
.gx-inline { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; margin:12px 0; }
.gx-inline .gx-field { flex:1 1 150px; margin:0; }
#growthDialog .gx-inline button { flex:0 0 auto; height:44px; min-height:44px; padding:0 12px; margin:0; white-space:nowrap; }
#growthDialog { max-height:calc(100dvh - 24px); }
#gxForm { max-height:calc(100dvh - 28px); min-height:0; }
#gxForm > header,#gxForm > footer { padding:12px 16px; gap:8px; background:var(--card); }
#gxForm > header { border-bottom:1px solid var(--line); }
#gxForm > footer { border-top:1px solid var(--line); flex-wrap:wrap; padding-bottom:max(12px,env(safe-area-inset-bottom)); }
#gxForm h2 { font-size:18px; line-height:1.4; }
.gx-dialog-content { padding:0 16px 16px; overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
#gxFormError:not(:empty) { flex:1 0 100%; font-size:12px; color:#ffbbc5; overflow-wrap:anywhere; }
#growthDialog .gx-primary { color:#071008; font-weight:800; }
#growthDialog summary { padding:6px 0; min-height:44px; line-height:1.5; }
#growthDialog details { padding:8px 0; }
#growthRoot .gx-subnav button,.health-subnav button {}
#growthRoot .gx-calendar button { padding:5px 1px; }


#healthRecordsContent .gx-actions button { font-size:13px; padding:10px 12px; }
#settingsPage .routine-inline { border:0; padding:0 0 8px; }
#settingsPage h3 { font-size:16px; margin-bottom:12px; }
#settingsPage .modal-actions { grid-template-columns:1fr; }
#settingsPage .settings-profile button[type=submit] { background:var(--green-2); color:#071008; }
#settingsPage .cloud-actions button { font-size:13px; }
.tile.meal { gap:9px; }
.tile.meal .choice-btn { font-weight:800; }
@media(max-width:760px) {
 body.growth-ready .mobile-cloud-login:not([hidden]) { margin:8px 8px 0; }
 .gx-card,.gx-header {}
 .gx-stats { grid-template-columns:repeat(2,minmax(0,1fr));}
 .gx-stats strong { overflow-wrap:anywhere;}
}
@media(max-width:430px) {
 .gx-quick { grid-template-columns:repeat(3,minmax(0,1fr)); }
 #growthDialog .gx-quick button { padding:8px 4px; font-size:12px; }
 .gx-field :is(input,select,textarea),body.growth-ready .mobile-cloud-login input { font-size:16px; }
 .gx-module-setting { flex-wrap:wrap; }
 .gx-module-setting label { flex:1 0 55%; }
}
@media(max-width:350px) {
 .gx-inline .gx-field { flex-basis:100%; }
 #growthDialog .gx-inline button { width:100%; }
}
/* Record pages share the original history/vaccine surfaces and secondary actions. */





#growthRoot > .gx-card .gx-empty { padding:16px 0; }
/* One baby identity card, matching the existing home card. */
.baby-info-card,body:not(.simple-theme) .tile.time { background:linear-gradient(135deg,rgba(40,168,86,.14),var(--card)); border:1px solid var(--line); border-radius:var(--radius); }
.baby-info-card { padding:16px; margin-bottom:12px; }
body:not(.simple-theme) :is(.baby-info-card,.tile.time) .avatar { width:40px; height:40px; flex:0 0 40px; border-radius:50%; }
body:not(.simple-theme) :is(.baby-info-card,.tile.time) .baby-name { font-size:16px; line-height:1.4; }
body:not(.simple-theme) :is(.baby-info-card,.tile.time) .baby-days { font-size:12px; line-height:1.5; color:var(--muted); }
.baby-date-weather { display:flex; gap:10px; align-items:center; margin-top:12px; font-size:12px; color:var(--muted); }
.baby-date-weather > span { min-width:0; }
.baby-date-weather > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.shared-cloud-status { margin-top:8px; font-size:11px; color:var(--muted); }
body:not(.simple-theme) .time-bottom > div:first-child { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; }
body:not(.simple-theme) .time-bottom .cloud-badge { flex-basis:100%; width:fit-content; }
body:not(.simple-theme) .time-bottom :is(.date-line,.weather-line) { font-size:12px; line-height:1.5; }
body.gx-legacy:not(.simple-theme) .app { height:auto; min-height:70dvh; }
/* Few choices are immediately visible; longer lists expand in our own panel. */
.choice-control select[hidden] { display:none !important; }
.choice-options { display:flex; flex-wrap:wrap; gap:6px; }
:where(#growthRoot,#growthDialog,#settingsPage) .choice-options button { min-height:40px; width:auto; max-width:100%; padding:8px 10px; font-size:13px; white-space:normal; word-break:normal; overflow-wrap:anywhere; border:1px solid var(--line); background:var(--card-2); color:var(--ink); font-weight:500; line-height:1.4; }
:where(#growthRoot,#growthDialog,#settingsPage) .choice-options button[aria-pressed=true] { background:rgba(53,197,107,.14); color:#bdf5d0; border-color:var(--green-2); }
.choice-options button[hidden] { display:none !important; }
.choice-panel { border:1px solid var(--line); border-radius:var(--radius); padding:8px !important; }
.choice-panel .choice-search { margin:6px 0 10px; }
#gxMealFoods { max-height:200px; overflow:auto; align-content:flex-start; padding:3px; }
.food-filters { display:flex; gap:6px; overflow-x:auto; padding:6px 0 10px; }
#growthDialog .food-filters button,#growthRoot .food-filters button { flex:0 0 auto; min-height:36px; padding:6px 10px; font-size:12px; white-space:nowrap; border:1px solid var(--line); }
.food-filters button[aria-pressed=true] { color:#bdf5d0 !important; background:rgba(53,197,107,.14) !important; border-color:var(--green-2) !important; }
.food-guidance { font-size:12px; color:var(--muted); margin-top:12px; }
.food-guidance p { line-height:1.6; }
.food-guidance a { color:var(--blue); }
#mealSelectionHints p { font-size:12px; }
#growthDialog .meal-more { margin-top:10px; }
@media(max-width:430px) {
 .baby-info-card { padding:12px; }
 body:not(.simple-theme) :is(.baby-info-card,.tile.time) .avatar { width:36px; height:36px; flex-basis:36px; }
 .baby-date-weather { gap:6px; font-size:11px; }
 #growthDialog .choice-options button { flex:0 1 auto; min-height:44px; }
 #gxMealFoods { max-height:170px; }
}
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#growthDialog .meal-create { border:0; margin:0; padding:0; }
#growthDialog .meal-create > summary { color:var(--blue); }
#gxMealFoods { max-height:160px; }

/* Information cards share the existing theme tokens and compact controls. */
.info-tags{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0}.info-tags>span{display:inline-block;background:rgba(53,197,107,.12);color:#b9d9bb;border-radius:5px;padding:4px 7px;font-size:11px;line-height:1.4;max-width:100%;overflow-wrap:anywhere}.info-tags .tag-iron{background:rgba(186,170,94,.16);color:#ddcb88}.info-tags .tag-allergen,.reaction-badge{background:rgba(230,169,98,.16);color:#edc798}.info-tags .tag-stage{background:rgba(255,255,255,.06);color:var(--muted)}
.health-event-card{border:1px solid var(--line);border-radius:8px;padding:12px;margin-top:12px;background:var(--card);min-width:0}.health-event-main{display:flex!important;width:100%;gap:10px;align-items:center;text-align:left!important;background:transparent!important;border:0!important;padding:0!important;color:inherit}.health-event-main>time{font-size:12px;flex:0 0 72px;line-height:1.6;color:var(--muted)}.health-event-main>span:nth-child(2){flex:1;min-width:0}.health-event-main strong{display:block;font-size:15px;overflow-wrap:anywhere}.health-event-main small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.event-excerpt{font-size:13px;line-height:1.6;margin:8px 0;overflow-wrap:anywhere;white-space:pre-wrap}.health-event-children{border-top:1px solid var(--line);padding-top:8px}.health-event-children .gx-event{width:100%}.health-event-children summary{font-size:12px;color:var(--muted)}
.food-explore-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.food-explore-card{display:flex!important;flex-direction:column;align-items:stretch;text-align:left!important;padding:12px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--card)!important;min-width:0;color:inherit!important;gap:5px}.food-card-title{display:flex;justify-content:space-between;align-items:center;gap:8px}.food-card-title strong{font-size:15px;overflow-wrap:anywhere}.food-card-title small{font-size:11px;white-space:nowrap;color:var(--muted)}.food-card-state{font-size:12px;color:#b9d9bb}.food-card-facts{font-size:11px;color:var(--muted);line-height:1.6}.reaction-badge{display:inline-block;border-radius:5px;padding:5px 8px;font-size:12px;line-height:1.5}.explore-filter-row{margin:8px 0}.explore-filter-row>strong{font-size:12px;color:var(--muted)}.explore-options{margin:8px 0}.explore-options summary{font-size:13px;color:var(--ink);padding:8px 0}.food-explore-card .info-tags{margin:2px 0 0}
.meal-reaction{border:1px solid rgba(230,169,98,.4);border-radius:8px;padding:10px;margin:12px 0;background:rgba(230,169,98,.06)}.meal-reaction>summary{color:#edc798;font-weight:600;line-height:1.6}
.stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.stats-overview{grid-template-columns:repeat(4,minmax(0,1fr))}.stat-bars>div{display:grid;grid-template-columns:minmax(65px,1fr) 2fr auto;gap:8px;align-items:center;margin:13px 0;font-size:12px}.stat-bars meter{width:100%;height:12px;appearance:none;border:0;border-radius:10px;background:#2d352e}.stat-bars meter::-webkit-meter-bar{background:#2d352e;border:0}.stat-bars meter::-webkit-meter-optimum-value{background:#92ab80}.stat-bars strong{font-size:12px;white-space:nowrap}.food-rank{display:flex!important;width:100%;align-items:center;gap:8px;text-align:left!important;border:0!important;border-bottom:1px solid var(--line)!important;background:transparent!important;border-radius:0!important;padding:12px 0!important;color:inherit!important}.food-rank strong{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px}.food-rank small{font-size:11px;color:var(--muted);white-space:nowrap}.rank-number{font-size:12px;color:#91a481;min-width:18px}.trend-panel{min-width:0;background:var(--bg);border-radius:8px;padding:8px}.trend-panel svg{width:100%;height:auto}.gx-card details{max-width:100%}
@media(max-width:600px){.stats-grid,.food-explore-grid{grid-template-columns:minmax(0,1fr)}.stats-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.food-explore-card .info-tags>span{font-size:10px}.health-event-main>time{flex-basis:62px}}

#healthRecordsContent .food-filters button{flex:0 0 auto;white-space:nowrap;min-height:38px;padding:7px 12px;font-size:12px;border:1px solid var(--line)}
.food-explore-card .food-card-title strong,.health-event-main strong{color:var(--ink)}

/* Reactions reuse meal storage and the existing compact dialog controls. */
#growthDialog .reaction-primary{margin:0;padding:0;border:0;background:transparent}
#growthDialog .reaction-symptoms{margin:10px 0;padding:0;border:0;min-width:0}
#growthDialog .reaction-symptoms legend{font-size:13px;color:var(--muted);margin-bottom:8px}
#growthDialog .reaction-symptoms button{flex:0 0 auto;white-space:nowrap;min-height:40px;padding:8px 10px}
.reaction-urgent{padding:10px;border:1px solid var(--amber);border-radius:var(--radius);background:rgba(217,176,96,.1);color:#f2d49d;font-size:13px;line-height:1.6}
.reaction-observation{margin:8px 0}.reaction-photo,.reaction-meal-context{margin-top:12px}
#growthRoot>.gx-subnav:first-child{margin-top:0}

#growthDialog .meal-reaction textarea{min-height:64px;height:64px}
