.health-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:18px}.health-toolbar label{display:flex;align-items:center;gap:8px}.health-toolbar input,.health-toolbar select{max-width:170px;padding:6px}.health-save-status{font-size:10px;color:var(--muted);max-width:250px}.health-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;align-items:start}.health-card{padding:17px;min-width:0}.health-card.size-small{grid-column:span 2}.health-card.size-medium{grid-column:span 3}.health-card.size-large{grid-column:span 6}.health-card header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.health-card-title{border:0;background:none;color:var(--text);font-weight:700;text-align:right;cursor:grab;padding:0;touch-action:none}.health-open{border:0;background:none;font-size:11px;color:var(--muted);padding:5px}.health-card-content{display:flex;flex-direction:column;gap:10px}.health-card-content>.chip-btn{align-self:flex-start}.health-metric{font-size:28px;line-height:1.4;font-weight:600}.health-progress{display:grid;gap:8px;font-size:11px;color:var(--muted)}.health-progress progress{width:100%;height:7px;accent-color:var(--text);border:0;border-radius:9px;overflow:hidden}.health-progress progress::-webkit-progress-bar{background:var(--surface-2)}.health-progress progress::-webkit-progress-value{background:var(--text)}.health-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--border);font-size:12px;min-width:0}.health-row>span:first-child,.health-row>label{min-width:0;overflow-wrap:anywhere}.health-row label{display:flex;align-items:center;gap:9px}.health-row small{display:block;font-size:10px;color:var(--muted)}.health-row select{max-width:120px;font-size:11px;padding:4px}.health-row>span:last-child{display:flex;align-items:center;flex-wrap:wrap;gap:4px}.health-empty{font-size:12px;color:var(--muted);padding:12px 0;margin:0}.health-chart{display:block;width:100%;max-height:230px;color:var(--text);direction:ltr}.health-chart.compact{max-height:130px}.health-chart-point{cursor:pointer}.health-chart-point:focus{outline:1px solid var(--text)}.health-detail{max-width:1000px;margin:auto;padding:22px}.health-detail-summary{display:grid;gap:10px;margin:20px 0}.health-detail-summary>strong{font-size:26px}.health-history{max-height:380px;overflow:auto;padding:0 4px}.health-manage{margin:20px 0}.health-habit-days{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.health-habit-days label{display:grid;text-align:center;gap:5px;font-size:10px}.health-habit-record{padding:15px 0;border-bottom:1px solid var(--border)}.health-habit-record .pill{margin:3px}.health-value{font-size:10px;padding:3px 6px;min-width:38px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);border-radius:6px;white-space:nowrap}.health-container-row{display:grid;grid-template-columns:1fr 90px 30px;gap:6px;margin:8px 0}.health-container-row input{min-width:0;width:100%;padding:6px}.health-quick{display:grid;grid-template-columns:1fr 1fr;gap:12px}.health-notice{border:1px solid var(--border);padding:12px;margin-bottom:16px;border-radius:12px;font-size:12px;background:var(--surface-2)}#health-global-add{white-space:nowrap}#health-settings-form fieldset,#habit-form fieldset,#health-supp-form fieldset{border:1px solid var(--border);border-radius:10px;padding:10px}#health-settings-form legend,#habit-form legend,#health-supp-form legend{font-size:12px}#health-settings-form .field,#health-supp-form .field,#habit-form .field{display:grid;gap:5px}#health-settings-form input,#health-supp-form input{min-width:0}.health-detail>label select{padding:5px}
@media(min-width:1100px){.health-card.size-large .health-card-content{display:grid;grid-template-columns:1fr 1fr;align-items:center}.health-card.size-large .health-chart{grid-column:1/-1}.health-card.size-large .health-row{grid-column:1/-1}}
@media(max-width:650px){.health-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.health-card.size-small{grid-column:span 1}.health-card.size-medium,.health-card.size-large{grid-column:span 2}.health-card{padding:14px}.health-metric{font-size:24px}.health-toolbar{gap:7px}.health-save-status{max-width:100%;flex-basis:100%}.health-detail{padding:14px}.health-row{gap:6px}.health-habit-days{gap:5px}.health-detail .health-row>strong{font-size:12px}.health-history{max-height:330px}.topbar-actions{flex-wrap:wrap}#health-global-add{font-size:11px;padding:6px 8px}.health-card-title{font-size:12px}.health-open{font-size:10px}}
.health-card:focus-visible,.health-card.health-drop-target{outline:2px solid var(--text);outline-offset:3px}.health-card-content{cursor:pointer}.health-card-content button,.health-card-content label,.health-card-content select{cursor:auto}

/* My Health analytics — scoped to this page; existing modal/shared habit styles stay intact. */
.health-page{--health-track:var(--surface-3);color:var(--text);max-width:1500px;margin-inline:auto}
.health-page .health-dashboard-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 20px;padding-bottom:14px;border-bottom:1px solid var(--border)}
.health-page .health-toolbar{margin:0;gap:8px}
.health-page .health-dashboard-toolbar input{padding:7px 10px;width:auto;min-width:0;font-size:12px;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:9px}
.health-page .health-dashboard-toolbar label,.health-local-label{font-size:11px;color:var(--muted)}
.health-page .health-grid{display:flex;flex-wrap:wrap;align-items:stretch;gap:16px}
.health-page .health-card{display:flex;flex-direction:column;flex:1 1 calc(33.333% - 16px);min-width:250px;padding:20px;margin:0;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:0 3px 12px rgb(0 0 0 / .025);color:var(--text);overflow:hidden}
.health-page .health-card.size-small{flex-basis:calc(25% - 16px);min-width:215px;padding:17px}
.health-page .health-card.size-large{flex-basis:calc(66.666% - 16px)}
.health-page .health-card header{margin-bottom:23px;gap:8px}
.health-page .health-card-title{display:flex;align-items:center;gap:7px;font-size:13px;line-height:1.5;color:var(--text);min-width:0}
.health-page .health-drag-dots{font-size:17px;color:var(--muted-2);font-family:Arial,sans-serif;font-weight:400}
.health-page .health-open{font-size:10px;white-space:nowrap;padding:3px 0;color:var(--muted)}
.health-page .health-open:hover,.health-page .health-text-button:hover{text-decoration:underline;color:var(--text)}
.health-page .health-card-content,.health-page .health-card.size-large .health-card-content{display:flex;flex-direction:column;gap:15px;flex:1}
.health-page .health-stat-split{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:119px}
.health-page .health-eyebrow{display:block;color:var(--muted);font-size:10px;margin-bottom:4px}
.health-page .health-metric{display:block;font-family:Arial,sans-serif;font-variant-numeric:tabular-nums;font-size:42px;font-weight:600;letter-spacing:-1.7px;line-height:1.15;color:var(--text);text-align:right;white-space:nowrap}
.health-page .health-metric small{font-family:inherit;font-size:14px;letter-spacing:0;font-weight:400;color:var(--muted)}
.health-page .health-unit{display:block;font-size:11px;color:var(--muted);margin-top:6px}
.health-page .health-goal-line{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;padding-top:13px;border-top:1px solid var(--border);color:var(--muted)}
.health-page .health-goal-line strong{font-weight:500;color:var(--text)}
.health-page .health-ring{position:relative;width:112px;height:112px;flex-shrink:0}
.health-page .health-ring svg{width:100%;height:100%;fill:none;stroke-width:7}
.health-page .health-ring-track{stroke:var(--health-track)}
.health-page .health-ring-fill{stroke:var(--text);stroke-linecap:round}
.health-page .health-ring>span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px}
.health-page .health-ring strong{font:600 23px Arial,sans-serif;direction:ltr}
.health-page .health-ring small{font-size:9px;color:var(--muted)}
.health-page .health-water-glass{position:relative;overflow:hidden;flex-shrink:0;width:69px;height:102px;border:2px solid var(--border);border-radius:7px 7px 21px 21px;background:var(--surface-2);margin-inline:18px 15px}
.health-page .health-water-fill{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(180deg,var(--muted-2),var(--text));opacity:.65;border-top:3px solid var(--text);min-height:0}
.health-page .health-water-fill[style="height:0%"]{border:0}
.health-page .health-glass-ticks{position:absolute;inset:15px 9px;display:flex;flex-direction:column;justify-content:space-around;mix-blend-mode:difference}
.health-page .health-glass-ticks i{width:12px;height:1px;background:#fff;opacity:.8}
.health-page .health-water-percent{font-size:11px;display:block;margin-top:10px;color:var(--muted)}
.health-page .health-card-footer{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:19px;padding-top:13px;border-top:1px solid var(--border);min-height:44px}
.health-page .health-card-footer .chip-btn{font-size:10px;padding:6px 10px;border-radius:8px;white-space:nowrap;background:var(--surface-2);color:var(--text);border:1px solid var(--border);box-shadow:none}
.health-page .health-text-button{border:0;background:transparent;color:var(--muted);font:inherit;font-size:10px;padding:5px 0;cursor:pointer}
.health-page .health-card-footer .health-text-button:last-child{margin-inline-start:auto}
.health-page .health-more{font-size:10px;color:var(--muted);margin-inline-start:auto}
.health-page .health-weight-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.health-page .health-weight-target{display:flex;flex-direction:column;gap:4px;text-align:left;font-size:10px;color:var(--muted)}
.health-page .health-weight-target strong{font-size:18px;font-weight:500;color:var(--text)}
.health-page .health-weight-target small{font-size:10px;font-weight:400;color:var(--muted)}
.health-page .health-weight-chart{margin:0 -8px}
.health-page .health-chart.compact{max-height:140px;min-height:90px}
.health-page .health-weight-chart .health-chart.compact{height:96px;min-height:0}
.health-page .size-large .health-weight-chart .health-chart.compact{height:150px;max-height:150px}
.health-page .health-chart-caption{display:flex;justify-content:space-between;gap:4px;flex-wrap:wrap;font-size:9px;color:var(--muted);margin-top:-8px}
.health-page .health-chart-empty{display:grid;place-items:center;min-height:96px;border-bottom:1px dashed var(--border)}
.health-page .health-chart-empty .health-empty{font-size:11px;text-align:center}
.health-page .health-card[data-health-card="weight"] .health-card-content{gap:9px}
.health-page .health-habit-summary{display:flex;align-items:baseline;gap:8px}
.health-page .health-habit-summary>strong{font:600 30px Arial,sans-serif;white-space:nowrap;direction:ltr}
.health-page .health-habit-summary small{font-size:17px;color:var(--muted);font-weight:400}
.health-page .health-habit-summary>span{font-size:10px;color:var(--muted)}
.health-page .health-habit-summary>b{font:500 15px Arial,sans-serif;margin-inline-start:auto}
.health-page .health-segments{display:flex;gap:4px;height:5px}
.health-page .health-segments i{flex:1;background:var(--health-track);border-radius:3px}
.health-page .health-segments .is-done{background:var(--text)}
.health-page .health-card-list{margin-top:0}
.health-page .health-card-list .health-row{min-height:42px;font-size:11px;gap:8px;padding:9px 0}
.health-page .health-card-list .health-row:last-child{border-bottom:0}
.health-page .health-card-list .health-row label{flex:1;gap:9px}
.health-page .health-row-done label>span{text-decoration:line-through;color:var(--muted)}
.health-page .health-card-list input[type="checkbox"]{accent-color:var(--text);width:15px;height:15px;flex-shrink:0}
.health-page .health-card-list .ui-action{width:25px;height:25px;min-width:25px;opacity:.6}
.health-page .health-card-list .ui-action:hover{opacity:1}
.health-page .health-supp-summary{display:flex;gap:8px;padding-bottom:12px;border-bottom:1px solid var(--border)}
.health-page .health-supp-summary>div{flex:1;text-align:center}
.health-page .health-supp-summary strong{display:block;font:600 27px Arial,sans-serif;margin-bottom:5px}
.health-page .health-supp-summary span{display:flex;justify-content:center;align-items:center;gap:5px;font-size:9px;color:var(--muted);white-space:nowrap}
.health-page .health-status-dot{display:inline-block;flex-shrink:0;width:7px;height:7px;border:1px solid var(--muted);border-radius:50%;background:transparent}
.health-page [data-status="taken"] .health-status-dot{background:var(--text);border-color:var(--text)}
.health-page [data-status="skipped"] .health-status-dot{background:var(--muted-2);border-radius:2px;opacity:.6}
.health-page .health-supp-name{display:flex;align-items:center;gap:9px}
.health-page .health-card-list .health-supp-row select{font-size:10px;max-width:100px;min-width:80px;border:1px solid var(--border);border-radius:7px;padding:5px;background:var(--surface-2);color:var(--text)}
.health-page .health-links-summary{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding-bottom:13px;border-bottom:1px solid var(--border)}
.health-page .health-links-summary strong{font:600 30px Arial,sans-serif}
.health-page .health-links-summary small,.health-page .health-links-summary>span{font-size:10px;color:var(--muted);font-weight:400}
.health-page .health-goal-item{margin-bottom:17px;font-size:11px}
.health-page .health-goal-item>div{display:flex;justify-content:space-between;gap:8px;margin-bottom:8px}
.health-page .health-goal-item progress{width:100%;height:5px;accent-color:var(--text);border:0;border-radius:5px;overflow:hidden}
.health-page .health-goal-item progress::-webkit-progress-bar{background:var(--health-track)}
.health-page .health-goal-item progress::-webkit-progress-value{background:var(--text)}
.health-page .health-storage-footer{display:flex;justify-content:flex-end;align-items:center;gap:13px;padding:13px 2px}
.health-page .health-storage-footer .health-save-status{max-width:none}
.health-page .health-storage-footer button{font-size:9px}
.health-page .health-empty{line-height:1.9;color:var(--muted)}
.health-page .health-card.size-small .health-ring{width:86px;height:86px}
.health-page .health-card.size-small .health-ring strong{font-size:19px}
.health-page .health-card.size-small .health-metric{font-size:32px;letter-spacing:-1px}
.health-page .health-card.size-small .health-stat-split{min-height:100px;gap:8px}
.health-page .health-card.size-small .health-water-glass{width:50px;height:84px;margin-inline:5px}
.health-page .health-card.size-small header{margin-bottom:17px}
.health-page .health-card.size-small .health-card-title{font-size:12px}
.health-page .health-card.size-small .health-card-content{gap:12px}
.health-page .health-card.size-small .health-weight-chart .health-chart{height:77px}
.health-page .health-card.size-small .health-card-footer{gap:6px}
.health-page .health-notice{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px}
.health-page button:focus-visible,.health-page select:focus-visible,.health-page input:focus-visible{outline:2px solid var(--text);outline-offset:3px}
@media(max-width:1150px){.health-page .health-card,.health-page .health-card.size-small{flex-basis:calc(50% - 16px);min-width:230px}.health-page .health-card.size-large{flex-basis:100%}}
@media(max-width:650px){.health-page .health-grid{gap:12px}.health-page .health-card,.health-page .health-card.size-small,.health-page .health-card.size-large{flex-basis:100%;min-width:0;padding:18px}.health-page .health-dashboard-toolbar{flex-wrap:wrap;gap:6px;margin-bottom:15px}.health-page .health-local-label{display:none}.health-page .health-dashboard-toolbar .health-toolbar{gap:7px}.health-page .health-dashboard-toolbar input{font-size:11px;padding:7px;max-width:150px}.health-page .health-metric{font-size:40px}.health-page .health-storage-footer{flex-wrap:wrap;justify-content:flex-start}.health-page .health-storage-footer .health-save-status{flex-basis:auto}.health-page .health-card header{margin-bottom:18px}.health-page .health-card.size-small .health-card-content{gap:9px}.health-page .health-card.size-small .health-card-list .health-row{min-height:33px;padding:6px 0}.health-page .health-card.size-small .health-card-footer{margin-top:10px;padding-top:9px}.health-page .health-card-title{font-size:13px}}
.health-page .page-heading{margin-bottom:18px;align-items:center}
.health-page .page-title{font-size:28px}
.health-page .health-card header{margin-bottom:16px}
.health-page .health-card-footer{margin-top:12px;padding-top:10px;min-height:39px}
.health-page .health-weight-chart .health-chart.compact{height:88px}
.health-page .health-card-list .health-row{min-height:39px;padding:7px 0}
.health-page .health-stat-split{flex-wrap:wrap}
.health-page .health-stat-split>div:first-child{min-width:0}

/* Calm detail view: one recording action, separate period selector, icon close. */
.health-page .health-close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;padding:8px;border:1px solid var(--border);border-radius:10px;color:var(--text);background:transparent;cursor:pointer}
.health-page .health-close:hover{background:var(--surface-2)}
.health-page .health-detail .section-heading{margin-bottom:24px}
.health-page .health-detail-summary{gap:12px;margin:0 0 24px}
.health-page .health-detail-actions{display:flex;align-items:center;margin:0 0 24px}
.health-page .health-detail-actions>.primary-btn{min-width:90px}
.health-page .health-period-control{display:flex;align-items:center;gap:12px;margin:0 0 22px;padding-top:20px;border-top:1px solid var(--border);font-size:12px;color:var(--muted)}
.health-page .health-period-control select{min-width:112px;padding:8px 12px;border:1px solid var(--border);border-radius:9px;color:var(--text);background:var(--surface)}
.health-page .health-detail>.health-chart{margin:0 0 18px}
.health-page .health-detail>.tiny-muted{margin:0 0 18px;line-height:1.8}
#health-layout-form .health-settings-link{border:0;border-top:1px solid var(--border);background:transparent;color:var(--muted);padding:14px 0 0;font:inherit;font-size:12px;cursor:pointer}
#health-layout-form .health-settings-link:hover{color:var(--text);text-decoration:underline}

