/* ================================================================
   builder.css — Allergy Card Builder page-specific styles
   Extracted from index.html inline <style> block.
   All design tokens inherit from /main.css — no standalone system.
   Do not add global styles here; scope everything to .ac-* classes
   or builder-specific selectors.
================================================================ */


/* ── UTILITY CLASSES ── */
/* Replaces inline style="display:none" throughout index.html and builder.js.
   Use classList.add/remove('u-hidden') to toggle visibility. */
.u-hidden { display: none !important; }

/* Semantic state utilities — prefer these over inline style.display toggles.
   .is-hidden  : visually and structurally removes an element (mirrors u-hidden but
                 without !important, so CSS specificity can override for modals/overlays)
   .is-open    : marks interactive disclosures (modals, dropdowns, accordions) as expanded
   .is-active  : marks the currently selected/focused item in a list or tab set
   .is-shown   : overrides a component-level display:none rule (e.g. inline error messages) */
.is-hidden { display: none; }
.is-open   {}          /* behaviour hook — appearance defined per component */
.is-active {}          /* behaviour hook — appearance defined per component */
.is-shown  { display: block; } /* overrides component-level display:none rules */

/* ── DOWNLOAD SPINNER OVERLAY ── */
/* Replaces inline style.cssText in the download function */
.ap-dl-spinner-host { position: relative; }
.ap-dl-spinner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  border-radius: inherit;
  z-index: 10;
}

/* ── PRINT BUTTON SIZE MODIFIER ── */
.btn--sm-text { font-size: 0.875rem; }

/* ============================================================
   ALLERGY CARD BUILDER — Page-specific styles
   All tokens from main.css. No standalone design system.
============================================================ */

/* ── DOWNLOAD RING SPINNER ── */
@keyframes ap-ring-spin { to { transform: rotate(360deg); } }
.ap-ring-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(44,31,20,0.15);
  border-top-color: var(--bark);
  border-radius: 50%;
  animation: ap-ring-spin 0.75s linear infinite;
}

/* ── DEST INSIGHT PLACEHOLDER ── */
.dest-insight--placeholder {
  display: block !important;
  color: var(--soil);
  font-style: italic;
  font-size: 0.8125rem;
}

/* ── SCROLL-TRIGGERED ANIMATIONS ── */
.animate[data-animation] {
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.animate[data-animation="fade-up"]   { transform: translateY(24px); }
.animate[data-animation="fade-left"] { transform: translateX(20px); }
.animate[data-animation].is-visible  { opacity: 1; transform: none; }

/* ── EXPORT ACTIONS FADE-IN ── */
#exportActions {
  transition: opacity 0.3s var(--ease);
}

/* ── FAQ styles defined below in the FAQ component section ── */


.allergen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.75rem;
}

.allergen-chip {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
  width: 100%;
  min-width: 0; /* grid items default to a content-based min-width, which lets long
                   labels (e.g. "MCAS (Mast Cell Activation Syndrome)") push the
                   button wider than its 148px grid track and overlap the next column */
  min-height: 52px;
}
.allergen-chip:hover {
  border-color: var(--clay);
  background: var(--clay-light);
}
.allergen-chip.selected {
  border-color: var(--clay);
  background: var(--clay-light);
  border-width: 2px;
}
.allergen-chip.selected .ac-chip-name { color: var(--clay-dark); font-weight: 700; }
.ac-chip-emoji { font-size: 1.25rem; flex-shrink: 0; }
.ac-chip-name  { font-size: 0.8125rem; font-weight: 500; color: var(--bark); line-height: 1.3; flex: 1; min-width: 0; overflow-wrap: break-word; }
.ac-chip-check { width: 16px; height: 16px; border-radius: 50%; background: var(--clay); display: flex; align-items: center; justify-content: center; flex-shrink: 0; opacity: 0; transition: opacity 0.15s; }
.allergen-chip.selected .ac-chip-check { opacity: 1; }
.ac-chip-check::after { content: '✓'; color: #fff; font-size: 0.625rem; font-weight: 700; }

/* Medical allergen chips — red accent when selected */
.allergen-chip.medical.selected {
  border-color: var(--red);
  background: #fff5f5;
}
.allergen-chip.medical.selected .ac-chip-name { color: var(--red); }
.allergen-chip.medical.selected .ac-chip-check { background: var(--red); }
.allergen-chip.medical:hover {
  border-color: var(--red);
  background: #fff5f5;
}

/* ── LANGUAGE PICKERS (destination + my-language) ── */
/* Two collapsed dropdown buttons side by side. No badges, no lock icons —
   premium destinations are signaled by the paywall itself once picked, not here. */
.lang-picker-row {
  display: flex;
  gap: 1rem;
}

.lang-picker {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lang-picker__label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--bark);
}

.lang-picker__optional {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--dust);
}

