/* Fezziwig's visual direction, carried over from the accepted v0 mockup.
 *
 * Warm paper, a serif for headings, generous tap targets. The v0 file itself
 * is frozen and is not edited; this is the same palette and type expressed as
 * the stylesheet a real application serves.
 *
 * Phone-first. Everything reads from 320px up without horizontal panning, and
 * nothing depends on hover or drag. Status is never carried by colour alone.
 */

:root {
  color-scheme: light;
  --paper: #f6f4ed;
  --surface: #fffefa;
  --ink: #243b32;
  --muted: #62685e;
  --line: #dcded3;
  --green: #284f3d;
  --soft: #e8eee4;
  --amber: #81501d;
  --amber-bg: #faf0dc;
  --danger: #8a2e22;
  --radius: 13px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; margin: 0; }
h1 { font-size: clamp(27px, 4vw, 40px); line-height: 1.14; letter-spacing: -1px; }
h2 { font-size: 23px; line-height: 1.2; letter-spacing: -0.4px; }
h3 { font-size: 17px; line-height: 1.35; }
p { margin: 0; }
p + p { margin-top: 12px; }

a { color: inherit; }
a:hover { text-decoration-thickness: 2px; }
/* A link that leads somewhere rather than acting on something — "Open the
   schedule →". It was a bare hook with no rule until the class sweep found
   it; the weight is what the pages using it were already reaching for, and
   the colour stays inherited so it is never colour alone that marks it. */
.text-link { font-weight: 600; }

/* A visible focus ring everywhere, because this is a keyboard-first entry
 * workflow and Tab order is the point. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #a5642e;
  outline-offset: 3px;
}

.skip { position: absolute; top: -100px; left: 16px; z-index: 10; padding: 12px; background: var(--surface); }
.skip:focus { top: 10px; }

.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.55; }
.eyebrow {
  font-size: 11px; font-weight: 750; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--muted);
}

/* -- chrome ------------------------------------------------------------- */

.app-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: 1100px; margin: auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--green); border-radius: 50%;
  font: 30px/1 Georgia; color: var(--green);
}
.brand-word { font: 25px/1 Georgia; letter-spacing: -1px; }
.brand-sub {
  display: block; font: 9px/1.8 system-ui; letter-spacing: 2px;
  text-transform: uppercase; margin-top: 4px; color: var(--muted);
}

.global-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.global-nav a {
  padding: 10px 14px; border-radius: 9px; text-decoration: none;
  font-weight: 600; font-size: 15px;
}
.global-nav a[aria-current="page"] { background: var(--soft); color: var(--green); }
.header-spacer { margin-left: auto; }

/* The route back to the party being planned. Leaving a party's workspace for
 * the global library is where v0 lost people: the tabs disappeared and
 * Shopping felt gone. */
.party-context { background: var(--soft); border-bottom: 1px solid var(--line); }
.context-inner {
  max-width: 1100px; margin: auto; padding: 12px 20px;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.context-name { font: 19px/1.3 Georgia; text-decoration: none; color: var(--green); }
.back-to-party {
  display: inline-block; padding: 10px 14px; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; font-weight: 600;
}

main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 64px; }

/* -- cards and lists ---------------------------------------------------- */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.party-card {
  display: flex; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  text-decoration: none;
}
.party-card:hover { border-color: var(--green); }
.calendar-date {
  flex: none; width: 60px; text-align: center; padding: 8px 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
}
.calendar-date .month { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.calendar-date .number { font: 24px/1.1 Georgia; }
.chevron { margin-left: auto; color: var(--muted); }

.menu-section { margin-bottom: 28px; }
.menu-section > h2 {
  padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 12px;
}
.menu-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
}
.menu-item-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.menu-item-head h3 { flex: 1 1 auto; }
.choices { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Text, not colour, carries the meaning; the tint is decoration. */
.chip {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--soft); font-size: 13px; color: var(--green);
}
.chip-amber { background: var(--amber-bg); color: var(--amber); }

