/* One screen, read at arm's length over breakfast. The block day is the whole
   product, so it gets the size; everything else is deliberately quiet. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #5b6672;
  --accent: #1d4ed8;
  --line: #e3e7ec;
  --warn: #9a3412;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151a;
    --surface: #1a2027;
    --ink: #eef2f6;
    --muted: #9aa7b4;
    --accent: #7aa2ff;
    --line: #2a323b;
    --warn: #fdba74;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

#app {
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.masthead { text-align: center; margin-bottom: 1rem; }
.masthead h1 { margin: 0; font-size: 1.05rem; letter-spacing: .02em; }
.masthead .sub { margin: .15rem 0 0; color: var(--muted); font-size: .85rem; }

/* --- the answer --- */

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem 1.5rem;
  text-align: center;
}

.hero--loading { color: var(--muted); }

.hero__eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.hero__next-label {
  margin: .75rem 0 0;
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero__day {
  margin: .25rem 0 0;
  font-size: clamp(3.25rem, 18vw, 4.75rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--accent);
  letter-spacing: -.02em;
}

.hero__date { margin: .35rem 0 0; color: var(--muted); }

.hero__note {
  margin: .75rem auto 0;
  display: inline-block;
  padding: .3rem .7rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 999px;
  font-size: .85rem;
}

.hero__none { margin: .5rem 0 0; color: var(--muted); }

/* --- panels --- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-top: 1rem;
}

.panel h2 {
  margin: 0;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}

/* The heading gets first claim on the row so it stays on one line at 390px;
   the picker shrinks instead of pushing it to wrap. */
.panel__head h2 { flex: 1 1 auto; letter-spacing: .05em; }

.picker {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex: 0 1 auto;
  min-width: 0;
}

.picker__label {
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
}

#grade {
  font: inherit;
  font-size: .9rem;
  padding: .35rem .5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  max-width: 9.5rem;
  /* Comfortable to hit one-handed. */
  min-height: 2.25rem;
}

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

.specials__item {
  font-size: 1.35rem;
  font-weight: 600;
  padding: .2rem 0;
}

.specials__none, .specials__unknown {
  margin: 0;
  color: var(--muted);
}

/* --- upcoming --- */

.upcoming { list-style: none; margin: .75rem 0 0; padding: 0; }

.upcoming__row {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .5rem 0;
  border-top: 1px solid var(--line);
}

.upcoming__row:first-child { border-top: 0; }
.upcoming__date { flex: 1; color: var(--muted); }
.upcoming__day { font-weight: 600; }

.upcoming__note {
  flex-basis: 100%;
  font-size: .8rem;
  color: var(--muted);
}

.upcoming__empty { color: var(--muted); padding: .5rem 0; }

/* --- footer --- */

.footer { margin-top: 1.5rem; text-align: center; }

.freshness { margin: 0 0 .6rem; font-size: .8rem; color: var(--muted); }
.freshness--stale { color: var(--warn); font-weight: 600; }

.disclaimer { margin: 0; font-size: .75rem; color: var(--muted); line-height: 1.5; }
.disclaimer a { color: inherit; }

/* --- shared controls (used by the public page and the editor) --- */

.input {
  font: inherit;
  width: 100%;
  padding: .5rem .6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  min-height: 2.5rem;
}

.btn {
  font: inherit;
  font-size: .9rem;
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--quiet { color: var(--muted); }

/* --- bring / notices --- */

.bring, .notice {
  margin: .75rem 0 0;
  padding: .7rem .9rem;
  border-radius: var(--radius);
  font-size: .92rem;
  line-height: 1.45;
}

.bring {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.notice {
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
  color: var(--ink);
}

/* --- specials, one block per selected child --- */

.specials__group + .specials__group {
  margin-top: .8rem;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
}

.specials__who {
  margin: 0 0 .15rem;
  font-size: .8rem;
  color: var(--muted);
}

.specials__item {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
}

.specials__bring {
  display: block;
  font-size: .85rem;
  color: var(--muted);
}

/* --- who-is-this-for picker --- */

.kids { margin: .6rem 0 .9rem; }

.kids__row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  cursor: pointer;
}

.kids__row:last-child { border-bottom: 0; }
.kids__row input { width: 1.15rem; height: 1.15rem; }

.linkbtn {
  font: inherit;
  font-size: .85rem;
  background: none;
  border: 0;
  padding: .25rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.hint { margin: .35rem 0 0; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.panel--quiet { background: transparent; border-style: dashed; }

.subscribe {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin: .8rem 0 0;
  flex-wrap: wrap;
}

.subscribe .btn { text-decoration: none; display: inline-block; }
