@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Jost:wght@300;400;500&display=swap');

:root {
  --ink: #22382c; --ink-soft: #4c5f52; --paper: #f7f4ec; --card: #fffdf7;
  --line: #ddd5c2; --gold: #a8863f; --sage: #7c9480; --yes: #3d6b4a; --no: #9a5a3c;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background: radial-gradient(1200px 600px at 50% -10%, #efe9da 0%, transparent 60%), var(--paper);
  font-family: 'Jost', system-ui, sans-serif; font-weight: 300; letter-spacing: 0.01em;
}
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.card { background: var(--card); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(34,56,44,0.10); }
.invite-card { max-width: 560px; width: 100%; padding: 48px 40px; text-align: center; position: relative; }
.invite-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); pointer-events: none; }
.monogram { width: 64px; height: 64px; margin: 0 auto 18px; border: 1px solid var(--yes); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 26px; color: var(--yes); }
.monogram .mono-n { font-size: 0.6em; display: inline-block; margin: 0 2px; }
.eyebrow { font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--sage); margin-bottom: 10px; }
.display { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 40px; line-height: 1.1; margin: 0 0 6px; }
.display-sm { font-size: 28px; }
.rule { width: 56px; height: 1px; background: var(--gold); margin: 18px auto; }
.date { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 18px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-size: 14px; }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, monospace; font-size: 12px; letter-spacing: 0.06em; color: var(--ink-soft); }
.hint { font-size: 12px; color: var(--ink-soft); margin-top: 10px; font-style: italic; }
.error { background: #f6e7dd; border: 1px solid #e0c4ad; color: var(--no); font-size: 13px; padding: 10px 12px; margin: 10px 0; text-align: left; }
.ok-banner { background: #e9efe6; border: 1px solid #c3d4bf; color: var(--yes); font-size: 13px; padding: 10px 12px; margin: 10px 0; }
.loading { padding: 40px; color: var(--ink-soft); font-style: italic; }

.actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.btn { font-family: 'Jost', sans-serif; font-weight: 400; font-size: 14px; letter-spacing: 0.04em;
  padding: 11px 22px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none; display: inline-block; transition: all .15s ease; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: var(--card); }
.btn-primary:hover:not(:disabled) { background: #31513f; border-color: #31513f; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost { border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-wa { background: #1f6b46; border-color: #1f6b46; color: #fff; }
.btn-wa:hover:not(:disabled) { background: #185737; }
.link-btn { background: none; border: none; color: var(--gold); font-size: 13px; cursor: pointer; text-decoration: underline; padding: 6px; font-family: 'Jost', sans-serif; }

.field { text-align: left; margin: 14px 0; }
.field label { display: block; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sage); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); background: #fff;
  font-family: 'Jost', sans-serif; font-size: 15px; color: var(--ink); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }

.event-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.event-row:last-of-type { border-bottom: none; }
.event-name { font-family: 'Cormorant Garamond', serif; font-size: 22px; }
.choice { display: flex; gap: 8px; }
.chip { font-family: 'Jost', sans-serif; font-size: 12.5px; padding: 8px 14px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); cursor: pointer; transition: all .15s ease; }
.chip-yes { background: var(--yes); border-color: var(--yes); color: #fff; }
.chip-no { background: var(--no); border-color: var(--no); color: #fff; }
.reply-summary { margin: 20px 0; border-top: 1px solid var(--line); }
.cal-links { display: flex; flex-direction: column; gap: 8px; align-items: center; margin-top: 8px; }
.cal-btn { width: 100%; max-width: 320px; text-align: center; font-size: 13px; }
.shuttle-row { text-align: left; margin: 16px 0 4px; padding: 12px 14px; background: #f2eee2; border: 1px solid var(--line); }
.shuttle-label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); cursor: pointer; }
.shuttle-label input { margin-top: 3px; }
/* Landscape crossfading montage. Bleeds out to sit just inside the card's
   decorative border (card padding 40px - border inset 10px = 30px each side). */
.slideshow { position: relative; width: calc(100% + 60px); margin: 22px -30px;
  aspect-ratio: 16 / 9; overflow: hidden; background: #efe9da;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.2s ease-in-out; }
.slide-on { opacity: 1; }
.slide-dots { position: absolute; left: 0; right: 0; bottom: 12px;
  display: flex; justify-content: center; gap: 7px; }
.slide-dot { width: 7px; height: 7px; padding: 0; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.6); box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  cursor: pointer; transition: width .25s ease, background .25s ease, border-radius .25s ease; }
.slide-dot:hover { background: #fff; }
.slide-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.slide-dot-on { width: 18px; border-radius: 4px; background: #fff; }
.photo-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.photo-item { position: relative; width: 120px; }
.photo-item img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border: 1px solid var(--line); }
.photo-item .link-btn { display: block; text-align: center; width: 100%; }
.reply-line { display: flex; justify-content: space-between; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.yes { color: var(--yes); }
.no { color: var(--no); }

/* ---------------- guest details page: order of the day ---------------- */
.details-card { max-width: 560px; text-align: left; }
.details-card .monogram { margin-left: auto; margin-right: auto; }
.details-card .eyebrow, .details-card .display, .details-card .date,
.details-card .actions { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.schedule { list-style: none; margin: 18px 0 0; padding: 0; position: relative; }
.schedule::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px;
  width: 1px; background: var(--line); }
.schedule-item { position: relative; padding: 0 0 26px 30px; }
.schedule-item:last-child { padding-bottom: 4px; }
.schedule-item::before { content: ""; position: absolute; left: 3px; top: 7px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--card); border: 1px solid var(--gold); }
.schedule-time { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sage); }
.schedule-name { font-family: 'Cormorant Garamond', serif; font-size: 24px; line-height: 1.2; margin: 2px 0 6px; }
.venue-link { display: inline-flex; align-items: center; gap: 7px; font-size: 15px;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line);
  padding-bottom: 2px; transition: border-color .15s ease; }
.venue-link:hover { border-bottom-color: var(--gold); }
.venue-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.venue-plain { border-bottom: none; color: var(--ink-soft); }
.map-pin { width: 17px; height: 17px; flex: none; display: block; }
.venue-address { font-size: 13px; color: var(--ink-soft); margin-top: 5px; }
.venue-note { font-size: 13px; color: var(--ink-soft); font-style: italic; margin-top: 5px; }
.schedule-tag { margin-top: 8px; }
.schedule-cal { display: inline-block; width: auto; max-width: none; margin: 10px 8px 0 0; padding: 6px 12px; font-size: 12px; }

.faq { margin-top: 14px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; padding: 14px 26px 14px 0; position: relative;
  font-size: 15px; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 12px;
  font-size: 18px; color: var(--gold); line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.faq-answer { padding: 0 4px 16px 0; font-size: 14px; line-height: 1.65; color: var(--ink-soft); }

/* admin: FAQ + schedule editors */
.faq-editor { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.edit-row { border: 1px solid var(--line); background: #fdfbf4; padding: 12px 14px; }
.edit-row-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.edit-row-head .cell { min-width: 0; }
.edit-row .field { margin: 8px 0 0; }
.faq-move { background: none; border: 1px solid var(--line); color: var(--ink-soft);
  cursor: pointer; padding: 3px 9px; font-size: 13px; line-height: 1.2; font-family: 'Jost', sans-serif; }
.faq-move:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.faq-move:disabled { opacity: 0.3; cursor: not-allowed; }
.sched-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.sched-grid .field { margin: 0; }

/* admin */
.admin { max-width: 1120px; margin: 0 auto; padding: 28px 20px 80px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 16px; cursor: pointer;
  font-family: 'Jost', sans-serif; font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.tab-active { color: var(--ink); border-bottom-color: var(--gold); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.panel { background: var(--card); border: 1px solid var(--line); padding: 20px 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.panel-title { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 22px; margin: 0 0 8px; }
.empty { padding: 32px; text-align: center; color: var(--ink-soft); background: var(--card); border: 1px dashed var(--line); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); padding: 18px; text-align: center; }
.stat-value { font-family: 'Cormorant Garamond', serif; font-size: 36px; line-height: 1; }
.stat-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sage); margin-top: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid #ece5d3; }
.td-center { text-align: center; }
.table-scroll { overflow-x: auto; margin-top: 10px; }
.cell { border: 1px solid transparent; background: transparent; padding: 6px 8px; font-family: 'Jost', sans-serif; font-size: 14px; color: var(--ink); width: 100%; min-width: 120px; }
.cell:hover { border-color: var(--line); background: #fff; }
.cell:focus { outline: none; border-color: var(--gold); background: #fff; }
.cell-xs { min-width: 44px; width: 44px; text-align: center; }
.cell-sm { min-width: 90px; width: auto; }
.link-cell { min-width: 220px; font-size: 12px; cursor: text; }
.link-cell:hover, .link-cell:focus { border-color: var(--gold); background: #fff; }
.badge { font-size: 11px; letter-spacing: 0.08em; padding: 3px 8px; border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.badge-yes { border-color: var(--yes); color: var(--yes); }
.badge-no { border-color: var(--no); color: var(--no); }

.send-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #ece5d3; flex-wrap: wrap; }
.send-row:last-child { border-bottom: none; }
.side-row { display: flex; gap: 32px; font-size: 15px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--card); padding: 10px 18px; font-size: 13.5px; z-index: 50;
  box-shadow: 0 8px 24px rgba(34,56,44,0.25); }

.channel-pill { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--line); }
.channel-on { border-color: var(--yes); color: var(--yes); }
.channel-off { border-color: var(--no); color: var(--no); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 560px) {
  .invite-card { padding: 36px 22px; }
  .slideshow { width: calc(100% + 24px); margin: 18px -12px; aspect-ratio: 3 / 2; }
  .display { font-size: 32px; }
  .event-row { flex-direction: column; align-items: flex-start; }
}
