/* =========================================================================
   Tableory — guest booking (book.tableory.com)

   Palette is authoritative: Charcoal #1F1F1F · Bronze #B08D6B ·
   Soft White #F9F7F4 · Warm Gray #A7A29A · Olive #3C4A3F
   Espresso #3B2F28 · Sand #DCCDBF · Sage #7F8C7A · Stone #EAE6E1

   Measured contrast, respected by the tokens below:
   - Bronze      #B08D6B on Soft White = 2.86:1  FAILS -> never text on light
   - Warm Gray   #A7A29A on Soft White = 2.37:1  FAILS -> never text on light
   - Bronze Deep #8A6A4A on Soft White = 4.63:1  -> bronze text on light
   - Warm Gray700#6E6A63 on Soft White = 5.03:1  -> muted text on light
   - On Charcoal: Bronze 5.39 · Warm Gray 6.50 · Sand 10.62 — all pass.

   Thai typography: never letter-spaced (Thai has no word spaces and tracking
   breaks vowel / tone-mark placement). Tracking is for Latin uppercase only.
   Thai line-height >= 1.75.
   ========================================================================= */

/* ---------- 1. Tokens: the full light palette lives on bare :root ---------- */
:root {
  color-scheme: light;

  /* raw brand */
  --charcoal:      #1F1F1F;
  --bronze:        #B08D6B;
  --bronze-deep:   #8A6A4A;
  --soft-white:    #F9F7F4;
  --warm-gray:     #A7A29A;
  --warm-gray-700: #6E6A63;
  --olive:         #3C4A3F;
  --espresso:      #3B2F28;
  --sand:          #DCCDBF;
  --sage:          #7F8C7A;
  --stone:         #EAE6E1;

  /* semantic — light */
  --bg:            #F9F7F4;
  --bg-elev:       #FFFFFF;
  --bg-sunken:     #F1EEE9;
  --bg-invert:     #1F1F1F;
  --text:          #1F1F1F;
  --text-muted:    #6E6A63;
  --text-invert:   #F9F7F4;
  --text-on-invert-muted: #A7A29A;
  --accent:        #8A6A4A;   /* bronze as TEXT on light */
  --accent-line:   #B08D6B;   /* bronze as rule / fill only */
  --accent-soft:   #EFE5DA;
  --border:        #DFD9D1;
  --border-strong: #C9C1B6;
  --btn-bg:        #1F1F1F;
  --btn-fg:        #F9F7F4;
  --btn-bg-hover:  #3B2F28;
  --focus:         #8A6A4A;
  --sel-bg:        #1F1F1F;
  --sel-fg:        #F9F7F4;
  --sel-line:      #1F1F1F;
  --ok:            #3C4A3F;
  --ok-soft:       #E7EBE6;
  --warn:          #8A5A28;
  --warn-soft:     #F6EDE2;
  --danger:        #8C3A2E;
  --danger-soft:   #F7E9E6;
  --shadow-sm:     0 1px 2px rgba(31,31,31,.05), 0 6px 18px -12px rgba(31,31,31,.28);
  --shadow-md:     0 2px 4px rgba(31,31,31,.05), 0 24px 48px -28px rgba(31,31,31,.35);
  --header-bg:     rgba(249,247,244,.9);

  /* type */
  --font-display: "Outfit", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Thai", "IBM Plex Sans", "Noto Sans Thai",
               "Leelawadee UI", "Sarabun", system-ui, -apple-system,
               "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "IBM Plex Mono", Menlo, Consolas, monospace;

  --step--1: clamp(.8125rem, .78rem + .16vw, .875rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.06rem + .32vw, 1.25rem);
  --step-2:  clamp(1.3125rem, 1.22rem + .46vw, 1.5rem);
  --step-3:  clamp(1.5rem, 1.32rem + .9vw, 2rem);
  --step-4:  clamp(1.875rem, 1.5rem + 1.8vw, 2.75rem);

  --wrap: 680px;
  --gutter: clamp(1rem, 4vw, 1.75rem);
  --radius: 4px;
  --radius-lg: 10px;
  --tap: 44px;
}

