:root {
  --background: #fbf8f3;
  --surface: #ffffff;
  --text: #2b2622;
  --muted: #7a7068;
  --border: #e6ded3;
  --accent: #8a6a4a;
  --accent-text: #ffffff;
  --rejected: #a8402c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.2;
}

h1 {
  font-size: 2.25rem;
}

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

nav {
  align-items: baseline;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0.75rem 1.25rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
}

nav a:first-child {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  margin-right: auto;
}

nav a.here {
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}

nav.admin a:first-child {
  font-family: inherit;
  font-size: inherit;
  margin-right: 0;
}

nav.admin form {
  margin-left: auto;
}

nav button {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

nav button:hover {
  color: var(--text);
}

main {
  margin: 0 auto;
  max-width: 44rem;
  padding: 1.5rem 1.25rem 4rem;
}

.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  margin: 0.25rem 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.lede {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-style: italic;
}

.button {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-text);
  display: inline-block;
  margin: 0.25rem 0;
  padding: 0.5rem 1.25rem;
  text-decoration: none;
}

.button.secondary {
  background: none;
  color: var(--accent);
}

.schedule {
  list-style: none;
  padding: 0;
}

.schedule li {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0 1.5rem;
  grid-template-columns: 6rem 1fr;
  padding: 1rem 0;
}

.schedule time {
  color: var(--muted);
  padding-top: 0.2rem;
}

.schedule h3 {
  margin: 0;
}

.schedule p {
  margin: 0.25rem 0 0;
}

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.cards article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0 1.25rem;
}

form {
  display: grid;
  gap: 0.5rem;
  max-width: 22rem;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font: inherit;
  padding: 0.5rem 0.75rem;
}

button {
  background: var(--accent);
  border: 0;
  border-radius: 0.375rem;
  color: var(--accent-text);
  cursor: pointer;
  font: inherit;
  padding: 0.5rem 1rem;
}

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

@media (max-width: 30rem) {
  .schedule li {
    grid-template-columns: 1fr;
  }
}

@font-face {
  font-display: block;
  font-family: "Playfair Display";
  font-weight: 400 700;
  src: url("/static/playfair-display-1.woff2") format("woff2");
}

@font-face {
  font-display: block;
  font-family: "Pinyon Script";
  src: url("/static/pinyon-script-1.woff2") format("woff2");
}

.reveal {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.reveal svg {
  aspect-ratio: 20 / 27;
  display: block;
  font-family: "Playfair Display", serif;
  height: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  width: min(100%, calc((100vh - 10rem) * 20 / 27));
  width: min(100%, calc((100svh - 10rem) * 20 / 27));
}

.reveal svg[role="button"] {
  cursor: pointer;
}

.reveal .script {
  font-family: "Pinyon Script", cursive;
}

.reveal .after {
  margin: 0;
}

.reveal:not(.js-pending):not(.js-reveal) .back,
.reveal:not(.js-pending):not(.js-reveal) .front,
.reveal:not(.js-pending):not(.js-reveal) .flap,
.reveal:not(.js-pending):not(.js-reveal) .hint {
  display: none;
}

.reveal:not(.js-pending):not(.js-reveal) .card {
  transform: translateY(-56px) scale(1.25);
  transform-box: fill-box;
  transform-origin: center;
}

.reveal:not(.js-pending):not(.js-reveal) .card-slot {
  clip-path: none;
}

.reveal[data-kind="save_the_date"]:not(.js-pending):not(.js-reveal) .card {
  transform: translateY(-177px) scale(1.1333);
}

.reveal.js-pending .after,
.reveal.js-reveal .after {
  opacity: 0;
  visibility: hidden;
}

main:has(> .seating) {
  max-width: none;
}

.seating {
  --attending: #3f7d4e;
  --pending: #b7791f;
  --declined: var(--rejected);
  align-items: start;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) 21rem;
}

.floor-plan {
  display: block;
  height: auto;
  max-height: calc(100vh - 15rem);
  user-select: none;
  width: 100%;
}

.floor-plan .cell {
  fill: var(--surface);
  stroke: var(--border);
}

.floor-plan .cell.free {
  cursor: pointer;
  fill: #f6f0e8;
}

.floor-plan .cell.free:hover {
  fill: #eadccb;
}

.floor-plan .table-top {
  cursor: pointer;
  fill: #efe6da;
  stroke: #b9ad9f;
  stroke-width: 1.5;
}