.lang-picker__btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.75rem 0.875rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.lang-picker__btn:hover { border-color: var(--clay); }
.lang-picker__btn[aria-expanded="true"] {
  border-color: var(--clay);
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(var(--clay-rgb, 180,90,20),0.12);
}
.lang-picker__flag {
  width: 28px; height: 19px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  flex-shrink: 0;
  display: block;
}
.lang-picker__flag-slot {
  width: 28px; height: 19px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lang-picker__flag-slot--none {
  font-size: 0.8rem; color: var(--dust);
}
.lang-picker__flag-slot img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  display: block;
}
.lang-picker__name {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lang-picker__chevron {
  color: var(--soil);
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: transform 0.15s var(--ease);
}
.lang-picker__btn[aria-expanded="true"] .lang-picker__chevron { transform: rotate(180deg); }

/* Shared dropdown/sheet panel — one instance in the DOM, repositioned and
   repopulated for whichever picker (destination or my-language) is open.
   Desktop: small anchored popover under the trigger button.
   Mobile (≤640px, see RESPONSIVE below): full-width bottom sheet. */
.lang-panel-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 60;
}
.lang-panel-overlay[hidden] { display: none; }

.lang-panel {
  position: absolute;
  z-index: 61;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  width: 320px;
  max-width: calc(100vw - 2rem);
  max-height: min(420px, 70vh);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
  pointer-events: none;
}
.lang-panel--open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.lang-panel[hidden] { display: none; }

.lang-panel__search-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lang-panel__search {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--bark);
  background: var(--linen);
}
.lang-panel__search:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px var(--clay-mid); }
.lang-panel__close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: var(--linen-mid); border-radius: 50%;
  color: var(--soil); cursor: pointer; flex-shrink: 0; font-size: 0.75rem;
}

.lang-panel__list {
  overflow-y: auto;
  padding: 0.375rem;
}
.lang-panel__row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
}
.lang-panel__row:hover { background: var(--linen-mid); }
.lang-panel__row.selected { background: var(--clay-light); }
.lang-panel__row.selected .lang-panel__row-name { color: var(--clay-dark); font-weight: 700; }
.lang-panel__row-flag {
  width: 24px; height: 16px; object-fit: cover; border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12); flex-shrink: 0; display: block;
}
.lang-panel__row-flag--none {
  width: 24px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--dust); flex-shrink: 0;
}
.lang-panel__row-name { font-size: 0.875rem; font-weight: 600; color: var(--bark); flex: 1; min-width: 0; }
.lang-panel__row-note { font-size: 0.6875rem; color: var(--dust); flex-shrink: 0; }
.lang-panel__empty { padding: 1.5rem 0.875rem; text-align: center; font-size: 0.8125rem; color: var(--dust); }

/* ── CARD PREVIEW ── */
.card-preview-wrap {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.allergy-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(44,31,20,0.12);
  max-width: 340px;
  margin: 0 auto;
  font-family: var(--font-body);
}

.ac-banner {
  padding: 1.25rem 1.5rem;
  position: relative;
}
.ac-banner--ana { background: #CC0000; }
.ac-banner--sev { background: var(--amber); }
.ac-banner--int { background: var(--bark); }

.ac-banner-title { font-size: 1.15rem; font-weight: 900; color: #fff; line-height: 1.2; display: block; }
.ac-banner-sub   { font-size: 0.625rem; color: rgba(255,255,255,0.8); margin-top: 0.25rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; display: block; }

.ac-body { padding: 1rem 1.25rem; }
.ac-allergen-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--linen-mid);
}
.ac-allergen-row:last-of-type { border-bottom: none; }
.ac-allergen-icon { font-size: 1.25rem; flex-shrink: 0; }
.ac-allergen-local { font-size: 1.05rem; font-weight: 800; color: var(--bark); display: block; line-height: 1.15; overflow-wrap: break-word; }
.ac-allergen-rom   { font-size: 0.6rem; color: var(--soil); font-style: italic; display: block; overflow-wrap: break-word; }
.ac-allergen-en    { font-size: 0.7rem; color: var(--soil); display: block; margin-top: 0.1rem; overflow-wrap: break-word; }

.ac-instr {
  background: var(--linen-mid);
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  margin-top: 0.75rem;
}
.ac-instr-local { font-size: 0.8rem; font-weight: 700; color: var(--bark); }
.ac-instr-en    { font-size: 0.625rem; color: var(--soil); margin-top: 0.125rem; }

.ac-footer {
  border-top: 1px solid var(--border);
  padding: 0.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ac-footer-v { font-size: 0.55rem; color: var(--soil); }
.ac-footer-b { font-family: var(--font-display); font-size: 0.7rem; color: var(--clay); font-weight: 700; }

/* empty state */
.preview-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--soil);
  font-size: 0.875rem;
  line-height: 1.7;
}
.preview-empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

/* ── TOOL LAYOUT ── */
/* #tool uses .section--no-top (padding-top:0) to sit close to the social-proof
   strip above it, but zero gap read as the cards being glued to the strip.
   This ID-scoped rule restores a small breathing gap without touching the
   shared .section--no-top rule other pages rely on. */