/* ---------- 2. Dark: system preference, unless the user forced light ------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:            #1F1F1F;
    --bg-elev:       #272522;
    --bg-sunken:     #191817;
    --bg-invert:     #F9F7F4;
    --text:          #F9F7F4;
    --text-muted:    #A7A29A;
    --text-invert:   #1F1F1F;
    --text-on-invert-muted: #6E6A63;
    --accent:        #B08D6B;
    --accent-line:   #B08D6B;
    --accent-soft:   #2E2A26;
    --border:        #3A3733;
    --border-strong: #514C46;
    --btn-bg:        #B08D6B;
    --btn-fg:        #1F1F1F;
    --btn-bg-hover:  #DCCDBF;
    --focus:         #DCCDBF;
    --sel-bg:        #B08D6B;
    --sel-fg:        #1F1F1F;
    --sel-line:      #B08D6B;
    --ok:            #9DB098;
    --ok-soft:       #262C25;
    --warn:          #DCCDBF;
    --warn-soft:     #302A23;
    --danger:        #E8A79B;
    --danger-soft:   #302220;
    --shadow-sm:     0 1px 2px rgba(0,0,0,.4), 0 6px 18px -12px rgba(0,0,0,.6);
    --shadow-md:     0 2px 4px rgba(0,0,0,.4), 0 24px 48px -28px rgba(0,0,0,.75);
    --header-bg:     rgba(31,31,31,.9);
  }
}

/* ---------- 3. Dark: explicitly chosen ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:            #1F1F1F;
  --bg-elev:       #272522;
  --bg-sunken:     #191817;
  --bg-invert:     #F9F7F4;
  --text:          #F9F7F4;
  --text-muted:    #A7A29A;
  --text-invert:   #1F1F1F;
  --text-on-invert-muted: #6E6A63;
  --accent:        #B08D6B;
  --accent-line:   #B08D6B;
  --accent-soft:   #2E2A26;
  --border:        #3A3733;
  --border-strong: #514C46;
  --btn-bg:        #B08D6B;
  --btn-fg:        #1F1F1F;
  --btn-bg-hover:  #DCCDBF;
  --focus:         #DCCDBF;
  --sel-bg:        #B08D6B;
  --sel-fg:        #1F1F1F;
  --sel-line:      #B08D6B;
  --ok:            #9DB098;
  --ok-soft:       #262C25;
  --warn:          #DCCDBF;
  --warn-soft:     #302A23;
  --danger:        #E8A79B;
  --danger-soft:   #302220;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.4), 0 6px 18px -12px rgba(0,0,0,.6);
  --shadow-md:     0 2px 4px rgba(0,0,0,.4), 0 24px 48px -28px rgba(0,0,0,.75);
  --header-bg:     rgba(31,31,31,.9);
}

/* ---------- 4. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);              /* explicit token background */
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.78;
  overflow-x: hidden;                 /* no horizontal body scroll, ever */
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3 { font-weight: 500; line-height: 1.34; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: var(--accent-line); color: var(--charcoal); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 90;
  background: var(--bg-elev); color: var(--text);
  padding: .7rem 1rem; border: 1px solid var(--border-strong);
}
.skip-link:focus { left: .5rem; top: .5rem; }

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- 5. Language: CSS-driven, works with JS blocked ---------- */
/* Thai is the default in the markup, so with no script at all the page is Thai. */
:root[data-lang="th"] [data-i18n="en"],
:root[data-lang="th"] [data-i18n="zh"] { display: none; }
:root[data-lang="en"] [data-i18n="th"],
:root[data-lang="en"] [data-i18n="zh"] { display: none; }
:root[data-lang="zh"] [data-i18n="th"],
:root[data-lang="zh"] [data-i18n="en"] { display: none; }

/* :not(:root) so <html lang="th"> does not strip tracking from the whole page.
   Every Thai run in the markup carries its own lang attribute. */
[lang="th"]:not(:root), [lang="th"]:not(:root) * { letter-spacing: normal; }
[lang="th"]:not(:root) { line-height: 1.78; }
h1[lang="th"], h2[lang="th"], h3[lang="th"], .step__title[lang="th"] { line-height: 1.4; }
[lang="zh"]:not(:root), [lang="zh"]:not(:root) * { letter-spacing: normal; }
[lang="zh"]:not(:root) { line-height: 1.7; }

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  margin: 0;
}
.eyebrow[lang="th"] { text-transform: none; letter-spacing: normal; font-size: .8125rem; }
.eyebrow[lang="zh"] { text-transform: none; letter-spacing: normal; }

