/*
 * Skikk: fjord ink on sand, one cloudberry accent for what needs you, a colour per child.
 * Familjen Grotesk for the voice (dates, names, headings), Figtree to read. Both are served
 * from the instance itself (public/fonts, OFL): a closed cloud fetches nothing from anywhere.
 */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("/fonts/familjen-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  /* Light mode sits on warm sand, not white: calmer at 06:30 with a baby on the arm. */
  --paper: #efe8dc;
  --card: #f8f4ec;
  --card-soft: #e7dfd0;
  --ink: #0f3340;
  --ink-2: #3c5a63;
  --quiet: #556a6c;
  --line: #ddd4c4;
  /* Multe: dark enough to read as text on sand and to carry white text. */
  --accent: #a84f08;
  --accent-ink: #ffffff;
  --accent-soft: #f6dfc6;
  --fjord: #0f4c5c;
  --fjord-2: #3aa0ab;
  --fjord-soft: #d9e3dc;
  /* Today's date: fjord on sand, multe at night. */
  --tile: #0f4c5c;
  --tile-ink: #ffffff;
  /* The orb keeps its fjord in both themes, with a ripe cloudberry on it. */
  --orb-1: #3aa0ab;
  --orb-2: #0f4c5c;
  --cloud: #f2a13a;
  --ok: #1f7a55;
  --late: #b8322a;
  --focus: #2f8f9a;

  --coral: #c2453d;
  --teal: #1f8a70;
  --plum: #6c5ccf;
  --amber: #c27612;
  --sky: #2f74c0;
  --moss: #4a8a3c;
  --rose: #c2466f;
  --slate: #56677a;

  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgb(15 51 64 / 5%), 0 8px 22px -12px rgb(15 51 64 / 22%);
  --card-border: color-mix(in srgb, var(--line) 62%, transparent);
  --orb-glow: 0 10px 24px -8px color-mix(in srgb, var(--accent) 42%, transparent), 0 12px 24px -12px color-mix(in srgb, var(--orb-2) 65%, transparent);
  --display: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tab-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1f26;
    --card: #12303a;
    --card-soft: #173944;
    --ink: #e8f2f1;
    --ink-2: #b9d0d0;
    --quiet: #8fabae;
    --line: #1f4450;
    --accent: #ff9a45;
    --accent-ink: #1a0d02;
    --accent-soft: #4a2a12;
    --fjord: #9fd8d8;
    --fjord-2: #6cc4c9;
    --fjord-soft: #1d4652;
    --tile: #ff9a45;
    --tile-ink: #1a0d02;
    --ok: #4fc08d;
    --late: #ff7a6b;
    --focus: #6cc4c9;
    --shadow: 0 1px 2px rgb(0 0 0 / 28%), 0 12px 26px -14px rgb(0 0 0 / 58%);
    --card-border: color-mix(in srgb, var(--line) 78%, transparent);
    --orb-glow: 0 10px 24px -8px color-mix(in srgb, var(--accent) 36%, transparent), 0 14px 26px -12px rgb(0 0 0 / 68%);
    color-scheme: dark;
  }
}

[hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: hidden has to win over any component's display. */
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px / 1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font: 700 2.1rem / 1.05 var(--display);
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2 {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

h3 {
  font-size: 0.92rem;
  font-weight: 600;
}

p {
  margin: 0.25rem 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 2px;
  border-radius: 8px;
}

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

.small {
  font-size: 0.82rem;
}

.label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 0.15rem;
}

.eyebrow {
  font-size: 0.85rem;
  color: var(--quiet);
  margin: 0 0 0.2rem;
}

.eyebrow::first-letter {
  text-transform: uppercase;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.icon.flip {
  transform: scaleX(-1);
}

/* ── Frame ─────────────────────────────────────────────────────────────── */

.frame {
  min-height: 100dvh;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem max(16px, env(safe-area-inset-left)) calc(var(--tab-h) + 48px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.tabs {
  position: fixed;
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: var(--tab-h);
  border-radius: 24px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  box-shadow:
    0 12px 32px -12px rgb(15 51 64 / 28%),
    0 2px 6px rgb(15 51 64 / 8%);
}

.tabs .brand {
  display: none;
}

.tab {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.72rem;
  font-weight: 550;
  color: var(--quiet);
  text-decoration: none;
  transition:
    color 150ms ease,
    transform 140ms ease;
}

.tab:active {
  transform: scale(0.95);
}

.tab .icon {
  width: 24px;
  height: 24px;
}

.tab.on {
  color: var(--fjord);
}

.tab.on::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 46px;
  height: 30px;
  translate: -50% 0;
  border-radius: 15px;
  background: var(--fjord-soft);
  z-index: -1;
}

.tab.on::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 4px;
  height: 4px;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--fjord);
}

.badge {
  position: absolute;
  top: 8px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.68rem;
  line-height: 18px;
  text-align: center;
}

@media (min-width: 900px) {
  .frame {
    display: grid;
    grid-template-columns: 220px 1fr;
  }
  .tabs {
    position: sticky;
    inset: 0 auto auto;
    height: 100dvh;
    border-radius: 0;
    border-width: 0 1px 0 0;
    box-shadow: none;
    backdrop-filter: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 1.4rem 0.9rem;
    border-top: 0;
    border-right: 1px solid var(--line);
    background: var(--card-soft);
  }
  .tabs .brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font: 700 1.45rem / 1 var(--display);
    letter-spacing: -0.025em;
    color: var(--ink);
    text-decoration: none;
    padding: 0 0.6rem 1.2rem;
  }
  .tabs .brand .brand-mark {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
  }
  .tab {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.7rem;
    font-size: 0.95rem;
    color: var(--ink-2);
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-s);
  }
  .tab:hover {
    background: var(--card);
  }
  .tab.on {
    background: var(--card);
    color: var(--fjord);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
  }
  .tab.on::before,
  .tab.on::after {
    display: none;
  }
  .tab .icon {
    width: 20px;
    height: 20px;
  }
  .badge {
    position: static;
    margin-left: auto;
  }
  .page {
    padding: 2.2rem 2rem 6rem;
  }
}

