.today-screen {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  /* F7.2.1: space-2 -> space-3 — matches the Settings placeholder's own
     top clearance (the other "normal padded screen" in the app, as
     opposed to Home's flush-Hero top), giving Today a calmer arrival
     instead of starting right at the screen edge. */
  padding-top: 0;
  /* Extra clearance: expanded accordions run taller. */
  padding-bottom: var(--space-4);
}

/* --- Date selector --------------------------------------------------------- */

.date-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  /* F7.2.1: pulls the date selector closer to the header than the column's
     own uniform --space-3 gap (24px) would, so the two read as one related
     top unit — the same proximity technique used for Home's Journey/
     Medication pairing. Net visual gap becomes --space-2 (16px). */
  margin-top: calc(var(--space-2) - var(--space-3));
  /* F7.2.1: a soft, intentional control-surface treatment (the same
     background/radius/shadow recipe as the shared .card component) rather
     than the previous bare row — the prev/next buttons and date label now
     read as one connected unit instead of controls floating directly on
     the page background. */
  padding: var(--space-1) var(--space-2);
  background-color: var(--color-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.date-selector__nav {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background-color: var(--color-surface-soft);
  border: none;
  font-size: 20px;
  color: var(--color-text);
  cursor: pointer;
}

.date-selector__nav:disabled {
  color: var(--color-disabled);
  cursor: not-allowed;
}

.date-selector__label {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-0-5);
}

.date-selector__label p {
  margin: 0;
  /* F7.2.1: a touch larger than the inherited 16px body size, for a
     clearer, more confidently-sized central date label now that it sits
     inside its own control surface. */
  font-size: 17px;
  font-weight: 600;
}

/* --- Completion summary ------------------------------------------------------ */

.today-summary {
  padding: 0 0 var(--space-1);
}

.today-summary__count {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  margin: 0;
}

.today-summary__phrase {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: var(--space-0-5) 0 0;
}

/* --- Add list (the Add to today sheet) ---------------------------------------- */

.add-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.add-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 60px;
  padding: var(--space-1) 0;
  border: none;
  border-top: 1px solid var(--color-divider);
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.add-list li:first-child .add-row {
  border-top: none;
}

.add-row:active {
  background-color: var(--color-surface-soft);
}

.add-row__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.add-row__label {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text);
}

