:root {
  --ink: #1a1612;
  --paper: #f3eadc;
  --muted: #6d6458;
  --accent: #c45a4e;
  --moss: #3d4a38;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: Outfit, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { cursor: pointer; }

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(26 22 18 / 0.2), rgb(26 22 18 / 0.7));
}

.wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
}

.card {
  width: 100%;
  max-width: 980px;
  display: grid;
  overflow: hidden;
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 64px rgb(10 8 6 / 0.45);
}

@media (min-width: 800px) {
  .card { grid-template-columns: 0.92fr 1.08fr; }
}

.photo { position: relative; min-height: 320px; }
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.body {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.num {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 72px;
  line-height: 1;
  color: var(--accent);
  font-weight: 500;
}

h1 {
  margin: 12px 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 32px;
  font-weight: 500;
}

.lead {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 28rem;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.facts li,
.facts a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgb(26 22 18 / 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.lbl {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.val {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.hr {
  height: 1px;
  background: rgb(26 22 18 / 0.1);
  border: 0;
  margin: 0;
}

.guest-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}
.guest-head h2 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  font-family: Outfit, sans-serif;
}
.meta { font-size: 12px; color: var(--muted); margin: 0; }

.guests {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.guests li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgb(26 22 18 / 0.04);
  border-radius: 12px;
  padding: 12px;
}
@media (min-width: 640px) {
  .guests li {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.guests p { margin: 0; font-size: 14px; font-weight: 500; }

.btns { display: flex; gap: 8px; }

.chip {
  appearance: none;
  border: 0;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgb(26 22 18 / 0.15);
}
.chip:hover { background: rgb(26 22 18 / 0.05); }
.chip.on-yes { background: var(--moss); color: var(--paper); box-shadow: none; }
.chip.on-no { background: var(--ink); color: var(--paper); box-shadow: none; }
.chip:disabled { opacity: 0.5; }

.flash {
  background: rgb(61 74 56 / 0.12);
  color: var(--moss);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin: 0;
}
.flash[hidden] { display: none; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ghost {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.ghost:hover { color: var(--ink); background: rgb(26 22 18 / 0.05); }

.admin-page { background: var(--ink); min-height: 100vh; }
.admin-wrap { max-width: 820px; margin: 0 auto; padding: 40px 20px; }
.admin-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 20px;
  padding: 28px;
}
.admin-card h1 {
  font-family: Fraunces, Georgia, serif;
  margin: 0 0 8px;
  font-size: 28px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.stat {
  background: rgb(26 22 18 / 0.04);
  border-radius: 12px;
  padding: 14px;
}
.stat b {
  display: block;
  font-size: 28px;
  font-family: Fraunces, Georgia, serif;
  color: var(--accent);
}
.stat span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid rgb(26 22 18 / 0.08);
  font-size: 14px;
  vertical-align: middle;
}
th {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: rgb(26 22 18 / 0.05);
  padding: 0 12px;
  font: inherit;
  margin: 6px 0 14px;
  box-shadow: inset 0 0 0 1px rgb(26 22 18 / 0.1);
}

.btn {
  appearance: none;
  border: 0;
  height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #f8f1e6;
  font: inherit;
  font-weight: 500;
}

.err { color: var(--accent); font-size: 13px; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.topbar a { color: var(--paper); opacity: 0.8; text-decoration: none; }
.admin-page .ghost { color: var(--paper); }
