/* main.css - Hotel U Hradních (design v2)
 * The whole site is ONE sheet of letter paper lying on a desk, delivered in
 * an envelope. Air over ornament: no stamps, no wax seal, no tilted
 * frames - whitespace, one serif display face, a script accent line, and the
 * real photographs carry everything. Every JS hook (ids, .option-card,
 * data-action, state classes) is preserved.
 *
 * Order: base -> envelope intro -> sheet -> typography -> picker -> forms ->
 * submit/summary -> chrome (bar, modal, footer) -> responsive -> print.
 */

/* --- BASE ---------------------------------------------------------------- */
html {
  /* Android pull-to-refresh reloaded the page mid-chat for the real guest
     (2026-08-02 logs); nothing here needs the gesture. */
  overscroll-behavior-y: contain;
}
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text);
  background: var(--desk);
  line-height: var(--leading-normal);
  padding-bottom: 108px; /* room for the sticky summary bar */
}

h1, h2, h3, h4 { font-family: var(--font-display); font-optical-sizing: auto; }
strong, b { font-weight: var(--weight-semibold); }
::selection { background: var(--terracotta); color: var(--paper-lift); }

.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;
}

/* Paper grain, kept: it is the paper feel, not ornament */
.grain {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  z-index: 40;
}

/* ========================================================================== */
/* ENVELOPE INTRO                                                             */
/* ========================================================================== */

/* Armed only for the first visit of a session (js/boot.js sets the class). */
.env-scene { display: none; }

.env-armed body { overflow: hidden; }
.env-armed .env-scene {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 200;
  background:
    radial-gradient(120% 90% at 50% 30%, #E9DFCC 0%, var(--desk) 55%, #C9BCA6 100%);
  transition: opacity 620ms var(--ease-out);
}
.env-armed.env-open body { overflow: visible; }
.env-armed .sheet,
.env-armed .summary-bar { opacity: 0; pointer-events: none; }
.env-armed.env-open .sheet { opacity: 1; pointer-events: auto; transition: opacity 700ms var(--ease-out); }
.env-armed.env-open .summary-bar { opacity: 1; pointer-events: auto; transition: opacity 700ms var(--ease-out) 200ms; }
.env-scene.is-gone { opacity: 0; pointer-events: none; }

.env-stage {
  position: relative;
  perspective: 1400px;
  perspective-origin: 50% 40%;
  display: grid;
  place-items: center;
}

.envelope {
  position: relative;
  width: var(--env-w);
  height: var(--env-h);
  transform-style: preserve-3d;
  transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out);
}

/* Envelope body: back sheet, front pocket, flap */
.env-back {
  position: absolute;
  inset: 0;
  background: var(--paper-deep);
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  box-shadow: 0 22px 44px rgba(43, 38, 32, 0.26);
  transform: translateZ(-6px);
}
.env-front {
  position: absolute;
  inset: 0;
  transform: translateZ(0);
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  background:
    linear-gradient(148deg, rgba(43, 38, 32, 0.05) 0 42%, transparent 42.4%) left / 50% 100% no-repeat,
    linear-gradient(-148deg, rgba(43, 38, 32, 0.05) 0 42%, transparent 42.4%) right / 50% 100% no-repeat,
    linear-gradient(0deg, rgba(184, 134, 59, 0.10) 0%, transparent 46%),
    var(--paper-lift);
}
.env-flap {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 48%;
  transform-origin: top center;
  transform: translateZ(2px) rotateX(0deg);
  transform-style: preserve-3d;
  transition: transform 760ms cubic-bezier(0.62, 0.02, 0.24, 1);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, var(--paper-lift) 0%, var(--paper-deep) 100%);
  border-top: 1px solid var(--paper-edge);
  filter: drop-shadow(0 3px 4px rgba(43, 38, 32, 0.14));
}
.env-scene.is-opening .env-flap,
.env-scene.is-rising .env-flap,
.env-scene.is-unfolding .env-flap,
.env-scene.is-expanding .env-flap { transform: translateZ(2px) rotateX(-168deg); }

/* The dedication, in the script face, written on the front of the envelope */
.env-dedication {
  position: absolute;
  left: 10%; right: 10%;
  top: 54%;
  transform: translateZ(1px);
  font-family: var(--font-script);
  font-size: clamp(1.3rem, 5.2vw, 1.7rem);
  line-height: 1.16;
  text-align: center;
  text-wrap: balance;
  color: var(--ink);
  transition: opacity 400ms var(--ease-out);
}
.env-scene.is-opening .env-dedication,
.env-scene.is-rising .env-dedication,
.env-scene.is-unfolding .env-dedication,
.env-scene.is-expanding .env-dedication { opacity: 0; }

