:root {
  --ink: #1c2430;
  --muted: #3d4654;
  --paper: #ffd8bf;
  --card: #fffdf8;
  --tomato: #e23b2b;
  --tomato-deep: #c42d20;
  --butter: #ffe08a;
  --leaf: #1faa5a;
  --leaf-deep: #127a3e;
  --rose: #ffd0dc;
  --shadow: 6px 6px 0 var(--ink);
  --font: "Nunito", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html { font-size: 112.5%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.45;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8px 8px, rgba(226, 59, 43, 0.18) 2px, transparent 2.4px),
    radial-gradient(circle at 20px 22px, rgba(31, 170, 90, 0.2) 2px, transparent 2.4px);
  background-size: 32px 32px;
  overflow-x: hidden;
}
h1, h2, .stat-n, .brand span, .reply-name, .empty {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
h1 { font-size: 2.5rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.55rem; margin: 0 0 0.35rem; }
h2::after {
  content: "";
  display: block;
  width: 4.6rem;
  height: 0.55rem;
  margin: 0.45rem 0 0.75rem;
  background: radial-gradient(circle, var(--tomato) 45%, transparent 48%);
  background-size: 0.85rem 0.55rem;
  background-repeat: repeat-x;
}
p { margin: 0.35rem 0; }
a { color: var(--tomato-deep); }
button, input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--butter);
  color: var(--ink);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  z-index: 5;
  font-weight: 800;
}
.skip:focus { top: 0.6rem; }

