:root {
  /* Type scale (#92): rem, so text follows the reader's text-size setting. 1rem = 16 px by default. */
  --text-xs: 0.75rem;    /* 12: captions, the smallest allowed (V3) */
  --text-sm: 0.8125rem;  /* 13: secondary lines */
  --text-base: 0.875rem; /* 14: dense lists and controls */
  --text-body: 0.9375rem; /* 15: body text */
  --text-md: 1rem;       /* 16: card headings */
  --text-lg: 1.125rem;   /* 18: dialog headings, glyph buttons */
  --text-xl: 1.25rem;    /* 20: section glyphs */
  --text-2xl: 1.375rem;  /* 22: app title, chevrons */
  --text-3xl: 1.75rem;   /* 28: the clock, sign-in title */
  color-scheme: light dark;
  --bg: #f3f4f1;
  --panel: #ffffff;
  --text: #1c211f;
  --muted: #5d6763;
  --line: #dfe2dd;
  --accent: #0b6b57;
  /* Text and glyphs on an accent fill (brand #169): white on the dark-mode accent was 1.88:1. */
  --accent-on: #ffffff;
  /* fjord (weather) and lyng (travel): section glyphs and soft panels only, never badges,
     since they sit close to the metro and train line colours (brand #169). */
  --fjord: #1f5f8b;
  --fjord-soft: #e3eef5;
  --lyng: #7b3f6e;
  --lyng-soft: #f3e8f0;
  --train: #7a2e8e;
  --bus: #b4321f;
  --bad: #b3261e;
  --warn: #8a5a00;
  --live: #0a7d56;
  /* Badges with white text (--chip-text): each at least 4.5:1 with white, in both themes (HIG V1). */
  --live-fill: #0a7d56;
  --metro: #0b5fa5;
  --tram: #0a7a78;
  --water: #2f6f8f;
  --other-line: #5d6763;
  --chip-text: #ffffff;
  /* The AI outfit picture is drawn on white, in both themes. */
  --picture-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111513;
    --panel: #1a1f1d;
    --text: #e8ecea;
    --muted: #a0aba6;
    --line: #2d3431;
    --accent: #5fd0b5;
    --accent-on: #0c1512;
    --fjord: #8cc4ea;
    --fjord-soft: #16262f;
    --lyng: #dba6cf;
    --lyng-soft: #2a1c27;
    --train: #9a4fb0;
    --bus: #b04432;
    --bad: #ff8a80;
    --warn: #e6b450;
    --live: #4fd6a1;
    --live-fill: #0b7a55;
  }
}

/* Figtree (SIL OFL 1.1, fonts/OFL.txt), brand #169: the name, headings, the leave time and primary
   buttons. Body text stays in the system font, so nothing is downloaded to read. Latin + æøå, − and –;
   tabular figures (tnum) included, so 08:00 doesn't jitter. */
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
:root { --font-brand: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3, .brand-mark, button.primary, .button-like.primary,
.morning-line[data-key="leave"] .morning-main { font-family: var(--font-brand); }

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 20px;
  background: var(--bg);
  color: var(--text);
  font: var(--text-body)/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--accent); }
.muted { color: var(--muted); font-weight: 400; }

button, input { font: inherit; color: inherit; }
/* Touch targets (docs/hig T1): 44 px for controls, 36 px for filter chips. */
button, select, summary, .button-like,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { min-height: 44px; }
/* 16 px or more in fields: iPhones zoom the page in on anything smaller. */
input, select, textarea { font-size: max(16px, 1rem); }
summary { line-height: 1.4; padding-block: 10px; } /* min-height 44 px above keeps T1 */
button {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  cursor: pointer;
}
@media (hover: hover) { button:hover { border-color: var(--muted); } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1500px;
  margin: 0 auto 16px;
}
.top h1 { font-size: var(--text-2xl); }
/* The name on every screen (brand #169): a 24 px sun glyph in accent + Daglig 18/700. */
.brand-mark { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: var(--text-lg); font-weight: 700; line-height: 1.2; }
.sun-glyph { width: auto; height: 24px; color: var(--accent); flex: none; }
.top-right { display: flex; align-items: center; gap: 16px; }
.clock { font-size: var(--text-3xl); font-weight: 600; }

.grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-areas: "morning look" "setup look" "itinerary look" "nearby look" "planner side" "packing side" "wardrobe wardrobe";
  gap: 16px;
  align-items: start;
  max-width: 1500px;
  margin: 0 auto;
}
.setup { grid-area: setup; }
.morning { grid-area: morning; }
.planner { grid-area: planner; }
.look { grid-area: look; }
.side { grid-area: side; display: grid; gap: 16px; min-width: 0; }
.wardrobe { grid-area: wardrobe; }
.packing { grid-area: packing; }
.itinerary { grid-area: itinerary; }
.nearby { grid-area: nearby; }

.panel {
  min-width: 0;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}
.panel-head h2 { font-size: var(--text-md); }
.status { margin-left: auto; color: var(--muted); font-size: var(--text-xs); }
.status.stale { color: var(--bad); font-weight: 600; }
.source { margin-top: 12px; color: var(--muted); font-size: var(--text-xs); }