#tool.section--no-top { padding-top: 1.75rem; }
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

/* ── SECTION GROUP ── */
.tool-group {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 1.5rem;
  /* Subtle depth to match the card treatment used site-wide; without it the
     step panels were the only flat cards on the site. */
  box-shadow: 0 1px 2px rgba(44,31,20,0.04), 0 4px 16px rgba(44,31,20,0.05);
}
.tool-group__header {
  padding: 1.25rem 1.5rem;
  background: var(--linen);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.tool-group__num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bark); color: #fff;
  font-size: 0.8125rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.tool-group__num--done {
  background: #16a34a;
}
.tool-group__num--done::after { content: '✓'; }
/* Step is available but not yet visited */
.tool-group__num--pending {
  background: var(--border);
  color: var(--soil);
}
/* Dim step 2 when step 1 is empty to hint at the expected order */
.tool-group--dimmed {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.tool-group__title { font-size: 1rem; font-weight: 700; color: var(--bark); }
.tool-group__sub   { font-size: 0.8125rem; color: var(--soil); margin-top: 0.125rem; }
.tool-group__body  { padding: 1.5rem; }

.clear-all-btn {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--soil);
  cursor: pointer;
  padding: 0.375rem 0.625rem;
  border-radius: 6px;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.clear-all-btn:hover, .clear-all-btn:focus-visible {
  color: var(--clay-dark);
  text-decoration-color: currentColor;
}
.clear-all-btn:focus-visible { outline: 2px solid var(--bark); outline-offset: 1px; }

/* ── Optional extras (collapsible <details>) ──
   Lives below the preview/export actions, not in the sequential step flow.
   Reset native <summary> marker and add a custom chevron that rotates open. */
.tool-group--collapsible { margin-top: 1.5rem; margin-bottom: 0; }
.tool-group__header--summary {
  cursor: pointer;
  list-style: none;
  justify-content: space-between;
}
.tool-group__header--summary::-webkit-details-marker { display: none; }
.tool-group__header--summary::after {
  content: '';
  width: 10px; height: 10px;
  flex-shrink: 0;
  border-right: 2px solid var(--dust);
  border-bottom: 2px solid var(--dust);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-right: 0.25rem;
}
.tool-group--collapsible[open] > .tool-group__header--summary::after {
  transform: rotate(-135deg);
}
.tool-group--collapsible:not([open]) > .tool-group__header--summary {
  border-bottom: none;
}
.tool-group__header--summary:focus-visible {
  outline: 2px solid var(--bark);
  outline-offset: -2px;
}

/* ── PRESET PILLS ── */
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.preset-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  min-height: 44px; /* WCAG 2.5.8 touch target */
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--white);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bark);
  cursor: pointer;
  font-family: var(--font-body);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
  white-space: nowrap;
}
.preset-pill:hover { border-color: var(--bark); background: var(--linen-mid); }
.preset-pill.active { border-color: var(--bark); background: var(--bark); color: #fff; border-width: 2px; }

/* ── CATEGORY LABEL ── */
.category-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--soil);
  margin: 1.5rem 0 0.625rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.category-label--medical { color: var(--red); border-color: #FECACA; }
/* The first category label in a step body needs no top margin — the
   .tool-group__body padding already provides that spacing, so the extra
   1.5rem here was just dead space above "Allergens and restrictions". */
.tool-group__body > .allergen-common-section:first-child .category-label:first-child {
  margin-top: 0;
}

/* ── SEVERITY TOGGLE ── */
.sev-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.toggle-card {
  background: var(--linen);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1rem;
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
  width: 100%;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.toggle-card:hover { border-color: var(--border-dark); }
.toggle-card.on { border-color: var(--clay); background: var(--clay-light); }
.toggle-card.on.danger { border-color: var(--red); background: #fff5f5; }
.toggle-switch {
  width: 40px; height: 24px; border-radius: 12px;
  background: var(--border-dark);
  position: relative; flex-shrink: 0; margin-top: 1px;
  transition: background 0.2s;
}
.toggle-switch::after {
  content: ''; position: absolute;
  top: 4px; left: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-card.on .toggle-switch { background: var(--clay); }
.toggle-card.on.danger .toggle-switch { background: var(--red); }
.toggle-card.on .toggle-switch::after { left: 20px; }
.toggle-text-title { font-size: 0.875rem; font-weight: 600; color: var(--bark); }
.toggle-text-sub   { font-size: 0.75rem; color: var(--soil); margin-top: 0.125rem; }

/* ── DESTINATION INSIGHT ── */
.dest-insight {
  background: var(--clay-light);
  border: 1px solid var(--clay-mid);
  border-left: 3px solid var(--clay);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  color: var(--bark);
  line-height: 1.7;
  margin-top: 1rem;
  display: none;
}
.dest-insight.show { display: block; }
.dest-insight strong { color: var(--clay-dark); }

/* ── EXPORT ACTIONS ── */
.export-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1.25rem;
}

/* Apple/Google Wallet links, populated by triggerAddToWallet() in builder.js
   after a successful /api/generate-wallet-pass call. Hidden by default via
   u-hidden until links exist. */
.wallet-result-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  margin-top: -0.15rem;
}
.wallet-result-links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clay-dark);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

/* ── FREE FLOW (Thailand / English) ──
   Instant PNG button + an email box for the image/Wallet package. No pricing,
   no plan picker — destination alone (FREE_DESTINATIONS_SET) puts a user here. */
.free-flow { margin-top: 1.25rem; }
.free-email-box {
  margin-top: 0.875rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--linen);
}
.free-email-box__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--bark);
  margin: 0 0 0.375rem;
}
.free-email-box__copy {
  font-size: 0.8125rem;
  color: var(--soil);
  line-height: 1.55;
  margin: 0 0 0.875rem;
}
.free-email-box__form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.free-email-box__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.9375rem;
  font-size: 1rem;
  font-family: var(--font-body);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  color: var(--bark);
  background: var(--white);
  transition: border-color 0.15s var(--ease);
}
.free-email-box__input:focus { border-color: var(--bark); }
.free-email-box__error {
  font-size: 0.8125rem;
  color: var(--red);
  margin: 0.625rem 0 0;
}
.free-email-box__success {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  color: var(--soil);
  text-align: center;
}
.free-email-box__success p { margin: 0 0 0.375rem; }