/* --- The folded letter ---------------------------------------------------- */
.env-letter {
  --letter-w: calc(var(--env-w) * 0.86);
  --third: calc(var(--letter-w) * 0.47);
  position: absolute;
  left: 7%;
  bottom: 12%;
  width: var(--letter-w);
  height: var(--third);
  transform: translateZ(-1px);
  transform-style: preserve-3d;
  transition: transform 780ms cubic-bezier(0.3, 0.9, 0.3, 1);
}
.env-scene.is-rising .env-letter    { transform: translate3d(0, -86%, 24px); }
.env-scene.is-unfolding .env-letter { transform: translate3d(0, -96%, 24px); }
.env-scene.is-expanding .env-letter { transform: translate3d(0, -108%, 24px) scale(2.4); opacity: 0; transition: transform 700ms var(--ease-out), opacity 620ms ease-in 120ms; }

/* One sheet, three panels: no borders - the panel shadow falling on the next
   panel is what reads as a fold crease. */
.env-sheet {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--paper-lift) 0%, #F7F1E6 100%);
  box-shadow: 0 7px 12px rgba(43, 38, 32, 0.13);
  backface-visibility: hidden;
  padding: 12px 16px;
  overflow: hidden;
}
.env-fold .env-sheet { background: linear-gradient(180deg, #EFE7DA 0%, var(--paper-lift) 7%, #F7F1E6 100%); }
.env-sheet--top { display: grid; align-content: start; gap: 5px; }
.env-sheet__mark {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
}
.env-sheet__stars { color: var(--brass); font-size: 0.55rem; letter-spacing: 0.34em; }
.env-sheet__rule { display: block; height: 1px; background: var(--rule-brass); margin: 3px 0 6px; }
/* Faint ruled "handwriting" - pure decoration, no text to read */
.env-sheet__lines {
  display: block;
  height: 100%;
  min-height: 52px;
  background: repeating-linear-gradient(
    180deg,
    rgba(43, 38, 32, 0.16) 0 1.5px,
    transparent 1.5px 11px
  );
  mask-image: linear-gradient(90deg, #000 0 82%, transparent 96%);
  -webkit-mask-image: linear-gradient(90deg, #000 0 82%, transparent 96%);
  opacity: 0.6;
}
.env-sheet__lines--short {
  mask-image: linear-gradient(90deg, #000 0 46%, transparent 62%);
  -webkit-mask-image: linear-gradient(90deg, #000 0 46%, transparent 62%);
}

.env-fold {
  position: absolute;
  top: 100%; left: 0;
  width: 100%; height: 100%;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 620ms cubic-bezier(0.36, 0.66, 0.3, 1);
}
.env-fold--mid { transform: translateZ(-2px) rotateX(180deg); }
.env-fold--bot { transform: translateZ(2px) rotateX(180deg); }
.env-scene.is-unfolding .env-fold--mid,
.env-scene.is-expanding .env-fold--mid { transform: translateZ(0) rotateX(0deg); }
.env-scene.is-unfolding .env-fold--bot,
.env-scene.is-expanding .env-fold--bot { transform: translateZ(0) rotateX(0deg); transition-delay: 380ms; }

/* --- The click target + hint --------------------------------------------- */
.env-hit {
  position: absolute;
  inset: -28px -20px -76px;
  z-index: 12;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.env-hit__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color var(--duration-base) var(--ease-out), opacity 400ms var(--ease-out);
}
.env-stage:has(.env-hit:hover) .envelope,
.env-stage:has(.env-hit:focus-visible) .envelope { transform: translateY(-4px); }
.env-hit:hover .env-hit__label { color: var(--terracotta-deep); }
.env-scene.is-opening .env-hit { pointer-events: none; }
.env-scene.is-opening .env-hit__label { opacity: 0; }

/* Reduced motion: no unfolding choreography - just a calm crossfade */
@media (prefers-reduced-motion: reduce) {
  .envelope, .env-flap, .env-letter, .env-fold { transition: none !important; }
  .env-armed .env-scene { transition: opacity 380ms linear; }
}

/* ========================================================================== */
/* THE SHEET (the whole page = one letter)                                    */
/* ========================================================================== */
.sheet {
  position: relative;
  max-width: var(--sheet-max);
  margin: 0 auto;
  /* The fold creases repeat down the ENTIRE letter (one per folded panel of
     --fold-len), so the paper reads as folded through the whole scroll, not
     just in the first viewport. Shadow edge above the line, light catch
     below - the same faint band the two original creases used. */
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent calc(var(--fold-len) - 8px),
      rgba(43, 38, 32, 0.055) calc(var(--fold-len) - 1px),
      rgba(255, 253, 247, 0.75) calc(var(--fold-len) + 1px),
      transparent calc(var(--fold-len) + 6px)
    ),
    var(--paper);
  box-shadow: 0 2px 6px rgba(43, 38, 32, 0.10), 0 26px 60px rgba(43, 38, 32, 0.14);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4.5rem) clamp(2rem, 4vw, 3.5rem);
  overflow: hidden;
}

/* ========================================================================== */
/* TYPOGRAPHY / SHARED BLOCKS                                                 */
/* ========================================================================== */
.letterhead {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--brass);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--rule-brass);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.kicker {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: var(--space-3);
}

.block {
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: 0;
}
.block--tight { padding-top: clamp(2.5rem, 5vw, 4rem); }
.block__head { max-width: 62ch; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.block__title {
  text-wrap: balance;
  font-size: var(--text-h2);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.block__lead {
  font-size: var(--text-lead);
  color: var(--color-muted);
  line-height: var(--leading-normal);
  margin-top: var(--space-4);
  max-width: 60ch;
}
.block__foot { margin-top: clamp(2rem, 4vw, 3rem); text-align: center; }

/* --- Welcome -------------------------------------------------------------- */
.lede { max-width: 46rem; }
/* The handwritten sign-off under the welcome paragraph */
.lede__script {
  font-family: var(--font-script);
  font-size: clamp(1.45rem, 3.6vw, 2.1rem);
  line-height: 1.25;
  color: var(--terracotta);
  margin-top: var(--space-6);
  max-width: 28ch;
}
.lede__title {
  text-wrap: balance;
  font-size: var(--text-h1);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin-bottom: var(--space-6);
}
.lede__lead {
  font-size: var(--text-lead);
  color: var(--color-muted);
  line-height: var(--leading-loose);
  max-width: 56ch;
}
.lede__actions { margin-top: clamp(1.75rem, 3vw, 2.5rem); }

.reg {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) clamp(2rem, 6vw, 4.5rem);
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  padding-top: var(--space-5);
  border-top: 1px solid var(--paper-edge);
}
.reg__item dt {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 2px;
}
.reg__item dd {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: var(--weight-medium);
  color: var(--ink);
}

.noscript-note {
  background: var(--terracotta-wash);
  border: 1px solid var(--terracotta);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-8);
}

/* --- Room + board (two lean columns) ------------------------------------- */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.duo__title {
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  color: var(--ink);
  margin-bottom: var(--space-2);
}
.duo__lead { color: var(--color-muted); font-size: var(--text-small); margin-bottom: var(--space-4); }

.ruled { border-top: 1px solid var(--paper-edge); }
.ruled li {
  position: relative;
  padding: var(--space-3) 0 var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--paper-edge);
  font-size: var(--text-small);
  line-height: var(--leading-snug);
  color: var(--ink);
}
.ruled li::before {
  content: '\2726';
  position: absolute;
  left: 0; top: var(--space-3);
  color: var(--brass);
  font-size: 0.7em;
}
.ruled--num { counter-reset: dish; }
.ruled--num li::before {
  content: counter(dish);
  counter-increment: dish;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--terracotta);
}

/* ========================================================================== */
/* THE PICKER                                                                 */
/* ========================================================================== */
#picker-mount { counter-reset: chapter; }

.cat {
  counter-increment: chapter;
  padding-top: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--paper-edge);
}
.cat:first-child { margin-top: var(--space-6); }

