:root {
  color-scheme: light;
  --ink: #24251f;
  --muted: #6f7065;
  --olive: #72715e;
  --olive-dark: #2b3024;
  --cream: #f7f2e9;
  --paper: #fffdf9;
  --line: #d9d5ca;
  --green: #246247;
  --green-soft: #e6f0e9;
  --danger: #9b352f;
  --shadow: 0 16px 46px rgba(47, 45, 38, .09);
  --forest: #1f4a3d;
  --rust: #a94e2e;
  --warm-ivory: #efeae2;
  --warm-paper: #f7f4ee;
  --warm-line: #d6cec1;
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at top right, #fff 0, transparent 34rem), var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, select, input[type="checkbox"] { touch-action: manipulation; }
button { cursor: pointer; }

.app-shell, .staff-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}
body[data-screen="preregister"] { background: var(--warm-ivory); }
body[data-screen="preregister"] .app-shell { width: min(100%, 1244px); padding-inline: 32px; }
.staff-shell { width: min(100%, 1060px); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px 22px;
}
.brand { display: flex; min-height: 44px; flex-direction: column; justify-content: center; color: inherit; text-decoration: none; }
.brand strong { display: block; font-size: clamp(22px, 5vw, 30px); letter-spacing: .16em; line-height: 1; }
.brand span { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.topbar > select { width: auto; min-width: 72px; }

.screen, .panel {
  display: none;
  min-width: 0;
  padding: clamp(20px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 249, .96);
  box-shadow: var(--shadow);
}
.screen.is-active, .panel { display: block; }
.screen--landing {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.panel + .panel { margin-top: 18px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}
h1, h2 { margin: 0; color: var(--ink); line-height: 1.06; }
h1 { max-width: 16ch; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 8.8vw, 68px); font-weight: 500; letter-spacing: -.035em; }
h2 { font-size: clamp(22px, 5vw, 31px); }
.lead, .note { color: var(--muted); line-height: 1.62; }
.lead { margin: 18px 0 26px; font-size: 17px; }
.note { margin: 10px 0 18px; font-size: 14px; }

.stack { display: grid; gap: 17px; }
label > span, legend { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 13px 14px;
  border: 1px solid #c9c5ba;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(36, 98, 71, .28);
  outline-offset: 2px;
}
.honeypot { position: fixed; left: -10000px; width: 1px; height: 1px; opacity: 0; }
fieldset { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }

.check-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  min-height: 48px;
  padding-block: 4px;
  line-height: 1.45;
}
.check-row input { width: 24px; height: 24px; min-height: 24px; margin: 0; }
.check-row span { margin: 0; font-weight: 550; }
.check-row + .check-row { margin-top: 14px; }
.check-row.required span::after { content: " *"; color: var(--danger); }