/* ---------- 6. The mark (measured from the master file, 174 x 213) -------- */
.mark {
  position: relative;
  width: var(--mark-size, 28px);
  aspect-ratio: 174 / 213;
  flex: none;
  color: var(--accent-line);
}
.mark > i { position: absolute; background: currentColor; display: block; }
.mark .bar    { left: 0;     width: 100%;  top: 0;     height: 10.8%; }
.mark .rule-l { left: 0;     width: 43.2%; top: 22.1%; height: 6.6%; }
.mark .rule-r { left: 56.8%; width: 43.2%; top: 22.1%; height: 6.6%; }
.mark .stem-l { left: 34.9%; width: 8.3%;  top: 22.1%; bottom: 0; }
.mark .stem-r { left: 56.8%; width: 8.3%;  top: 22.1%; bottom: 0; }
/* Hairlines break below ~28px — the solid variant carries the small sizes. */
.mark.solid .rule-l, .mark.solid .rule-r { display: none; }
.mark.solid .bar { height: 20%; }
.mark.solid .stem-l { left: 34.9%; width: 30.2%; top: 20%; }
.mark.solid .stem-r { display: none; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; }
.brand .wordmark {
  font-family: var(--font-display);
  font-size: .9375rem; font-weight: 500;
  letter-spacing: .26em; text-transform: uppercase; line-height: 1;
  padding-inline-end: .26em;           /* balance the trailing tracking */
  color: var(--text);
}

/* ---------- 7. Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--header-bg);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: .55rem var(--gutter);
  display: flex; align-items: center; gap: .75rem;
}
.topbar__tools { margin-inline-start: auto; display: flex; align-items: center; gap: .4rem; }

.toggle-group {
  display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-elev);
}
.toggle-group button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-display); font-size: .75rem; font-weight: 500;
  letter-spacing: .08em; color: var(--text-muted);
  min-height: var(--tap); min-width: 40px; padding: 0 .55rem;
}
.toggle-group button + button { border-inline-start: 1px solid var(--border); }
.toggle-group button[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-fg); }

.icon-btn {
  appearance: none; background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  min-width: var(--tap); min-height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { border-color: var(--text); }
.theme-icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-light { display: none; }
  :root:not([data-theme="light"]) .theme-icon-dark { display: block; }
}
:root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="light"] .theme-icon-light { display: block; }
:root[data-theme="light"] .theme-icon-dark { display: none; }

/* ---------- 8. Shell ---------- */
.shell { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) 5rem; }
.masthead { padding: clamp(1.75rem, 6vw, 3rem) 0 1.5rem; }
.masthead h1 { font-size: var(--step-3); }
.masthead .lede { color: var(--text-muted); margin-top: .6rem; font-size: var(--step-0); }
.venue-meta {
  display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin-top: 1rem;
}

.chip-static {
  display: inline-flex; align-items: center; gap: .35rem;
  border: 1px solid var(--border); border-radius: 999px;
  padding: .25rem .7rem; font-size: var(--step--1); color: var(--text-muted);
  background: var(--bg-elev);
}

/* ---------- 9. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--tap); padding: .8rem 1.4rem;
  border-radius: var(--radius); border: 1px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-display); font-weight: 500; font-size: .9375rem;
  text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .15s ease;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: transparent; border-color: var(--text); }
.btn--block { width: 100%; }
.btn--lg { padding: 1rem 1.5rem; font-size: 1rem; min-height: 52px; }
.btn--sm { padding: .4rem .85rem; font-size: .8125rem; }  /* min-height stays var(--tap) = 44px */

/* ---------- 10. Venue chooser ---------- */
.venue-grid { display: grid; gap: 1rem; }
@media (min-width: 620px) { .venue-grid { grid-template-columns: 1fr 1fr; } }