.cat__head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: var(--space-4);
  margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}
.cat__step {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: var(--weight-semibold);
  color: var(--brass);
  font-variant-numeric: tabular-nums;
}
.cat__step::after { content: counter(chapter, decimal-leading-zero); }
.cat__title {
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  color: var(--ink);
  line-height: var(--leading-snug);
}
.cat__prompt {
  grid-column: 2;
  color: var(--color-muted);
  font-size: var(--text-small);
  margin-top: var(--space-1);
  max-width: 58ch;
}
.cat__note {
  grid-column: 2;
  font-size: var(--text-small);
  color: var(--ink-muted);
  border-left: 2px solid var(--rule-brass);
  padding-left: var(--space-4);
  margin-top: var(--space-3);
  max-width: 58ch;
}

/* Compact photo tiles: a whole category fits one screen */
.options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: clamp(0.9rem, 1.8vw, 1.5rem);
}

.option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

/* The whole tile is the pick control; "Detail" sits above it in z-order */
.option-card__hit {
  position: absolute;
  inset: -6px;
  z-index: 1;
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.option-card__hit:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 0; }

.option-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--paper-deep);
  box-shadow: 0 1px 2px rgba(43, 38, 32, 0.14);
}
.option-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease-out), filter var(--duration-base) var(--ease-out);
}
.option-card:hover .option-card__media img { transform: scale(1.035); }

