:root {
  color-scheme: light;
  --ink: #21352e;
  --muted: #50635b;
  --green: #2c4c40;
  --green-dark: #203d33;
  --line: #d9e1db;
  --paper: #f7f8f5;
  --white: #fff;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
h1, h2, p { margin: 0 0 1rem; }
h1, h2 { line-height: 1.15; }
h1 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
h2 { font-size: 1.12rem; font-weight: 650; }
a { color: var(--green-dark); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 3px solid #6f9180; outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button {
  border: 1px solid transparent;
  border-radius: .55rem;
  cursor: pointer;
  min-height: 2.75rem;
  padding: .58rem .95rem;
  font-weight: 600;
}
.primary { color: var(--white); background: var(--green); }
.primary:hover { background: var(--green-dark); }
.secondary { color: var(--green-dark); background: transparent; border-color: #a6b8ac; }
.secondary:hover { background: #e9f0e9; }
.quiet { color: var(--green-dark); background: transparent; }
.quiet:hover { background: #edf2ec; }
.danger { color: #8b2d2b; border-color: #d9aaa5; background: #fff7f6; }
.danger:hover { background: #fbe6e3; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.admin-theme { background: var(--paper); }
.topbar { border-bottom: 1px solid var(--line); background: var(--white); }
.topbar-inner {
  max-width: 73rem;
  margin: auto;
  padding: .6rem clamp(1rem, 4vw, 2.4rem);
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.brand { font-family: var(--serif); font-size: 1.25rem; text-decoration: none; }
.dashboard, .narrow { margin: auto; padding: 2.1rem clamp(1rem, 4vw, 2.4rem) 3rem; }
.dashboard { max-width: 73rem; }
.narrow { max-width: 36rem; }
.stats, .tools { display: grid; gap: .85rem; margin: 0 0 1rem; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats > div, .panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: clamp(1rem, 2.5vw, 1.4rem);
}
.stats > div:last-child { background: #e8efe8; border-color: #c7d6c9; }
.stats dt { font-weight: 650; }
.stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 2.55rem;
  line-height: 1.2;
  font-variant-numeric: lining-nums tabular-nums;
}
.stats small { color: var(--muted); }
.stats-extra { font-family: var(--sans); font-size: .85rem; color: var(--muted); white-space: nowrap; }
.stack { display: grid; gap: .85rem; }
.stack p { margin: 0; }
.stack label { display: grid; gap: .35rem; font-weight: 550; }
.stack .check { display: flex; gap: .5rem; align-items: center; }
input:not([type=checkbox], [type=hidden]), select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: .55rem .7rem;
  border: 1px solid #a6b8ac;
  border-radius: .5rem;
  color: var(--ink);
  background: var(--white);
}
textarea { resize: vertical; }
input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--green); }
input[type=file]::file-selector-button {
  border: 0;
  border-radius: .3rem;
  background: #e9f0e9;
  padding: .2rem .5rem;
  margin-right: .5rem;
  font: inherit;
  cursor: pointer;
}
.actions, .row-actions { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.notice { padding: .7rem .9rem; border-radius: .55rem; background: #e8efe8; }
.notice.error { background: #fff0ed; color: #812e29; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: .75rem .6rem; text-align: left; border-bottom: 1px solid var(--line); }
thead th { background: #f2f5f0; white-space: nowrap; }
tbody th { font-weight: 550; overflow-wrap: anywhere; }
.guest-comment { display: block; white-space: pre-wrap; font-weight: 400; }
tbody tr:last-child > * { border-bottom: 0; }
.response { display: inline-block; white-space: nowrap; background: #eef0ed; border-radius: 2rem; padding: .2rem .6rem; }
.response.yes, .response.yes_plus_one { background: #e5f0e8; color: #234d36; }
.response.no { background: #f8eeeb; color: #793c35; }
.revoked { display: block; }
.small { min-height: 2.2rem; padding: .32rem .6rem; font-size: .875rem; }
.row-actions { min-width: 12rem; }
.back { display: inline-block; margin-bottom: 1rem; }
.delete-panel { margin-top: 1rem; }
.settings-panel { margin-bottom: 1rem; }
.settings-panel summary { cursor: pointer; font-weight: 650; }
.settings-panel[open] summary { margin-bottom: .8rem; }
.settings-panel input[type=date] { max-width: 16rem; }
.delete-panel summary { cursor: pointer; font-weight: 650; color: #8b2d2b; }
.delete-panel[open] summary { margin-bottom: .8rem; }

.invitation-theme {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(.85rem, 5vw, 3rem);
  background: radial-gradient(ellipse at top left, #f4eadd 0%, transparent 60%), #e8eee6;
}
.invitation {
  width: min(100%, 38rem);
  padding: .55rem;
  background: #fffcf6;
  border: 1px solid #c7c8ad;
  box-shadow: 0 1.2rem 4rem #23372c15;
  text-align: center;
}
.invitation-inner { border: 1px solid #d8d9c3; padding: clamp(1.45rem, 5vw, 3.3rem); }
.invitation-label { font-size: .74rem; letter-spacing: .17em; text-transform: uppercase; font-weight: 650; color: var(--muted); }
.couple { font-family: var(--serif); font-size: clamp(1.5rem, 5vw, 2.2rem); margin-bottom: 0; }
.ornament { color: #758462; margin: .45rem auto 1rem; font-size: 1.4rem; }
.invitation h1 { overflow-wrap: anywhere; }
.invitation-copy { font-family: var(--serif); font-size: clamp(1.12rem, 3vw, 1.35rem); }
.event-details { white-space: pre-line; color: var(--muted); }
.venue-address { overflow-wrap: anywhere; color: var(--muted); }
.map-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  border: 1px solid #a6b8ac;
  border-radius: .55rem;
  padding: .55rem .9rem;
  font-weight: 600;
  text-decoration: none;
}
.rsvp { border-top: 1px solid #d8d9c3; padding-top: 1.35rem; margin-top: 1.55rem; }
.rsvp-actions { display: grid; gap: .62rem; }
.rsvp-actions button { width: 100%; }
.saved { color: var(--green-dark); font-size: .93rem; }
@media (max-width: 680px) {
  .tools { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
  .stats > div { padding: .62rem; }
  .stats dt, .stats small { font-size: .76rem; }
  .stats dd { font-size: 2rem; }
  .row-actions { min-width: 8.5rem; }
}