/* ── The assistant ─────────────────────────────────────────────────────── */

.wide-only {
  display: none;
}

.assist {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-ink);
  cursor: pointer;
}

.orb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-top: -22px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle at 30% 24%, var(--orb-1), var(--orb-2) 62%);
  color: #fff;
  box-shadow:
    0 0 0 4px var(--card),
    var(--orb-glow);
  transition:
    transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 180ms ease;
}

.orb .brand-mark {
  width: 38px;
  height: 38px;
}

.orb.small {
  width: 40px;
  height: 40px;
  margin: 0;
  box-shadow: none;
}

.orb.small .brand-mark {
  width: 26px;
  height: 26px;
}

.assist:hover .orb {
  transform: translateY(-1px) scale(1.03);
}

.assist:active .orb {
  transform: scale(0.92);
}

.assist-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.assist .badge {
  top: -21px;
  left: calc(50% + 9px);
  box-shadow: 0 0 0 2px var(--orb-2);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

@media (min-width: 900px) {
  .wide-only {
    display: flex;
  }
  .assist {
    order: -1;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0 0 1rem;
    padding: 0.55rem 0.75rem 0.55rem 0.55rem;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--ink);
    box-shadow: var(--shadow);
    font: 600 0.95rem var(--sans);
    transition:
      transform 140ms ease,
      border-color 150ms ease,
      box-shadow 150ms ease;
  }
  .assist:hover {
    border-color: var(--line);
  }
  .assist:hover .orb,
  .assist:active .orb {
    transform: none;
  }
  .tabs .brand {
    order: -2;
  }
  .assist .orb {
    width: 36px;
    height: 36px;
    margin: 0;
    box-shadow: none;
  }
  .assist .orb .brand-mark {
    width: 24px;
    height: 24px;
  }
  .assist-label {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
  }
  .assist .badge {
    display: none;
  }
  .assist-label {
    white-space: nowrap;
  }
}

.assistant {
  width: min(600px, 100vw);
  max-width: 100vw;
  max-height: min(86dvh, 760px);
  margin: auto auto 0;
  padding: 1rem 16px calc(1rem + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 26px 26px 0 0;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 -20px 60px -20px rgb(0 0 0 / 35%);
  display: none;
  flex-direction: column;
  gap: 0.8rem;
}

.assistant[open] {
  display: flex;
  animation: rise 0.22s ease-out;
}

@keyframes rise {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}

@media (min-width: 700px) {
  .assistant {
    margin: auto;
    border-radius: 26px;
    padding-bottom: 1rem;
  }
}

.assistant::backdrop {
  background: rgb(31 28 34 / 40%);
  backdrop-filter: blur(3px);
}

.assistant-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.assistant-head h2 {
  margin: 0;
  font: 600 1.3rem / 1.2 var(--display);
}

.assistant-head p {
  margin: 0.1rem 0 0;
}

.icon-only {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
}

.assistant.talking .assistant-head p {
  display: none;
}

.assistant-postbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-s);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.assistant-postbox span {
  flex: 1;
}

