/* ==========================================================================
   Booking engine design system — shared by guest pages and the back office.

   Page stylesheets (public/css/pages/*.css, public/css/admin.css) must build on these tokens and
   components rather than redefining colours, radii or buttons.

   Components (see the sections below):
     Layout      .container .page .page-header .section-subtle .layout-2col > .layout-main/.layout-aside
                 .stack(-xs|-sm|-lg) .cluster .grid-2
     Header      .site-header .brand .header-actions .test-banner   Footer  .site-footer
     Buttons     .btn + .btn-primary|-secondary|-ghost|-danger|-link   sizes .btn-lg .btn-sm .btn-block .btn-icon
                 loading: add .is-loading + aria-busy="true" + disabled (core.js does this for guarded forms)
     Forms       .field .label .req .hint .field-error .input .select .textarea .input-icon
                 .check (checkbox row) .choice-card (large radio/checkbox card) .form-grid .error-summary
     Surfaces    .card .card-pad .card-header .card-title .divider
     Feedback    .alert.alert-{success|info|warning|danger|neutral}  .badge.badge-{…}  .status-icon.tone-{…}
                 .spinner .skeleton .toast
     Booking     .steps .summary .dl-rows .price .price-lg .facts .fact .amenities .amenity .tag-sample
                 .bottom-bar (mobile action bar; body.has-bottom-bar reserves room for it)
     Dialog      dialog.modal .modal-header .modal-title .modal-body .modal-footer .modal-close
     Tables      .table-wrap .table
     Utilities   .visually-hidden .text-sm .text-xs .text-muted .text-strong .num .nowrap
                 .hide-mobile .hide-desktop .no-print .print-only
   Breakpoints: mobile < 768px · tablet 768–1023px · desktop ≥ 1024px
   ========================================================================== */

:root {
  /* Brand */
  --c-primary: #4276b3;          /* buttons, links, icons, selected state — 4.69:1 on white */
  --c-primary-hover: #36649c;
  --c-primary-active: #2d5585;
  --c-primary-strong: #2f5d93;   /* primary-coloured TEXT on tinted/subtle backgrounds */
  --c-primary-50: #eef4fb;       /* selected background */
  --c-primary-100: #dce8f5;
  --c-primary-200: #b9d0ea;

  /* Neutrals */
  --c-bg: #ffffff;
  --c-bg-subtle: #f4f7fb;        /* section bands, page background behind cards */
  --c-bg-muted: #eaf0f7;
  --c-border: #dae2ec;
  --c-border-strong: #b3c0d0;     /* decorative dividers, step connectors */
  --c-input-border: #7f8da0;      /* form control boundaries — 3:1 on white (WCAG 1.4.11) */
  --c-text: #172233;
  --c-text-2: #3b495c;
  --c-text-muted: #56657a;       /* ≥ 4.5:1 on white and on --c-bg-subtle */

  /* Status */
  --c-success: #17754a;  --c-success-bg: #eaf6ef;  --c-success-border: #b5dec6;
  --c-warning: #8a5300;  --c-warning-bg: #fff5e0;  --c-warning-border: #f0d49c;
  --c-danger: #b42318;   --c-danger-bg: #fef1f0;   --c-danger-border: #f5c3be;
  --c-info: #2f5d93;     --c-info-bg: #eef4fb;     --c-info-border: #c6d9ee;
  --c-neutral: #46546a;  --c-neutral-bg: #eef1f5;  --c-neutral-border: #d5dce6;

  /* Type */
  --font: 'Noto Sans Thai', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.875rem;
  --lh: 1.65;                    /* Thai needs room for tone marks above and vowels below */
  --lh-tight: 1.4;

  /* Shape */
  --radius-sm: 8px;
  --radius: 10px;                /* inputs, buttons */
  --radius-card: 14px;           /* cards, modals */
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 60, 0.05);
  --shadow: 0 1px 3px rgba(16, 32, 60, 0.07), 0 1px 2px rgba(16, 32, 60, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 32, 60, 0.14), 0 2px 6px rgba(16, 32, 60, 0.06);
  --focus-ring: 0 0 0 3px rgba(66, 118, 179, 0.35);

  /* Spacing & sizing */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --tap: 44px;                   /* minimum touch target */
  --header-h: 64px;
  --bottom-bar-h: 76px;
  --container: 1160px;
  --gutter: 16px;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}

