/* ────────────────────────────────────────────────────────────
   Oliver & Hina — Find your seat
   Palette + type sampled from the printed Mughal-miniature signs:
     rose #db437c · green #3a7c46 · cream #f6f3e6 · gold #bd9a52
   Artwork (flowers, medallion border, paper texture) is served from
   images/, built from assets/ by build.js. The pink + gold accents are
   pure CSS (see .sign / .card).
   ──────────────────────────────────────────────────────────── */

:root {
  --paper: #f6f3e6;
  --paper-deep: #efe8d4;
  --rose: #db437c;
  --green: #3a7c46;
  --gold: #bd9a52;
  --ink: #4a4036;
  --ink-soft: #7a6f60;
}

* {
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

.wrap {
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 5vw, 48px) clamp(12px, 4vw, 24px);
  background:
    radial-gradient(120% 80% at 50% -10%, #f7ecf1 0%, transparent 55%),
    linear-gradient(160deg, #f3e8de 0%, #efe2ea 100%);
}

.panel {
  width: 100%;
  max-width: 460px;
}
.panel.plan {
  max-width: 1000px;
}

/* ── The decorative sign frame (real printed Mughal border) ──── */

/* Thickness of the medallion band that frames all four sides, the cream gutter
   between that band and the gold keyline, and the drop shadow under the frame.
   The frame is a solid rectangle, so a box-shadow on it (see .sign-frame) does
   the job a drop-shadow filter once did for the old transparent-edged art —
   without the filter that Safari mishandles over a blended background. */
:root {
  --band: clamp(26px, 7.5vw, 36px);
  --gutter: 7px;
  --frame-shadow: 0 22px 46px rgba(120, 30, 70, 0.34);
  --frame-pad: clamp(12px, 4vw, 22px);
  --body-pad: clamp(16px, 4.5vw, 28px) clamp(18px, 5vw, 30px);
}

/* Outermost pink watercolour border — layered CSS gradients mottled to read
   like washed pigment, framing the whole sign. */
.sign-frame {
  padding: var(--frame-pad);
  background-color: #e2729f;
  /* topmost layer is the paper texture, soft-light-blended into the pink
     washes below so the frame reads as pigment on textured stock */
  background-image:
    url("images/paper.webp"),
    radial-gradient(60% 55% at 18% 12%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(55% 60% at 88% 28%, rgba(214, 70, 120, 0.55), transparent 65%),
    radial-gradient(70% 55% at 72% 92%, rgba(255, 255, 255, 0.38), transparent 60%),
    radial-gradient(55% 50% at 8% 82%, rgba(186, 48, 94, 0.5), transparent 62%),
    radial-gradient(40% 40% at 50% 50%, rgba(255, 255, 255, 0.18), transparent 70%),
    linear-gradient(135deg, #ef9ac0 0%, #db437c 48%, #e87ba6 100%);
  background-size: cover;
  background-blend-mode: soft-light, normal, normal, normal, normal, normal,
    normal;
  box-shadow: var(--frame-shadow),
    inset 0 1px 3px rgba(255, 255, 255, 0.4),
    inset 0 -2px 6px rgba(150, 30, 70, 0.25);
}

/* The sign: a paper card whose four edges are covered by the tiled medallion
   band; a gold keyline (on .sign-body) sits just inside. */
.sign {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(246, 243, 230, 0.35), rgba(246, 243, 230, 0.35)),
    url("images/paper.webp") center / cover;
}

/* The four tiled border edges. Top/bottom use the horizontal strip and span
   the full width (owning the corners); left/right use the rotated strip and
   slot between them. */
.frame-band {
  position: absolute;
  z-index: 1;
  background-image: url("images/border.webp");
}
.frame-top {
  top: 0;
  left: 0;
  right: 0;
  height: var(--band);
  background-repeat: repeat-x;
  background-size: auto var(--band);
}
.frame-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--band);
  background-repeat: repeat-x;
  background-size: auto var(--band);
  transform: scaleY(-1);
}
.frame-left {
  top: var(--band);
  bottom: var(--band);
  left: 0;
  width: var(--band);
  background-image: url("images/border-vert.webp");
  background-repeat: repeat-y;
  background-size: var(--band) auto;
}
.frame-right {
  top: var(--band);
  bottom: var(--band);
  right: 0;
  width: var(--band);
  background-image: url("images/border-vert.webp");
  background-repeat: repeat-y;
  background-size: var(--band) auto;
  transform: scaleX(-1);
}

.sign-body {
  position: relative;
  z-index: 2;
  /* sit inside the band, leaving a small cream gutter before the gold rule */
  margin: calc(var(--band) + var(--gutter));
  border: 1.25px solid var(--gold);
  /* a faint inner gold rule, for the printed double-keyline look */
  box-shadow:
    inset 0 0 0 4px rgba(246, 243, 230, 0.6),
    inset 0 0 0 5px rgba(189, 154, 82, 0.4);
  padding: var(--body-pad);
}

/* ── Eyebrow ─────────────────────────────────────────────────── */
.eyebrow {
  text-align: center;
  margin-bottom: 4px;
}
.eyebrow .names {
  font-family: Mukta, sans-serif;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--rose);
}
.eyebrow .meta {
  font-family: Mukta, sans-serif;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 9.5px;
  color: var(--ink-soft);
  margin-top: 5px;
}

