/* Ground Control layout on top of the design tokens. Body text is 18px: the
   minimum for the iPads (spec section 9). */

.site-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: var(--border-hairline);
  background: var(--surface-card);
}
.wordmark{
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-small);
  letter-spacing: var(--ls-wordmark);
  text-transform: uppercase;
}
.device{
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

h1{
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-display);
  margin: 0 0 var(--sp-4);
}

main{
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--sp-5);
}

label{
  display: block;
  margin-bottom: var(--sp-2);
  font-weight: var(--fw-medium);
}
input,
button{
  font: inherit;
  min-height: 3rem;
  border-radius: var(--radius-sm);
}
input[type="text"]{
  width: 100%;
  max-width: 20rem;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  color: var(--text-body);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}
button.primary{
  display: block;
  margin-top: var(--sp-4);
  padding: 0 var(--sp-5);
  border: 0;
  background: var(--accent);
  color: var(--text-on-accent);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}
button.primary:hover{ background: var(--accent-strong); }

.error{
  color: var(--critical);
  font-weight: var(--fw-medium);
}

/* Header navigation */
a.wordmark{ color: var(--text-body); text-decoration: none; }

h2{
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
  margin: var(--sp-6) 0 var(--sp-3);
}
.muted{ color: var(--text-secondary); }

/* Setup lists */
.link-list, .rules{ list-style: none; margin: 0; padding: 0; }
.link-list li{ border-bottom: var(--border-hairline); }
.link-list a{ display: block; padding: var(--sp-3) 0; min-height: 3rem; }
.rule{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: var(--border-hairline);
}
.rule-text{ display: flex; flex-direction: column; flex: 1; min-width: 0; }  /* fills the row, so every line starts at the same edge */
.rule-title{ font-weight: var(--fw-medium); }
.rule-meta{ color: var(--text-secondary); font-size: var(--fs-small); }
.essential{ color: var(--text-body); font-weight: var(--fw-semibold); }  /* --highlight on Linen is 4.15:1, under AA */
.rule-actions{ display: flex; align-items: center; gap: var(--sp-3); flex: none; }
.rule-actions form{ margin: 0; }
.button-link{
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 var(--sp-4);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
}
.button-link.primary{ background: var(--accent); color: var(--text-on-accent); }
.button-link.primary:hover{ background: var(--accent-strong); color: var(--text-on-accent); text-decoration: none; }
button.secondary{
  padding: 0 var(--sp-4);
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  color: var(--text-body);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

/* The chore form */
.chore-form{ max-width: 40rem; }
.field{ margin: 0 0 var(--sp-5); border: 0; padding: 0; }
fieldset.field legend{ font-weight: var(--fw-medium); margin-bottom: var(--sp-2); padding: 0; }
.choices{ display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.choice{ display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 3rem; font-weight: var(--fw-regular); margin: 0; }
.choice input{ width: 1.5rem; height: 1.5rem; min-height: 0; accent-color: var(--accent); }
.pattern{ padding: var(--sp-2) 0; border-bottom: var(--border-hairline); }
.pattern-fields{ display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); padding-left: var(--sp-7); }
.pattern-fields label{ margin: 0; font-weight: var(--fw-regular); }
select, input[type="number"], input[type="date"], textarea{
  font: inherit;
  min-height: 3rem;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  color: var(--text-body);
}
select{ width: 100%; max-width: 24rem; }
input[type="number"]{ width: 6rem; }
textarea{ width: 100%; padding: var(--sp-3); line-height: var(--lh-body); }
.chore-form input[type="text"]{ max-width: 32rem; letter-spacing: normal; text-transform: none; }

/* "Back to ..." links are touch targets too (spec section 9: 48 px). */
.back-link{ display: inline-flex; align-items: center; min-height: 3rem; }

/* Setup → Day overrides and Capacity */
.days{ list-style: none; margin: 0; padding: 0; }
.day-row{ padding: var(--sp-3) 0; border-bottom: var(--border-hairline); }
.day-date{ font-weight: var(--fw-semibold); }
.settings-form{ max-width: 40rem; }
.duty-grid{ display: grid; grid-template-columns: max-content 6rem; gap: var(--sp-2) var(--sp-4); align-items: center; }
.duty-grid select{ width: 6rem; }
.hint{ color: var(--text-secondary); font-size: var(--fs-small); margin: 0 0 var(--sp-2); }
.saved{ color: var(--text-body); font-weight: var(--fw-semibold); }
.settings-form input[type="text"]{ max-width: 32rem; letter-spacing: normal; text-transform: none; }

/* Today and Week (step 5). A tick is a 48 px target; done rows stay readable. */
.task-group h2, .week-day h2{
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-h3);
  margin: var(--sp-6) 0 var(--sp-2);
}
.tasks{ list-style: none; margin: 0; padding: 0; }
.task{
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-2) 0;
  border-bottom: var(--border-hairline);
}
.task form{ margin: 0; flex: none; }
.tick{
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  width: 6.5rem;  /* room for the box and "Undo", so titles line up */
  min-width: 3rem;
  min-height: 3rem;
  padding: 0 var(--sp-2);
  border: 0;
  background: transparent;
  color: var(--text-body);
  cursor: pointer;
}
.tick .box{
  width: 2rem;
  height: 2rem;
  border: 0.125rem solid var(--text-body);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
}
.tick .box{ position: relative; flex: none; }
.task.done .tick .box{ background: var(--accent); border-color: var(--accent); }
.task.done .tick .box::after{  /* the check mark */
  content: "";
  position: absolute;
  left: 0.5625rem;
  top: 0.1875rem;
  width: 0.5rem;
  height: 1rem;
  border: solid var(--text-on-accent);
  border-width: 0 0.1875rem 0.1875rem 0;
  transform: rotate(45deg);
}
.tick .undo{ font-size: var(--fs-small); font-weight: var(--fw-semibold); text-decoration: underline; }
.task-text{ display: flex; flex-direction: column; }
.task-title{ font-weight: var(--fw-medium); }
.task.done .task-title{ color: var(--text-secondary); }
.task-meta{ color: var(--text-secondary); font-size: var(--fs-small); }
.week-meta{ color: var(--text-secondary); margin: 0 0 var(--sp-2); }
/* The native disclosure marker stays: summary keeps display: list-item. */
.week-day details summary{ padding: var(--sp-3) 0; min-height: 3rem; box-sizing: border-box; cursor: pointer; font-weight: var(--fw-semibold); }
/* htmx's own indicator styles are switched off (no inline styles under the CSP). */
.htmx-indicator{ opacity: 0; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator{ opacity: 1; transition: opacity 200ms ease-in; }
.htmx-request .tick{ opacity: 0.6; }

/* Setup → Devices */
.new-code{ padding: var(--sp-5); margin: 0 0 var(--sp-6); border: var(--border-hairline); border-radius: var(--radius-md); background: var(--surface-card); }
.qr{ display: block; width: 15rem; height: 15rem; margin: var(--sp-4) 0; }
.enrol-code{ font-size: var(--fs-h3); font-weight: var(--fw-semibold); letter-spacing: var(--ls-label); margin: 0; }

/* Home dashboard spec: the week-by-person calendar. A table on wide screens,
   one block per day on phones (the same data, one layout shown). */
.visually-hidden{ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cal-nav{ display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.cal-wide{ overflow-x: auto; border: var(--border-hairline); border-radius: var(--radius-sm); background: var(--surface-card); }
.cal-table{ border-collapse: collapse; width: 100%; min-width: 47.5rem; font-size: var(--fs-small); }
.cal-table caption{ text-align: left; padding: var(--sp-3) var(--sp-4); font-weight: var(--fw-semibold); }
.cal-table th, .cal-table td{ border-top: var(--border-hairline); padding: var(--sp-2) var(--sp-3); vertical-align: top; text-align: left; }
.cal-table thead th{ color: var(--text-secondary); font-weight: var(--fw-semibold); white-space: nowrap; }
.cal-table tbody th{ font-weight: var(--fw-semibold); white-space: nowrap; }
.cal-table .is-today{ background: var(--surface-tint); }
.cal-table thead th.is-today{ color: var(--text-body); }
.cal-item, .cal-duty, .cal-chore{ display: block; }
.cal-item.away{ color: var(--critical); font-weight: var(--fw-semibold); }
.cal-item.holiday{ color: var(--accent-deep); font-weight: var(--fw-semibold); }
.cal-duty{ font-weight: var(--fw-medium); }
.cal-chore{ color: var(--text-secondary); }
.cal-days{ display: none; list-style: none; margin: 0; padding: 0; }
.cal-day{ background: var(--surface-card); border: var(--border-hairline); border-radius: var(--radius-sm); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); }
.cal-day.is-today{ border-color: var(--accent); }
.cal-day h3{ margin: 0 0 var(--sp-2); font-size: var(--fs-body); }
.cal-day ul{ list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-1); }
@media (max-width: 700px) {
  .cal-wide{ display: none; }
  .cal-days{ display: block; }
}

/* Home dashboard spec, section 4: the Home page and the kitchen display. */
.home-section{ margin-bottom: var(--sp-6); }
.home-section h2{ font-family: var(--font-serif); font-weight: var(--fw-regular); font-size: var(--fs-h3); margin: 0 0 var(--sp-3); }
.section-head{ display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.section-head a{ min-height: 3rem; display: inline-flex; align-items: center; }
.coming-day{ flex: none; width: 7.5em; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.status-strip{ display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5); padding: var(--sp-3) var(--sp-4); border-top: var(--border-hairline); color: var(--text-secondary); font-size: var(--fs-small); }
.status-strip a{ min-height: 3rem; display: inline-flex; align-items: center; font-weight: var(--fw-semibold); }

/* The kitchen display: read at 2-3 m, landscape. */
body.kitchen .home-section h2{ font-size: 2.125rem; }
body.kitchen .cal-table{ font-size: 1.125rem; }
/* Home and the calendar are dashboards: use the width of a laptop or a landscape iPad. */
main[data-page="home"], main[data-page="calendar"]{ max-width: 72.5rem; }

.quick-actions{ display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: 0 0 var(--sp-5); }
.action-link{ display: inline-flex; align-items: center; min-height: 3rem; padding: 0 var(--sp-4); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-card); font-weight: var(--fw-semibold); }

.weather-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr)); gap: var(--sp-4); }
.weather p{ margin: 0 0 var(--sp-2); }
.outlook{ list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-1); }
.air{ margin: 0; display: grid; gap: var(--sp-2); }
.air dt{ color: var(--text-secondary); font-size: var(--fs-small); }
.air dd{ margin: 0; font-weight: var(--fw-semibold); }