/* Weather */
.now-and-hours { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: stretch; }
.now { display: flex; align-items: center; gap: 12px; }
.now-icon { font-size: 2.75rem; line-height: 1; }
.now-temp { font-size: 2.375rem; font-weight: 600; line-height: 1; }
.now-text { color: var(--muted); font-size: var(--text-sm); }
.hours {
  display: flex;
  flex: 1 1 340px;
  min-width: 0;
  gap: 2px;
  overflow-x: auto;
}
.hour { flex: 1 0 50px; padding: 4px; text-align: center; font-size: var(--text-sm); }
.hour .icon { display: block; font-size: var(--text-xl); }
.hour .rain { display: block; min-height: 18px; color: var(--accent); font-size: var(--text-xs); }
.days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.day { padding: 8px 10px; border-top: 1px solid var(--line); font-size: var(--text-sm); }
.day b { display: block; }

/* Trip planner */
.from { margin: 14px 0; }
.from-label { margin-bottom: 8px; }
.from label { display: block; margin: 8px 0 4px; color: var(--muted); font-size: var(--text-sm); }
.from input { width: 100%; max-width: 420px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.from .results { max-width: 420px; }
#use-location { margin-top: 6px; }
[hidden] { display: none !important; }
.at-place { margin-bottom: 12px; font-weight: 600; }
.destinations { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px 24px; }
.destination h3 { padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: var(--text-body); }
.trips, .steps { margin: 0; padding: 0; list-style: none; }
.trip { padding: 10px 0; border-bottom: 1px solid var(--line); }
.step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 4px 0;
  font-size: var(--text-base);
}
.step small { color: var(--muted); }
.line {
  padding: 1px 4px;
  overflow: hidden;
  border-radius: 4px;
  color: var(--chip-text);
  font-size: var(--text-xs);
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line.rail { background: var(--train); }
.line.bus { background: var(--bus); }
.line.metro { background: var(--metro); }
.line.tram { background: var(--tram); }
.line.water { background: var(--water); }
.line.other { background: var(--other-line); }
.line.walk { background: transparent; color: var(--muted); font-weight: 400; }
.late { display: block; color: var(--warn); font-size: var(--text-xs); }
.leg-note { display: block; color: var(--warn); font-size: var(--text-xs); }
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--live);
  vertical-align: 1px;
}
.step.cancelled b { color: var(--muted); text-decoration: line-through; }
.tag-bad { display: block; color: var(--bad); font-size: var(--text-xs); font-weight: 600; }

/* News */
.story { padding: 7px 0; border-bottom: 1px solid var(--line); }
.story:last-child { border-bottom: 0; }
.story p { color: var(--muted); font-size: var(--text-sm); }
details { margin-top: 8px; }
summary { cursor: pointer; font-size: var(--text-sm); } /* #92: summaries take --text; green is for primaries and the live dot */
.story a { color: var(--text); font-weight: 600; text-decoration: none; }
.story a:hover { text-decoration: underline; }
.empty { color: var(--muted); font-size: var(--text-sm); }