.add-row__last {
  font-size: 13px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.add-row__chevron {
  flex: none;
  font-size: 22px;
  color: var(--color-text-muted);
}

.today-placeholder {
  color: var(--color-text-secondary);
}

/* --- Sheet panel (D2b) ----------------------------------------------------------
   The category forms that used to live in accordion panels now sit in the
   shared bottom sheet (components.css .sheet). The panel is just the
   vertical rhythm for their content. */

.sheet-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.accordion-panel__note {
  color: var(--color-text-muted);
  font-size: 13px;
  margin: 0;
}

.accordion-panel__not-applicable {
  align-self: flex-start;
  /* F7.2.2: a touch of extra separation above this one specifically — it's
     a distinct, secondary "escape hatch" action, not another row in the
     content above it, so it benefits from reading a little apart rather
     than sharing the panel's own uniform 8px rhythm with everything else. */
  margin-top: var(--space-0-5);
  height: 36px;
  padding: 0 var(--space-1);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
}

.section-headline {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

/* --- Quick entry (inline logging controls) ----------------------------------- */

.quick-entry {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  /* F7.2.2: uniform space-2 (16px) on every side, up from the previous
     8px/16px — a calmer, less cramped panel now that the rest of Today's
     cards carry the same rhythm, without affecting the wrapped chip/input
     rows themselves (still flex-wrap, still clear of the fixed FAB). */
  /* D2b: flat inside the sheet — the sheet is the surface, so no second
     tinted box around the form. */
  padding: 0;
}

/* F7.2.2: calmer, quieter voice — dropped the uppercase/letter-spacing
   treatment (SHOUTY MICRO-LABEL reads as prototype/clinical, and nothing
   on the refreshed Home uses it) in favour of the same plain, muted,
   small-label voice already used elsewhere on Today. */
.quick-entry__label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.quick-entry__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.textarea--compact {
  min-height: 60px;
}

/* --- Observation / session rows --------------------------------------------- */

.observation-list {
  /* No gap here: each row's own padding + divider border already spaces
     entries — adding a gap on top of that doubled the whitespace. */
  display: flex;
  flex-direction: column;
}

.observation-row {
  padding: var(--space-1) 0;
  border-top: 1px solid var(--color-divider);
}

.observation-row:first-child {
  border-top: none;
}

.observation-row__meta {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
}

.observation-row__note {
  color: var(--color-text-secondary);
  margin: var(--space-0-5) 0 0;
}

/* --- General: real persisted observations (Milestone F1) ------------------- */

/* Editable rows are real <button> elements (tap row to edit — Today spec
   §21/§30), so they need the default button chrome reset back to look like
   the plain .observation-row div every other category still uses. */
.observation-row--editable {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-top: 1px solid var(--color-divider);
  cursor: pointer;
  font: inherit;
}

.observation-row--editable:first-child {
  border-top: none;
}

.observation-row--editing-inline {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.observation-row__status {
  margin: 0;
  min-height: 1em;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* F7.2.2: extended to cover Movement/Physio/Itchiness too — their loading/
   unavailable/error text (movement-section__state, physio-section__state,
   itchiness-section__state, all already rendered by today-view.js) had no
   matching CSS at all here, so it fell back to unstyled default black
   text instead of the calm muted treatment General/Medication already
   had. Same values, no new class introduced. */
.general-section__state,
.medication-section__state,
.movement-section__state,
.physio-section__state,
.itchiness-section__state {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0;
}

/* --- Medication -------------------------------------------------------------- */

.dose-list {
  display: flex;
  flex-direction: column;
}

.dose-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  border-top: 1px solid var(--color-divider);
}

.dose-row:first-child {
  border-top: none;
}

/* While unresolved, stack name/time above the action row so 3 buttons
   never squeeze the medication name into a narrow wrapping column. */
.dose-row--editing {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-1);
}

.dose-row__name {
  margin: 0;
  font-weight: 600;
}

.dose-row__time {
  color: var(--color-text-muted);
  font-size: 13px;
  margin: var(--space-0-5) 0 0;
}

/* The recorded reason on a resolved skipped/missed dose (real persisted
   path only) — sits under the scheduled time, same muted treatment. */
.dose-row__reason {
  color: var(--color-text-secondary);
  font-size: 13px;
  margin: var(--space-0-5) 0 0;
}

/* An as-needed event's optional note (Milestone F5.2) — same muted
   treatment as the reason line above, distinct only in wording/source. */
.dose-row__note {
  color: var(--color-text-secondary);
  font-size: 13px;
  margin: var(--space-0-5) 0 0;
}

.dose-row__actions {
  display: flex;
  gap: var(--space-1);
  width: 100%;
}

.dose-row__actions .btn {
  flex: 1;
  /* Reduce the base .btn's 20px horizontal padding: 3 buttons sharing a
     narrow row (further reduced by the FAB clearance reservation) leaves
     little room for "Skipped"/"Missed" at larger iOS text-zoom sizes. */
  padding-left: var(--space-1);
  padding-right: var(--space-1);
}

/* Real persisted path has FOUR dose actions (adds "Not required" per Today
   Screen Specification §11.3) — a 2x2 grid, mirroring Physio's
   .exercise-row__actions, so the longest label ("Not required") never
   squeezes the others on iPhone widths. Overrides the flex row above. */
.dose-row__actions--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.dose-row__actions--grid .btn {
  flex: none;
}

/* --- As-needed medication (Milestone F5.2) ------------------------------------ */

/* F9.1 visual polish: a calm divider (the same --color-divider token every
   row in this panel already uses for its own top border, and the same
   "divider + reduced margin" technique Home's own medication card
   established for separating its two groups — home.css's
   .home-medication__group + .home-medication__group) rather than a bare
   margin gap — reads as an integrated continuation of the same Medication
   panel, not a separately bolted-on block sitting underneath the scheduled
   dose list. */
.as-needed-section {
  margin-top: var(--space-1);
  padding-top: var(--space-1);
  border-top: 1px solid var(--color-divider);
}

/* F9.1 review correction: no second divider here — bracketing the trigger
   button between two rules (one above from .as-needed-section, one below
   from this) read as over-segmented rather than integrated. Plain spacing
   only, matching the calm gap used elsewhere between related-but-distinct
   blocks in this panel; the single divider on .as-needed-section above is
   enough to mark the one real boundary (scheduled list -> as-needed area
   as a whole). */
.as-needed-history {
  margin-top: var(--space-2);
}

/* F9.1 visual polish: aligned to the current small-label voice already
   established at F7.2.2 (.quick-entry__label: --color-text-muted/13px) —
   this heading had carried the older --color-text-secondary/14px pairing
   unchanged since F5.2. */
.as-needed-history__heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-1);
}