/* ── Reset ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh);
  color: var(--c-text);
  background: var(--c-bg-subtle);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
.icon { flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: var(--lh-tight); font-weight: 700; color: var(--c-text); }
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
dl, dd { margin: 0; }
a { color: var(--c-primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--c-primary-hover); }
hr { border: 0; border-top: 1px solid var(--c-border); margin: var(--space-4) 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

@media (min-width: 768px) {
  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }
}

/* One visible focus style for every interactive element (keyboard users only). */
:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible, .input:focus-visible, .select:focus-visible, .textarea:focus-visible,
.choice-card:has(:focus-visible) {
  outline: 3px solid var(--c-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Utilities ─────────────────────────────────────────────────────────── */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--c-text); color: #fff; padding: var(--space-2) var(--space-4); border-radius: var(--radius);
}
.skip-link:focus { top: var(--space-2); color: #fff; }
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-muted { color: var(--c-text-muted); }
.text-2 { color: var(--c-text-2); }
.text-strong { font-weight: 600; color: var(--c-text); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.print-only { display: none; }
@media (max-width: 767.98px) { .hide-mobile { display: none !important; } }
@media (min-width: 768px) { .hide-desktop { display: none !important; } }

/* ── Layout ────────────────────────────────────────────────────────────── */

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.page { padding-block: var(--space-6) var(--space-12); }
.page-header { margin-bottom: var(--space-5); }
.page-header p { color: var(--c-text-muted); margin-top: var(--space-1); }
.section-subtle { background: var(--c-bg-subtle); }

.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-xs { display: flex; flex-direction: column; gap: var(--space-1); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.grid-2 { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.layout-2col { display: grid; gap: var(--space-5); align-items: start; }
.layout-main, .layout-aside { min-width: 0; }
@media (min-width: 1024px) {
  .layout-2col { grid-template-columns: minmax(0, 1fr) 372px; gap: var(--space-6); }
  .layout-aside { position: sticky; top: calc(var(--space-6)); }
}

/* ── Header / footer ───────────────────────────────────────────────────── */

.test-banner {
  background: var(--c-warning-bg); color: var(--c-warning); border-bottom: 1px solid var(--c-warning-border);
  font-size: var(--fs-sm); text-align: center; padding: 6px var(--gutter); font-weight: 500;
}
.test-banner .icon { display: inline-block; vertical-align: -3px; margin-right: 4px; }

.site-header { background: var(--c-bg); border-bottom: 1px solid var(--c-border); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--c-text); min-width: 0; }
.brand:hover { color: var(--c-text); }
/* The logo (public/img/logo.webp) is a wordmark that already carries the property name. */
.brand-logo { height: 44px; width: auto; flex-shrink: 0; }
.brand-sub {
  font-size: var(--fs-xs); color: var(--c-text-muted); white-space: nowrap;
  padding-left: var(--space-3); border-left: 1px solid var(--c-border); line-height: 1.4;
}
@media (max-width: 767.98px) { .brand-logo { height: 34px; } }
@media (max-width: 479.98px) { .site-header .brand-sub { display: none; } }
.header-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.header-contact {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap); padding-inline: var(--space-3);
  color: var(--c-text-2); text-decoration: none; font-weight: 500; font-size: var(--fs-sm); border-radius: var(--radius);
}
.header-contact .icon { color: var(--c-primary); }
.header-contact:hover { color: var(--c-text); background: var(--c-bg-subtle); }
@media (max-width: 400px) {
  .header-actions .btn-label-long { display: none; }
}
@media (min-width: 401px) {
  .header-actions .btn-label-short { display: none; }
}

.site-footer { background: var(--c-bg); border-top: 1px solid var(--c-border); color: var(--c-text-2); font-size: var(--fs-sm); }
.footer-inner { display: grid; gap: var(--space-5); padding-block: var(--space-8); }
.footer-name { font-weight: 700; color: var(--c-text); font-size: var(--fs-base); }
.footer-contact { list-style: none; display: grid; gap: var(--space-2); }
.footer-contact li { display: flex; gap: var(--space-2); align-items: flex-start; }
.footer-contact .icon { color: var(--c-primary); margin-top: 3px; }
.footer-contact a { color: var(--c-text-2); }
.footer-note { color: var(--c-text-muted); font-size: var(--fs-xs); border-top: 1px solid var(--c-border); padding-top: var(--space-4); grid-column: 1 / -1; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 1.2fr 1fr; } }

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  --btn-bg: var(--c-bg); --btn-fg: var(--c-text); --btn-border: var(--c-border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--tap); padding: 0 var(--space-5);
  font-weight: 600; font-size: var(--fs-base); line-height: 1.2; text-align: center; text-decoration: none; white-space: nowrap;
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-border); border-radius: var(--radius);
  cursor: pointer; user-select: none; position: relative;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { color: var(--btn-fg); }