.talk {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.talk:empty {
  display: none;
}

.talk > li {
  max-width: 88%;
  padding: 0.6rem 0.85rem;
  border-radius: 18px;
}

.talk p {
  margin: 0;
}

.talk .me {
  align-self: flex-end;
  background: var(--ink);
  color: var(--paper);
  border-bottom-right-radius: 6px;
}

.talk .me img {
  display: block;
  max-width: 180px;
  max-height: 180px;
  border-radius: 12px;
  margin-bottom: 0.3rem;
}

.talk .skikk {
  align-self: flex-start;
  background: var(--card-soft);
  border-bottom-left-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 100%;
  width: 100%;
}

.talk .pending .said::after {
  content: " ...";
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.talk .said {
  font-weight: 550;
}

.talk .lines {
  margin: 0;
  padding-left: 1.1rem;
}

.talk .placed {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.talk .placed > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  background: var(--card);
}

.talk .placed .what {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.5rem;
  min-width: 0;
  flex: 1;
}

.talk .kind {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.talk .kind.event {
  color: var(--sky);
}

.talk .kind.bring {
  color: var(--teal);
}

.talk .kind.todo {
  color: var(--plum);
}

.talk .meta {
  font-size: 0.82rem;
  color: var(--quiet);
}

.talk .acts {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.talk .undone .text {
  text-decoration: line-through;
  color: var(--quiet);
}

.talk .skikk > .undo {
  align-self: flex-start;
}

.talk .go {
  align-self: flex-start;
  font-weight: 600;
  color: var(--accent);
}

.suggest {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px;
}

.suggest .chip {
  flex: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font: 550 0.88rem var(--sans);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
}

.composer {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: end;
  gap: 0.4rem;
  padding: 0.35rem;
  border: 1.5px solid color-mix(in srgb, var(--line) 65%, transparent);
  border-radius: 24px;
  background: var(--card-soft);
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.composer:focus-within {
  background: var(--card);
  border-color: var(--fjord);
  box-shadow: var(--shadow);
}

.composer textarea,
.composer textarea:focus {
  resize: none;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.3rem;
  min-height: 0;
  font: 1rem / 1.35 var(--sans);
  color: var(--ink);
  outline: none;
  box-shadow: none;
}

.composer .scan,
.composer .mic,
.composer .send {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.composer .scan {
  color: var(--ink-2);
  background: var(--card-soft);
}

.composer .scan input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.composer .send {
  border: 0;
  padding: 0;
  background: var(--accent);
  color: var(--accent-ink);
}

button.card.intake {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1.5px dashed var(--line);
  background: transparent;
  box-shadow: none;
}

button.card.intake > span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */

.hello {
  padding: 0.3rem 0 0.2rem;
}

.flash {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok);
  font-size: 0.88rem;
  font-weight: 600;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 150ms ease;
}

.card.soft {
  background: var(--card-soft);
  border-color: color-mix(in srgb, var(--line) 48%, transparent);
  box-shadow: none;
}

a.card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

a.card:hover,
button.card:hover {
  border-color: var(--line);
}

a.card:active,
button.card:active {
  transform: scale(0.992);
}

a.card .icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.card.link span {
  flex: 1;
  font-weight: 600;
}

.card.link .icon:last-child {
  color: var(--quiet);
  width: 20px;
}

.section-title {
  margin: 0.6rem 0.2rem 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--quiet);
}

.postbox-call {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  box-shadow: none;
}

.postbox-call span {
  flex: 1;
  font-weight: 600;
}

.postbox-call .go {
  flex: none;
  font-size: 0.85rem;
  color: var(--accent);
}

.dinner strong {
  font: 600 1.1rem var(--display);
}

/* ── Nudges (packs speaking up) ───────────────────────────────────────── */

.nudges {
  display: grid;
}

.nudge {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.nudges h2 + .nudge {
  border-top: 0;
}

.nudge > .icon {
  color: var(--tint, var(--accent));
  width: 22px;
  height: 22px;
}

.nudge p {
  margin: 0;
  font-size: 0.93rem;
}

.nudge form {
  flex-wrap: nowrap;
}

.nudge.sprouting > .icon {
  color: var(--ok);
}

/* ── Timeline and people ──────────────────────────────────────────────── */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.timeline li {
  display: grid;
  grid-template-columns: 4.2rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.1rem 0.45rem 0.7rem;
  border-left: 3px solid var(--tint, var(--line));
}

.timeline .when {
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.timeline .what {
  font-weight: 550;
}

.timeline .what .kit {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--ink-2);
}

.who {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-2);
  font-weight: 500;
}

.who-pill {
  gap: 0.4rem;
  padding: 0.16rem 0.65rem 0.16rem 0.2rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tint, var(--slate)) 14%, var(--card));
  border: 1px solid color-mix(in srgb, var(--tint, var(--slate)) 28%, transparent);
  font-size: 0.86rem;
  font-weight: 550;
  color: var(--ink);
  line-height: 1.2;
}

.dot {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--tint, var(--slate));
  color: #fff;
  font: 700 0.72rem var(--display);
}

.dot.big {
  width: 48px;
  height: 48px;
  font: 700 1.4rem var(--display);
}

.tint-coral {
  --tint: var(--coral);
}
.tint-teal {
  --tint: var(--teal);
}
.tint-plum {
  --tint: var(--plum);
}
.tint-amber {
  --tint: var(--amber);
}
.tint-sky {
  --tint: var(--sky);
}
.tint-moss {
  --tint: var(--moss);
}
.tint-rose {
  --tint: var(--rose);
}
.tint-slate {
  --tint: var(--slate);
}
.tint-ink {
  --tint: var(--ink-2);
}

/* ── Items ────────────────────────────────────────────────────────────── */

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

.items .aisle-head {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 0.8rem 0 0.25rem;
}

.items .aisle-head:first-child {
  padding-top: 0.2rem;
}

.aisle-toggle {
  margin: 0 0 0.5rem;
}

.item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--line);
  transition:
    opacity 0.3s,
    transform 0.3s;
}

.item:last-child {
  border-bottom: 0;
}

.items.compact .item {
  min-height: 40px;
  border: 0;
}

.item .text {
  overflow-wrap: anywhere;
}

.item .meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.due-pick {
  position: relative;
}

.due-pick > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.due-pick > summary::-webkit-details-marker {
  display: none;
}

.due-pick .due-none .icon {
  width: 18px;
  height: 18px;
  color: var(--quiet);
}

.due-pick[open] .due-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: min(270px, 80vw);
  padding: 0.6rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 12%, transparent);
}

.due-menu input {
  flex: 1 1 8rem;
  min-width: 0;
}

.due-menu input[aria-invalid="true"] {
  border-color: var(--late);
}

.due-error {
  flex-basis: 100%;
  color: var(--late);
}

.item.done .text {
  color: var(--quiet);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--quiet) 60%, transparent);
}

.item.fresh {
  animation: arrive 0.35s ease-out;
}

.item.handed {
  opacity: 0;
  transform: translateX(24px);
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.tick {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--tint, var(--ink-2)) 55%, var(--line));
  background: transparent;
  color: transparent;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.tick .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.6;
}

.tick[aria-pressed="true"] {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.handoff {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 500 0.78rem var(--sans);
  cursor: pointer;
}

.handoff .icon {
  width: 14px;
  height: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--card-soft);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 550;
  border: 0;
  white-space: nowrap;
}

.chip.due.now {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}

.chip.due.late {
  background: color-mix(in srgb, var(--late) 15%, transparent);
  color: var(--late);
}

button.chip {
  font: 550 0.88rem var(--sans);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 140ms ease;
}

button.chip:active {
  transform: scale(0.97);
}

button.chip .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chips form {
  margin: 0;
}

.plates {
  display: grid;
  gap: 1.1rem;
}

.plate h2 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 0.2rem;
}

.plate.mine h2 {
  color: var(--accent);
}

.bring {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.bring-row {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-s);
  background: color-mix(in srgb, var(--tint) 9%, var(--card));
}

.bring-row h3 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--tint);
  margin-bottom: 0.1rem;
}

/* ── Baby ─────────────────────────────────────────────────────────────── */