button, .button {
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}
.primary { width: 100%; color: #fff; background: var(--olive-dark); }
.primary:hover { background: #151812; }
.primary--rust { min-height: 56px; border-radius: 5px; background: var(--rust); }
.primary--rust:hover { background: #873c24; }
.secondary { color: var(--ink); background: #e9e5dc; }
.quiet { color: var(--green); background: transparent; border: 1px solid var(--line); }
button:disabled { cursor: not-allowed; opacity: .48; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.passport-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.passport-heading h1 { font-size: clamp(34px, 7vw, 56px); }
.status-card {
  margin: 24px 0 14px;
  padding: 18px;
  border-radius: 17px;
  background: var(--olive-dark);
  color: #fff;
}
.status-card strong { font-size: 18px; }
.status-card p { margin: 9px 0 0; color: #e7e3d6; line-height: 1.5; }
.progress-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.progress-card { min-width: 0; padding: 14px 10px; border-radius: 14px; background: #eee9df; }
.progress-card strong { display: block; overflow-wrap: anywhere; font-size: 20px; }
.progress-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.progress-card.is-done { background: var(--green-soft); color: var(--green); }

.mission-block { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.qr-canvas { width: min(100%, 280px); margin: 18px auto; padding: 15px; border-radius: 20px; background: #fff; }
.qr-canvas svg { display: block; width: 100%; height: auto; }
.brand-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.brand-chip { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 750; }
.brand-chip.is-done { border-color: #9fc3ad; background: var(--green-soft); color: var(--green); }
.scanner { min-height: 260px; margin: 14px 0; overflow: hidden; border-radius: 16px; background: #171914; color: #fff; }
.scanner video { border-radius: 12px; }
details { margin-top: 12px; }
summary { min-height: 44px; padding: 12px 0; color: var(--green); cursor: pointer; font-weight: 750; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.inline-form button { border-radius: 13px; background: var(--olive); color: #fff; }

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(92vw, 520px);
  margin: 0;
  padding: 13px 16px;
  border-radius: 15px;
  background: rgba(32, 34, 28, .96);
  color: #fff;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast[data-type="error"] { background: rgba(126, 39, 34, .97); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metric { min-width: 0; padding: 15px; border-radius: 15px; background: #eee9df; }
.metric strong { display: block; margin-top: 4px; font-size: 24px; }
.staff-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.staff-token-box { margin-top: 16px; padding: 16px; border-radius: 16px; background: #f1ede4; }
.staff-token-box code { display: block; overflow-wrap: anywhere; font-size: 12px; }
.staff-scan-result { margin-top: 12px; padding: 13px; border-radius: 13px; background: var(--green-soft); }
.danger-note { color: var(--danger); }
.hidden { display: none !important; }

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  min-height: 690px;
  border: 1px solid var(--warm-line);
  background: var(--warm-paper);
}
.hero-story { position: relative; min-height: 660px; overflow: hidden; background: var(--forest); }
.hero-story::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 28, 23, .03) 28%, rgba(10, 28, 23, .82) 100%);
}
.hero-story > img { width: 100%; height: 100%; object-fit: cover; object-position: 40% center; }
.hero-overlay { position: absolute; z-index: 1; inset: auto 0 0; padding: clamp(30px, 5vw, 58px); color: #fffaf2; }
.hero-overlay h1 { max-width: 11ch; color: inherit; font-size: clamp(48px, 6vw, 78px); }
.hero-overlay > p:last-child { max-width: 48ch; margin: 20px 0 0; font-size: 18px; line-height: 1.55; }
.eyebrow--light { color: #f0dfce; }

.rsvp-card { padding: clamp(28px, 4vw, 54px); align-self: center; }
.rsvp-card h2 { max-width: 13ch; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 4.8vw, 58px); font-weight: 500; letter-spacing: -.035em; }
.form-intro { margin: 15px 0 24px; color: #5e5549; font-size: 16px; line-height: 1.58; }
.date-fieldset { padding: 0; border: 0; }
.date-fieldset legend { margin-bottom: 10px; }
.date-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.date-choice { display: block; min-width: 0; }
.date-choice input { position: absolute; width: 1px; height: 1px; min-height: 1px; opacity: 0; }
.date-choice > span {
  display: grid;
  min-height: 86px;
  place-items: center;
  align-content: center;
  gap: 2px;
  margin: 0;
  border: 1px solid #bdb4a7;
  border-radius: 4px;
  background: #fffdf9;
  color: #4a4238;
  cursor: pointer;
}
.date-choice b, .date-choice small { font-size: 10px; letter-spacing: .08em; }
.date-choice strong { font-family: Georgia, "Times New Roman", serif; font-size: 26px; line-height: 1; }
.date-choice input:checked + span { border-color: var(--forest); background: var(--forest); color: #fffaf2; box-shadow: 0 0 0 1px var(--forest); }
.date-choice input:focus-visible + span { outline: 3px solid rgba(31, 74, 61, .28); outline-offset: 2px; }
.identity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.identity-grid__wide { grid-column: 1 / -1; }
.optional-choices { margin: 0; border-top: 1px solid var(--warm-line); border-bottom: 1px solid var(--warm-line); }
.optional-choices > summary { color: #5e5549; font-size: 14px; }
.optional-choices__body { padding: 4px 0 14px; }
.form-assurance { margin: -4px 0 0; color: #6b6153; font-size: 12px; line-height: 1.5; text-align: center; }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--warm-line);
  border-top: 0;
  background: #f7f4ee;
}
.trust-strip > div { min-width: 0; padding: 22px 24px; }
.trust-strip > div + div { border-left: 1px solid var(--warm-line); }
.trust-strip strong, .trust-strip span { display: block; }
.trust-strip strong { font-size: 15px; }
.trust-strip span { margin-top: 5px; color: #6b6153; font-size: 12px; line-height: 1.4; }

.landing-section { padding: 92px 0; border-bottom: 1px solid var(--warm-line); }
.section-heading { display: grid; grid-template-columns: minmax(150px, .38fr) minmax(0, 1fr); gap: 34px; align-items: start; margin-bottom: 38px; }
.section-heading h2 { max-width: 18ch; font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 5vw, 64px); font-weight: 500; letter-spacing: -.035em; }
.experience-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--warm-line); }
.experience-grid article { min-width: 0; padding: 28px 24px 32px; background: var(--warm-paper); }
.experience-grid article + article { border-left: 1px solid var(--warm-line); }
.experience-grid article > span { color: var(--rust); font-family: Georgia, "Times New Roman", serif; font-size: 30px; }
.experience-grid h3 { margin: 38px 0 9px; font-size: 18px; }
.experience-grid p { margin: 0; color: #5e5549; font-size: 14px; line-height: 1.58; }

.benefit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.benefit-card { min-height: 280px; padding: clamp(26px, 4vw, 42px); display: flex; flex-direction: column; justify-content: flex-start; border: 1px solid var(--warm-line); }
.benefit-card small { min-height: 2.8em; font-weight: 800; letter-spacing: .14em; line-height: 1.4; }
.benefit-card h3 { min-height: 3.15em; max-width: 13ch; margin: 40px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4vw, 46px); font-weight: 500; line-height: 1.05; letter-spacing: -.025em; }
.benefit-card p { max-width: 50ch; margin: 0; line-height: 1.6; }
.benefit-card--drink { background: var(--forest); color: #fffaf2; }
.benefit-card--drink small, .benefit-card--drink p { color: #eadfd2; }
.benefit-card--voucher { background: var(--rust); color: #fffaf2; }
.benefit-card--voucher small, .benefit-card--voucher p { color: #f7e4dc; }
.benefit-card--draw { background: #ded0b7; color: #2b241d; }
.benefit-note { margin: 16px 0 0; color: #6b6153; font-size: 13px; line-height: 1.55; }

.brand-card-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.brand-card-grid article { grid-column: span 2; min-height: 218px; padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid var(--warm-line); background: var(--warm-paper); }
.brand-card-grid article:nth-child(4) { grid-column: span 3; }
.brand-card-grid article:nth-child(5) { grid-column: span 3; }
.brand-card-grid small { margin-bottom: auto; color: var(--forest); font-weight: 800; letter-spacing: .14em; line-height: 1.4; }
.brand-card-grid strong { font-family: Georgia, "Times New Roman", serif; font-size: 42px; font-weight: 500; }
.brand-card-grid span { min-height: 3em; margin-top: 9px; color: #6b6153; line-height: 1.5; }
.brand-card-grid .brand-card--sand { background: #ded0b7; }
.brand-card-grid .brand-card--kparc { border: 2px solid #f36e28; background: #000096; color: #fff; }
.brand-card-grid .brand-card--kparc small { color: #f36e28; }
.brand-card-grid .brand-card--kparc span { color: rgba(255, 255, 255, .88); }
.brand-card-grid .kparc-logo { display: block; width: min(100%, 330px); height: auto; margin: 24px 0 3px; object-fit: contain; object-position: left center; }

.how-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 1px; margin: 0; list-style: none; background: var(--warm-line); }
.how-list li { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 14px; padding: 26px; background: var(--warm-paper); }
.how-list li > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--forest); color: #fff; font-weight: 800; }
.how-list strong { display: block; font-size: 17px; }
.how-list p { margin: 7px 0 0; color: #5e5549; line-height: 1.55; }

.faq-list { border-top: 1px solid var(--warm-line); }
.faq-list details { margin: 0; border-bottom: 1px solid var(--warm-line); }
.faq-list summary { min-height: 58px; color: #191510; font-size: 17px; }
.faq-list p { max-width: 68ch; margin: 0 0 22px; color: #5e5549; line-height: 1.6; }
.mobile-rsvp-bar { display: none; }

@media (max-width: 900px) {
  .benefit-grid { grid-template-columns: 1fr 1fr; }
  .benefit-card--draw { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .app-shell, .staff-shell { padding-left: 12px; padding-right: 12px; }
  .screen, .panel { padding: 21px 17px; border-radius: 22px; }
  .progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .button-row, .staff-actions { grid-template-columns: 1fr; }
  .passport-heading { display: block; }
  .passport-heading .quiet { margin-top: 14px; }
  .topbar { align-items: flex-start; }
  .brand strong { font-size: 22px; }
  body[data-screen="preregister"] .app-shell { padding: max(12px, env(safe-area-inset-top)) 12px calc(94px + env(safe-area-inset-bottom)); }
  body[data-screen="preregister"] .topbar { padding-inline: 4px; }
  .landing-hero { display: flex; min-height: 0; flex-direction: column; }
  .hero-story { min-height: 470px; }
  .hero-story > img { position: absolute; inset: 0; object-position: 18% center; }
  .hero-overlay { padding: 28px 22px; }
  .hero-overlay h1 { font-size: clamp(43px, 13vw, 58px); }
  .hero-overlay > p:last-child { font-size: 16px; }
  .rsvp-card { padding: 30px 18px 34px; }
  .rsvp-card h2 { font-size: 42px; }
  .date-grid { grid-template-columns: repeat(5, minmax(56px, 1fr)); overflow-x: auto; padding: 3px 3px 7px; margin-inline: -3px; }
  .identity-grid { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr 1fr; border-top: 0; }
  .trust-strip > div { padding: 18px; }
  .trust-strip > div + div { border-left: 0; }
  .trust-strip > div:nth-child(even) { border-left: 1px solid var(--warm-line); }
  .trust-strip > div:nth-child(n+3) { border-top: 1px solid var(--warm-line); }
  .landing-section { padding: 64px 4px; }
  .section-heading { grid-template-columns: 1fr; gap: 4px; margin-bottom: 28px; }
  .section-heading h2 { font-size: 42px; }
  .experience-grid { grid-template-columns: 1fr; }
  .experience-grid article + article { border-left: 0; border-top: 1px solid var(--warm-line); }
  .experience-grid h3 { margin-top: 22px; }
  .benefit-grid { grid-template-columns: 1fr; }
  .benefit-card--draw { grid-column: auto; }
  .benefit-card { min-height: 250px; }
  .benefit-card small, .benefit-card h3 { min-height: 0; }
  .brand-card-grid { grid-template-columns: 1fr; }
  .brand-card-grid article, .brand-card-grid article:nth-child(4), .brand-card-grid article:nth-child(5) { grid-column: auto; min-height: 184px; }
  .brand-card-grid span { min-height: 0; }
  .how-list { grid-template-columns: 1fr; }
  .mobile-rsvp-bar {
    position: fixed;
    z-index: 18;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--warm-line);
    background: rgba(247, 244, 238, .97);
    box-shadow: 0 -12px 30px rgba(25, 21, 16, .1);
  }
  .mobile-rsvp-bar strong, .mobile-rsvp-bar span { display: block; }
  .mobile-rsvp-bar strong { font-size: 13px; }
  .mobile-rsvp-bar span { margin-top: 2px; color: #6b6153; font-size: 11px; }
  .mobile-rsvp-bar a { display: grid; min-height: 50px; padding: 0 18px; place-items: center; border-radius: 4px; background: var(--rust); color: #fff; font-size: 14px; font-weight: 800; white-space: nowrap; }
}

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