:root {
  color-scheme: light;
  --ink: #292725;
  --muted: #68635e;
  --paper: #f7f4ef;
  --card: #fffdf9;
  --coral: #e97967;
  --coral-soft: #f7d5cc;
  --lilac: #d9d1ee;
  --mint: #d4e7df;
  --line: #e8e1d8;
  --shadow: 0 18px 50px rgba(63, 48, 37, 0.08);
  --radius-sm: 13px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; min-width: 0; }
html {
  height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  height: 100%;
  overflow: hidden;
  background: #e9e3da;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; }
button {
  overflow: hidden;
  border-radius: inherit;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .18s var(--ease), background-color .18s ease, color .18s ease, box-shadow .18s ease, opacity .18s ease;
}
button:active { transform: scale(.97); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(233,121,103,.28);
  outline-offset: 2px;
}

.app-shell {
  position: relative;
  display: grid;
  height: 100dvh;
  width: min(100%, 480px);
  grid-template-rows: auto minmax(0, 1fr);
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 0%, rgba(233, 121, 103, 0.13), transparent 28%),
    var(--paper);
}

.topbar {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(22px + env(safe-area-inset-top)) 22px 14px;
}
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.settings-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-size: 16px;
}
.settings-button svg { width: 19px; height: 19px; overflow: visible; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.eyebrow {
  display: block;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 28px; font-weight: 760; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: 19px; font-weight: 740; letter-spacing: -.025em; }

.avatar {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-weight: 750;
}

main {
  min-height: 0;
  padding: 4px 18px calc(100px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  scrollbar-color: rgba(41,39,37,.18) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
main::-webkit-scrollbar { width: 5px; }
main::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(41,39,37,.16); }
.screen { display: none; animation: reveal .36s var(--ease); }
.screen.active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } }

.hero-card {
  display: flex;
  min-height: 170px;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 18px;
  padding: 24px;
  overflow: hidden;
  border-radius: 30px;
  background: #322f2c;
  color: white;
  box-shadow: var(--shadow);
}