.baby {
  border-top: 4px solid var(--tint);
}

.baby .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.baby strong {
  font: 600 1.15rem var(--display);
}

.next-checkup {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0 0.6rem;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.next-checkup .label {
  grid-column: 1 / -1;
}

/* ── Forms ────────────────────────────────────────────────────────────── */

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  width: 100%;
  font: 16px var(--sans);
  color: var(--ink);
  background: var(--card-soft);
  border: 1.5px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: var(--radius-s);
  padding: 0.65rem 0.8rem;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

textarea {
  resize: vertical;
  line-height: 1.4;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
select:focus,
textarea:focus {
  outline: none;
  background: var(--card);
  border-color: var(--fjord);
  box-shadow:
    0 2px 8px -2px rgb(15 51 64 / 10%),
    0 0 0 3px color-mix(in srgb, var(--fjord-soft) 70%, transparent);
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
}

label.check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
}

label.check input {
  width: auto;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.3rem;
}

button {
  font: 600 0.95rem var(--sans);
}

.primary,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 140ms ease,
    opacity 150ms ease;
}

.primary:active,
.ghost:active {
  transform: scale(0.97);
}

.primary {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
}

.ghost {
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.ghost.danger {
  color: var(--late);
}

.small.primary,
.small.ghost {
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

/* What the assistant noticed: it speaks first, in the fjord, with one thing to say yes to. */
.card.noticing {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem;
  background: var(--fjord-soft);
  box-shadow: none;
}

.noticing .orb.small {
  margin-top: 0.1rem;
}

.noticing .label {
  color: var(--fjord);
}

.noticing .said {
  margin: 0 0 0.2rem;
  font: 600 1.06rem / 1.3 var(--display);
  color: var(--ink);
}

.noticing .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

button.link {
  border: 0;
  background: none;
  padding: 0.35rem 0.25rem;
  color: var(--quiet);
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.round {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

.big {
  padding: 1rem 1.6rem;
  font-size: 1.05rem;
}

.row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.row > label {
  flex: 1;
  min-width: 120px;
}

.row.end {
  justify-content: flex-end;
}

.row.between {
  justify-content: space-between;
}

.row.inline input {
  flex: 1;
  min-width: 90px;
}

.row.inline select {
  flex: 0 1 auto;
  width: auto;
}

.stack {
  display: grid;
  gap: 0.75rem;
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.seg button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
}

.seg button.on {
  background: var(--ink);
  color: var(--paper);
}

details.more {
  margin-top: 0.7rem;
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
}

details.more summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-2);
}

details.more[open] summary {
  margin-bottom: 0.7rem;
}

/* ── Lists ────────────────────────────────────────────────────────────── */

.pills {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.pill {
  flex: none;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: var(--card);
  border: 1.5px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-2);
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 140ms ease;
}

.pill:active {
  transform: scale(0.97);
}

.pill.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.pill[class*="tint-"]:not(.on) {
  border-color: color-mix(in srgb, var(--tint) 45%, var(--line));
}

.add-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.add-item input {
  border-radius: 999px;
  padding-left: 1rem;
}

.again {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
}

.again h3 {
  margin-bottom: 0.5rem;
  color: var(--ink-2);
}

.empty {
  padding: 0.8rem 0;
}

.empty-state {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-s);
  background: var(--card-soft);
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.empty-state .empty-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--card);
  color: var(--fjord);
}

.empty-state .empty-mark .icon {
  width: 20px;
  height: 20px;
}

.empty-state p {
  margin: 0;
  font-size: 0.92rem;
}

/* ── Week ─────────────────────────────────────────────────────────────── */

.days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.day {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow);
}

.day.past {
  opacity: 0.6;
  box-shadow: none;
}

.day.is-today {
  outline: 2px solid var(--accent);
}

.day-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.day-head .wd {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--quiet);
}

.day-head .dn {
  font: 600 1.45rem var(--display);
}

.is-today .day-head {
  color: var(--accent);
}

.day-body {
  display: grid;
  gap: 0.3rem;
  align-content: center;
}

.event {
  display: grid;
  grid-template-columns: 3rem 1fr auto auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--tint, var(--slate)) 10%, transparent);
  font-size: 0.92rem;
}

.event .when {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--ink-2);
}

.event .dot {
  width: 18px;
  height: 18px;
  font-size: 0.6rem;
}

.event .repeats {
  display: inline-flex;
  color: var(--quiet);
}

.event .repeats .icon {
  width: 14px;
  height: 14px;
}

details.event-edit fieldset.scope {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

details.event-edit fieldset.scope legend {
  width: 100%;
}

details.event-edit > summary {
  list-style: none;
  cursor: pointer;
}

details.event-edit > summary::-webkit-details-marker {
  display: none;
}

details.event-edit[open] {
  padding: 0.5rem;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
}

details.event-edit[open] > summary {
  margin-bottom: 0.6rem;
}

details.event-edit .row > label {
  flex: 1;
  min-width: 0;
}

details.event-edit .row input {
  width: 100%;
  min-width: 0;
}

.meal-clear {
  margin-left: auto;
}

.meal-clear button {
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--quiet);
}

.meal-clear .icon {
  width: 14px;
  height: 14px;
}

.meal {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.meal .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.meal.empty {
  color: var(--quiet);
  font-style: italic;
}

.ideas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  margin: 0.4rem 0 0.8rem;
}

.idea button {
  width: 100%;
  height: 100%;
  display: grid;
  gap: 0.2rem;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-s);
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.idea button:hover {
  border-color: var(--accent);
}

.idea strong {
  font: 600 1rem var(--display);
}

.idea .icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
  vertical-align: -2px;
}

/* ── Postbox ──────────────────────────────────────────────────────────── */

.address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.address .label {
  width: 100%;
}