.floor-plan .table-top.selected {
  stroke: var(--accent);
  stroke-width: 4;
}

.floor-plan text {
  dominant-baseline: central;
  pointer-events: none;
  text-anchor: middle;
}

.floor-plan .table-name {
  fill: var(--text);
}

.floor-plan .seat {
  cursor: pointer;
}

.floor-plan .seat circle {
  stroke: var(--surface);
  stroke-width: 1.5;
}

.floor-plan .seat text {
  fill: #ffffff;
  font-size: 8.5px;
  font-weight: 600;
}

.floor-plan .seat.empty circle {
  fill: var(--surface);
  stroke: #b9ad9f;
  stroke-dasharray: 3 2;
}

.floor-plan .seat.attending circle {
  fill: var(--attending);
}

.floor-plan .seat.pending circle {
  fill: var(--pending);
}

.floor-plan .seat.declined circle {
  fill: var(--declined);
}

.floor-plan .seat.selected circle {
  stroke: var(--text);
  stroke-dasharray: none;
  stroke-width: 3;
}

.seating-panel {
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  position: sticky;
  top: 1rem;
}

.seating-panel h2 {
  margin: 1rem 0 0.5rem;
}

.seating-panel h3 {
  margin: 1.25rem 0 0.5rem;
}

.seating-panel label {
  display: grid;
  gap: 0.25rem;
}

.seating-panel button.secondary {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
}

.seating-totals {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
}

.seating-totals div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.4rem 0.6rem;
}