/* A recipe's own words, shown as typed.
 *
 * `pre` for the line breaks, but not `pre`'s usual monospace-and-overflow:
 * this is prose a cook reads at arm's length on a phone, so it wraps rather
 * than scrolling sideways, and it is set in the body face. `pre-wrap` is what
 * keeps the paragraph breaks somebody typed without also demanding a
 * horizontal scroll for a long line. */
.recipe-text {
  margin: 8px 0 0;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.empty-state {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 22px; color: var(--muted); background: var(--surface);
}

/* -- forms -------------------------------------------------------------- */

form.stack { max-width: 640px; }
fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 0 0 18px;
  background: var(--surface);
}
legend { font-family: Georgia, serif; font-size: 18px; padding: 0 6px; }
.field { margin-bottom: 14px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }

input[type="text"], input[type="url"], input[type="date"], input[type="password"],
input[type="number"], select, textarea {
  width: 100%; padding: 12px; font: inherit;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px;
}
textarea { min-height: 120px; resize: vertical; }

/* A box with a unit printed beside it: "22 %".
   The sign is a sibling rather than text inside the input, so what is typed
   is what is submitted and a screen reader hears the label rather than a
   value with punctuation stuck to it. `aria-hidden` on the mark says the
   same thing from the other side. */
.field-suffixed { display: flex; align-items: center; gap: 8px; }
.field-suffixed input { flex: 1 1 auto; min-width: 0; }
.field-suffix { color: var(--muted); font-size: 15px; flex: 0 0 auto; }

/* An amount and its measuring word, side by side until they will not fit.
   `wrap` rather than a media query: the box and the select each keep a
   readable minimum and drop onto their own lines when the screen is narrow,
   which is the behaviour a 320px phone needs and a wide screen does not. */
.batch-target { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.batch-target input, .batch-target select { flex: 1 1 10em; min-width: 0; }

/* The batch result. Right-aligned amounts, because the column is read as a
   column of numbers; `overflow-x` on the wrapper is what keeps a long
   ingredient name from making the whole page pan sideways. */
.batch-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.batch-table th, .batch-table td {
  text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}
.batch-table td { text-align: right; font-variant-numeric: tabular-nums; }
.batch-table thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.batch-table thead th + th { text-align: right; }
.batch-table tfoot th, .batch-table tfoot td { color: var(--muted); }
.batch-table tfoot .batch-total th, .batch-table tfoot .batch-total td {
  color: var(--ink); font-weight: 700; border-bottom: none;
}

.button, button {
  display: inline-block; padding: 12px 18px; font: inherit; font-weight: 600;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); cursor: pointer;
  text-decoration: none;
}
.button-primary { background: var(--green); border-color: var(--green); color: #fff; }
.button-quiet { background: transparent; }
.button-danger { color: var(--danger); border-color: var(--danger); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* -- messages ----------------------------------------------------------- */

.notice {
  border: 1px solid var(--line); border-left-width: 5px;
  border-radius: 9px; padding: 14px 16px; margin-bottom: 18px;
  background: var(--surface);
}
.notice-error { border-left-color: var(--danger); }
.notice-stale { border-left-color: var(--amber); background: var(--amber-bg); }
.notice strong { display: block; margin-bottom: 4px; }

.notice-warn { border-left-color: var(--amber); background: var(--amber-bg); }
.notice-icon { float: left; margin-right: 10px; color: var(--muted); }
.chip-done { background: var(--soft); color: var(--green); font-weight: 600; }

/* Visible to a screen reader, absent from the page.
 *
 * Not `display: none`, which removes it from the accessibility tree too —
 * the tick button's label lives in one of these, and it is the only thing
 * that says *which* entry a bare circle belongs to. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.plain-list { list-style: none; padding: 0; margin: 12px 0; }
.plain-list li { padding: 6px 0; }
.entry-list li {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline;
  border-bottom: 1px solid var(--line); padding: 10px 0;
}
.entry-when { font-weight: 600; min-width: 11em; }
.entry-what { flex: 1 1 auto; }
.actions-stacked { flex-direction: column; align-items: stretch; gap: 16px; }
.actions-stacked .hint { margin-top: 4px; }
.danger-row { margin-top: 22px; }

/* One ingredient line: Ingredient, How much, Measured in, Note.
   Four columns on a wide screen and a plain stack on a narrow one, which is
   what keeps the row off the spreadsheet-like grid the brief rules out. The
   ingredient box gets the most room because it is the one with a name in it;
   `minmax(0, ...)` rather than a fixed width so nothing forces the page
   wider than the screen. */
.ingredient-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.4fr) minmax(0, 1.6fr) minmax(0, 2fr);
  gap: 10px;
  align-items: start;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.ingredient-row .field { margin-bottom: 0; }

/* -- the schedule ------------------------------------------------------- */

.pills { display: flex; gap: 6px; margin: 4px 0 18px; flex-wrap: wrap; }
.pills a {
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); text-decoration: none; font-weight: 600;
}
.pills a[aria-current="page"] {
  background: var(--green); border-color: var(--green); color: #fff;
}
.schedule-legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px; margin-bottom: 14px;
}