.address code {
  flex: 1;
  font-size: 0.95rem;
  word-break: break-all;
}

label.file {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.2rem 0.75rem;
  padding: 0.8rem;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-s);
  cursor: pointer;
}

label.file > .icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

label.file span {
  display: grid;
}

label.file input {
  grid-column: 1 / -1;
  border: 0;
  padding: 0.2rem 0;
  font-size: 0.85rem;
  background: transparent;
}

.post {
  background: var(--card);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 0.7rem;
}

.post header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.post header .quiet:last-child {
  margin-left: auto;
}

.post h3 {
  font: 600 1.05rem var(--display);
  margin-bottom: 0.5rem;
}

.src {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.src .icon {
  width: 15px;
  height: 15px;
}

.proposals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.proposal {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.15rem 0.6rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-s);
  background: var(--card-soft);
  border-left: 3px solid var(--kind, var(--line));
}

.proposal .kind {
  grid-column: 1 / -1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kind, var(--ink-2));
}

.proposal .text {
  display: grid;
  gap: 0.25rem;
  font-weight: 550;
}

.proposal .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.proposal .meta:empty {
  display: none;
}

.proposal form {
  flex-wrap: nowrap;
  gap: 0.3rem;
}

.proposal .decided {
  font-size: 0.8rem;
  color: var(--quiet);
}

.proposal.added {
  background: color-mix(in srgb, var(--ok) 10%, var(--card));
}

.proposal.added .decided {
  color: var(--ok);
  font-weight: 600;
}

.proposal.dismissed {
  opacity: 0.55;
}

.proposal.event {
  --kind: var(--sky);
}
.proposal.bring {
  --kind: var(--teal);
}
.proposal.todo {
  --kind: var(--plum);
}
.proposal.shopping {
  --kind: var(--amber);
}

.earlier .post {
  box-shadow: none;
  background: var(--card-soft);
}

/* ── Family ───────────────────────────────────────────────────────────── */

.people {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem 0.4rem 0.45rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}

.person-chip .who-pill {
  padding: 0;
  border: 0;
  background: transparent;
}

.person-chip .who-name {
  color: var(--ink);
  font-weight: 600;
}

.child {
  border-top: 4px solid var(--tint);
}

.child-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.child-head h2 {
  font: 600 1.4rem var(--display);
  margin: 0;
}

.stages {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.4rem;
}

.stage {
  display: grid;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  font-size: 0.85rem;
}

.stage .pack {
  font-weight: 600;
}

.stage .state {
  font-size: 0.75rem;
  color: var(--quiet);
}

.stage.growing {
  border-color: transparent;
  background: color-mix(in srgb, var(--tint) 14%, var(--card));
}

.stage.growing .state {
  color: var(--tint);
  font-weight: 600;
}

.stage.sprouting {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--tint) 60%, var(--line));
}

.stage.wilting {
  background: var(--card-soft);
}

.stage.dormant,
.stage.gone {
  opacity: 0.5;
}

.sizes {
  margin-top: 0.4rem;
}

.activities {
  margin-top: 0.4rem;
}

.activities h3 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.activities .block {
  display: block;
  color: var(--ink-2);
}

.activities form input {
  flex: 1;
  min-width: 0;
}

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.quick .chip.small {
  font-size: 0.85rem;
  padding: 0.2rem 0.6rem;
  min-height: 0;
}

.quick .chip.on {
  border-color: var(--fjord);
  color: var(--fjord);
}

.stack.tight {
  gap: 0.35rem;
}

.size-ladder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0.35rem 0;
}

.size-ladder .label {
  min-width: 5.5rem;
}

.size-ladder .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sizes h3 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sizes form {
  margin-top: 0.5rem;
}

.boxes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.boxes li {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.boxes strong {
  font: 600 1.15rem var(--display);
  color: var(--accent);
}

.boxes .opened {
  opacity: 0.5;
}

.packs {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.pack-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.pack-row > div {
  display: grid;
}

.pack-row.hidden strong {
  color: var(--quiet);
}

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

.memories li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.memories li span {
  flex: 1;
}

.memories li:last-child {
  border-bottom: 0;
}

.memories .ghost {
  border: 0;
  color: var(--quiet);
}

/* ── Status ───────────────────────────────────────────────────────────── */

.status {
  position: fixed;
  z-index: 30;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
  box-shadow: var(--shadow);
}

/* ── The door ─────────────────────────────────────────────────────────── */

body.plain {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  background: radial-gradient(120% 80% at 50% 0%, var(--accent-soft), var(--paper) 60%);
}

.door {
  padding: 2rem 16px;
  max-width: 440px;
  text-align: center;
}

.welcome {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.welcome .welcome-mark {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  box-shadow: 0 14px 28px -14px rgb(15 76 92 / 48%);
}

.welcome h1 {
  font-size: 2.3rem;
  letter-spacing: -0.025em;
}

.lede {
  font: 1.15rem / 1.4 var(--display);
  color: var(--ink-2);
}

@media (prefers-reduced-motion: reduce) {
  .item,
  .item.fresh,
  .tick,
  .tab,
  .orb,
  .card,
  .date-leaf,
  .primary,
  .ghost,
  .pill,
  button.chip,
  input,
  select,
  textarea,
  .composer,
  .ac-chip-box,
  .ac-token,
  .ac-pill {
    animation: none;
    transition: none;
  }
  a.card:active,
  button.card:active,
  .tab:active,
  .assist:hover .orb,
  .assist:active .orb,
  .date-leaf:hover,
  .date-leaf:active,
  .primary:active,
  .ghost:active,
  .pill:active,
  button.chip:active,
  .ac-pill:active {
    transform: none;
  }
}

/* ── Today's header: Kitchen Folio tear-off leaf and school ukeplan strip ── */

.today-head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.today-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

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

.date-leaf {
  flex: none;
  display: flex;
  flex-direction: column;
  width: 56px;
  border-radius: 13px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease;
}

.date-leaf:hover {
  transform: translateY(-1px);
}

.date-leaf:active {
  transform: scale(0.95);
}

.date-leaf .leaf-top {
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 0.68rem / 1.55 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.date-leaf .leaf-day {
  display: grid;
  place-items: center;
  padding: 0.22rem 0 0.32rem;
  color: var(--fjord);
  font: 700 1.55rem / 1 var(--display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.weekstrip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}

.weekstrip a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.45rem 0 0.4rem;
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink-2);
}

.weekstrip .wd {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--quiet);
}

.weekstrip .n {
  font: 650 1.05rem var(--display);
  font-variant-numeric: tabular-nums;
}

.weekstrip .marks {
  display: flex;
  gap: 2px;
  height: 6px;
}

.weekstrip .marks i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tint);
}

