:root {
  --paper: #f7f0e4;
  --paper-2: #efe4d2;
  --card: #fffaf2;
  --ink: #2b211c;
  --ink-2: #6b5a4e;
  --line: #e3d5c0;
  --cranberry: #7a1f2b;
  --cranberry-2: #9b2c3a;
  --pumpkin: #c8642a;
  --mustard: #d9a441;
  --sage: #6f7f5c;
  --lions: #0076b6;
  --silver: #a5acaf;
  --shadow: 0 1px 2px rgba(60, 35, 20, .06), 0 8px 24px -8px rgba(60, 35, 20, .18);
  --radius: 20px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1b1411;
    --paper-2: #241a16;
    --card: #261d18;
    --ink: #f3e8da;
    --ink-2: #bba795;
    --line: #3b2d25;
    --cranberry: #d65a68;
    --cranberry-2: #e5737f;
    --pumpkin: #e58a4f;
    --mustard: #e8bb5f;
    --sage: #9fb08a;
    --lions: #3d9be0;
    --silver: #8e979b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -10px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1b1411; --paper-2: #241a16; --card: #261d18; --ink: #f3e8da; --ink-2: #bba795;
  --line: #3b2d25; --cranberry: #d65a68; --cranberry-2: #e5737f; --pumpkin: #e58a4f;
  --mustard: #e8bb5f; --sage: #9fb08a; --lions: #3d9be0; --silver: #8e979b; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--pumpkin) 18%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, color-mix(in srgb, var(--mustard) 16%, transparent), transparent 60%),
    var(--paper);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---------- falling leaves ---------- */
.leaves { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.leaf {
  position: absolute; top: -40px; font-size: 22px; opacity: .4;
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translate3d(0, -40px, 0) rotate(0deg); }
  50% { transform: translate3d(40px, 50vh, 0) rotate(180deg); }
  100% { transform: translate3d(-20px, 105vh, 0) rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) { .leaf { display: none; } html { scroll-behavior: auto; } }

/* ---------- type ---------- */
.eyebrow {
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600;
  color: var(--pumpkin); margin: 0 0 8px;
}
.section-title { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.section-sub { color: var(--ink-2); margin: 6px 0 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.pill {
  margin: 0; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--sage) 16%, transparent); color: var(--sage);
}

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: 600 15px/1 var(--sans); padding: 13px 20px; border-radius: 999px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-primary { background: var(--cranberry); border-color: var(--cranberry); color: #fff8f0; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--cranberry) 70%, transparent); }
.btn-primary:hover { background: var(--cranberry-2); }
.btn-ghost { background: transparent; }
.btn-small { padding: 9px 14px; font-size: 14px; }
.linkish { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* ---------- gate ---------- */
.gate { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card {
  width: 100%; max-width: 420px; text-align: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 28px; padding: 40px 28px 32px; box-shadow: var(--shadow);
  animation: rise .6s cubic-bezier(.2, .8, .2, 1);
}
.gate-mark { width: 56px; height: 56px; margin: 0 auto 16px; color: var(--pumpkin); }
.gate-title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 52px; line-height: 1; margin: 0 0 10px; color: var(--cranberry); }
.gate-sub { color: var(--ink-2); margin: 0 0 24px; }
.gate-form { display: flex; flex-direction: column; gap: 12px; }
.gate-form input { text-align: center; font-size: 18px; letter-spacing: .08em; }
.gate-error { color: var(--cranberry); min-height: 1.5em; margin: 12px 0 0; font-weight: 500; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- hero ---------- */
#app { position: relative; z-index: 1; }
.hero { padding: 72px 0 40px; text-align: center; }
.hero-title {
  font-family: var(--serif); font-weight: 600; font-size: clamp(56px, 15vw, 116px); line-height: .9;
  margin: 4px 0 18px; letter-spacing: -.03em; color: var(--ink);
}
.hero-title em { font-style: italic; font-weight: 400; color: var(--cranberry); }
.hero-date { font-family: var(--serif); font-size: clamp(18px, 5vw, 22px); margin: 0 0 14px; color: var(--ink); }
.hero-blurb { max-width: 520px; margin: 0 auto 26px; color: var(--ink-2); font-size: 17px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.countdown { display: flex; justify-content: center; gap: 10px; margin: 0 0 28px; }
.cd-unit {
  min-width: 72px; padding: 12px 8px 10px; border-radius: 16px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cd-num { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; display: block; font-variant-numeric: tabular-nums; }
.cd-lbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.cd-msg { font-family: var(--serif); font-size: 22px; font-style: italic; color: var(--pumpkin); }

/* ---------- cards ---------- */
.content { display: grid; gap: 20px; padding-bottom: 40px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow); position: relative;
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
@media (max-width: 480px) { .card { padding: 22px 18px; } .section-title { font-size: 24px; } }

/* details */
.details-grid { display: grid; gap: 18px; margin: 18px 0 20px; }
@media (min-width: 640px) { .details-grid { grid-template-columns: repeat(2, 1fr); } }
.detail { display: flex; gap: 12px; align-items: flex-start; }
.detail-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: color-mix(in srgb, var(--mustard) 20%, transparent);
}
.detail p { margin: 0; }
.detail-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.detail-value { font-weight: 600; }
.detail-note { color: var(--ink-2); font-size: 14px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: 14px; font-weight: 600; padding: 0; }
.opt { font-weight: 400; color: var(--ink-2); font-size: 13px; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: auto 1fr; align-items: end; } .dish-form .field-row { grid-template-columns: 1fr 200px; } }
input, select {
  width: 100%; font: 16px var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--pumpkin); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pumpkin) 18%, transparent); }
input::placeholder { color: color-mix(in srgb, var(--ink-2) 70%, transparent); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  display: block; text-align: center; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--paper); font-weight: 600; cursor: pointer; transition: all .15s;
}
.seg input:checked + span { background: var(--cranberry); border-color: var(--cranberry); color: #fff8f0; }
.seg input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--pumpkin) 25%, transparent); }