/* ── PAID FLOW (every other destination) ──
   Plan picker (Single Trip / Unlimited / Founders Pass) + one CTA whose
   label/destination resolve dynamically in builder.js's PLANS map. */
.paid-flow { margin-top: 1.25rem; }
.plan-picker {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.plan-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  font-family: var(--font-body);
  color: var(--bark);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.625rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.plan-option:hover { border-color: var(--border-dark); }
.plan-option--active {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--white);
}
.plan-option__name { font-size: 0.8125rem; font-weight: 700; }
.plan-option__price { font-size: 0.75rem; opacity: 0.85; }

.plan-billing-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}
.billing-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bark);
  background: var(--linen);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
}
.billing-pill--active {
  background: var(--bark);
  border-color: var(--bark);
  color: var(--white);
}
.billing-pill__save {
  font-size: 0.6875rem;
  opacity: 0.8;
}

.tier-picker__note {
  font-size: 0.75rem;
  color: var(--dust);
  text-align: center;
  margin: 0.625rem 0 0;
  line-height: 1.5;
}
#btnRecoverAccess {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 0.625rem;
}

/* ── COUNT BADGE ── */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--clay);
  color: #fff;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 0.375rem;
}

/* ── PAYWALL NOTICE ── */
.paywall-notice {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--bark);
  line-height: 1.7;
  display: none;
}
.paywall-notice.show { display: block; }
.paywall-notice strong { color: var(--amber); }

/* ── CARD COPY SECTION (below preview on mobile) ── */
.card-copy-section { margin-top: 1.25rem; }

/* ── HOW IT WORKS (compact single-row tracker) ──
   Originally a 4-card grid with full descriptions; compressed because this
   content largely restates what the interactive tool shows immediately
   below, and its height was pushing the tool's Show Card/Download CTAs far
   below the fold on first load. */
.how-it-works--compact { padding: 1.5rem 0; }
.how-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}
.how-compact__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bark);
  margin: 0;
  white-space: nowrap;
}
.how-compact__label em { color: var(--clay-dark); font-style: normal; }
.how-compact__steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.375rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.how-compact__steps li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--soil);
  white-space: nowrap;
}
.how-compact__num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bark); color: #fff;
  font-size: 0.6875rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── FAQ ACCORDION ── */
