
  @import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Climate+Crisis&family=Space+Mono:wght@400;700&display=swap');

  #daily-health-preview {
    --paper: #0e0a19;
    --surface: #1b1329;
    --ink: #fff8ff;
    --muted: #cbbadf;
    --line: #48345f;
    --green: #dcff67;
    --green-soft: #303724;
    --blue: #72f9f0;
    --blue-soft: #17343d;
    --pink: #ff8ad6;
    --violet: #c4a0ff;
    --orange: #ffb47c;
    --pool: #112632;
    --pool-ink: #f5fffe;
    --pool-soft: #a1ede7;
    --pool-accent: #83fff1;
    --display: 'Climate Crisis', 'Arial Black', system-ui, sans-serif;
    --numbers: 'Space Mono', 'SFMono-Regular', Consolas, monospace;
    color-scheme: dark;
    box-sizing: border-box;
    padding: clamp(0px, 2vw, 16px);
    font: 15px/1.35 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }
  #daily-health-preview *, #daily-health-preview *::before, #daily-health-preview *::after { box-sizing: inherit; }
  #daily-health-preview [hidden] { display: none !important; }
  #daily-health-preview :is(h1, h2, h3, p) { margin: 0; }
  #daily-health-preview button, #daily-health-preview input, #daily-health-preview select, #daily-health-preview textarea { font: inherit; }
  #daily-health-preview button { color: inherit; touch-action: manipulation; }
  #daily-health-preview button:not(:disabled) { cursor: pointer; }
  #daily-health-preview button:disabled { opacity: .42; }
  #daily-health-preview .dh-phone {
    max-width: 418px;
    margin: auto;
    background: radial-gradient(ellipse at 85% 0%, #32204b 0%, var(--paper) 410px);
    border: 1px solid #66518a;
    border-radius: 24px;
    box-shadow: 0 0 30px #943bdb33;
    overflow: clip;
  }
  #daily-health-preview .dh-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    padding: 15px 16px 9px;
  }
  #daily-health-preview .dh-brand, #daily-health-preview .dh-inline {
    display: inline-flex;
    gap: 8px;
    align-items: center;
  }
  #daily-health-preview .dh-brand { color: var(--pink); font-weight: 800; font-size: 17px; letter-spacing: -.045em; }
  #daily-health-preview .dh-mark { width: 30px; height: 30px; border-radius: 8px; }
  #daily-health-preview .dh-demo { color: var(--muted); font: 11px var(--numbers); }
  #daily-health-preview [data-lucide], #daily-health-preview svg.lucide { width: 17px; height: 17px; flex: none; }
  #daily-health-preview .dh-main { padding: 7px 16px 16px; }
  #daily-health-preview .dh-stack { display: grid; gap: 13px; }
  #daily-health-preview .dh-heading {
    position: relative;
    isolation: isolate;
    display: grid;
    gap: 6px;
    padding: 12px 12px 8px;
    overflow: clip;
    border: 1px solid #8255b4;
    border-radius: 20px 7px 20px 20px;
    background: repeating-linear-gradient(0deg, #b288ff12 0 1px, transparent 1px 8px), linear-gradient(125deg, #30204d 4%, #241440 56%, #49235c);
    box-shadow: inset 0 0 24px #d64ff322;
  }
  #daily-health-preview .dh-heading::before {
    content: '';
    position: absolute;
    z-index: -1;
    right: -70px;
    top: 1px;
    width: 220px;
    height: 78px;
    border-radius: 50%;
    border: 1px solid #ff8ad69e;
    box-shadow: 0 0 0 7px #ff8ad629, 0 0 0 14px #b38cfe24, inset 0 0 18px #ff6ddd56;
    transform: rotate(-35deg);
  }
  #daily-health-preview .dh-heading::after {
    content: '';
    position: absolute;
    z-index: -1;
    right: 23px;
    top: 17px;
    width: 22px;
    height: 22px;
    background: var(--pink);
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  }
  #daily-health-preview h1 { font: 400 clamp(34px, 11.5vw, 55px)/1.02 var(--display); letter-spacing: -.045em; color: #e8ff92; text-shadow: 3px 3px 0 #70468c, 0 0 20px #dcff674c; }
  #daily-health-preview h2 { font-size: 21px; font-weight: 800; line-height: 1.08; letter-spacing: -.045em; }
  #daily-health-preview .dh-day-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 8px; }
  #daily-health-preview .dh-date { color: var(--muted); font: 11px var(--numbers); }
  #daily-health-preview .dh-water-jump { min-height: 44px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #4cc9c15c; border-radius: 9px; background: #13252e; color: var(--blue); text-decoration: none; font-size: 12px; }
  #daily-health-preview .dh-water-jump strong { font-family: var(--numbers); }
  #daily-health-preview .dh-panel { border: 1px solid var(--line); border-radius: 16px 16px 8px 16px; background: var(--surface); padding: 13px; }
  #daily-health-preview .dh-sleep { background: linear-gradient(135deg, #20183a, #151328 82%); border-color: #6d529c; }
  #daily-health-preview .dh-sleep h2 { color: var(--violet); }
  #daily-health-preview .dh-section-end { display: flex; gap: 7px; align-items: center; }
  #daily-health-preview .dh-mascot { position: relative; display: block; width: 40px; height: 35px; flex: none; border-radius: 10px 10px 10px 4px; transform: rotate(8deg); }
  #daily-health-preview .dh-mascot canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; animation: dh-pixel-swap var(--sprite-cycle) steps(1, end) infinite; }
  #daily-health-preview .dh-mascot canvas + canvas { opacity: 0; animation-delay: calc(var(--sprite-cycle) / -2); }
  #daily-health-preview .dh-mascot-sleep { --sprite-cycle: 1.9s; background: #503471; border: 1px solid #af83ff; box-shadow: 0 0 14px #a974fc63; }
  #daily-health-preview .dh-mascot-run { --sprite-cycle: .48s; background: #374026; border: 1px solid #a4ca55; box-shadow: 0 0 13px #cbfb5963; transform: rotate(-7deg); }
  @keyframes dh-pixel-swap {
    0% { opacity: 1; }
    50%, 100% { opacity: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    #daily-health-preview .dh-mascot canvas { animation: none; }
  }
  #daily-health-preview .dh-water {
    color: var(--pool-ink);
    background: radial-gradient(ellipse at 100% 0%, #245057 0%, transparent 68%), var(--pool);
    border: 1px solid #439f9d;
    border-radius: 17px 17px 17px 7px;
    box-shadow: inset 0 0 24px #37ffe31a, 0 0 16px #76fff11c;
    padding: 16px;
    scroll-margin-top: 12px;
  }
  #daily-health-preview .dh-water-main { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
  #daily-health-preview .dh-water-label { font-size: 13px; font-weight: 650; color: var(--pool-soft); }
  #daily-health-preview .dh-water-value { display: block; font: 700 clamp(31px, 8vw, 44px)/1.1 var(--numbers); letter-spacing: -.07em; margin: 3px 0; white-space: nowrap; color: var(--pool-accent); text-shadow: 0 0 15px #83fff16b; }
  #daily-health-preview .dh-water-total { color: var(--pool-soft); font-size: 12px; }
  #daily-health-preview .dh-ring {
    --percent: 50%;
    --core: #173944;
    background: conic-gradient(var(--pool-accent) var(--percent), #ffffff2b var(--percent));
    width: clamp(62px, 18vw, 83px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    flex: none;
    box-shadow: 0 0 14px #72f9f052;
  }
  #daily-health-preview .dh-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--core); }
  #daily-health-preview .dh-ring span { position: relative; font: 700 15px var(--numbers); }
  #daily-health-preview .dh-water-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
  #daily-health-preview .dh-water-quick button {
    min-height: 44px;
    border-radius: 11px;
    border: 1px solid #71f9ef66;
    background: #74fff012;
    color: var(--pool-accent);
    font-size: 13px;
    font-weight: 680;
  }
  #daily-health-preview .dh-water-quick button:hover { background: #74fff030; }
  #daily-health-preview #dh-meals { border-color: #8f477d; background: linear-gradient(135deg, #2b1733, var(--surface)); }
  #daily-health-preview #dh-meals h2 { color: var(--pink); }
  #daily-health-preview .dh-numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 11px; }
  #daily-health-preview .dh-nutrition-item { padding: 9px; border-radius: 11px; background: var(--paper); min-width: 0; }
  #daily-health-preview .dh-stat-name { line-height: 1.25; font-size: 13px; font-weight: 660; color: var(--muted); }
  #daily-health-preview .dh-stat-number { display: block; font: 700 22px/1.3 var(--numbers); letter-spacing: -.07em; margin: 5px 0 8px; white-space: nowrap; }
  #daily-health-preview .dh-stat-number small { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 12px; font-weight: 550; color: var(--muted); letter-spacing: 0; }
  #daily-health-preview .dh-meter { height: 5px; border-radius: 5px; overflow: hidden; background: var(--line); }
  #daily-health-preview .dh-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); }
  #daily-health-preview .dh-meter.dh-energy span { background: var(--orange); }
  #daily-health-preview .dh-section-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 9px; }
  #daily-health-preview .dh-section-title small { color: var(--muted); font-size: 12px; }
  #daily-health-preview .dh-core { background: linear-gradient(135deg, #321d47, #261735 85%); border-color: #945aa6; }
  #daily-health-preview .dh-core h2 { color: var(--pink); }
  #daily-health-preview .dh-compare { width: 100%; table-layout: fixed; border-collapse: collapse; border-spacing: 0; text-align: left; font-size: 12px; }
  #daily-health-preview .dh-compare tr > :first-child { width: 32%; }
  #daily-health-preview .dh-compare tr > * { padding: 7px 4px; vertical-align: middle; overflow-wrap: anywhere; }
  #daily-health-preview .dh-compare tr > :first-child { padding-left: 0; }
  #daily-health-preview .dh-compare thead th { font-weight: 700; padding-top: 0; }
  #daily-health-preview .dh-compare tbody tr > * { border-top: 1px solid var(--line); }
  #daily-health-preview .dh-compare tbody th { color: var(--muted); font-weight: 650; }
  #daily-health-preview .dh-compare strong { display: block; font: 700 clamp(12px, 3.7vw, 16px)/1.25 var(--numbers); letter-spacing: -.055em; }
  #daily-health-preview .dh-compare small { display: block; font-size: 11px; color: var(--muted); }
  #daily-health-preview .dh-compare tbody tr:last-child > * { padding-bottom: 0; }
  #daily-health-preview .dh-source { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--green); }
  #daily-health-preview .dh-source::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  #daily-health-preview .dh-source-apple { color: var(--blue); }
  #daily-health-preview .dh-source-apple::before { border-radius: 1px; }
  #daily-health-preview .dh-detail-table strong { font-size: 13px; letter-spacing: 0; }
  #daily-health-preview .dh-detail-table + .dh-detail-table { margin-top: 10px; }
  #daily-health-preview .dh-exercises { margin: 0; padding: 0; list-style: none; }
  #daily-health-preview #dh-exercise { background: linear-gradient(115deg, #272d24, #1b2123); border-color: #819a49; }
  #daily-health-preview #dh-exercise h2 { color: var(--green); }
  #daily-health-preview #dh-exercise .dh-section-title small { color: #dfedbc; }
  #daily-health-preview .dh-checkin-list { margin: 0; }
  #daily-health-preview :is(.dh-exercises li, .dh-checkin-list > div) { display: flex; justify-content: space-between; gap: 9px; align-items: baseline; border-top: 1px solid var(--line); padding: 7px 0; font-size: 13px; }
  #daily-health-preview :is(.dh-exercises li, .dh-checkin-list > div):last-child { padding-bottom: 0; }
  #daily-health-preview .dh-exercises li > div { min-width: 0; overflow-wrap: anywhere; }
  #daily-health-preview .dh-exercise-sources { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
  #daily-health-preview .dh-exercises li > strong { white-space: nowrap; }
  #daily-health-preview .dh-checkin-list dt { color: var(--muted); }
  #daily-health-preview .dh-checkin-list dd { margin: 0; font-weight: 680; }
  #daily-health-preview .dh-dock {
    position: sticky;
    bottom: 0;
    z-index: 2;
    border-top: 1px solid #8f6ab6;
    padding: 9px 12px 11px;
    background: #180f26;
    box-shadow: 0 -5px 20px #07030b8c;
  }
  #daily-health-preview .dh-dock-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  #daily-health-preview .dh-dock-actions button {
    border: 1px solid #ff8ad6a8;
    background: #25132c;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 11px 11px 4px 11px;
    color: var(--pink);
    font-size: 13px;
    font-weight: 680;
    padding: 4px 6px;
    white-space: nowrap;
  }
  #daily-health-preview #dh-open-voice { color: #202721; background: var(--green); border-color: var(--green); box-shadow: 0 0 16px #d7ff6e5e; }
  #daily-health-preview .dh-dock .dh-entry-status { margin: 0 2px 6px; color: var(--green); font-size: 12px; font-weight: 650; }
  #daily-health-preview .dh-feedback { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--pool-accent); font-size: 13px; margin-top: 4px; }
  #daily-health-preview .dh-link { background: transparent; border: 0; min-height: 44px; font-weight: 680; padding: 0 6px; }
  #daily-health-preview .dh-editor { scroll-margin-top: 12px; }
  #daily-health-preview .dh-form { display: grid; gap: 10px; }
  #daily-health-preview .dh-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #daily-health-preview .dh-field { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 13px; font-weight: 650; }
  #daily-health-preview :is(input:not([type="checkbox"]), textarea, select) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink);
    background: var(--surface);
    font-size: 16px;
    font-weight: 450;
  }
  #daily-health-preview textarea { resize: vertical; min-height: 63px; }
  #daily-health-preview .dh-capture { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  #daily-health-preview .dh-capture button, #daily-health-preview .dh-save {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 7px 5px;
    border: 0;
    border-radius: 12px;
    color: var(--ink);
    background: var(--surface);
    font-weight: 700;
  }
  #daily-health-preview .dh-capture button { font-size: 12px; border: 1px solid var(--line); }
  #daily-health-preview #dh-sample { color: var(--green); background: var(--green-soft); border-color: transparent; }
  #daily-health-preview .dh-save { color: #202721; background: var(--green); }
  #daily-health-preview .dh-details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  #daily-health-preview .dh-details summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; cursor: pointer; font-size: 13px; font-weight: 700; }
  #daily-health-preview .dh-details summary::-webkit-details-marker { display: none; }
  #daily-health-preview .dh-details[open] summary > svg { transform: rotate(180deg); }
  #daily-health-preview .dh-details-body { display: grid; gap: 10px; padding: 0 12px 12px; }
  #daily-health-preview .dh-supplements { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
  #daily-health-preview .dh-supplements legend { color: var(--muted); font-size: 13px; font-weight: 650; }
  #daily-health-preview .dh-supplements label { display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: 13px; }
  #daily-health-preview .dh-supplements input { accent-color: var(--green); margin: 0; }
  #daily-health-preview .dh-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 6px; padding: 0; margin: 0; list-style: none; }
  #daily-health-preview .dh-photo { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: clip; }
  #daily-health-preview .dh-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; color: var(--blue); background: var(--blue-soft); }
  #daily-health-preview .dh-thumb img { grid-area: 1 / 1; width: 100%; height: 100%; max-height: 128px; object-fit: cover; }
  #daily-health-preview .dh-photo-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted); padding: 5px 6px; }
  #daily-health-preview .dh-photo-remove { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--line); background: transparent; min-height: 44px; font-size: 11px; font-weight: 650; }
  #daily-health-preview .dh-meal { display: grid; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
  #daily-health-preview .dh-meal:last-child { padding-bottom: 0; }
  #daily-health-preview .dh-meal-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
  #daily-health-preview .dh-meal strong { display: block; font-size: 13px; }
  #daily-health-preview .dh-meal small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
  #daily-health-preview .dh-meal-head > small { text-align: right; white-space: nowrap; }
  #daily-health-preview .dh-chart-head { display: flex; gap: 8px; }
  #daily-health-preview .dh-chart-head select { flex: 1; min-width: 0; }
  #daily-health-preview .dh-chart-stat { display: block; margin: 13px 0 2px; font-size: 31px; line-height: 1; letter-spacing: -.05em; font-weight: 720; }
  #daily-health-preview .dh-chart-note { font-size: 12px; color: var(--muted); }
  #daily-health-preview .dh-chart { position: relative; margin: 13px 0 6px; }
  #daily-health-preview .dh-chart svg { display: block; width: 100%; height: 92px; overflow: visible; }
  #daily-health-preview .dh-chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
  #daily-health-preview .dh-chart-path { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  #daily-health-preview .dh-chart-dot { fill: var(--green); }
  #daily-health-preview .dh-chart[data-source="apple"] :is(.dh-chart-path, .dh-chart-dot) { color: var(--blue); }
  #daily-health-preview .dh-chart[data-source="apple"] .dh-chart-path { stroke: currentColor; }
  #daily-health-preview .dh-chart[data-source="apple"] .dh-chart-dot { fill: currentColor; }
  #daily-health-preview .dh-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
  #daily-health-preview .dh-days button { min-width: 0; min-height: 44px; background: transparent; border: 0; border-radius: 9px; padding: 0; color: var(--muted); font-size: 12px; }
  #daily-health-preview .dh-days button[aria-pressed="true"] { background: var(--green-soft); color: var(--green); font-weight: 750; }
  #daily-health-preview .dh-trend-body { display: block; }
  #daily-health-preview .dh-error { color: #ffc0ce; font-size: 13px; }
  @media (max-width: 365px) {
    #daily-health-preview .dh-top, #daily-health-preview .dh-main { padding-left: 13px; padding-right: 13px; }
    #daily-health-preview .dh-numbers { gap: 6px; }
    #daily-health-preview .dh-nutrition-item { padding: 7px; }
    #daily-health-preview .dh-stat-number { font-size: 21px; }
    #daily-health-preview .dh-stat-number small { display: block; margin-top: 2px; font-size: 11px; }
    #daily-health-preview .dh-compare tr > :first-child { width: 29%; }
    #daily-health-preview .dh-source { white-space: normal; font-size: 11px; }
    #daily-health-preview .dh-source::before { display: none; }
    #daily-health-preview .dh-dock-actions button { gap: 4px; padding-inline: 4px; font-size: 12px; }
  }

body { margin: 0; background: #100b1c; color: #fff8ff; }
.dh-gate { max-width: 418px; margin: 12vh auto 0; padding: 18px; color: #fff8ff; font: 16px system-ui,sans-serif; }
.dh-gate h1 { font-size: 28px; }
#daily-health-preview .dh-review { margin: 8px 0; display: grid; gap: 8px; }
#daily-health-preview .dh-review button { min-height: 44px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-align: left; }
#daily-health-preview .dh-entry-status a { color: var(--blue); }

.dh-gate button { min-height: 44px; border: 0; padding: 10px 16px; border-radius: 8px; font-weight: 700; color: #202721; background: #dcff67; }
#daily-health-preview .dh-header-links { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: end; }

.dh-gate form:not([hidden]) { display: grid; gap: 12px; max-width: 360px; }
.dh-gate input { min-height: 44px; box-sizing: border-box; width: 100%; border: 1px solid #776795; border-radius: 8px; background: #1b1428; color: white; padding: 8px 12px; font: inherit; }
