/* Wedding invitation — public + admin styles */
:root {
  --ink: #2b2b2b;
  --muted: #7a766c;
  --paper: #faf7f0;
  --card: #ffffff;
  --line: #e6e0d4;
  --accent: #2f4a3c;
  --accent-soft: #eef2ec;
  --blush: #b98a7c;
  --danger: #a13a2c;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

.page { max-width: 820px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.section-narrow { max-width: 620px; }

/* Header / nav */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.site-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--accent); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem 0.7rem; cursor: pointer; }

/* Hero */
.hero { text-align: center; padding: 3.5rem 0 2rem; }
.hero-names {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  margin: 0 0 0.75rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.hero-tagline { font-size: 1.15rem; color: var(--muted); margin: 0 0 0.5rem; }
.hero-date { font-family: var(--serif); font-size: 1.2rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* Countdown */
.countdown { text-align: center; margin: 2rem 0; }
.countdown-grid { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.countdown-cell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 88px;
  padding: 0.9rem 0.6rem;
  box-shadow: var(--shadow);
}
.cd-value { font-size: 2rem; font-weight: 700; color: var(--accent); display: block; font-variant-numeric: tabular-nums; }
.cd-label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* Sections */
.section { margin-top: 2.5rem; }
.section-title, .page-title {
  font-family: var(--serif);
  color: var(--accent);
  letter-spacing: 0.02em;
}
.section-title { text-align: center; margin-bottom: 1.25rem; font-size: 1.6rem; }
.page-title { margin-top: 0; }
.lead { font-size: 1.1rem; }
.prose { font-size: 1.05rem; }
.muted { color: var(--muted); }
.venue-line { text-align: center; margin-top: 1.5rem; }

/* Buttons */
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-top: 1.5rem; }
.admin-main .actions { justify-content: flex-start; }
.btn {
  display: inline-block;
  padding: 0.62rem 1.35rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--accent-soft); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #3a5a4b; }
.btn-small { padding: 0.32rem 0.8rem; font-size: 0.85rem; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: #f9ecea; }
.btn[type="submit"] { font-family: var(--sans); }

/* Cards & forms */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin: 1.25rem 0;
}
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
.fieldset { border: none; padding: 0; margin: 0 0 1rem; }
.fieldset legend { font-weight: 600; margin-bottom: 0.4rem; }
.radio { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; cursor: pointer; }
.radio input { width: auto; }
.honeypot { position: absolute; left: -9999px; }
.form-status { margin-top: 0.8rem; font-weight: 600; }
.form-status.error { color: var(--danger); }
.form-status.ok { color: var(--accent); }
.rsvp-guest { font-size: 1.15rem; margin-top: 0; }
.pin-form { max-width: 420px; margin: 2rem auto; }

/* FAQ */
.faq-item { margin-bottom: 0.5rem; border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 0.5rem 0; font-size: 1.05rem; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { display: flex; gap: 1.25rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.timeline-time { flex: 0 0 6.5rem; font-family: var(--serif); font-size: 1.05rem; color: var(--accent); }
.timeline-title { margin: 0 0 0.15rem; }

/* Registry */
.registry-list { list-style: none; margin: 0; padding: 0; }
.registry-item { padding: 1rem 0; border-bottom: 1px solid var(--line); }

/* Guestbook */
.guestbook-list { list-style: none; margin: 2rem 0 0; padding: 0; }
.guestbook-entry { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 0.75rem; }
.guestbook-message { margin: 0 0 0.25rem; font-size: 1.05rem; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--accent);
  margin-top: 2rem;
}
.site-footer .muted { font-size: 0.9rem; }

/* Check-in */
.checkin-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.checkin-top h1 { margin: 0; }
.checkin-search input { width: 100%; font-size: 1.15rem; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 10px; }
.checkin-results { list-style: none; margin: 1rem 0 0; padding: 0; }
.checkin-guest {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}
.checkin-guest h3 { margin: 0 0 0.25rem; }
.checkin-guest .tag { display: inline-block; font-size: 0.85rem; padding: 0.15rem 0.6rem; border-radius: 999px; margin-right: 0.4rem; }
.tag-yes { background: var(--accent-soft); color: var(--accent); }
.tag-no { background: #f9ecea; color: var(--danger); }
.tag-missing { background: #f3efe3; color: var(--muted); }
.tag-arrived { background: #e3efe6; color: var(--accent); font-weight: 700; }
.checkin-form { margin-top: 0.75rem; display: grid; gap: 0.6rem; grid-template-columns: auto 1fr auto; align-items: end; }
.checkin-form .field { margin: 0; }
.checkin-form .field select, .checkin-form .field input { width: auto; }

/* Admin */
.admin-body { background: #f4f1e9; }
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidenav {
  background: var(--accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
}
.admin-sidenav .brand { color: #fff; display: block; margin-bottom: 1.5rem; }
.admin-sidenav nav { display: flex; flex-direction: column; gap: 0.15rem; }
.admin-sidenav nav a {
  color: #e7eee9;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.98rem;
}
.admin-sidenav nav a:hover, .admin-sidenav nav a.active { background: rgba(255, 255, 255, 0.12); }
.admin-sidenav-footer { margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.admin-sidenav-footer a { color: #cfe0d4; font-size: 0.9rem; text-decoration: none; }
.admin-main { padding: 2rem 2.5rem; overflow-x: auto; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; text-align: center; box-shadow: var(--shadow); }
.stat-value { display: block; font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { color: var(--muted); font-size: 0.85rem; }

.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); font-size: 0.95rem; vertical-align: top; }
.table th { background: var(--accent-soft); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.table tr:last-child td { border-bottom: none; }
.link-cell { min-width: 260px; }
.link-input { width: 100%; font-size: 0.72rem; padding: 0.35rem 0.5rem; border: 1px dashed var(--line); border-radius: 6px; background: #fcfbf7; margin-bottom: 0.3rem; }
.copy-btn { margin-top: 0.2rem; }
.actions-col { white-space: nowrap; color: var(--muted); font-size: 0.8rem; }
.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.inline-form input { padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; }
.edit-details { margin-top: 0.4rem; }
.edit-details summary { cursor: pointer; font-size: 0.85rem; color: var(--accent); }
.edit-details .inline-form, .edit-details form { margin-top: 0.5rem; }
.note-cell { max-width: 320px; }
.filter-nav { display: flex; gap: 0.5rem; margin: 1rem 0; flex-wrap: wrap; }
.filter-nav a { text-decoration: none; padding: 0.35rem 0.9rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--card); font-size: 0.9rem; }
.filter-nav a.active, .filter-nav a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Print list */
.print-body { background: #fff; padding: 1.5rem; }
.print-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--accent); padding-bottom: 0.75rem; margin-bottom: 1rem; }
.print-table { width: 100%; border-collapse: collapse; }
.print-table th, .print-table td { border: 1px solid #ccc; padding: 0.5rem 0.6rem; text-align: left; font-size: 0.92rem; }
.checkbox-col { width: 1.5rem; }
.check-box { display: inline-block; width: 1rem; height: 1rem; border: 1px solid #888; }

/* Responsive */
@media (max-width: 720px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidenav { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
  .admin-sidenav .brand { margin: 0 0.5rem 0 0; }
  .admin-sidenav nav { flex-direction: row; flex-wrap: wrap; }
  .admin-sidenav nav a { padding: 0.35rem 0.6rem; }
  .admin-sidenav-footer { margin: 0 0 0 auto; flex-direction: row; }
  .admin-main { padding: 1.25rem; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .checkin-form { grid-template-columns: 1fr; }
}

/* Single-page invitation */
body.locked { overflow: hidden; height: 100vh; }

.cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem;
  background: linear-gradient(160deg, #f5f1e8, #e7ddca);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.cover.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.cover-inner { max-width: 620px; }
.cover-kicker {
  font-family: var(--serif);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0 0 0.5rem;
}
.cover-names {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 9vw, 4.6rem);
  color: var(--accent);
  margin: 0.2rem 0 0.5rem;
  letter-spacing: 0.02em;
}
.cover-date { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.92rem; margin: 0; }
.cover-wording { white-space: pre-line; margin: 1.6rem 0; font-size: 1.05rem; }
.cover-guest { font-size: 1.1rem; margin: 0 0 1.6rem; }
.cover-open { padding: 0.8rem 2.2rem; font-size: 1rem; }

.music-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 500;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--card);
  color: var(--accent);
  font-size: 1.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.music-toggle.playing { background: var(--accent); color: #fff; animation: music-pulse 1.6s infinite; }
.music-icon { line-height: 1; }
@keyframes music-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 74, 60, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(47, 74, 60, 0); }
}

.hero-kicker {
  font-family: var(--serif);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0 0 0.4rem;
}
.venue-name { font-family: var(--serif); color: var(--accent); margin: 0.2rem 0 0.5rem; }
.footer-names { font-family: var(--serif); font-size: 1.25rem; color: var(--accent); margin: 0; }

.bank-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.bank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}
.bank-info { display: flex; flex-direction: column; gap: 0.1rem; }
.bank-name { font-weight: 600; }
.bank-account { font-family: var(--serif); font-size: 1.45rem; letter-spacing: 0.06em; color: var(--accent); }
.bank-holder { color: var(--muted); font-size: 0.88rem; }

section[id], .hero[id] { scroll-margin-top: 84px; }
.section-rsvp { padding-bottom: 3rem; }

/* Admin content editor */
.content-form { max-width: 760px; }
.content-heading { margin-top: 2.75rem; color: var(--accent); font-family: var(--serif); }
.content-form .field label .muted { font-weight: 400; font-size: 0.85rem; }
code { background: var(--accent-soft); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.85rem; }