@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-latin-wght-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Pinyon Script";
  src: url("fonts/pinyon-script-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("fonts/jost-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ivory: #f8f3ea;
  --paper: #fffdf8;
  --emerald: #134e3e;
  --emerald-2: #1d6b55;
  --emerald-tint: #e2efe9;
  --gold: #b38d3e;
  --gold-light: #e0c47c;
  --gold-tint: #f7eedb;
  --blush: #f1d9cf;
  --rose: #b05a4f;
  --ink: #1d2a26;
  --muted: #66706b;
  --line: #e7dccb;
  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(70% 50% at 0% 0%, #f6e3da 0%, transparent 70%),
    radial-gradient(60% 50% at 100% 100%, #e5efe9 0%, transparent 70%),
    var(--ivory);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Demo bar */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 14px; padding: 2px 14px; background: var(--emerald); color: #fbf3e4; font-size: 14px; }
.demo-bar__note { margin: 0; display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.demo-bar__note strong { padding: 0 10px; border-radius: 999px; background: var(--gold-light); color: var(--emerald); font-weight: 600; letter-spacing: 0.04em; }
.demo-bar__actions { display: flex; gap: 4px; margin-left: auto; }
.demo-bar__reset, .demo-bar__made { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border: 0; background: none; color: #fbf3e4; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.demo-bar__made { color: var(--gold-light); }

.shell { max-width: 1120px; margin: 0 auto; padding: 18px 14px 48px; }

/* Tabs */
.tabs { display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 0 auto 20px; padding: 4px; border-radius: 999px; background: rgb(255 253 248 / 0.8); box-shadow: inset 0 0 0 1px var(--line); }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: none; font-weight: 500; color: var(--muted); }
.tab--on { background: var(--emerald); color: #fff; }

/* Invitation */
.invite-layout { display: grid; gap: 18px; }
.invitation {
  position: relative;
  padding: 44px 24px 34px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--gold-light);
  box-shadow: inset 0 0 0 7px var(--paper), inset 0 0 0 8px var(--gold-light), 0 30px 60px -40px rgb(19 78 62 / 0.55);
}
.corner { position: absolute; width: 34px; height: 34px; border-color: var(--gold); border-style: solid; border-width: 0; }
.corner--tl { top: 16px; left: 16px; border-top-width: 2px; border-left-width: 2px; }
.corner--tr { top: 16px; right: 16px; border-top-width: 2px; border-right-width: 2px; }
.corner--bl { bottom: 16px; left: 16px; border-bottom-width: 2px; border-left-width: 2px; }
.corner--br { bottom: 16px; right: 16px; border-bottom-width: 2px; border-right-width: 2px; }
.invitation__pre { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.invitation h1 { margin: 6px 0 0; display: grid; font-weight: 400; line-height: 1; }
.script { font-family: "Pinyon Script", "Snell Roundhand", cursive; font-size: clamp(84px, 24vw, 140px); line-height: 1.05; color: var(--emerald); }
.invitation__age { margin-top: -6px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(30px, 8vw, 44px); color: var(--ink); }
.rule { display: flex; align-items: center; justify-content: center; margin: 22px auto; width: 70%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.rule span { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }
.invitation__date { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; font-variant-numeric: lining-nums; }
.invitation__time { margin: 2px 0 12px; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); }
.invitation__venue { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.invitation__venue .icon { color: var(--gold); }
.invitation__what { margin: 14px 0 0; font-family: var(--serif); font-size: 21px; }
.invitation__note { max-width: 32ch; margin: 8px auto 0; color: var(--muted); }
.invitation__count { display: inline-block; margin: 20px 0 0; padding: 6px 14px; border-radius: 999px; background: var(--emerald-tint); color: var(--emerald); font-size: 14px; font-weight: 500; }

.invite-side { display: grid; gap: 18px; align-content: start; }
.panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.panel h2 { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; }
.panel__sub { margin: -2px 0 12px; color: var(--muted); font-size: 15px; }

.day { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.day li { display: grid; grid-template-columns: 44px 22px 1fr; align-items: baseline; column-gap: 10px; }
.day li span { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--gold); }
.day li .icon { color: var(--emerald); align-self: center; }
.day li small { grid-column: 3; color: var(--muted); }
.day__dress { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }

/* RSVP form */
.rsvp { display: grid; gap: 14px; }
.rsvp h2 { margin: 0; }
.rsvp__by { margin: -8px 0 0; color: var(--muted); }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field__label { padding: 0; font-weight: 600; font-size: 14px; letter-spacing: 0.02em; }
.field input[type="text"], .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #d9ccb7; border-radius: 12px; background: #fff; font-size: 16px; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgb(19 78 62 / 0.14); }
.answers { display: grid; gap: 8px; }
.answer { position: relative; }
.answer input, .chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.answer span { display: flex; align-items: center; min-height: 50px; padding: 0 16px; border: 1px solid #d9ccb7; border-radius: 14px; background: #fff; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.answer--yes input:checked + span { border-color: var(--emerald); background: var(--emerald); color: #fff; }
.answer--maybe input:checked + span { border-color: var(--gold); background: var(--gold-tint); color: #7a5a17; }
.answer--no input:checked + span { border-color: var(--rose); background: var(--blush); color: var(--rose); }
.answer input:focus-visible + span, .chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; width: max-content; border: 1px solid #d9ccb7; border-radius: 999px; background: #fff; }
.stepper button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--emerald-tint); color: var(--emerald); }
.stepper output { min-width: 44px; text-align: center; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid #d9ccb7; border-radius: 999px; background: #fff; font-size: 15px; }
.chip input:checked + span { border-color: var(--emerald); background: var(--emerald-tint); color: var(--emerald); font-weight: 600; }
.form__problem { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--blush); color: var(--rose); font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; font-weight: 600; font-size: 16px; letter-spacing: 0.02em; transition: transform 0.1s ease, background 0.2s ease; }
.btn:active { transform: translateY(1px); }
.btn--emerald { background: var(--emerald); color: #fff; }
.btn--emerald:hover { background: var(--emerald-2); }
.btn--line { border-color: var(--emerald); background: transparent; color: var(--emerald); }

.thanks { text-align: center; }
.thanks__icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 50%; background: var(--gold-tint); color: var(--gold); }
.thanks__icon .icon { width: 28px; height: 28px; }
.thanks p { margin: 0 0 8px; }
.thanks__note { color: var(--muted); }

/* Host view */
.host { display: grid; gap: 18px; }
.host__note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--gold-tint); color: #7a5a17; font-weight: 500; }
.stats h2 { font-size: 40px; font-variant-numeric: lining-nums; }
.stats__bar { display: flex; height: 16px; margin: 4px 0 14px; border-radius: 999px; overflow: hidden; gap: 2px; }
.seg--yes { background: var(--emerald); }
.seg--maybe { background: var(--gold-light); }
.seg--no { background: #d7a59b; }
.seg--none { background: #e4ddd2; }
.stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.stat { padding: 10px 12px; border-radius: 14px; background: #f7f2e9; }
.stat dt { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.stat dd { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1; font-variant-numeric: lining-nums; }
.stat--yes dd { color: var(--emerald); }
.stat--maybe dd { color: var(--gold); }
.stat--no dd { color: var(--rose); }
.stats__total { margin: 12px 0; color: var(--muted); }
.host__grid { display: grid; gap: 18px; }
.food__total { margin: 0 0 10px; font-family: var(--serif); font-size: 24px; }
.food__total strong { font-size: 40px; color: var(--emerald); font-variant-numeric: lining-nums; }
.food, .songs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.food li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: #f7f2e9; }
.food li strong { font-family: var(--serif); font-size: 20px; }
.songs li { display: flex; align-items: center; gap: 10px; }
.songs li .icon { color: var(--gold); }
.songs li span { flex: 1; font-family: var(--serif); font-size: 20px; font-style: italic; }
.songs li strong { color: var(--emerald); }
.jar { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: 12px; }
.jar li { break-inside: avoid; margin: 0 0 12px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(170deg, #fff, #fbf3ea); border: 1px solid var(--line); }
.jar li p { margin: 0 0 8px; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; }
.jar li span { font-size: 13px; font-weight: 600; color: var(--gold); }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; min-height: 44px; padding: 0 14px; border: 1px solid #d9ccb7; border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; }
.chip-btn--on { border-color: var(--emerald); background: var(--emerald); color: #fff; }
.replies { list-style: none; margin: 8px 0 0; padding: 0; display: grid; }
.replies li { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.replies li:last-child { border-bottom: 0; }
.replies__name { display: grid; flex: 1; min-width: 0; }
.replies__name small { color: var(--muted); font-size: 13px; }
.replies__size { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--emerald-tint); color: var(--emerald); font-weight: 700; font-size: 14px; }
.pill { flex: none; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill--yes { background: var(--emerald-tint); color: var(--emerald); }
.pill--maybe { background: var(--gold-tint); color: #7a5a17; }
.pill--no { background: var(--blush); color: var(--rose); }
.pill--none { background: #efe9df; color: var(--muted); }

/* Make your own */
.own { margin-top: 30px; padding: 22px; border: 1px dashed var(--gold); border-radius: 20px; background: rgb(255 253 248 / 0.7); }
.own__label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.own__words { margin: 8px 0; font-family: var(--serif); font-size: 24px; font-style: italic; line-height: 1.3; }
.own__note { margin: 0; font-size: 14px; color: var(--muted); }

/* Dialog */
.dialog { width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--gold-light); border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 70px -24px rgb(19 78 62 / 0.5); }
.dialog::backdrop { background: rgb(19 78 62 / 0.45); }
.dialog__body { padding: 20px 20px 22px; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dialog__title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 28px; }
.dialog__close { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 50%; background: #fff; }
.dialog__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mail { display: grid; gap: 14px; }
.mail__head { margin: 0; display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: #f7f2e9; font-size: 14px; }
.mail__head div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.mail__head dt { color: var(--muted); }
.mail__head dd { margin: 0; font-weight: 600; }
.mail__body p { margin: 0 0 10px; }
.mail__demo { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }

.toast-region { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 20; display: grid; justify-items: center; pointer-events: none; }
.toast { margin: 0 16px; padding: 12px 20px; border-radius: 999px; background: var(--emerald); color: #fff; font-weight: 500; box-shadow: 0 16px 30px -14px rgb(19 78 62 / 0.8); animation: toast-in 0.25s ease; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

@media (min-width: 640px) {
  .answers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .answer span { justify-content: center; text-align: center; font-size: 19px; }
  .jar { columns: 2; }
  .host__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 980px) {
  .shell { padding: 28px 28px 64px; }
  .invite-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .invitation { position: sticky; top: 20px; padding: 64px 40px 48px; }
  .jar { columns: 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