.recipe-filter{ display: flex; flex-wrap: wrap; align-items: end; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.recipe-grid{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13.75rem, 1fr)); gap: var(--sp-4); }
.recipe-card{ display: flex; flex-direction: column; gap: var(--sp-2); height: 100%; padding-bottom: var(--sp-3); background: var(--surface-card); border: var(--border-hairline); border-radius: var(--radius-md); overflow: hidden; color: var(--text-body); text-decoration: none; }
.recipe-card img, .no-photo{ display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-sunken); }
.recipe-card > span:not(.no-photo){ padding: 0 var(--sp-3); }
.recipe-title{ font-weight: var(--fw-semibold); }
.scene-buttons{ display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.scene-buttons button{ min-height: 3.5rem; }
.recipe-item{ display: flex; flex-direction: column; }
.recipe-item .recipe-card{ flex: 1; height: auto; }
.card-plan{ padding: 0 var(--sp-3); font-weight: var(--fw-semibold); }
.recipe-photo{ display: block; max-width: 100%; max-height: 26.25rem; border-radius: var(--radius-md); }
main[data-page="recipes"]{ max-width: 72.5rem; }

.meal-grid form{ margin-top: var(--sp-1); }
.meal-grid button{ min-height: 3rem; }
.cell-edit{ display: inline-flex; align-items: center; min-height: 3rem; font-size: var(--fs-small); }
.got-tick{ width: 3rem; height: 3rem; border: 1px solid var(--border-strong); background: var(--surface-card); border-radius: var(--radius-sm); font-size: 1.25rem; }
.got-tick.done{ background: var(--accent); color: var(--text-on-accent); }

.language{ margin: 0; }
.stock-places{ list-style: none; margin: 0 0 var(--sp-6); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: var(--sp-4); }
.stock-place{ padding: var(--sp-4); background: var(--surface-card); border: var(--border-hairline); border-radius: var(--radius-md); }
.stock-place img, .stock-place .no-photo{ display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.stock-place h2{ margin: var(--sp-3) 0 var(--sp-1); }
.stock-place input[type="file"]{ width: 100%; }
.keep-row, .translation-row{ padding: var(--sp-3) 0; border-bottom: var(--border-hairline); }
.keep-row{ display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.keep-row label{ flex: 1 0 12rem; margin: 0; }

/* Tropic: the look chosen from the mockups. One sans family, heavy headings, white cards on the sea. */
h1, h2, .home-section h2, .task-group h2, .week-day h2{ font-weight: 800; letter-spacing: -0.01em; }
h1{ font-size: 2.25rem; font-size: clamp(1.875rem, 5vw, 2.75rem); }
input, button, select{ border-radius: var(--radius-sm); }
input[type="text"], input[type="search"], input:not([type]){ letter-spacing: normal; text-transform: none; padding: 0 var(--sp-3); border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--text-body); } main[data-page=""] input[name="code"]{ letter-spacing: var(--ls-label); text-transform: uppercase; }
.home-section, .task-group, .week-day, .stock-place, main > section:not(.home-section){ background: var(--surface-card); border-radius: var(--radius-md); padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-4); }
.task-group h2, .home-section h2{ margin-top: 0; }
#home-reports.is-empty{ display: none; }
#home-meals .section-head{ order: 0; }
.button-link.primary{ width: 100%; justify-content: center; }
.action-link{ border-color: var(--border-strong); }
.quick-actions{ margin-top: 0; }

.outlook{ grid-template-columns: repeat(auto-fit, minmax(9.375rem, 1fr)); gap: var(--sp-3); }
.outlook li{ background: var(--surface-tint); border-radius: var(--radius-sm); overflow: hidden; padding: 0 var(--sp-3) var(--sp-3); }
.outlook img{ display: block; width: calc(100% + 2 * var(--sp-3)); margin: 0 calc(-1 * var(--sp-3)) var(--sp-2); height: 4rem; object-fit: cover; object-position: right center; }
.outlook strong{ display: block; }

.recipe-card{ border: 0; box-shadow: 0 1px 0.1875rem rgba(11, 43, 51, .12); }
.recipe-photo{ width: 100%; max-height: 26.25rem; object-fit: cover; margin-bottom: var(--sp-4); }
.task{ padding: var(--sp-3) 0; }
.tick{ width: 6rem; }
.cal-wide, .cal-day{ border: 0; border-radius: var(--radius-md); }
.got-tick{ border-radius: var(--radius-sm); }

/* Phones: the menu sits under the thumb, and the page itself never scrolls sideways. */
@media (max-width: 700px) {
  main{ padding: var(--sp-4); }
  .home-section, .task-group, .week-day, .stock-place, main > section:not(.home-section){ padding: var(--sp-4); }
}

.cal-views{ display: flex; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.cal-views a{ display: inline-flex; align-items: center; min-height: 3rem; padding: 0 var(--sp-4); border-radius: var(--radius-sm); background: var(--surface-card); font-weight: 700; }
.cal-views a[aria-current="page"]{ background: var(--accent); color: var(--text-on-accent); }
.cal-month{ width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-month th{ font-size: var(--fs-small); color: var(--text-secondary); padding: var(--sp-1); }
.cal-month td{ vertical-align: top; padding: var(--sp-1); border-top: var(--border-hairline); overflow-wrap: anywhere; }
.cal-month td.other{ color: var(--text-muted); background: var(--surface-sunken); }
.cal-month td.is-today{ background: var(--surface-tint); font-weight: 800; }
.cal-date{ display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; font-weight: 700; }
.cal-mark{ display: block; margin: 0; font-size: var(--fs-small); color: var(--text-secondary); }
.cal-year{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16.25rem, 1fr)); gap: var(--sp-4); }
.cal-year .home-section{ margin: 0; }
.cal-year h3{ margin: 0 0 var(--sp-2); }
.cal-year td{ text-align: center; font-size: var(--fs-small); }
.cal-year td.marked{ background: var(--highlight-soft); font-weight: 800; }

/* Step sketches: an animated drawing beside each step of a home recipe card. */
.step{ display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: var(--sp-4); align-items: center; padding: var(--sp-3) 0; border-top: var(--border-hairline); }
.step-sketch{ margin: 0; }
.step-sketch img{ display: block; width: 100%; height: auto; border-radius: var(--radius-md); }
.step-sketch figcaption{ margin-top: var(--sp-1); font-weight: 700; font-size: var(--fs-small); }
.step p{ margin: 0; }
@media (max-width: 640px) { .step{ grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); } }

