:root {
  color-scheme:dark;
  --paper:#151c19;
  --surface:#1e2823;
  --ink:#e6ebe3;
  --muted:#a7b3a8;
  --line:#3b4b40;
  --green:#a4c8af;
  --light-green:#293d31;
  --rose:#dfa5a0;
  --rose-light:#483034;
  --danger:#f0a7a0;
  --on-accent:#15251c;
  --accent-hover:#b8d8bd;
  --focus:#bbd7ad;
  --control-border:#657a68;
  --input-border:#657a68;
  --outside-day:#9aa89b;
  --future-day:#9aa89b;
  --flow-text:#efb9b0;
  --spotting-bg:#3d322a;
  --spotting-text:#dfc0a5;
  --hover-border:#8ca98e;
  --bleeding-dot:#dfa29c;
  --spotting-dot:#cdb396;
  --calendar-note-bg:#243127;
  --calendar-note-text:#adbdab;
  --day-card-bg:#222e26;
  --day-card-border:#40513f;
  --badge-bg:#2d4031;
  --illustration-border:#526b4f;
  --illustration-text:#a1b895;
  --note-bg:#19251d;
  --decoration:#a1b895;
  --nav-shadow:#0003;
  --history-hover:#a1b895;
  --history-arrow:#b2c0aa;
  --dialog-shadow:#0006;
  --backdrop:#080f0bba;
  --flow-selected:#483034;
  --toast-text:#151c19;
  --radius:20px;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-synthesis:none;
}

:root[data-theme="light"] {
  color-scheme:light;
  --paper:#f8f7f3;
  --surface:#fffefb;
  --ink:#2e3933;
  --muted:#727b73;
  --line:#e4e5de;
  --green:#466459;
  --light-green:#edf1e9;
  --rose:#b66b6b;
  --rose-light:#f3ded8;
  --danger:#a13e3e;
  --on-accent:#ffffff;
  --accent-hover:#365347;
  --focus:#a6b7a0;
  --control-border:#ced4c9;
  --input-border:#d5d9d0;
  --outside-day:#b8bdb5;
  --future-day:#a1a69f;
  --flow-text:#944e50;
  --spotting-bg:#f7eee8;
  --spotting-text:#936c50;
  --hover-border:#9da993;
  --bleeding-dot:#dba49c;
  --spotting-dot:#ddc3ad;
  --calendar-note-bg:#f3f4ee;
  --calendar-note-text:#6b7869;
  --day-card-bg:#f1f2eb;
  --day-card-border:#e2e5da;
  --badge-bg:#e4e9dd;
  --illustration-border:#ccd5c2;
  --illustration-text:#8d9e83;
  --note-bg:#fff8;
  --decoration:#96a68a;
  --nav-shadow:#263c3010;
  --history-hover:#a2b09b;
  --history-arrow:#8f9c8a;
  --dialog-shadow:#152c2920;
  --backdrop:#1f332b65;
  --flow-selected:#fbefea;
  --toast-text:#ffffff;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
}

button,input,textarea,select {
  font:inherit;
}

button,a,input,textarea,select,summary {
  -webkit-tap-highlight-color:transparent;
}

button,a,summary {
  touch-action:manipulation;
}

button {
  cursor:pointer;
  color:inherit;
}

button:disabled {
  cursor:default;
  opacity:.55;
}

button {
  border:0;
}

a {
  color:inherit;
}

button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid var(--focus);
  outline-offset:3px;
}

[hidden] {
  display:none!important;
}

h1,h2,p {
  margin-top:0;
}

h1 {
  font-family:Georgia,"Times New Roman",serif;
  font-size:40px;
  font-weight:400;
  line-height:1.15;
  letter-spacing:-1.1px;
  margin-bottom:12px;
}

h2 {
  font-size:19px;
  font-weight:600;
  margin-bottom:14px;
  letter-spacing:-.4px;
}

p {
  line-height:1.6;
}

