.foundation-checklist-grid {
  --foundation-task-title: 700 .94rem/1.2 var(--serif);
  --foundation-task-caption: .70rem/1.35 var(--sans);
  --foundation-caption-inset: 1px;
  --foundation-caption-ink: #62675f;
  --foundation-icon-slot: 28px;
  --foundation-inline-gap: 6px;
  --foundation-column-inset: 7px;
  --foundation-face-inset: var(--foundation-column-inset);
  --foundation-action-slot: 44px;
  min-width: 0;
  gap: 7px;
  padding: 6px 0;
}
.foundation-checklist-grid > * { min-width: 0; }
/* All card faces share the same mark, copy and trailing action guides. */
.foundation-path .foundation-checklist-grid :is(.foundation-compact-check-tile, .foundation-compact-summary,
  .daily-log-portal, .foundation-direct-card) {
  padding-inline: var(--foundation-face-inset);
}
.foundation-path .foundation-checklist-grid :is(.foundation-compact-check-tile, .foundation-compact-summary,
  .daily-log-heading, .foundation-direct-head) {
  grid-template-columns: var(--foundation-icon-slot) minmax(0, 1fr) auto;
  column-gap: var(--foundation-inline-gap);
}
.foundation-path .foundation-checklist-grid .foundation-action-row {
  grid-template-columns: var(--foundation-icon-slot) minmax(0, 1fr) minmax(0, auto) auto;
  column-gap: var(--foundation-inline-gap);
  /* Detailed rows have no side border, unlike the cards beside them. */
  padding-inline: calc(var(--foundation-face-inset) + 1px);
}
.foundation-path .foundation-checklist-grid .foundation-action-row.has-solar-signal {
  padding-inline-start: calc(var(--foundation-face-inset) - 2px);
}
.foundation-checklist-grid .foundation-tile-identity { justify-self: center; }
.foundation-checklist-grid .foundation-ath-monogram {
  width: var(--foundation-icon-slot);
  text-align: center;
}
/* Titles identify the habit; smaller sans-serif text describes its current state. */
.foundation-path .foundation-checklist-grid :is(.foundation-item-copy, .foundation-direct-copy, .foundation-compact-copy,
  .foundation-preview-toggle, .daily-log-copy, .checklist-band-toggle, .foundation-focus-title,
  .checklist-journal-axis, .checklist-order-item, .checklist-exercise-options) > strong {
  color: var(--ink);
  font: var(--foundation-task-title);
  overflow-wrap: break-word;
}
.foundation-path .foundation-checklist-grid :is(.foundation-item-copy, .foundation-direct-copy, .foundation-compact-copy,
  .foundation-preview-caption, .daily-log-copy, .checklist-band-toggle) > small,