/* Settings */
dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
}
dialog::backdrop { background: rgb(0 0 0 / .45); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
dialog h2 { font-size: var(--text-lg); }
dialog h3 { margin: 18px 0 6px; font-size: var(--text-base); }
dialog label { display: block; margin: 8px 0 4px; font-size: var(--text-sm); }
dialog input { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.results button { width: 100%; margin-top: 4px; text-align: left; }
.quiet { margin-top: 18px; color: var(--muted); }
.stories { margin: 0; padding: 0; list-style: none; }
.destination-setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.destination-setting .quiet { margin-top: 0; }

/* Wardrobe: label test uploader */
.wardrobe { display: grid; gap: 12px; }
.wardrobe .panel-head { margin-bottom: 0; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.shot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  max-width: 100%;
  overflow: hidden;
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}
.shot:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.shot.filled { border-style: solid; border-color: var(--accent); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.shot-text { display: grid; gap: 4px; padding: 10px; }
.shot-text b { color: var(--text); }
.shot-text small { font-size: var(--text-xs); }
.shot .tag { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: var(--panel); color: var(--text); font-size: var(--text-xs); font-weight: 600; }
.wardrobe .field, .packing .field, .add-dialog .field { color: var(--muted); font-size: var(--text-sm); margin-bottom: -6px; }
.wardrobe input[type="text"], .add-dialog input[type="text"] { width: 100%; max-width: 420px; box-sizing: border-box; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
button.primary { justify-self: start; padding: 10px 16px; border-color: var(--accent); background: var(--accent); color: var(--accent-on); font-weight: 600; }
button:disabled { opacity: .5; cursor: not-allowed; }
.message { min-height: 1.4em; font-size: var(--text-sm); }
.message.error { color: var(--bad); font-weight: 600; }
.saved-head { margin-top: 6px; font-size: var(--text-base); }
.saved { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.saved li { display: grid; grid-template-columns: auto 56px 56px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.saved li:last-child { border-bottom: 0; }
.saved .n { min-width: 2.2em; color: var(--muted); font-size: var(--text-sm); }
.saved img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--bg); }
.saved .meta { display: grid; gap: 4px; min-width: 0; font-size: var(--text-sm); overflow-wrap: anywhere; }
.saved .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.saved .actions button { padding: 4px 10px; font-size: var(--text-xs); }
.danger { color: var(--bad); }
.hint { color: var(--muted); font-size: var(--text-xs); margin-top: -4px; }
.usage { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.usage legend { padding: 0; margin-bottom: 8px; font-size: var(--text-sm); color: var(--muted); }
.chips { display: grid; gap: 8px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.wardrobe-search { width: 100%; max-width: 420px; margin: 4px 0 8px; }
.brand-ask { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--text-base); }
.edit-names { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.chip { min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: var(--text-sm); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-on); font-weight: 600; }
.quick-missing { display: flex; flex-basis: 100%; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; padding: 8px; border: 1px solid var(--accent); border-radius: 10px; }
.quick-missing-title { flex-basis: 100%; margin: 0; font-size: var(--text-sm); font-weight: 600; }
.chip.missing { border-color: var(--accent); font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
.pill { padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--text-xs); }
.saved .thumb { position: relative; display: block; width: 56px; height: 56px; }
.saved .more { position: absolute; right: 2px; bottom: 2px; padding: 0 5px; border-radius: 999px; background: var(--panel); font-size: var(--text-xs); font-weight: 600; }
.saved li.editing { align-items: start; }
.saved li.editing .meta { grid-column: 1 / -1; gap: 8px; }
.saved .edit-note { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.button-like { position: relative; display: inline-flex; align-items: center; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); font-size: var(--text-xs); cursor: pointer; }
.button-like input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.button-like:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary.small { padding: 4px 10px; font-size: var(--text-xs); }
.small-text { font-size: var(--text-xs); }

label.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-size: var(--text-base); }
dialog label.check input { width: auto; padding: 0; }

/* Trip rules and scooters */
.trip-rules { display: grid; gap: 4px; }
.trip-rules > label:first-child { display: flex; gap: 8px; align-items: center; font-size: var(--text-base); }
.trip-rules select { width: auto; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.scooters { margin-bottom: 8px; font-size: var(--text-sm); color: var(--muted); }
.line.scooter { background: var(--live-fill); }
.trip-label { display: inline-block; margin-bottom: 4px; padding: 1px 8px; border-radius: 999px; background: var(--live-fill); color: var(--chip-text); font-size: var(--text-xs); font-weight: 600; }

/* Hidden routes */
.trip-menu { position: absolute; top: -2px; right: 0; }
.trip-menu > summary { display: flex; align-items: center; justify-content: center; min-width: 44px; list-style: none; padding: 0 8px; border-radius: 6px; color: var(--muted); font-size: var(--text-lg); line-height: 1.2; cursor: pointer; }
.trip-menu > summary::-webkit-details-marker { display: none; }
.trip-menu[open] > summary { background: var(--bg); color: var(--text); }
.trip-menu-items { position: absolute; right: 0; top: calc(100% + 4px); z-index: 3; min-width: 12rem; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 6px 18px rgb(0 0 0 / .15); }
.trip-menu-items button { width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; font-size: var(--text-base); }
.trip-menu-items button:hover { background: var(--bg); }
.advanced { margin-top: 10px; }
.advanced > summary { color: var(--muted); font-size: var(--text-base); cursor: pointer; }
.advanced[open] > summary { margin-bottom: 8px; }
.advanced p { margin: 0 0 8px; font-size: var(--text-sm); }
.advanced .data-actions { margin-bottom: 10px; }
.hidden-routes { display: grid; gap: 4px; margin: 0 0 8px; padding: 0; list-style: none; font-size: var(--text-base); }
.hidden-routes li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hidden-routes .quiet { margin: 0; }

/* Wardrobe grid */
.add-garment { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.add-garment[open] { padding-bottom: 14px; }
.add-garment > summary { font-weight: 600; font-size: var(--text-base); cursor: pointer; }
.add-garment > :not(summary) { display: block; margin-top: 12px; }
.add-garment > .shots { display: grid; }
.add-garment > .usage { display: grid; }
.add-garment > label.field { margin-bottom: -6px; }
.wardrobe #label-message:empty { display: none; }
.filters { display: grid; gap: 8px; }
.chip .count { margin-left: 2px; font-weight: 400; }
.chip.small { padding: 4px 10px; font-size: var(--text-xs); }
/* Columns grow with the text size (#227): two at 360 px normally, one at large text, so names break between words. */
.garment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(104px, 7.5rem)), 1fr)); gap: 10px; }
.garment-card {
  display: grid; gap: 4px; align-content: start; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-align: left; cursor: pointer;
}
.garment-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg); }
.garment-card .card-name { padding: 0 10px; font-size: var(--text-base); font-weight: 600; overflow-wrap: break-word; }
.garment-card .card-meta { min-height: 1.3em; padding: 0 10px 10px; color: var(--muted); font-size: var(--text-xs); }
.garment-card .warn { color: var(--warn); }
.garment-dialog { width: min(640px, calc(100vw - 24px)); }
.garment-dialog .facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0 0 12px; font-size: var(--text-base); }
.garment-dialog .facts dt { color: var(--muted); }
.garment-dialog .facts dd { margin: 0; }
.saved.single li { display: block; padding: 0; border-bottom: 0; }
.garment-dialog input[type="radio"], .garment-dialog input[type="checkbox"] { width: auto; padding: 0; }
.garment-dialog .facts .unchecked { grid-column: 1 / -1; color: var(--warn); }
/* In the pop-up the photos show large above; the list row's number and thumbnails go. */
.saved.single .n, .saved.single li > img, .saved.single .thumb { display: none; }
.garment-dialog .review-photos { margin-bottom: 12px; }
.garment-dialog .review-photos a { flex-basis: 70%; }