/* Housework: every task by room with how often, nothing to tick. */
.housework-room{ margin-bottom: var(--sp-4); }
.housework-list{ list-style: none; margin: 0; padding: 0; }
.housework-list li{ display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-2) 0; border-top: var(--border-hairline); }
.housework-list li:first-child{ border-top: 0; }
.housework-list .muted{ flex: none; text-align: right; }

/* School and Ideas. */
.school-list, .idea-list{ list-style: none; margin: 0; padding: 0; }
.school-list li, .idea-list li{ padding: var(--sp-2) 0; border-top: var(--border-hairline); }
.school-list li:first-child, .idea-list li:first-child{ border-top: 0; }
.school-list .muted{ display: block; font-size: var(--fs-small); }
.school-change{ border-left: 0.25rem solid var(--accent); padding-left: var(--sp-3) !important; }
.idea-list li{ display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--sp-3); }
.idea-list p{ margin: 0; }
.idea-list form{ display: flex; gap: var(--sp-2); }
.idea-status{ font-weight: 700; }

/* Shops: each shop's own logo as a button, in the same shape as the menu's icons. */
.shop-links{ display: flex; flex-wrap: wrap; gap: var(--sp-4); margin: 0 0 var(--sp-5); }
.app.shop{ color: var(--text-body); min-width: 5.25rem; }
.app.shop img{ border-radius: 22.5%; box-shadow: 0 0 0 1px var(--border-subtle); background: #fff; }
.app.shop::after{ display: none; }

/* The order on its own, for the narrow half of iPad Split View: no menu, just the list. */
body.page-orderlist .site-header, body.page-orderlist main[data-page="orderlist"]{ padding-top: var(--sp-4); }
main[data-page="orderlist"] h1{ margin-top: 0; }

.camera-view{ max-height: 60vh; object-fit: contain; background: #000; }

/* Audit, 2026-11-22. Drop-down lists were 25px tall beside 48px fields: too small to tap, and out of line. */
select{ -webkit-appearance: none; appearance: none; min-height: 3rem; padding: 0 2.5rem 0 var(--sp-3); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-body); font: inherit;
  background: var(--surface-card) url("../icons/chevron.svg") no-repeat right 0.75rem center / 1rem; }  /* Safari draws a styled drop-down at its own small height unless its native look is switched off */
/* A meal's name, "On the order" and Change ran together on one line in one colour. */
.meal-grid td > .muted, .meal-line__text > .muted{ display: block; }
/* Meal photos on the meal plan (owner, 2026-11-28): across the top of each meal in the week table; on the right of each
   meal in a phone's day list, so the words stay lined up down the left. A fixed size, never aspect-ratio, for old browsers. */
.meal-photo{ display: block; width: 100%; height: 6rem; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: var(--sp-2); background: var(--surface-2); }
.meal-photo--empty{ display: flex; align-items: center; justify-content: center; }
.meal-photo--empty img{ opacity: .45; }
.meal-line{ display: flex; align-items: flex-start; gap: var(--sp-3); }
.meal-line__text{ flex: 1; min-width: 0; }
.meal-line .meal-photo{ flex: none; width: 6rem; height: 6rem; margin: var(--sp-1) 0 0; }
@media (max-width: 380px) { .meal-line .meal-photo{ width: 5rem; height: 5rem; } }  /* the button beside it keeps to one line */
.surface-kitchen .meal-photo{ height: 7.5rem; } .surface-kitchen .meal-line .meal-photo{ width: 7.5rem; }
.meal-grid .cell-edit, .meal-days .cell-edit{ display: flex; }
main > form{ margin-bottom: var(--sp-4); }

/* Slime Lab: for a child of nearly four on the kitchen iPad. One thing per screen, everything big. */
main[data-page="slime"]{ max-width: 80rem; }
.slime{ text-align: center; }
.slime-ask{ font-size: 2.25rem; font-size: clamp(1.75rem, 4vw, 2.75rem); }
.slime-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-5); list-style: none; margin: 0 0 var(--sp-5); padding: 0; }
.slime-emoji{ font-size: 3.5rem; line-height: 1; }
.slime-dot{ display: block; }
.slime-card{ width: 13.75rem; background: var(--surface-card); border-radius: var(--radius-md); padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.slime-card.locked img{ filter: grayscale(1); opacity: .5; }
.slime-name{ font-size: 1.625rem; font-weight: 800; margin: 0; }
.slime-photo{ margin: 0; }
.slime-photo img{ display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.slime-photo figcaption{ font-size: var(--fs-caption); color: var(--text-secondary); }
.slime-note{ font-size: var(--fs-body); color: var(--text-secondary); margin: var(--sp-2) 0; } .slime-check small{ display: block; font-size: var(--fs-small); font-weight: 400; color: var(--text-secondary); }
.slime-nav{ display: flex; justify-content: center; align-items: center; gap: var(--sp-4); margin: var(--sp-4) 0 var(--sp-2); }
.slime-mix{ display: flex; align-items: center; justify-content: center; gap: var(--sp-3); width: 100%; font-size: 3rem; font-weight: 800; }
.slime-mix.small{ margin: 0; }
.slime-timer{ height: 1.75rem; background: var(--surface-sunken); border-radius: 62.4375rem; overflow: hidden; }
.slime-timer span{ display: block; height: 100%; width: 0; background: var(--focus-ring); animation: slime-fill linear forwards; }
.slime-timer.t30 span{ animation-duration: 30s; }
.slime-timer.t180 span{ animation-duration: 180s; }
@keyframes slime-fill { to { width: 100%; } }
.slime-rules{ list-style: none; padding: 0; margin: 0 0 var(--sp-4); font-size: 1.625rem; font-weight: 700; }
.slime-checks{ text-align: left; max-width: 46rem; margin: 0 auto; background: var(--surface-card); border-radius: var(--radius-md); padding: var(--sp-4) var(--sp-5); }
.slime-check{ display: flex; gap: var(--sp-4); align-items: flex-start; padding: var(--sp-3) 0; border-bottom: var(--border-hairline); font-weight: 400; }
.slime-check input{ width: 2.25rem; height: 2.25rem; flex: none; }
.slime-grownup{ text-align: left; max-width: 46rem; margin: var(--sp-4) auto; }
.slime-grownup summary{ min-height: 3rem; cursor: pointer; font-weight: 700; }

/* ===== Daylight (2026-11-22): the parts every page already uses, redrawn in the new look. =====
   The new parts themselves are in components.css; these rules dress the app's older class names the same way. */
h1{ font-family: var(--font-display); font-size: var(--fs-large); font-weight: 700; letter-spacing: var(--tracking-tight); line-height: 1.08; margin: 0 0 var(--space-4); }
h2, .home-section h2, .task-group h2, .week-day h2{ font-family: var(--font-display); font-size: var(--fs-title-2); font-weight: 700; letter-spacing: var(--tracking-title); margin: var(--space-6) 0 var(--space-3); }
h3{ font-size: var(--fs-title-3); }
main{ max-width: 77.5rem; padding: var(--space-6) var(--page-pad) var(--space-10); }
label{ font-size: var(--fs-sub); font-weight: 650; }
.site-header{ background: var(--glass); border-bottom: 1px solid var(--separator); padding: var(--space-3) var(--page-pad); }
a.wordmark, .wordmark{ color: var(--text); font-size: var(--fs-headline); font-weight: 700; letter-spacing: 0; text-transform: none; }
.device{ color: var(--text-secondary); font-size: var(--fs-footnote); }
.app-bar .site-nav{ min-width: 0; flex: 1; }
.app-bar .language{ margin: 0; }
.btn--small{ min-height: var(--tap-min); padding: 0 var(--space-4); font-size: var(--fs-sub); }
.tab-bar__tab span, .tab-bar__apps span{ line-height: 1.1; }
main[data-page="apps"]{ padding: 0; max-width: none; }
.apps-sheet .language button{ width: 100%; }


/* Buttons: pills. */
button.primary, .button-link.primary, button.secondary, .action-link, .cal-views a{ display: inline-flex; align-items: center; justify-content: center; min-height: var(--control-h); padding: 0 var(--space-6); border: 0; border-radius: var(--r-pill); font-size: var(--fs-headline); font-weight: 650; cursor: pointer; text-decoration: none; }
button.primary, .button-link.primary{ background: var(--accent); color: var(--text-on-accent); width: auto; }
button.primary:hover, .button-link.primary:hover{ background: var(--accent-pressed); }
button.secondary, .action-link, .cal-views a{ background: var(--fill-quiet); color: var(--text); }
.action-link:hover, .cal-views a:hover{ text-decoration: none; }
/* Fields. */
input[type="text"], input[type="search"], input[type="url"], input[type="number"], input[type="date"], input:not([type]), textarea, select{ min-height: var(--control-h); border: 1px solid var(--control-border); border-radius: var(--r-md); background-color: var(--surface); color: var(--text); font-size: var(--fs-body); padding-left: var(--space-4); }
.stock-item input, .stock-item select{ border: 1px solid var(--control-border); border-radius: var(--r-md); background-color: var(--surface); color: var(--text); padding-left: var(--space-4); }
/* Cards: white, soft shadow, no outline. */
.home-section, .task-group, .week-day, .stock-place, .stock-item, .slime-card, .slime-checks, .new-code, .cal-day, .cal-wide, .recipe-card, main > section:not(.home-section):not(.apps-sheet):not(.plain){ background: var(--surface); border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.home-section, .task-group, .week-day, .stock-place, main > section:not(.home-section):not(.apps-sheet):not(.plain){ padding: var(--space-6); margin-bottom: var(--section-gap); }
section.plain{ margin-bottom: var(--section-gap); }
/* List rows and status messages. */
.rule, .task, .link-list li{ border-bottom: 1px solid var(--hairline); min-height: var(--tap-min); }
.rule-title, .task-title{ font-weight: 600; }
.saved, .error[role="alert"], p[role="status"].saved{ padding: var(--space-4) var(--space-5); border-radius: var(--r-md); font-weight: 600; }
.saved{ background: var(--success-bg); color: var(--success); }
.error[role="alert"]{ background: var(--danger-bg); color: var(--danger); }
.hint{ color: var(--text-2); font-size: var(--fs-sub); }
/* Tick boxes: round, green when done. */
.tick .box, .got-tick{ width: 2.25rem; height: 2.25rem; border: 0.15625rem solid var(--text-2); border-radius: 50%; background: transparent; }
.got-tick{ width: 3rem; height: 3rem; font-size: 1.25rem; color: transparent; }
.task.done .tick .box, .got-tick.done{ background: var(--success); border-color: var(--success); color: var(--on-ink); }
.task.done .tick .box::after{ left: 0.625rem; top: 0.25rem; border-color: var(--on-ink); }
.surface-kitchen .tick .box{ width: 3rem; height: 3rem; }
.surface-kitchen .task.done .tick .box::after{ left: 1rem; top: 0.5rem; }
.back-link{ color: var(--link); }
.recipe-photo { border-radius: var(--r-xl); box-shadow: var(--shadow-photo); }

/* Home. */
.page-head{ margin-bottom: var(--section-gap); }
.page-head h1{ margin: 0; }
.home-main{ display: flex; flex-direction: column; gap: var(--section-gap); min-width: 0; }
.home-side{ display: flex; flex-direction: column; gap: var(--section-gap); min-width: 0; }
.home-side .card .btn{ margin-top: var(--space-4); }
.grid-main-side{ margin-bottom: var(--section-gap); }
.meal-tile__empty{ width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r-xl); background: var(--surface-3); display: flex; align-items: center; justify-content: center; }
.week-strip__more{ font-size: var(--fs-footnote); color: var(--text-2); }
.who-row .coming-day{ color: var(--text-2); font-size: var(--fs-sub); white-space: nowrap; }
.who-row .list-row__main{ white-space: normal; }
.stock-item .more-details{ grid-column: 1 / -1; }
.stock-item .more-details .grid-2{ margin-top: var(--space-3); }

/* Stock, item by item: type, how many and use-by first; the rest behind "More details". */
.stock-items{ list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-3); }
.stock-item{ display: grid; grid-template-columns: 2fr 1.4fr 1fr 1.2fr; gap: var(--space-2) var(--space-4); align-items: end; padding: var(--space-4) var(--space-6); border-left: 0.375rem solid transparent; }
.stock-item.to-check{ border-left-color: var(--area-meals); }
.stock-item .f{ display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.stock-item label{ margin: 0; font-size: var(--fs-footnote); color: var(--text-2); }
.stock-item input, .stock-item select{ width: 100%; max-width: none; box-sizing: border-box; }
.stock-flag{ grid-column: 1 / -1; margin: 0; font-size: var(--fs-footnote); font-weight: 700; color: var(--area-meals-ink); }
.stock-flag.plain{ color: var(--text-2); }
@media (max-width: 699px) { .stock-item{ grid-template-columns: 1fr 1fr; } .stock-item .f.wide{ grid-column: 1 / -1; } }

/* Shop buttons: the shop's logo with its name underneath. */
.app.shop{ display: inline-flex; flex-direction: column; align-items: center; gap: 0.375rem; min-width: 5.25rem; min-height: var(--tap-min); color: var(--text); font-size: var(--fs-caption); font-weight: 500; text-decoration: none; }
.app.shop img{ width: 3.75rem; height: 3.75rem; }
.section-head__title, .section-head h2{ margin: 0; }
.weather-pill, .weather-pill:hover{ color: var(--text); text-decoration: none; }

/* Audit fixes after the Daylight restyle. */
.app-menu{ overflow-x: auto; scrollbar-width: none; }  /* the row scrolls inside itself whenever it is too long (the kitchen's larger icons), never under the buttons */
.app-menu::-webkit-scrollbar{ display: none; }
.search input[type="search"]{ border: 0; background: transparent; padding-left: 0; min-height: 2.75rem; }
.meal-grid button.secondary{ min-height: 2.75rem; padding: 0 var(--space-3); font-size: var(--fs-footnote); white-space: nowrap; }
.surface-kitchen .grid-main-side{ grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

/* Slime Lab in the Daylight design: its own bar instead of the app menu, everything at kitchen size. */
body.page-slime .app-bar, body.page-slime .tab-bar, body.page-slime .tab-bar__fade{ display: none; }
main[data-page="slime"]{ max-width: none; padding: 0; }
.slime{ text-align: left; }
.lab-bar .btn, .lab .btn--secondary{ min-height: 4.5rem; padding: 0 2rem; font-size: 1.625rem; font-weight: 700; }
.lab h1, .slime-ask{ text-align: center; margin: 0; }
.slime-ask{ font-size: 2.5rem; }
.lab-choice .slime-emoji{ font-size: 6rem; }
.lab-recipes{ list-style: none; margin: 0; padding: 0; }
.lab-recipe .slime-photo{ width: 100%; }
.lab-recipe form{ margin: 0; }
.lab-recipe .btn{ min-height: 4rem; padding: 0 1.5rem; font-size: 1.375rem; }
.slime-card.locked img{ filter: grayscale(1); opacity: .5; }
.slime-row{ align-items: flex-start; }
.slime-row .lab-choice{ flex: 1 1 15rem; min-height: 16.25rem; }
a.colour-swatch{ color: var(--text); text-decoration: none; min-width: 7.5rem; min-height: 8.75rem; justify-content: center; font-size: 1.375rem; font-weight: 700; }
.lab-step{ display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--space-8); align-items: center; min-height: 48vh; }
.lab-step__main{ display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); }
.lab-step__art{ display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.lab-step__art svg, .lab-preview svg{ max-width: 100%; height: auto; }
.lab-step__text{ margin: 0; }
.who-badge{ margin: 0; }
.who-badge__face{ font-size: 2.5rem; line-height: 1; }
.why p{ margin: 0; }
.slime-emoji.small{ font-size: 2.25rem; }
.slime-note{ font-size: 1.25rem; color: var(--text-2); margin: 0; text-align: left; }
.slime-nav{ display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); margin: 0; }
.slime-timer{ width: 100%; }
.slime-timer span{ background: var(--area-slime); }
.feel-options{ display: grid; gap: var(--space-4); max-width: 56.25rem; margin: 0 auto; width: 100%; }
.feel-option span{ font-size: 3rem; }
.slime-checks{ max-width: 56.25rem; margin: 0 auto; width: 100%; font-size: 1.375rem; }
.slime-rules{ text-align: center; }
.slime-grownup{ margin: 0 auto; width: 100%; max-width: 56.25rem; font-size: 1.125rem; }
.lab-preview{ min-height: 40vh; }
.lab-preview .slime-name{ font-size: 2.125rem; }
@media (max-width: 899px) { .lab{ padding: var(--space-5); } .lab-choices{ grid-template-columns: 1fr; } .lab-recipes{ grid-template-columns: repeat(2, minmax(0, 1fr)); } .lab-step{ grid-template-columns: 1fr; } .lab-step__text{ font-size: 2.5rem; } .lab h1{ font-size: 2.25rem; } .lab-bar__status{ min-width: 0; } .lab-bar__title{ font-size: 0; } .colour-swatches{ grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lab-recipe .btn{ width: 100%; white-space: normal; padding: var(--space-2) var(--space-3); font-size: 1.1875rem; line-height: 1.15; }
@media (max-width: 899px) { .lab-bar{ padding: 0.625rem 0.75rem; } .lab-bar .btn, .lab .btn, .lab .btn--secondary{ min-height: 3.5rem; padding: 0 1.125rem; font-size: 1.1875rem; } .who-badge{ font-size: 1.1875rem; min-height: 3.25rem; } .feel-option{ font-size: 1.375rem; min-height: 4.75rem; } .lab-choice{ min-height: 12.5rem; } }
.slime-card{ width: auto; min-width: 0; }
.surface-helper .app-menu__link{ width: 4.125rem; }  /* the helpers' larger labels need the room */
.cal-views, .cal-nav{ flex-wrap: wrap; }

/* Recipes and nutrition (Daylight, phase 4). */
.recipe-grid.grid-5{ list-style: none; margin: 0; padding: 0; }
.recipe-card{ padding-bottom: 0; gap: 0; }
.recipe-card > span.recipe-card__body{ padding: var(--space-3) var(--space-4) var(--space-4); }
.recipe-card .no-photo{ display: block; }
.recipe-top{ align-items: start; }
.ingredients{ columns: 2; column-gap: var(--space-8); padding-left: 1.1em; margin: 0; }
.ingredients li{ break-inside: avoid; margin-bottom: var(--space-2); }
.meal-kcal, .meal-total td, .meal-total th{ font-size: var(--fs-footnote); color: var(--text-2); }
.meal-kcal{ display: block; }
@media (max-width: 699px) { .ingredients{ columns: 1; } }

/* Profile photos (Daylight, phase 5). */
.segmented label{ margin: 0; }
.segmented label{ padding: 0; }
.segmented label > span{ display: flex; align-items: center; justify-content: center; width: 100%; min-height: 2.75rem; border-radius: var(--r-pill); }
.segmented input:checked + span{ background: var(--surface); color: var(--text); box-shadow: 0 1px 0.375rem rgba(0, 0, 0, 0.12); }
.photo-editor{ margin: var(--space-6) 0; }
.photo-editor__controls{ display: flex; flex-direction: column; gap: var(--space-4); flex: 1; min-width: 15rem; }
.photo-action{ position: relative; margin: 0; }
.plain-fieldset{ border: 0; padding: 0; margin: 0 0 var(--space-5); }
.plain-fieldset legend{ margin-bottom: var(--space-3); }
.tick-line{ display: flex; gap: var(--space-3); align-items: flex-start; font-weight: 600; }
.tick-line input{ width: 1.75rem; height: 1.75rem; min-height: 0; flex: none; }
.tick-line small{ display: block; font-weight: 400; color: var(--text-2); }
.people-page .page-head h2{ margin: 0; }
.who-badge .avatar{ width: 2.75rem; height: 2.75rem; }

/* Final audit fixes. */
.recipe-grid.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-5); }
@media (max-width: 1023px) { .recipe-grid.grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .recipe-grid.grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); } }
.recipe-card .recipe-card__meta img { width: 0.875rem; height: 0.875rem; aspect-ratio: auto; background: none; display: inline; }
.recipe-card__meta { flex-wrap: wrap; row-gap: 0.125rem; }
.recipe-photo { max-height: 22.5rem; }