.seating-totals dt {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.seating-totals dd {
  font-size: 1.35rem;
  margin: 0;
}

.seating .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.seating .occupant {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.seating .occupant button {
  margin-left: auto;
}

.badge {
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.75rem;
  padding: 0.05rem 0.5rem;
}

.badge.attending {
  background: var(--attending);
}

.badge.pending {
  background: var(--pending);
}

.badge.declined {
  background: var(--declined);
}

.seat-list,
.guest-list {
  display: grid;
  gap: 0.25rem;
  margin: 0.5rem 0 0;
}

.guest-list {
  list-style: none;
  padding: 0;
}

.seat-list {
  padding-left: 1.75rem;
}

.seating .seat-row,
.seating .guest {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
  justify-content: space-between;
  padding: 0.35rem 0.6rem;
  text-align: left;
  width: 100%;
}

.seating .seat-row.empty {
  color: var(--muted);
}

.seating .guest small {
  color: var(--muted);
  flex-basis: 100%;
}

.seating .guest:disabled {
  cursor: default;
}

.seating .guest.here {
  border-color: var(--accent);
}

.seating .guest.declined {
  opacity: 0.55;
}

.seating .seat-row:hover,
.seating .guest:hover:enabled {
  border-color: var(--accent);
}

.floor-tools {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.floor-plan .seat.target circle {
  stroke: var(--accent);
  stroke-dasharray: none;
  stroke-width: 2.5;
}

.seating .tabs {
  display: flex;
  gap: 0.25rem;
  margin: 0.75rem 0 0.5rem;
}

.seating .tab {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
}

.seating .tab.chosen {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.seating .filters {
  display: flex;
  gap: 1rem;
}

.seating .filters label {
  align-items: center;
  display: flex;
  gap: 0.4rem;
}

.add-table {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 1.5rem 1.25rem;
  width: min(24rem, 90vw);
}

.add-table::backdrop {
  background: rgb(43 38 34 / 35%);
}

.add-table label {
  display: grid;
  gap: 0.25rem;
}

.add-table input,
.add-table select {
  width: 100%;
}

.add-table .actions {
  display: flex;
  gap: 0.5rem;
}

.add-table button.secondary {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
}

@media (max-width: 56rem) {
  .seating {
    grid-template-columns: 1fr;
  }

  .seating-panel {
    max-height: none;
    position: static;
  }
}

.add-table .rejected:empty {
  display: none;
}

.email-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  height: 56rem;
  width: 100%;
}

.mailing {
  border-collapse: collapse;
  font-size: 0.9rem;
  width: 100%;
}

.mailing th,
.mailing td {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
}

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

.email-text {
  overflow-x: auto;
  white-space: pre-wrap;
}

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

button.secondary {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
}

button:disabled {
  cursor: default;
  opacity: 0.4;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

form.rsvp {
  gap: 1.25rem;
  max-width: none;
}

.rsvp fieldset {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  display: grid;
  gap: 0.75rem;
  margin: 0;
  min-width: 0;
  padding: 1rem 1.25rem 1.25rem;
}

.rsvp legend {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  padding: 0 0.25rem;
}

.rsvp .answer,
.rsvp .meal-fields,
.rsvp .plus-one-fields {
  display: grid;
  gap: 0.5rem;
}

.rsvp p {
  margin: 0;
}

.choices {
  display: grid;
  gap: 0.5rem;
}

.choice {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.choice:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice input {
  accent-color: var(--accent);
  height: 1.25rem;
  margin: 0;
  width: 1.25rem;
}

.choice small {
  color: var(--muted);
  display: block;
}

.field-label {
  margin-top: 0.5rem;
}

.answer:not(:has(input[name^="attending-"][value="yes"]:checked)) .meal-fields,
.plus-one:not(:has(input[name="plus-one"]:checked)) .plus-one-fields {
  display: none;
}

.rsvp button[type="submit"] {
  justify-self: start;
  padding: 0.75rem 2rem;
}

.summary {
  list-style: none;
  padding: 0;
}

.summary li {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
}

.totals {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
}

.totals div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
}

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

.totals dd {
  font-size: 1.75rem;
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 0.375rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 400;
}

.meal-option {
  align-items: flex-start;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

.meal-option form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: none;
}

.household {
  border-top: 1px solid var(--border);
  padding: 0.5rem 0 1rem;
}

.household h3 {
  margin-bottom: 0;
}

.household p {
  margin-top: 0.25rem;
}

.household.waiting,
.waiting-note {
  background: #fdf1e4;
  border-left: 4px solid var(--accent);
  padding-left: 0.75rem;
}

.js .without-js {
  display: none;
}

.meal-option p {
  margin: 0;
}

.notify {
  display: block;
  margin-top: 1.5rem;
}

main:has(.household-list) {
  max-width: 90rem;
}

.household-list table {
  font-size: 0.9rem;
}

form.filters {
  display: flex;
  flex-wrap: wrap;
  max-width: none;
}

form.filters input {
  flex: 1 1 16rem;
}

form.inline {
  display: inline-flex;
  align-items: center;
  max-width: none;
}

.guest-rows {
  list-style: none;
  padding: 0;
}

.guest-rows li {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

label.check {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.household-code {
  font-size: 1.2rem;
  letter-spacing: 0.1em;
}

.schedule-event textarea {
  flex-basis: 100%;
}

.hotels article {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.hotels img {
  aspect-ratio: 3 / 2;
  display: block;
  object-fit: cover;
  width: 100%;
}

.hotel-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 1.25rem 1.25rem;
}

.hotel-details h3 {
  margin-bottom: 0.25rem;
}

.hotel-details h3 a {
  color: inherit;
}

.hotel-details p {
  margin: 0 0 0.75rem;
}

.hotel-details p:last-child:has(.button) {
  margin-bottom: 0;
  margin-top: auto;
  padding-top: 0.5rem;
}

.hotel-thumb {
  aspect-ratio: 3 / 2;
  border-radius: 0.375rem;
  object-fit: cover;
  width: 10rem;
}

main:has(.hotels) {
  max-width: 64rem;
}

.photo-field {
  align-items: center;
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.photo-field img {
  flex-basis: 100%;
  max-width: 10rem;
}

.js .photo-field input[type="file"] {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.js .photo-button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  color: var(--text);
  cursor: pointer;
  display: inline-block;
  margin: 0;
  padding: 0.5rem 1rem;
}

.js .photo-field input[type="file"]:focus-visible + .photo-button {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.photo-field input,
#hotel-photo {
  max-width: 100%;
  min-width: 0;
}

.hotel-row form p {
  flex-basis: 100%;
}

.address-field {
  flex-basis: 100%;
  position: relative;
}

.address-field input[type="text"] {
  width: 100%;
}

.address-suggestions {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  left: 0;
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0.25rem 0;
  position: absolute;
  right: 0;
  z-index: 10;
}

.address-suggestions:empty {
  display: none;
}

.address-suggestions button {
  background: none;
  border: 0;
  border-radius: 0;
  color: inherit;
  display: block;
  font: inherit;
  padding: 0.5rem 0.75rem;
  text-align: left;
  width: 100%;
}

.address-suggestions button:hover,
.address-suggestions button:focus {
  background: var(--border);
  outline: none;
}

.address-suggestions li.rejected {
  padding: 0.5rem 0.75rem;
}