.venue-card {
  display: flex; flex-direction: column; gap: .65rem;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.35rem;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.venue-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.venue-card__name { font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; }
.venue-card__city { color: var(--text-muted); font-size: var(--step--1); }
.venue-card__rule { height: 1px; background: var(--accent-line); opacity: .55; }
.venue-card__hours { font-size: var(--step--1); color: var(--text-muted); }
.venue-card__go {
  margin-top: auto; padding-top: .5rem;
  font-family: var(--font-display); font-size: .875rem; color: var(--accent); font-weight: 500;
}
.venue-card__go[lang="th"] { font-family: var(--font-body); }

/* ---------- 11. Steps ---------- */
.step {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: .85rem;
  overflow: hidden;
}
.step.is-active { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.step__head {
  width: 100%; appearance: none; background: transparent; border: 0;
  display: flex; align-items: center; gap: .8rem; text-align: start;
  padding: 1rem 1.1rem; min-height: 60px; color: inherit; font: inherit; cursor: default;
}
.step.is-done .step__head { cursor: pointer; }
.step__num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong); color: var(--text-muted);
  font-family: var(--font-display); font-size: .8125rem; font-variant-numeric: tabular-nums;
}
.step.is-active .step__num { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-line); }
.step.is-done .step__num { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.step__title { font-family: var(--font-body); font-size: var(--step-0); font-weight: 500; }
.step__value {
  margin-inline-start: auto; text-align: end;
  color: var(--text-muted); font-size: var(--step--1); line-height: 1.5;
}
.step__edit {
  flex: none; font-size: var(--step--1); color: var(--accent);
  border-bottom: 1px solid currentColor; margin-inline-start: .6rem;
}
.step:not(.is-done) .step__edit { display: none; }
.step__body { padding: 0 1.1rem 1.2rem; }
.step.is-collapsed .step__body { display: none; }
.step__hint { color: var(--text-muted); font-size: var(--step--1); margin-bottom: .9rem; }

/* ---------- 12. Party stepper ---------- */
/* ปุ่มลบอยู่ซ้าย ตัวเลขตรงกลาง ปุ่มบวกชิดขวา — นิ้วโป้งเอื้อมถึงทั้งสองข้างบนมือถือ */
.stepper { display: flex; align-items: center; gap: 1rem; }
.stepper > :nth-child(3) { margin-inline-end: auto; }
.stepper__btn {
  appearance: none; cursor: pointer;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--bg);
  color: var(--text); font-size: 1.5rem; line-height: 1;
  display: grid; place-items: center;
}
.stepper__btn:hover:not([disabled]) { border-color: var(--text); }
.stepper__btn[disabled] { opacity: .35; cursor: not-allowed; }
.stepper__val {
  min-width: 4.5rem; text-align: center;
  font-family: var(--font-display); font-size: var(--step-4); font-weight: 500;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.stepper__unit { color: var(--text-muted); font-size: var(--step--1); }
.party-quick { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }

/* ---------- 13. Date rail ---------- */
.monthbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-bottom: .6rem;
}
.monthbar__label { font-family: var(--font-display); font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.monthbar__label[lang="th"], .monthbar__label[lang="zh"] { font-family: var(--font-body); letter-spacing: normal; text-transform: none; }

.daterail {
  display: flex; gap: .45rem; overflow-x: auto; padding: .2rem .2rem .7rem;
  scroll-snap-type: x proximity; scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.daterail::-webkit-scrollbar { height: 5px; }
.daterail::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.day {
  flex: none; scroll-snap-align: start;
  width: 58px; min-height: 74px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
  appearance: none; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text); font: inherit; padding: .45rem .2rem;
}
.day__dow { font-size: .6875rem; color: var(--text-muted); line-height: 1.3; }
.day__num { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.1; }
.day__mon { font-size: .625rem; color: var(--text-muted); line-height: 1.2; }
.day:hover:not([disabled]) { border-color: var(--border-strong); }
.day[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-line); }
.day[aria-pressed="true"] .day__dow, .day[aria-pressed="true"] .day__mon { color: var(--sel-fg); opacity: .8; }
.day[disabled] { cursor: not-allowed; opacity: .55; background: var(--bg-sunken); border-style: dashed; }
.day[disabled] .day__num { text-decoration: line-through; text-decoration-thickness: 1px; }
.day--today { box-shadow: inset 0 -3px 0 -1px var(--accent-line); }

/* ---------- 14. Slots ---------- */
.slots { display: grid; gap: .55rem; }
@media (min-width: 520px) { .slots { grid-template-columns: 1fr 1fr; } }