/* State pill, bottom-right of the photo. JS owns its text. */
.option-pick {
  position: absolute;
  right: var(--space-2);
  bottom: var(--space-2);
  z-index: 2;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px var(--space-3);
  border-radius: var(--radius-full);
  background: rgba(251, 246, 236, 0.86);
  color: var(--ink-muted);
  border: 1px solid rgba(43, 38, 32, 0.10);
  font-size: 0.68rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: var(--transition-base);
}
.option-card:hover .option-pick { background: var(--paper-lift); border-color: var(--terracotta); color: var(--terracotta-deep); }

.option-card__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.option-card__blurb { display: none; }
.option-card--surprise .option-card__blurb {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.4;
}
.option-more {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  margin-top: auto;
  background: transparent;
  border: 0;
  padding: var(--space-1) 0;
  color: var(--ink-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: var(--rule-brass);
  text-underline-offset: 4px;
  cursor: pointer;
}
.option-more:hover { color: var(--terracotta-deep); text-decoration-color: var(--terracotta); }

/* Selected: a terracotta frame + a filled pill. No stamps, no rotation. */
.option-card.is-selected .option-card__media {
  box-shadow: 0 0 0 2px var(--terracotta), 0 4px 12px rgba(152, 66, 42, 0.22);
}
.option-card.is-selected .option-card__media img { filter: saturate(1.05); }
.option-card.is-selected .option-pick {
  background: var(--terracotta);
  border-color: var(--terracotta-deep);
  color: var(--color-cta-text);
}
.option-card.is-selected .option-card__name { color: var(--terracotta-deep); }

/* "Nechám výběr na vás": a quiet full-width strip under the grid, so it never
   orphans a grid row and stays visibly a different KIND of choice. */
.option-card--surprise {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--brass);
  border-radius: var(--radius-sm);
}
.option-card--surprise .option-card__name { font-style: italic; flex: 0 0 auto; }
.option-card--surprise .option-card__blurb { flex: 1 1 16rem; margin: 0; }
.option-card--surprise .option-pick {
  position: static;
  flex: 0 0 auto;
  margin-left: auto;
}
.option-card--surprise.is-selected {
  border-style: solid;
  border-color: var(--terracotta);
  background: var(--terracotta-wash);
}

/* --- Divadlo opt-in ------------------------------------------------------- */
.optin {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) 0 var(--space-4);
  cursor: pointer;
  max-width: 58ch;
}
.optin__switch {
  position: relative;
  flex: 0 0 auto;
  width: 56px; height: 30px;
  border-radius: var(--radius-full);
  background: var(--paper-deep);
  border: 1px solid var(--paper-edge);
  transition: var(--transition-base);
}
.optin__switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--paper-lift);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}
.optin.is-on .optin__switch { background: var(--terracotta); border-color: var(--terracotta-deep); }
.optin.is-on .optin__switch::after { transform: translateX(26px); }
.optin__label { font-weight: var(--weight-semibold); color: var(--ink); font-size: var(--text-small); }
.optin__hint { display: block; font-size: var(--text-xs); color: var(--ink-muted); font-weight: var(--weight-regular); margin-top: 2px; letter-spacing: 0; text-transform: none; }

.optin-body { display: none; }
.optin-body.is-open { display: block; }
.optin-body .cat__note { margin: 0 0 var(--space-4); }