.faq-item {
  border-top: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; background: none; border: none;
  padding: 1.25rem 0;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.9375rem; font-weight: 700;
  color: var(--bark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-question:hover { color: var(--clay); }
.faq-chevron {
  width: 20px; height: 20px; flex-shrink: 0;
  margin-left: auto; margin-right: 0;
  border: 1.5px solid var(--border-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--soil);
  transition: transform 0.2s var(--ease), border-color 0.15s;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  border-color: var(--clay);
  color: var(--clay);
}
/* ── FAQ: grid-based collapse (avoids magic max-height number) ── */
.faq-answer {
  font-size: 0.875rem;
  color: var(--soil);
  line-height: 1.8;
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.28s var(--ease), padding 0.22s var(--ease);
  padding-top: 0;
  padding-bottom: 0;
}
.faq-answer > p,
.faq-answer > div,
.faq-answer > * { min-height: 0; }
.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
  padding-top: 0.75rem;
  padding-bottom: 1.25rem;
}

/* ── WHY CARDS MATTER ── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.why-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
}
.why-card__icon { font-size: 2rem; margin-bottom: 0.875rem; }
.why-card h3 { font-size: 1rem; font-weight: 700; color: var(--bark); margin-bottom: 0.5rem; }
.why-card p  { font-size: 0.875rem; color: var(--soil); line-height: 1.75; }

/* ── TOOL SECTION INTRO ── */
.tool-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── RELATED TOOLS ── */
/* .bi-card / .bi-grid (image-hero cards) are shared global classes, but
   several of their custom properties are only ever defined under
   `body.blog-index`. Map them locally to this page's existing tokens so the
   cards render correctly here too, without touching main.css or adding the
   blog-index body class. */
section[aria-labelledby="tools-heading"] {
  --radius-md: var(--radius);
  --shadow-sm: 0 1px 3px rgba(44,31,20,0.08), 0 4px 12px rgba(44,31,20,0.06);
  --shadow-md: 0 4px 16px rgba(44,31,20,0.10), 0 12px 40px rgba(44,31,20,0.08);
  --linen-dk: var(--linen-dark);
  --serif: var(--font-serif);
  --text-2: var(--soil);
  --text-3: var(--dust);
}

/* ── LANGUAGE CHIPS PREVIEW ── */
.lang-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.875rem;
}
.lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--linen-mid);
  border: 1px solid var(--border);
  color: var(--soil);
}
.lang-chip img { width: 16px; height: 11px; object-fit: cover; border-radius: 2px; }
.lang-chip--free { background: var(--clay-light); border-color: var(--clay-mid); color: var(--clay-dark); }

/* Mobile-only step accordion badge/chevron: hidden by default, shown and
   styled inside the >=900px media query below. Without this they'd render
   as unstyled plain text on desktop. */
.mobile-step-badge, .mobile-step-chevron { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; }
  /* Mobile step order: allergens (1) -> languages (2) -> preview + checkout (3).
     .tool-form has no box styling of its own (confirmed: untouched outside
     this block) so display:contents lets its child, group-languages, take an
     independent order value as if it were a direct child of .tool-layout,
     instead of being stuck moving as one unit with the rest of tool-form. */
  .tool-form { display: contents; }
  #group-allergens   { order: 0; }
  #group-languages    { order: 1; }
  .card-preview-wrap { position: static; order: 2; }
  .why-grid  { grid-template-columns: 1fr; }
  .tool-intro-grid { grid-template-columns: 1fr; }

  /* ── MOBILE 3-STEP ACCORDION ──
     Step 1 = allergens, step 2 = destination, step 3 = preview + checkout
     (already one stacked panel: #previewContainer on top, then whichever of
     free-flow/paid-flow/export-actions applies, per updateExportButtons()).
     .tool-group__header and #previewStepHeader double as tappable step
     headers, no new elements needed beyond the step-3 badge/chevron. Desktop
     (>=900px) never sets [data-mstep], so none of this applies there and the
     two-column layout is untouched. */
  .tool-layout[data-mstep] .tool-group__header,
  .tool-layout[data-mstep] #previewStepHeader {
    cursor: pointer;
  }
  .mobile-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--clay);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
  }
  .mobile-step-chevron {
    display: inline-block;
    margin-left: auto;
    color: var(--dust);
    transition: transform 0.2s ease;
  }
  .tool-layout[data-mstep="1"] #group-allergens .mobile-step-chevron,
  .tool-layout[data-mstep="2"] #group-languages .mobile-step-chevron,
  .tool-layout[data-mstep="3"] #previewStepHeader .mobile-step-chevron {
    transform: rotate(180deg);
  }
  /* Collapse every step's body except the active one. #previewStepHeader
     stays visible as step 3's always-visible teaser/nav target; everything
     else in .card-preview-wrap (the live card, then checkout) stays
     collapsed until step 3 is reached. */
  .tool-layout[data-mstep="1"] #group-languages .tool-group__body,
  .tool-layout[data-mstep="2"] #group-allergens .tool-group__body,
  .tool-layout[data-mstep="3"] #group-allergens .tool-group__body,
  .tool-layout[data-mstep="3"] #group-languages .tool-group__body {
    display: none;
  }
  .tool-layout[data-mstep="1"] .card-preview-wrap > :not(:first-child),
  .tool-layout[data-mstep="2"] .card-preview-wrap > :not(:first-child),
  .tool-layout[data-mstep="1"] #previewContainer,
  .tool-layout[data-mstep="2"] #previewContainer {
    display: none;
  }
}

