:root {
  --bg: #faf6ef;
  --card: #ffffff;
  --ink: #2a211b;
  --muted: #6c5f55;
  --line: #e6dccd;
  --brand: #9c3d1c;
  --brand-ink: #ffffff;
  --brand-soft: #f7e6dc;
  --leaf: #4e6b3a;
  --leaf-soft: #e8efe1;
  --err: #b42318;
  --err-soft: #fdecea;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 "Source Sans 3", system-ui, sans-serif; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
h1, h2 { font-family: Fraunces, Georgia, serif; line-height: 1.15; }

.hero {
  --fh: 270px;                       /* rendered height of the feast scene */
  --table: calc(var(--fh) * 0.1913); /* its tablecloth band (44/230 of the art) */
  position: relative; overflow: hidden; color: #fbf3e8; padding: 44px 0 0;
  background:
    linear-gradient(to top, var(--bg) var(--table), #e6dccd var(--table), #e6dccd calc(var(--table) + 1.5px), transparent calc(var(--table) + 1.5px)),
    radial-gradient(110% 80% at 50% 0%, #5a3a26 0%, #3b2a20 65%);
}
.hero-text { position: relative; text-align: center; }
.hero h1 { font-size: clamp(38px, 8vw, 60px); margin: 0; letter-spacing: -.01em; }
.subtitle { font: italic 600 clamp(20px, 3.6vw, 26px) Fraunces, Georgia, serif; color: #f0a477; margin: 4px 0 18px; }
.lede { max-width: 62ch; margin: 0 auto 12px; color: #eadccb; }
.hero .facts { max-width: 620px; margin: 22px auto 0; text-align: left; }
.hero-feast { position: relative; display: block; height: var(--fh); width: auto; max-width: 100%; margin: 4px auto 0; }
.hero-leaves { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; pointer-events: none; }
@media (max-width: 640px) {
  .hero { --fh: min(220px, calc((100vw - 24px) * 0.575)); padding-top: 32px; }
}
.leaf-red { color: #b8432a; }
.leaf-gold { color: #d99a2b; }
.leaf-brown { color: #8a5a34; }
.done-art { width: 120px; height: 90px; display: block; margin: 0 auto 6px; }
.done h2 { text-align: center; }
.arrive { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.arrive h3 { margin: 0 0 8px; font: 700 17px Fraunces, Georgia, serif; }
.arrive p { margin: 6px 0; }
.arrive a { color: var(--brand); font-weight: 600; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; color: #e9b48f; margin: 0 0 10px; }
.hero h1 { font-size: clamp(30px, 6vw, 44px); margin: 0 0 12px; }
.hero h1 em { color: #f0a477; font-style: italic; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.facts div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px 12px; }
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #d7c3ad; }
.facts dd { margin: 2px 0 0; font-weight: 700; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

main { padding: 24px 16px 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 16px; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }
.card h2 { font-size: 22px; margin: 0 0 14px; display: flex; gap: 10px; align-items: baseline; }
.num { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 700 15px "Source Sans 3", sans-serif; transform: translateY(-2px); }
.hint { color: var(--muted); font-size: 15px; margin: 10px 0 0; }
.opt { color: var(--muted); font-weight: 400; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

label { display: block; font-weight: 600; font-size: 15px; }
input:not([type=radio]):not([type=checkbox]), select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; color: inherit;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--brand-soft); border-color: var(--brand); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.invalid { border-color: var(--err) !important; background: var(--err-soft) !important; }

.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .choice-row { grid-template-columns: 1fr; } }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; height: 100%; }
.choice strong { display: block; font-size: 17px; }
.choice small { color: var(--muted); font-weight: 400; font-size: 14px; }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.choice input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.choice.disabled { cursor: not-allowed; opacity: .55; }

.members { border: 0; padding: 0; margin: 16px 0 0; }
.members legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
#member-inputs { display: grid; gap: 10px; }

.checks { display: grid; gap: 8px; }
.checks label, .agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 16px; cursor: pointer; }
.checks input, .agree input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex: none; }

.dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 10px; }
.dish { position: relative; cursor: pointer; }
.dish input { position: absolute; opacity: 0; }
.dish span { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; height: 100%; }
.dish b { font-size: 16px; }
.dish small { color: var(--muted); font-size: 14px; }
.dish .left { color: var(--leaf); font-weight: 600; }
.dish input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.dish input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.dish.full { cursor: not-allowed; }
.dish.full span { background: #f4f0ea; border-style: dashed; }
.dish.full b { color: var(--muted); text-decoration: line-through; }
.dish.full .left { color: var(--muted); }
.dish-detail { margin-top: 16px; padding: 16px; background: var(--leaf-soft); border-radius: 12px; }
.dish-detail p:first-child { margin-top: 0; }
.dish-detail select { max-width: 280px; }

.agree { margin: 16px 0 0; font-weight: 600; }
.hp { position: absolute; left: -9999px; }
button[type=submit] { margin-top: 20px; width: 100%; padding: 15px; font: 700 18px "Source Sans 3", sans-serif; color: var(--brand-ink); background: var(--brand); border: 0; border-radius: 12px; cursor: pointer; }
button[type=submit]:hover { filter: brightness(1.08); }
button[type=submit]:disabled { opacity: .6; cursor: progress; }
.error-msg { color: var(--err); background: var(--err-soft); padding: 10px 12px; border-radius: 10px; margin: 16px 0 0; font-weight: 600; }

.notice { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.notice.error { color: var(--err); background: var(--err-soft); border-color: #f5c2bd; }
.notice h2 { margin-top: 0; }
.done { border-color: var(--leaf); background: var(--leaf-soft); }
.done h2 { color: var(--leaf); margin-top: 0; }
.foot { color: var(--muted); font-size: 14px; padding: 8px 16px 40px; }

.dish .icon { grid-row: span 2; width: 44px; height: 44px; }
.dish.full .icon { filter: grayscale(1); opacity: .45; }

/* ---------- Logo ---------- */
.topbar { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.logo { display: inline-block; }
.logo img { display: block; width: 150px; height: auto; }
.hero { padding-top: 18px; }
.hero-text { padding-top: 10px; }
@media (max-width: 640px) { .logo img { width: 120px; } }

/* ---------- Centered layout ---------- */
.card { text-align: center; }
.card h2 { justify-content: center; text-align: left; }
.hint { max-width: 56ch; margin-left: auto; margin-right: auto; }
.members legend { width: 100%; }
.choice span { text-align: center; }
.checks { width: fit-content; max-width: 100%; margin: 14px auto 0; text-align: left; }
.agree { width: fit-content; max-width: 100%; margin: 16px auto 0; text-align: left; }
.dish span { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 2px; }
.dish .icon { grid-row: auto; margin-bottom: 4px; }
.dish-detail select { margin-left: auto; margin-right: auto; }
button[type=submit] { max-width: 420px; display: block; margin-left: auto; margin-right: auto; }
.notice, .done { text-align: center; }
.arrive { text-align: center; }
.foot { text-align: center; }
.hero .facts { text-align: center; }
.card h2 { text-align: center; align-items: center; }

/* ---------- Wider layout ---------- */
.wrap { max-width: 1100px; }
.lede { max-width: 920px; font-size: 18px; }
.hero .facts { max-width: 900px; }
.hint { max-width: 820px; }
.card { padding: 28px 40px; }
.dishes { grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, max-content)); column-gap: 32px; row-gap: 10px; width: auto; justify-content: center; }
.dish-detail select, button[type=submit] { max-width: 480px; }
@media (max-width: 640px) {
  .card { padding: 22px 18px; }
  .lede { font-size: 17px; }
  .checks { grid-template-columns: 1fr; width: fit-content; }
}
@media (min-width: 900px) { .hero { --fh: 330px; } }

/* ---------- Embedded (?embed=1) ---------- */
.embed .topbar { display: none; }
.embed .hero { padding-top: 28px; }
.email-error { color: var(--muted); font-size: 13px; }