.weekstrip .past a {
  opacity: 0.5;
}

.weekstrip .on a {
  background: var(--fjord);
  color: var(--paper);
}

.weekstrip .on .wd {
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}

.weekstrip .on .marks i {
  box-shadow: 0 0 0 1.5px var(--fjord);
}

/* ── Surfaces ── */

.card h2 .icon,
.section-title {
  color: var(--quiet);
}

.hello h1 {
  max-width: 18ch;
}

.composer .send {
  background: var(--orb-2);
  color: #fff;
}

.talk .me {
  background: var(--orb-2);
  color: #fff;
}

.assistant-head h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (prefers-reduced-motion: reduce) {
  .assistant[open],
  .talk .pending .said::after {
    animation: none;
  }
}

/* ── Talking ── */

.assist {
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: none;
}

.composer .mic {
  border: 0;
  padding: 0;
  background: var(--card-soft);
  color: var(--ink-2);
}

.listening {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.2rem 0 0.6rem;
  text-align: center;
}

.orb.big {
  width: 84px;
  height: 84px;
  margin: 0 0 0.6rem;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--orb-1) 45%, transparent);
  animation: breathe 1.4s ease-out infinite;
}

.orb.big .brand-mark {
  width: 52px;
  height: 52px;
}

@keyframes breathe {
  to {
    box-shadow: 0 0 0 22px transparent;
  }
}

.listening-title {
  font: 700 1.2rem var(--display);
}

.listening.cancel .orb {
  filter: grayscale(1);
  opacity: 0.5;
  animation: none;
}

.talk .me.pending p {
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .orb.big {
    animation: none;
  }
}

/* ── The school's week plan on Today ─────────────────────────────────── */

.card.homework {
  border-left: 4px solid var(--tint);
}

.plain-list {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.plain-list li {
  padding-left: 0.9rem;
  position: relative;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--tint, var(--accent));
}

/* ── The helper's page ───────────────────────────────────────────────── */

.helper {
  display: grid;
  gap: 0.9rem;
  width: 100%;
  max-width: 34rem;
  text-align: left;
}

.care-child + .care-child {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

/* ── Routines: big steps a child can tap ─────────────────────────────── */

.card.routine {
  border-top: 4px solid var(--tint);
}

.routine-steps {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.5rem;
}

.routine-steps button {
  width: 100%;
  min-height: 5.5rem;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.35rem;
  padding: 0.6rem 0.4rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}

.routine-steps .icon {
  width: 1.8rem;
  height: 1.8rem;
  color: var(--tint);
}

.routine-steps li.done button {
  background: color-mix(in srgb, var(--tint) 16%, var(--card));
  border-color: var(--tint);
}

.routine-steps li.done span {
  text-decoration: line-through;
  color: var(--ink-2);
}

.card.homes h2 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── The door, QR links, and onboarding ────────────────────────────────── */

.door-card,
.door-box {
  width: 100%;
  text-align: left;
}

.qr {
  display: grid;
  place-items: center;
  padding: 0.75rem;
  background: #ffffff;
  border-radius: var(--radius-s);
  width: fit-content;
}

.qr svg {
  width: 160px;
  height: 160px;
  display: block;
}

.card.onboarding {
  border-left: 4px solid var(--fjord);
}

/* No passkey yet: the one card that keeps a way back in. */
.card.keep-in {
  border-left: 4px solid var(--accent);
}

.card.keep-in h2 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.onboarding-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.onboarding-steps > li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.onboarding-steps > li:first-child {
  padding-top: 0;
  border-top: 0;
}

.step-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--line);
  color: #ffffff;
}

.onboarding-steps > li.done .step-mark {
  background: var(--ok);
  border-color: var(--ok);
}

.onboarding-steps > li.done .step-body strong {
  color: var(--quiet);
  text-decoration: line-through;
}

.step-mark .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}

/* ── Kitchen Folio autocomplete and token-chip rail ────────────────────── */

.ac-wrap {
  display: grid;
  gap: 0.45rem;
}

.ac-chip-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.4rem 0.55rem;
  background: var(--card-soft);
  border: 1.5px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: var(--radius-s);
  cursor: text;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.ac-chip-box:focus-within {
  background: var(--card);
  border-color: var(--fjord);
  box-shadow:
    0 2px 8px -2px rgb(15 51 64 / 10%),
    0 0 0 3px color-mix(in srgb, var(--fjord-soft) 70%, transparent);
}

.ac-chip-box input,
.ac-chip-box input:focus {
  flex: 1 1 8rem;
  min-width: 7rem;
  width: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.25rem 0.2rem;
}

.ac-token {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.35rem 0.22rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fjord) 13%, var(--card));
  border: 1px solid color-mix(in srgb, var(--fjord) 28%, transparent);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 550;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.ac-token.is-dupe {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: scale(1.04);
}