/* Footwear in the scan check */
.review .footwear { margin: 0; padding: 0; border: 0; display: grid; gap: 2px; }
.review .footwear input { width: auto; padding: 0; }

/* Today's outfit */
.rate { display: grid; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 10px; font-size: var(--text-base); font-weight: 600; }
.rate-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } /* one row, equal widths (Fable) */
.rate-buttons button { padding: 6px 12px; font-weight: 400; }
.outfit-weather { margin-bottom: 10px; font-size: var(--text-base); }
/* Wear, opened: compact rows with a thumbnail, the short name, and the layer with its reason. */
.outfit-picks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.outfit-picks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.outfit-picks button.outfit-open { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 0; border: 0; background: none; text-align: left; font-size: inherit; cursor: pointer; }
.outfit-picks button.outfit-open:hover b { text-decoration: underline; }
.outfit-picks img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.outfit-picks .what { display: grid; gap: 1px; min-width: 0; font-size: var(--text-body); text-align: left; }
.outfit-picks .what small { color: var(--muted); font-size: var(--text-sm); }
.outfit-picks button[data-swap] { padding: 4px 14px; font-size: var(--text-base); }
.look-picture { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; border-radius: 8px; background: var(--picture-bg); }
.look-wait { color: var(--muted); }
.look-about { margin-bottom: 10px; }
.outfit-advice { margin: 10px 0 0; padding-left: 18px; font-size: var(--text-base); }
.outfit-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.commute-times { display: flex; flex-wrap: wrap; gap: 12px; }
.commute-times label { display: grid; gap: 4px; margin: 0; font-size: var(--text-sm); }
.commute-times select { min-width: 7em; }

/* Checking a scan */
.pill.ok { border-color: var(--live); color: var(--live); font-weight: 600; }
.pill.warn { border-color: var(--warn); color: var(--warn); }
.row-status { font-size: var(--text-xs); color: var(--muted); }
.row-status.error { color: var(--bad); font-weight: 600; }
.review .field { display: grid; gap: 4px; margin: 0; color: var(--muted); font-size: var(--text-xs); }
.review select, .review input[type="text"], .review input[type="number"] {
  box-sizing: border-box; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--text); font: inherit; font-size: var(--text-base);
}
.review-photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.review-photos a { flex: 0 0 78%; scroll-snap-align: start; }
.review-photos img { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; border-radius: 8px; }
.part { display: grid; gap: 6px; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.part-head { display: flex; gap: 8px; align-items: center; width: 100%; padding: 0; }
.part-head input[type="text"] { flex: 1; }
.main-pick { display: flex; gap: 4px; align-items: center; font-size: var(--text-sm); white-space: nowrap; }
.fibre-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px auto 32px; gap: 6px; align-items: center; }
.fibre-row .unit { color: var(--muted); font-size: var(--text-sm); }
.quiet-x { padding: 2px 0; border-color: transparent; background: transparent; color: var(--muted); font-size: var(--text-lg); line-height: 1; }

/* Privacy notice and data actions */
.privacy { max-width: 560px; }
.privacy h3 { margin: 16px 0 6px; font-size: var(--text-body); }
.privacy p, .privacy li { font-size: var(--text-base); line-height: 1.45; }
.privacy ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.privacy-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.privacy-actions .primary { justify-self: auto; }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Sign-in screen: shown instead of the app until signed in */
.signin { display: none; max-width: 420px; margin: 12vh auto 0; text-align: center; }
/* The icon is full bleed (maskable); round it here, like a Home Screen tile. */
.signin img { margin: 0 auto 8px; border-radius: 22%; }
.signin h1 { margin-bottom: 0; font-size: var(--text-3xl); font-weight: 700; }
/* The endorsement, on sign-in, About and the share card only (#169): 13/500, muted. */
.endorse { margin: 0 0 8px; color: var(--muted); font-family: var(--font-brand); font-size: var(--text-sm); font-weight: 500; }
/* The promise (#169): the one line that says what Daglig is for. */
.signin .promise { margin: 12px 0 0; font-family: var(--font-brand); font-size: var(--text-lg); font-weight: 600; text-wrap: balance; }
/* About, at the foot of Me: the lock-up's endorsement and the shell version. */
.about { margin: 24px 0 4px; text-align: center; }
.signin .primary { margin: 20px auto 0; justify-self: center; }
body[data-auth="out"] .signin { display: grid; gap: 4px; }
/* Dialogs stay out of this: the privacy notice opens while sign-in is still "pending". */
body[data-auth="out"] > :not(.signin):not(dialog),
body[data-auth="pending"] > :not(.signin):not(dialog) { display: none !important; }