.foundation-checklist-grid .foundation-item-copy > p,
.foundation-checklist-grid .checklist-focus-card :is(.foundation-focus-comment, .foundation-progress) {
  margin-inline-start: var(--foundation-caption-inset);
  color: var(--foundation-caption-ink);
  font: var(--foundation-task-caption);
  font-variant-numeric: tabular-nums;
}
.foundation-checklist-grid .checklist-focus-card .foundation-focus-comment { color: var(--blue); }
.foundation-checklist-grid .daily-log-portal {
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  background: var(--paper-bright);
  padding: 7px 8px;
}
.foundation-checklist-grid .daily-log-heading { min-height: 50px; }
.foundation-checklist-grid .daily-log-heading :is(strong, small) { overflow-wrap: break-word; }
.foundation-path[data-display=compact] .foundation-checklist-grid > .daily-log-portal:not([data-expanded=true]) {
  grid-column: auto;
}
.foundation-checklist-grid :is(.daily-log-details, .checklist-group-details)[hidden] { display: none; }
.foundation-title-control {
  display: block;
  min-width: 0;
  width: 100%;
  border: 0;
  padding: 0;
  text-align: start;
  color: var(--ink);
  background: none;
  font: 700 .78rem/1.3 var(--sans);
  overflow-wrap: break-word;
}
button.foundation-title-control { min-height: 32px; cursor: pointer; }
button.foundation-title-control[aria-expanded=false]::after {
  content: " ▾";
  font-size: .7em;
  color: var(--muted);
}
button.foundation-title-control[aria-expanded=true]::after {
  content: " ▴";
  font-size: .7em;
  color: var(--muted);
}
button.foundation-title-control:focus-visible,
.foundation-checklist-grid :is(.text-button, .foundation-drag-grip):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.checklist-group-details { margin-top: 5px; color: var(--ink-soft); font: .75rem/1.55 var(--sans); }
.checklist-group-details > p { margin: 3px 0; }
.checklist-entries { list-style: none; padding: 0; margin: 2px 0 0; }
.checklist-log-entry, .checklist-saved-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 3px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.checklist-log-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.checklist-log-copy > * { display: block; }
.checklist-log-copy small { color: var(--muted); }
.checklist-log-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.checklist-log-actions button { min-height: 44px; min-width: 44px; }
.checklist-saved-note p { min-width: 0; overflow-wrap: anywhere; margin: 0; }
.checklist-card-note {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--blue) !important;
}
.checklist-saved-notes { margin-top: 5px; }
.checklist-saved-notes summary, .checklist-group-details > details > summary { padding: 8px 0; cursor: pointer; }
.checklist-panel-guidance { margin: 0 0 6px; color: var(--muted); font: .73rem/1.45 var(--sans); }
.checklist-note-flag { color: var(--muted); font: .68rem/1.3 var(--sans); }
.checklist-inline-note {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--rule-soft);
}
.checklist-inline-note textarea {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 9px;
  background: var(--paper-bright);
  color: var(--ink);
  font: 16px/1.35 var(--sans);
  resize: vertical;
}
.checklist-inline-note textarea::placeholder { color: var(--muted); }
.checklist-note-link {
  min-height: 44px;
  padding-inline: 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  color: var(--blue);
  font: 650 .71rem/1.25 var(--sans);
  cursor: pointer;
}
.checklist-note-link:hover { background: var(--blue-soft); }
.checklist-note-link:focus-visible, .checklist-inline-note :is(button,select,textarea,input):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.checklist-note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.checklist-note-actions[hidden], .checklist-exercise-options[hidden] { display: none; }
.checklist-note-actions select {
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 5px;
  background: var(--paper-bright);
  color: var(--ink);
  font: 16px/1.25 var(--sans);
}
.checklist-note-actions label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  color: var(--ink-soft);
  font: .75rem/1.25 var(--sans);
}
.checklist-note-buttons, .checklist-exercise-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.checklist-note-buttons { margin-inline-start: auto; justify-content: flex-end; }
.checklist-note-buttons button, .checklist-exercise-tools button { min-height: 44px; }
.checklist-note-buttons .foundation-value-save:disabled {
  border-color: var(--rule-soft);
  background: var(--paper);
  color: var(--muted);
}
.checklist-note-message {
  margin: 0;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  font: .74rem/1.4 var(--sans);
}
.checklist-note-message:empty { display: none; }
.checklist-exercise-options { grid-column: 1 / -1; min-width: 0; padding: 7px; background: var(--paper); border-radius: 4px; }
.checklist-exercise-options > strong { display: block; margin-bottom: 4px; font: 700 .73rem/1.25 var(--sans); }
.foundation-direct-card[data-expanded=true] :is(.foundation-preview-caption, .foundation-direct-copy) .checklist-card-note,
.checklist-group[data-expanded=true] .checklist-current-note-preview { display: none !important; }
/* Match the previous paper-backed tile without inheriting the group's tint. */
.checklist-focus-card { background-color: color-mix(in srgb, var(--paper) 52%, #fff); }
.foundation-focus-item.checklist-focus-card { grid-template-rows: auto minmax(0, 1fr) auto auto; }
.checklist-focus-card .foundation-focus-title { grid-row: 1; }
.checklist-focus-card .foundation-focus-comment { grid-row: 2; align-self: start; }
.checklist-focus-card :is(.foundation-amount-control.is-compact, .foundation-workout-open) { grid-row: 3; align-self: end; }
.checklist-focus-card .foundation-amount-control > .foundation-progress { white-space: normal; overflow-wrap: anywhere; }
.checklist-focus-card .foundation-exercise-menu:focus-visible { outline: 2px solid var(--blue); outline-offset: -1px; }
.checklist-focus-card .foundation-exercise-menu:is(.has-note,[aria-expanded=true]) { border-radius: 4px; background: var(--blue-soft); }
.checklist-exercise-recent {
  grid-row: 4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  min-height: 30px;
}
.checklist-exercise-recent .foundation-undo { min-height: 30px; }
.checklist-exercise-recent .foundation-fitness-state { max-width: 100%; white-space: normal; }
.checklist-quick-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  padding: 6px 0;
  margin: 0 0 4px;
  border-bottom: 1px solid var(--rule-soft);
}
.checklist-quick-fields { display: flex; gap: 6px; }
.checklist-quick-fields label { display: grid; flex: 1; min-width: 0; gap: 3px; font: .69rem/1.25 var(--sans); }
.checklist-quick-fields :is(input,select) {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 5px 7px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-bright);
  color: var(--ink);
  font: 16px/1.25 var(--sans);
}
.checklist-quick-record button { min-height: 44px; }
.foundation-checklist-grid .checklist-band {
  grid-column: 1 / -1;
  min-width: 0;
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  background: var(--paper-bright);
}
.checklist-band-head {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-inline-end: var(--foundation-face-inset);
}
.checklist-band-toggle {
  display: grid;
  grid-template:
    "mark name caret" auto
    "mark caption caret" auto /
    var(--foundation-icon-slot) minmax(0, 1fr) var(--foundation-action-slot);
  align-items: center;
  align-content: center;
  gap: 2px var(--foundation-inline-gap);
  flex: 1;
  width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: 5px var(--foundation-face-inset);
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  text-align: start;
  cursor: pointer;
}
.checklist-band-head > .checklist-band-toggle { padding-inline-end: 0; }
.checklist-band-toggle > .foundation-tile-identity { grid-area: mark; }
.checklist-band-toggle > strong { grid-area: name; }
.checklist-band-toggle > small { grid-area: caption; min-width: 0; }
.checklist-band-chevron {
  grid-area: caret;
  display: grid;
  place-items: center;
  justify-self: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--ink-soft);
}
.checklist-band-chevron::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.checklist-band-toggle[aria-expanded=true] .checklist-band-chevron::before {
  margin-top: 3px;
  transform: rotate(225deg);
}
.checklist-band-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.checklist-band-toggle:is(:hover, :focus-visible) .checklist-band-chevron { color: var(--blue); }
.checklist-major {
  --foundation-crest: #516968;
  --foundation-group-tint: 6%;
}
.checklist-major[data-expanded=true] { --foundation-group-tint: 10%; }
.checklist-major[data-checklist-key=food-checks] { --foundation-crest: #656c45; }
.checklist-major[data-checklist-key=recovery-sun] { --foundation-crest: #87613b; }
.checklist-major[data-checklist-key=family-presence] { --foundation-crest: #465e77; }
.checklist-major[data-checklist-key=supplements] { --foundation-crest: #6c6076; }
.foundation-checklist-grid .checklist-major {
  background-color: color-mix(in srgb, var(--paper-bright), var(--foundation-crest) var(--foundation-group-tint));
}
.checklist-major > .checklist-band-toggle {
  position: relative;
  isolation: isolate;
}
.checklist-major > .checklist-band-toggle::after {
  --foundation-frieze-fade: linear-gradient(to right, transparent, rgb(0 0 0 / .42) 27%, #000 78%);
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: 4px;
  inset-inline-end: 12px;
  width: min(48%, 232px);
  background: url("./foundation-frieze.svg?v=10.15.9") repeat-x right center / auto 24px;
  -webkit-mask-image: var(--foundation-frieze-fade);
  mask-image: var(--foundation-frieze-fade);
  opacity: .23;
  pointer-events: none;
}
.checklist-major .checklist-band-toggle > .foundation-tile-identity {
  width: 26px;
  height: 26px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--foundation-crest) 32%, var(--rule-soft));
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--paper-bright), var(--foundation-crest) 9%);
  color: var(--foundation-crest);
}
.checklist-major .checklist-band-chevron {
  border: 1px solid color-mix(in srgb, var(--foundation-crest) 26%, var(--rule-soft));
  background: color-mix(in srgb, var(--paper-bright), var(--foundation-crest) 6%);
  color: var(--foundation-crest);
}
.checklist-major .checklist-band-toggle[aria-expanded=true] .checklist-band-chevron {
  background: color-mix(in srgb, var(--paper-bright), var(--foundation-crest) 17%);
}
@media (forced-colors: active) {
  .checklist-major > .checklist-band-toggle::after { display: none; }
}
.checklist-band-body {
  min-width: 0;
  border-top: 1px solid var(--rule-soft);
}
.foundation-checklist-grid .checklist-band > [hidden] { display: none; }
.foundation-path .foundation-checklist-grid > .checklist-category > .checklist-category-body {
  /* Keep the nested outline without adding a step to the parent's guides. */
  --foundation-category-gutter: 3px;
  --foundation-face-inset: calc(var(--foundation-column-inset) - var(--foundation-category-gutter) - 1px);
  align-items: start;
  gap: 5px;
  padding: 5px var(--foundation-category-gutter);
}
.foundation-path[data-display=compact] .foundation-checklist-grid > .checklist-ath-anchor {
  grid-column: 1 / -1;
}
.checklist-ath-anchor > .foundation-item-copy { display: grid; gap: 3px; }
.checklist-band .foundation-tile-add.checklist-ath-add {
  flex: 0 0 var(--foundation-action-slot);
  min-width: var(--foundation-action-slot);
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  color: var(--blue);
  font: 700 .82rem/1 var(--sans);
  cursor: pointer;
}
.checklist-band .checklist-ath-add:hover { background: var(--blue-soft); }
.checklist-band .checklist-ath-add:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.checklist-ath-journal { padding: 8px; font: .74rem/1.4 var(--sans); color: var(--ink-soft); }
.checklist-journal-label { margin: 0 0 4px; color: var(--muted); }
.checklist-journal-occasion { padding: 6px 0; border-top: 1px solid var(--rule-soft); }
.checklist-journal-axis { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.checklist-journal-axis small { color: var(--muted); }
.checklist-journal-axis[data-recorded=true] small { color: var(--green); }
.checklist-journal-note { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.foundation-path[data-display=compact] .checklist-category-body > .checklist-group[data-checklist-key=head-massage] {
  grid-column: 1 / -1;
}
.checklist-category-body [data-checklist-key=head-massage] .checklist-quick-record { max-inline-size: 420px; }
@media (max-width: 450px) {
  .checklist-quick-record[data-record-kind=rest] { grid-template-columns: minmax(0, 1fr); }
  .checklist-quick-record[data-record-kind=rest] button { justify-self: end; }
}
.foundation-checklist-grid > .checklist-order-item {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 4px 12px;
  min-height: 48px;
}
.checklist-order-item .foundation-drag-grip { min-height: 44px; min-width: 44px; touch-action: none; }
.checklist-order-item.is-dragging { box-shadow: inset 3px 0 var(--blue); background: var(--blue-soft); }
.checklist-hidden-evidence { grid-column: 1 / -1; min-width: 0; }
.checklist-hidden-evidence summary { cursor: pointer; padding: 6px 0; }
.checklist-hidden-evidence p { overflow-wrap: anywhere; }
.foundation-checklist-grid > .is-located { outline: 2px solid var(--blue); outline-offset: -2px; }
.foundation-checklist-grid :is(.daily-exercises-body, .checklist-category-body) .is-located { outline: 2px solid var(--blue); outline-offset: -2px; }

/* Compact is a card layout, not a smaller version of the details screen. */
.foundation-path[data-display=compact] .foundation-checklist-grid > :is(.foundation-compact-check-tile, .daily-log-portal, .foundation-direct-card) {
  min-height: 54px;
  padding-block: 4px;
}
.foundation-path[data-display=compact] .foundation-checklist-grid .daily-log-heading {
  min-height: 44px;
}
.foundation-path[data-display=compact] .foundation-checklist-grid .daily-log-portal:not([data-expanded=true]) .daily-log-heading {
  height: auto;
}
.foundation-checklist-grid .foundation-direct-card {
  grid-column: 1 / -1;
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  background: var(--paper-bright);
}
.foundation-checklist-grid .foundation-direct-card.has-completed-coverage {
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 35%, var(--rule-soft));
}
.foundation-preview-head {
  --foundation-completion-slot: 0px;
  --foundation-preview-edge: var(--foundation-action-slot);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--foundation-preview-edge) var(--foundation-completion-slot);
  align-items: start;
}
.foundation-preview-head.has-completion-slot {
  --foundation-completion-slot: var(--foundation-action-slot);
  --foundation-preview-edge: 26px;
}
.foundation-preview-toggle {
  grid-area: 1 / 1 / 2 / 3;
  display: grid;
  grid-template-columns: var(--foundation-icon-slot) minmax(0, 1fr) var(--foundation-preview-edge);
  grid-template-rows: minmax(44px, auto) minmax(18px, auto);
  column-gap: var(--foundation-inline-gap);
  align-items: center;
  min-width: 0;
  border: 0;
  border-radius: 3px;
  padding: 0;
  color: var(--ink);
  background: none;
  text-align: start;
  cursor: pointer;
}
.foundation-preview-toggle > .foundation-tile-identity { grid-area: 1 / 1 / -1; }
.foundation-preview-toggle > strong {
  grid-area: 1 / 2;
}
.foundation-preview-caption {
  grid-area: 2 / 2 / 3 / 4;
  align-self: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--foundation-preview-edge);
  align-items: center;
  gap: 3px 5px;
  padding-block-end: 4px;
  margin-top: -5px;
  min-width: 0;
}
.foundation-preview-caption > small {
  overflow-wrap: anywhere;
}
.foundation-preview-stats { grid-area: 1 / 1; }
.foundation-preview-caption .checklist-card-note { grid-area: 2 / 1; }
.foundation-preview-chevron {
  grid-area: 1 / 2;
  justify-self: center;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
  color: var(--muted);
}
.foundation-preview-toggle[aria-expanded=true] .foundation-preview-chevron { transform: rotate(225deg); }
.foundation-preview-head.is-slim .foundation-preview-toggle { grid-template-rows: minmax(27px, auto) minmax(17px, auto); }
.foundation-preview-head.is-slim .foundation-preview-caption { margin-top: 0; padding-bottom: 1px; }
.foundation-preview-toggle:is(:hover,:focus-visible) .foundation-preview-chevron { color: var(--blue); }
.foundation-preview-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: -1px; }
/* Keep the earned check outside the disclosure, in the plain check column. */
.foundation-preview-status {
  grid-area: 1 / 3;
  min-height: 44px;
  display: grid;
  place-items: center;
}
.foundation-preview-status .foundation-achievement { width: 24px; height: 24px; }
.foundation-direct-head {
  display: grid;
  align-items: center;
  min-height: 44px;
}
.foundation-direct-copy { min-width: 0; display: grid; gap: 3px; }
.foundation-direct-readout, .foundation-direct-guidance {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.foundation-direct-readout .foundation-verdict { margin: 0; }
.foundation-direct-head :is(select, input, button, .foundation-workout-open) { min-height: 44px; }
.foundation-direct-head :is(select, input) {
  box-sizing: border-box;
  max-width: 100%;
  padding: 3px 6px;
  color: var(--ink);
  border: 1px solid var(--rule);
  background: var(--paper-bright);
  font: .82rem/1.25 var(--sans);
  font-variant-numeric: tabular-nums;
}
.foundation-direct-head select { width: 111px; border-radius: 4px; }
.foundation-direct-head .foundation-entry-form input {
  width: 56px;
  min-width: 0;
  appearance: textfield;
  font-size: .83rem;
}
.foundation-checklist-grid .foundation-entry-form input::-webkit-inner-spin-button,
.foundation-direct-head input::-webkit-inner-spin-button { display: none; }
.foundation-direct-head .foundation-entry-form button {
  min-width: 44px;
  padding: 0 4px;
  font: 600 1.06rem/1 var(--sans);
}
.foundation-direct-head .foundation-value-form {
  display: flex;
  align-items: stretch;
  gap: 3px;
}
.foundation-direct-head .foundation-value-form > label { display: block; }
.foundation-direct-head .foundation-value-form > label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.foundation-direct-head .foundation-value-form input { width: 65px; }
.foundation-direct-head .foundation-value-form input[type=time] { width: 121px; }
.foundation-direct-head .foundation-value-form .foundation-value-actions { display: flex; gap: 0; }
.foundation-direct-head .foundation-value-save {
  min-width: 44px;
  padding: 0 6px;
  font: 700 .71rem/1 var(--sans);
}
.foundation-direct-head .foundation-value-save:disabled {
  background: var(--paper);
  border-color: var(--rule-soft);
  color: var(--muted);
}
.foundation-direct-card[data-control=bedtime] { container: foundation-bedtime / inline-size; }
.foundation-path .foundation-checklist-grid .foundation-direct-card[data-control=bedtime] > .foundation-direct-head {
  grid-template-areas: "mark name actions" ". bedtime bedtime";
  row-gap: 5px;
}
.foundation-direct-card[data-control=bedtime] .foundation-tile-identity { grid-area: mark; }
.foundation-direct-card[data-control=bedtime] .foundation-direct-copy { grid-area: name; }
.foundation-direct-card[data-control=bedtime] .foundation-tile-actions { grid-area: actions; }
.foundation-bedtime-form { grid-area: bedtime; justify-self: start; min-width: 0; }
@container foundation-bedtime (min-width: 420px) {
  .foundation-path .foundation-checklist-grid .foundation-direct-card[data-control=bedtime] > .foundation-direct-head {
    grid-template-columns: var(--foundation-icon-slot) minmax(0, 1fr) auto auto;
    grid-template-areas: "mark name bedtime actions";
  }
}
.foundation-direct-head .foundation-tile-actions > :is(.foundation-tile-labeled, .foundation-yoga-class, .foundation-workout-open),
.foundation-focus-item .foundation-workout-open,
.foundation-checklist-grid .foundation-tile-actions > .foundation-tile-log {
  width: auto;
  min-width: 44px;
  padding: 0 7px;
  color: var(--blue);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  background: var(--paper);
  font: 700 .72rem/1 var(--sans);
}
.foundation-focus-item .foundation-workout-open { min-height: 44px; align-self: end; }
.foundation-direct-head .foundation-tile-actions > .foundation-yoga-class.is-active,
.foundation-direct-head .foundation-tile-actions > .foundation-tile-labeled[aria-expanded=true] {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--rule);
}
.foundation-direct-extra, .daily-exercises-body {
  min-width: 0;
  border-top: 1px solid var(--rule-soft);
  margin-top: 4px;
  padding: 5px 2px 2px;
}
.checklist-band > .daily-exercises-body { padding: 6px; }
.foundation-direct-extra[hidden], .daily-exercises-body[hidden] { display: none; }
.foundation-direct-extra :is(.foundation-value-panel, .foundation-yoga-panel, .foundation-coverage-panel) {
  position: static;
  width: 100%;
  max-width: none;
  box-shadow: none;
}
.foundation-direct-extra :is(button,summary,label:has(input[type=checkbox])) { min-height: 44px; }
.foundation-direct-extra .foundation-undo { font-size: .69rem; }
.checklist-focus-card .checklist-exercise-counter { min-width: 0; align-items: stretch; }
.checklist-exercise-amount {
  display: flex;
  align-items: center;
  width: 80px;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 4px 0 0 4px;
  background: var(--paper-bright);
}
.checklist-focus-card .checklist-exercise-counter .checklist-exercise-amount input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  min-height: 42px;
  padding: 0 3px 0 7px;
  border: 0;
  border-radius: 3px 0 0 3px;
  background: transparent;
}
.checklist-exercise-unit {
  flex: 0 0 auto;
  max-width: 40px;
  overflow: hidden;
  padding-inline-end: 5px;
  color: var(--muted);
  font: .65rem/1.15 var(--sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checklist-focus-card .checklist-exercise-counter > .foundation-add-button {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  border-color: var(--rule);
  background: var(--paper);
  color: var(--blue);
  font: 650 1rem/1 var(--sans);
}
.checklist-focus-card .checklist-exercise-counter > .foundation-add-button:is(:hover,:focus-visible) {
  background: var(--blue-soft);
}
.daily-exercises-body footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}
.daily-exercises-body footer button { min-height: 44px; }
.foundation-direct-head :is(select,input,button):focus-visible,
.daily-exercises-body :is(input,button):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.foundation-checklist-grid .foundation-compact-check-tile[data-status=done] > .foundation-item-copy { color: var(--ink); }
.foundation-checklist-grid .foundation-compact-check-tile.has-daily-copy .foundation-item-copy > p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
@media (max-width: 470px) {
  /* Keep a readable name and a real tap target on both regular and Max iPhones. */
  .foundation-path[data-display=compact] .foundation-checklist-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 5px;
    gap: 5px;
  }
  .foundation-path[data-display=compact] .foundation-checklist-grid > .foundation-compact-check-tile,
  .foundation-checklist-grid .foundation-compact-summary { min-height: 54px; padding-block: 4px; }
  .foundation-checklist-grid .daily-log-portal { padding-block: 4px; }
  .foundation-checklist-grid .daily-log-heading { min-height: 46px; }
}
@media (pointer: coarse), (max-width: 720px) {
  .foundation-direct-head :is(select, input), .checklist-focus-card .foundation-entry-form input {
    font-size: 16px;
  }
  .foundation-direct-head select { width: 126px; }
}
@media (max-width: 720px) {
  .foundation-path .foundation-checklist-grid .foundation-action-row {
    grid-template-columns: var(--foundation-icon-slot) minmax(0, 1fr) auto;
  }
  .checklist-exercise-counter .checklist-exercise-amount { flex: 1; width: auto; }
}
@media (max-width: 350px) {
  /* The full unit still appears next to the goal and in the field's label. */
  .checklist-exercise-unit { display: none; }
  .foundation-direct-head select { width: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  .checklist-focus-card.is-celebrating { animation: none; }
}