/* Slime Lab amounts: every recipe lists what it uses and how much, and the grown-up's line (which carries the amounts) is easy to read. */
.lab-needs { list-style: none; margin: 0; padding: 0; width: 100%; font-size: 1.0625rem; text-align: left; }
.lab-needs li { display: flex; justify-content: space-between; gap: var(--space-3); padding: 0.375rem 0; border-bottom: 1px solid var(--hairline); }
.lab-needs li:last-child { border-bottom: 0; }
.lab-needs strong { white-space: nowrap; }
.lab-needs small { color: var(--text-2); font-weight: 400; }
.lab-needs-card { width: 100%; padding: var(--space-4) var(--space-5); }
.lab-needs-card .slime-note { font-size: 0.9375rem; margin-top: var(--space-2); }
.slime-note--amounts { font-size: 1.625rem; color: var(--text); line-height: 1.3; }
.lab-recipes { align-items: stretch; }
.lab-how { margin: 0; display: grid; gap: var(--space-3); width: 100%; }
.lab-how div { display: grid; grid-template-columns: 9.375rem minmax(0, 1fr); gap: var(--space-4); align-items: baseline; padding: var(--space-3) var(--space-5); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.lab-how dt { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--area-slime-ink); }
.lab-how dd { margin: 0; font-size: 1.625rem; font-weight: 600; line-height: 1.3; }
@media (max-width: 899px) { .lab-how div { grid-template-columns: 1fr; gap: 0.125rem; } .lab-how dd { font-size: 1.25rem; } }