@media (max-width: 640px) {
  .allergen-grid { grid-template-columns: repeat(2, 1fr); }
  .sev-row       { grid-template-columns: 1fr 1fr; }
  /* Preset row: horizontal scroll so chips never shrink below their content */
  .preset-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .preset-row::-webkit-scrollbar { display: none; }

  /* Language pickers stack instead of squeezing two dropdowns side by side */
  .lang-picker-row { flex-direction: column; }

  /* Panel becomes a bottom sheet — same component, no JS branching needed.
     Unlike the desktop dropdown (which is now position:absolute so it
     scrolls with the page), the mobile sheet stays pinned to the viewport. */
  .lang-panel {
    position: fixed;
    left: 0; right: 0; bottom: 0; top: auto !important;
    width: 100%; max-width: none;
    border-radius: 1.25rem 1.25rem 0 0;
    max-height: 75vh;
    transform: translateY(100%);
  }
  .lang-panel--open { transform: translateY(0); }
  .lang-panel-overlay { background: rgba(38,28,20,0.4); }

  /* main.css's 640px breakpoint resets `.section` to `padding: 3rem 0`,
     which (same specificity, declared later) overrides `.section--no-top`'s
     padding-top and reopens a large gap between the social-proof strip and
     the builder below it. Compound selector wins without touching main.css.
     Kept at a small non-zero value (not 0) to match the desktop gap above. */
  #tool.section--no-top { padding-top: 1rem; }
}

@media (max-width: 480px) {
  /* Recover ~16px of horizontal space on SE-class phones */
  .tool-group__body { padding: 1rem; }
  .tool-group__header { padding: 1rem; }
}

/* ── SOCIAL PROOF STRIP ── */
.social-proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  padding: 0.875rem 1.25rem;
  background: var(--linen-mid);
  border-bottom: 1px solid var(--border);
}
.social-proof-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--soil);
  font-weight: 500;
}
.social-proof-item::before {
  content: '✓';
  color: #16a34a;
  font-weight: 700;
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  /* Above-the-fold reclaim on phones: stacked, the how strip (130px) and
     proof strip (114px) pushed the tool to ~308px down a 844px viewport.
     Collapse each to a single swipeable row instead. */
  .how-compact__label { width: 100%; text-align: center; }
  .how-compact__steps {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.125rem;
  }
  .how-compact__steps::-webkit-scrollbar { display: none; }
  .social-proof-strip {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .social-proof-strip::-webkit-scrollbar { display: none; }
  .social-proof-item { white-space: nowrap; flex-shrink: 0; }
}

/* Demoted actions rendered as a small inline caption instead of a
   full-width button, e.g. "Recover access on another device", so a
   secondary control doesn't carry the same visual weight as
   Download / Wallet. */
.btn--text-inline {
  align-self: center;
  width: auto;
  margin: 0.15rem auto 0;
  padding: 0.2rem 0.4rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-style: dotted;
}

/* Small muted caption directly below a button, e.g. under Premium explaining
   what's not built yet. Lives as a sibling in the .export-actions flex column,
   not inside the button — .btn is display:inline-flex with no flex-direction
   set (so row, by default), which would have shoved a nested span sideways
   instead of stacking it underneath. */
.export-actions__note {
  margin: -0.3rem 0 0 0;
  padding: 0;
  font-size: 0.75rem;
  color: var(--soil);
  text-align: center;
  font-style: italic;
}

/* ── SHOW ALL ALLERGENS TOGGLE ── */
.allergen-common-section { }
.allergen-expand-row {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.allergen-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  min-height: 44px; /* WCAG 2.5.8 touch target */
  border: 1.5px dashed var(--border-dark);
  border-radius: 100px;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--soil);
  cursor: pointer;
  font-family: var(--font-body);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.allergen-expand-btn:hover {
  border-color: var(--clay);
  color: var(--clay);
  background: var(--clay-light);
}
.allergen-expand-btn .expand-chevron {
  transition: transform 0.2s ease;
  display: inline-block;
  font-style: normal;
}
.allergen-expand-btn.expanded .expand-chevron {
  transform: rotate(180deg);
}
.allergen-all-section {
  display: none;
}
.allergen-all-section.visible {
  display: block;
}

/* ── ALLERGEN SEARCH ── */
.allergen-search-row {
  position: relative;
  margin-top: 1rem;
  display: flex;
  align-items: center;
}
.allergen-search-input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1.5px solid var(--border-dark);
  border-radius: 100px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--linen);
  color: var(--soil);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s var(--ease);
}
.allergen-search-input:focus {
  border-color: var(--clay);
}
.allergen-search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.125rem 0.375rem;
  border: none;
  border-radius: 100px;
  background: transparent;
  font-size: 0.75rem;
  color: var(--soil);
  cursor: pointer;
  line-height: 1;
  font-family: var(--font-body);
  transition: color 0.15s var(--ease);
}
.allergen-search-clear:hover {
  color: var(--bark);
}
.allergen-search-count {
  margin: 0.5rem 0 0;
  padding: 0 0.25rem;
  font-size: 0.75rem;
  color: var(--soil);
  font-family: var(--font-body);
  line-height: 1.4;
}