/* Bottom tabs: phones only */

@media (max-width: 900px) {
  body { padding: 16px; }
  .grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "morning" "setup" "itinerary" "nearby" "look" "planner" "packing" "side" "wardrobe"; }
  .days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top h1 { font-size: var(--text-lg); }
  .clock { font-size: var(--text-2xl); }
  .top { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  body {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .top-right { width: 100%; justify-content: space-between; }
  .tabs {
    position: fixed;
    inset: auto 0 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    background: var(--panel);
    border-top: 1px solid var(--line);
  }
}

/* Wider screens (#85): the same tabs as a rail on the left, and each tab's cards in two columns,
   so every section is one tap away instead of 2,600 px down. */
@media (min-width: 761px) {
  body { padding-left: 112px; }
  .tabs {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 5;
    display: grid;
    align-content: start;
    gap: 4px;
    width: 88px;
    padding: 20px 8px;
    background: var(--panel);
    border-right: 1px solid var(--line);
  }
}
@media (min-width: 901px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; }
  .wardrobe { grid-column: 1 / -1; }
}

/* Tabs at every width (#85): one tab's cards at a time. The named rows are dropped so hidden cards
   leave no gaps. */
.side { display: contents; }
.grid { grid-template-areas: none; }
.setup, .morning, .itinerary, .nearby, .look, .planner, .packing, .wardrobe { grid-area: auto; }
[data-section] { display: none; }
body[data-tab="today"] [data-section="today"],
body[data-tab="trips"] [data-section="trips"],
body[data-tab="me"] [data-section="me"] { display: block; }
body[data-tab="wardrobe"] [data-section="wardrobe"] { display: grid; }
.tabs a {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 0;
  color: var(--muted);
  font-size: var(--text-xs);
  text-decoration: none;
}
.tabs a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Large text on a phone (#227): four labels no longer fit side by side, so the icons stay and the
   labels are kept for screen readers only, as iOS does. em here is the reader's text size. */
@media (max-width: 15em) {
  .tabs span[data-t] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tabs svg { width: 28px; height: 28px; }
  /* Without its label the current tab needs more than colour (WCAG 1.4.1, nyano-qa on #228): a bar under the icon. */
  .tabs a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
}

/* Outfit photos (#24) and sharing (#28) */
.wardrobe-views { margin: 4px 0 12px; }
.button-like.primary { padding: 8px 14px; border-color: var(--accent); background: var(--accent); color: var(--accent-on); font-size: var(--text-base); font-weight: 600; }
.outfit-photo, .share-preview { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 10px; background: var(--bg); margin-bottom: 10px; }
.outfit-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.pick { display: grid; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 10px; font-size: var(--text-xs); cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--bg); }
.pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.outfit-tagged { margin: 0 0 10px; padding-left: 18px; }
.link-like { padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; font: inherit; text-align: left; cursor: pointer; }
.confirm-public { margin: 10px 0 6px; font-weight: 600; }
.share-link { word-break: break-all; }
.shares-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.shares-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.look-actions { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.saved-badge { margin: 0 0 10px; font-size: var(--text-base); }

/* Hidden panels stay hidden, whatever the tab rules say. */
.panel[hidden] { display: none !important; }
.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;
}

/* The morning card (docs/hig L1): one line each for leaving, wearing and the weather. */
.morning { padding-top: 6px; padding-bottom: 6px; }
.morning-lines { display: grid; }
.morning-line { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; border-bottom: 1px solid var(--line); }
.morning-line:last-child { border-bottom: 0; }
.morning-open {
  display: grid; flex: 1 1 220px; gap: 2px; padding: 12px 0; border: 0; border-radius: 0;
  background: none; text-align: left; line-height: 1.3;
}
.morning-label { color: var(--muted); font-size: var(--text-sm); }
.morning-main { font-size: var(--text-xl); font-weight: 700; overflow-wrap: anywhere; }
.morning-detail { color: var(--muted); font-size: var(--text-base); }
.morning-warn { display: block; margin-top: 2px; color: var(--warn); font-weight: 600; }

/* The setup checklist for a new account (docs/hig S5). */
.setup-steps { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.setup-step { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 8px 0; }
.setup-step > span:nth-child(2) { display: grid; gap: 2px; }
.setup-step .muted { font-size: var(--text-base); }
.setup-step.done b { color: var(--muted); font-weight: 400; }
.setup-check { display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 50%; color: var(--accent); font-weight: 700; }
.setup-step.done .setup-check { border-color: var(--accent); }
.setup-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; }
#setup-hide { margin-block: 0; margin-inline-start: auto; }