svg {
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.eyebrow {
  font-size:10px;
  line-height:1.4;
  letter-spacing:1.8px;
  font-weight:650;
  color:var(--muted);
  margin-bottom:13px;
}

.muted {
  color:var(--muted);
}

.small {
  font-size:12px;
}

.button {
  border-radius:12px;
  padding:13px 19px;
  min-height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:15px;
  font-size:14px;
  font-weight:600;
}

.primary {
  background:var(--green);
  color:var(--on-accent);
}

.primary:hover {
  background:var(--accent-hover);
}

.secondary {
  background:var(--surface);
  border:1px solid var(--control-border);
}

.secondary:hover {
  background:var(--light-green);
}

.full {
  width:100%;
}

.icon-button {
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border-radius:50%;
  font-size:28px;
  line-height:1;
}

.icon-button:hover {
  background:var(--light-green);
}

.text-button {
  padding:12px;
  min-height:44px;
  background:transparent;
  color:var(--green);
  font-size:13px;
  font-weight:600;
}

.text-button:hover {
  text-decoration:underline;
}

.error {
  font-size:13px;
  color:var(--danger);
  margin:8px 0;
}

.error:empty {
  display:none;
}

.loading {
  min-height:100dvh;
  display:grid;
  place-items:center;
  align-content:center;
  gap:18px;
  padding:24px;
  text-align:center;
  color:var(--green);
}

.loading p {
  max-width:420px;
  margin:0;
}

.brand-mark {
  font-family:Georgia,serif;
  font-size:36px;
  line-height:1;
  color:var(--green);
  display:inline-block;
  transform:rotate(-25deg);
}

.auth-wrap {
  max-width:430px;
  margin:0 auto;
  padding:60px 22px 30px;
}

.auth-brand {
  font-family:Georgia,serif;
  font-size:43px;
  text-align:center;
  letter-spacing:-2px;
  margin-bottom:38px;
}

.auth-brand .brand-mark {
  font-size:43px;
}

.brand-caption {
  display:block;
  font-family:system-ui,sans-serif;
  font-size:9px;
  letter-spacing:2px;
  color:var(--muted);
  margin-top:12px;
}

.auth-card {
  background:var(--surface);
  border:1px solid var(--line);
  padding:28px;
  border-radius:var(--radius);
}

.auth-card h1 {
  font-size:31px;
}

.auth-card p {
  color:var(--muted);
  font-size:14px;
}

.auth-card .error {
  color:var(--danger);
}

label {
  display:block;
  font-size:13px;
  font-weight:550;
  margin-bottom:8px;
}

input:not([type=checkbox]),textarea,select {
  width:100%;
  padding:13px;
  border:1px solid var(--input-border);
  border-radius:10px;
  background:var(--surface);
  color:var(--ink);
  min-height:46px;
}

input,textarea {
  font-size:16px;
}

textarea {
  resize:vertical;
}

input[type=checkbox] {
  accent-color:var(--green);
  width:20px;
  height:20px;
  flex-shrink:0;
}

.password-field {
  display:flex;
  position:relative;
  margin-bottom:16px;
}

.password-field input {
  padding-right:70px;
}

.password-field button {
  position:absolute;
  right:4px;
  top:4px;
  height:40px;
  font-size:12px;
  background:transparent;
  color:var(--green);
}

.checkbox-label {
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:23px 0;
  font-size:13px;
  font-weight:400;
  line-height:1.5;
}

.checkbox-label small {
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-top:5px;
}

.privacy-line {
  text-align:center!important;
  font-size:11px!important;
  margin:23px 0 0;
}

.auth-foot {
  text-align:center;
  color:var(--muted);
  font-size:12px;
  margin:25px 0;
}

.app-header {
  max-width:1120px;
  height:90px;
  margin:auto;
  padding:0 38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
}

.brand {
  font-family:Georgia,serif;
  font-size:36px;
  text-decoration:none;
  letter-spacing:-1px;
  display:flex;
  align-items:center;
  gap:8px;
}

.header-caption {
  font-size:9px;
  letter-spacing:2px;
  color:var(--muted);
}

.app-main {
  max-width:1080px;
  padding:42px 38px 130px;
  margin:auto;
}

.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:30px;
  gap:20px;
}

.subheading {
  color:var(--muted);
  font-size:14px;
  margin-bottom:0;
}

.calendar-layout {
  display:grid;
  grid-template-columns:1.35fr 1fr;
  gap:24px;
}

.calendar-card,.day-card,.chart-card,.settings-card {
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:26px;
  background:var(--surface);
}

.section-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.section-top h2,.section-top p {
  margin-bottom:0;
}

.month-controls {
  display:flex;
  align-items:center;
  gap:1px;
}

.month-controls .icon-button {
  width:38px;
}

.month-controls .text-button {
  font-size:11px;
  padding:8px;
}

.weekdays,.calendar-grid {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  text-align:center;
}