/* Found in Safari on the iOS simulator (2026-11-22). */
input[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; height: var(--control-h); box-sizing: border-box; display: block; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
@media (max-width: 899px) { .slime-nav { position: sticky; bottom: 0.75rem; z-index: 5; padding: 0.5rem; border-radius: var(--r-pill); background: var(--glass-strong); box-shadow: var(--shadow-float); } }
input[type="date"] { line-height: calc(var(--control-h) - 0.125rem); padding-top: 0; padding-bottom: 0; }
@media (max-width: 899px) { .slime-nav { background: var(--surface); } .lab { padding-bottom: 6rem; } }

/* Setup is always in reach on a parent device: pinned at the far right of the menu row even when the row scrolls, and a button at the top of the phone's All apps page. */
.app-menu__item:last-child { position: sticky; right: 0; z-index: 1; background: var(--glass-strong); box-shadow: -0.625rem 0 0.75rem -0.5rem rgba(0, 0, 0, 0.18); padding-left: 0.25rem; }
.apps-sheet__actions { display: flex; gap: var(--space-2); align-items: center; }
.apps-sheet__actions .btn { padding: 0 var(--space-4); }
.apps-sheet__actions img { border-radius: 22.5%; }
.house-grid { grid-template-columns: repeat(auto-fill, minmax(6.875rem, 1fr)); row-gap: var(--space-6); max-width: 56.25rem; font-size: var(--fs-sub); }
.house-grid .apps-sheet__link { font-size: var(--fs-sub); min-height: var(--tap-min); }
.surface-kitchen .house-grid img { width: 5.25rem; height: 5.25rem; }
/* Stock: accept what a photo found, one item or all of them. */
.stock-accept-all { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin: 0 0 var(--space-4); }
.stock-item .stock-accept { grid-column: 1 / -1; justify-self: start; min-height: var(--tap-min); padding: 0 var(--space-5); border: 0; border-radius: var(--r-pill); background: var(--success-bg); color: var(--success); font-weight: 700; font-size: var(--fs-headline); cursor: pointer; }
.in-house { font-size: var(--fs-footnote); font-weight: 700; color: var(--area-stock-ink); }
.barcode-form { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; margin: 0 0 var(--space-5); }

/* Lights: rooms as cards, a page per room, scenes with their colours shown. */
.light-top { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0 0 var(--space-5); }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: var(--space-4); }
.room-card { display: flex; flex-direction: column; gap: var(--space-3); }
.room-card__head { display: flex; flex-direction: column; gap: var(--space-1); color: inherit; text-decoration: none; }
.room-card__head h2 { margin: 0; }
.room-card__controls, .light-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.light-row { margin: 0 0 var(--space-3); }
.light-row__name { display: flex; flex-direction: column; gap: var(--space-1); flex: 1 1 11.25rem; min-width: 0; }
.dimmer { display: flex; flex-direction: column; gap: var(--space-1); flex: 2 1 12.5rem; min-width: 0; }
.dimmer label { font-size: var(--fs-footnote); }
.dimmer input[type="range"] { width: 100%; min-height: 3rem; }
.swatch { display: block; flex: none; }
.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr)); gap: var(--space-3); margin: 0 0 var(--space-4); }
.scene-tile { display: flex; flex-direction: column; gap: var(--space-2); }
.scene-tile__go { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-height: 4.75rem; width: 100%; padding: var(--space-3); text-align: left; font-weight: 600; }
.scene-tile--saved .scene-tile__go { border-width: 0.125rem; }
.scene-tile__remove { min-height: 3rem; font-size: var(--fs-footnote); }
.save-scene { margin: 0 0 var(--space-3); }
.colour-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); flex: 1 1 100%; }
.colour-chip { display: grid; place-items: center; min-width: 3rem; min-height: 3rem; padding: 0; background: none; border: 0; }
.wake-card { margin: 0 0 var(--space-4); }
.day-picks { display: flex; flex-wrap: wrap; gap: var(--space-3); border: 0; padding: 0; margin: 0 0 var(--space-3); }
.wake-buttons { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.scene-tile__go { background: var(--surface); color: inherit; border: var(--border-hairline); border-radius: var(--r-md); cursor: pointer; }
.scene-tile__remove { background: none; border: 0; color: var(--text-muted, inherit); text-decoration: underline; cursor: pointer; }
.colour-chip { cursor: pointer; }
.swatch circle + circle { opacity: 1; }

/* School: each message as the school posted it, in the shape of a Teams post. */
.school-post { display: flex; flex-direction: column; gap: var(--space-3); margin: 0 0 var(--space-4); max-width: 51.25rem; }
.school-post--change { border-left: 0.25rem solid var(--kcal-ink, currentColor); }
.school-post__head { display: flex; gap: var(--space-3); align-items: center; }
.school-post__head .source-badge { margin-left: auto; }
.school-post__avatar { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--info-bg); color: var(--info); font-weight: 700; }
.school-post__title { margin: 0; }
.school-post__short { margin: 0; font-weight: 600; }
.school-post__more summary { min-height: 3rem; display: flex; align-items: center; cursor: pointer; color: var(--info); font-weight: 600; }
.school-post__media { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.75rem, 1fr)); gap: var(--space-2); }
.school-post__media img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); }
.school-post__files { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0; }
.school-post__files li { padding: var(--space-2) var(--space-3); border: var(--border-hairline); border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--fs-footnote); }