.top {
  position: relative;
  background: var(--tomato);
  color: #fff6e4;
  padding-bottom: 0.2rem;
}
.top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 16px;
  background: radial-gradient(circle at 14px 0, var(--tomato) 14px, transparent 15px);
  background-size: 36px 16px;
  background-repeat: repeat-x;
  pointer-events: none;
}
.top-bar, .banner-inner, .foot {
  width: auto;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
.top-bar {
  max-width: none;
  min-height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  background: var(--butter);
  color: var(--ink);
}
.account-nav { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.account-nav form { margin: 0; }
.nav-hello { font-weight: 800; }
.account-nav a, .account-nav button {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  background: white;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}
.event-title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.7rem;
}
.mark { width: 3.15rem; height: 3.15rem; }

.wrap, .wrap-wide {
  width: auto;
  max-width: 40rem;
  margin: 1.6rem auto 2rem;
  padding: 0 16px;
}
.wrap-wide { max-width: 44rem; }

.banner { padding: 1.2rem 0 2.4rem; }
.banner-inner { width: auto; max-width: 42rem; }
.hero-row { display: flex; align-items: flex-end; gap: 0.4rem; }
.hero-row > div { min-width: 0; }
.hero-art { width: 9.5rem; height: auto; flex: none; margin-bottom: 0.15rem; }
.banner h1 { color: #fff6e4; font-size: clamp(2.5rem, 9vw, 3.6rem); max-width: 9ch; }
.banner p { color: #fff1e4; font-size: 1.12rem; max-width: 34ch; }
.banner .kicker {
  margin: 0 0 0.4rem;
  color: var(--butter);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.sheet { margin-top: -0.4rem; }

.card, .copy-row, .live-bar, .stats, .fields { min-width: 0; max-width: 100%; }
.card {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 1.2rem 1.05rem 1.25rem;
  margin: 0 0 1rem;
}
.page-head { background: #fff6e4; }
.page-head h1, .invite h1 { font-size: clamp(2rem, 7vw, 2.7rem); }
.invite { background: #fff6e4; }
.eyebrow {
  margin: 0 0 0.3rem;
  display: inline-block;
  background: var(--butter);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.when { color: var(--muted); font-size: 1.08rem; margin-top: 0.55rem; }
.venue { font-weight: 800; font-size: 1.15rem; }
.invite .when {
  display: inline-block;
  max-width: 100%;
  margin-top: 0.7rem;
  padding: 0.3rem 0.7rem;
  background: #d9f5e4;
  color: var(--leaf-deep);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
}
.note {
  margin-top: 0.9rem;
  padding: 0.8rem 0.9rem;
  background: var(--butter);
  border: 2px solid var(--ink);
  border-radius: 14px;
}
.hint, .fine { color: var(--muted); font-weight: 700; }
.fine { margin: 0.9rem 0 0; }
.hello { font-weight: 800; font-size: 1.12rem; }

.fields { display: grid; gap: 0.9rem; }
.field { display: grid; gap: 0.35rem; grid-template-columns: minmax(0, 1fr); }
.field > *, .copy-row > *, .split > *, .menu-row > *, .live-bar > *, .stats > * {
  min-width: 0;
  max-width: 100%;
}
.field > span, legend, .check span { font-weight: 800; }
.field em, legend em { font-style: normal; font-weight: 700; color: var(--muted); }
fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.split { display: grid; gap: 0.7rem; }

input[type="text"], input[type="password"], input[type="date"], input[type="time"], textarea, .copy-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 3.25rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
  background: #fff;
  font-size: 1.05rem;
}
textarea { min-height: 6rem; resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible,
.choice:focus-within, .pick:focus-within {
  outline: 3px solid var(--tomato);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 3px solid var(--ink);
  font-weight: 800;
  font-size: 1.08rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
}
.btn-primary { width: 100%; background: var(--tomato); color: white; }
.btn-primary:hover { background: var(--tomato-deep); }
.btn-ghost { background: white; color: var(--ink); }
.btn-danger { background: var(--ink); color: var(--butter); width: 100%; }
.text-btn {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--tomato-deep);
  font-weight: 800;
  padding: 0.35rem 0.15rem;
  cursor: pointer;
}
.menu-editor .btn-ghost {
  width: auto;
  min-height: 2.5rem;
  padding-left: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: var(--tomato-deep);
  justify-content: flex-start;
}
.menu-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 0.4rem;
  align-items: center;
  margin-bottom: 0.45rem;
}
.menu-rows { margin-top: 0.3rem; }
.group-list { display: grid; gap: 0.85rem; }
.choice-editor {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}
.mode-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.mode {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.mode input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.mode:has(input:checked) { background: var(--butter); }
.editor-actions { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; align-items: center; }
.quick-adds { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.85rem; }
.quick-adds .btn { width: auto; min-height: 2.7rem; padding: 0.4rem 0.8rem; background: white; }
.dish-group { color: var(--muted); font-weight: 800; }

.choice-pair, .menu-picks { display: grid; gap: 0.7rem; }
.choice, .pick {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.4rem;
  border-radius: 18px;
  border: 3px solid var(--ink);
  background: white;
  font-weight: 800;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
}
.choice input, .pick input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice span, .pick span { position: relative; z-index: 1; }
.pick span { display: flex; align-items: center; gap: 0.7rem; }
.pick span::before {
  content: "";
  width: 1.35rem;
  height: 1.35rem;
  flex: none;
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  background: white;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}
.pick.is-selected span::before,
.pick:has(input:checked) span::before {
  content: "✓";
  color: white;
  background: var(--leaf);
}
.choice-yes.is-selected, .choice-yes:has(input:checked) {
  background: var(--leaf);
  color: white;
}
.choice-no.is-selected, .choice-no:has(input:checked) {
  background: #ff8fa3;
  color: var(--ink);
}
.pick {
  justify-content: flex-start;
  min-height: 3.35rem;
  padding: 0.7rem 0.95rem;
  font-size: 1.12rem;
  box-shadow: 3px 3px 0 var(--ink);
}
.pick.is-selected, .pick:has(input:checked) { background: #d9f5e4; }
.pick-one .pick span::before { border-radius: 999px; }
.pick-one .pick.is-selected span::before,
.pick-one .pick:has(input:checked) span::before {
  content: "";
  background: var(--leaf);
  box-shadow: inset 0 0 0 0.28rem white;
}
html.js .menu-block { display: none; }
html.js .menu-block.is-needed { display: block; }

.errors {
  background: #ffe4e1;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 0.8rem 1rem;
  margin: 0 0 0.9rem;
}
.errors ul { margin: 0.25rem 0 0; padding-left: 1.15rem; }
.errors-title { font-weight: 800; margin: 0; }
.flash {
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 0.8rem 1rem;
  margin: 0 0 0.9rem;
  font-weight: 800;
  background: white;
}
.flash-ok { background: #d9f5e4; }

.copy-row { display: grid; gap: 0.55rem; margin-top: 0.55rem; }
.copy-input { font-weight: 800; background: #fff6e4; }
.keep {
  margin-top: 0.95rem;
  padding: 0.75rem 0.9rem;
  background: var(--butter);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  font-weight: 800;
}
details { margin-top: 0.8rem; }
summary { cursor: pointer; font-weight: 800; padding: 0.15rem 0; }
.live-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
  margin: 0 0 1rem;
}
.live-bar .hint { grid-column: 1 / -1; margin: 0; font-weight: 800; color: var(--ink); }
.live-bar .btn { min-height: 3rem; width: 100%; background: white; }

.stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.7rem; }
.stat {
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 0.85rem 0.45rem 0.7rem;
  text-align: center;
}
.stat-yes { background: var(--leaf); color: white; }
.stat-no { background: var(--rose); color: var(--ink); }
.stat-n { font-size: 3.4rem; margin: 0; }
.stat-l { margin: 0; font-weight: 800; font-size: 0.98rem; line-height: 1.15; }
.stat-yes .stat-l { color: #e9fff1; }
.empty { font-size: 1.85rem; margin: 1rem 0 0.2rem; max-width: 14ch; }
.tally { margin-top: 0.85rem; font-weight: 800; }
.block { margin-top: 1.2rem; }
.block h2 { font-size: 1.35rem; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.bar-top { display: flex; justify-content: space-between; gap: 0.8rem; font-weight: 800; }
.bar {
  height: 0.95rem;
  margin-top: 0.28rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.bar span { display: block; height: 100%; background: var(--tomato); }
.retired { font-style: normal; font-weight: 700; color: var(--muted); }

.roll { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.reply {
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  background: white;
  border: 2.5px solid var(--ink);
}
.reply-yes { background: #f3fff7; }
.reply-no { background: #fff5f7; }
.reply-top { display: flex; justify-content: space-between; gap: 0.55rem; align-items: center; }
.reply-name { margin: 0; font-size: 1.3rem; min-width: 0; }
.pill {
  margin: 0;
  flex: none;
  border-radius: 999px;
  border: 2px solid var(--ink);
  padding: 0.18rem 0.55rem;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}
.pill-yes { background: var(--leaf); color: white; }
.pill-no { background: #ff8fa3; color: var(--ink); }
.reply-menu { font-weight: 800; margin-top: 0.3rem; }
.reply-dishes {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.reply-dishes li {
  margin: 0;
  padding: 0.12rem 0.55rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: white;
  font-weight: 800;
  font-size: 0.95rem;
}
.reply-note { color: var(--muted); }
.reply-when { color: var(--muted); font-size: 0.92rem; }
.reply-drop { margin: 0.2rem 0 0; }
.check { display: flex; gap: 0.65rem; align-items: flex-start; margin: 0.8rem 0; }
.check input { width: 1.35rem; height: 1.35rem; margin-top: 0.15rem; flex: none; }
.danger-block .btn { margin-top: 0.35rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.foot {
  padding-top: 0.2rem;
  padding-bottom: 2.2rem;
  text-align: center;
  color: var(--ink);
  font-weight: 800;
}

.w-0 { width: 0; } .w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; }
.w-20 { width: 20%; } .w-25 { width: 25%; } .w-30 { width: 30%; } .w-35 { width: 35%; }
.w-40 { width: 40%; } .w-45 { width: 45%; } .w-50 { width: 50%; } .w-55 { width: 55%; }
.w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; } .w-75 { width: 75%; }
.w-80 { width: 80%; } .w-85 { width: 85%; } .w-90 { width: 90%; } .w-95 { width: 95%; }
.w-100 { width: 100%; }

@media (min-width: 40rem) {
  .split, .choice-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .copy-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .copy-row .btn-primary { width: auto; min-width: 8.5rem; }
  .hero-art { width: 10rem; }
  .live-bar { display: flex; align-items: center; }
  .live-bar .hint { margin-right: auto; }
  .live-bar .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}

@media print {
  body { background: white; }
  .top, .foot, .share-box, .live-bar, .edit-block, .no-print, .banner, .hero-art { display: none !important; }
  .card, .btn, .stat, .reply { box-shadow: none; }
}