.weekdays {
  padding:21px 0 12px;
  font-size:11px;
  color:var(--muted);
}

.calendar-grid {
  row-gap:4px;
}

.day {
  position:relative;
  aspect-ratio:1;
  max-height:56px;
  border-radius:14px;
  background:transparent;
  font-size:14px;
  padding:0;
  margin:1px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  border:1px solid transparent;
}

.day.outside {
  color:var(--outside-day);
}

.day.future {
  color:var(--future-day);
}

.day.has-flow {
  background:var(--rose-light);
  color:var(--flow-text);
}

.day.has-spotting {
  background:var(--spotting-bg);
  color:var(--spotting-text);
}

.day.today {
  border-color:var(--green);
  font-weight:700;
}

.day.selected {
  background:var(--green);
  color:var(--on-accent);
  border-color:var(--green);
}

.day:hover {
  outline:1px solid var(--hover-border);
  outline-offset:-1px;
}

.day-dot {
  width:4px;
  height:4px;
  border-radius:50%;
  background:transparent;
  position:absolute;
  bottom:5px;
}

.has-entry .day-dot {
  background:var(--green);
}

.selected .day-dot {
  background:var(--on-accent);
}

.calendar-legend {
  display:flex;
  gap:17px;
  justify-content:center;
  border-top:1px solid var(--line);
  padding-top:17px;
  margin-top:20px;
  font-size:10px;
  color:var(--muted);
}

.calendar-legend span {
  display:flex;
  align-items:center;
  gap:5px;
}

.legend-dot {
  width:8px;
  height:8px;
  display:inline-block;
  border-radius:50%;
  flex-shrink:0;
}

.bleeding {
  background:var(--bleeding-dot);
}

.spotting {
  background:var(--spotting-dot);
}

.recorded {
  background:var(--green);
}

.calendar-note {
  display:flex;
  gap:8px;
  align-items:center;
  margin:22px -26px -26px;
  padding:15px 25px;
  background:var(--calendar-note-bg);
  border-radius:0 0 var(--radius) var(--radius);
  font-size:11px;
  color:var(--calendar-note-text);
  line-height:1.6;
}

.calendar-note>span:first-child {
  font-size:22px;
}

.day-card {
  background:var(--day-card-bg);
  border-color:var(--day-card-border);
  display:flex;
  flex-direction:column;
}

.day-card>.section-top {
  margin:5px 0 19px;
}

.day-card h2 {
  font-family:Georgia,serif;
  font-weight:400;
  font-size:26px;
}

.status-tag {
  font-size:10px;
  background:var(--badge-bg);
  color:var(--green);
  border-radius:20px;
  padding:5px 9px;
}

.day-card #day-content {
  flex:1;
}

.empty-day {
  padding:25px 8px 28px;
  text-align:center;
}

.empty-illustration {
  width:68px;
  height:68px;
  border:1px solid var(--illustration-border);
  border-radius:50%;
  display:grid;
  place-items:center;
  margin:0 auto 19px;
  color:var(--illustration-text);
  font-family:Georgia,serif;
  font-size:43px;
  line-height:1;
}

.empty-day h3 {
  font-size:15px;
  font-weight:550;
  margin:0 0 8px;
}

.empty-day p {
  font-size:12px;
  color:var(--muted);
  max-width:230px;
  margin:0 auto;
}

.day-card>.text-button {
  margin-top:6px;
}

.day-summary {
  display:flex;
  flex-direction:column;
  gap:15px;
  padding:5px 0 23px;
}