/* --- Concierge chat (scripted, opened from the picker) -------------------- */
.chat {
  position: fixed;
  inset: 0;
  z-index: 110; /* above the modal (100) - it can be opened from anywhere */
  display: grid;
  place-items: center;
  padding: clamp(0.5rem, 3vw, 2rem);
  background: rgba(43, 38, 32, 0.42);
}
.chat[hidden] { display: none; }
.chat__panel {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  width: min(30rem, 100%);
  height: min(38rem, 92dvh);
  background: var(--paper);
  box-shadow: 0 24px 64px rgba(43, 38, 32, 0.35);
  border-radius: 6px;
  overflow: hidden;
}
.chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--rule-brass);
}
.chat__title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass);
}
.chat__close {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
}
.chat__close:hover { color: var(--terracotta-deep); }
.chat__log {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.chat__msg {
  max-width: 85%;
  padding: var(--space-2) var(--space-3);
  border-radius: 10px;
  font-size: var(--text-sm);
  line-height: 1.45;
}
.chat__msg--bot {
  align-self: flex-start;
  background: var(--paper-lift);
  border: 1px solid var(--paper-edge);
  border-bottom-left-radius: 3px;
}
.chat__msg--user {
  align-self: flex-end;
  background: rgba(235, 216, 203, 0.55);
  border-bottom-right-radius: 3px;
}
.chat__msg--typing {
  color: var(--ink-muted);
  letter-spacing: 3px;
  animation: chat-typing 1.2s ease-in-out infinite;
}
@keyframes chat-typing {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .chat__msg--typing { animation: none; }
}
.chat__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-2);
}
.chat__chips:empty { padding: 0; }
.chat__chip {
  border: 1px solid var(--terracotta);
  border-radius: 999px;
  background: transparent;
  padding: 6px 14px;
  font-size: var(--text-sm);
  color: var(--terracotta-deep);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}
.chat__chip:hover { background: var(--terracotta); color: #fff; }
.chat__chip--primary { background: var(--terracotta); color: #fff; }
.chat__chip--primary:hover { background: var(--terracotta-deep); }
.chat__form {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: 1px solid var(--paper-edge);
}
.chat__input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--paper-edge);
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
  font-size: var(--text-sm);
  background: #fff;
  color: var(--ink);
}
.chat__input:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; }
.chat__send { white-space: nowrap; }

/* Submit readiness: never a dead button - muted look, talking click */
.btn.is-waiting { opacity: 0.55; }
.submit-note--attn { animation: note-flash 1s var(--ease-out) 2; }
@keyframes note-flash {
  0%, 100% { color: var(--ink-muted); }
  40%      { color: var(--color-error); }
}
@media (prefers-reduced-motion: reduce) {
  .submit-note--attn { animation: none; color: var(--color-error); }
}

/* ========================================================================== */
/* WISHES / DETOURS / TEMPO                                                   */
/* ========================================================================== */
.detour-cluster { margin-bottom: var(--space-8); }
.detour-cluster__title {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  color: var(--ink);
  border-bottom: 1px solid var(--rule-brass);
}
.detours {
  columns: 2 260px;
  column-gap: clamp(2rem, 5vw, 4rem);
}
.detour {
  break-inside: avoid;
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) 0;
  border-bottom: 1px dotted var(--paper-edge);
  min-height: 44px;
  cursor: pointer;
  transition: var(--transition-base);
}
.detour:hover { border-bottom-color: var(--terracotta); }
.detour:hover .detour__box { border-color: var(--terracotta); }
.detour.is-checked { border-bottom-color: var(--terracotta); }
.detour__box {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  margin-top: 3px;
  border: 1.5px solid var(--brass);
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 0.8rem;
  font-weight: var(--weight-bold);
  transition: var(--transition-base);
}
.detour.is-checked .detour__box { background: var(--terracotta); border-color: var(--terracotta-deep); color: var(--color-cta-text); }
.detour__name { font-weight: var(--weight-semibold); color: var(--ink); font-size: var(--text-small); }
.detour__note { font-size: 0.9375rem; color: var(--ink-muted); line-height: 1.4; }

/* --- Guest card: the decisions (date, tempo, wishes) ---------------------- */
/* Styled as the hotel's registration card - the most prominent block of the
   lower page, because these are the real inputs the family plans from. */
.guest-card {
  border: 1px solid var(--paper-edge);
  border-top: 3px solid var(--brass);
  border-radius: var(--radius-sm);
  background: var(--paper-lift);
  box-shadow: 0 10px 28px rgba(43, 38, 32, 0.08);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 2.75rem);
}
.guest-card__field--wide { grid-column: 1 / -1; }
.guest-card__label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: var(--weight-semibold);
  color: var(--ink);
  margin-bottom: var(--space-1);
}
.guest-card__hint {
  font-size: var(--text-small);
  color: var(--ink-muted);
  margin-bottom: var(--space-4);
}

