:root {
  color-scheme: light;
  --paper: #faf9fc;
  --ink: #282449;
  --brand: #302c70;
  --line: #dedbe9;
  --quiet: #5d5870;
  --coral: #f45b69;
  --blush: #ffc5ca;
  --available: #302c70;
  --partial: #f6a4ad;
  --full: #ddd9e5;
  --display: "Playfair Display", Georgia, serif;
  font-family: Poppins, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid #c72f51; outline-offset: 4px; }
.wrap { width: min(1136px, calc(100% - 72px)); margin-inline: auto; }

.masthead { height: 91px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; }
.brand img { display: block; width: 86px; height: auto; }
.nav-link { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 700; }
.nav-link span { font-size: 17px; }
.nav-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero {
  min-height: 241px;
  position: relative;
  isolation: isolate;
  background: #211e4f;
  border-radius: 16px;
  overflow: hidden;
  color: white;
}
.hero-copy { position: relative; padding: 24px 32px 28px; z-index: 1; }
.hero h1 { font: 600 clamp(37px, 5.5vw, 68px)/.99 var(--display); letter-spacing: -.035em; margin-bottom: 9px; }
.hero-copy > p { color: #efedf9; font-size: 13px; }
.hero-photo {
  position: absolute;
  inset: 0 0 0 auto;
  width: 62%;
  height: 100%;
  object-fit: cover;
  object-position: 57% 52%;
  filter: saturate(.75);
  opacity: .88;
  mask-image: linear-gradient(to right, transparent, #000 45%);
}
.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; padding: 11px 16px; border-radius: 6px; border: 0; font-weight: 700; font-size: 13px; transition: background .18s, transform .18s; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(0); }
.hero-button { margin-top: 14px; background: var(--blush); color: #2d2040; }
.hero-button:hover { background: #ffdae0; }

.plan-section { margin-top: 28px; scroll-margin-top: 20px; }
.plan-heading { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 13px; }
.plan-heading h2 { font: 600 clamp(29px, 4vw, 40px)/1.1 var(--display); letter-spacing: -.033em; }
.plan-heading p { margin-top: 6px; color: var(--quiet); font-size: 13px; }
.view-toggle { display: flex; background: #efedf6; border: 1px solid var(--line); border-radius: 8px; padding: 3px; flex-shrink: 0; }
.view-toggle button { border: 0; border-radius: 5px; background: transparent; color: var(--quiet); padding: 7px 11px; font-size: 13px; font-weight: 600; }
.view-toggle button span { margin-right: 3px; }
.view-toggle button[aria-pressed="true"] { color: white; background: var(--brand); }
.plan-card { background: white; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.plan-bar, .plan-footer { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-bar { border-bottom: 1px solid var(--line); }
.plan-bar p { font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.plan-bar p span { color: #b52d52; font-size: 18px; line-height: 1; }
.legend { display: flex; gap: 14px; color: var(--quiet); font-size: 11px; }
.legend span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend i { width: 9px; aspect-ratio: 1; border-radius: 50%; }
.available { background: var(--available); }
.partial { background: var(--partial); }
.full { background: var(--full); }

#map-zoom { display: none; }
.floor { position: relative; width: 100%; container-type: inline-size; }
.floor > img { display: block; width: 100%; height: auto; }
.head-table, .table-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.head-table {
  --x: 70.61%;
  --y: 28.15%;
  width: 7.75%;
  aspect-ratio: 1.55;
  background: #f1eef9;
  border: 1px dashed #6f6597;
  color: var(--brand);
  font-size: clamp(5px, 1cqw, 12px);
  font-weight: 700;
}
.table-pin {
  width: 5.65%;
  aspect-ratio: 1.18;
  background: var(--available);
  border: 1px solid transparent;
  color: white;
  box-shadow: 0 2px 6px #302c7030;
  font: 600 clamp(8px, 2.2cqw, 23px)/1 var(--display);
  font-variant-numeric: lining-nums tabular-nums;
  padding: 0;
  transition: background .2s, scale .2s;
}
.pin-back { position: absolute; inset: -4px; border: 1px solid #302c704f; border-radius: 50%; pointer-events: none; }
.table-pin:hover:not(:disabled), .table-pin:focus-visible { z-index: 1; scale: 1.09; }
.table-pin.chosen .pin-back { animation: ripple .57s ease-out; }
.table-pin[data-status="unknown"] { background: #666289; }
.table-pin[data-status="partial"] { background: var(--partial); color: var(--ink); }
.table-pin[data-status="full"] { background: var(--full); color: var(--ink); }
.table-pin[data-status="reserved"] {
  background: #f1eef9;
  border: 1px dashed #6f6597;
  color: var(--brand);
  cursor: default;
  box-shadow: none;
}
.table-pin[data-status="reserved"] .pin-back { display: none; }
.table-pin[data-status="reserved"] small, .head-table small {
  display: block;
  margin-top: 2px;
  font: 600 clamp(5px, .9cqw, 10px)/1 Poppins, sans-serif;
}
.head-table > span { text-align: center; }

@keyframes ripple { to { transform: scale(1.65); opacity: 0; } }
.plan-footer { color: var(--quiet); font-size: 12px; border-top: 1px solid var(--line); }
.plan-footer #availability { font-weight: 700; color: var(--brand); }
.table-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; }
.list-table { display: flex; align-items: center; gap: 9px; padding: 9px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #f9f8fc; color: var(--brand); }
.list-table:hover:not(:disabled) { background: #f0edf7; }
.list-number { display: grid; place-items: center; width: 35px; aspect-ratio: 1; border-radius: 50%; flex-shrink: 0; background: var(--available); color: white; font: 600 17px var(--display); }
.list-table[data-status="partial"] .list-number { background: var(--partial); color: var(--ink); }
.list-table[data-status="full"] .list-number { background: var(--full); color: var(--ink); }
.list-table[data-status="reserved"] { border-style: dashed; background: #f1eef9; cursor: default; }
.list-table[data-status="reserved"] .list-number { background: white; color: var(--brand); }

.list-description { display: grid; gap: 2px; font-size: 13px; }
.list-description small { color: var(--quiet); font-size: 11px; }
.list-arrow { margin-left: auto; }
.footer { display: grid; gap: 4px; padding-block: 24px; color: var(--quiet); font-size: 12px; }

dialog {
  width: min(468px, calc(100% - 26px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 0;
  border-radius: 17px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 80px #211d4f60;
}
body:has(dialog[open]) { overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; overflow: hidden; animation: arrive .38s cubic-bezier(.18,.72,.3,1) both; }
dialog::backdrop { background: #1b173da3; backdrop-filter: blur(4px); }
dialog[open]::backdrop { animation: fade .24s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateY(24px) scale(.91); } }
@keyframes fade { from { opacity: 0; } }
.dialog-banner { position: relative; display: flex; flex-shrink: 0; align-items: center; gap: 17px; background: var(--brand); color: var(--paper); padding: 17px 60px 17px 22px; }
.dialog-banner h2 { font: 500 34px/1.05 var(--display); letter-spacing: -.035em; }
.dialog-banner p { margin-top: 5px; color: #ebe7fc; font-size: 13px; }
.close { display: grid; place-items: center; position: absolute; top: 11px; right: 11px; width: 44px; height: 44px; border: 1px solid #e9e3f871; border-radius: 50%; background: none; color: var(--paper); font: 25px/1 system-ui; }
.close:hover { background: #ffffff1a; }
.seat-diagram { width: 38px; height: 38px; flex-shrink: 0; position: relative; margin: 0 4px; border: 1px solid #e9d9fe; border-radius: 50%; background: #e9d9fe21; }
.seat-diagram span { position: absolute; top: calc(50% - 3px); left: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: #e5dff9; transform: rotate(var(--angle)) translateX(24px); }
.seat-diagram .taken { background: var(--blush); }
.celebrate[open] { animation: none; }
.celebrate .seat-diagram { animation: seat-pop .55s ease-out; }
@keyframes seat-pop { 38% { scale: 1.22; box-shadow: 0 0 0 10px #ffc5ca60; } 100% { box-shadow: 0 0 0 25px transparent; } }
.dialog-body { min-height: 0; padding: 15px 19px 18px; display: flex; flex-direction: column; gap: 12px; overflow: auto; }
.guest-section { min-height: 0; display: flex; flex-direction: column; }
.guest-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.guest-heading h3 { font: 600 21px/1.2 var(--display); }
#guest-count { color: var(--quiet); font-size: 13px; font-variant-numeric: tabular-nums; }
.quiet { font-size: 13px; color: var(--quiet); }
.guest-list { overflow: auto; margin: 0; padding: 0; scrollbar-color: #aaa5c5 #f0edf6; }
.guest-list li { display: block; border-top: 1px solid var(--line); padding: 8px 9px; background: white; color: var(--ink); font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.guest-list li:last-child { border-bottom: 1px solid var(--line); }
#reservation-form { flex-shrink: 0; }
#reservation-form label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; }
.form-actions { display: flex; gap: 8px; }
#guest-name { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #aeabc4; border-radius: 6px; background: white; color: var(--ink); font-size: 16px; }
.reserve-button { min-height: 44px; background: var(--brand); color: white; }
.reserve-button:disabled { opacity: .56; cursor: default; }
#feedback { flex-shrink: 0; overflow-wrap: anywhere; border-radius: 7px; padding: 9px 11px; background: #fae3e5; color: #792a3f; font-weight: 700; font-size: 13px; }
#feedback[data-type="success"] { background: #e9e5f4; color: #302c70; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  .masthead { height: 77px; }
  .brand img { width: 73px; }
  .hero { min-height: 0; }
  .hero-copy { padding: 22px; }
  .hero-photo { width: 73%; opacity: .72; }
  .table-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 565px) {
  .masthead { height: 60px; }
  .brand img { width: 58px; }
  .nav-link { font-size: 12px; gap: 5px; min-height: 44px; }
  .hero-copy { padding: 12px 15px 13px; }
  .hero-copy > p, .hero-button { display: none; }
  .hero-photo { width: 100%; mask-image: linear-gradient(to right, transparent 12%, #000 95%); }
  .hero h1 { font-size: clamp(29px, 8vw, 42px); margin-bottom: 0; }
  .plan-section { margin-top: 14px; }
  .plan-heading { align-items: start; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
  .plan-heading h2 { font-size: 27px; }
  .view-toggle button { min-height: 36px; }
  /* Mobile crop of the real plan, starting at (665, 45) with size 550 × 420. */
  .map-frame:not(.overview) { position: relative; aspect-ratio: 550 / 420; overflow: clip; }
  .map-frame:not(.overview) .floor { position: absolute; width: 240%; left: -120.9091%; top: -10.7143%; }
  .map-frame:not(.overview) .table-pin { aspect-ratio: 1.03; }
  .map-frame.overview .pin-back { display: none; }
  #map-zoom { display: block; width: 100%; min-height: 42px; padding: 6px 10px; border: 0; border-top: 1px solid var(--line); background: #f5f2fa; color: var(--brand); font-size: 12px; font-weight: 600; }
  #map-zoom:focus-visible { outline-offset: -4px; }
  .plan-heading p { font-size: 12px; }
  .plan-bar, .plan-footer { padding-inline: 10px; }
  .plan-bar { flex-wrap: wrap; row-gap: 7px; }
  .plan-bar p { font-size: 12px; }
  .legend { gap: 9px; font-size: 10px; }
  .table-list { grid-template-columns: repeat(2, 1fr); padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.table-pin.square-pin { aspect-ratio: 1; border-radius: 15%; }
.square-pin .pin-back { border-radius: 15%; }
.square-pin small { display: block; margin-top: 2px; font: 600 clamp(5px, 1cqw, 10px)/1 Poppins, sans-serif; }
.seat-diagram.square-diagram { border-radius: 15%; }

.invite-card { max-width: 540px; margin: 22px auto 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.invite-card h2 { font: 600 25px/1.12 var(--display); }
#invite-status { color: var(--quiet); margin: 7px 0 10px; font-size: 13px; }
#invite-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.invite-fields { display: flex; gap: 7px; }
.invite-fields input { min-width: 0; flex: 1; min-height: 44px; padding: 7px 9px; border: 1px solid #ada9c5; border-radius: 6px; font-size: 16px; }