.summary-row {
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.summary-icon {
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  background:var(--badge-bg);
  border-radius:10px;
  font-size:16px;
  flex-shrink:0;
}

.summary-row small {
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-bottom:2px;
}

.summary-row strong {
  display:block;
  font-size:13px;
  font-weight:550;
  line-height:1.5;
}

.saved-note {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:12px;
  line-height:1.6;
  padding:12px;
  background:var(--note-bg);
  border-radius:10px;
}

.insight-strip {
  display:flex;
  align-items:center;
  gap:40px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:23px 10px;
  margin-top:28px;
}

.metric-label {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-bottom:8px;
}

.insight-strip strong {
  font-family:Georgia,serif;
  font-size:27px;
  font-weight:400;
}

.insight-strip small {
  font-family:system-ui,sans-serif;
  font-size:12px;
  color:var(--muted);
  padding-left:4px;
}

.insight-copy {
  display:flex;
  align-items:center;
  gap:18px;
  margin-left:auto;
}

.insight-copy p {
  font-size:11px;
  color:var(--muted);
  margin:0;
}

.insight-strip .insight-copy strong {
  font-family:system-ui,sans-serif;
  font-size:11px;
  font-weight:500;
  color:var(--ink);
}

.tiny-leaf {
  font-size:32px;
  color:var(--decoration);
}

.quiet-note {
  color:var(--muted);
  font-size:11px;
  line-height:1.7;
  text-align:center;
  margin:22px 0 0;
}

.bottom-nav {
  position:fixed;
  bottom:20px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  justify-content:space-around;
  padding:7px 16px;
  border:1px solid var(--line);
  border-radius:18px;
  gap:15px;
  background:var(--surface);
  box-shadow:0 3px 15px var(--nav-shadow);
  z-index:10;
}

.bottom-nav button {
  display:flex;
  gap:8px;
  align-items:center;
  padding:10px 16px;
  background:none;
  border-radius:10px;
  color:var(--muted);
  font-size:12px;
  min-height:44px;
}

.bottom-nav button.active {
  background:var(--light-green);
  color:var(--green);
  font-weight:600;
}

.bottom-nav svg {
  width:19px;
  height:19px;
}

.bottom-nav circle {
  fill:var(--surface);
}

.chart-card {
  margin-bottom:30px;
}

.chart-card>.section-top .muted {
  font-size:11px;
}

.chart-empty {
  padding:35px 15px;
  text-align:center;
  color:var(--muted);
  font-size:13px;
}

.temperature-svg {
  width:100%;
  height:170px;
  display:block;
  margin:16px 0 0;
}

.temperature-svg text {
  font-size:11px;
  fill:var(--muted);
  stroke:none;
}

.temperature-svg .chart-line {
  stroke:var(--green);
  stroke-width:2;
  fill:none;
}

.temperature-svg .chart-grid {
  stroke:var(--line);
  stroke-width:1;
}

.temperature-svg circle {
  fill:var(--green);
  stroke:var(--surface);
  stroke-width:2;
}

.chart-caption {
  font-size:11px;
  color:var(--muted);
  margin:0;
}

.history-heading {
  margin:0 0 16px;
}

.history-heading select {
  width:auto;
  font-size:12px;
}

.history-item {
  display:flex;
  align-items:center;
  gap:17px;
  text-align:left;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  padding:18px;
  margin-bottom:10px;
  width:100%;
}

.history-item:hover {
  border-color:var(--history-hover);
}

.history-date {
  font-size:21px;
  font-family:Georgia,serif;
  text-align:center;
  width:45px;
  flex-shrink:0;
}

.history-date small {
  display:block;
  font-family:system-ui,sans-serif;
  font-size:10px;
  color:var(--muted);
  margin-top:5px;
}

.history-text {
  flex:1;
  min-width:0;
}

.history-text strong {
  font-size:13px;
  font-weight:550;
}

.history-text p {
  margin:5px 0 0;
  font-size:11px;
  color:var(--muted);
  overflow-wrap:anywhere;
}

.history-arrow {
  color:var(--history-arrow);
}

.settings-view {
  max-width:660px;
  margin:auto;
}

.settings-card {
  margin-bottom:18px;
}

.settings-card p {
  font-size:13px;
  color:var(--muted);
}

.settings-card label {
  margin-top:18px;
}

.settings-card .small {
  font-size:11px;
  margin:15px 0 0;
}

.settings-card form>.button {
  margin-top:18px;
}

.logout {
  display:block;
  margin-top:14px;
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

dialog {
  color:var(--ink);
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:22px;
  padding:0;
  max-width:560px;
  width:calc(100% - 32px);
  max-height:90dvh;
  box-shadow:0 14px 80px var(--dialog-shadow);
}

dialog::backdrop {
  background:var(--backdrop);
}

body:has(dialog[open]) {
  overflow:hidden;
}

#entry-form {
  display:flex;
  flex-direction:column;
  max-height:90dvh;
}

.editor-header {
  padding:22px 26px 18px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-shrink:0;
}

.editor-header .eyebrow {
  margin-bottom:7px;
  font-size:9px;
}

.editor-header h2 {
  font-family:Georgia,serif;
  font-size:25px;
  font-weight:400;
  margin:0;
}

.editor-body {
  overflow-y:auto;
  padding:20px 26px;
  overscroll-behavior:contain;
}

.editor-intro {
  font-size:12px;
  color:var(--muted);
  margin-bottom:22px;
}

fieldset {
  border:0;
  padding:0;
  margin:0 0 22px;
  min-width:0;
}

legend {
  font-size:14px;
  font-weight:600;
  margin-bottom:12px;
  padding:0;
}

.field-hint {
  font-size:11px;
  color:var(--muted);
  margin:-5px 0 12px;
  line-height:1.5;
}

.flow-options {
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:6px;
}

.flow-choice {
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  padding:12px 2px;
  min-height:71px;
  font-size:10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.flow-choice .drop {
  width:10px;
  height:13px;
  background:#d1d4cc;
  border-radius:80% 0 60% 50%;
  transform:rotate(-45deg);
}

.flow-choice[data-value=spotting] .drop {
  background:#d8bcaa;
}

.flow-choice[data-value=light] .drop {
  background:#e4b3a8;
}

.flow-choice[data-value=medium] .drop {
  background:#c77e7b;
}

.flow-choice[data-value=heavy] .drop {
  background:#9e5059;
}

.flow-choice[aria-pressed=true] {
  border-color:var(--rose);
  background:var(--flow-selected);
  box-shadow:inset 0 0 0 1px var(--rose);
}

.flow-choice[data-value=none][aria-pressed=true] {
  border-color:var(--green);
  box-shadow:inset 0 0 0 1px var(--green);
  background:var(--light-green);
}

details {
  border-top:1px solid var(--line);
  padding:0 0 4px;
}

summary {
  cursor:pointer;
  padding:18px 22px 18px 0;
  font-size:14px;
  font-weight:550;
  position:relative;
  list-style:none;
}

summary::-webkit-details-marker {
  display:none;
}

summary:after {
  content:'＋';
  position:absolute;
  right:0;
  color:var(--muted);
  font-size:17px;
  top:16px;
}

details[open]>summary:after {
  content:'−';
}

summary .muted {
  font-size:11px;
  font-weight:400;
  margin-left:6px;
}

details .chips {
  margin-bottom:20px;
}

details>fieldset:last-child {
  margin-bottom:10px;
}

#bleeding-details {
  margin:-6px 0 20px;
  border-bottom:1px solid var(--line);
}

.chips {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.chip {
  border:1px solid var(--line);
  border-radius:20px;
  min-height:40px;
  padding:9px 13px;
  font-size:12px;
  background:var(--surface);
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.chip[aria-pressed=true] {
  border-color:var(--green);
  color:var(--green);
  background:var(--light-green);
  box-shadow:inset 0 0 0 .5px var(--green);
}

.moods .chip {
  padding:10px 13px;
}

.input-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-bottom:15px;
}

details>input {
  margin-bottom:16px;
}

.notes-label {
  margin-top:22px;
}

.editor-footer {
  border-top:1px solid var(--line);
  padding:14px 26px 20px;
  background:var(--surface);
  flex-shrink:0;
}

.editor-footer .error {
  margin:0 0 10px;
}

.danger {
  color:var(--danger);
  margin-top:15px;
}

.toast {
  position:fixed;
  bottom:110px;
  left:50%;
  transform:translateX(-50%);
  padding:13px 20px;
  background:var(--ink);
  color:var(--toast-text);
  border-radius:12px;
  font-size:13px;
  box-shadow:0 4px 15px #0002;
  z-index:40;
  max-width:calc(100% - 32px);
  text-align:center;
  width:max-content;
}

#confirm-dialog {
  padding:26px;
  max-width:410px;
}

#confirm-dialog h2 {
  font-size:20px;
}

