:root {
  --cream: #F7F1E8;
  --linen: #EFE6D8;
  --sand: #DDCDB6;
  --stone: #B5A28A;
  --taupe: #8A7764;
  --bark: #5C4837;
  --espresso: #2F251D;
  --terracotta: #A35A3C;
  --terracotta-d: #87472D;
  --olive: #6F6C49;
  --gold: #B48C4E;
  --paper: #FFFCF7;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(47, 37, 29, .05), 0 10px 28px rgba(47, 37, 29, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-size: 20px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--terracotta-d); }

/* Header */
.site-header {
  text-align: center;
  padding: 26px 16px 18px;
  background:
    radial-gradient(ellipse at top, rgba(180, 140, 78, .14), transparent 70%),
    var(--linen);
  border-bottom: 1px solid var(--sand);
}
.site-title {
  font-family: 'Luxurious Script', cursive;
  font-weight: 400;
  font-size: clamp(2.7rem, 10vw, 4.4rem);
  line-height: 1.05;
  margin: 0;
  color: var(--bark);
}
.site-title a { color: inherit; text-decoration: none; }
.site-sub {
  margin-top: 6px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--taupe);
}
.ornament {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--gold); margin-top: 8px; font-size: .9rem;
}
.ornament::before, .ornament::after { content: ''; height: 1px; width: 56px; background: var(--stone); opacity: .7; }

.preview-bar {
  background: var(--olive); color: #fff; text-align: center;
  font-size: .9rem; padding: 6px 12px;
}

/* Main */
main { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 18px 18px 8px; }
.fade { animation: fadeUp .5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 16px; }
.dots { display: flex; gap: 6px; flex: 1; }
.dots span { height: 4px; flex: 1; border-radius: 4px; background: var(--sand); transition: background .4s; }
.dots span.done { background: var(--stone); }
.dots span.current { background: var(--terracotta); }
.progress-label { font-size: .85rem; color: var(--taupe); white-space: nowrap; font-weight: 600; letter-spacing: .05em; }

.hero {
  border-radius: var(--radius); overflow: hidden; margin: 0 0 22px;
  aspect-ratio: 16 / 8; background: var(--sand); box-shadow: var(--shadow);
}
.hero img { width: 100%; height: 100%; object-fit: cover; }

.step-title { font-weight: 500; font-size: 2.4rem; line-height: 1.1; margin: 0 0 6px; color: var(--espresso); }
.step-intro { color: var(--bark); font-style: italic; font-size: 1.15rem; margin: 0 0 18px; }
.lead { font-size: 1.2rem; }
p { margin: 0 0 14px; }
.small { font-size: .95rem; color: var(--taupe); }

.card {
  background: var(--paper); border: 1px solid var(--sand);
  border-radius: var(--radius); padding: 20px; margin: 0 0 16px;
  box-shadow: var(--shadow);
}
.card h3 { font-weight: 600; font-size: 1.3rem; margin: 0 0 12px; line-height: 1.25; }

.notice {
  background: #F3E3D6; border: 1px solid #E2C2AC; color: var(--terracotta-d);
  border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; font-size: 1.05rem;
}

/* Form fields */
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; font-weight: 600; font-size: 1.05rem; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; font: inherit; font-size: 1.15rem; color: var(--espresso);
  background: #fff; border: 1.5px solid var(--sand); border-radius: 12px;
  padding: 10px 14px; min-height: 50px; appearance: none; -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--taupe) 50%), linear-gradient(135deg, var(--taupe) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(163, 90, 60, .15); }
.field.invalid input { border-color: var(--terracotta); }
.field .error { display: none; color: var(--terracotta-d); font-size: .95rem; margin-top: 4px; }
.field.invalid .error { display: block; }

/* Options */
.options { margin: 0 0 8px; }
.option {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  background: var(--paper); border: 1.5px solid var(--sand); border-radius: var(--radius);
  padding: 18px 18px 18px 16px; margin: 0 0 14px; cursor: pointer; overflow: hidden;
  transition: border-color .25s, box-shadow .25s, background .25s;
  -webkit-tap-highlight-color: transparent;
}
.option:hover { border-color: var(--stone); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .tick {
  flex: none; width: 26px; height: 26px; margin-top: 5px; border-radius: 50%;
  border: 1.5px solid var(--stone); display: grid; place-items: center;
  transition: background .25s, border-color .25s;
}
.option.selected { border-color: var(--terracotta); background: #FFF9F3; box-shadow: 0 0 0 3px rgba(163, 90, 60, .12); }
.option.selected .tick { background: var(--terracotta); border-color: var(--terracotta); }
.option.selected .tick::after {
  content: ''; width: 7px; height: 12px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: translate(0, -1px) rotate(45deg);
}
.option input:focus-visible ~ .tick { outline: 2px solid var(--terracotta); outline-offset: 3px; }
.option.disabled { cursor: default; opacity: .8; }
.option.static { cursor: default; }
.opt-body { flex: 1; min-width: 0; }
.opt-name { display: block; font-size: 1.55rem; font-weight: 600; line-height: 1.15; color: var(--espresso); }
.opt-lines { display: block; margin-top: 6px; }
.line { display: block; color: var(--bark); font-size: 1.1rem; line-height: 1.45; }

.desc { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--linen); font-style: italic; color: var(--taupe); font-size: 1.05rem; line-height: 1.45; }
.opt-lines > .desc:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.step-title.script { font-family: 'Luxurious Script', cursive; font-weight: 400; font-size: 3.2rem; color: var(--bark); line-height: 1.15; }
.footer-credit { max-width: 680px; margin: 18px auto 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); text-align: center; font-size: .92rem; color: var(--stone); }
.footer-credit a { color: var(--sand); text-underline-offset: 3px; }