/* Date tickets: unmistakably selectable, radio-style check ring */
.tickets { display: grid; gap: var(--space-3); }
.ticket {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 72px;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--paper-edge);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out);
}
.ticket:hover { border-color: var(--terracotta); }
.ticket:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.ticket__check {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 2px solid var(--paper-edge);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 0.9rem;
  transition: border-color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out);
}
.ticket__check::after { content: '✓'; }
.ticket__date {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: var(--weight-semibold);
  color: var(--ink);
  line-height: 1.2;
}
.ticket__note { display: block; font-size: var(--text-small); color: var(--ink-muted); margin-top: 2px; }
.ticket.is-active {
  border-color: var(--terracotta);
  border-width: 2px;
  background: rgba(235, 216, 203, 0.35);
}
.ticket.is-active .ticket__check {
  background: var(--terracotta);
  border-color: var(--terracotta-deep);
  color: var(--color-cta-text);
}

/* --- Detours folded behind one obvious disclosure -------------------------- */
.detours-fold { margin-top: var(--space-2); }
.detours-fold__summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-sm);
  background: var(--paper-lift);
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: var(--weight-semibold);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: border-color var(--duration-base) var(--ease-out);
}
.detours-fold__summary::-webkit-details-marker { display: none; }
.detours-fold__summary:hover { border-color: var(--terracotta); }
.detours-fold__chevron {
  color: var(--terracotta);
  transition: transform var(--duration-base) var(--ease-out);
}
.detours-fold[open] .detours-fold__chevron { transform: rotate(90deg); }
.detours-fold[open] .detours-fold__summary { margin-bottom: var(--space-6); }
.detours-fold__picked {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--terracotta-deep);
}

.wishes {
  width: 100%;
  min-height: 128px;
  resize: vertical;
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  background: var(--paper-lift);
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--ink);
  line-height: var(--leading-normal);
}
.wishes:focus { border-color: var(--terracotta); outline: none; }
.wishes-count { font-size: var(--text-xs); color: var(--ink-muted); text-align: right; margin-top: var(--space-1); }

.tempo { display: grid; gap: var(--space-3); }
.tempo__btn {
  min-height: 56px;
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-sm);
  background: var(--paper-lift);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-base);
}
.tempo__btn:hover { border-color: var(--terracotta); }
.tempo__btn.is-active { border-color: var(--terracotta); background: var(--terracotta-wash); }
.tempo__label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  color: var(--ink);
}
.tempo__note { display: block; font-size: 0.9375rem; color: var(--ink-muted); }
.tempo__btn.is-active .tempo__label { color: var(--terracotta-deep); }

/* ========================================================================== */
/* SUBMIT / CONFIRMATION / SUMMARY                                            */
/* ========================================================================== */
.submit-box {
  max-width: 34rem;
  padding-top: var(--space-2);
}
.submit-box .btn { margin-top: var(--space-6); }
.submit-note { font-size: var(--text-small); color: var(--ink-muted); margin-top: var(--space-4); }
.submit-error {
  display: none;
  background: var(--terracotta-wash);
  color: var(--color-error);
  border: 1px solid var(--color-error);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  margin-top: var(--space-4);
}
.submit-error.is-visible { display: block; }

.confirm-banner {
  display: none;
  align-items: center;
  gap: var(--space-4);
  background: var(--green);
  color: var(--on-green);
  border-radius: var(--radius-sm);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-8);
}
.confirm-banner.is-visible { display: flex; }
.confirm-banner__icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brass);
  color: var(--green);
  display: grid; place-items: center;
  font-size: 1.25rem;
  font-weight: var(--weight-bold);
}
.confirm-banner__title { display: block; font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-h4); }
.confirm-banner__sub { display: block; font-size: var(--text-small); color: var(--on-green-muted); }

.program { display: none; }
.program.is-visible { display: block; }

.program-item {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--paper-edge);
}
.program-item:last-of-type { border-bottom: 1px solid var(--paper-edge); }
.program-item__icon {
  flex: 0 0 auto;
  color: var(--brass);
  font-size: 1rem;
  padding-top: 4px;
}
.program-item__cat {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 2px;
}
.program-item__name { font-family: var(--font-display); font-size: var(--text-h4); font-weight: var(--weight-semibold); color: var(--ink); }
.program-item__route { margin-top: var(--space-3); display: grid; gap: var(--space-1); }
.program-item__route li {
  font-size: var(--text-small);
  color: var(--ink-muted);
  padding-left: var(--space-5);
  position: relative;
}
.program-item__route li::before { content: '\2192'; position: absolute; left: 0; color: var(--brass); }