#confirm-dialog p {
  font-size:13px;
  color:var(--muted);
}

.confirm-actions {
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:20px;
}

.sleep-label {
  margin-top:15px;
}

@media(min-width:1000px) {
  .day {
    max-height:60px;
  }
  .calendar-card {
    padding:30px;
  }
  .calendar-note {
    margin:22px -30px -30px;
    padding:15px 30px;
  }
  .day-card {
    padding:30px;
  }
}

@media(max-width:720px) {
  .app-header {
    height:72px;
    padding:0 22px;
    margin:0 20px;
  }
  .header-caption {
    font-size:8px;
    letter-spacing:1px;
  }
  .app-main {
    padding:27px 20px 125px;
  }
  .page-heading {
    margin-bottom:24px;
  }
  h1 {
    font-size:32px;
  }
  .subheading {
    font-size:12px;
  }
  .eyebrow {
    font-size:9px;
    letter-spacing:1.5px;
  }
  .desktop-entry {
    display:inline-flex;
    margin-top:18px;
  }
  .page-heading {
    display:block;
  }
  .calendar-layout {
    grid-template-columns:1fr;
    gap:18px;
  }
  .calendar-card {
    padding:20px;
  }
  .calendar-note {
    margin:20px -20px -20px;
    padding:13px 20px;
  }
  .calendar-legend {
    margin-top:16px;
    padding-top:15px;
    gap:16px;
  }
  .day {
    max-height:none;
    min-height:41px;
    border-radius:12px;
    margin:1px;
    font-size:13px;
  }
  .weekdays {
    padding-top:16px;
  }
  .calendar-grid {
    row-gap:1px;
  }
  .day-card {
    padding:23px;
  }
  .day-card>.section-top {
    margin:0 0 14px;
  }
  .day-card h2 {
    font-size:24px;
  }
  .empty-day {
    padding:7px 0 20px;
    display:grid;
    grid-template-columns:50px 1fr;
    text-align:left;
    gap:0 14px;
    align-items:center;
  }
  .empty-illustration {
    grid-row:1/3;
    width:48px;
    height:48px;
    font-size:31px;
    margin:0;
  }
  .empty-day h3 {
    font-size:13px;
    margin:0 0 5px;
  }
  .empty-day p {
    max-width:none;
    margin:0;
    font-size:11px;
  }
  .insight-strip {
    gap:25px;
    padding:20px 4px;
    margin-top:22px;
    flex-wrap:wrap;
  }
  .insight-strip strong {
    font-size:25px;
  }
  .insight-strip small {
    font-size:11px;
  }
  .insight-copy {
    width:100%;
    margin-left:0;
    gap:13px;
    padding-top:4px;
  }
  .insight-copy br {
    display:none;
  }
  .insight-copy p {
    font-size:11px;
  }
  .insight-strip .insight-copy strong {
    margin-left:3px;
  }
  .tiny-leaf {
    font-size:22px;
  }
  .bottom-nav {
    bottom:0;
    left:0;
    transform:none;
    width:100%;
    border-radius:0;
    padding:8px 12px calc(8px + env(safe-area-inset-bottom));
    gap:0;
    border-left:0;
    border-right:0;
    border-bottom:0;
  }
  .bottom-nav button {
    flex:1;
    flex-direction:column;
    gap:5px;
    padding:8px 4px;
    max-width:130px;
    font-size:10px;
  }
  .bottom-nav svg {
    width:20px;
    height:20px;
  }
  .toast {
    bottom:95px;
  }
  .chart-card {
    padding:20px;
  }
  .chart-card .section-top {
    align-items:flex-start;
  }
  .chart-card h2 {
    font-size:17px;
  }
  .history-heading h2 {
    font-size:17px;
  }
  .history-heading select {
    max-width:170px;
  }
  .settings-card {
    padding:22px;
  }
  .settings-card .button {
    width:100%;
  }
  .settings-card .logout {
    margin:12px auto 0;
  }
  .quiet-note {
    font-size:10px;
  }
  .app-header .brand {
    font-size:31px;
  }
  .app-header .brand-mark {
    font-size:32px;
  }
}

@media(max-width:480px) {
  .app-header {
    padding:0 2px;
  }
  .header-caption {
    display:none;
  }
  dialog#entry-dialog {
    max-width:none;
    width:100%;
    max-height:95dvh;
    margin:auto 0 0;
    border-radius:24px 24px 0 0;
    border-bottom:0;
  }
  #entry-form {
    max-height:95dvh;
  }
  .editor-header {
    padding:21px 21px 17px;
  }
  .editor-body {
    padding:18px 21px;
  }
  .editor-footer {
    padding:12px 21px calc(14px + env(safe-area-inset-bottom));
  }
  .auth-wrap {
    padding-top:40px;
  }
  .auth-card {
    padding:25px 22px;
  }
  .auth-brand {
    margin-bottom:28px;
  }
  .auth-card h1 {
    font-size:29px;
  }
  .flow-choice {
    font-size:9px;
  }
  .flow-options {
    gap:5px;
  }
  .day-summary {
    gap:12px;
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
  }
}

input::placeholder,textarea::placeholder {
  color:var(--muted);
  opacity:1;
}

.reminder-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.settings-card .error {
  color:var(--danger);
}