.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); width: max-content; }
.stepper button { width: 44px; height: 46px; border: 0; background: none; font-size: 20px; color: var(--ink); cursor: pointer; }
.stepper input { width: 48px; border: 0; background: none; text-align: center; padding: 0; box-shadow: none; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.form-title { font-family: var(--serif); font-size: 20px; margin: 0; font-weight: 600; }
.form-actions { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; }

/* guests */
.guests { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.guest {
  display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line);
}
.guest.maybe { opacity: .75; border-style: dashed; }
.guest.no { opacity: .45; text-decoration: line-through; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff8f0;
  font-weight: 600; font-size: 13px; flex: none;
}
.guest small { color: var(--ink-2); }
.empty { color: var(--ink-2); font-style: italic; margin: 8px 0 0; }

/* courses */
.courses { display: grid; gap: 14px; margin-bottom: 26px; }
@media (min-width: 640px) { .courses { grid-template-columns: 1fr 1fr; } }
.course { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--paper); }
.course.host { background: color-mix(in srgb, var(--sage) 10%, var(--paper)); }
.course-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.course-name { font-family: var(--serif); font-weight: 600; font-size: 18px; margin: 0; }
.dots { display: flex; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--sage); }
.dot.over { background: var(--mustard); }
.dishes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dish { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dish-title { font-weight: 600; display: block; }
.dish-meta { font-size: 13px; color: var(--ink-2); }
.dish-mine { display: flex; gap: 4px; flex: none; }
.icon-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 8px;
  font-size: 12px; padding: 4px 8px; cursor: pointer;
}
.icon-btn:hover { color: var(--cranberry); border-color: var(--cranberry); }
.course-empty { color: var(--ink-2); font-size: 14px; font-style: italic; margin: 0; }
.claim {
  margin-top: 10px; font-size: 13px; padding: 7px 13px;
  background: color-mix(in srgb, var(--pumpkin) 16%, var(--card)); border-color: var(--pumpkin); color: var(--pumpkin);
}
.claim:hover { background: color-mix(in srgb, var(--pumpkin) 30%, var(--card)); }
.dish-form { border-top: 1px dashed var(--line); padding-top: 22px; }

/* AI */
.ai {
  background:
    radial-gradient(400px 200px at 100% 0%, color-mix(in srgb, var(--mustard) 22%, transparent), transparent 70%),
    var(--card);
}
.ai-badge { position: absolute; top: 20px; right: 22px; font-size: 26px; }
.ai-out { margin-top: 18px; display: grid; gap: 12px; }
.ai-summary { font-family: var(--serif); font-style: italic; font-size: 18px; margin: 0; color: var(--pumpkin); }
.idea {
  display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper);
  animation: rise .4s both;
}
.idea-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.idea-title { font-weight: 600; }
.idea-tag { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.idea p { margin: 0; color: var(--ink-2); font-size: 14px; }
.idea button { justify-self: start; margin-top: 6px; }
.thinking { display: flex; gap: 6px; align-items: center; color: var(--ink-2); }
.thinking i { width: 8px; height: 8px; border-radius: 50%; background: var(--pumpkin); animation: bob 1s infinite ease-in-out; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-5px); opacity: 1; } }

/* toast & footer */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-weight: 500;
  transition: all .25s ease; pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { text-align: center; color: var(--ink-2); font-size: 14px; padding: 12px 0 24px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
@media (min-width: 640px) { .course.host { grid-column: 1 / -1; } }

/* parties (preset guest list) */
.parties { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.party { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.party.me { border-color: var(--pumpkin); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pumpkin) 18%, transparent); }
.party .avatar { flex: none; }
.party-name { font-weight: 600; margin: 0; }
.party-name small { color: var(--ink-2); font-weight: 400; }
.party-brings { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.party-brings.none { font-style: italic; opacity: .8; }

/* host-only invite links */
.invite-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.invite-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.invite-list .inv-name { font-weight: 600; min-width: 130px; }
.invite-list code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; color: var(--ink-2); }
@media (max-width: 560px) {
  .invite-list .inv-name { flex: 1; min-width: 0; }
  .invite-list code { order: 3; flex-basis: 100%; }
}

/* ---------- Lions game-day ---------- */
.scoreboard {
  display: inline-grid; grid-template-columns: 1fr 1fr; margin: 0 auto 22px; border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.sb-side { padding: 10px 22px 9px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; }
.sb-lions { background: #0076b6; }
.sb-turkey { background: #7a1f2b; }
.sb-lbl { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; opacity: .92; white-space: nowrap; }
.sb-time { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.detail-icon.lions { background: color-mix(in srgb, var(--lions) 20%, transparent); }
.go-lions { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--lions); margin: 0 0 6px; letter-spacing: .01em; }
.gate-game { color: var(--lions); font-weight: 600; font-size: 14px; letter-spacing: .04em; margin: -2px 0 14px; }
.dish-as { color: var(--ink-2); font-size: 15px; }
.claim.flash { animation: claim-flash .8s ease-in-out 3; }
@keyframes claim-flash {
  0%, 100% { background: color-mix(in srgb, var(--pumpkin) 16%, var(--card)); border-color: var(--pumpkin); color: var(--pumpkin); box-shadow: none; }
  50% { background: var(--pumpkin); border-color: var(--pumpkin); color: #fff8f0; box-shadow: 0 0 0 5px color-mix(in srgb, var(--pumpkin) 30%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .claim.flash { animation: none; background: var(--pumpkin); color: #fff8f0; } }