/* Keep every habit/supplement reachable directly, within a three-row window. */
.health-page .health-card .health-scroll-list{max-height:144px;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:var(--muted-2) var(--surface-2);scrollbar-gutter:stable;min-height:0;cursor:default;padding-inline-end:5px}
.health-page .health-card .health-scroll-list .health-row{min-height:48px;padding-block:9px}
.health-page .health-scroll-list:focus-visible{outline:2px solid var(--muted);outline-offset:3px;border-radius:4px}

/* Sleep card uses original v18 sleepLogs and Health's card layout. */
.health-page .health-sleep-summary{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;min-height:96px}
.health-page .health-sleep-average{display:flex;flex-direction:column;gap:5px;padding-inline-start:16px;border-inline-start:1px solid var(--border);color:var(--muted);font-size:10px}
.health-page .health-sleep-average strong{font-size:24px;color:var(--text);font-weight:600;white-space:nowrap}
.health-page .health-sleep-average small{font-size:10px;color:var(--muted)}
.health-page .health-sleep-bars{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;align-items:end;min-height:105px;padding:7px 4px 0;border-bottom:1px solid var(--border)}
.health-page .health-sleep-day{display:flex;align-items:center;flex-direction:column;gap:5px;min-width:0}
.health-page .health-sleep-bar-track{width:100%;max-width:32px;height:78px;background:var(--surface-2);border-radius:6px 6px 0 0;display:flex;align-items:flex-end;overflow:hidden}
.health-page .health-sleep-bar-track i{width:100%;display:block;border-radius:5px 5px 0 0;background:var(--text);opacity:.8}
.health-page .health-sleep-day small{font-size:10px;color:var(--muted);padding-bottom:7px}
.health-page .health-sleep-note{font-size:11px;color:var(--muted);margin:0;overflow-wrap:anywhere}
.health-page .health-sleep-detail .v18-heading-actions{display:flex;justify-content:flex-start;margin:12px 0}
.health-page .health-sleep-detail .v18-journal{max-width:100%}
.health-page .health-sleep-detail .v18-chart-scroll{max-width:100%;overflow-x:auto}
@media(max-width:650px){.health-page .health-sleep-summary{align-items:flex-start}.health-page .health-sleep-average{padding-inline-start:10px}.health-page .health-sleep-average strong{font-size:20px}}