/* Trips: one line each, the legs on tap (docs/hig L3). */
.trip-details > summary.trip-head {
  display: grid; gap: 2px; margin: 0; padding: 4px 28px 4px 0; line-height: 1.35;
  list-style: none; position: relative;
}
.trip-details > summary.trip-head::-webkit-details-marker { display: none; }
.trip-details > summary.trip-head::after {
  content: "›" / ""; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: var(--text-2xl); transition: transform .15s;
}
.trip-details[open] > summary.trip-head::after { transform: translateY(-50%) rotate(90deg); }
.trip-leave { font-size: var(--text-md); }
.trip-times { color: var(--text); }
.trip-how { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: var(--text-base); }
.trip-how .late, .trip-how .tag-bad { display: inline; }
.trip-details > .steps { margin-top: 8px; }
.trip-tools { display: flex; justify-content: flex-end; }
.trip-tools .trip-menu { position: relative; top: auto; right: auto; }
@media (prefers-reduced-motion: reduce) { .trip-details > summary.trip-head::after { transition: none; } }

/* Wear and Weather: one line each, opening to the outfit card and the forecast. */
.morning-wear, .morning-weather { border-bottom: 1px solid var(--line); }
.morning-weather { border-bottom: 0; }
.morning-lines:not(:empty) { border-bottom: 1px solid var(--line); }
.morning-summary {
  display: grid; gap: 2px; padding: 12px 28px 12px 0; line-height: 1.3;
  list-style: none; position: relative; cursor: pointer;
}
.morning-summary::-webkit-details-marker { display: none; }
.morning-summary::after {
  content: "›" / ""; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: var(--text-2xl); transition: transform .15s;
}
details[open] > .morning-summary::after { transform: translateY(-50%) rotate(90deg); }
.morning-outfit, .morning-forecast { padding: 4px 0 14px; }
.morning-outfit h3, .morning-forecast h3 { font-size: var(--text-body); }
.morning-wear-quick:not(:empty) { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.morning-wear[open] + .morning-wear-quick { display: none; }
.morning-wear:has(+ .morning-wear-quick:not(:empty)):not([open]) { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .morning-summary::after { transition: none; } }

/* Settings (docs/hig L4, L5): groups that open one at a time, each showing its value closed. */
.settings .dialog-head { position: sticky; top: -20px; z-index: 2; margin: -20px 0 4px; padding: 20px 0 8px; background: var(--panel); }
.setting-group { border-bottom: 1px solid var(--line); }
.setting-group > summary {
  display: grid; gap: 2px; padding: 12px 28px 12px 0; line-height: 1.3;
  list-style: none; position: relative; color: var(--text); font-size: var(--text-body);
}
.setting-group > summary::-webkit-details-marker { display: none; }
.setting-group > summary::after {
  content: "›" / ""; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: var(--text-2xl); transition: transform .15s;
}
.setting-group[open] > summary::after { transform: translateY(-50%) rotate(90deg); }
.group-title { font-weight: 600; }
.group-value { color: var(--muted); font-size: var(--text-base); overflow-wrap: anywhere; }
.group-value:empty { display: none; }
.group-body { padding: 0 0 16px; }
.group-body > h3:first-child { margin-top: 0; }
.settings select { padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.inline-select { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.group-body .quiet { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .setting-group > summary::after { transition: none; } }
.trip-mode { color: var(--muted); }
.undo { margin-left: 6px; }
/* Packing (#14) */
.pack-form-row { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0; }
.pack-form-row .field { display: grid; gap: 4px; margin: 0; }
.pack-form-row input, .pack-form-row select, #pack-place { padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
#pack-place { width: 100%; max-width: 420px; box-sizing: border-box; }
.pack-cards { display: grid; gap: 8px; margin-top: 8px; }
.pack-card { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 10px; }
.pack-card span { color: var(--muted); font-size: var(--text-sm); }
.pack-card .pack-ask { color: var(--text); font-weight: 600; }
.pack-feedback { display: grid; gap: 8px; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.pack-feedback h3, .pack-feedback p { margin: 0; }
.pack-feedback .primary { justify-self: start; }
.pack-list { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 4px; }
.pack-item { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 8px; cursor: pointer; }
.pack-item > span { display: grid; }
.pack-item img { width: 40px; height: 52px; object-fit: cover; border-radius: 6px; background: var(--bg); }
.pack-item.on .pack-name { text-decoration: line-through; color: var(--muted); }
.pack-gaps { margin: 8px 0; padding-left: 18px; color: var(--warn); font-size: var(--text-base); }
/* Warnings above the checklist line up with the headings around them (round 20). */
.pack-warnings { padding-left: 0; list-style: none; display: grid; gap: 6px; }
.pack-luggage { font-size: var(--text-base); }
.pack-luggage.over { color: var(--warn); font-weight: 600; }
.pack-days ul { list-style: none; padding: 0; display: grid; gap: 6px; font-size: var(--text-base); }
.pack-days li { display: grid; }
#pack-dialog h3 { font-size: var(--text-body); margin: 12px 0 4px; }

/* Packing on the Travel tab: the same spacing it had in the wardrobe. No display here: on phones
   the tab rules decide whether a card shows (tests/hig.test.mjs, L4). */
.packing > * + * { margin-top: 12px; }
.packing .panel-head { margin-bottom: 0; }

/* Garments / Outfits: a native two-way switch (radio buttons), styled as one control. */
.segmented { display: inline-flex; margin: 4px 0; padding: 2px; border: 1px solid var(--line); border-radius: 1.5rem; }
/* At a larger reader text size the choices wrap instead of pushing the page sideways (QA #123):
   a fieldset is as wide as its content unless told otherwise. */
.segmented { flex-wrap: wrap; max-width: 100%; min-inline-size: 0; }
.segmented label { position: relative; display: inline-flex; flex: 1 1 auto; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 0 clamp(0.5rem, 3vw, 1rem); border-radius: 999px; font-size: var(--text-base); cursor: pointer; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented label:has(input:checked) { background: var(--accent); color: var(--accent-on); font-weight: 600; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Add a garment, in its own dialog. */
.add-dialog > :not(form) { display: block; margin-top: 12px; }
.add-dialog .shots { display: grid; }

/* One filter row; season and use folded. */
.more-filters { margin: 0; }
.more-filters > summary { font-size: var(--text-base); }
.more-filters[open] > summary { margin-bottom: 4px; }
.wardrobe-search { margin-bottom: 0; }

/* The scan check, asked as a question first. */
.review-question { font-size: var(--text-md); }
.review-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: var(--text-body); }
.review-summary dt { color: var(--muted); }
.review-summary dd { margin: 0; overflow-wrap: anywhere; }

/* Itinerary (issue #42): on Today while away, and in the trip's dialog. */
.itinerary > * + * { margin-top: 10px; }
.itinerary .panel-head button { margin: 0; }
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.days button { min-height: 44px; padding: 4px 12px; border-radius: 999px; font-size: var(--text-base); white-space: nowrap; }
.days button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-on); font-weight: 600; }
.timeline { display: grid; margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 48px 14px minmax(0, 1fr); gap: 10px; padding: 8px 0; }
.timeline li.muted { display: block; }
.timeline time { font-weight: 700; }
.timeline .dot { width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; border: 2px solid var(--accent); background: var(--panel); }
.timeline li.leg .dot { background: var(--accent); }
.timeline li.past { color: var(--muted); }
.timeline small { display: block; color: var(--muted); font-size: var(--text-sm); }
.nearby > * + *, #nearby-body > * + * { margin-top: 10px; }
.nearby .panel-head button { margin: 0; }
.nearby-list li { grid-template-columns: 48px minmax(0, 1fr); }
.nearby-list p { margin: 2px 0; }
.nearby-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.itin { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.itin-items { display: grid; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.itin-items li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.itin-items time { padding-top: 12px; }
.itin-items li.editing .itin-item { border-color: var(--accent); }
.itin-item { display: block; width: 100%; padding: 10px 8px; border-color: transparent; background: transparent; text-align: left; }
.itin-remove { min-width: 44px; padding: 6px 10px; border-color: transparent; background: transparent; color: var(--muted); font-size: var(--text-lg); line-height: 1; }
.itin-remove[data-sure] { border-color: var(--bad); color: var(--bad); font-size: var(--text-sm); font-weight: 600; }
.itin-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.itin-items time { font-weight: 700; }
.itin-items small { display: block; color: var(--muted); font-size: var(--text-sm); }
.itin-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; margin-top: 8px; }
.itin-add { flex: 1 1 100%; }
.itin-add[open] > :not(summary) { margin-top: 8px; }
.itin-add input[type="text"] { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.itin-add select { padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); }

/* Essentials (#35) */
#kit-view > * + * { margin-top: 10px; }
#kit-list h3 { margin: 16px 0 6px; font-size: var(--text-body); }
.kit-items { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.kit-item { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border-radius: 10px; text-align: left; }
.kit-item span { color: var(--muted); font-size: var(--text-sm); }
.kit-form { display: grid; gap: 10px; }
.kit-form input[type="text"], .kit-form input[type="number"], .kit-form select { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); }
.kit-kinds { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }

/* A panel that couldn't load (#53): what failed, and Try again. */
.failed { display: grid; gap: 8px; justify-items: start; }
.failed p, .empty-state p { margin: 0; color: var(--text); }
.empty-state { display: grid; gap: 8px; justify-items: start; }
.failed { padding-left: 10px; border-left: 3px solid var(--bad); }
/* Empty and failed states span a whole grid, with the button under the text (#54, #53). */
.garment-grid > .failed, .garment-grid > .empty, .garment-grid > [data-empty] { grid-column: 1 / -1; }
.garment-grid > [data-empty] { justify-self: start; }
.results { margin: 0; padding: 0; list-style: none; }
.results:empty { display: none; }

/* A slim header (#55): the phone shows the time; Settings is an icon with its name. */
.icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sources { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: var(--text-base); }
/* A setup step opens Settings on its one group (#55). */
.settings.focused > details:not(.focus-target) { display: none; }
/* The sheet is titled after the group (round 47), so its own summary line would say it twice (call-dev). */
.settings.focused > .focus-target > summary { display: none; }
@media (max-width: 760px) {
  .clock { display: none; }
  /* Date and place on the left, the cog beside them: one row (#55 retest). */
  .top { flex-wrap: nowrap; align-items: center; gap: 8px; }
  .top-right { width: auto; flex: none; }
  .top #here { font-size: var(--text-sm); }
  .icon-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .top { padding-bottom: 4px; }
  .top h1 { font-size: 1.0625rem; }
}
/* Folded parts of a trip (#35 retest): the checklist first, the rest a tap away. */
.trip-fold { margin-top: 12px; border-top: 1px solid var(--line); }
.trip-fold > summary .fold-title { font-weight: 600; }
#pack-section h4 { margin: 14px 0 6px; font-size: var(--text-base); }
/* Day one (#68): a garment from the weather, until yours takes its place. */
.outfit-picks li.generic { grid-template-columns: 44px minmax(0, 1fr); }
.generic-mark { width: 44px; height: 44px; border: 2px dashed var(--line); border-radius: 8px; }
/* Me (#55): settings, sources and your data, one group per row. */
.me-groups { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.me-group { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border-radius: 10px; text-align: left; }
.me-group span { color: var(--muted); font-size: var(--text-sm); }
.news-fold > summary { cursor: pointer; }
/* A morning line that couldn't load: plain text with the warning edge, not a headline (QA). */
.morning-summary.is-failed { border-left: 3px solid var(--bad); padding-left: 8px; }
.morning-summary.is-failed .morning-main { color: var(--text); font-size: var(--text-md); font-weight: 600; }
a.button-like { color: inherit; text-decoration: none; }
/* Quick add (#68): garments without a photo. */
.quick-add { display: grid; gap: 8px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.quick-add h3, .add-photos-title { margin: 0; font-size: var(--text-body); }
.no-photo { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 8px; background: var(--bg); color: var(--muted); }
/* No photo yet (round 21): a compact tile with the type's icon, not a big empty frame. */
.garment-icon { width: 55%; max-width: 40px; height: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.garment-card.compact .no-photo { aspect-ratio: auto; height: 64px; border-radius: 0; }
.outfit-picks .no-photo { width: 44px; height: 44px; }
/* #92: one main fact leads (L2): when to leave; Wear and Weather follow. */
.morning-open .morning-main { font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.01em; }
.morning-summary .morning-main { font-size: 1.0625rem; font-weight: 600; }
/* Rows say a tap registered (touch has no hover). */
.morning-open:active, .morning-summary:active, .trip-head:active { background: color-mix(in srgb, var(--text) 6%, transparent); }
.morning-open, .morning-summary, .trip-head { transition: background-color 150ms ease-out; }
#trips-times { margin: 0 0 0 auto; }
.garment-grid > .empty-state { grid-column: 1 / -1; }
/* Round 10: Top news shows it opens; the hourly row fades at the edge when it scrolls. */
.news-fold > summary { display: flex; align-items: center; }
.news-fold > summary::after { content: "›"; margin-inline-start: auto; color: var(--muted); font-size: var(--text-xl); line-height: 1; transform: rotate(90deg); }
.news-fold[open] > summary::after { transform: rotate(-90deg); }
.news-fold > summary::-webkit-details-marker { display: none; }
@media (prefers-reduced-motion: no-preference) { .news-fold > summary::after { transition: transform 150ms ease-out; } }
.hours { mask-image: linear-gradient(to right, #000 88%, transparent); }
/* Weather icons (#92): line drawings in the tab bar's style, sized with the text. */
.wx { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.now-icon .wx { width: 44px; height: 44px; }
/* The live-dot legend only explains times that are shown (nyano-user, C2). */
#trips-body:not(:has(.trip-head)) ~ #trips-legend { display: none; }
/* Pick up or drop off (#136 S2). */
.family-form { display: grid; gap: 8px; }
.family-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: var(--text-base); }
.family-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: start; }
.family-list li button { grid-column: 2; grid-row: 1 / span 2; }
.family-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
/* Car minutes with steppers (Fable): − and + are 44 px targets (T1). */
.stepper-row { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 6px 0; font-size: var(--text-base); }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { min-width: 44px; min-height: 44px; padding: 0; font-size: var(--text-lg); }
.stepper input { width: 3.5em; text-align: center; }
/* The type under a brand name on a Wardrobe tile (#141). */
.garment-card .card-type { padding: 0 10px; color: var(--muted); font-size: var(--text-xs); }
/* Quick add's optional brand and colour (#141). */
.quick-extras { display: grid; gap: 8px; margin-bottom: 8px; }
#quick-colours .chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-on); }
/* The move to daglig.nyano.net (phase B): one line on the old address. */
/* One inline run of text, so the full stop after the link never starts a line (nyano-user, 360 px); the button below. */
.moved-banner { display: block; margin: 0; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: var(--text-base); }
.moved-banner[hidden] { display: none; }
.moved-banner #moved-dismiss { display: block; margin-top: 6px; }