.btn-primary { --btn-bg: var(--c-primary); --btn-fg: #fff; --btn-border: var(--c-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { --btn-bg: var(--c-primary-hover); --btn-border: var(--c-primary-hover); }
.btn-primary:active { --btn-bg: var(--c-primary-active); }
.btn-secondary { --btn-fg: var(--c-primary-strong); --btn-border: var(--c-primary-200); }
.btn-secondary:hover { --btn-bg: var(--c-primary-50); --btn-border: var(--c-primary); }
.btn-ghost { --btn-fg: var(--c-text-2); --btn-border: transparent; --btn-bg: transparent; }
.btn-ghost:hover { --btn-bg: var(--c-bg-muted); --btn-fg: var(--c-text); }
.btn-danger { --btn-bg: var(--c-bg); --btn-fg: var(--c-danger); --btn-border: var(--c-danger-border); }
.btn-danger:hover { --btn-bg: var(--c-danger-bg); --btn-border: var(--c-danger); }
.btn-link { --btn-bg: transparent; --btn-border: transparent; --btn-fg: var(--c-primary); padding-inline: var(--space-2); text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { --btn-fg: var(--c-primary-hover); }
.btn-lg { min-height: 52px; font-size: var(--fs-md); padding-inline: var(--space-6); }
.btn-sm { font-size: var(--fs-sm); padding-inline: var(--space-3); }
.btn-block { display: flex; width: 100%; }
.btn-icon { padding: 0; width: var(--tap); }
/* For buttons that carry long values (e-mail addresses): wrap instead of overflowing. */
.btn-wrap { white-space: normal; overflow-wrap: anywhere; padding-block: 10px; }
.btn[disabled], .btn[aria-disabled='true'] { cursor: not-allowed; opacity: 0.55; box-shadow: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; opacity: 1; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px;
  border: 2.5px solid var(--btn-fg); border-right-color: transparent; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-primary.is-loading::after { border-color: #fff; border-right-color: transparent; }

/* ── Forms ─────────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-weight: 600; font-size: var(--fs-sm); color: var(--c-text); }
.label .req { color: var(--c-danger); margin-left: 2px; }
.label .optional { font-weight: 400; color: var(--c-text-muted); }
.hint { font-size: var(--fs-sm); color: var(--c-text-muted); }
.field-error { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-sm); color: var(--c-danger); font-weight: 500; }
.field-error .icon { margin-top: 3px; }
.field-error:empty { display: none; }

.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  background: var(--c-bg); border: 1px solid var(--c-input-border); border-radius: var(--radius);
  font-size: var(--fs-base); line-height: 1.4; color: var(--c-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder, .textarea::placeholder { color: #7a8799; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--c-text-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--c-primary); box-shadow: var(--focus-ring); outline: none; }
.input[aria-invalid='true'], .select[aria-invalid='true'], .textarea[aria-invalid='true'] {
  border-color: var(--c-danger); background: #fffafa;
}
.input[aria-invalid='true']:focus, .select[aria-invalid='true']:focus, .textarea[aria-invalid='true']:focus {
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.2);
}
.textarea { min-height: 104px; resize: vertical; }
.select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2356657a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input[type='date'].input { min-height: 48px; }
input[type='date'].input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.7; }

/* Input with a leading icon: <div class="input-icon"><%- icon('mail') %><input class="input"></div> */
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--c-text-muted); pointer-events: none; }
.input-icon > .input, .input-icon > .select { padding-left: 44px; }

.form-grid { display: grid; gap: var(--space-4) var(--space-4); }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid > .span-2 { grid-column: 1 / -1; }
}

/* Checkbox row: <label class="check"><input type="checkbox"><span>…</span></label> */
.check { display: flex; gap: var(--space-3); align-items: flex-start; cursor: pointer; min-height: var(--tap); padding-block: 10px; }
.check input {
  appearance: none; flex-shrink: 0; width: 22px; height: 22px; margin: 1px 0 0; cursor: pointer;
  border: 1.5px solid var(--c-input-border); border-radius: 6px; background: var(--c-bg);
  display: grid; place-content: center; transition: background-color 0.15s ease, border-color 0.15s ease;
}
.check input::before {
  content: ''; width: 12px; height: 12px; transform: scale(0); transition: transform 0.1s ease;
  background: #fff; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.check input:checked { background: var(--c-primary); border-color: var(--c-primary); }
.check input:checked::before { transform: scale(1); }
.check input:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.check input[aria-invalid='true'] { border-color: var(--c-danger); }

/* Large selectable card for radio choices (payment method etc.):
   <label class="choice-card"><input type="radio" class="visually-hidden" name="m"> <span class="choice-icon">…</span>
   <span class="choice-text"><span class="choice-title">…</span><span class="choice-desc">…</span></span></label> */
.choice-card {
  display: flex; align-items: center; gap: var(--space-4); min-height: 72px; padding: var(--space-4) var(--space-5);
  background: var(--c-bg); border: 1.5px solid var(--c-border); border-radius: var(--radius-card);
  cursor: pointer; position: relative; transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.choice-card:hover { border-color: var(--c-primary-200); }
.choice-card:has(input:checked), .choice-card.is-selected {
  border-color: var(--c-primary); background: var(--c-primary-50); box-shadow: 0 0 0 1px var(--c-primary);
}
.choice-card:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
.choice-icon {
  width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px;
  background: var(--c-primary-50); color: var(--c-primary);
}
.choice-card:has(input:checked) .choice-icon { background: var(--c-primary); color: #fff; }
.choice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.choice-title { font-weight: 600; font-size: var(--fs-md); color: var(--c-text); }
.choice-desc { font-size: var(--fs-sm); color: var(--c-text-muted); }
.choice-card:has(input:checked) .choice-desc { color: var(--c-text-2); }
.choice-radio {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--c-input-border); background: var(--c-bg);
  display: grid; place-items: center;
}
.choice-card:has(input:checked) .choice-radio { border-color: var(--c-primary); }
.choice-card:has(input:checked) .choice-radio::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--c-primary); }

.error-summary { border: 1px solid var(--c-danger-border); background: var(--c-danger-bg); border-radius: var(--radius-card); padding: var(--space-4) var(--space-5); }
.error-summary h2 { font-size: var(--fs-base); color: var(--c-danger); display: flex; gap: var(--space-2); align-items: center; }
.error-summary ul { margin-top: var(--space-2); padding-left: var(--space-6); color: var(--c-danger); }
.error-summary a { color: var(--c-danger); font-weight: 500; }

/* ── Surfaces ──────────────────────────────────────────────────────────── */

.card { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.card-pad { padding: var(--space-5); }
@media (min-width: 768px) { .card-pad { padding: var(--space-6); } }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.card-title { font-size: var(--fs-lg); font-weight: 700; display: flex; align-items: center; gap: var(--space-2); }
.card-title .icon { color: var(--c-primary); }
.divider { border: 0; border-top: 1px solid var(--c-border); margin: var(--space-4) 0; }

/* ── Feedback ──────────────────────────────────────────────────────────── */

.alert {
  --tone: var(--c-info); --tone-bg: var(--c-info-bg); --tone-border: var(--c-info-border);
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-4); border-radius: var(--radius-card); border: 1px solid var(--tone-border); background: var(--tone-bg);
  color: var(--c-text);
}
.alert > .icon { color: var(--tone); margin-top: 2px; }
.alert-content { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.alert-title { font-weight: 600; color: var(--c-text); }
.alert-body { font-size: var(--fs-sm); color: var(--c-text-2); }
.alert-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.alert-success, .tone-success { --tone: var(--c-success); --tone-bg: var(--c-success-bg); --tone-border: var(--c-success-border); }
.alert-warning, .tone-warning { --tone: var(--c-warning); --tone-bg: var(--c-warning-bg); --tone-border: var(--c-warning-border); }
.alert-danger, .tone-danger { --tone: var(--c-danger); --tone-bg: var(--c-danger-bg); --tone-border: var(--c-danger-border); }
.alert-info, .tone-info { --tone: var(--c-info); --tone-bg: var(--c-info-bg); --tone-border: var(--c-info-border); }
.alert-neutral, .tone-neutral { --tone: var(--c-neutral); --tone-bg: var(--c-neutral-bg); --tone-border: var(--c-neutral-border); }

.badge {
  --tone: var(--c-neutral); --tone-bg: var(--c-neutral-bg); --tone-border: var(--c-neutral-border);
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; min-height: 26px;
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.3; white-space: nowrap;
  color: var(--tone); background: var(--tone-bg); border: 1px solid var(--tone-border); border-radius: 999px;
}
.badge .icon { width: 14px; height: 14px; }
.badge-success { --tone: var(--c-success); --tone-bg: var(--c-success-bg); --tone-border: var(--c-success-border); }
.badge-warning { --tone: var(--c-warning); --tone-bg: var(--c-warning-bg); --tone-border: var(--c-warning-border); }
.badge-danger { --tone: var(--c-danger); --tone-bg: var(--c-danger-bg); --tone-border: var(--c-danger-border); }
.badge-info { --tone: var(--c-info); --tone-bg: var(--c-info-bg); --tone-border: var(--c-info-border); }
.badge-neutral { --tone: var(--c-neutral); --tone-bg: var(--c-neutral-bg); --tone-border: var(--c-neutral-border); }

/* Round status icon. Combine with a tone class: <span class="status-icon tone-success">…icon…</span> */
:where(.status-icon) { --tone: var(--c-info); --tone-bg: var(--c-info-bg); } /* default; .tone-* overrides */
.status-icon {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--tone-bg); color: var(--tone);
}
.status-icon .icon { width: 32px; height: 32px; }
.status-icon.is-spinning .icon { animation: spin 1.4s linear infinite; }

.spinner {
  display: inline-block; width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--c-bg-muted) 0%, #f5f8fc 50%, var(--c-bg-muted) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--radius-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--space-6) + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  z-index: 60; background: var(--c-text); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 500; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: var(--space-2);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
body.has-bottom-bar .toast { bottom: calc(var(--bottom-bar-h) + var(--space-4) + env(safe-area-inset-bottom)); }

/* ── Booking components ────────────────────────────────────────────────── */

/* Step indicator */
.steps-bar { background: var(--c-bg); border-bottom: 1px solid var(--c-border); }
.steps { list-style: none; display: flex; align-items: center; gap: var(--space-2); padding-block: var(--space-3); overflow-x: auto; }
.step { display: flex; align-items: center; gap: var(--space-2); color: var(--c-text-muted); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
.step:not(:last-child)::after { content: ''; width: 28px; height: 1.5px; background: var(--c-border-strong); margin-left: var(--space-1); flex-shrink: 0; }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-size: var(--fs-xs); font-weight: 700; border: 1.5px solid var(--c-border-strong); color: var(--c-text-muted); background: var(--c-bg);
}
.step.is-done { color: var(--c-text-2); }
.step.is-done .step-dot { background: var(--c-primary-50); border-color: var(--c-primary); color: var(--c-primary); }
.step.is-done:not(:last-child)::after { background: var(--c-primary); }
.step.is-current { color: var(--c-text); font-weight: 700; }
.step.is-current .step-dot { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
@media (min-width: 768px) { .step:not(:last-child)::after { width: 48px; } .steps { gap: var(--space-3); } }
/* On small screens keep every dot but only the current label. */
@media (max-width: 599.98px) {
  .step:not(.is-current) .step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .step:not(:last-child)::after { width: 16px; }
  .steps { justify-content: space-between; }
}

/* Booking summary card (partials/booking-summary.ejs) */
.summary { overflow: hidden; }
.summary-media { position: relative; aspect-ratio: 16 / 9; background: var(--c-bg-muted); }
.summary-media img { width: 100%; height: 100%; object-fit: cover; }
.summary-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.summary-room { font-size: var(--fs-md); font-weight: 700; line-height: var(--lh-tight); }
.summary-room-meta { font-size: var(--fs-sm); color: var(--c-text-muted); margin-top: 2px; }
.summary-section-title { font-size: var(--fs-sm); font-weight: 700; color: var(--c-text); }

/* Label/value rows: <dl class="dl-rows"><div><dt>…</dt><dd>…</dd></div></dl> */
.dl-rows { display: flex; flex-direction: column; gap: var(--space-2); }
.dl-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
.dl-rows dt { color: var(--c-text-muted); font-size: var(--fs-sm); flex-shrink: 0; max-width: 60%; }
.dl-rows dd { min-width: 0; overflow-wrap: anywhere; }
.dl-rows dd { text-align: right; font-weight: 500; font-size: var(--fs-sm); color: var(--c-text); }
.dl-rows dd small { display: block; font-weight: 400; color: var(--c-text-muted); font-size: var(--fs-xs); }

.summary-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3);
  padding-top: var(--space-4); border-top: 1px solid var(--c-border);
}
.summary-total-label { font-weight: 700; }
.summary-total-note { font-size: var(--fs-xs); color: var(--c-text-muted); }

