:root {
  --bg: #fbf5ec;
  --surface: #fffdf9;
  --ink: #2b1d14;
  --muted: #7a6656;
  --line: #ead9c4;
  --accent: #b5481f;      /* pumpkin */
  --accent-ink: #fff;
  --accent-soft: #f8e1d1;
  --gold: #d79a2b;
  --sage: #5f7a4e;
  --sage-soft: #e3ecd9;
  --hero-1: #7c2d12;
  --hero-2: #b5481f;
  --hero-3: #d79a2b;
  --shadow: 0 1px 2px rgb(60 30 10 / .06), 0 6px 20px rgb(60 30 10 / .06);
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a130e;
    --surface: #251b14;
    --ink: #f6ebde;
    --muted: #b8a391;
    --line: #3b2c21;
    --accent: #e0703f;
    --accent-soft: #3d2518;
    --sage: #9cba86;
    --sage-soft: #26301f;
    --hero-1: #3b1608;
    --hero-2: #7c2d12;
    --hero-3: #9a5d12;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 6px 20px rgb(0 0 0 / .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.15; margin: 0; }
a { color: var(--accent); }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-weight: 400; }
[hidden] { display: none !important; }

/* hero */
.hero {
  color: #fff8ef;
  background:
    radial-gradient(circle at 85% 20%, rgb(255 255 255 / .12) 0 120px, transparent 121px),
    linear-gradient(135deg, var(--hero-1), var(--hero-2) 60%, var(--hero-3));
  padding: 56px 0 72px;
  margin-bottom: -40px;
}
.hero a { color: inherit; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; opacity: .85; margin: 0 0 8px; }
.hero h1 { font-size: clamp(36px, 7vw, 60px); font-weight: 700; }
.tagline { font-size: 18px; opacity: .92; margin: 10px 0 20px; max-width: 46ch; }
.facts { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 500; }
.notes, .host-making { max-width: 60ch; opacity: .92; margin: 0 0 6px; }

/* stats */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  position: relative; margin-bottom: 20px;
}
.stat {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px;
}
.stat b { display: block; font-family: Fraunces, Georgia, serif; font-size: 28px; }
.stat span { color: var(--muted); font-size: 14px; }
@media (max-width: 560px) {
  .stats { gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat b { font-size: 22px; }
  .stat span { font-size: 12px; }
}

/* panel / form */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 28px;
}
.panel h2 { font-size: 26px; margin-bottom: 14px; }
.panel.editing { outline: 3px solid var(--gold); }
form { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: 1fr 180px; gap: 14px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
input {
  font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
input:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }

.cat-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-picker label, .tags label {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  font-weight: 500; background: var(--bg); user-select: none;
}
.cat-picker input, .tags input { position: absolute; opacity: 0; pointer-events: none; width: auto; }
.cat-picker label:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tags label:has(input:checked) { background: var(--sage-soft); border-color: var(--sage); color: var(--sage); }
.cat-picker label:has(input:focus-visible), .tags label:has(input:focus-visible) { outline: 3px solid var(--gold); }
.cat-picker .full { font-size: 12px; opacity: .8; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.chip {
  font: inherit; font-size: 13px; border: 1px dashed var(--accent); color: var(--accent);
  background: transparent; border-radius: 999px; padding: 4px 10px; cursor: pointer;
}
.chip.taken { border-style: solid; border-color: var(--line); color: var(--muted); text-decoration: line-through; cursor: default; }

.warn { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; margin: 0; font-size: 14px; }
.error { color: #c0261b; font-weight: 600; margin: 0; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
button { font: inherit; cursor: pointer; }
.primary {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 12px;
  padding: 12px 22px; font-weight: 600; font-size: 16px;
}
.primary:disabled { opacity: .6; cursor: progress; }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 12px; padding: 12px 18px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 0; }

/* board */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 18px; margin-bottom: 40px; }
.cat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 18px 10px;
}
.cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cat h3 { font-size: 22px; }
.count { font-size: 14px; color: var(--muted); white-space: nowrap; }
.count.done { color: var(--sage); font-weight: 600; }
.cat-desc { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.bar { height: 6px; background: var(--line); border-radius: 99px; margin: 10px 0 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--accent)); border-radius: 99px; transition: width .4s; }
.bar.done i { background: var(--sage); }
.items { list-style: none; padding: 0; margin: 0; }
.items li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.items li:first-child { border-top: 0; }
.items li.mine { background: linear-gradient(90deg, var(--accent-soft), transparent); margin: 0 -10px; padding: 10px; border-radius: 10px; }
.dish { font-weight: 600; }
.who { color: var(--muted); font-size: 14px; }
.badges { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.badge { font-size: 12px; background: var(--sage-soft); color: var(--sage); border-radius: 999px; padding: 1px 8px; }
.note { grid-column: 1 / -1; font-size: 13px; color: var(--muted); font-style: italic; }
.item-actions { display: flex; gap: 10px; align-items: start; grid-row: 1 / span 2; grid-column: 2; }
.item-actions button { background: none; border: 0; color: var(--accent); font-size: 13px; padding: 2px 0; text-decoration: underline; }
.empty-slot { color: var(--muted); font-style: italic; font-size: 14px; padding: 10px 0; border-top: 1px dashed var(--line); }
.items li + .empty-slot, .items .empty-slot:first-child { border-top-style: dashed; }

.foot { display: flex; gap: 18px; align-items: center; color: var(--muted); font-size: 14px; padding-bottom: 40px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  box-shadow: var(--shadow); font-weight: 500; max-width: calc(100% - 32px);
}
