:root {
  --ivory: #fffaf3;
  --ivory-deep: #f6efe5;
  --rose: #b9787d;
  --rose-deep: #8f5157;
  --blush: #ead2ce;
  --sage: #8d9b87;
  --sage-deep: #5d6f5a;
  --ink: #3e3530;
  --muted: #756962;
  --line: rgba(104, 86, 78, 0.18);
  --shadow: 0 24px 70px rgba(89, 68, 55, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(185, 120, 125, 0.08), rgba(141, 155, 135, 0.12)),
    var(--ivory);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  opacity: 0;
  transition: opacity 450ms ease;
}

body.is-ready {
  opacity: 1;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px 18px;
}

.hero-page {
  display: grid;
  min-height: 100vh;
  align-items: center;
}

.hero,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 250, 243, 0.95), rgba(246, 239, 229, 0.86)),
    var(--ivory);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  min-height: 76vh;
  align-content: center;
  padding: clamp(56px, 12vw, 128px) 24px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--rose-deep);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.7rem, 12vw, 7.25rem);
  line-height: 0.95;
}

.section-heading h1,
.confirmation-panel h1,
.admin-panel h1 {
  font-size: clamp(2.2rem, 8vw, 4.25rem);
  line-height: 1.02;
}

p {
  line-height: 1.7;
}

.hero-copy,
.section-heading p,
.confirmation-panel > p {
  width: min(650px, 100%);
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 1rem;
}

.invitation-hero {
  width: min(580px, 100%);
  margin: 32px auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.invitation-img {
  display: block;
  width: 100%;
}

.nasi-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 24px;
  background: var(--ivory-deep);
  border-top: 1px solid var(--line);
}

.nasi-label {
  color: var(--sage-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nasi-names {
  color: var(--rose-deep);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.invitation-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 24px 24px;
  background: var(--ivory);
  border-top: 1px solid var(--line);
}

.invitation-cta {
  width: 100%;
  justify-content: center;
}

.event-details {
  display: grid;
  gap: 12px;
  width: min(720px, 100%);
  margin: 34px auto;
}

.event-details div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.48);
}

.event-details dt {
  color: var(--sage-deep);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.event-details dd {
  margin: 6px 0 0;
  color: var(--ink);
  font-weight: 700;
}

.compact-details {
  margin: 28px auto;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  padding: 0 22px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.button:not(:disabled):hover {
  transform: translateY(-1px);
}

.primary-button {
  background: var(--rose-deep);
  color: #fff;
  box-shadow: 0 12px 26px rgba(143, 81, 87, 0.24);
}

.secondary-button {
  border: 1px solid rgba(143, 81, 87, 0.28);
  background: rgba(255, 255, 255, 0.62);
  color: var(--rose-deep);
}

.text-link {
  display: inline-flex;
  color: var(--sage-deep);
  font-weight: 700;
  text-decoration: none;
}

.back-link {
  margin-bottom: 18px;
}

.directions-link {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.remind-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.remind-toggle {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.remind-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: min(420px, 100%);
}

.remind-form input {
  flex: 1;
  min-width: 200px;
}

.botanical {
  position: absolute;
  width: min(42vw, 260px);
  color: var(--sage);
  opacity: 0.42;
  pointer-events: none;
}

.botanical svg {
  display: block;
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 7;
}

.botanical-top {
  top: -54px;
  left: -42px;
}

.botanical-bottom {
  right: -48px;
  bottom: -64px;
}

.content-page,
.admin-page {
  min-height: 100vh;
  padding-top: clamp(26px, 6vw, 72px);
}

.panel {
  padding: clamp(24px, 6vw, 54px);
}

.form-panel {
  max-width: 760px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}

.form-grid label,
.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid rgba(104, 86, 78, 0.22);
  border-radius: var(--radius);
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  outline: none;
}

input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(185, 120, 125, 0.14);
}

.toggle-field {
  display: grid;
  gap: 10px;
  margin: 0;
  border: 0;
  padding: 0;
}

.toggle-field legend {
  padding: 0;
  font-weight: 700;
}

.toggle {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  width: fit-content;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: var(--blush);
  transition: background-color 180ms ease;
}

.toggle-track::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(89, 68, 55, 0.2);
  content: "";
  transition: transform 180ms ease;
}

.toggle input:checked + .toggle-track {
  background: var(--sage);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(24px);
}

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

.plus-one-fields {
  display: grid;
  gap: 18px;
}

.plus-one-fields[hidden] {
  display: none;
}

.form-message {
  min-height: 1.6em;
  margin: 0;
  color: var(--sage-deep);
  font-weight: 700;
}

.form-message.error {
  color: var(--rose-deep);
}

.confirmation-panel {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.admin-panel {
  min-height: 70vh;
}

.admin-header {
  display: grid;
  gap: 18px;
  align-items: start;
}

.counter {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  border: 1px solid rgba(141, 155, 135, 0.28);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--sage-deep);
  font-weight: 700;
}

.admin-form {
  display: grid;
  gap: 14px;
  margin: 28px 0 16px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.48);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--sage-deep);
  font-size: 0.78rem;
  text-transform: uppercase;
}

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

tbody tr:last-child td {
  border-bottom: 0;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-confirmed {
  background: var(--sage-deep);
}

.status-cancelled {
  background: var(--rose-deep);
}

.pers-badge,
.tip-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.pers-couple,
.tip-couple {
  background: var(--rose-deep);
}

.pers-single,
.tip-single {
  background: var(--sage);
}

.counter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-couple td {
  background: rgba(185, 120, 125, 0.05);
}

.row-single td {
  background: rgba(141, 155, 135, 0.05);
}

@media (min-width: 680px) {
  .page-shell {
    padding: 36px;
  }

  .event-details {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .plus-one-fields,
  .admin-form {
    grid-template-columns: 1fr 1fr;
  }

  .admin-form .button {
    align-self: end;
  }

  .admin-header {
    grid-template-columns: 1fr auto;
  }
}
