/* SpaHQ tour (/tour) and the LuxDelux sandbox (/tour/try/*). Loaded after site.css and pages.css.
   Component rules sit in Bootstrap's "custom" layer; brand tokens come from site.css. */

@layer custom {

  /* =================== Tour hub and chapter pages =================== */
  .tour-hero .lede { max-width: 62ch; }
  .tour-hero .quiet-link { color: var(--mist); font-size: 15px; }
  .tour-hero .quiet-link a { color: var(--gold); }
  .lux-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
  .lux-facts li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
  .lux-facts strong { display: block; font-family: var(--bs-heading-font-family); font-size: clamp(24px, 1.4vw + 16px, 36px); color: var(--ink); line-height: 1.1; }
  .lux-facts span { color: var(--slate); font-size: 15px; }
  @media (min-width: 768px) { .lux-facts { grid-template-columns: repeat(4, 1fr); } }

  .trio { display: grid; gap: 16px; }
  @media (min-width: 768px) { .trio { grid-template-columns: repeat(3, 1fr); } }
  .trio .card-body { padding: clamp(22px, 2vw, 32px); display: flex; flex-direction: column; gap: 8px; }
  .trio h3 { margin: 0; font-size: 1.125rem; }
  .trio p { margin: 0; color: var(--slate); }
  .trio .tag { font-family: var(--bs-heading-font-family); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); }
  .trio .card.is-quiet { background: transparent; border-style: dashed; }

  a.chapter { text-decoration: none; color: inherit; display: block; height: 100%; }
  .chapter { background: #fff; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
  .chapter:hover { border-color: var(--gold); box-shadow: 0 10px 30px rgba(3,37,43,.08); }
  .chapter .thumb { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; object-position: top; background: var(--sand); border-bottom: 1px solid var(--line); }
  .chapter .card-body { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 24px; }
  .chapter .num { font-family: var(--bs-heading-font-family); font-weight: 700; font-size: 13px; letter-spacing: .14em; color: var(--gold-text); }
  .chapter h3 { margin: 0; font-size: 1.1875rem; line-height: 1.25; }
  .chapter p { margin: 0; color: var(--slate); font-size: 15px; }
  .chapter .meta { color: var(--gold-text); font-weight: 600; font-size: 14px; padding-top: 4px; }

  .browser { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(3,37,43,.16); }
  .browser-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--sand); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--slate); }
  .browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #CBBF9F; display: inline-block; }
  .browser-bar span { margin-inline-start: 10px; background: #fff; border-radius: 999px; padding: 3px 14px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .browser img { display: block; width: 100%; height: auto; }

  .walk { list-style: none; padding: 0; margin: 0; display: grid; gap: clamp(20px, 3vw, 36px); counter-reset: walk; }
  .walk li { display: grid; gap: 14px; counter-increment: walk; }
  .walk .walk-text h3 { margin: 0 0 4px; font-size: 1.1875rem; }
  .walk .walk-text h3::before { content: counter(walk); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-inline-end: 10px; border-radius: 50%; background: var(--ink); color: var(--gold); font-size: 15px; vertical-align: middle; }
  .walk .walk-text p { margin: 0; color: var(--slate); }
  .walk img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; display: block; background: #fff; }
  @media (min-width: 900px) { .walk li { grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); align-items: center; } }

  .split { display: grid; gap: 16px; }
  @media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
  .split .card-body { padding: clamp(22px, 2.4vw, 36px); display: flex; flex-direction: column; gap: 12px; }
  .split h2 { font-size: 1.3125rem; margin: 0; }
  .split p { margin: 0; color: var(--slate); }
  .split .card.human { background: var(--ink); color: var(--ivory); border: 0; }
  .split .card.human p { color: var(--mist); }
  .split .card.human .btn-outline { align-self: flex-start; }

  .tour-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
  .tour-nav a { min-height: 56px; }
  .chip-note { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; background: var(--gold-metal); color: var(--ink); border-radius: 999px; padding: 6px 14px; }

  /* =================== LuxDelux sandbox =================== */
  body.lux { background: var(--ivory); color: var(--ink); margin: 0; }
  .preview-strip { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; justify-content: space-between; background: var(--gold-metal); color: var(--ink); font-size: 14px; padding: 10px var(--gutter); }
  .preview-strip a { color: var(--ink); font-weight: 700; min-height: 36px; display: inline-flex; align-items: center; }
  .strip-links { display: flex; gap: 20px; }

  .lux-app { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 56px); }
  body.rec .lux-app { min-height: 100vh; }
  .lux-side { background: var(--ink); color: var(--ivory); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
  .lux-name { font-family: var(--bs-heading-font-family); font-weight: 800; font-size: 20px; margin: 0; letter-spacing: -.01em; }
  .lux-mode { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
  .lux-side nav { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .lux-side nav a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: var(--mist); text-decoration: none; font-weight: 500; }
  .lux-side nav a:hover { color: var(--gold); }
  .lux-side nav a.on { background: rgba(217,183,119,.16); color: var(--gold); }
  .lux-help { margin-top: auto; color: var(--gold); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
  @media (min-width: 900px) {
    .lux-app { grid-template-columns: 230px 1fr; }
    .lux-side { padding: 24px 16px; }
    .lux-side nav { flex-direction: column; flex-wrap: nowrap; }
  }
  .lux-main { padding: clamp(16px, 2.4vw, 36px); min-width: 0; }
  .lux-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; margin-bottom: 20px; }
  .lux-top h1 { font-size: clamp(24px, 1.4vw + 16px, 34px); margin: 0; }
  .lux-top p { color: var(--slate); margin: 2px 0 0; }
  .lux-chip { font-size: 13px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--slate); }
  .lux-chip.status.need { background: #FBF0D9; border-color: var(--gold-lo); color: #5A4316; }
  .lux-chip.status.clear { background: #E3F1E9; border-color: #5E9C78; color: #1D5B3A; }
  .lux-cols { display: grid; gap: 20px; }
  @media (min-width: 1000px) { .lux-cols { grid-template-columns: 2fr 1fr; } .lux-cols.one { grid-template-columns: 1fr; } .lux-cols.visit { grid-template-columns: 1fr 1.1fr 1.2fr; } }
  .lux-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 16px; padding: clamp(16px, 1.6vw, 24px); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .lux-card h2 { font-size: 1.125rem; margin: 0; }
  .lux-card h3 { font-size: 1rem; margin: 6px 0 0; }
  .lux-card-head { padding-bottom: 6px; }
  .lux-card .today-item { grid-template-columns: 1fr auto; }
  .lux-card .today-item.ok { opacity: .95; }
  .lux-card #count.is-clear { color: #1D5B3A; }
  .lux-card button[disabled] { opacity: .5; }
  .lux-quiet { color: var(--slate); font-size: 14px; margin: 0; }
  .lux-ok { display: flex; align-items: center; gap: 8px; color: #1D5B3A; font-weight: 600; margin: 0; }
  .lux-ok .icon { color: #1D5B3A; }
  .badge-chip { border: 0; cursor: pointer; color: var(--ink); }
  .done-mark { font-weight: 700; color: #1D5B3A; white-space: nowrap; }
  .today-item.is-done strong { color: var(--slate); text-decoration: line-through; text-decoration-color: var(--gold-lo); }
  .badge-chip.booked { background: #E3F1E9; color: #1D5B3A; }
  .pill { display: inline-block; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 12px; background: var(--sand); }
  .pill.warn { background: #F7DCCD; color: #7A2E10; }
  .pill.ok { background: #E3F1E9; color: #1D5B3A; }

  .handled { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
  .handled li { display: flex; gap: 10px; align-items: center; color: var(--slate); }
  .handled .icon { color: #1D5B3A; }
  .handled strong { color: var(--ink); }

  .checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
  .checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
  .checks .icon { color: #1D5B3A; margin-top: 2px; }

  .face-wrap { position: relative; width: min(100%, 230px); margin-inline: auto; }
  .face { width: 100%; height: auto; display: block; }
  .face-shape { fill: #FBF6E9; stroke: var(--gold-lo); stroke-width: 1.5; }
  .face-feat { fill: none; stroke: #B79A63; stroke-width: 1.5; stroke-linecap: round; }
  .zone { position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 2px dashed var(--gold-lo); background: rgba(217,183,119,.25); padding: 0; cursor: pointer; transform: translate(-50%, -50%); }
  .zone.on { border-style: solid; background: var(--ink); border-color: var(--ink); }
  .zone.on::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--gold); }
  .z-forehead { left: 50%; top: 22%; }
  .z-glabella { left: 50%; top: 36%; }
  .z-crows { left: 86%; top: 40%; }

  .lux-table { width: 100%; border-collapse: collapse; font-size: 15px; }
  .lux-table th { text-align: start; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .lux-table td { padding: 10px; border-bottom: 1px solid var(--line); }
  .lux-table td:last-child { text-align: end; }
  .lux-table.stock td:last-child, .lux-table.stock th:last-child { text-align: start; }
  .lux-table.margin td, .lux-table.margin th { text-align: end; }
  .lux-table.margin td:first-child, .lux-table.margin th:first-child { text-align: start; }

  .checkout { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
  .line { display: flex; justify-content: space-between; font-size: 15px; }
  .line.total { font-weight: 700; font-size: 17px; border-top: 1px solid var(--line); padding-top: 8px; }
  .rebook { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: #FBF6E9; border-radius: 12px; padding: 10px 12px; font-size: 14px; }

  .draft { background: var(--ivory); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
  .draft p { margin: 0; }
  .draft-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 6px !important; }
  .switch-row { display: flex; gap: 14px; align-items: flex-start; }
  .switch-row label { font-size: 15px; }
  .switch { flex: none; width: 52px; height: 30px; border-radius: 999px; border: 0; background: #C9C2AE; position: relative; padding: 0; cursor: pointer; transition: background .15s ease; }
  .switch .knob { position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s ease; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
  .switch[aria-checked="true"] { background: var(--ink); }
  .switch[aria-checked="true"] .knob { transform: translateX(22px); background: var(--gold); }
  [dir="rtl"] .switch[aria-checked="true"] .knob { transform: translateX(-22px); }
  .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats.one { grid-template-columns: 1fr; }
  .stats div { background: var(--ivory); border-radius: 12px; padding: 12px 14px; }
  .stats strong { display: block; font-family: var(--bs-heading-font-family); font-size: 24px; line-height: 1.1; }
  .stats span { color: var(--slate); font-size: 14px; }

  .tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
  .tab { border: 0; background: transparent; padding: 12px 16px; font-weight: 600; color: var(--slate); border-bottom: 3px solid transparent; min-height: 44px; cursor: pointer; }
  .tab.on { color: var(--ink); border-bottom-color: var(--gold); }
  .note p { font-size: 1.0625rem; color: #24393C; max-width: 62ch; }

  /* ---- Patient booking page (a practice's own branding: blush and champagne) ---- */
  body.lux-booking { background: #FBF3F0; color: #3A2A2A; }
  .bk { max-width: 760px; margin-inline: auto; padding: 0 20px 32px; }
  .bk-head { text-align: center; padding: 28px 0 18px; }
  .bk-brand { font-family: "Montserrat", sans-serif; font-weight: 300; font-size: 38px; letter-spacing: .32em; text-transform: uppercase; margin: 0; color: #8A4B55; }
  .bk-sub { margin: 4px 0 0; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: #A27B6B; }
  .bk-steps { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 0 0 22px; font-size: 13px; color: #A27B6B; flex-wrap: wrap; }
  .bk-steps li { padding: 6px 12px; border-radius: 999px; border: 1px solid #E8D3CB; }
  .bk-steps li.on { background: #8A4B55; color: #fff; border-color: #8A4B55; }
  .bk-steps li.past { background: #F0DCD5; }
  .bk-main h1 { font-size: 26px; text-align: center; margin: 0 0 16px; color: #5C3039; }
  .bk .pick-group { display: grid; gap: 12px; }
  .bk-card { text-align: start; background: #fff; border: 1px solid #E8D3CB; border-radius: 14px; padding: 18px 20px; display: grid; gap: 4px; cursor: pointer; color: inherit; font: inherit; }
  .bk-card span { color: #7A5F5A; font-size: 15px; }
  .bk-card em { font-style: normal; font-weight: 700; color: #8A4B55; }
  .bk-card:hover, .bk-card.is-picked { border-color: #8A4B55; box-shadow: 0 6px 18px rgba(138,75,85,.15); }
  .slots { grid-template-columns: repeat(2, 1fr); }
  .slot { background: #fff; border: 1px solid #E8D3CB; border-radius: 14px; padding: 16px; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
  .slot:hover, .slot.is-picked { border-color: #8A4B55; background: #FBEDEE; }
  .bk-note { text-align: center; color: #7A5F5A; font-size: 15px; }
  .bk-form { display: grid; gap: 8px; max-width: 460px; margin-inline: auto; }
  .bk-form label { font-weight: 600; font-size: 14px; margin-top: 6px; }
  .bk-form .btn-solid { margin-top: 10px; background-image: none; background: #8A4B55; color: #fff; box-shadow: none; }
  .bk-done { text-align: center; display: grid; gap: 10px; justify-items: center; }
  .bk-done .icon-xl { color: #8A4B55; }
  .bk-next { text-align: start; color: #5C3039; max-width: 520px; padding-inline-start: 1.2rem; display: grid; gap: 8px; }
  .bk-foot { text-align: center; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #A27B6B; padding-top: 20px; }

  @media (prefers-reduced-motion: reduce) { .switch, .switch .knob, .chapter { transition: none; } }
}
