:root {
  color-scheme: light;
  --ink: #2e2a27;
  --muted: #746c65;
  --paper: #fffdf9;
  --soft: #f4eee8;
  --line: #e4d8cc;
  --accent: #8d4f5b;
  --accent-dark: #67343e;
  --green: #4f735f;
  --shadow: 0 12px 30px rgb(57 42 32 / 10%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--accent-dark);
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 750;
  text-decoration: none;
  color: var(--ink);
}

nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
}

.hero {
  min-height: 68vh;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 28px;
  align-items: center;
  padding: 42px 0 56px;
}

.hero h1,
h1 {
  font-size: clamp(2.1rem, 8vw, 5.2rem);
  line-height: 1;
  margin: 0 0 18px;
}

h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.eyebrow {
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.2rem;
}

.hero-card,
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  gap: 8px;
  padding: 24px;
}

.hero-card span {
  margin-bottom: 14px;
  color: var(--muted);
}

section {
  margin: 34px 0;
}

.section-grid,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}

.card {
  padding: 22px;
}

.narrow {
  width: min(680px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.muted {
  color: var(--muted);
}

.notice {
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--soft);
  font-weight: 650;
}

.button,
button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.small {
  min-height: 40px;
  padding: 9px 13px;
}

.button.full {
  width: 100%;
}

.button-row,
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.stack {
  flex-direction: column;
  align-items: stretch;
}

.link-button {
  min-height: auto;
  border: 0;
  padding: 12px 0 0;
  background: transparent;
  color: var(--accent-dark);
  text-decoration: underline;
}

.timeline {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--green);
  background: var(--soft);
  border-radius: 8px;
}

.seating-help {
  margin-bottom: 16px;
  color: var(--muted);
}

.room-scroll {
  overflow-x: auto;
  padding: 0 0 12px;
}

.room-map {
  min-width: 960px;
  min-height: 1040px;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows), minmax(54px, auto));
  gap: 10px;
  padding: 16px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fbf8f3;
}

.room-item {
  grid-column: var(--x) / span var(--w);
  grid-row: var(--y) / span var(--h);
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 54px;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 18px rgb(57 42 32 / 8%);
}

.room-item h2 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.15;
}

.entrance {
  place-items: center;
  border-style: dashed;
  background: #eef4ef;
  color: var(--green);
}

.stage {
  place-items: center;
  background: var(--accent-dark);
  color: #fff;
}

.dance-floor {
  place-items: center;
  border-style: dashed;
  background: #fff8df;
  color: #6f5a21;
}

.table {
  background: #fff;
}

.head-table {
  border-color: var(--accent);
  background: #fff8f8;
}

.branch-table {
  border-color: #d8c7b4;
}

.seat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seat {
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.seat.is-current-family {
  border-color: var(--accent);
  background: #f9e5e8;
  box-shadow: 0 0 0 2px rgb(141 79 91 / 18%);
}

.seat-name,
.seat-note {
  display: block;
}

.seat-name {
  font-weight: 750;
  line-height: 1.2;
}

.seat-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.photo-strip,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.photo-strip img,
.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
}

.form {
  display: grid;
  gap: 14px;
}

label,
legend {
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 6px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 500;
}

.choice input {
  width: 20px;
  min-height: 20px;
}

.details {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 14px;
}

.details dt {
  color: var(--muted);
  font-weight: 700;
}

.details dd {
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stat strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 0.95rem;
}

.admin-list {
  display: grid;
  gap: 14px;
}

.admin-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.admin-card h2 {
  margin-bottom: 2px;
}

.status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 750;
}

.status.ok {
  background: #dcebdd;
  color: #244d30;
}

.status.pending {
  background: #f7e2df;
  color: #7b2727;
}

.admin-details {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 9px 14px;
  margin: 0;
}

.admin-details dt {
  color: var(--muted);
  font-weight: 750;
}

.admin-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.link-list,
.guest-list {
  padding-left: 20px;
}

.error {
  color: #9f1f1f;
  font-weight: 700;
}

.success {
  color: var(--green);
  font-weight: 700;
}

.site-footer {
  color: var(--muted);
}

@media (max-width: 760px) {
  main,
  .site-header,
  .site-footer {
    width: min(100% - 24px, 1120px);
  }

  .hero,
  .section-grid,
  .cards-grid,
  .stats-grid,
  .photo-strip,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .room-map {
    min-width: 820px;
    min-height: 960px;
    grid-template-rows: repeat(var(--rows), minmax(48px, auto));
    gap: 8px;
    padding: 10px;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .timeline li,
  .details,
  .admin-details {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-card header {
    display: grid;
  }
}