/* ── TRAVELER PASS CARD ── */
.traveler-pass-card {
  border: 1.5px solid var(--clay-mid);
  background: linear-gradient(135deg, var(--clay-light) 0%, #fff 100%);
  border-radius: var(--radius-lg);
  padding: 1rem 1.125rem;
  margin-top: 0.75rem;
}
.traveler-pass-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}
.traveler-pass-card__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--clay-dark);
}
.traveler-pass-card__sub {
  font-size: 0.6875rem;
  color: var(--clay);
  margin-top: 0.125rem;
}
.traveler-pass-card__price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--clay-dark);
  flex-shrink: 0;
}
.traveler-pass-card__items {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.traveler-pass-card__item {
  font-size: 0.75rem;
  color: var(--soil);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.traveler-pass-card__item::before {
  content: '✓';
  color: var(--clay);
  font-weight: 700;
  font-size: 0.6875rem;
  flex-shrink: 0;
}
.traveler-pass-cta {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.625rem;
  background: var(--clay);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.traveler-pass-cta:hover {
  background: var(--clay-dark);
}

/* ── DEMO CARD INDICATOR ── */
.preview-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--soil);
  background: var(--linen-mid);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.2rem 0.5rem;
  margin-top: 0.75rem;
  text-align: center;
}

/* ── PAYWALL NOTICE — stronger ── */
.paywall-notice--strong {
  background: #FFFBEB;
  border: 1.5px solid var(--amber);
  border-left: 4px solid var(--amber);
}
.paywall-notice--strong strong { color: var(--amber); }
.paywall-notice-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

/* ── PRINT ── */
@media print {
  /* Hide everything except the card preview */
  body > *:not(main) { display: none !important; }
  main > *:not(#tool) { display: none !important; }
  #tool .tool-form,
  #tool .section-header,
  nav, footer,
  .card-copy-section,
  .export-actions,
  #freeConfirm,
  #premiumCta,
  .dest-insight,
  #ap-toast,
  .social-proof-strip,
  #hiddenIngredientsPanel,
  #ap-paywall-overlay { display: none !important; }
  .tool-layout { grid-template-columns: 1fr !important; }
  .card-preview-wrap { position: static !important; box-shadow: none !important; }
  /* Strip the "Live Preview" header bar */
  .card-preview-wrap > div > div:first-child { display: none !important; }
  .allergy-card {
    max-width: 100% !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }
}

/* ── HIDDEN INGREDIENTS PANEL ──────────────────────────────────────────
   Educational preview component shown below the allergy card.
   Reads hiddenSources from allergen data. Not part of the printable card.
   Excluded from print and html2canvas via #hiddenIngredientsPanel selector.
────────────────────────────────────────────────────────────────────── */
.hi-panel {
  margin-top: 1rem;
  background: var(--linen);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 340px;
  margin-inline: auto;
  font-family: var(--font-body);
}

.hi-panel__head {
  background: var(--bark);
  padding: 0.625rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.hi-panel__title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  display: block;
}

.hi-panel__sub {
  font-size: 0.625rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  letter-spacing: 0.03em;
  display: block;
}

.hi-panel__body {
  padding: 0.625rem 0.875rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.hi-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hi-row__head {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.hi-row__emoji {
  font-size: 0.9375rem;
  flex-shrink: 0;
  line-height: 1;
}

.hi-row__name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bark);
  line-height: 1.2;
}

.hi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding-left: 1.5rem; /* indent under emoji */
}

.hi-chip {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--soil);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  line-height: 1.5;
  white-space: nowrap;
}

.hi-chip--more {
  color: var(--soil);
  background: transparent;
  border-color: transparent;
  font-style: italic;
  padding-left: 0;
}

/* ── Print: hide the Hidden Ingredients panel (not part of the card) ── */
#demoCardWrap, #tierCompare {
  transition: opacity 0.25s ease;
}
#demoCardWrap.fading, #tierCompare.fading {
  opacity: 0;
}

/* ── SEVERITY TOGGLE ON-STATE ── */
.toggle-card.danger.on {
  background: #fff5f5;
  border-color: var(--red);
}
.toggle-card.danger.on .toggle-text-title { color: var(--red); }
.toggle-card.on:not(.danger) {
  background: var(--clay-light);
  border-color: var(--clay-mid);
}
.toggle-card.on:not(.danger) .toggle-text-title { color: var(--clay-dark); }

/* ── FIELD INPUT ── */
.field-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem; /* 16px — prevents iOS Safari auto-zoom on focus */
  background: var(--white);
  color: var(--bark);
  outline: none;
  transition: border-color 0.15s;
}
.field-input:focus { border-color: var(--bark); }

