/* 全站布局修正。保留颜色和字体层次，缩小容器而非用overflow:hidden遮掩溢出。 */
html,body { min-width:0; }
*,*::before,*::after { box-sizing:border-box; }
img,svg { max-width:100%; }
.auth-page,.auth-main,.workspace,.content,.panel,.layout,.health-content { min-width:0; }
.auth-page { min-height:100svh; }
.auth-box { width:min(100%,440px); max-width:100%; min-width:0; }
.auth-main { padding-bottom:calc(64px + env(safe-area-inset-bottom,0px)); }
input,select,textarea { max-width:100%; min-width:0; }
dialog { width:min(540px,calc(100% - 24px)); max-width:calc(100% - 24px); max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px)); overflow-y:auto; }
.health-content { padding-bottom:calc(40px + env(safe-area-inset-bottom,0px)); }
.health-header-inner { padding-top:env(safe-area-inset-top,0px); }
.health-welcome h1 { overflow-wrap:break-word; }
.health-score-card { row-gap:12px; }
.health-score-caption { text-align:left; }
.health-score-caption summary { cursor:pointer; font-size:11px; color:#687e70; }
.health-score-caption p { font-size:10px; line-height:1.8; margin:8px 0 0; }
.health-metric { display:grid; grid-template-columns:minmax(0,1fr) minmax(72px,36%); column-gap:12px; align-items:center; }
.health-metric-icon { position:absolute; top:22px; left:22px; width:32px; height:32px; border-radius:11px; margin:0; }
.health-metric-icon svg { width:20px; height:20px; }
.health-metric-content { min-width:0; }
.health-metric-content h3,.health-metric-content>p { padding-left:44px; }
.health-metric-content>p { min-height:18px; margin-bottom:10px; }
.health-metric-value { white-space:normal; overflow-wrap:anywhere; }
.sleep .health-metric-value { font-size:clamp(20px,2.5vw,26px); }
.health-mini { display:block; min-width:0; width:100%; color:var(--tone,#e66b65); }
.health-mini-chart { width:100%; height:auto; display:block; overflow:visible; }
.health-mini-chart polyline { fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.health-mini-chart circle { fill:white; stroke:currentColor; stroke-width:1.5; }
.health-mini-chart rect { fill:currentColor; opacity:.8; }
.mini-empty { display:block; font-size:11px; color:#8a9c90; text-align:center; padding:20px 0; }
.health-refresh { background:none; border:0; padding:8px 0 8px 12px; font-size:11px; color:#728c7d; cursor:pointer; }
.health-date-picker { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:16px; max-width:390px; }
.health-date-picker label { display:flex; flex:1; flex-direction:column; gap:5px; min-width:0; font-size:11px; color:#72877a; }
.health-date-picker input { width:100%; min-height:42px; border:1px solid #dce7de; border-radius:9px; padding:8px 10px; font:inherit; font-size:14px; color:#365446; background:white; }
.health-date-picker button { flex:0 0 38px; min-height:42px; margin-top:19px; background:#e5eee7; color:#46684e; border:1px solid #d8e5da; border-radius:10px; font-size:24px; cursor:pointer; }
.health-date-picker button:disabled { opacity:.35; cursor:default; }
.health-source,.health-future-note { color:#809687; font-size:10px; line-height:1.8; margin:9px 0; }
.health-profile .profile-phone { width:min(100%,390px); min-height:0; padding:36px 24px; display:flex; flex-direction:column; align-items:center; gap:24px; }
.profile-phone .profile-avatar-button,.profile-phone .profile-details,.profile-phone .profile-edit-hint,.profile-phone .profile-account-actions { position:static; }
.profile-phone .profile-details { width:100%; height:auto; text-align:left; min-width:0; }
.profile-nickname-row { white-space:normal; overflow-wrap:anywhere; }
.profile-phone .profile-nickname-row,.profile-phone .profile-id-row { position:static; max-width:100%; overflow:visible; white-space:normal; overflow-wrap:anywhere; margin:8px 0; }
.profile-phone .profile-edit-hint { margin:0; width:auto; text-align:center; }
.profile-phone .profile-account-actions { width:100%; margin-top:20px; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.profile-sheet { width:min(390px,calc(100% - 12px)); height:auto; max-height:calc(100dvh - 12px - env(safe-area-inset-top,0px)); padding:0; bottom:env(safe-area-inset-bottom,0px); }
.profile-sheet .profile-sheet-content { position:relative; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; height:auto; min-height:0; padding:18px 20px 22px; width:100%; }
.profile-sheet-content>* { grid-column:1/-1; min-width:0; }
.profile-sheet-content .profile-handle,.profile-sheet-content .profile-sheet-title,.profile-sheet-content .profile-sheet-avatar,.profile-sheet-content .profile-avatar-note,
.profile-sheet-content .profile-nickname-label,.profile-sheet-content .profile-nickname-input,.profile-sheet-content .profile-nickname-help,
.profile-sheet-content .profile-id-label,.profile-sheet-content .profile-id-input,.profile-sheet-content .profile-readonly-note,
.profile-sheet-content .profile-error,.profile-sheet-content .profile-cancel,.profile-sheet-content .profile-save { position:static; transform:none; width:100%; height:auto; margin:0; }
.profile-sheet-content .profile-handle { width:40px; height:5px; margin:0 auto 4px; }
.profile-sheet-content .profile-sheet-title { font-size:23px; }
.profile-sheet-content .profile-sheet-avatar { width:56px; height:56px; margin:0 auto; }
.profile-sheet-content .profile-avatar-note { text-align:center; font-size:11px; }
.profile-sheet-content .profile-nickname-label,.profile-sheet-content .profile-id-label { font-size:15px; line-height:1.5; }
.profile-sheet-content .profile-nickname-input,.profile-sheet-content .profile-id-input { min-height:46px; font-size:16px; padding:10px 12px; }
.profile-sheet-content .profile-nickname-help,.profile-sheet-content .profile-readonly-note { font-size:11px; text-align:left; }
.profile-sheet-content .profile-cancel,.profile-sheet-content .profile-save { grid-column:auto; padding:11px 8px; min-height:46px; font-size:16px; }
.profile-sheet-content .profile-error { font-size:12px; min-height:0; }
.profile-sheet-content .profile-error:empty { display:none; }
.keyboard-open dialog[open] { top:calc(var(--visual-top,0px) + 8px); bottom:auto; margin-top:0; max-height:calc(var(--visual-height,100dvh) - 16px); }
.admin-accounts { min-width:0!important; width:100%; table-layout:fixed; }
.admin-accounts td,.admin-accounts strong { white-space:normal; overflow-wrap:anywhere; }
.panel-heading>div { min-width:0; }
.panel-heading .btn { flex-shrink:0; white-space:nowrap; }
@media(max-width:600px) {
  .admin-accounts,.admin-accounts tbody { display:block; }
  .admin-accounts thead { display:none; }
  .admin-accounts tbody tr { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; padding:18px; border-bottom:1px solid #e9eeeb; }
  .admin-accounts tbody td { display:flex!important; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:7px; padding:0!important; border:0; width:100%; font-size:12px; }
  .admin-accounts tbody td::before { content:attr(data-label); color:#7f9388; font-size:11px; margin-right:auto; }
  .admin-accounts td strong { max-width:calc(100% - 50px); }
}
@media(max-width:760px) {
  .profile-view .sidebar { position:static; inset:auto; transform:none; width:100%; }
  .profile-view .content { padding-bottom:calc(28px + env(safe-area-inset-bottom,0px)); }
  .auth-story { padding:22px max(18px,env(safe-area-inset-left,0px)); }
  .auth-main { padding:28px max(18px,env(safe-area-inset-right,0px)) calc(64px + env(safe-area-inset-bottom,0px)); }
  .auth-box input,.form-grid input { font-size:16px; }
  .auth-box h2 { font-size:clamp(22px,6vw,27px); }
  .auth-bottom { position:static; margin-top:26px; text-align:center; }
  .auth-main { flex-direction:column; }
  .sidebar nav { flex-wrap:wrap; }
  .sidebar nav a,.sidebar nav button { min-width:0; flex:1 1 auto; }
  .content { padding-left:16px; padding-right:16px; }
  .topbar { padding-left:16px; padding-right:16px; gap:8px; }
  .breadcrumb,.topbar-right { min-width:0; }
  .page-heading { flex-wrap:wrap; gap:16px; }
  .filter-form { flex-wrap:wrap; gap:12px; }
  .filter-form label { flex:1 1 120px; min-width:0; }
  .filter-form input { width:100%; }
  .pagination { flex-wrap:wrap; gap:12px; }
  .dialog-heading { gap:12px; }
  .dialog-footer { flex-wrap:wrap; }
  .dialog-footer .btn { flex:1 1 100px; }
  .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:430px) {
  .health-content { padding-left:16px; padding-right:16px; }
  .health-profile { padding-left:0; padding-right:0; }
  .health-header-inner { padding-left:18px; padding-right:18px; }
  .health-metric { padding:18px; min-height:142px; gap:10px; }
  .health-metric-icon { left:18px; top:20px; }
  .health-metric-value { font-size:27px; }
  .sleep .health-metric-value { font-size:clamp(20px,5.7vw,24px); }
  .health-metric-content h3,.health-metric-content>p { padding-left:42px; }
  .health-metric-content>p { font-size:9px; }
  .health-stat-grid dd { font-size:clamp(19px,5.8vw,23px); overflow-wrap:anywhere; }
  .health-chart-header strong { font-size:clamp(24px,7.3vw,30px); }
  .health-chart-header>p { max-width:115px; }
  .health-date-picker input { font-size:16px; }
  .sleep-stage-labels { flex-wrap:wrap; }
  .health-welcome h1 { font-size:clamp(27px,7.5vw,31px); }
}
@media(max-height:550px) {
  .profile-sheet { max-height:calc(100dvh - 8px); }
  .profile-sheet-content .profile-sheet-avatar,.profile-sheet-content .profile-avatar-note { display:none; }
}

/* 第二轮：卡片紧凑而不裁切内容，标题通过完整短句自然排版。 */
.health-score-card { padding:21px; row-gap:10px; align-self:start; }
.health-score { width:124px; height:124px; }
.health-score strong { font-size:35px; letter-spacing:-1px; }
.health-score>div span { margin-top:2px; }
.health-score-caption { margin-top:12px!important; }
.health-welcome h1 { text-wrap:balance; }
.health-demo { display:inline-flex; padding:3px 7px; border:0; background:transparent; font-size:10px; margin:0; color:#7c9082; }
.health-demo .demo-dot { width:4px; height:4px; }
.health-date-picker button { margin-top:0; align-self:flex-start; }
.health-week-range { display:block; font-size:11px; text-align:center; line-height:1.6; color:#71867a; }
.chart-hit { fill:transparent; cursor:pointer; }
[data-chart-point]:hover .h-point,[data-chart-point]:focus .h-point,[data-chart-point][aria-pressed=true] .h-point { stroke-width:4; }
[data-chart-point]:hover .h-bar,[data-chart-point]:focus .h-bar,[data-chart-point][aria-pressed=true] .h-bar { stroke:currentColor; stroke-width:2; opacity:1; }
.chart-readout { margin-top:14px; padding:10px 12px; min-height:58px; border-radius:10px; background:#f1f6f2; font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.chart-value-picker { display:flex; flex-direction:column; gap:6px; margin-top:10px; font-size:12px; color:#637e6b; }
.chart-value-picker select { width:100%; min-height:44px; font:inherit; border:1px solid #dce7de; border-radius:8px; background:white; color:#345545; padding:8px; }
.family-panel { margin:12px 0 16px; padding:14px 16px; border:1px solid #e1e9e3; border-radius:16px; background:#ffffffb0; }
.family-heading { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.family-heading h2 { font-size:15px; margin:0 0 3px; }
.family-heading p,.family-current { font-size:11px; color:#7b8f83; margin:0; }
.family-heading button,.family-form-actions button,.family-invitations button { min-height:42px; border:1px solid #dce6de; border-radius:9px; color:#3e6d58; background:#eff5ef; padding:8px 12px; cursor:pointer; }
.family-members { display:flex; flex-wrap:wrap; gap:12px; margin:14px 0; }
.family-members>button { display:flex; flex-direction:column; align-items:center; gap:6px; border:0; background:none; color:#5b7564; font:inherit; font-size:12px; max-width:100%; cursor:pointer; padding:3px; }
.family-avatar { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:#e4ede4; color:#668b74; border:2px solid transparent; }
.family-members [aria-pressed=true] .family-avatar { border-color:#519879; background:#d8e9dd; color:#295d45; }
.family-members>button>span:last-child { max-width:100px; overflow-wrap:anywhere; }
.family-dialog { position:fixed; inset:0; margin:auto; width:min(420px,calc(100% - 24px)); padding:24px; border:1px solid #dce6df; border-radius:18px; color:#234d3d; }
.family-dialog::backdrop { background:#183b3080; }
.family-dialog h2 { font-size:22px; margin:0 0 12px; }
.family-dialog form>p { font-size:14px; line-height:1.7; }
.family-dialog label { display:block; font-size:14px; margin:18px 0 8px; }
.family-dialog input { width:100%; min-height:48px; border:1px solid #d4e1d7; border-radius:9px; font:inherit; font-size:16px; padding:10px 12px; }
.family-dialog .family-help { font-size:12px; color:#7b8f83; }
#family-error { color:#af4f48; }
#family-error:empty { display:none; }
.family-form-actions { display:flex; gap:12px; margin-top:18px; }
.family-form-actions button { flex:1; min-height:46px; font:inherit; }
.family-form-actions button[type=submit] { background:#3d8068; color:white; }
.family-invitations { margin-top:24px; border-top:1px solid #e5ede7; padding-top:12px; }
.family-invitations h3 { font-size:15px; }
.family-invitations>div { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:13px; margin:12px 0; }
@media(max-width:600px) {
  .health-welcome h1 { font-size:clamp(23px,6.9vw,29px); line-height:1.35; letter-spacing:-.8px; }
  .health-score-card { padding:19px; }
  .health-score { width:98px; height:98px; }
  .health-score strong { font-size:30px; }
  .health-score-card h2 { font-size:16px; }
  .chart-value-picker select { font-size:16px; }
}

/* 2026-11-08: focused score, compact owner hint and avatar navigation. */
.health-score-card{display:flex!important;flex-direction:column;align-items:center;text-align:center;padding:24px!important;gap:8px!important}
.health-score-card h2{margin:0;font-size:18px}.health-score{width:164px!important;height:164px!important;margin:0!important}.health-score strong{font-size:64px!important;line-height:1.1}.health-score>div{display:flex;flex-direction:column;align-items:center}.health-score span{font-size:14px!important}.score-status{margin:0;color:#617b71;font-size:13px}.health-score-caption{max-width:100%;font-size:12px}.health-score-caption p{text-align:left}.health-coverage{border-top:1px solid #dfebe4;padding-top:12px;width:100%;font-size:13px}.health-coverage p{margin:0 0 8px}.health-coverage ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:6px}.has-record{color:#287d67}.missing-record{color:#6d7c76}.current-health-owner{font-size:12px;color:#647d72;margin:0 0 10px}.avatar-menu{position:relative;margin-left:auto;z-index:20}.avatar-menu summary{cursor:pointer;list-style:none}.avatar-menu summary::-webkit-details-marker{display:none}.avatar-menu nav{position:absolute;right:0;top:46px;min-width:172px;border:1px solid #dce9e0;border-radius:16px;padding:8px;background:#fff;box-shadow:0 12px 36px #173f3120}.avatar-menu nav a{display:block;padding:10px 14px;border-radius:10px}.avatar-menu nav a:hover{background:#eef6ef}.identity-card{padding:14px;border:1px solid #dce9e1;border-radius:14px;background:#f3f8f4;margin:12px 0;min-width:0;grid-column:1/-1}.identity-card>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.identity-card code{overflow-wrap:anywhere;user-select:all;font-size:17px;min-width:0}.identity-card button{flex-shrink:0;padding:8px;border:1px solid #cbded2;border-radius:8px;background:white}.identity-card small{display:block;color:#647b70;margin-top:6px}.family-page>p,.family-page>a{font-size:14px}.h-range{fill:#df726d}.chart-readout{overflow-wrap:anywhere}.chart-readout p{margin:4px 0}.chart-readout details{margin-top:10px}.chart-readout ul{padding-left:20px;max-height:240px;overflow:auto}.sleep-stage-labels button{font:inherit;color:inherit;background:transparent;border:0;display:flex;flex-wrap:wrap;gap:4px;align-items:center;cursor:pointer;padding:8px}.sleep-stages [role=button]{cursor:pointer}.sleep-stages [aria-pressed=true],.sleep-stages [role=button]:focus{stroke:#294a40;stroke-width:2}.avatar-menu a:focus-visible,.identity-card button:focus-visible,.sleep-stage-labels button:focus-visible{outline:2px solid #267a62;outline-offset:2px}
@media(max-width:600px){.health-score-card{padding:20px!important}.health-score{width:148px!important;height:148px!important}.health-intro-grid{gap:14px}.health-score strong{font-size:58px!important}.identity-card>div{align-items:flex-start}.avatar-menu nav{max-width:calc(100vw - 32px)}}

/* Final detail charts: visual ranges and invisible input areas are separate. */
.health-chart-interactive.metric-heart-rate{--range-color:#e46870;--tone:#e46870}
.health-chart-interactive.metric-oxygen{--range-color:#438fda;--tone:#438fda}
.health-chart-interactive .h-range{fill:var(--range-color);stroke:none;stroke-width:0;opacity:1}
.health-chart-interactive .chart-hit{fill:transparent;stroke:none!important;stroke-width:0!important;outline:none;pointer-events:all}
.health-chart-interactive [data-chart-point]{outline:none}
.health-chart-interactive [data-chart-point]:is(:hover,:focus,[aria-pressed=true]) .h-range{fill:var(--range-color);stroke:var(--range-color);stroke-width:2;filter:brightness(.87)}
.sleep-score-card{text-align:center;padding:24px!important;display:flex;flex-direction:column;align-items:center;gap:16px}
.sleep-score-card h2{font-size:16px;font-weight:600;margin:0;color:#71817d}.sleep-score-ring{position:relative;width:176px;height:176px}.sleep-score-ring svg{width:100%;height:100%;transform:rotate(-90deg)}.sleep-score-ring circle{fill:none;stroke-width:10}.sleep-score-track{stroke:#edeaf6}.sleep-score-progress{stroke:#8b7cba;stroke-linecap:round}.sleep-score-ring>div{position:absolute;inset:0;display:flex;align-items:baseline;justify-content:center;padding-top:47px;gap:4px}.sleep-score-ring strong{font-size:52px;line-height:1.5;font-weight:650;letter-spacing:-2px}.sleep-score-ring span{font-size:14px;color:#7b7888}.sleep-score-times{display:grid;grid-template-columns:1fr 1fr;width:100%;max-width:400px}.sleep-score-times>div{display:flex;flex-direction:column;gap:5px}.sleep-score-times>div+div{border-left:1px solid #e9e8ee}.sleep-score-times span{font-size:12px;color:#8a8d94}.sleep-score-times strong{font-size:24px;font-weight:550;letter-spacing:.5px}.sleep-score-card>p{font-size:11px;color:#8b8796;margin:0}
.sleep-day-overview .health-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}.sleep-day-overview .health-stat-grid>div{padding:16px 8px;min-width:0}.sleep-day-overview .health-stat-grid>div:nth-child(-n+2){border-bottom:1px solid #e8ede9}.sleep-day-overview .health-stat-grid>div:nth-child(even){border-left:1px solid #e8ede9}.sleep-day-overview .health-stat-grid dd{font-size:25px;font-weight:600}.sleep-day-overview .health-stat-grid>div:nth-child(n+3) dd{font-size:21px;font-weight:500}.sleep-day-overview .health-stat-grid dt{font-size:12px;color:#819087}
.sleep-timeline{min-width:0}.sleep-timeline svg{display:block;width:100%;height:auto;overflow:visible}.sleep-track{stroke:#edf0f4;stroke-width:1}.sleep-track-label{fill:#78828e;font-size:12px;stroke:none}.sleep-connector{stroke:#a4a8c0;stroke-width:1;opacity:.55}.sleep-interval{stroke:none}.stage-Awake{fill:#ed9b52}.stage-REM{fill:#9c7acb}.stage-Core{fill:#8ec9ef}.stage-Deep{fill:#365c9c}.sleep-hit{fill:transparent;stroke:none;pointer-events:all}.sleep-timeline [data-sleep-segment]{outline:none;cursor:pointer}.sleep-timeline [data-sleep-segment]:is(:focus-visible,[aria-pressed=true]) .sleep-interval{stroke:#435278;stroke-width:2;filter:brightness(.92)}.sleep-stages-missing{background:#f5f7fa;border-radius:14px;padding:16px;text-align:center}.sleep-stages-missing strong{font-size:14px;color:#6e7787}.sleep-stages-missing p,.sleep-timeline-note{font-size:12px;line-height:1.7;color:#88909a;margin-bottom:0}
@media(max-width:430px){.sleep-score-card{padding:20px!important}.sleep-score-ring{width:160px;height:160px}.sleep-score-ring>div{padding-top:42px}.sleep-score-ring strong{font-size:46px}.sleep-day-overview .health-stat-grid dd{font-size:22px}.sleep-day-overview .health-stat-grid>div:nth-child(n+3) dd{font-size:20px}}

.home-sleep-score{grid-column:1/-1;color:#82749d;font-size:11px}
.sleep-quality{width:100%;max-width:400px;border-top:1px solid #eeebf3;padding-top:12px}
.sleep-quality-grid{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.sleep-quality-grid dt,.sleep-quality>p{font-size:12px;color:#696477}
.sleep-quality-grid dd{margin:4px 0 0;font-size:18px;font-weight:650;color:#50436c}
.sleep-quality-demo{display:inline-block;margin-top:10px;padding:3px 8px;border-radius:12px;background:#f1ebfa;color:#634b95;font-size:11px}
.sleep-quality>p{margin:6px 0 0}
.sleep-stage-plot{position:relative}
.sleep-stage-popover{position:absolute;z-index:4;display:grid;gap:3px;width:190px;max-width:100%;padding:10px 12px;border:1px solid #e4deef;border-radius:12px;background:#fff;color:#4e4562;box-shadow:0 4px 16px #42326825;font-size:12px;pointer-events:none}
.sleep-stage-popover[hidden]{display:none}
.sleep-stage-popover strong{font-size:14px}
.sleep-score-full .sleep-score-ring>div{flex-direction:column;align-items:center;justify-content:center;padding:0;gap:0}
.sleep-score-full .sleep-score-ring strong{font-size:38px;line-height:1.2}
.sleep-score-parts{margin:0;width:100%;max-width:440px;text-align:left}
.sleep-score-parts>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 0;border-bottom:1px solid #eeebf3;font-size:13px}
.sleep-score-parts dd{margin:0;font-weight:650;color:#50436c}
.sleep-score-full .sleep-quality-grid{grid-template-columns:1fr}
.sleep-self-review{width:100%;max-width:440px;padding:12px 0;border-block:1px solid #eee7f4}
.sleep-self-review h3{margin:0 0 8px;font-size:14px;font-weight:650;color:#514367}
.sleep-self-review p{margin:7px 0 0;font-size:12px;color:#5b4c70}
.sleep-self-review p span{margin-inline-start:4px;color:#71637f}
.sleep-rating{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.sleep-rating button{min-height:44px;padding:4px 0;border:1px solid #dfd3f0;border-radius:22px;background:#f9f6fd;color:#564575;font:inherit;font-size:12px;white-space:nowrap;cursor:pointer}
.sleep-rating button[aria-pressed=true]{background:#694cad;color:white;border-color:#694cad;font-weight:650}
.sleep-rating button:focus-visible{outline:2px solid #694cad;outline-offset:2px}
.sleep-rating button:disabled{cursor:default}
.sleep-goal-editor form{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap}
.sleep-goal-editor button{min-height:44px;padding:5px 9px;border:1px solid #e3d9f4;border-radius:10px;background:#f9f6fd;color:#564575;font:inherit;font-size:12px;cursor:pointer}
.sleep-goal-editor{font-size:13px;color:#53436d}
.sleep-goal-editor summary{cursor:pointer}
.sleep-goal-editor form{margin-top:8px}

/* Shared measured/aggregate columns with a reserved, unclipped annotation gutter. */
.health-floating-chart{position:relative;min-width:0;isolation:isolate}
.health-floating-chart.metric-steps{--range-color:#63a782;--tone:#63a782}
.health-floating-chart .health-chart{margin:0;width:100%;min-width:0}
.health-floating-chart .health-chart svg{height:284px;width:100%;overflow:visible;touch-action:pan-y}
.health-floating-chart .h-axis{font-size:11px}
.health-floating-chart [hidden]{display:none!important}
.health-floating-chart .chart-column{fill:var(--tone);stroke:none;opacity:.9}
.health-floating-chart.has-selection [aria-pressed=false] .chart-column{opacity:.35}
.health-floating-chart [data-chart-point]:is(:hover,:focus,[aria-pressed=true]) .chart-column{fill:var(--tone);stroke:var(--tone);stroke-width:1;opacity:1;filter:brightness(.9)}
.health-floating-chart .chart-guide{stroke:var(--tone);stroke-width:1;stroke-dasharray:3 3;pointer-events:none;opacity:.7}
.chart-tooltip{position:absolute;z-index:2;top:3px;width:204px;max-width:calc(100% - 8px);min-height:66px;padding:8px 10px;border:1px solid #dfe8e1;border-radius:12px;background:#fff;box-shadow:0 3px 12px #244b3710;color:#37574a;line-height:1.35;pointer-events:auto}
.chart-tooltip::after{content:'';position:absolute;bottom:-4px;left:calc(var(--tip-anchor,50%) - 3px);width:6px;height:6px;transform:rotate(45deg);background:#fff;border-right:1px solid #dfe8e1;border-bottom:1px solid #dfe8e1}
.chart-tooltip-time{font-size:10px;color:#718679;margin:0 0 4px;overflow-wrap:anywhere}
.chart-tooltip-value{display:block;font-size:18px;line-height:1.25;color:var(--tone);font-weight:650}
.chart-tooltip-note{display:block;margin-top:3px;font-size:10px;color:#849589}
.chart-tap-hint{font-size:11px;color:#83978b;margin:10px 0 0;text-align:center}

.chart-tooltip-value small{display:inline-block;font-size:10px;font-weight:400;color:#718679;margin-right:5px;vertical-align:baseline}

/* Sleep week and month share the floating chart, with duration read first. */
.health-floating-chart.metric-sleep .chart-tooltip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.health-floating-chart.metric-sleep .chart-tooltip-value { order: -1; }
.health-floating-chart.metric-sleep .chart-tooltip-time { margin: 0; font-size: 12px; }
.health-floating-chart.metric-sleep .chart-time-tick { font-size: 10px; }