.slot {
  appearance: none; cursor: pointer; text-align: start; font: inherit;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
  padding: .8rem .9rem; min-height: var(--tap);
  display: grid; gap: .3rem;
}
.slot:hover:not([disabled]) { border-color: var(--border-strong); }
.slot[aria-pressed="true"] { border-color: var(--sel-line); box-shadow: inset 0 0 0 1px var(--sel-line); background: var(--accent-soft); }
.slot[disabled] { cursor: not-allowed; opacity: .6; background: var(--bg-sunken); }
.slot__top { display: flex; align-items: baseline; gap: .5rem; }
.slot__time {
  font-family: var(--font-display); font-size: 1.1875rem; font-weight: 500;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.slot__dur { margin-inline-start: auto; font-size: .75rem; color: var(--text-muted); }
.slot__min { font-family: var(--font-display); font-size: .9375rem; font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.slot__min .lbl { font-family: var(--font-body); font-weight: 400; font-size: .75rem; color: var(--text-muted); margin-inline-end: .3rem; }
.slot__where { font-size: .75rem; color: var(--text-muted); }
.slot__flag { font-size: .75rem; color: var(--ok); }
.slot__full { font-size: .75rem; color: var(--text-muted); }

/* ---------- 15. Zones ---------- */
.zonegroup + .zonegroup { margin-top: 1rem; }
/* The floor label is whatever the API stores — "ชั้นดาดฟ้า" or "Sunset Zone" —
   so it must never be tracked or uppercased: Thai has no word spaces and
   tracking breaks vowel and tone-mark positioning. */
.zonegroup__title {
  font-size: .8125rem; letter-spacing: normal; text-transform: none;
  color: var(--text-muted); font-family: var(--font-body); margin-bottom: .45rem;
  font-weight: 500;
}
.zones { display: grid; gap: .5rem; }
.zone {
  appearance: none; cursor: pointer; text-align: start; font: inherit;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text); padding: .7rem .85rem; min-height: var(--tap);
  display: grid; gap: .2rem;
}
.zone:hover { border-color: var(--border-strong); }
.zone[aria-pressed="true"] { border-color: var(--sel-line); box-shadow: inset 0 0 0 1px var(--sel-line); background: var(--accent-soft); }
.zone__name { font-weight: 500; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.zone__note { font-size: .75rem; color: var(--text-muted); line-height: 1.6; }
.tag {
  display: inline-block; font-size: .6875rem; line-height: 1.6;
  padding: 0 .45rem; border-radius: 999px; border: 1px solid var(--border-strong);
  color: var(--text-muted); white-space: nowrap;
}
.tag--in { border-color: var(--sage); color: var(--ok); background: var(--ok-soft); }
.tag--out { border-color: var(--border-strong); }

/* ---------- 16. Form ---------- */
.field { display: grid; gap: .35rem; margin-bottom: .95rem; }
.field > label { font-size: var(--step--1); font-weight: 500; }
.field .req { color: var(--danger); }
.field .help { font-size: .75rem; color: var(--text-muted); }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; min-height: var(--tap);
  font: inherit; font-size: 1rem;              /* 16px — stops iOS zoom-on-focus */
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: .6rem .75rem;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.7; }
select { appearance: none; padding-inline-end: 2rem; background-image: none; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; inset-inline-end: .85rem; top: 50%;
  width: 8px; height: 8px; margin-top: -6px; pointer-events: none;
  border-inline-end: 1.5px solid var(--text-muted); border-block-end: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .75; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.field__err { font-size: .75rem; color: var(--danger); }

/* ---------- 17. Summary ---------- */
.summary { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.summary__row {
  display: flex; gap: 1rem; align-items: baseline;
  padding: .7rem .9rem; border-bottom: 1px solid var(--border);
}
.summary__row:last-child { border-bottom: 0; }
.summary__k { color: var(--text-muted); font-size: var(--step--1); flex: none; min-width: 7.5rem; }
.summary__v { margin-inline-start: auto; text-align: end; font-weight: 500; }
.summary__row--money { background: var(--bg-sunken); }
.summary__row--money .summary__v {
  font-family: var(--font-display); font-size: var(--step-1); color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.note {
  border-inline-start: 2px solid var(--accent-line);
  background: var(--bg-sunken);
  padding: .7rem .9rem; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--step--1); color: var(--text-muted); line-height: 1.75;
}
.note + .note { margin-top: .6rem; }
.note strong { color: var(--text); font-weight: 500; }

.alert {
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: .8rem .9rem; font-size: var(--step--1); line-height: 1.75;
  margin-bottom: .9rem;
}
.alert--err { border-color: var(--danger); background: var(--danger-soft); color: var(--text); }
.alert--warn { border-color: var(--warn); background: var(--warn-soft); color: var(--text); }
.alert--info { background: var(--bg-sunken); }
.alert__title { font-weight: 500; display: block; margin-bottom: .15rem; }

.empty { color: var(--text-muted); font-size: var(--step--1); padding: 1rem 0; }

.loading { display: flex; align-items: center; gap: .6rem; color: var(--text-muted); font-size: var(--step--1); padding: .9rem 0; }
.spinner {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 18. Success ---------- */
.done { text-align: center; padding: 1.5rem 0 .5rem; }
.done__tick {
  width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line);
}
.done__tick svg { width: 26px; height: 26px; }
.done h2 { font-size: var(--step-2); }
/* The heading takes focus when the booking lands, so a screen reader announces
   the new screen. inline-block keeps the focus ring around the words rather
   than stretching it across the card. */
.done h2[tabindex] { display: inline-block; }

.ref {
  margin: 1.25rem auto; max-width: 20rem;
  border: 1px dashed var(--accent-line); border-radius: var(--radius-lg);
  background: var(--bg-sunken); padding: 1rem;
}
.ref__label { font-size: .75rem; color: var(--text-muted); }
.ref__code {
  font-family: var(--font-mono); font-size: clamp(1.75rem, 8vw, 2.25rem);
  font-weight: 600; letter-spacing: .06em; color: var(--text);
  margin: .3rem 0 .7rem; user-select: all; word-break: break-all;
}
.copy-ok { color: var(--ok); font-size: .75rem; min-height: 1.2em; display: block; margin-top: .4rem; }

.nextsteps { text-align: start; margin-top: 1.5rem; display: grid; gap: .7rem; }
.nextsteps li { display: flex; gap: .7rem; font-size: var(--step--1); color: var(--text-muted); line-height: 1.75; }
.nextsteps .n {
  flex: none; width: 22px; height: 22px; border-radius: 50%; margin-top: .25rem;
  display: grid; place-items: center; background: var(--bg-sunken);
  border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-display); font-size: .75rem;
}

/* ---------- 19. Lookup ---------- */
.lookup-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.lookup-form .field { flex: 1 1 12rem; margin-bottom: 0; }
#ref-input { font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }

.status-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  border-radius: 999px; padding: .15rem .7rem; font-size: .75rem;
  border: 1px solid var(--border-strong); color: var(--text-muted);
}
.status-pill--ok { border-color: var(--sage); background: var(--ok-soft); color: var(--ok); }
.status-pill--warn { border-color: var(--warn); background: var(--warn-soft); color: var(--text); }

/* ---------- 20. Footer ---------- */
.foot {
  border-top: 1px solid var(--border);
  padding: 1.5rem var(--gutter) 2.5rem;
  max-width: var(--wrap); margin: 0 auto;
  color: var(--text-muted); font-size: .75rem; line-height: 1.8;
  display: grid; gap: .5rem;
}
.foot a { color: var(--text-muted); }
.foot__legal { opacity: .9; }

/* ---------- 21. Mock ribbon ---------- */
.mockbar {
  background: var(--warn-soft); border-bottom: 1px solid var(--warn);
  color: var(--text); font-size: .75rem; text-align: center; padding: .4rem var(--gutter);
}

/* ---------- 22. Sticky action bar on phones ---------- */
.stickybar {
  position: sticky; bottom: 0; z-index: 30;
  background: var(--header-bg); backdrop-filter: saturate(150%) blur(10px);
  border-top: 1px solid var(--border);
  padding: .7rem var(--gutter) max(.7rem, env(safe-area-inset-bottom));
  margin: 0 calc(var(--gutter) * -1);
}

/* ---------- 23. Spacing utilities (CSP forbids style attributes) ---------- */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 1.5rem; }
.help { font-size: var(--step--1); color: var(--text-muted); }