.ac-token button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.ac-token button:hover {
  background: color-mix(in srgb, var(--fjord) 14%, transparent);
  color: var(--ink);
}

.ac-rail {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.1rem 0;
}

.ac-rail::-webkit-scrollbar {
  display: none;
}

.ac-rail[hidden] {
  display: none;
}

.ac-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font: 550 0.88rem var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 120ms ease;
}

.ac-pill:hover {
  background: var(--fjord-soft);
  border-color: var(--fjord);
}

.ac-pill:active {
  transform: scale(0.97);
}

.ac-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fjord);
  flex: none;
}

/* ── Legal & Account Deletion ───────────────────────────────────────────── */

.door.wide {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
  display: grid;
  gap: 1rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-top: 0.35rem;
}

.legal-links a {
  color: inherit;
  text-decoration: none;
}

.legal-links a:hover {
  text-decoration: underline;
  color: var(--ink);
}

.legal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: 700 1.05rem var(--display);
  color: var(--ink);
  text-decoration: none;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.legal-lang {
  display: inline-flex;
  gap: 0.35rem;
}

.legal-lang a {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--quiet);
  text-decoration: none;
  border: 1px solid var(--line);
}

.legal-lang a.on {
  background: var(--fjord-soft);
  border-color: var(--fjord);
  color: var(--fjord);
  font-weight: 600;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.legal-nav a {
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 0.9rem;
  text-decoration: none;
}

.legal-nav a.on {
  background: var(--fjord);
  border-color: var(--fjord);
  color: #f8f4ec;
  font-weight: 600;
}

.legal-article {
  gap: 1.15rem;
}

.legal-title h1 {
  margin-bottom: 0.25rem;
}

.legal-section {
  display: grid;
  gap: 0.45rem;
}

.legal-section h2 {
  font-size: 1.08rem;
}

.legal-section ul {
  margin: 0.15rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.legal-article a {
  color: var(--fjord);
}

.legal-table-wrap {
  overflow-x: auto;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
}

.legal-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--quiet);
}

.legal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.25rem 0.15rem 1.5rem;
}

.legal-foot a {
  color: var(--fjord);
}

.confirm-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
}

.confirm-check input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex: none;
}

/* ── Structured Allergens & Adult Profiles ──────────────────────────────── */

.ac-danger .ac-token {
  background: color-mix(in srgb, var(--late) 13%, var(--card));
  border-color: color-mix(in srgb, var(--late) 34%, transparent);
  color: var(--late);
}

.allergy-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.allergy-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.62rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--late) 14%, var(--card));
  border: 1px solid color-mix(in srgb, var(--late) 36%, transparent);
  color: var(--late);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
}

.allergy-banner {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--late) 9%, var(--card));
  border: 1px solid color-mix(in srgb, var(--late) 30%, transparent);
}

.allergy-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--late);
}

.adult-row {
  display: grid;
  gap: 0.55rem;
}

.adult-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ── Dish Library & Week Inline Dinner Picker ───────────────────────────── */

.day-pick {
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  padding: 0.15rem 0.25rem;
}

.day-pick.selected {
  color: var(--accent);
}

details.meal-edit {
  flex: 1;
  min-width: 0;
}

details.meal-edit > summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
}

details.meal-edit > summary::-webkit-details-marker {
  display: none;
}

details.meal-edit[open] > form {
  margin-top: 0.45rem;
  align-items: flex-start;
}

details.meal-edit .ac-wrap {
  flex: 1;
  min-width: 0;
}

.dish-filters,
.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 550;
  text-decoration: none;
}

.tag-pill.on {
  background: var(--fjord);
  border-color: var(--fjord);
  color: #f8f4ec;
}

.tag-check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.38rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-soft);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.tag-check input[type="checkbox"] {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
}

.dish-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
}

.fav-btn.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── The dinner explorer: one big card at a time ───────────────────────── */

.tone-fjord {
  --tone: var(--fjord-2);
}
.tone-moss {
  --tone: var(--moss);
}
.tone-multe {
  --tone: var(--accent);
}
.tone-cloud {
  --tone: var(--cloud);
}
.tone-rose {
  --tone: var(--rose);
}
.tone-sky {
  --tone: var(--sky);
}
.tone-plum {
  --tone: var(--plum);
}
.tone-amber {
  --tone: var(--amber);
}

.plate {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: var(--tone);
  background: radial-gradient(
    circle,
    var(--card) 0 50%,
    color-mix(in srgb, var(--tone) 16%, var(--card)) 51% 62%,
    var(--card) 63% 66%,
    color-mix(in srgb, var(--tone) 26%, var(--card-soft)) 67% 100%
  );
  box-shadow:
    0 1px 0 rgb(255 255 255 / 40%) inset,
    0 14px 30px -16px color-mix(in srgb, var(--tone) 70%, transparent);
}

.plate.big {
  width: min(58vw, 220px);
  aspect-ratio: 1;
}

.plate.small {
  width: 36px;
  height: 36px;
  box-shadow: none;
}

.plate .icon {
  width: 40%;
  height: 40%;
  stroke-width: 1.4;
}

.plate.small .icon {
  stroke-width: 2;
}

.plate.empty {
  background: transparent;
  border: 1.5px dashed var(--line);
}

.plate .garnish {
  position: absolute;
  width: 7%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 55%, var(--cloud));
  opacity: 0.75;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
}

.plate .garnish:nth-child(1) {
  transform: rotate(18deg) translateX(min(25vw, 94px));
}
.plate .garnish:nth-child(2) {
  transform: rotate(95deg) translateX(min(25vw, 94px)) scale(0.7);
  background: var(--moss);
}
.plate .garnish:nth-child(3) {
  transform: rotate(160deg) translateX(min(25vw, 94px)) scale(1.2);
}
.plate .garnish:nth-child(4) {
  transform: rotate(232deg) translateX(min(25vw, 94px)) scale(0.8);
  background: var(--cloud);
}
.plate .garnish:nth-child(5) {
  transform: rotate(300deg) translateX(min(25vw, 94px));
  background: var(--moss);
}
.plate.small .garnish {
  display: none;
}