/* --- Physio -------------------------------------------------------------------- */

.exercise-list {
  display: flex;
  flex-direction: column;
}

.exercise-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  border-top: 1px solid var(--color-divider);
}

.exercise-row:first-child {
  border-top: none;
}

/* While unresolved, the row shows a 2x2 action grid below the title —
   side-by-side layout squeezed the title into a narrow column on iPhone
   widths once 4 buttons needed room. */
.exercise-row--editing {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-1);
}

.exercise-row__name {
  margin: 0;
  font-weight: 600;
}

.exercise-row__target {
  color: var(--color-text-muted);
  font-size: 13px;
  margin: var(--space-0-5) 0 0;
}

.exercise-row__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
  width: 100%;
}

.exercise-row__actions .btn {
  /* Same reasoning as .dose-row__actions: "Not required" is the longest
     label and needs the room at larger iOS text-zoom sizes. */
  padding-left: var(--space-1);
  padding-right: var(--space-1);
}

/* --- Poop ------------------------------------------------------------------------ */

.poop-editor {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* The Add-observation action is intentionally full-width; just keep its
   right edge clear of the fixed FAB rather than un-stretching it. */
[data-add-itchiness] {
  margin-right: 60px;
}

.poop-editor__count {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.poop-editor__count-value {
  font-size: 26px;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
}

/* --- Reason sheet (medication skip/missed) --------------------------------------- */

.reason-sheet__options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* --- As-needed medication sheet (Milestone F5.2) ------------------------------- */

.as-needed-sheet__medication-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.as-needed-sheet__amount-row {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.as-needed-sheet__amount {
  max-width: 100px;
}

.as-needed-sheet__unit {
  color: var(--color-text-muted);
  font-size: 14px;
}

.as-needed-sheet__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: var(--space-1) 0 var(--space-0-5);
}

.as-needed-sheet__feedback {
  color: var(--status-danger);
  font-size: 13px;
  margin: var(--space-1) 0 0;
}


/* ==========================================================================
   Design v2 D2a — merged Today: hero banner and overview
   ========================================================================== */

/* --- Hero banner (components/pet-hero.js) -------------------------------- */

.pet-hero {
  position: relative;
  margin-left: calc(var(--screen-padding) * -1);
  margin-right: calc(var(--screen-padding) * -1);
}

.pet-hero__photo {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.pet-hero__photo--loading,
.pet-hero__photo--unavailable {
  cursor: default;
}

.pet-hero__image-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: var(--hero-height);
  overflow: hidden;
  /* The photo dissolves into the page instead of ending in a curve. */
  -webkit-mask-image: var(--hero-fade);
  mask-image: var(--hero-fade);
}

.pet-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

/* The name sits on the page, under the fade, in ink — never over the photo. */
.pet-hero__scrim {
  display: none;
}

.pet-hero__info {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: calc(var(--space-5) * -1);
  padding: 0 var(--screen-padding) var(--space-2);
}

.pet-hero__greeting {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pet-hero__name-row {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 2px 0 0;
}

.pet-hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.05;
  color: var(--color-text);
}

.pet-hero__paw-icon {
  display: flex;
  flex-shrink: 0;
  color: var(--color-primary);
}

.pet-hero__paw-icon svg {
  width: 20px;
  height: 20px;
}

.pet-hero__error {
  color: var(--color-text-secondary);
  font-size: 13px;
  margin: var(--space-1) 0 0;
}

.pet-hero__info--flat {
  position: static;
  gap: var(--space-1);
  padding: var(--space-3) var(--screen-padding);
  color: var(--color-text);
}

.pet-hero__info--flat .pet-hero__greeting,
.pet-hero__info--flat .pet-hero__paw-icon {
  color: var(--color-text-secondary);
  text-shadow: none;
}

.pet-hero__info--flat .pet-hero__name {
  color: var(--color-text);
  text-shadow: none;
}

.pet-hero__image-wrap.pet-hero__skeleton-block,
.pet-hero__skeleton-line {
  background-color: var(--color-surface-muted);
  border-radius: var(--radius-small);
}

.pet-hero__skeleton-line {
  height: 16px;
}

.pet-hero__skeleton-line--name {
  width: 120px;
  height: 26px;
}

@media (prefers-reduced-motion: no-preference) {
  .pet-hero__skeleton-block,
  .pet-hero__skeleton-line {
    animation: pet-hero-pulse 1.4s ease-in-out infinite;
  }
}

@keyframes pet-hero-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* --- Overview -------------------------------------------------------------- */

.today-section-label {
  margin: 0 0 var(--space-1);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.today-strip {
  display: flex;
  margin: 0;
  padding: 0 0 var(--space-2);
  list-style: none;
  border-bottom: 1px solid var(--color-divider);
}

.today-strip__cell {
  flex: 1;
  min-width: 0;
  display: flex;
  border-left: 1px solid var(--color-divider);
}

.today-strip__cell:first-child {
  border-left: none;
}

/* Each figure opens its own sheet (same handler as the thread rows). */
.today-strip__button {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 0;
  padding: var(--space-0-5) var(--space-1);
  border: none;
  border-radius: var(--radius-small);
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.today-strip__cell:first-child .today-strip__button {
  padding-left: 0;
}

.today-strip__button:active {
  background-color: var(--color-primary-soft);
}

.today-strip__button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.today-strip__label {
  font-size: 11px;
  color: var(--color-text-muted);
}

.today-strip__value {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.25;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.today-strip__detail {
  font-size: 12px;
  line-height: 1.3;
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

.today-nextup {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border-radius: 18px;
  background-color: var(--color-primary-soft);
}

.today-nextup__text {
  flex: 1;
  min-width: 0;
}

.today-nextup__eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
}

.today-nextup__title {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-text);
}

.today-nextup__detail {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.today-nextup__cta {
  flex: none;
  min-height: 44px;
  padding: 0 var(--space-3);
  border: none;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary-dark);
  color: var(--color-on-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.today-thread__list {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.today-thread__list::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 18px;
  bottom: 18px;
  width: 1.5px;
  background-color: var(--color-divider);
}

.today-thread__empty {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.today-thread__button {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 48px;
  padding: var(--space-1) 0;
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.today-thread__dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background-color: var(--color-bg);
}

.today-thread__dot--done {
  background-color: var(--status-success);
  color: var(--color-on-primary);
}

.today-thread__dot--later {
  border: 1.5px dashed var(--color-disabled);
}

.today-thread__dot--partial {
  border: 2px solid var(--color-primary);
  background-color: var(--color-primary-soft);
}

.today-thread__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.today-thread__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
}

.today-thread__item--later .today-thread__title {
  color: var(--color-text-muted);
}

.today-thread__detail {
  font-size: 12.5px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-thread__meta {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.today-thread__avatar {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary-dark);
  color: var(--color-on-primary);
  font-size: 11px;
  font-weight: 600;
}

.today-thread__time {
  font-size: 12px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.today-week__list {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}

.today-week__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-0-5);
}

.today-week__weekday {
  font-size: 11px;
  color: var(--color-text-muted);
}

.today-week__dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  background-color: var(--color-surface-muted);
}

.today-week__dot--scale-1 { background-color: var(--scale-1); }
.today-week__dot--scale-2 { background-color: var(--scale-2); }
.today-week__dot--scale-3 { background-color: var(--scale-3); }
.today-week__dot--scale-4 { background-color: var(--scale-4); }
.today-week__dot--scale-5 { background-color: var(--scale-5); color: var(--color-on-primary); }

.today-week__day--today .today-week__dot {
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 3.5px var(--color-text);
}


/* --- Controls inside sheets (D2b restyle) -------------------------------------- */

.today-sheet .btn {
  border-radius: var(--radius-pill);
}

.today-sheet .textarea {
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

.today-sheet .textarea:focus-visible {
  border-bottom-color: var(--color-primary);
  box-shadow: none;
}

.today-sheet .observation-row__meta {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

/* The sheet header already carries the category summary line, so the section's
   own repeated headline is visual noise inside a sheet (it stays in the DOM
   for assistive tech and tests). */
.today-sheet .section-headline {
  display: none;
}

.today-sheet .sheet__header {
  gap: var(--space-1);
}

.today-sheet .sheet__header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
}

.today-sheet .sheet__header h2:focus {
  outline: none;
}

.today-sheet .sheet__close {
  margin-left: auto;
}

.rating-scale {
  margin: calc(var(--space-0-5) * -1) 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* --- Medication groups ---------------------------------------------------------------
   Doses sharing a time and meal instruction sit under one heading
   ("09:00 · With morning meal", "1 of 2"). The per-row time line stays in the
   DOM (and for assistive tech via the heading) but is not repeated visually. */

.dose-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.dose-group__heading {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-divider);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.dose-group__time {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.dose-group__meal {
  flex: 1;
  min-width: 0;
}

.dose-group__count {
  flex: none;
  font-size: 12px;
  color: var(--color-text-muted);
}

.dose-group--done .dose-group__time {
  color: var(--color-text-muted);
}

.dose-group .dose-row__time {
  display: none;
}

.dose-group .dose-list .dose-row:first-child {
  border-top: none;
}

/* --- Add rows: category icon ------------------------------------------------------------ */

.add-row__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.add-row__icon svg {
  width: 20px;
  height: 20px;
}

.today-sheet .badge {
  border-left: none;
  background-color: var(--color-surface-soft);
}

/* --- Outcome buttons (Medication and Physio) -------------------------------------------
   The exercise or dose name and amount, then one row of four evenly sized
   buttons directly beneath it. Given / Complete is the likely outcome and is
   toned (a soft tint) rather than a heavy fill; Skipped, Missed and Not
   required are clear outlined buttons, easy to hit without competing with
   it. Same buttons, attributes and handlers as the inline form had. */

.today-sheet .dose-row--editing,
.today-sheet .exercise-row--editing {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-1);
  padding: var(--space-1) 0;
}

.today-sheet .dose-row {
  padding: 6px 0;
}

.today-sheet .dose-row__name,
.today-sheet .exercise-row__name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
}

.today-sheet .exercise-row__target {
  font-size: 12.5px;
  margin: 0;
}

.dose-row__more,
.exercise-row__more {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.today-sheet .dose-row__more .btn,
.today-sheet .exercise-row__more .btn {
  flex: 0 0 auto;
  min-width: 0;
  height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-card);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.today-sheet .dose-row__more .btn:active,
.today-sheet .exercise-row__more .btn:active {
  background-color: var(--color-surface-soft);
}

.today-sheet .dose-row__more .dose-row__given,
.today-sheet .exercise-row__more .exercise-row__complete {
  background: var(--color-primary-soft);
  border-color: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.today-sheet .dose-row__more .btn:disabled,
.today-sheet .exercise-row__more .btn:disabled {
  opacity: 0.5;
}

.today-sheet .dose-row__more .btn--tertiary,
.today-sheet .exercise-row__more .btn--tertiary {
  border-color: transparent;
  background: transparent;
  color: var(--color-text-secondary);
}

/* One-line Physio note that opens up when it is used. */
.today-sheet .exercise-row__note {
  min-height: 36px;
  height: 36px;
  padding-top: 8px;
  padding-bottom: 4px;
  font-size: 14px;
  resize: none;
  transition: height var(--motion-fast) var(--ease-standard);
}

.today-sheet .exercise-row__note:focus,
.today-sheet .exercise-row__note:not(:placeholder-shown) {
  height: 72px;
}

/* --- Something else (D2c) -------------------------------------------------------------- */

.custom-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.custom-suggestions .chip {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.custom-error {
  margin: 0;
  min-height: 0;
  font-size: 13px;
  color: var(--status-danger);
}

.custom-error:empty {
  display: none;
}

.custom-optional {
  margin-left: var(--space-0-5);
  font-weight: 500;
  color: var(--color-text-muted);
}

.today-sheet [data-custom-save] {
  width: 100%;
}

/* --- Photos --------------------------------------------------------------------------- */

.today-thread__thumb {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-small);
  object-fit: cover;
  background-color: var(--color-surface-muted);
}

.photo-sheet__choose {
  width: 100%;
  height: 56px;
}

.photo-sheet__state {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.photo-sheet__preview {
  display: block;
  width: 100%;
  max-height: 46vh;
  object-fit: contain;
  border-radius: var(--radius-card);
  background-color: var(--color-surface-muted);
}

.today-sheet [data-photo-save] {
  width: 100%;
}

.photo-view__image {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius-card);
  background-color: var(--color-surface-muted);
}

.photo-view__caption {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.35;
  color: var(--color-text);
}

.photo-view__delete-link {
  align-self: flex-start;
  color: var(--status-danger);
}

.photo-view__confirm {
  margin: 0;
  font-size: 14px;
  color: var(--color-text);
}

.photo-view__confirm-actions {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.today-sheet .photo-view__delete {
  background-color: var(--status-danger);
  border-color: var(--status-danger);
  color: var(--color-on-primary);
}


/* --- Coming up (appointments and low stock) ----------------------------------- */

.today-coming {
  margin: 0 0 var(--space-3);
}

.today-coming__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.today-coming__item {
  border-bottom: 1px solid var(--color-divider);
}

.today-coming__item:last-child {
  border-bottom: none;
}

.today-coming__button {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: var(--space-1) 0;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--color-text);
  cursor: pointer;
}

.today-coming__title {
  font-family: var(--font-display);
  font-size: 18px;
}

.today-coming__detail {
  font-size: 13px;
  color: var(--color-text-secondary);
}


/* A small, quiet "Remove" under an entry the signed-in person recorded. */
.today-thread__item {
  position: relative;
}

.today-thread__remove {
  display: block;
  margin: -4px 0 var(--space-1) 38px;
  padding: 6px 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.dose-row__undo {
  margin: 4px 0 0;
  padding: 4px 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.confirm-sheet__body {
  margin: 0 0 var(--space-2);
  color: var(--color-text-secondary);
}


.today-viewing {
  margin: 0 0 var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-small);
  background-color: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-size: 13px;
}


/* Switch dog (multi-pet): a small pill on the banner, only with more than one dog. */
.pet-hero__switch {
  position: absolute;
  top: calc(var(--space-2) + env(safe-area-inset-top, 0px));
  right: var(--space-2);
  min-height: 36px;
  padding: 0 var(--space-2);
  border: none;
  border-radius: var(--radius-pill);
  background-color: var(--overlay-on-photo);
  color: var(--color-on-photo);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pet-switch__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pet-switch__row {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
  padding: var(--space-2) 0;
  border: none;
  border-bottom: 1px solid var(--color-divider);
  background: none;
  font: inherit;
  text-align: left;
  color: var(--color-text);
  cursor: pointer;
}

.pet-switch__name {
  font-family: var(--font-display);
  font-size: 20px;
}

.pet-switch__meta {
  flex: 1;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.pet-switch__check {
  font-weight: 700;
  color: var(--color-primary-dark);
}

/* Food sheet: meal and flavour chips. */
.food__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.food__chips .chip {
  min-height: 40px;
}

.food__hint {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* Care plan change notice (someone else changed the plan). */
.plan-notice {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-card);
  background: var(--color-card);
  border: 1px solid var(--color-border);
}

.plan-notice__block {
  display: grid;
  gap: var(--space-1);
}

.plan-notice__title {
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
}

.plan-notice__list {
  margin: 0;
  padding-left: var(--space-4);
  color: var(--color-text-secondary);
}

.plan-notice__note {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-secondary);
}