/* ── MULTI-DESTINATION (Frequent Traveler Pack) ── */
.multidest-heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--bark);
  margin-bottom: 0.875rem;
}
.multidest-slots {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.multidest-slot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--linen-mid);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  min-height: 52px;
}
.multidest-slot__num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bark);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.multidest-slot__num--optional {
  background: var(--border);
  color: var(--soil);
}
.multidest-slot select {
  flex: 1;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--bark);
  outline: none;
  min-height: 44px;
}
.multidest-slot select:focus { border-color: var(--bark); }
.multidest-slot__remove {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--soil);
  cursor: pointer;
  font-size: 1.375rem;
  line-height: 1;
  padding: 0.25rem 0.375rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.multidest-slot__remove:hover { color: var(--red); background: #fff5f5; }
.multidest-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1rem;
  border: 1.5px dashed var(--border-dark);
  border-radius: 100px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--soil);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
  min-height: 44px;
}
.multidest-add-btn:hover {
  border-color: var(--clay);
  color: var(--clay);
  background: var(--clay-light);
}
.multidest-dup-warning {
  display: none;
  font-size: 0.8125rem;
  color: var(--amber);
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius);
}
.multidest-dup-warning.show { display: block; }
.multidest-summary {
  font-size: 0.8125rem;
  color: var(--soil);
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* ── RTL SUPPORT (Arabic, Hebrew, Persian, Urdu) ── */
/* Applied when card destination is set to RTL language */
.allergy-card[data-rtl="true"],
.allergy-card[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

.allergy-card[data-rtl="true"] .ac-banner-title,
.allergy-card[dir="rtl"] .ac-banner-title {
  text-align: right;
}

.allergy-card[data-rtl="true"] .ac-body,
.allergy-card[dir="rtl"] .ac-body {
  text-align: right;
}

.allergy-card[data-rtl="true"] .ac-allergen-row,
.allergy-card[dir="rtl"] .ac-allergen-row {
  flex-direction: row-reverse;
  text-align: right;
}

.allergy-card[data-rtl="true"] .ac-allergen-icon,
.allergy-card[dir="rtl"] .ac-allergen-icon {
  margin-left: 0;
  margin-right: 0.625rem;
}

.allergy-card[data-rtl="true"] .ac-footer,
.allergy-card[dir="rtl"] .ac-footer {
  flex-direction: row-reverse;
  text-align: right;
}

.allergy-card[data-rtl="true"] .ac-instr,
.allergy-card[dir="rtl"] .ac-instr {
  text-align: right;
}

.allergy-card[data-rtl="true"] .ac-instr-local,
.allergy-card[dir="rtl"] .ac-instr-local {
  text-align: right;
}

/* RTL for form inputs and flex containers */
.allergen-chip[data-rtl="true"] {
  text-align: right;
}

.toggle-card[data-rtl="true"],
.preset-pill[data-rtl="true"] {
  text-align: right;
}

.tool-group__header[data-rtl="true"] {
  flex-direction: row-reverse;
  text-align: right;
}

.tool-group__title[data-rtl="true"],
.tool-group__sub[data-rtl="true"] {
  text-align: right;
}

/* RTL for FAQ and other sections */
.faq-question[data-rtl="true"] {
  text-align: right;
  flex-direction: row-reverse;
}

/* faq-chevron margin merged into component definition below */

.faq-question[data-rtl="true"] .faq-chevron {
  margin-left: 0;
  margin-right: auto;
}

/* ── SOURCE LANGUAGE PICKER ── */
/* Row in the open panel whose language matches the current destination —
   still pickable (renderPreview silently no-ops the column) but dimmed with
   a small inline note so the user understands why nothing changed. */
.lang-panel__row--same-as-dest {
  opacity: 0.55;
}
.lang-panel__row--same-as-dest:hover { background: transparent; }

/* Explainer note below the pickers */
.source-lang-note {
  font-size: 0.72rem;
  color: var(--soil);
  margin-top: 0.875rem;
  line-height: 1.5;
}
.source-lang-note__link {
  color: var(--clay);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── ALLERGY CARD: source-language additions ── */
/* Flex-column wrapper for all label spans within one allergen row */
.ac-allergen-labels {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* Source language label — below English, clay-tinted to distinguish from dest */
.ac-allergen-source {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clay);
  display: block;
  margin-top: 0.175rem;
  line-height: 1.2;
  opacity: 0.85;
  overflow-wrap: break-word;
}

/* Source language instruction line */
.ac-instr-src {
  font-size: 0.625rem;
  color: var(--clay);
  margin-top: 0.125rem;
  font-style: italic;
  opacity: 0.85;
}

/* Source language banner subtitle — muted second line in banner */
.ac-banner-sub--src {
  display: block;
  font-size: 0.65rem;
  opacity: 0.75;
  margin-top: 0.125rem;
  font-style: italic;
}

/* Extra breathing room between allergen rows when two languages are shown */
.allergy-card.has-source-lang .ac-allergen-row {
  padding: 0.575rem 0;
}

/* Related-tools pillar icon as a real photo instead of a flag emoji. Some
   platforms render 🇹🇭 as literal "TH" text with no flag glyph available. */
.pillar-icon--img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  overflow: hidden;
}
.pillar-icon--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Press feedback: the UI acknowledges every tap */
.allergen-chip:active,
.preset-pill:active,
.toggle-card:active,
.allergen-expand-btn:active,
.traveler-pass-cta:active,
.multidest-add-btn:active {
  transform: scale(0.97);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