/* ── Headings + copy ─────────────────────────────────────────── */
.finder {
  text-align: center;
}
.script-h1 {
  font-family: "Pinyon Script", cursive;
  color: var(--green);
  font-weight: 400;
  line-height: 1;
}
.finder .script-h1 {
  font-size: clamp(46px, 15vw, 68px);
  margin: 10px 0 2px;
}
.finder .lede {
  font-family: Ovo, serif;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 auto 22px;
  max-width: 300px;
}

/* ── Seat finder input + results ─────────────────────────────── */
.search {
  position: relative;
  text-align: left;
}
.seat-input {
  width: 100%;
  box-sizing: border-box;
  font-family: Ovo, serif;
  font-size: 19px;
  color: var(--ink);
  padding: 13px 16px;
  border-radius: 3px;
  border: 1px solid var(--gold);
  background: #fffdf6;
  outline: none;
}
.seat-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(219, 67, 124, 0.18);
}

.results {
  list-style: none;
  margin: 8px 0 0;
  padding: 6px;
  border: 1px solid rgba(189, 154, 82, 0.55);
  border-radius: 4px;
  background: #fffdf6;
  box-shadow: 0 16px 30px -22px rgba(120, 30, 70, 0.5);
}
.seat-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 11px 12px;
  border-radius: 3px;
  text-align: left;
}
.seat-row:hover,
.seat-row:focus-visible {
  background: var(--paper-deep);
  outline: none;
}
.seat-row .name {
  font-family: Ovo, serif;
  font-size: 18px;
  color: var(--ink);
}
.seat-row .tag {
  font-family: Mukta, sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
  white-space: nowrap;
}
.no-match {
  font-family: Mukta, sans-serif;
  font-size: 14px;
  color: var(--ink-soft);
  margin: 12px 2px 0;
  line-height: 1.5;
}

/* ── Divider + link buttons ──────────────────────────────────── */
.divider-row {
  margin-top: 26px;
}
.rule {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  opacity: 0.6;
}
.link-btn {
  font-family: Mukta, sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--rose);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
}
.link-btn:hover {
  text-decoration: underline;
}
.link-btn.green {
  color: var(--green);
}

/* ── Reveal screen ───────────────────────────────────────────── */
.reveal {
  text-align: center;
}
.label {
  font-family: Mukta, sans-serif;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--ink-soft);
}
.label.green {
  color: var(--green);
}
.reveal .table-word {
  font-family: "Pinyon Script", cursive;
  color: var(--green);
  font-size: clamp(42px, 13vw, 60px);
  line-height: 1;
  margin-top: 6px;
}
/* The head table has no number, so the script phrase carries the heading on its
   own — sized to read as the hero where the big numeral usually sits. */