.badge {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  padding: 2px 7px 1px; border-radius: 999px; line-height: 1.4;
  border: 1px solid var(--olive); color: var(--olive); position: relative; top: -2px;
}
.badge.vg { background: var(--olive); color: #fff; }

.served { background: var(--linen); box-shadow: none; }
.served-title { display: block; font-size: 1.2rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--taupe); margin-bottom: 6px; }
.diet-note { margin: -6px 0 16px; }

/* Slide-in from the right as lines scroll into view */
.reveal {
  opacity: 0; transform: translateX(40px);
  transition: opacity .7s ease, transform .9s cubic-bezier(.2, .75, .2, 1);
  transition-delay: calc(var(--i, 0) * 110ms + 120ms);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .fade { animation: none; }
}

/* Navigation */
.nav {
  position: sticky; bottom: 0; z-index: 5; display: flex; gap: 12px;
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  margin-top: 8px;
  background: linear-gradient(to top, var(--cream) 72%, rgba(247, 241, 232, 0));
}
.btn {
  font: inherit; font-size: 1.15rem; font-weight: 600; letter-spacing: .02em;
  border-radius: 999px; padding: 11px 26px; min-height: 52px; cursor: pointer;
  border: 1.5px solid var(--terracotta); transition: background .2s, color .2s, opacity .2s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--terracotta); color: #fff; flex: 1; }
.btn-primary:hover { background: var(--terracotta-d); }
.btn-secondary { background: transparent; color: var(--terracotta-d); }
.btn-secondary:hover { background: rgba(163, 90, 60, .08); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-small { min-height: 40px; padding: 6px 16px; font-size: 1rem; }
.btn-link { background: none; border: none; color: var(--terracotta-d); font: inherit; font-weight: 600; cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }

/* Summary */
.summary { padding: 6px 20px; }
.sum-row { display: flex; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--linen); }
.sum-row:last-child { border-bottom: none; }
.sum-label { flex: 0 0 34%; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--taupe); }
.sum-value { flex: 1; font-size: 1.2rem; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.sum-value .sub { display: block; font-size: 1rem; color: var(--bark); font-weight: 400; }
.missing { color: var(--terracotta); font-style: italic; }
.edit { flex: none; }
@media (max-width: 480px) {
  .sum-row { flex-wrap: wrap; }
  .sum-label { flex: 1 0 60%; }
  .edit { order: 2; }
  .sum-value { flex: 1 0 100%; order: 3; }
}

.confirmed { text-align: center; }
.confirmed .big { font-family: 'Luxurious Script', cursive; font-size: 2.6rem; color: var(--terracotta); line-height: 1.1; margin: 0 0 6px; }
.copyrow { display: flex; gap: 8px; margin: 10px 0 6px; }
.copyrow input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 8px 12px; border: 1.5px solid var(--sand); border-radius: 10px; background: var(--cream); color: var(--bark); }

.mine-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--linen); }
.mine-row:first-of-type { border-top: none; }
.mine-row strong { display: block; font-size: 1.25rem; }

/* Extra options on the first page */
.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 8px; }
.extra-card {
  font: inherit; text-align: left; cursor: pointer; color: var(--espresso);
  background: var(--linen); border: 1.5px solid var(--sand); border-radius: var(--radius);
  padding: 16px; transition: border-color .2s, background .2s; -webkit-tap-highlight-color: transparent;
}
.extra-card:hover { border-color: var(--terracotta); background: #F3E9DC; }
.extra-title { display: block; font-family: 'Luxurious Script', cursive; font-size: 2.375rem; line-height: 1.1; color: var(--terracotta-d); margin-bottom: 4px; }
.extra-text { display: block; font-size: 1.25rem; line-height: 1.35; color: var(--bark); }
@media (max-width: 420px) { .extras { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--espresso); color: var(--linen); padding: 28px 18px calc(28px + env(safe-area-inset-bottom)); margin-top: 24px; }
.footer-inner { max-width: 680px; margin: 0 auto; display: flex; gap: 20px; align-items: center; }
.map-thumb { flex: 0 0 132px; border-radius: 12px; overflow: hidden; border: 2px solid rgba(255, 255, 255, .15); }
.map-thumb img { width: 100%; height: 110px; object-fit: cover; }
.footer-text { font-size: 1.05rem; line-height: 1.5; }
.footer-text .venue { font-weight: 600; font-size: 1.2rem; color: #fff; }
.footer-text a { color: var(--sand); text-underline-offset: 3px; }
.footer-text .when { color: var(--gold); font-weight: 600; margin-top: 4px; }
@media (max-width: 420px) {
  .footer-inner { flex-direction: column; text-align: center; gap: 14px; }
  .map-thumb { flex: none; width: 100%; max-width: 320px; }
}

/* Toast */
.toast {
  position: fixed; left: 50%; top: 16px; z-index: 50; transform: translate(-50%, -140%);
  background: var(--espresso); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 1.05rem; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .35s;
  visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }

.loading { text-align: center; padding: 60px 0; color: var(--taupe); font-style: italic; }