/* Calendar, day view: the day by the hour. */
.day-facts { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0 0 var(--space-4); }
.day-fact { padding: var(--space-2) var(--space-3); border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-footnote); }
.day-fact--event { background: var(--info-bg); color: var(--info); font-weight: 600; }
.day-hours { list-style: none; padding: 0; margin: 0; }
.day-hour { display: grid; grid-template-columns: 4rem 1fr; gap: var(--space-3); min-height: 3.25rem; border-top: var(--border-hairline); padding: var(--space-2) 0; }
.day-hour__time { color: var(--text-muted, inherit); font-variant-numeric: tabular-nums; font-size: var(--fs-footnote); padding-top: 0.125rem; }
.day-hour.is-now .day-hour__time { color: var(--info); font-weight: 700; }
.day-hour.is-now { border-top: 0.125rem solid var(--info); }
.day-hour__events { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.day-event { display: flex; flex-direction: column; padding: var(--space-2) var(--space-3); border-radius: var(--r-md); background: var(--info-bg); border-left: 0.25rem solid var(--info); }

/* Today: the morning page. What matters first, then the day, meals, weather and air, and what to buy. */
.today-alert { margin: 0 0 var(--space-4); padding: var(--space-5); border-radius: var(--r-lg); background: var(--danger-bg); border-left: 0.375rem solid var(--danger); }
.today-alert h2 { margin: 0 0 var(--space-2); }
.today-alert p { margin: 0 0 var(--space-3); font-weight: 600; }
.today-alert__label { color: var(--danger); text-transform: uppercase; letter-spacing: 0.04em; font-size: var(--fs-footnote); }
.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr)); gap: var(--space-4); margin: 0 0 var(--space-4); }
.today-card { display: flex; flex-direction: column; gap: var(--space-3); }
.today-card h2 { margin: 0; }
.today-card--buy { border-left: 0.375rem solid var(--warning); }
.today-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.today-list li { display: grid; grid-template-columns: 5.25rem 1fr; gap: var(--space-3); align-items: baseline; }
.today-list li.muted { display: block; }
.today-list__time { color: var(--text-secondary, inherit); font-size: var(--fs-footnote); font-variant-numeric: tabular-nums; }
.today-weather { display: flex; gap: var(--space-4); align-items: center; }
.today-weather p { margin: 0; }
.today-weather__now { font-size: var(--fs-title3, 1.25rem); font-weight: 700; }
.air-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); }
.air-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 5.25rem; padding: var(--space-3); border-radius: var(--r-md); color: #FFFFFF; }
.air-chip__value { font-size: 1.75rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.air-chip__name { font-size: var(--fs-footnote); font-weight: 600; }
.air-chip--0 { background: #1E7F38; }
.air-chip--1 { background: #8A6100; }
.air-chip--2 { background: #B84700; }
.air-chip--3 { background: #C4001A; }
.air-chip--4 { background: #6B1FA8; }
.today-tomorrow { margin: 0 0 var(--space-4); }
.today-tomorrow__post p { margin: var(--space-1) 0 0; }

/* Layout review, 2026-11-23. The menu's cells grow with their labels, so "Housework" and "Smart Home" no longer
   run into their neighbours; every page uses the same width; links that stand alone are tall enough to tap. */
.app-menu__link, .surface-helper .app-menu__link, .surface-kitchen .app-menu__link { width: auto; min-width: 3.25rem; padding-left: 0.3125rem; padding-right: 0.3125rem; }
.surface-helper .app-menu__link { min-width: 4.125rem; }
.surface-kitchen .app-menu__link { min-width: 4rem; }
main[data-page="home"], main[data-page="calendar"], main[data-page="recipes"] { max-width: 73.75rem; }
.today-list a, .school-list a, .meal-grid td a, .meal-days a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* Stock: what is in each place, by category. */
.stock-have { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: var(--space-4); margin: 0 0 var(--space-6); align-items: start; }
.stock-have__place h2 { margin: 0 0 var(--space-1); }
.stock-have__cat { margin: var(--space-4) 0 var(--space-1); font-size: var(--fs-footnote); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary, inherit); }
.stock-have__list { list-style: none; padding: 0; margin: 0; }
.stock-have__list li { display: flex; gap: var(--space-3); justify-content: space-between; align-items: baseline; padding: var(--space-2) 0; border-top: var(--border-hairline); }
.stock-have__list li:first-child { border-top: 0; }
.stock-have__name { min-width: 0; }
.stock-have__count { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.stock-have__soon { color: var(--danger); font-weight: 600; }
.stock-have__cats { columns: 18.75rem; column-gap: var(--space-6); }
.stock-have__group { break-inside: avoid; margin: 0 0 var(--space-4); }
.stock-have__group .stock-have__cat { margin-top: var(--space-2); }

/* Stock pictures, and the sales on the Shopping page. */
.stock-have__list li { align-items: center; }
.stock-have__pic { flex: none; width: 2.75rem; height: 2.75rem; border-radius: var(--r-sm); object-fit: contain; background: #FFFFFF; border: var(--border-hairline); }
.stock-have__pic--letter { display: grid; place-items: center; background: var(--surface-2); color: var(--text-secondary, inherit); font-weight: 700; }
.stock-have__name { flex: 1; }
.sales { margin: 0 0 var(--space-5); }
.sales__shop { margin: var(--space-4) 0 var(--space-2); }
.sales__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18.75rem, 1fr)); gap: var(--space-3); }
.sale { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); border-radius: var(--r-md); background: var(--surface); border: var(--border-hairline); }
.sale a { font-weight: 600; min-height: 2.75rem; display: inline-flex; align-items: center; }
.sale__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.sale__was { text-decoration: line-through; font-weight: 400; }
.sale__off { display: inline-block; padding: 0 var(--space-2); border-radius: var(--r-pill); background: var(--danger-bg); color: var(--danger); font-weight: 700; font-size: var(--fs-footnote); }

/* Recipes: three ways to import, servings and metric, and cooking mode. */
.import-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr)); gap: var(--space-4); align-items: start; }
.import-ways .card h2 { margin-top: 0; }
.portions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin: 0 0 var(--space-3); }
.portions__label { font-weight: 600; margin-right: var(--space-1); }
.portions__pick { display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 var(--space-2); border-radius: var(--r-sm); background: var(--surface-2); color: inherit; text-decoration: none; font-weight: 600; }
.portions__pick.is-on { background: var(--info); color: var(--on-ink); }
.portions__units { margin-left: var(--space-3); padding: 0 var(--space-3); }
.cook-start { min-height: 3rem; }
body.page-cook .app-bar, body.page-cook .tab-bar, body.page-cook .tab-bar__fade, body.page-cook .slime-buttons { display: none; }
main[data-page="cook"] { max-width: 68.75rem; }
.cook { display: flex; flex-direction: column; gap: var(--space-5); min-height: 90vh; }
.cook__bar { display: flex; gap: var(--space-4); align-items: center; }
.cook__title { flex: 1; margin: 0; font-weight: 700; font-size: var(--fs-headline); min-width: 0; }
.cook__count { margin: 0; color: var(--text-secondary, inherit); font-size: var(--fs-headline); white-space: nowrap; }
.cook__step { font-size: 2.25rem; font-size: clamp(1.625rem, 3.4vw, 2.75rem); line-height: 1.35; font-weight: 600; margin: 0; }
.cook__ingredients, .cook__uses ul { font-size: 1.5rem; font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.5; padding-left: 1.2em; margin: 0; }
.cook__uses { padding: var(--space-4) var(--space-5); border-radius: var(--r-lg); background: var(--surface-2); }
.cook__uses h2 { margin: 0 0 var(--space-2); font-size: var(--fs-headline); }
.cook__timer-buttons, .cook__timers { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.cook__timer { min-height: 4rem; font-size: var(--fs-headline); }
.cook__running { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border-radius: var(--r-md); background: var(--info-bg); color: var(--info); font-size: var(--fs-title-3); font-weight: 700; font-variant-numeric: tabular-nums; }
.cook__running.is-done { background: var(--danger-bg); color: var(--danger); }
.cook__nav { display: grid; grid-template-columns: 1fr 2fr; gap: var(--space-4); margin-top: auto; }
.cook__nav .btn { min-height: 5rem; font-size: var(--fs-title-3); display: grid; place-items: center; }

/* Samsung screens. */
.tv { margin: 0 0 var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.tv__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.tv__head h2 { margin: 0; }
.tv__label { margin: var(--space-2) 0 0; font-size: var(--fs-footnote); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary, inherit); }
.tv__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tv-press { margin: 0; }
.tv-press .btn { min-height: 3rem; }
.tv__remote { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: flex-start; }
.tv__pad { display: grid; grid-template-columns: repeat(3, 5.25rem); gap: var(--space-2); }
.tv__pad .btn { width: 100%; min-height: 4rem; }
.tv__link { margin-top: var(--space-2); }
.day-event--school { background: var(--warning-bg); border-left-color: var(--warning); }

body.page-cook .topline, body.page-slime .topline { display: none; }

/* Compact layout (owner, 2026-11-27): less air between and inside things on phones, iPads and Macs. The kitchen
   display keeps its room. Taps stay at least 44px. */
body:not(.surface-kitchen) main { padding: var(--space-3) var(--page-pad) var(--space-8); }
body:not(.surface-kitchen) .card { padding: var(--space-4); }
body:not(.surface-kitchen) .home-section { margin-bottom: var(--space-5); }
body:not(.surface-kitchen) h1 { margin: 0 0 var(--space-3); line-height: 1.1; }
body:not(.surface-kitchen) h2, body:not(.surface-kitchen) .home-section h2 { margin: var(--space-4) 0 var(--space-2); }
body:not(.surface-kitchen) .card h2:first-child, body:not(.surface-kitchen) .card > .section-head:first-child h2 { margin-top: 0; }
body:not(.surface-kitchen) .btn { padding: 0 var(--space-4); }
body:not(.surface-kitchen) .list-row { padding-top: var(--space-2); padding-bottom: var(--space-2); }
body:not(.surface-kitchen) .today-grid, body:not(.surface-kitchen) .room-grid, body:not(.surface-kitchen) .stock-have, body:not(.surface-kitchen) .import-ways { gap: var(--space-3); }
body:not(.surface-kitchen) .today-list { gap: var(--space-2); }
body:not(.surface-kitchen) .today-alert { padding: var(--space-4); margin-bottom: var(--space-3); }
body:not(.surface-kitchen) .school-post { gap: var(--space-2); margin-bottom: var(--space-3); }
body:not(.surface-kitchen) .settings-form .field, body:not(.surface-kitchen) .field { margin-bottom: var(--space-3); }

/* The top line of every page: the Hall HQ icon on the left (on Home, the wordmark, a little larger), the slime buttons
   in the middle (owner, 2026-11-28) and the person using this device on the right. The outer two columns share the
   width equally, so the slimes sit in the same place on every page. It sits in the flow, so it never covers a title. */
.topline { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "start middle end"; align-items: center; gap: var(--space-3); max-width: 77.5rem; margin: 0 auto; padding: var(--space-2) var(--page-pad) 0; }
.topline__start { grid-area: start; justify-self: start; }
.topline__middle { grid-area: middle; }
.topline .wordmark-img { height: 3rem; max-width: none; }
/* A phone has no room for the eight slimes in the same row as the icon and the face: they take a row of their own,
   still in the middle, and shrink a little to fit a narrow phone. */
@media (max-width: 699px) {
  .topline { grid-template-columns: 1fr auto; grid-template-areas: "start end" "middle middle"; row-gap: 0; }
  .topline__middle, .slime-buttons__row { min-width: 0; max-width: 100%; }
  .slime-button { flex: 0 1 2.75rem; min-width: 0; }
  .slime-button img { width: 100%; max-width: 2rem; height: auto; }
}
.brand-mark { display: flex; border-radius: 22.5%; overflow: hidden; box-shadow: 0 1px 0.1875rem rgba(0, 0, 0, 0.12); }
.brand-mark img { display: block; width: 3.15rem; height: 3.15rem; }  /* 40% larger (owner, 2026-11-28) */
.me-mark { margin-left: auto; display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; justify-content: flex-end; text-decoration: none; }
.me-mark .avatar { width: 2.25rem; height: 2.25rem; border-radius: 50%; object-fit: cover; }
.me-mark__ask { font-size: var(--fs-footnote); font-weight: 600; padding: var(--space-1) var(--space-3); border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); }
.me-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.875rem, 1fr)); gap: var(--space-3); align-items: start; }
.me-pick__person { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-3); border-radius: var(--r-lg); background: var(--surface); border: 0.125rem solid transparent; font: inherit; color: inherit; cursor: pointer; }
.me-pick__person.is-on { border-color: var(--info); }
.me-pick__person img { width: 4rem; height: 4rem; border-radius: 50%; object-fit: cover; }
.school-post:target { outline: 0.1875rem solid var(--info); outline-offset: 0.125rem; scroll-margin-top: 5rem; }
.room-faces { display: inline-flex; margin-right: var(--space-2); vertical-align: middle; }
.room-faces img { width: 1.75rem; height: 1.75rem; border-radius: 50%; object-fit: cover; }
.room-faces img + img { margin-left: -0.5rem; }
h1 .room-faces img { width: 2rem; height: 2rem; }