/* The week board.
 *
 * `auto-fit` with a `minmax` floor rather than seven fixed columns: the
 * board carries the party's whole week *plus* any other day something is
 * planned on, so the count is not known here. Below the floor the columns
 * become one per row, which is the phone treatment — a list of days rather
 * than a calendar to pan sideways across. */
.week-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.day-column {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; padding: 12px; min-width: 0;
}
.day-column.party-day { border-color: var(--green); border-width: 2px; }
/* A day outside the party's own week. Marked by a dashed edge and by
 * carrying its month in the label, because "Sun 1" alone is ambiguous once
 * the board reaches past a month boundary. Never by colour alone. */
.day-column.day-outside { border-style: dashed; background: var(--paper); }
.day-label {
  font: 15px/1.2 Georgia; display: flex; gap: 8px; align-items: baseline;
  flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.day-number { font-size: 22px; margin-left: auto; }
.day-month { width: 100%; }
.no-tasks { color: var(--muted); font-size: 13px; padding: 8px 0; }
.day-add { display: inline-block; margin-top: 8px; }

/* One entry, on either board. */
.task {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.task:last-of-type { border-bottom: 0; }
.task-body { flex: 1 1 auto; min-width: 0; }
.task-title { font: 16px/1.3 Georgia; }
.task-title a { color: inherit; }
.task-action { font-size: 14px; color: var(--muted); margin-top: 2px; }
.task-time { font-weight: 700; font-size: 13px; }
/* A date-only entry. The word, not a blank space and not a made-up hour. */
.task-anytime { color: var(--muted); font-weight: 600; }
.task-meta {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-top: 8px;
}

/* The tick. A real submit button inside a real form, styled as a circle —
 * 44px so it is a tap target rather than a decoration, which is the whole
 * complaint the phone review recorded about small controls. */
.task-tick { flex: 0 0 auto; }
.task-circle {
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 18px; line-height: 1;
}
.task-circle[aria-pressed="true"] {
  background: var(--green); border-color: var(--green); color: #fff;
}
.task-tick-busy .task-circle { opacity: 0.6; }
/* Completion is not carried by colour: a done card says "Done" in a chip
 * and a tick inside the circle, and the strike is decoration on top. */
.task-done .task-title { text-decoration: line-through; }
.task-done .task-title a { text-decoration: line-through; }

.owner {
  display: inline-flex; gap: 6px; align-items: center;
  font-size: 13px; color: var(--muted);
}
.owner::before {
  content: attr(data-initial);
  display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--soft); color: var(--green);
  font-weight: 700; font-size: 12px;
}

/* The run sheet. */
.timeline { margin-top: 8px; }
.time-group {
  display: flex; gap: 16px; align-items: flex-start;
  border-top: 1px solid var(--line); padding: 14px 0;
}
.time-label { font: 20px/1.2 Georgia; flex: 0 0 5.5em; }
.time-cards { flex: 1 1 auto; min-width: 0; }
.anytime {
  margin-top: 22px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px;
}
.section-head {
  display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
  margin-bottom: 8px;
}
.quiet-note { margin-top: 22px; color: var(--muted); font-size: 14px; }
.lede { color: var(--muted); }

/* -- the shopping list --------------------------------------------------
 *
 * Phone first, and the constraint that shapes all of it: a row is read and
 * tapped one-handed in a shop. So it is a stack rather than a grid — no
 * columns to line up, nothing to pan sideways to reach, and every control a
 * full-height button or a real box.
 *
 * The v0 note was that shopping on a phone needed precise tapping. Nothing
 * here is smaller than the shared button padding, and the two disclosures
 * keep the size picker and the "why is this here" list off the row until
 * somebody asks for them. */

.shop-section { margin-bottom: 26px; }
.shop-section h2 {
  font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}

.shop-line {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
}
.shop-head {
  display: flex; gap: 10px; align-items: baseline;
  flex-wrap: wrap; margin-bottom: 4px;
}
.shop-head h3 { font: 19px/1.3 Georgia; margin: 0; }
.shop-amounts { margin: 0 0 12px; line-height: 1.6; }
.shop-need { font-weight: 600; }
/* What is left is the number somebody came to the page for. */
.shop-left { font-weight: 600; color: var(--green); }

/* Wrapping rather than a fixed row: three buttons at 320px do not fit on one
 * line, and shrinking them to make them fit is the complaint this page
 * exists to answer. */
.shop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-actions form { margin: 0; }
.shop-actions .button { width: 100%; }

.shop-more, .shop-why { margin-top: 12px; }
.shop-more summary, .shop-why summary {
  cursor: pointer; padding: 8px 0; font-size: 14px; color: var(--muted);
}
.shop-more-body { padding-top: 8px; }
/* Label, control, button — in a row where there is room, stacked where
 * there is not, which is the same treatment the ingredient rows get. */
.shop-inline {
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap; margin-bottom: 10px;
}
.shop-inline label { font-weight: 600; font-size: 14px; }
.shop-inline input[type="text"] { width: 7em; }
.shop-sources { margin: 6px 0 0; padding-left: 20px; line-height: 1.7; }

.pill-count {
  display: inline-block; min-width: 1.6em; padding: 0 6px;
  border-radius: 999px; background: var(--soft); color: var(--green);
  font-size: 13px; text-align: center;
}
.pills a[aria-current="page"] .pill-count {
  background: rgba(255, 255, 255, 0.22); color: #fff;
}

@media (max-width: 560px) {
  .header-inner { gap: 12px; }
  /* One control per row. Three buttons side by side at 320px leaves each of
   * them the width of a thumbnail, which is the tapping complaint again. */
  .shop-actions { flex-direction: column; }
  .shop-inline { align-items: stretch; }
  .shop-inline input[type="text"], .shop-inline select { width: 100%; }
  .global-nav { width: 100%; }
  .global-nav a { flex: 1 1 auto; text-align: center; }
  main { padding: 18px 14px 56px; }
  .menu-item-head { gap: 6px; }
  /* One field per line rather than four squeezed columns: a 70px-wide text
     box is the "precise tapping" the brief asks us not to ship. */
  .ingredient-row { grid-template-columns: 1fr; gap: 8px; margin-bottom: 18px; }
  /* One day per row: the week becomes a list, never a sideways pan. */
  .week-grid { grid-template-columns: 1fr; }
  /* The time stops being a gutter and becomes a heading above its cards,
   * because 5.5em of label beside a card is most of a 320px screen. */
  .time-group { flex-direction: column; gap: 6px; }
  .time-label { flex: 0 0 auto; }
  .entry-when { min-width: 0; width: 100%; }
  .pills a { flex: 1 1 auto; text-align: center; }
}