.program-wishes {
  border-left: 2px solid var(--brass);
  padding: var(--space-2) 0 var(--space-2) var(--space-5);
  margin: var(--space-8) 0;
}
.program-wishes__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: var(--space-2);
}
.program-wishes__text { font-family: var(--font-script); font-size: 1.4rem; color: var(--ink); }

.program-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

/* The printable voucher: one clean card, no seal, no perforation */
.voucher {
  margin-top: clamp(2rem, 4vw, 3rem);
  background: var(--paper-lift);
  border: 1px solid var(--rule-brass);
  border-radius: var(--radius-sm);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  max-width: 40rem;
}
.voucher__head {
  border-bottom: 1px solid var(--rule-brass);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
}
.voucher__hotel { font-family: var(--font-display); font-size: var(--text-h3); font-weight: var(--weight-semibold); color: var(--ink); }
.voucher__tag {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 2px;
}
.voucher__guest { font-size: var(--text-small); color: var(--ink-muted); margin-bottom: var(--space-4); }
.voucher__guest strong { color: var(--ink); font-weight: var(--weight-semibold); }
.voucher__list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px dotted var(--paper-edge);
}
.voucher__cat {
  color: var(--brass);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  align-self: center;
}
.voucher__val { font-family: var(--font-display); font-weight: var(--weight-medium); color: var(--ink); text-align: right; }
.voucher__foot { margin-top: var(--space-5); font-size: var(--text-xs); color: var(--ink-muted); }

/* ========================================================================== */
/* BUTTONS / LINKS                                                            */
/* ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  text-align: center;
  cursor: pointer;
}
.btn--primary {
  background: var(--terracotta);
  color: var(--color-cta-text);
  border: 1px solid var(--terracotta-deep);
}
.btn--primary:hover:not(:disabled) { background: var(--terracotta-deep); }
.btn--primary:disabled {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--paper-edge);
  cursor: not-allowed;
}
.btn--ghost {
  background: transparent;
  color: var(--terracotta-deep);
  border: 1px solid var(--terracotta);
}
.btn--ghost:hover { background: var(--terracotta-wash); }
.btn--block { width: 100%; }
.btn--lg { min-height: 60px; font-size: var(--text-body); padding: var(--space-4) var(--space-8); }

.link-underline {
  color: var(--terracotta-deep);
  font-weight: var(--weight-semibold);
  text-decoration: underline;
  text-decoration-color: var(--rule-brass);
  text-underline-offset: 4px;
}
.link-underline:hover { text-decoration-color: var(--terracotta); }

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

/* ========================================================================== */
/* STICKY SUMMARY BAR                                                         */
/* ========================================================================== */
.summary-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: var(--green);
  color: var(--on-green);
}
.summary-bar__inner {
  max-width: var(--sheet-max);
  margin: 0 auto;
  padding: var(--space-3) clamp(1.25rem, 5vw, 4.5rem);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.summary-bar__status { flex: 1; min-width: 0; }
.summary-bar__count { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-h4); color: var(--brass-soft); }
.summary-bar__hint { font-size: var(--text-small); color: var(--on-green-muted); margin-left: var(--space-2); }
.summary-bar__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }
.summary-chip {
  font-size: var(--text-xs);
  color: var(--on-green-muted);
  border: 1px solid var(--green-line);
  border-radius: var(--radius-full);
  padding: 2px var(--space-3);
}
.summary-bar .btn { flex: 0 0 auto; min-height: 46px; }
.summary-bar .btn--primary:disabled { background: var(--green-lift); color: var(--on-green-faint); border-color: var(--green-line); }

