@font-face {
  font-family: "Pinyon Script";
  src: url("/fonts/pinyon-script-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}

:root {
  --cream: #f6f1e7;
  --cream-deep: #ede5d3;
  --card: #fbf8f1;
  --forest: #2f4a34;
  --forest-ink: #1f3324;
  --sage: #7d9474;
  --line: #d8cfbb;
  --script: "Pinyon Script", "Snell Roundhand", "Edwardian Script ITC", cursive;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, Georgia, serif;

  /* legacy aliases used by admin.html */
  --ink: var(--forest-ink);
  --muted: var(--sage);
  --paper: var(--cream);
  --accent: var(--forest);

  font-family: var(--serif);
  font-size: 18px;
  color: var(--forest-ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 30%, var(--card) 0%, var(--cream) 55%, var(--cream-deep) 100%);
}

/* ---- botanicals --------------------------------------------------------- */
.bot { position: fixed; pointer-events: none; user-select: none; z-index: 0; }
.palm-tr { width: 300px; top: -95px; right: -110px; transform: rotate(205deg); opacity: .55; }
.palm-br { width: 340px; bottom: -150px; right: -70px; transform: rotate(-20deg); opacity: .5; }
.vine-l  { width: 72px; top: 30px; left: -6px; opacity: .55; }

/* ---- layout ------------------------------------------------------------- */
main {
  position: relative; z-index: 1;
  width: min(100%, 27rem);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

header { text-align: center; margin-bottom: 1.75rem; }
header p, header h1 { margin: 0; }
h1 { font-weight: normal; display: flex; flex-direction: column; align-items: center; }

.script { font-family: var(--script); font-weight: 400; line-height: 1.05; color: var(--forest-ink); }
.caps {
  font-family: var(--serif); text-transform: uppercase;
  letter-spacing: .18em; font-size: .82rem; color: var(--forest);
}
.welcome { font-size: 4.2rem; margin-bottom: .35rem !important; }
.name    { font-size: 3.4rem; }
.and     { font-size: 1rem; letter-spacing: .25em; margin: .1rem 0 .15rem; }
.sprig   { width: 110px; display: block; margin: 1.1rem auto 0; opacity: .8; }

/* ---- combobox ----------------------------------------------------------- */
.combo { position: relative; }
.combo label { display: block; text-align: center; margin-bottom: .6rem; }

input {
  width: 100%;
  font: inherit; font-size: 1.2rem;           /* ≥16px stops iOS zoom-on-focus */
  color: var(--forest-ink);
  padding: .85rem 1.1rem;
  background: rgba(251, 248, 241, .92);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(47, 74, 52, .04);
  text-align: center;
}
input::placeholder { color: var(--sage); font-style: italic; }
input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(47, 74, 52, .12); }

[role="listbox"] {
  list-style: none; margin: .4rem 0 0; padding: 0;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px -12px rgba(31, 51, 36, .35);
  max-height: 22rem; overflow-y: auto;
}
[role="option"] {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .8rem 1.1rem; cursor: pointer; font-size: 1.15rem;
}
[role="option"] + [role="option"] { border-top: 1px solid var(--cream-deep); }
[role="option"][aria-selected="true"], [role="option"]:hover { background: #eef0e6; }
[role="option"] mark { background: none; color: var(--forest); font-weight: 600; }
[role="option"] .tbl {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--sage); white-space: nowrap; padding-left: 1rem;
}

/* ---- result card -------------------------------------------------------- */
#result {
  text-align: center;
  padding: 2.25rem 1.25rem 1.75rem;
  background: rgba(251, 248, 241, .94);
  border: 1px solid var(--line);
  outline: 1px solid var(--line); outline-offset: -8px;   /* double-rule frame */
  animation: rise .45s ease-out;
}
#result:focus { outline: 1px solid var(--line); }
#result p { margin: 0; }
.guest-name { font-size: 1.45rem; margin-bottom: 1.1rem !important; }
.label { margin-bottom: .25rem !important; }
.table-name { font-family: var(--script); font-size: 3.6rem; line-height: 1.15; color: var(--forest); }
.seat { font-size: 1.05rem; letter-spacing: .08em; color: var(--forest); }
.tablemates { font-size: 1rem; color: var(--sage); margin-top: .9rem !important; line-height: 1.45; font-style: italic; }
#reset {
  margin-top: 1.5rem; font: inherit; font-size: .95rem;
  background: none; border: 0; color: var(--forest);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

.help { text-align: center; color: var(--forest); font-style: italic; margin-top: 1.25rem; }

.camera-link {
  margin: 2rem auto 0; display: flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .7rem 1.2rem; width: fit-content;
  color: var(--forest); text-decoration: none; font-size: 1.05rem;
  border: 1px solid var(--forest); background: rgba(251, 248, 241, .9);
}
.camera-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.camera-link:active { background: #eef0e6; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #result { animation: none; } }

/* narrow phones */
@media (max-width: 360px) {
  .welcome { font-size: 3.5rem; } .name { font-size: 2.9rem; }
}