.explore-link .icon:first-child {
  color: var(--accent);
}

.week-plates ol {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.week-plates li {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  min-width: 0;
  text-align: center;
}

.week-plates .wd {
  font: 600 0.72rem var(--display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--quiet);
}

.week-plates li.is-today .wd {
  color: var(--accent);
}

.week-plates li.past {
  opacity: 0.55;
}

.week-plates .what {
  font-size: 0.68rem;
  line-height: 1.15;
  color: var(--ink-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 1.6em;
}

.week-plates li.just .plate {
  animation: plate-in 420ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes plate-in {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.week-plates p {
  margin: 0.5rem 0 0;
  text-align: center;
}

.moods {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.4rem;
  scrollbar-width: none;
}

.moods .tag-pill {
  white-space: nowrap;
}

.left-out {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.left-out .icon {
  width: 14px;
  height: 14px;
  color: var(--moss);
}

.deck {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.dish-card {
  display: grid;
  gap: 0.65rem;
  padding: 0 0 1rem;
  overflow: hidden;
}

.dish-card > :not(.dish-art) {
  margin-inline: 1.05rem;
}

.dish-card h2 {
  font: 650 1.6rem / 1.1 var(--display);
  margin-block: 0.2rem 0;
}

.dish-art {
  position: relative;
  display: grid;
  place-items: center;
  padding: 1.6rem 0 1.3rem;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--tone) 22%, transparent), transparent 70%), color-mix(in srgb, var(--tone) 7%, var(--card));
}

.deck-count {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
}

.reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
}

.reason {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--card-soft);
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 560;
}

.reason .icon {
  width: 14px;
  height: 14px;
}

.reason.favourite,
.reason.likes {
  background: var(--accent-soft);
  color: var(--accent);
}

.reason.new {
  background: color-mix(in srgb, var(--cloud) 22%, var(--card));
  color: var(--ink);
}

.reason.safe .icon {
  color: var(--moss);
}

.dish-ingredients {
  color: var(--ink-2);
  font-size: 0.92rem;
  margin-block: 0;
}

.dish-ingredients .label {
  display: block;
  margin-bottom: 0.1rem;
}

.dish-card .tag-pills {
  margin-block: 0;
}

.plan-days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.plan-days form {
  margin: 0;
}

.day-chip.first {
  background: var(--fjord);
  border-color: var(--fjord);
  color: var(--card);
}

.deck-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.deck-actions[hidden] {
  display: none;
}

.explore-foot {
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.explore-foot form {
  margin: 0;
}

/* With the script: the cards stack, and only the top one is in play. */
.deck.live {
  display: grid;
  grid-template-areas: "card";
  gap: 0;
}

.deck.live > .dish-card {
  grid-area: card;
  touch-action: pan-y;
  user-select: none;
  transition:
    transform 320ms cubic-bezier(0.2, 0.8, 0.3, 1),
    opacity 320ms ease;
}

.deck.live > .dish-card.top {
  z-index: 3;
  cursor: grab;
}

.deck.live > .dish-card.next {
  z-index: 2;
  transform: translateY(10px) scale(0.965);
  opacity: 0.7;
  pointer-events: none;
}

.deck.live > .dish-card.later {
  z-index: 1;
  transform: translateY(18px) scale(0.93);
  opacity: 0;
  pointer-events: none;
}

.deck.live > .dish-card.gone {
  visibility: hidden;
  pointer-events: none;
}

.deck.live > .dish-card.dragging {
  transition: none;
  cursor: grabbing;
}

.deck.live > .dish-card.lean-right {
  box-shadow:
    0 0 0 2px var(--fjord-2),
    var(--shadow);
}

.deck.live > .dish-card.lean-left {
  box-shadow:
    0 0 0 2px var(--line),
    var(--shadow);
}

.deck.live > .dish-card.out-right {
  visibility: visible;
  transform: translateX(120%) rotate(12deg);
  opacity: 0;
}

.deck.live > .dish-card.out-left {
  visibility: visible;
  transform: translateX(-120%) rotate(-12deg);
  opacity: 0;
}

.explore-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + 1.2rem + env(safe-area-inset-bottom));
  translate: -50% 0;
  width: max-content;
  max-width: calc(100vw - 32px);
  text-align: center;
  margin: 0;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--fjord);
  color: var(--card);
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.explore-toast.show {
  animation: toast-life 2.6s ease forwards;
}

@keyframes toast-life {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  10%,
  80% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deck.live > .dish-card,
  .week-plates li.just .plate {
    transition: none;
    animation: none;
  }
}

/* Wish lists and need lists, the family's and the givers' page. */
.wish-items {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.wish-items .wish {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.wish-items .wish:first-child {
  border-top: 0;
}

.wish-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 12rem;
}

.wish-link {
  color: var(--fjord);
}

.wish.taken .wish-text,
.wish.got .wish-text,
.wish-items.done .wish-text {
  opacity: 0.6;
}

.wish.got strong,
.wish-items.done strong {
  text-decoration: line-through;
}

.wish-claim input {
  width: 9rem;
}

.wish-note {
  margin: 0.4rem 0 0;
  padding: 0.6rem 0.8rem;
  border-radius: 0.8rem;
  background: var(--accent-soft);
  color: var(--ink);
}

.wish-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.wish-add .row input {
  flex: 1 1 8rem;
  min-width: 0;
}

.card.wish-share {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.wish-share input {
  width: 100%;
}

.wish-items .wish details.more {
  margin: 0;
  border: 0;
}