/* ========================================================================== */
/* MODAL                                                                      */
/* ========================================================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(22, 40, 31, 0.62);
  padding: var(--space-4);
  overflow-y: auto;
}
.modal.is-open { display: grid; place-items: center; }
.modal__dialog {
  position: relative;
  background: var(--paper-lift);
  border-radius: var(--radius-md);
  max-width: 560px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.modal__media { background: var(--paper-deep); }
.modal__media img { width: 100%; height: 220px; object-fit: cover; display: block; }
.modal__body { padding: var(--space-6); overflow-y: auto; }
.modal__close {
  position: absolute;
  top: var(--space-3); right: var(--space-3);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(251, 246, 236, 0.92);
  border: 1px solid var(--paper-edge);
  font-size: 1.2rem;
  color: var(--ink);
  cursor: pointer;
  z-index: 3;
}
.modal__close:hover { background: var(--terracotta-wash); }
.modal__title { font-size: var(--text-h3); font-weight: var(--weight-semibold); color: var(--ink); margin-bottom: var(--space-3); }
.modal__blurb { color: var(--ink-muted); font-size: var(--text-small); margin-bottom: var(--space-4); line-height: var(--leading-normal); }
.modal__info {
  border-left: 2px solid var(--brass);
  padding: var(--space-1) 0 var(--space-1) var(--space-4);
  font-size: var(--text-small);
  color: var(--ink);
  margin-bottom: var(--space-5);
}
.route__title { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-h4); color: var(--ink); margin-bottom: var(--space-3); }
.route { display: grid; gap: var(--space-2); margin-bottom: var(--space-5); counter-reset: step; }
.route li {
  position: relative;
  padding-left: var(--space-6);
  color: var(--ink);
  font-size: var(--text-small);
  line-height: var(--leading-normal);
}
.route li::before {
  content: counter(step) '.';
  counter-increment: step;
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  color: var(--brass);
}
/* The pick action stays pinned: the body scrolls, this never does */
.modal__foot {
  flex: 0 0 auto;
  padding: var(--space-4) var(--space-6) var(--space-5);
  border-top: 1px solid var(--paper-edge);
  background: var(--paper-lift);
}
.modal__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-weight: var(--weight-semibold);
  font-size: var(--text-small);
  color: var(--terracotta);
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-underline-offset: 4px;
  min-height: 44px;
}
.modal__link[hidden] { display: none; }
.modal__link:hover { color: var(--terracotta-deep); }

/* ========================================================================== */
/* FOOTER                                                                     */
/* ========================================================================== */
.foot {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--rule-brass);
  text-align: center;
}
.foot__stars { color: var(--brass); letter-spacing: 0.32em; font-size: 0.8rem; margin-bottom: var(--space-4); }
.foot__line {
  font-family: var(--font-display);
  font-size: var(--text-lead);
  max-width: 46ch;
  margin: 0 auto var(--space-5);
  color: var(--ink);
  line-height: var(--leading-snug);
}
.foot__call { margin-bottom: var(--space-5); }
.foot__fineprint { font-size: var(--text-xs); color: var(--ink-muted); letter-spacing: var(--tracking-wide); }

/* --- UTIL ---------------------------------------------------------------- */
[hidden] { display: none !important; }

/* ========================================================================== */
/* RESPONSIVE                                                                 */
/* ========================================================================== */
@media (max-width: 900px) {
  .duo { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { padding-bottom: 96px; }
  .sheet { box-shadow: none; }
  .options { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-3) var(--space-3); }
  .option-card--surprise .option-card__blurb { -webkit-line-clamp: 3; line-clamp: 3; font-size: 0.875rem; }
  .option-card__name { font-size: 1rem; }
  .option-more { font-size: 0.6875rem; }
  .cat__head { grid-template-columns: 1fr; }
  .cat__step { font-size: var(--text-small); margin-bottom: var(--space-1); }
  .cat__prompt, .cat__note { grid-column: 1; }
  .detours { columns: 1; }
  .summary-bar__hint { display: none; }
  .reg { gap: var(--space-4) var(--space-8); }
  .program-actions .btn { flex: 1 1 100%; }
  .guest-card { grid-template-columns: 1fr; }
  .detours-fold__summary { font-size: 1.05rem; padding: var(--space-4); }
}

/* ========================================================================== */
/* MOTION                                                                     */
/* ========================================================================== */
@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;
  }
  .env-armed .env-scene { transition-duration: 380ms !important; }
  .env-armed.env-open .sheet { transition-duration: 380ms !important; }
}

/* ========================================================================== */
/* PRINT (voucher only)                                                       */
/* ========================================================================== */
@media print {
  body { padding: 0; background: #fff; }
  body * { visibility: hidden; }
  #voucher, #voucher * { visibility: visible; }
  #voucher {
    position: absolute;
    inset: 0;
    margin: 0;
    max-width: none;
    box-shadow: none;
    border: 1px solid #B8863B;
  }
  .grain, .summary-bar, .foot, .env-scene { display: none !important; }
}