.reveal .table-word-head {
  font-size: clamp(48px, 16vw, 76px);
  line-height: 1.05;
  margin: 8px 0 6px;
}
.reveal .table-num {
  font-family: Ovo, serif;
  color: var(--rose);
  font-size: clamp(96px, 32vw, 150px);
  line-height: 0.9;
  margin: 2px 0 4px;
}
.reveal .flower {
  display: block;
  margin: 8px auto 0;
  width: min(180px, 52%);
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(120, 30, 70, 0.18));
}
/* The head table's reveal scene is far more detailed than a single flower, so
   give it more room than the flower hero. */
.reveal .flower.head {
  width: min(240px, 74%);
}
.company {
  margin-top: 26px;
}
.company .heading {
  margin-bottom: 10px;
}
/* The other guests at the table read as a flowing guest list — centred serif
   names parted by a fine gold middot, not boxed pills. Names are laid out three
   to a row (see chipRows() in app.js); the last name in each row drops its dot. */
.chips {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 2px;
  line-height: 1.7;
}
.chip-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
}
.chip {
  font-family: Ovo, serif;
  font-size: 16.5px;
  color: var(--ink);
  white-space: nowrap;
}
.chip:not(:last-child)::after {
  content: "·";
  color: var(--gold);
  margin: 0 0.55em;
}
/* The two actions stack as a tidy pair, anchored by a short gold flourish so
   they read as a deliberate footer rather than two floating lines. Each label
   stays on one line (no mid-label "Find another / name" wrap). */
.reveal .actions {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.reveal .actions::before {
  content: "";
  width: 46px;
  height: 1px;
  background: var(--gold);
  opacity: 0.55;
  margin-bottom: 14px;
}
.reveal .actions .link-btn {
  white-space: nowrap;
  padding: 7px 12px;
}

/* ── Full table plan ─────────────────────────────────────────── */
.plan-head {
  text-align: center;
  margin-bottom: 22px;
}
.plan-head .script-h1 {
  font-size: clamp(42px, 13vw, 58px);
  margin: 8px 0 0;
}
.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 520px) {
  .plan-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 840px) {
  .plan-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  /* A last card left alone on its row (e.g. the 7th of 7) sits in the middle
     column rather than orphaned to the left. */
  .plan-grid > .plan-card-shadow:last-child:nth-child(3n - 2) {
    grid-column: 2;
  }
}
/* Plan cards reuse the sign's frame (.sign-frame / .sign / .frame-band /
   .sign-body), just smaller — a finer band, tighter pink border and gutter. */
.plan-card-shadow {
  --band: 17px;
  --gutter: 4px;
  --frame-pad: 8px;
  --body-pad: 14px 11px;
  --frame-shadow: 0 14px 28px rgba(120, 30, 70, 0.28);
  height: 100%;
}
.plan-card-shadow > .sign-frame {
  height: 100%;
  box-sizing: border-box;
}
.plan-card-shadow .sign {
  height: 100%;
  box-sizing: border-box;
}
.card-flower {
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin: 0 auto 2px;
  display: block;
}
.card-title {
  text-align: center;
  margin-bottom: 8px;
}
.card-title .word {
  font-family: "Pinyon Script", cursive;
  color: var(--green);
  font-size: 24px;
  vertical-align: middle;
}
.card-title .num {
  font-family: Ovo, serif;
  color: var(--rose);
  font-size: 28px;
  vertical-align: middle;
}
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.card-list li {
  font-family: Ovo, serif;
  font-size: 15.5px;
  color: var(--ink);
  text-align: center;
  padding: 3px 10px;
  border-radius: 20px;
  margin: 1px auto;
  display: block;
  max-width: fit-content;
}
.card-list li.on {
  color: #fff;
  background: var(--rose);
  font-weight: 600;
}
.plan-back {
  text-align: center;
  margin-top: 26px;
}

/* ── Focus + motion ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
  border-radius: 3px;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bloomIn {
  0% {
    opacity: 0;
    transform: scale(0.82) translateY(8px);
  }
  60% {
    opacity: 1;
    transform: scale(1.04);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  70% {
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.anim {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-duration: 0.62s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rise {
  animation-name: riseIn;
}
.bloom {
  animation-name: bloomIn;
}
.pop {
  animation-name: popIn;
}
@media (prefers-reduced-motion: reduce) {
  .anim {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