/* Calendar as time (Day and Week), and Month with icons and faces. Rows are 15 minutes. */
.tl-title { margin: var(--space-3) 0 var(--space-2); }
.tl { --slot: 0.8125rem; --hours-w: 2.75rem; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.tl--week { --slot: 0.6875rem; }
.tl__head, .tl__body { display: grid; grid-template-columns: var(--hours-w) repeat(var(--days, 1), minmax(0, 1fr)); }
.tl--multi .tl__head, .tl--multi .tl__body { grid-template-columns: var(--hours-w) repeat(7, minmax(0, 1fr)); }
.tl__head { border-bottom: 1px solid var(--separator); background: var(--surface-2); }
.tl__dayhead { display: flex; flex-direction: column; gap: 0.125rem; padding: var(--space-1); min-width: 0; border-left: 1px solid var(--separator); }
.tl__dayhead.is-today { background: var(--info-bg); }
.tl__date { display: flex; flex-direction: column; align-items: center; color: inherit; text-decoration: none; min-height: 2.75rem; justify-content: center; }
.tl__date span { font-size: var(--fs-caption); color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.tl__date strong { font-size: var(--fs-headline); line-height: 1.1; }
.is-today .tl__date strong { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--info); color: var(--on-ink); }
.tl__chips { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.tl-chip { display: flex; align-items: center; gap: 0.1875rem; min-width: 0; padding: 0.125rem 0.3125rem; border-radius: 0.375rem; background: var(--surface); font-size: var(--fs-caption); line-height: 1.25; }
.tl-chip__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tl-icon { flex: none; width: 0.875rem; height: 0.875rem; }
.tl-faces { display: inline-flex; flex: none; }
.tl-faces img { width: 1.125rem; height: 1.125rem; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 0.09375rem var(--surface); }
.tl-faces img + img { margin-left: -0.375rem; }
.tl-chip .tl-faces img { width: 1rem; height: 1rem; }
.tl__body { max-height: 70vh; overflow-y: auto; }
.tl__hours, .tl__col { display: grid; grid-auto-rows: var(--slot); position: relative; min-width: 0; }
.tl__col { border-left: 1px solid var(--separator); background-image: repeating-linear-gradient(to bottom, var(--separator) 0 1px, transparent 1px calc(var(--slot) * 4)); column-gap: 0.125rem; padding: 0 0.125rem; }
.tl__col.is-today { background-color: var(--surface-2); background-color: color-mix(in srgb, var(--info-bg) 40%, transparent); }
.tl__fill { grid-column: 1 / -1; visibility: hidden; }
.tl__hours .tl__fill, .tl__hours .tl__hour { grid-column: 1; }
.tl__hour { font-size: var(--fs-caption); color: var(--text-secondary); text-align: right; padding: 0 0.375rem 0 0; transform: translateY(-0.6em); font-variant-numeric: tabular-nums; }
.tl__hour.r1 { transform: none; }
.tl__now { grid-column: 1 / -1; align-self: start; height: 0.125rem; background: var(--danger); position: relative; z-index: 2; }
.tl__now::before { content: ""; position: absolute; left: -0.25rem; top: -0.1875rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--danger); }
.tl__ev { container-type: inline-size; display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow: hidden; margin: 1px 0; padding: 0.1875rem 0.3125rem;
          border-radius: 0.4375rem; background: var(--info-bg); border-left: 0.1875rem solid var(--info); font-size: var(--fs-caption); line-height: 1.2; z-index: 1; }
.tl__ev-top { display: flex; align-items: center; gap: 0.1875rem; }
.tl__ev-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl__ev-time { color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl__ev.s1 .tl__ev-time, .tl__ev.s2 .tl__ev-time { display: none; }
.tl__ev.s1 .tl__ev-top { display: none; }
@container (max-width: 4rem) { .tl__ev-title { -webkit-line-clamp: 3; font-size: 0.625rem; } .tl__ev-time { display: none; } }
.tl__ev--school { background: var(--warning-bg); border-left-color: var(--warning); }
.tl__ev--plane, .tl__ev--hotel, .tl__ev--sun, .tl__ev--away { background: var(--surface); background: color-mix(in srgb, var(--m-sky, #5AC8FA) 22%, var(--surface)); border-left-color: var(--m-sky, #5AC8FA); }
.tl__ev--sport { background: var(--surface); background: color-mix(in srgb, var(--m-red, #E03229) 16%, var(--surface)); border-left-color: var(--m-red, #E03229); }
.tl__ev--party, .tl__ev--birthday { background: var(--surface); background: color-mix(in srgb, var(--m-hot-pink, #FF2D87) 16%, var(--surface)); border-left-color: var(--m-hot-pink, #FF2D87); }
.tl__ev--medical { background: var(--surface); background: color-mix(in srgb, var(--m-violet, #8E5CF7) 16%, var(--surface)); border-left-color: var(--m-violet, #8E5CF7); }
.tl--day .tl__ev { font-size: var(--fs-footnote); padding: 0.25rem 0.5rem; }
.tl--day .tl-faces img { width: 1.375rem; height: 1.375rem; }
.tl--day .tl-icon { width: 1rem; height: 1rem; }
@media (max-width: 699px) { .tl--week { --hours-w: 2.125rem; } .tl--week .tl__hour { font-size: 0.5625rem; padding-right: 0.1875rem; } .tl--week .tl__ev { padding: 0.125rem 0.1875rem; } .tl--week .tl__ev-top .tl-faces img + img { display: none; } }
.cal-month td { vertical-align: top; }
.cal-month .tl-chip { margin-top: 0.125rem; background: var(--surface-2); }
.tl-more { display: block; font-size: var(--fs-caption); color: var(--text-secondary); padding: 1px 0.25rem; }
@media (max-width: 699px) { .cal-month .tl-chip__text { display: none; } .cal-month .tl-chip { display: inline-flex; padding: 0.125rem; } }

/* Calendar polish (2026-11-27): one-row view switch, small step links, icons that show in dark mode, and the week's
   all-day entries as icon and face when a column is narrow. */
.cal-views { display: flex; flex-wrap: nowrap; gap: 0.125rem; padding: 0.125rem; border-radius: var(--r-md); background: var(--surface-2); max-width: 26.25rem; }
.cal-views a { flex: 1; justify-content: center; min-height: 2.75rem; padding: 0 var(--space-2); border-radius: calc(var(--r-md) - 0.125rem); background: none; font-size: var(--fs-sub); font-weight: 600; }
.cal-nav { display: flex; gap: var(--space-4); margin: var(--space-2) 0; }
.cal-nav a { font-size: var(--fs-sub); min-height: 2.75rem; display: inline-flex; align-items: center; }

.tl__chips .tl-chip:nth-child(n+4) { display: none; }
@media (max-width: 699px) { .tl--week .tl-chip__text { display: none; } .tl--week .tl-chip { justify-content: center; padding: 0.125rem; } .tl--week .tl-chip .tl-faces img + img { display: none; } }
main[data-page="calendar"] h1 { margin-bottom: var(--space-2); }

/* YouTube on the projector (Today). */
.yt { margin: 0 0 var(--space-4); }
.yt__row, .yt__play { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.yt__play input[type="url"], .yt__row input { flex: 1 1 13.75rem; min-height: 2.75rem; }
.yt__save { flex: 1 1 100%; }
.yt__save summary { min-height: 2.75rem; display: inline-flex; align-items: center; cursor: pointer; color: var(--info); font-size: var(--fs-sub); }
.yt__saved { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.yt__saved li { display: flex; align-items: center; gap: 0.125rem; }
.yt__saved form { margin: 0; }
.yt__remove { min-height: 2.75rem; background: none; border: 0; color: var(--text-secondary); font-size: var(--fs-footnote); text-decoration: underline; cursor: pointer; }

/* The projector screen: the morning page across the room, with YouTube beside it. Sized by the screen's width. */
body.page-screen .app-bar, body.page-screen .tab-bar, body.page-screen .tab-bar__fade,
body.page-screen .topline, body.page-screen .slime-buttons { display: none; }
main[data-page="screen"] { max-width: none; padding: 1.6vw 2vw; }
.scr { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.6vw; font-size: 1.25vw; font-size: clamp(0.9375rem, 1.25vw, 1.875rem); min-height: 92vh; }
.scr h2 { font-size: 1.45em; margin: 0 0 0.4em; }
.scr__date { margin: 0; font-size: 2.1em; font-weight: 700; }
.scr__alert { padding: 1em 1.2em; border-radius: var(--r-lg); background: var(--danger-bg); border-left: 0.4em solid var(--danger); margin: 0.6em 0 1em; }
.scr__alert h2 { font-size: 1.7em; } .scr__alert p { margin: 0; font-size: 1.2em; font-weight: 600; }
.scr__label { color: var(--danger); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85em !important; }
.scr__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1em; }
.scr__card { padding: 0.9em 1.1em; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.scr__card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.45em; }
.scr__time { display: inline-block; min-width: 5.5em; color: var(--text-secondary); font-size: 0.85em; }
.scr__weather { display: flex; align-items: center; gap: 1em; margin-top: 1em; }
.scr__weather p { margin: 0; } .scr__now { font-size: 1.3em; font-weight: 700; }
.scr__side { display: flex; flex-direction: column; gap: 0.8em; }
.scr__player { aspect-ratio: 16 / 9; width: 100%; border-radius: var(--r-lg); overflow: hidden; background: #000000; display: grid; place-items: center; }
.scr__player iframe { width: 100%; height: 100%; border: 0; }
.scr__idle { color: #CCCCCC; text-align: center; padding: 1em; margin: 0; }
.scr__side .scr__weather { flex-wrap: wrap; margin-top: 0.4em; padding: 0.9em 1.1em; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }

/* The household team's section. */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr)); gap: var(--space-3); margin: 0 0 var(--space-4); }
.team-person h2 { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-3); }
.team-person h2 img { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; }
.team-due { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-2) var(--space-3); border-radius: var(--r-md); margin: 0 0 var(--space-2); border-left: 0.25rem solid var(--info); background: var(--info-bg); }
.team-due--soon { border-left-color: var(--warning); background: var(--warning-bg); }
.team-due--late { border-left-color: var(--danger); background: var(--danger-bg); }
.team-due__text { display: flex; flex-direction: column; gap: 0.125rem; flex: 1; min-width: 0; }
.team-due form { margin: 0; }
.team-phone { display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap; }
.today-team { margin: 0 0 var(--space-3); border-left: 0.375rem solid var(--warning); }