.price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--c-text); }
.price-lg { font-size: var(--fs-xl); line-height: 1.2; }
.price-unit { font-size: var(--fs-sm); color: var(--c-text-muted); font-weight: 400; }

/* Room facts: size · guests · bed */
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.fact { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--c-text-2); }
.fact .icon { color: var(--c-primary); }

.amenities { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.amenity { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--c-text-2); }
.amenity .icon { color: var(--c-primary); width: 18px; height: 18px; }

/* Visible label on sample photos. Place inside a position:relative image wrapper. */
.tag-sample {
  position: absolute; left: var(--space-2); top: var(--space-2); z-index: 1;
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  font-size: var(--fs-xs); font-weight: 600; color: #fff; background: rgba(23, 34, 51, 0.78); border-radius: 6px;
}
.tag-sample .icon { width: 14px; height: 14px; }

/* Mobile action bar (partials/bottom-bar.ejs). Hidden from 1024px, where the sticky aside shows the total.
   It sits at the bottom of the viewport; body.has-bottom-bar adds matching padding so it never covers
   content, and core.js adds html.kb-open while a text field is focused so it never covers the keyboard. */
.bottom-bar {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: var(--bottom-bar-h); padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom));
  background: var(--c-bg); border-top: 1px solid var(--c-border); box-shadow: 0 -4px 16px rgba(16, 32, 60, 0.08);
  transition: transform 0.2s ease;
}
.bottom-bar-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.bottom-bar-label { font-size: var(--fs-xs); color: var(--c-text-muted); }
.bottom-bar-amount { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.bottom-bar .btn { flex-shrink: 0; }
body.has-bottom-bar { padding-bottom: calc(var(--bottom-bar-h) + env(safe-area-inset-bottom)); }
html.kb-open .bottom-bar { transform: translateY(110%); }
@media (min-width: 1024px) {
  .bottom-bar { display: none; }
  body.has-bottom-bar { padding-bottom: 0; }
}

/* ── Dialog ────────────────────────────────────────────────────────────── */

dialog.modal {
  width: min(880px, calc(100% - 32px)); max-height: min(90vh, 900px); padding: 0; border: 0;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); color: var(--c-text); background: var(--c-bg);
  overflow: hidden; display: none; flex-direction: column;
}
dialog.modal[open] { display: flex; }
dialog.modal.modal-sm { width: min(480px, calc(100% - 32px)); }
dialog.modal::backdrop { background: rgba(15, 23, 42, 0.55); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5); border-bottom: 1px solid var(--c-border); flex-shrink: 0;
}
.modal-title { font-size: var(--fs-md); font-weight: 700; }
.modal-body { padding: var(--space-5); overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-3);
  padding: var(--space-3) var(--space-5); border-top: 1px solid var(--c-border); background: var(--c-bg); flex-shrink: 0;
}
@media (max-width: 767.98px) {
  dialog.modal:not(.modal-sm) { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; margin: 0; }
  .modal-footer { padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom)); }
}
body:has(dialog.modal[open]) { overflow: hidden; }

/* ── Tables ────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius-card); background: var(--c-bg); }
.table { width: 100%; font-size: var(--fs-sm); }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--c-border); }
.table th { background: var(--c-bg-subtle); font-weight: 600; color: var(--c-text-2); white-space: nowrap; font-size: var(--fs-xs); letter-spacing: 0.01em; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcfe; }
.table .num { text-align: right; }

/* ── Print ─────────────────────────────────────────────────────────────── */

@media print {
  body { background: #fff; font-size: 12pt; padding: 0 !important; }
  .no-print, .site-header .header-actions, .site-footer, .test-banner, .bottom-bar, .toast, .skip-link, dialog { display: none !important; }
  .print-only { display: block !important; }
  .card { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

.flash-wrap { padding-top: var(--space-4); }
.cluster-between { justify-content: space-between; }
.error-card { max-width: 560px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-4); }
.error-actions { justify-content: center; }