.hero-card h2 { width: 210px; margin: 8px 0 10px; font-size: 29px; font-weight: 730; line-height: 1.05; letter-spacing: -.035em; }
.hero-card p { max-width: 230px; margin: 0; color: #d8d1c9; font-size: 13px; line-height: 1.45; }
.hero-label { color: #eba999; font-size: 12px; font-weight: 700; }
.hero-side { display: grid; flex: 0 0 auto; justify-items: end; gap: 13px; }
.universal-add {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-content: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: white;
  font-size: 25px;
}

.day-orbit {
  display: grid;
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  place-content: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  text-align: center;
  box-shadow: 0 0 0 12px rgba(255,255,255,.045);
}
.day-orbit strong { font-family: Georgia, serif; font-size: 30px; line-height: 1; }
.day-orbit span { margin-top: 4px; color: #d8d1c9; font-size: 10px; text-transform: uppercase; }

.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-card {
  display: flex;
  min-width: 0;
  padding: 14px 12px;
  flex-direction: column;
  align-items: flex-start;
  border: 0;
  border-radius: 20px;
  text-align: left;
}
.quick-card.coral { background: var(--coral-soft); }
.quick-card.lilac { background: var(--lilac); }
.quick-card.mint { background: var(--mint); }
.quick-card.sand { background: #efe3cf; }
.quick-icon { display: grid; width: 28px; height: 28px; margin-bottom: 13px; place-content: center; border-radius: 50%; background: rgba(255,255,255,.6); font-weight: 800; }
.quick-card strong { font-size: 13px; }
.quick-card small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 12px; }
.text-button { border: 0; background: transparent; color: var(--coral); font-size: 12px; font-weight: 700; }
.round-add { display: grid; width: 32px; height: 32px; padding: 0; place-content: center; border: 0; border-radius: 50%; background: var(--ink); color: white; font-size: 20px; }

.timeline, .stack-list { display: grid; gap: 10px; }
.empty-state { padding: 24px; border: 1px dashed #d8cec2; border-radius: 20px; color: var(--muted); text-align: center; font-size: 13px; }
.action-empty strong,
.action-empty span { display: block; }
.action-empty strong { color: var(--ink); font-size: 13px; }
.action-empty span { margin-top: 6px; font-size: 10px; line-height: 1.45; }
.action-empty div { display: flex; margin-top: 13px; justify-content: center; gap: 8px; }
.action-empty button { padding: 8px 11px; border: 0; border-radius: 11px; background: #ebe5dd; color: var(--ink); font-size: 10px; font-weight: 750; }
.list-card {
  display: flex;
  width: 100%;
  max-width: 100%;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  padding: 15px;
  border: 1px solid rgba(224, 215, 204, .75);
  border-radius: 20px;
  background: var(--card);
}
.list-card .marker { width: 5px; height: 38px; border-radius: 6px; background: var(--coral); }
.list-card .marker.health { background: #917db9; }
.list-card .marker.money { background: #70a28d; }
.list-card .marker.todo { background: #8f78b0; }
.list-main { min-width: 0; flex: 1; }
.list-main strong, .list-main span { display: block; }
.list-main strong { overflow: hidden; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; text-overflow: ellipsis; white-space: nowrap; }
.list-main span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.list-value { font-size: 13px; font-weight: 750; }
.medicine-check { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; background: white; }
.medicine-check.done { border-color: #70a28d; background: #70a28d; color: white; }

.balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.balance-card span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.balance-card strong { font-size: 26px; font-weight: 730; letter-spacing: -.03em; }
.budget-ring { display: grid; width: 65px; height: 65px; place-content: center; border-radius: 50%; background: conic-gradient(var(--coral) var(--progress, 0%), #eee7df 0); }
.budget-ring::before { position: absolute; content: ""; }
.budget-ring span { display: grid; width: 49px; height: 49px; margin: 0; place-content: center; border-radius: 50%; background: var(--card); color: var(--ink); font-weight: 700; }

.month-control { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 14px; }
.month-title-group { display: grid; justify-items: center; gap: 3px; }
.month-control h2 { font-size: 25px; font-weight: 740; text-transform: capitalize; }
.month-control button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: white; font-size: 25px; }
.month-control .calendar-today-button { width: auto; height: auto; min-height: 0; padding: 3px 8px; border-radius: 99px; background: transparent; color: var(--coral); font-size: 10px; font-weight: 750; }
.calendar-card { padding: 17px 12px; border-radius: 25px; background: var(--card); box-shadow: var(--shadow); }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekdays span { padding-bottom: 10px; color: var(--muted); font-size: 10px; text-align: center; }
.calendar-day { position: relative; display: grid; aspect-ratio: 1; padding: 3px; place-content: center; border: 0; border-radius: 50%; background: transparent; font-size: 12px; }
.calendar-day.muted { color: #c6beb5; }
.calendar-day.today { box-shadow: inset 0 0 0 1px var(--coral); }
.calendar-day.selected { background: var(--ink); color: white; }
.calendar-dots { position: absolute; right: 3px; bottom: 4px; left: 3px; display: flex; justify-content: center; gap: 2px; }
.calendar-dots i,
.calendar-legend i { width: 4px; height: 4px; border-radius: 50%; background: var(--coral); }
.calendar-dots .todo,
.calendar-legend .todo { background: #8f78b0; }
.calendar-dots .health,
.calendar-legend .health { background: #cf8fa6; }
.calendar-dots .money,
.calendar-legend .money { background: #70a28d; }
.calendar-day.selected .calendar-dots i { box-shadow: 0 0 0 1px rgba(255,255,255,.7); }
.calendar-legend { display: flex; margin-top: 13px; flex-wrap: wrap; justify-content: center; gap: 7px 12px; color: var(--muted); font-size: 9px; }
.calendar-legend span { display: flex; align-items: center; gap: 5px; }
.calendar-legend i { width: 7px; height: 7px; }

.health-tabs {
  position: sticky;
  z-index: 7;
  top: -4px;
  display: flex;
  margin: 0 -4px 14px;
  padding: 5px;
  overflow-x: auto;
  gap: 5px;
  border: 1px solid rgba(232,225,216,.8);
  border-radius: 17px;
  background: rgba(247,244,239,.92);
  backdrop-filter: blur(16px);
  scrollbar-width: none;
}
.health-tabs::-webkit-scrollbar { display: none; }
.health-tabs button {
  min-width: max-content;
  padding: 10px 13px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.health-tabs button.active { background: var(--ink); color: white; box-shadow: 0 7px 18px rgba(41,39,37,.14); }
.health-panel { display: none; }
.health-panel.active { display: block; animation: reveal .3s var(--ease); }
.health-today-hero,
.health-section-hero {
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(135deg, #dcece5, #f3e2dd);
}
.health-today-hero { display: flex; min-height: 150px; align-items: center; justify-content: space-between; gap: 18px; }
.health-today-hero h2,
.health-section-hero h2 { margin: 7px 0 8px; font-size: 25px; }
.health-today-hero p,
.health-section-hero p { max-width: 270px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.health-score { display: grid; width: 76px; height: 76px; flex: 0 0 76px; place-content: center; border-radius: 50%; background: rgba(255,255,255,.7); text-align: center; }
.health-score strong { font-size: 25px; line-height: 1; }
.health-score span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.health-form-card {
  display: grid;
  margin-top: 12px;
  padding: 18px;
  gap: 13px;
  border-radius: 23px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.form-section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.form-section-label strong { font-size: 13px; }
.form-section-label span { color: var(--muted); font-size: 9px; text-align: right; }
.health-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.health-form-grid label,
.report-month-label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.health-section-hero { margin-top: 2px; background: linear-gradient(135deg, #e4d9ef, #f5ebe4); }
.metric-latest,
.report-summary { display: grid; margin-top: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.metric-latest article,
.report-summary article { padding: 15px; border-radius: 18px; background: var(--card); }
.metric-latest span,
.metric-latest strong,
.report-summary span,
.report-summary strong { display: block; }
.metric-latest span,
.report-summary span { margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.metric-latest strong,
.report-summary strong { font-size: 14px; }
.health-chart { display: grid; gap: 13px; padding: 18px; border-radius: 23px; background: var(--card); box-shadow: var(--shadow); }
.chart-block + .chart-block { padding-top: 14px; border-top: 1px solid var(--line); }
.chart-block > div:first-child { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.chart-block > div:first-child strong { font-size: 12px; }
.chart-block > div:first-child span { color: var(--muted); font-size: 9px; }
.bar-chart { display: flex; height: 105px; align-items: end; gap: 3px; overflow-x: auto; }
.bar-column { display: grid; min-width: 13px; height: 100%; flex: 1 0 13px; grid-template-rows: minmax(0, 1fr) 13px; align-items: end; gap: 4px; }
.bar-column span { display: block; width: 100%; height: var(--bar-height); min-height: 4px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #8d78ad, #cf8fa6); }
.bar-column small { color: var(--muted); font-size: 7px; text-align: center; }
.emergency-card {
  display: flex;
  min-height: 145px;
  padding: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 27px;
  background: #302e2b;
  color: white;
}
.emergency-card h2 { margin: 6px 0 8px; font-size: 23px; }
.emergency-card p { margin: 0; color: #cfc7be; font-size: 10px; }
.emergency-card > strong { display: grid; width: 68px; height: 68px; flex: 0 0 68px; place-content: center; border-radius: 21px; background: rgba(255,255,255,.12); font-size: 16px; text-align: center; }
.medical-record-card { padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.medical-record-top { display: flex; align-items: center; justify-content: space-between; }
.medical-record-top span { color: #775f98; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.medical-record-top button { width: 27px; height: 27px; border: 0; border-radius: 50%; background: #f5d8d2; color: #a64537; font-size: 16px; }
.medical-record-card h3 { margin: 9px 0 5px; font-size: 14px; }
.medical-record-card p { margin: 0; color: var(--muted); font-size: 10px; }
.medical-record-card > div:not(.medical-record-top) { margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; white-space: pre-wrap; }
.medical-templates { display: flex; margin: -2px -2px 2px; padding: 2px; overflow-x: auto; gap: 7px; scrollbar-width: none; }
.medical-templates::-webkit-scrollbar { display: none; }
.medical-templates button { flex: 0 0 auto; padding: 9px 11px; border: 0; border-radius: 12px; background: #eee8f6; color: #66577d; font-size: 9px; font-weight: 750; }
.custom-file-field { position: relative; }
.custom-file-field input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.custom-file-button { display: grid; min-height: 46px; padding: 10px 12px; place-content: center; border: 1px dashed #cbbfb3; border-radius: 13px; background: #f7f2ec; color: var(--ink); font-size: 10px; text-align: center; cursor: pointer; }
.custom-file-field small { color: var(--muted); font-size: 8px; font-weight: 500; }
.trust-note { margin: 12px 3px 16px; padding: 12px 14px; border-radius: 15px; background: #f3ece5; }
.report-month-label { margin: 13px 0; padding: 15px; border-radius: 18px; background: var(--card); }
.correlation-list { display: grid; gap: 9px; margin-bottom: 14px; }
.correlation-list article { padding: 14px 16px; border-left: 4px solid #8d78ad; border-radius: 5px 17px 17px 5px; background: var(--card); color: var(--muted); font-size: 11px; line-height: 1.5; }
.integration-card { position: relative; margin-top: 14px; padding: 18px; overflow: hidden; border-radius: 22px; background: #e8e3f2; }
.integration-card strong { font-size: 13px; }
.integration-card p { margin: 8px 0 13px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.integration-card span { display: inline-block; padding: 6px 9px; border-radius: 99px; background: white; color: #775f98; font-size: 9px; font-weight: 750; }

.cycle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 190px;
  margin-top: 8px;
  padding: 24px;
  border-radius: 30px;
  background: linear-gradient(135deg, #e4d9ef, #f4e1dd);
}
.pill { display: inline-block; padding: 5px 9px; border-radius: 20px; background: rgba(255,255,255,.55); font-size: 10px; font-weight: 750; }
.cycle-copy h2 { margin: 15px 0 7px; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.cycle-copy p { max-width: 175px; margin: 0; color: #665e68; font-size: 12px; line-height: 1.4; }
.cycle-visual { display: grid; width: 91px; height: 91px; place-content: center; border-radius: 50%; background: conic-gradient(#8d78ad var(--cycle-progress, 0%), rgba(255,255,255,.48) 0); text-align: center; }
.cycle-visual::before { position: absolute; content: ""; }
.cycle-visual span, .cycle-visual small { position: relative; z-index: 1; }
.cycle-visual span { font-family: Georgia, serif; font-size: 30px; line-height: 1; }
.cycle-visual small { margin-top: 3px; font-size: 10px; }
.cycle-visual::after { position: absolute; content: ""; }

.health-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.health-stats article { padding: 16px; border-radius: 20px; background: var(--card); }
.health-stats span, .health-stats strong { display: block; }
.health-stats span { margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.health-stats strong { font-size: 14px; }
.medical-note { margin: 10px 4px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.cycle-calendar-card,
.cycle-log-card,
.cycle-insight-card {
  width: 100%;
  padding: 18px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.cycle-month-control { display: grid; align-items: center; grid-template-columns: 38px 1fr 38px; gap: 8px; }
.cycle-month-control strong { font-size: 16px; text-align: center; text-transform: capitalize; }
.cycle-month-control button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f0eae4; font-size: 24px; }
.cycle-weekdays,
.cycle-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cycle-weekdays { margin-top: 14px; }
.cycle-weekdays span { padding-bottom: 7px; color: var(--muted); font-size: 9px; text-align: center; }
.cycle-calendar-day {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  font-size: 11px;
}
.cycle-calendar-day.muted { color: #c6beb5; opacity: .66; }
.cycle-calendar-day.fertile-day { background: #dcece5; }
.cycle-calendar-day.predicted-period { background: #f4dce6; }
.cycle-calendar-day.actual-period { background: #cf8fa6; color: white; font-weight: 750; }
.cycle-calendar-day.today { border-color: var(--ink); }
.cycle-calendar-day.selected { box-shadow: 0 0 0 3px rgba(41,39,37,.13); }
.cycle-calendar-day.has-cycle-log::after {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border: 1px solid white;
  border-radius: 50%;
  background: #6f5b91;
  content: "";
}
.cycle-legend { display: flex; margin-top: 13px; flex-wrap: wrap; gap: 8px 13px; color: var(--muted); font-size: 9px; }
.cycle-legend span { display: flex; align-items: center; gap: 5px; }
.cycle-legend i { width: 9px; height: 9px; border-radius: 50%; background: #ddd; }
.cycle-legend .actual { background: #cf8fa6; }
.cycle-legend .predicted { background: #f4dce6; }
.cycle-legend .fertile { background: #dcece5; }
.cycle-legend .logged { background: #6f5b91; }
.cycle-log-card { display: grid; gap: 14px; margin-top: 12px; }
.cycle-log-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cycle-log-heading h2 { font-size: 18px; text-transform: capitalize; }
.period-start-button { padding: 9px 11px; border: 0; border-radius: 12px; background: #f4dce6; color: #8b405b; font-size: 9px; font-weight: 750; }
.period-start-button.active { background: #cf8fa6; color: white; }
.cycle-log-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cycle-log-grid label,
.cycle-note-label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.choice-field { margin: 0; padding: 11px; border: 1px solid var(--line); border-radius: 16px; }
.choice-field legend { padding: 0 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.choice-grid label { display: block; }
.choice-grid input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice-grid span {
  display: grid;
  min-height: 36px;
  padding: 8px 10px;
  place-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f1ece6;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.choice-grid input:checked + span { border-color: rgba(111,91,145,.25); background: #e4d9ef; color: #4d3f64; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.choice-grid input:focus-visible + span { outline: 3px solid rgba(233,121,103,.28); outline-offset: 2px; }
.symptom-picker { display: flex; margin: 0; padding: 12px; flex-wrap: wrap; gap: 9px; border: 1px solid var(--line); border-radius: 15px; }
.symptom-picker legend { padding: 0 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.symptom-picker label { display: flex; align-items: center; gap: 5px; padding: 7px 9px; border-radius: 99px; background: #f1ece6; font-size: 9px; }
.symptom-picker input { width: 14px; height: 14px; padding: 0; accent-color: #8d78ad; }
.cycle-insight-card { margin-top: 12px; background: linear-gradient(135deg, #eee8f6, #f8ede9); box-shadow: none; }
.cycle-insight-card strong { font-size: 13px; }
.cycle-insight-card p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.cycle-history { display: grid; gap: 8px; }
.cycle-history article { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 17px; background: var(--card); }
.cycle-history article div { min-width: 0; flex: 1; }
.cycle-history strong,
.cycle-history span { display: block; }
.cycle-history strong { font-size: 12px; text-transform: capitalize; }
.cycle-history span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.cycle-history button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #f5d8d2; color: #a64537; font-size: 17px; }
.nutrition-card { padding: 19px; border-radius: 24px; background: #f0e6d8; }
.calorie-summary { display: flex; align-items: center; justify-content: space-between; }
.calorie-summary span, .calorie-summary strong, .calorie-summary small { display: block; }
.calorie-summary span { color: var(--muted); font-size: 10px; }
.calorie-summary strong { margin: 4px 0 1px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.calorie-summary small { color: var(--muted); font-size: 9px; }
.calorie-ring { display: grid; width: 62px; height: 62px; place-content: center; border-radius: 50%; background: conic-gradient(var(--coral) var(--calories, 0%), rgba(255,255,255,.7) 0); }
.calorie-ring span { display: grid; width: 47px; height: 47px; place-content: center; border-radius: 50%; background: #f0e6d8; color: var(--ink); font-size: 11px; font-weight: 750; }
.macro-grid { display: grid; margin-top: 16px; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.macro-grid div { padding: 10px; border-radius: 13px; background: rgba(255,255,255,.55); }
.macro-grid span, .macro-grid strong { display: block; }
.macro-grid span { margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.macro-grid strong { font-size: 11px; }
.compact-list { margin-top: 10px; }
.bmi-preview { display: grid; padding: 14px 15px; gap: 4px; border-radius: 17px; background: linear-gradient(135deg, #e4d9ef, #f4e7df); }
.bmi-preview span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.bmi-preview strong { font-size: 16px; }
.bmi-preview small { color: var(--muted); font-size: 9px; line-height: 1.4; }

.settings-card { display: grid; gap: 13px; padding: 18px; border-radius: 22px; background: var(--card); }
.settings-card label, #dynamic-fields label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 650; }
input, select, textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: white;
  color: var(--ink);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(233,121,103,.12); }
.primary-button { width: 100%; padding: 14px; border: 0; border-radius: 15px; background: var(--ink); color: white; font-weight: 750; }
.three-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.checkbox-label { display: flex !important; align-items: center; gap: 9px !important; }
.checkbox-label input { width: 18px; height: 18px; padding: 0; }
.medicine-actions { display: grid; gap: 4px; }
.medicine-actions button { padding: 6px 8px; border: 0; border-radius: 8px; background: #eee8e1; color: var(--muted); font-size: 10px; font-weight: 750; }
.medicine-actions button.selected { background: var(--ink); color: white; }
.item-actions { display: flex; flex: 0 0 auto; gap: 5px; }
.action-cluster { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.item-actions button,
.delete-cross {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  place-content: center;
  border: 0;
  border-radius: 50%;
  background: #f5ded9;
  color: #a64537;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
}
.item-actions button[data-delete-event],
.item-actions button[data-delete-item] { background: #f7e1dc; color: #a64537; }
.stock-warning { color: #c85e4e !important; font-weight: 700; }

.organizer-hero { padding: 24px; border-radius: 28px; background: linear-gradient(135deg, #302e2b, #554d49); color: white; box-shadow: var(--shadow); }
.organizer-hero .eyebrow { color: #d8cec5; }
.organizer-hero h2 { margin: 8px 0 9px; font-size: 27px; }
.organizer-hero p { margin: 0; color: #ddd5cf; font-size: 13px; line-height: 1.5; }
.organizer-grid { display: grid; margin-top: 15px; gap: 16px; }
.organizer-group { display: grid; gap: 8px; }
.organizer-group > h3 { margin: 0 3px; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.organizer-group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.organizer-card { display: flex; min-height: 128px; padding: 16px; flex-direction: column; align-items: flex-start; border: 0; border-radius: 21px; background: var(--card); text-align: left; box-shadow: 0 10px 30px rgba(63,48,37,.05); }
.organizer-card.coral { background: var(--coral-soft); }
.organizer-card.lilac { background: var(--lilac); }
.organizer-card.mint { background: var(--mint); }
.organizer-card.sand { background: #efe3cf; }
.organizer-card > span { display: grid; width: 34px; height: 34px; margin-bottom: auto; place-content: center; border-radius: 12px; background: rgba(255,255,255,.65); font-size: 17px; font-weight: 800; }
.organizer-card strong { margin-top: 18px; font-size: 14px; }
.organizer-card small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }

.finance-hero { margin-top: 8px; padding: 25px; border-radius: 30px; background: #d9e7df; }
.finance-hero > span { color: #617269; font-size: 11px; }
.finance-hero > strong { display: block; margin: 8px 0 24px; font-family: Georgia, serif; font-size: 36px; font-weight: 500; }
.finance-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.finance-split div { padding: 12px; border-radius: 16px; background: rgba(255,255,255,.5); }
.finance-split small, .finance-split b { display: block; }
.finance-split small { margin-bottom: 5px; color: #617269; font-size: 10px; }
.finance-split b { font-size: 13px; }

.category-list { display: grid; gap: 12px; }
.category-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; }
.category-icon { display: grid; width: 34px; height: 34px; place-content: center; border-radius: 11px; background: var(--coral-soft); font-size: 14px; }
.category-info { display: grid; gap: 6px; }
.category-info div { display: flex; justify-content: space-between; font-size: 11px; }
.category-info span { height: 5px; overflow: hidden; border-radius: 5px; background: #eae3dc; }
.category-info i { display: block; width: var(--width); height: 100%; border-radius: inherit; background: var(--coral); }
.category-row > strong { font-size: 12px; }

.global-search { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; padding: 0 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.global-search span { color: var(--muted); font-size: 20px; }
.global-search input { padding-left: 0; border: 0; background: transparent; box-shadow: none; }
.search-results { display: grid; gap: 8px; margin-bottom: 13px; padding: 12px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.search-results[hidden] { display: none; }
.search-result { padding: 10px; border: 0; border-radius: 12px; background: #f3eee8; text-align: left; }
.search-result strong, .search-result span { display: block; }
.search-result strong { font-size: 12px; }
.search-result span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.module-tabs {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 8px 0 18px;
  padding: 4px;
  overflow-x: auto;
  border-radius: 16px;
  background: #ebe5dd;
  scrollbar-width: none;
}
.module-tabs::-webkit-scrollbar { display: none; }
.module-tab { min-width: 72px; padding: 9px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.module-tab.active { background: var(--card); color: var(--ink); box-shadow: 0 5px 15px rgba(63,48,37,.07); }
.module-context-nav { display: flex; min-height: 62px; margin: 5px 0 14px; padding: 9px 12px; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 19px; background: var(--card); box-shadow: 0 8px 25px rgba(63,48,37,.05); }
.module-context-nav button { display: grid; width: 40px; height: 40px; padding: 0; place-content: center; border: 0; border-radius: 13px; background: #eee8e1; font-size: 24px; }
.module-context-nav span,
.module-context-nav strong { display: block; }
.module-context-nav span { margin-bottom: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .09em; }
.module-context-nav strong { font-size: 14px; }
.module-panel { display: none; animation: reveal .2s ease; }
.module-panel.active { display: block; }

.todos-hero {
  display: flex;
  min-height: 150px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 23px;
  border-radius: 28px;
  background: linear-gradient(135deg, #302e2b, #514a56);
  color: white;
  box-shadow: var(--shadow);
}
.todos-hero h2 { margin: 5px 0 8px; font-size: 27px; }
.todos-hero p { margin: 0; color: #d7d0d8; font-size: 11px; line-height: 1.45; }
.todos-hero .eyebrow { color: #cfc5dc; }
.todo-filters { display: flex; gap: 8px; margin: 14px 0; }
.todo-filters button {
  padding: 9px 13px;
  border: 0;
  border-radius: 13px;
  background: #eae4dc;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.todo-filters button.active { background: var(--ink); color: white; }
.todo-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(224,215,204,.75);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(63,48,37,.04);
}
.todo-card.done { opacity: .68; }
.todo-check {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 0;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  font-weight: 800;
}
.todo-check.done { border-color: #70a28d; background: #70a28d; color: white; }
.todo-copy { min-width: 0; flex: 1; }
.todo-copy strong { display: block; font-size: 14px; line-height: 1.3; }
.todo-copy p { margin: 5px 0 8px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.todo-copy span { color: var(--muted); font-size: 10px; font-weight: 700; }
.todo-copy span.overdue { color: #bc4f42; }
.todo-copy span.due-today { color: #8369aa; }
.todo-card.done .todo-copy strong { text-decoration: line-through; }

.wellness-hero { padding: 23px; border-radius: 28px; background: linear-gradient(135deg, #f2d8cf, #e8dff1); }
.wellness-hero h2 { margin: 7px 0 18px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.wellness-hero > small { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; text-align: center; }
.mood-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mood-picker button { aspect-ratio: 1; border: 0; border-radius: 50%; background: rgba(255,255,255,.58); font-weight: 750; transition: .15s ease; }
.mood-picker button.active { background: var(--ink); color: white; transform: translateY(-3px); }

.tracker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tracker-card { min-height: 128px; padding: 17px; border-radius: 22px; background: var(--card); }
.tracker-card > span, .tracker-card > strong { display: block; }
.tracker-card > span { color: var(--muted); font-size: 10px; }
.tracker-card > strong { margin: 10px 0 15px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.tracker-card input { height: 5px; padding: 0; accent-color: var(--coral); }
.water-card { background: var(--mint); }
.water-card div { display: flex; gap: 8px; }
.water-card button { width: 34px; height: 30px; border: 0; border-radius: 10px; background: rgba(255,255,255,.66); font-size: 18px; }
.wellness-note-card { display: grid; gap: 12px; margin-top: 12px; padding: 18px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.wellness-note-card label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.wellness-note-card > span { color: var(--muted); font-size: 11px; text-align: center; }
.wellness-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wellness-summary article { padding: 13px 10px; border-radius: 17px; background: var(--card); }
.wellness-summary span, .wellness-summary strong, .wellness-summary small { display: block; }
.wellness-summary span { color: var(--muted); font-size: 10px; }
.wellness-summary strong { margin: 7px 0 5px; font-size: 16px; }
.wellness-summary small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.wellness-history { display: grid; gap: 8px; margin-top: 10px; }
.wellness-history article { display: grid; padding: 13px; grid-template-columns: minmax(0, 1fr) repeat(3, auto); align-items: center; gap: 9px; border-radius: 17px; background: var(--card); }
.wellness-history div strong, .wellness-history div span { display: block; }
.wellness-history div strong { font-size: 12px; text-transform: capitalize; }
.wellness-history div span { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.wellness-history > article > small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.habit-check, .list-check { width: 29px; height: 29px; flex: 0 0 29px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.habit-check.done, .list-check.done { border-color: #70a28d; background: #70a28d; color: white; }
.streak { padding: 5px 8px; border-radius: 10px; background: #f1ece6; color: var(--muted); font-size: 10px; font-weight: 700; }

.goals-hero { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding: 23px; border-radius: 28px; background: #302e2b; color: white; }
.goals-hero span, .goals-hero strong { display: block; }
.goals-hero span { margin-bottom: 7px; color: #cfc7be; font-size: 10px; }
.goals-hero strong { font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.light-button { padding: 10px 12px; border: 0; border-radius: 13px; background: white; color: var(--ink); font-size: 11px; font-weight: 750; }
.goal-list { display: grid; gap: 12px; }
.goal-card { padding: 18px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.goal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.goal-top h3 { margin: 0 0 4px; font-size: 15px; }
.goal-top span { color: var(--muted); font-size: 10px; }
.goal-percent { font-family: Georgia, serif; font-size: 21px; }
.goal-bar { height: 7px; margin: 15px 0 13px; overflow: hidden; border-radius: 10px; background: #eee7df; }
.goal-bar i { display: block; width: var(--width); height: 100%; border-radius: inherit; background: var(--coral); }
.goal-bottom { display: flex; align-items: center; justify-content: space-between; }
.goal-bottom strong { font-size: 12px; }
.contribute-button { padding: 7px 10px; border: 0; border-radius: 10px; background: var(--mint); font-size: 10px; font-weight: 750; }

.list-switch { display: grid; margin-bottom: 13px; grid-template-columns: 1fr 1fr; gap: 8px; }
.list-switch button { padding: 12px; border: 0; border-radius: 15px; background: #ebe5dd; color: var(--muted); font-size: 12px; font-weight: 700; }
.list-switch button.active { background: var(--ink); color: white; }
.quick-list-form { display: grid; margin-bottom: 17px; grid-template-columns: 1fr 44px; gap: 8px; }
.quick-list-form button { border: 0; border-radius: 13px; background: var(--coral); color: white; font-size: 22px; }
.check-list { display: grid; gap: 9px; }
.checked-copy { text-decoration: line-through; opacity: .55; }
.delete-button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: #b2aaa2; font-size: 17px; }
.share-note { margin-bottom: 13px; padding: 15px; border-radius: 18px; background: var(--lilac); }
.share-note strong, .share-note span { display: block; }
.share-note strong { margin-bottom: 5px; font-size: 12px; }
.share-note span { color: #665e68; font-size: 9px; line-height: 1.45; }
.share-note button { margin-top: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: rgba(255,255,255,.65); font-size: 9px; font-weight: 750; }

.first-heading { margin-top: 8px; }
.filter-chips { display: flex; gap: 7px; margin: 13px 0; overflow-x: auto; scrollbar-width: none; }
.filter-chips button { flex: 0 0 auto; padding: 7px 10px; border: 0; border-radius: 12px; background: #eae4dc; color: var(--muted); font-size: 10px; font-weight: 700; }
.filter-chips button.active { background: var(--ink); color: white; }
.note-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note-card { position: relative; min-height: 145px; padding: 16px; overflow: hidden; border-radius: 20px; background: var(--note-color, var(--coral-soft)); }
.note-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; }
.note-card > .delete-cross { position: absolute; right: 12px; bottom: 12px; background: rgba(255,255,255,.72); }
.note-card .note-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.note-card h3 { margin: 18px 0 7px; font-family: Georgia, serif; font-size: 17px; font-weight: 500; }
.note-card p { display: -webkit-box; margin: 0; overflow: hidden; color: #514c48; font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.note-lock { font-size: 11px; }
.note-reader { padding: 17px; border-radius: 18px; background: var(--card); }
.note-reader span { color: var(--muted); font-size: 10px; font-weight: 750; }
.note-reader p { margin: 16px 0 0; font-size: 13px; line-height: 1.65; }
.reader-checklist { display: grid; gap: 7px; margin-top: 14px; }
.reader-checklist button { padding: 11px; border: 0; border-radius: 11px; background: #eee8e1; font-size: 11px; text-align: left; }
.reader-checklist button.done { color: var(--muted); text-decoration: line-through; }

.ticket-list, .loyalty-list { display: grid; width: 100%; max-width: 100%; gap: 12px; }
.ticket-card { position: relative; width: 100%; max-width: 100%; overflow: hidden; padding: 19px; border-radius: 23px; background: var(--card); box-shadow: var(--shadow); }
.ticket-card::after { position: absolute; top: 0; right: 0; width: 8px; height: 100%; background: var(--ticket-color, var(--coral)); content: ""; }
.ticket-card .ticket-type { color: #b84f40; font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.ticket-card h3 { margin: 10px 0 6px; font-size: 16px; }
.ticket-card p { margin: 0 0 15px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ticket-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; }
.ticket-bottom strong { font-size: 11px; }
.ticket-bottom button { padding: 7px 9px; border: 0; border-radius: 10px; background: #eee7df; font-size: 9px; font-weight: 750; }
.attachment-preview { max-width: 100%; max-height: 210px; margin-top: 13px; border-radius: 15px; object-fit: contain; }
.attachment-link { display: block; margin-top: 13px; padding: 11px; border-radius: 12px; background: #eee7df; color: var(--ink); font-size: 10px; font-weight: 750; text-decoration: none; }

.loyalty-card { width: 100%; max-width: 100%; padding: 20px; overflow: hidden; border-radius: 24px; background: var(--card-color, #302e2b); color: white; box-shadow: var(--shadow); }
.loyalty-card header { display: flex; align-items: center; justify-content: space-between; }
.loyalty-card header span { color: rgba(255,255,255,.7); font-size: 9px; text-transform: uppercase; }
.loyalty-card h3 { margin: 23px 0 6px; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.loyalty-card p { margin: 0; color: rgba(255,255,255,.7); font-size: 11px; letter-spacing: .12em; }
.loyalty-card > .delete-cross { margin: 14px 0 0 auto; background: rgba(255,255,255,.2); color: white; }
.barcode { height: 48px; margin-top: 18px; border: 7px solid white; background: repeating-linear-gradient(90deg, #111 0 2px, white 2px 4px, #111 4px 5px, white 5px 8px); }

.vault-card, .data-card, .goal-card { width: 100%; max-width: 100%; overflow: hidden; }
.vault-card, .data-card { padding: 20px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.data-settings-panel > .vault-card { margin-top: 16px; }
.setting-copy strong { font-size: 13px; }
.setting-copy p { margin-bottom: 14px; }
.scale-picker { display: grid; padding: 4px; grid-template-columns: repeat(3, 1fr); border-radius: 15px; background: #eae4dc; }
.scale-picker button { min-width: 0; padding: 10px 5px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 750; }
.scale-picker button.active { background: white; color: var(--ink); box-shadow: 0 5px 15px rgba(63,48,37,.07); }
.vault-card > p, .data-card p { margin: 11px 0 16px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.vault-heading { display: flex; align-items: center; gap: 12px; }
.vault-heading h2 { font-size: 17px; }
.vault-icon { display: grid; width: 42px; height: 42px; place-content: center; border-radius: 14px; background: var(--lilac); font-size: 22px; }
.inline-form { display: grid; width: 100%; max-width: 100%; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.inline-form input { min-width: 0; }
.inline-form button, .file-button { display: grid; padding: 0 13px; place-content: center; border: 0; border-radius: 13px; background: var(--ink); color: white; font-size: 11px; font-weight: 750; cursor: pointer; }
#vault-content { margin-top: 15px; }
.file-button { width: 100%; min-height: 42px; background: var(--lilac); color: var(--ink); }
.document-list { display: grid; gap: 8px; margin: 12px 0; }
.document-row { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: 14px; background: #f1ece6; }
.document-row span { min-width: 0; flex: 1; overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.document-row small { color: var(--muted); font-size: 9px; }
.document-row button { border: 0; background: transparent; color: var(--coral); font-size: 10px; font-weight: 750; }
.document-meta-form { display: grid; gap: 8px; margin-top: 15px; grid-template-columns: 1fr 1fr; }
.document-meta-form .file-button { min-height: 42px; grid-column: 1 / -1; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.secondary-button { display: grid; min-height: 42px; padding: 8px; place-content: center; border: 1px solid var(--line); border-radius: 13px; background: white; font-size: 10px; font-weight: 750; text-align: center; cursor: pointer; }
.status-line { display: block; margin-top: 12px; color: var(--muted); font-size: 11px; }
.cloud-sync-button { margin-top: 14px; }
.cloud-sync-button[hidden] { display: none; }
.cloud-account-details { display: grid; gap: 8px; margin-top: 14px; padding: 13px; border-radius: 16px; background: #f1ece6; }
.cloud-account-details[hidden] { display: none; }
.cloud-account-details span,
.cloud-account-details strong { display: block; }
.cloud-account-details span { color: var(--muted); font-size: 9px; }
.cloud-account-details strong { margin-top: 4px; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.status-pill.online { background: #d4e7df; color: #356b57; }
.notification-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notification-row p { margin-bottom: 0; }
.switch-button { min-width: 58px; padding: 9px; border: 0; border-radius: 18px; background: #e8e1d8; color: var(--muted); font-size: 10px; font-weight: 750; }
.switch-button.on { background: #70a28d; color: white; }
.widget-preview { display: grid; min-height: 100px; padding: 16px; align-content: center; border-radius: 20px; background: #302e2b; color: white; }
.widget-preview span, .widget-preview small { color: #cfc7be; font-size: 9px; }
.widget-preview strong { margin: 7px 0; font-family: Georgia, serif; font-size: 17px; font-weight: 500; }

.bottom-nav {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(100%, 480px);
  margin: auto;
  padding: 10px 12px calc(9px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(225,216,207,.8);
  background: rgba(255,253,249,.94);
  backdrop-filter: blur(18px);
}
.nav-item { display: grid; gap: 4px; justify-items: center; border: 0; background: transparent; color: #a29b93; }
.nav-item span { display: grid; width: 25px; height: 25px; place-content: center; line-height: 1; }
.nav-item svg { width: 22px; height: 22px; overflow: visible; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.nav-item[data-nav="more"] svg circle { fill: currentColor; stroke: none; }
.nav-item small { font-size: 10px; font-weight: 700; }
.nav-item.active { color: var(--ink); }
.nav-item.active svg { stroke-width: 2.1; }

html.native-app {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.native-app body { background: var(--paper); }
html.native-app main { scrollbar-width: none; }
html.native-app main::-webkit-scrollbar { display: none; }
html.native-app .bottom-nav {
  border-top-color: rgba(225,216,207,.62);
  background: rgba(255,253,249,.97);
  box-shadow: 0 -10px 32px rgba(63,48,37,.055);
}
html.native-app .screen { animation-duration: .28s; }
html.native-app button:active { transform: none; opacity: .82; }

dialog { width: min(calc(100% - 28px), 440px); max-height: min(88dvh, 760px); padding: 0; overflow: auto; overscroll-behavior: contain; border: 0; border-radius: 26px; background: var(--paper); box-shadow: 0 30px 100px rgba(0,0,0,.25); scroll-behavior: smooth; }
dialog::backdrop { background: rgba(34,31,29,.45); backdrop-filter: blur(4px); }
#entry-form { padding: 22px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.dialog-header h2 { font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.close-button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: white; font-size: 22px; }
#dynamic-fields { display: grid; gap: 14px; margin-bottom: 18px; }
.cycle-day-sheet { padding: 22px; }
.cycle-day-sheet > p { margin: -8px 0 16px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.cycle-day-actions { display: grid; gap: 9px; }
.cycle-day-actions button {
  display: grid;
  min-height: 68px;
  padding: 13px 15px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  text-align: left;
}
.cycle-day-actions button span { color: #8b405b; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cycle-day-actions button strong { font-size: 12px; }
.cycle-day-actions button.active { border-color: rgba(207,143,166,.45); background: #f4dce6; }
.cycle-day-actions button:disabled { opacity: .45; }
.quick-add-sheet { padding: 22px; }
.quick-add-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick-add-options button { display: grid; min-height: 116px; padding: 13px; align-content: start; border: 1px solid var(--line); border-radius: 19px; background: var(--card); text-align: left; }
.quick-add-options button > span { display: grid; width: 34px; height: 34px; margin-bottom: 13px; place-content: center; border-radius: 12px; font-size: 17px; font-weight: 800; }
.quick-add-options .coral { background: var(--coral-soft); }
.quick-add-options .lilac { background: var(--lilac); }
.quick-add-options .mint { background: var(--mint); }
.quick-add-options .sand { background: #efe3cf; }
.quick-add-options strong { font-size: 12px; }
.quick-add-options small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.35; }

#toast {
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: 95px;
  left: 20px;
  display: flex;
  width: fit-content;
  max-width: 400px;
  align-items: center;
  gap: 12px;
  margin: auto;
  padding: 11px 16px;
  border-radius: 13px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: .2s ease;
}
#toast button { padding: 5px 8px; border: 0; border-radius: 8px; background: white; color: var(--ink); font-size: 11px; font-weight: 800; }
#toast.show { opacity: 1; pointer-events: auto; transform: none; }

.settings-list { display: grid; gap: 2px; margin-bottom: 14px; }
.setting-row { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row span, .setting-row strong, .setting-row small { display: block; }
.setting-row strong { font-size: 13px; }
.setting-row small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.setting-row input { width: 20px; height: 20px; flex: 0 0 20px; padding: 0; accent-color: var(--ink); }
.data-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.data-row p { margin-bottom: 0; }
.status-pill { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #eee8e1; color: var(--muted); font-size: 10px; font-weight: 750; }
.danger-text { color: #a64537; }
.field { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }

.onboarding {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(34,31,29,.55);
  backdrop-filter: blur(8px);
}
.onboarding[hidden] { display: none; }
.onboarding-card { width: min(100%, 410px); padding: 28px; border-radius: 30px; background: var(--paper); box-shadow: 0 30px 100px rgba(0,0,0,.2); }
.onboarding-card h2 { margin: 10px 0 12px; font-size: 28px; }
.onboarding-card p { min-height: 70px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.onboarding-dots { display: flex; gap: 7px; margin: 18px 0; }
.onboarding-dots span { width: 7px; height: 7px; border-radius: 99px; background: #d7cec5; }
.onboarding-dots span.active { width: 22px; background: var(--coral); }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.auth-error {
  min-height: 22px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: 16px;
  background: rgba(233, 121, 103, .14);
  color: #a53f32;
  font-size: 11px;
  line-height: 1.4;
  display: none;
}
.auth-error.visible { display: block; }
.resend-confirmation {
  width: 100%;
  min-height: 42px;
  margin: -5px 0 13px;
  padding: 9px 12px;
  border: 1px solid rgba(165,63,50,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.7);
  color: #8c3c31;
  font-size: 11px;
  font-weight: 720;
}
.resend-confirmation[hidden] { display: none; }

.module-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .24s ease, transform .24s ease;
}
.module-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.screen {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease;
}
.screen.active {
  opacity: 1;
  transform: translateY(0);
}

.auth-gate {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scroll-padding-bottom: calc(24px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #f7f4ef;
}
.auth-gate[hidden] { display: none; }
.auth-scene {
  position: relative;
  display: flex;
  min-height: 270px;
  padding: calc(28px + env(safe-area-inset-top)) 26px 58px;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 5%, rgba(255,238,196,.72), transparent 28%),
    radial-gradient(circle at 9% 78%, rgba(204,185,239,.62), transparent 32%),
    linear-gradient(145deg, #ff8a72 0%, #f4a886 45%, #a992d4 115%);
  color: white;
}
.auth-scene::before,
.auth-scene::after { position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); content: ""; }
.auth-scene::before { top: -90px; right: -45px; width: 230px; height: 230px; }
.auth-scene::after { bottom: -110px; left: 42%; width: 210px; height: 210px; }
.auth-scene-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.auth-scene-brand img { width: 52px; height: 52px; border-radius: 16px; box-shadow: 0 12px 30px rgba(88,54,46,.2); }
.auth-scene-brand strong,
.auth-scene-brand span { display: block; }
.auth-scene-brand strong { font-size: 20px; letter-spacing: -.03em; }
.auth-scene-brand span { margin-top: 3px; color: rgba(255,255,255,.78); font-size: 10px; }
.auth-scene-copy { position: relative; z-index: 1; }
.auth-scene-copy span { display: block; margin-bottom: 8px; color: rgba(255,255,255,.72); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.auth-scene-copy strong { font-size: clamp(25px, 7vw, 34px); line-height: 1.05; letter-spacing: -.045em; }
.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  margin: -34px auto 0;
  padding: 20px 26px calc(24px + env(safe-area-inset-bottom));
  flex: 0 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 34px 34px 0 0;
  background: rgba(255,253,249,.98);
  box-shadow: 0 -20px 55px rgba(78,50,42,.12);
}
.auth-sheet-handle { display: block; width: 42px; height: 4px; margin: 0 auto 15px; border-radius: 99px; background: #ddd5cd; }
.auth-intro { margin-top: 0; }
.auth-intro h2 { max-width: 340px; margin: 4px 0 7px; font-size: 28px; font-weight: 790; line-height: 1.05; letter-spacing: -.045em; }
.auth-intro > p:last-child { max-width: 360px; margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.auth-card > small { display: block; margin-top: 14px; color: #8a857f; font-size: 10px; line-height: 1.4; text-align: center; }
.auth-tabs { display: grid; margin: 18px 0 15px; padding: 4px; grid-template-columns: 1fr 1fr; border-radius: 15px; background: #eee9e3; }
.auth-tabs button { min-height: 40px; padding: 9px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 720; }
.auth-tabs button.active { background: white; color: var(--ink); box-shadow: 0 5px 16px rgba(55,46,39,.08); }
.auth-form { display: grid; gap: 11px; }
.auth-form[hidden] { display: none; }
.auth-form label { display: grid; gap: 6px; color: #716c66; font-size: 11px; font-weight: 680; }
.auth-form label:not(.remember-login) input {
  min-height: 50px;
  padding: 14px 15px;
  border-color: #e8e0d8;
  border-radius: 15px;
  background: #fff;
  font-size: 16px;
  box-shadow: 0 5px 18px rgba(63,48,37,.035);
}
.auth-form label:not(.remember-login) input:focus { border-color: rgba(41,39,37,.42); box-shadow: 0 0 0 4px rgba(41,39,37,.07); }
.auth-form .primary-button { min-height: 52px; margin-top: 2px; border-radius: 16px; font-size: 14px; }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 9px; background: linear-gradient(100deg, #f05f72, #ff8a58); box-shadow: 0 12px 26px rgba(240,95,114,.23); }
.auth-submit span { font-size: 18px; line-height: 1; }
.auth-form .remember-login { display: flex; align-items: center; gap: 9px; padding: 1px 2px; color: var(--muted); font-size: 11px; font-weight: 600; }
.remember-login input { width: 19px; height: 19px; padding: 0; accent-color: var(--ink); }
.auth-social-row { display: flex; justify-content: center; gap: 9px; }
.google-auth-button {
  display: flex;
  width: auto;
  min-width: 112px;
  min-height: 46px;
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(116,106,96,.17);
  border-radius: 14px;
  background: white;
  font-size: 11px;
  font-weight: 720;
  box-shadow: 0 5px 15px rgba(55,46,39,.05);
}
.google-auth-button svg { width: 19px; height: 19px; flex: 0 0 19px; }
.apple-auth-button {
  display: flex;
  width: auto;
  min-width: 112px;
  min-height: 46px;
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(116,106,96,.17);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  font-size: 11px;
  font-weight: 720;
}
.apple-auth-button svg { width: 21px; height: 21px; flex: 0 0 21px; fill: currentColor; }
.google-auth-button:disabled,
.apple-auth-button:disabled { opacity: .48; cursor: default; }
.google-auth-button[hidden],
.apple-auth-button[hidden],
.auth-divider[hidden] { display: none; }
.auth-divider { display: flex; margin: 14px 0 11px; align-items: center; gap: 11px; color: #918b84; font-size: 9px; }
.auth-divider::before,
.auth-divider::after { height: 1px; flex: 1; background: rgba(116,106,96,.17); content: ""; }
.auth-reset { justify-self: center; padding: 5px; color: #615b55; font-size: 11px; }
.auth-mode-note { margin: 13px 0 0 !important; padding: 10px 12px; border-radius: 14px; background: #f2ede8; color: var(--muted); font-size: 9px !important; line-height: 1.45; text-align: center; }

#account-dialog { width: min(calc(100% - 28px), 420px); }
.account-panel { padding: 23px; }
.profile-summary { display: flex; align-items: center; gap: 13px; margin: -5px 0 18px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, var(--lilac), #eee4de); }
.profile-avatar { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-content: center; border-radius: 15px; background: var(--ink); color: white; font-weight: 800; }
.profile-summary div { min-width: 0; }
.profile-summary strong, .profile-summary span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-summary strong { margin-bottom: 4px; font-size: 13px; }
.profile-summary span { color: var(--muted); font-size: 10px; }
.account-email { color: var(--muted); font-size: 11px; }
.account-tabs { display: grid; margin-bottom: 16px; padding: 4px; grid-template-columns: repeat(3, 1fr); border-radius: 15px; background: #eae4dc; }
.account-tabs button { min-width: 0; padding: 9px 5px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 750; }
.account-tabs button.active { background: white; color: var(--ink); box-shadow: 0 5px 15px rgba(63,48,37,.07); }
.account-view { display: none; }
.account-view.active { display: block; animation: reveal .3s var(--ease); }
.account-form { display: grid; gap: 12px; }
.account-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.privacy-note { margin: 14px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.account-list { display: grid; gap: 8px; margin-bottom: 14px; }
.account-row { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 15px; background: #eee8e1; }
.account-row.active { background: var(--lilac); }
.account-initial { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-content: center; border-radius: 50%; background: var(--ink); color: white; font-size: 11px; font-weight: 750; }
.account-row div { min-width: 0; flex: 1; }
.account-row strong, .account-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-row strong { font-size: 11px; }
.account-row span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.account-row button { padding: 6px 8px; border: 0; border-radius: 9px; background: white; font-size: 9px; font-weight: 750; }
.danger-button { width: 100%; margin-top: 9px; padding: 12px; border: 0; border-radius: 13px; background: #f5d8d2; color: #a64537; font-size: 11px; font-weight: 750; }
.secondary-danger { margin-top: 14px; border: 1px solid rgba(166,69,55,.16); background: transparent; }
.legal-links { display: grid; gap: 8px; margin-top: 16px; padding: 14px; border-radius: 16px; background: #f1ece6; }
.legal-links a { color: #625c56; font-size: 11px; font-weight: 720; text-decoration: none; }
#delete-account-dialog { width: min(calc(100% - 28px), 420px); }
#delete-account-form { display: grid; gap: 14px; }
#delete-account-form > label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.delete-account-copy { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.inbox-summary { display: grid; margin-bottom: 14px; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.inbox-explainer { margin: -2px 2px 13px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.inbox-quick-actions { display: grid; margin-bottom: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.inbox-quick-actions button { padding: 9px 5px; border: 0; border-radius: 12px; background: #ebe5dd; color: var(--muted); font-size: 9px; font-weight: 750; }
.inbox-summary article { padding: 15px 10px; border-radius: 18px; background: var(--card); text-align: center; box-shadow: 0 8px 24px rgba(63,48,37,.05); }
.inbox-summary strong, .inbox-summary span { display: block; }
.inbox-summary strong { font-size: 22px; }
.inbox-summary span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.inbox-row { display: grid; width: 100%; min-height: 68px; padding: 12px 13px; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); text-align: left; }
.inbox-row > span:nth-child(2) { display: grid; gap: 4px; }
.inbox-row strong { font-size: 12px; }
.inbox-row small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.inbox-row > b { color: #8a837c; font-size: 22px; font-weight: 500; }
.inbox-dot { width: 8px; height: 8px; border-radius: 50%; background: #8d78ad; }
.inbox-row.danger .inbox-dot { background: #bd4d42; }
.inbox-row.warning .inbox-dot { background: #c58a2f; }
.inbox-row.health .inbox-dot { background: #8d78ad; }
.inbox-row.calendar .inbox-dot { background: var(--coral); }
.inbox-row.money .inbox-dot { background: #4f8b76; }
.health-today-insights { display: grid; margin: 14px 0 18px; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.health-today-insights article { padding: 14px 12px; border-radius: 18px; background: var(--card); box-shadow: 0 8px 24px rgba(63,48,37,.05); }
.health-today-insights span,
.health-today-insights strong,
.health-today-insights small { display: block; }
.health-today-insights span { color: var(--muted); font-size: 9px; font-weight: 700; }
.health-today-insights strong { margin-top: 7px; font-size: 18px; }
.health-today-insights small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.health-stats article small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.35; }

.organizer-settings { display: grid; gap: 9px; margin-top: 14px; }
.organizer-setting-row { display: flex; min-height: 62px; padding: 10px 11px; align-items: center; gap: 10px; border-radius: 16px; background: #f2ede7; }
.organizer-setting-row > label { display: flex; min-width: 0; flex: 1; align-items: center; gap: 10px; cursor: pointer; }
.organizer-setting-row input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--ink); }
.organizer-setting-row label span,
.organizer-setting-row label strong,
.organizer-setting-row label small { display: block; }
.organizer-setting-row label strong { font-size: 11px; }
.organizer-setting-row label small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.organizer-setting-row > div { display: flex; gap: 5px; }
.organizer-setting-row > div button { width: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 11px; background: white; font-weight: 800; }
.organizer-setting-row > div button:disabled { opacity: .3; }
.health-report-render { position: fixed; left: -12000px; top: 0; width: 900px; padding: 36px; background: white; color: #292725; font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.health-report-render:not(.rendering) { visibility: hidden; }
.health-report-render h1 { margin-bottom: 10px; font-size: 32px; }
.health-report-render h2 { margin: 28px 0 10px; font-size: 21px; }
.health-report-render table { width: 100%; border-collapse: collapse; }
.health-report-render th,
.health-report-render td { padding: 8px; border: 1px solid #d9d4ce; text-align: left; }
.health-report-render .note { padding: 13px; border-radius: 12px; background: #f4efe9; }

[hidden] { display: none !important; }
button,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
select { min-height: 44px; }
.settings-button { width: 44px; height: 44px; }
.delete-cross, .delete-button { min-width: 44px; min-height: 44px; }
a:focus-visible { outline: 3px solid rgba(233,121,103,.32); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.hero-card h2,
.day-orbit strong,
.cycle-copy h2,
.cycle-visual span,
.calorie-summary strong,
.finance-hero > strong,
.tracker-card > strong,
.goals-hero strong,
.goal-percent,
.note-card h3,
.loyalty-card h3,
.widget-preview strong,
.dialog-header h2,
.auth-logo,
.auth-card h2 {
  font-family: inherit;
}

@media (max-width: 520px) {
  body { min-width: auto; background: var(--paper); }
  main { padding: 4px 14px calc(110px + env(safe-area-inset-bottom)); }
  .topbar { flex-wrap: wrap; gap: 12px; }
  .hero-card { flex-wrap: wrap; min-height: auto; gap: 18px; }
  .hero-card h2 { width: 100%; font-size: 24px; }
  .hero-card p { max-width: 100%; font-size: 13px; }
  .day-orbit { width: 66px; height: 66px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-card { padding: 14px; }
  .weekdays span, .calendar-day { font-size: 10px; }
  .note-grid, .document-meta-form { grid-template-columns: 1fr; }
  .module-tabs { padding: 4px 6px; }
  .module-tab { min-width: auto; font-size: 10px; }
  .bottom-nav { padding: 10px 8px calc(9px + env(safe-area-inset-bottom)); }
  .dialog-header h2 { font-size: 22px; }
  dialog { width: min(calc(100% - 16px), 100%); }
  .auth-card { width: 100%; padding-right: 21px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); padding-left: 21px; border-radius: 30px 30px 0 0; }
  .auth-card > small { display: none; }
  .auth-scene { min-height: 200px; padding-right: 21px; padding-left: 21px; }
  .auth-intro h2 { font-size: 26px; }
  .note-card { min-height: 125px; }
  .calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .app-shell { width: 100%; border-radius: 0; }
  .topbar { padding: calc(18px + env(safe-area-inset-top)) 14px 12px; }
  .hero-card { padding: 20px; border-radius: 24px; }
  .balance-card, .cycle-card, .nutrition-card, .finance-hero, .calendar-card { padding: 18px; }
  .module-tabs { overflow-x: auto; gap: 8px; }
  .module-tab { flex: 0 0 auto; white-space: nowrap; }
  .todos-hero { min-height: 142px; padding: 20px; }
  .inline-form { grid-template-columns: 1fr; }
  .inline-form button { min-height: 46px; }
  #event-list .list-card .item-actions { width: 100%; padding-left: 18px; justify-content: flex-end; }
  .global-search input { font-size: 14px; text-overflow: ellipsis; }
  .data-row { flex-wrap: wrap; }
  .wellness-summary { grid-template-columns: 1fr; }
  .wellness-history article { grid-template-columns: minmax(0, 1fr) auto; }
  .wellness-history > article > small { white-space: normal; text-align: right; }
  .cycle-log-grid { grid-template-columns: 1fr; }
  .cycle-calendar-card,
  .cycle-log-card { padding: 15px; }
  .health-form-grid { grid-template-columns: 1fr; }
  .health-today-hero { padding: 19px; }
  .health-today-insights { grid-template-columns: 1fr; }
  .health-tabs { margin-right: -8px; margin-left: -8px; border-radius: 14px; }
}

@media (min-width: 700px) {
  body { padding: 25px 0; }
  .app-shell { width: min(100%, 620px); height: calc(100dvh - 50px); border-radius: 36px; box-shadow: 0 35px 100px rgba(60,45,33,.18); }
  .bottom-nav { bottom: 25px; width: min(100%, 620px); border-radius: 0 0 36px 36px; }
  main { padding-right: 28px; padding-left: 28px; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-height: 980px) {
  .auth-card { margin-right: auto; margin-left: auto; }
}

@media (max-height: 760px) {
  .auth-scene { min-height: 132px; padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: 34px; }
  .auth-scene-copy { display: none; }
  .auth-scene-brand img { width: 42px; height: 42px; border-radius: 13px; }
  .auth-card { margin-top: -24px; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 25px 25px 0 0; }
  .auth-sheet-handle { margin-bottom: 10px; }
  .auth-intro h2 { margin-bottom: 5px; font-size: 23px; }
  .auth-intro > p:last-child { font-size: 11px; }
  .auth-tabs { margin: 11px 0 10px; }
  .auth-form { gap: 8px; }
  .auth-form label:not(.remember-login) input,
  .auth-form .primary-button,
  .google-auth-button { min-height: 46px; }
  .auth-divider { margin: 10px 0; }
  .auth-mode-note { margin-top: 9px !important; padding: 8px 10px; }
  .auth-card > small { margin-top: 8px; }
}

@media (max-height: 620px) {
  .auth-scene {
    min-height: 86px;
    padding: calc(8px + env(safe-area-inset-top)) 17px 24px;
  }
  .auth-scene-brand { gap: 9px; }
  .auth-scene-brand img { width: 34px; height: 34px; border-radius: 11px; }
  .auth-scene-brand strong { font-size: 16px; }
  .auth-scene-brand span { display: none; }
  .auth-card {
    margin-top: -18px;
    padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
    border-radius: 21px 21px 0 0;
  }
  .auth-sheet-handle { width: 34px; height: 3px; margin-bottom: 7px; }
  .auth-intro .eyebrow,
  .auth-intro > p:last-child,
  .auth-mode-note,
  .auth-card > small { display: none; }
  .auth-intro h2 { margin: 0; font-size: 20px; }
  .auth-tabs { margin: 9px 0 8px; }
  .auth-tabs button { min-height: 34px; padding: 6px; font-size: 11px; }
  .auth-form { gap: 6px; }
  .auth-form label { gap: 3px; font-size: 9px; }
  .auth-form label:not(.remember-login) input {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 13px;
    font-size: 15px;
  }
  .auth-form .remember-login { font-size: 9px; }
  .remember-login input { width: 17px; height: 17px; }
  .auth-form .primary-button { min-height: 42px; border-radius: 13px; font-size: 12px; }
  .auth-reset { padding: 2px; font-size: 9px; }
  .auth-divider { margin: 7px 0; }
  .google-auth-button,
  .apple-auth-button { min-height: 40px; padding: 7px 13px; }
}

html[data-ui-scale="compact"] .topbar { padding-top: calc(13px + env(safe-area-inset-top)); padding-bottom: 8px; }
html[data-ui-scale="compact"] h1 { font-size: 23px; }
html[data-ui-scale="compact"] h2 { font-size: 16px; }
html[data-ui-scale="compact"] main { padding-top: 0; padding-right: 13px; padding-left: 13px; }
html[data-ui-scale="compact"] .hero-card,
html[data-ui-scale="compact"] .cycle-card,
html[data-ui-scale="compact"] .finance-hero,
html[data-ui-scale="compact"] .wellness-hero,
html[data-ui-scale="compact"] .goals-hero,
html[data-ui-scale="compact"] .todos-hero { padding: 17px; border-radius: 22px; }
html[data-ui-scale="compact"] .hero-card { min-height: 138px; margin-bottom: 12px; }
html[data-ui-scale="compact"] .hero-card h2 { font-size: 23px; }
html[data-ui-scale="compact"] .quick-card { padding: 10px; border-radius: 16px; }
html[data-ui-scale="compact"] .quick-icon { margin-bottom: 8px; }
html[data-ui-scale="compact"] .section-heading { margin-top: 18px; }
html[data-ui-scale="compact"] .calendar-card { padding: 11px 9px; border-radius: 20px; }
html[data-ui-scale="compact"] .month-control h2 { font-size: 20px; }
html[data-ui-scale="compact"] .month-control button { width: 32px; height: 32px; }
html[data-ui-scale="compact"] .list-card,
html[data-ui-scale="compact"] .todo-card { padding: 11px; border-radius: 16px; }
html[data-ui-scale="compact"] .list-main strong { font-size: 12px; }
html[data-ui-scale="compact"] .bottom-nav { padding-top: 7px; }
html[data-ui-scale="compact"] .nav-item span { font-size: 17px; }
html[data-ui-scale="compact"] .nav-item small { font-size: 10px; }

html[data-ui-scale="large"] h1 { font-size: 31px; }
html[data-ui-scale="large"] h2 { font-size: 21px; }
html[data-ui-scale="large"] .list-main strong { font-size: 15px; }

@media (max-width: 360px) {
  main { padding-right: 11px; padding-left: 11px; }
  .topbar { padding-right: 12px; padding-left: 12px; }
  h1 { font-size: 25px; }
  .hero-card { padding: 18px; }
  .day-orbit { width: 58px; height: 58px; flex-basis: 58px; }
  .quick-card { padding: 12px 10px; }
  .bottom-nav { padding-right: 3px; padding-left: 3px; }
  .nav-item span { font-size: 18px; }
  .nav-item small { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html, main { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
