/* ============================================================
   CANOPY — THEME A · L'AFFICHE  (Soft Affiche hybrid)
   ------------------------------------------------------------
   Bauhaus structure on warm paper: café palette, espresso ink,
   geometric accents — soft radii and living atmosphere live in
   affiche-atmosphere.css.
   ============================================================ */

:root {
  --milk: #fefaf0;
  --espresso: #542916;
  --terre: #a13a1e;
  --bleu: #88b8ce;
  --miel: #f1c166;
  --eau: #b79858;
  --espresso-60: rgba(84, 41, 22, .6);
  --espresso-30: rgba(84, 41, 22, .3);

  --line: 1.5px solid var(--espresso);

  --fs-hero: clamp(2.4rem, 5.4vw + 1rem, 4.4rem);
  --fs-h2: clamp(1.4rem, 2vw + .8rem, 2rem);
  --fs-h3: 1.1rem;
  --fs-small: .875rem;
  --fs-tiny: .72rem;

  --focus: var(--terre);
}

body {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  background: var(--ground, #fdf0e8);
  color: var(--espresso);
}
h1, h2, h3, .display, .brand-name {
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -.01em;
}
::selection { background: var(--miel); color: var(--espresso); }
.skip-link { background: var(--espresso); color: var(--milk); }

/* ---------- header: the poster top ---------- */
.canopy-top {
  padding: max(env(safe-area-inset-top), 1.25rem) 1.25rem 2.4rem;
  position: relative;
  overflow: hidden; /* contain shapes — no iOS scroll-area growth */
  border-bottom: none;
  /* svh is stable on iPhone; dvh jumps when the Safari chrome settles */
  min-height: calc(100svh - 6.5rem);
  display: flex;
  flex-direction: column;
  z-index: 1;
}
body.is-browsing .canopy-top,
body.has-query .canopy-top {
  min-height: 0;
}
body.is-browsing .canopy-top {
  overflow: hidden;
}
/* the mobile: three flat shapes drifting very slowly */
.canopy-top::before {
  content: "";
  position: absolute; top: -110px; right: -90px;
  width: 300px; height: 300px; border-radius: 50%;
  background: var(--bleu);
  animation: drift 16s ease-in-out infinite alternate;
}
.canopy-top::after {
  content: "";
  position: absolute; bottom: -6px; left: -40px;
  width: 190px; height: 95px;
  border-radius: 190px 190px 0 0;
  background: var(--miel);
  animation: drift 19s ease-in-out infinite alternate-reverse;
}
.hero::after {
  content: "";
  position: absolute; top: -22px; right: 8%;
  width: 0; height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 52px solid var(--terre);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(-14px, 10px) rotate(4deg); }
}
@media (max-width: 560px) { .hero::after { display: none; } }

.top-bar {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1.4rem;
  flex: none;
  position: relative;
  z-index: 2;
  justify-content: flex-start;
}
.brand {
  position: relative;
  z-index: 2;
}
.brand-name { font-size: 1.4rem; text-transform: lowercase; letter-spacing: .02em; }
.pill-btn {
  border: var(--line-soft, var(--line));
  border-radius: var(--radius-ui, 0.75rem);
  padding: .42rem .95rem;
  font-size: var(--fs-small); font-weight: 700;
  background: var(--surface, var(--milk));
  box-shadow: var(--shadow-soft, none);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.pill-btn:hover { background: var(--espresso); color: var(--milk); transform: translateY(-1px); }
.menu-toggle {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.menu-toggle-fixed {
  position: fixed;
  top: max(env(safe-area-inset-top, 0px), 0.75rem);
  right: max(env(safe-area-inset-right, 0px), 0.75rem);
  /* Above the always-mounted menu veil (z 150) so taps hit the hamburger, not the inert ✕ */
  z-index: 162;
  pointer-events: auto;
  background: var(--surface, var(--milk));
  box-shadow: var(--shadow-soft, none);
  border: var(--line-soft, var(--line));
}

/* Flag lives in a reserved RIGHT chrome rail, directly under the menu.
   Same column forever → never fights the search chip, living-home, or
   SOS. z-index above deck-detail (155) and sheets so it never vanishes
   when a card opens. */
.flag-fab {
  --flag-size: 2.75rem;
  --flag-gap: 0.4rem;
  --chrome-top: max(env(safe-area-inset-top, 0px), 0.75rem);
  --chrome-right: max(env(safe-area-inset-right, 0px), 0.75rem);
  position: fixed;
  top: calc(var(--chrome-top) + var(--flag-size) + var(--flag-gap));
  right: var(--chrome-right);
  bottom: auto;
  left: auto;
  z-index: 162;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  width: var(--flag-size);
  height: var(--flag-size);
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--terre, #a13a1e);
  color: var(--milk, #fefaf0);
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 2px 14px rgba(84, 41, 22, 0.18);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.2s ease;
}
.flag-fab span { display: none; } /* icon-only — label is aria-label */
.flag-fab[hidden] { display: none !important; }
.flag-fab:hover { transform: translateY(-1px); filter: brightness(1.05); }
.flag-fab:focus-visible {
  outline: 2px solid var(--miel, #f1c166);
  outline-offset: 3px;
}
.flag-fab svg { flex: none; width: 1.05rem; height: 1.05rem; }

/* Only hide while its own surfaces are open — never while browsing a card.
   flag-quick-open: pointer-events only — GSAP owns opacity/scale. */
body.menu-open .flag-fab,
body.has-crisis .flag-fab {
  opacity: 0;
  pointer-events: none;
}
body.flag-quick-open .flag-fab {
  pointer-events: none;
}
body.flag-quick-open.no-motion .flag-fab {
  opacity: 0;
}

/* Match the compact living chrome (blobs / deck / strip / detail) */
body.has-blobs .flag-fab,
body.has-deck .flag-fab,
body.has-strip .flag-fab,
body.has-deck-detail .flag-fab,
body.has-blobs .menu-toggle-fixed,
body.has-deck .menu-toggle-fixed,
body.has-strip .menu-toggle-fixed,
body.has-deck-detail .menu-toggle-fixed {
  --flag-size: 2.55rem;
  --chrome-top: max(env(safe-area-inset-top, 0px), 0.45rem);
  --chrome-right: max(env(safe-area-inset-right, 0px), 0.45rem);
}
body.has-blobs .flag-fab,
body.has-deck .flag-fab,
body.has-strip .flag-fab,
body.has-deck-detail .flag-fab {
  top: calc(var(--chrome-top) + var(--flag-size) + var(--flag-gap));
  right: var(--chrome-right);
  width: var(--flag-size);
  height: var(--flag-size);
  box-shadow: 0 1px 10px rgba(84, 41, 22, 0.14);
}

/* Single reserved column on the right for menu + flag */
body.is-browsing .focus-bar {
  padding-right: calc(3.6rem + env(safe-area-inset-right, 0px));
}
body.has-blobs.is-browsing .focus-bar {
  padding-right: calc(3.5rem + env(safe-area-inset-right, 0px));
}

/* Quick flag — clean Affiche card */
.flag-quick-veil {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  background: rgba(84, 41, 22, 0);
}
.flag-quick-veil.on { display: flex; }
.flag-quick-stage {
  position: relative;
  width: min(100%, 22rem);
}
.flag-quick-box {
  position: relative;
  width: 100%;
  color: var(--espresso);
  background: var(--surface, var(--milk));
  border: var(--line-soft, var(--line));
  border-radius: var(--radius-card, 0.9rem);
  box-shadow: var(--shadow-soft, none);
  padding: 1.5rem 1.4rem 1.35rem;
  transform-origin: center center;
}
.flag-quick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
.flag-quick-head h3 {
  margin: 0;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 3.5vw, 1.55rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: lowercase;
}
.flag-quick-close {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border: var(--line-soft, var(--line));
  border-radius: var(--radius-ui, 0.75rem);
  background: var(--surface, var(--milk));
  color: var(--espresso);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.flag-quick-close:hover {
  background: var(--espresso);
  color: var(--milk);
}
.flag-quick-hint {
  margin: 0 0 1rem;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--espresso-60);
}
.flag-quick-box textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 7rem;
  resize: vertical;
  border: var(--line-soft, var(--line));
  border-radius: var(--radius-ui, 0.75rem);
  background: var(--surface, var(--milk));
  color: var(--espresso);
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: none;
}
.flag-quick-box textarea:focus {
  outline: 2px solid var(--terre);
  outline-offset: 2px;
}
.flag-quick-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.flag-quick-send {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.65rem 1.1rem;
  border: var(--line);
  border-radius: var(--radius-ui, 0.75rem);
  background: var(--espresso);
  color: var(--milk);
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.flag-quick-send:hover {
  background: var(--terre);
  border-color: var(--terre);
  color: var(--milk);
}
.flag-quick-status {
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 1.2em;
  color: var(--terre);
}
@media (max-width: 559px) {
  .flag-quick-veil {
    align-items: flex-end;
    padding: 0.75rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  }
  .flag-quick-stage { width: 100%; }
  .flag-quick-box {
    padding: 1.35rem 1.2rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }
}
.menu-toggle .menu-x-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: rotate(-40deg) scale(.85);
}
.menu-toggle .menu-icon {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
  transition: none;
}
.menu-toggle.is-x .menu-icon {
  opacity: 0;
  transform: rotate(40deg) scale(.85);
}
.menu-toggle.is-x .menu-x-glyph {
  opacity: 1;
  transform: none;
}
.menu-toggle-spacer {
  display: inline-block;
  width: 44px;
  height: 44px;
  flex: none;
}
.top-actions {
  position: relative;
  z-index: 5;
}
/* Decorative poster shapes must never steal taps */
.canopy-top::before,
.canopy-top::after,
.hero::after,
.shapes,
.shapes *,
.sh,
.sh::before {
  pointer-events: none !important;
}
/* Parked only after open handoff finishes — avoids brutal pop */
body.menu-open .menu-toggle-fixed.is-parked {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}
body.menu-open .menu-toggle-fixed:not(.is-parked) {
  /* traveling above the wipe during open/close morph */
  z-index: 170;
  pointer-events: none;
}
.menu-box-close.is-handoff-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}
.menu-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
}
.menu-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
}
.menu-toggle:hover .menu-bars span { background: currentColor; }

/* ---------- sticky magnetic cursor (desktop) ---------- */
.sticky-cursor {
  --cursor-size: 22px;
  width: var(--cursor-size);
  height: var(--cursor-size);
  border-radius: 50%;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 500;
  transform: translate(-50%, -50%);
  background: var(--espresso);
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}
body.has-sticky-cursor .sticky-cursor { opacity: 1; }
body.has-sticky-cursor .sticky-cursor.is-stuck {
  background: var(--miel);
}
@media (pointer: fine) {
  body.has-sticky-cursor,
  body.has-sticky-cursor * {
    cursor: none;
  }
  body.has-sticky-cursor input,
  body.has-sticky-cursor textarea,
  body.has-sticky-cursor select,
  body.has-sticky-cursor [contenteditable="true"] {
    cursor: text;
  }
}
[data-hover] {
  position: relative;
  overflow: visible;
}
[data-hover-bounds] {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}
[data-hover]:hover [data-hover-bounds] {
  transform: scale(2.4);
}
.menu-x,
.sheet-close,
.search-clear {
  position: relative;
  overflow: visible;
}
.menu-x > span:first-child,
.sheet-close > span:first-child,
.search-clear > span:first-child {
  pointer-events: none;
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .sticky-cursor { display: none !important; }
  body.has-sticky-cursor,
  body.has-sticky-cursor * {
    cursor: auto;
  }
  body.has-sticky-cursor input,
  body.has-sticky-cursor textarea {
    cursor: text;
  }
}

.hero {
  width: 100%;
  /* reserved slot — search never shifts when the red word bounces */
  min-height: 2.85em;
  font-size: var(--fs-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4em 0;
  box-sizing: content-box;
  overflow: visible;
}
.hero h1 {
  font-size: 1em;
  line-height: 1.12;
  max-width: 18ch;
  width: 100%;
  text-transform: lowercase;
  text-align: center;
  margin: 0 auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06em;
}
.hero-lead {
  color: var(--espresso);
  display: block;
  max-width: 100%;
  line-height: 1.12;
}
.hero-morph {
  display: block;
  position: relative;
  margin: 0;
  width: 100%;
  height: 1.22em;
  overflow: visible;
}
.hero-beat {
  display: block;
  position: relative;
  color: var(--terre);
  white-space: nowrap;
  width: 100%;
  height: 1.22em;
  text-align: center;
  overflow: visible;
}
.hero-beat.is-swapping {
  /* keep the same box — never change layout height */
  height: 1.22em;
}
.hero-beat-ghost,
.hero-beat-live {
  display: inline-block;
  white-space: nowrap;
  color: inherit;
}
.hero-beat .hero-beat-ghost,
.hero-beat .hero-beat-live {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  text-align: center;
  pointer-events: none;
}
.hero-beat:not(.is-swapping) .hero-beat-live {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  text-align: center;
  pointer-events: none;
}
.hero-beat .hero-ch {
  display: inline-block;
  will-change: transform, opacity, filter;
  transform-origin: 50% 85%;
  backface-visibility: hidden;
}
.hero .sub {
  margin: 1rem 0 0;
  font-size: var(--fs-tiny); font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--espresso-60);
}
@media (prefers-reduced-motion: reduce) {
  .hero-beat .hero-ch { will-change: auto; }
}

/* one centered composition: question → search → soft alts */
.home-stage {
  position: relative;
  z-index: 2;
  max-width: 34rem;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem 0 2.5rem;
  min-height: 0;
  /* isolate from decorative layers / iOS compositor quirks */
  transform: translateZ(0);
}
body.is-browsing .home-stage,
body.has-query .home-stage {
  flex: none;
  justify-content: flex-start;
  padding-bottom: 0;
}
.home-stage .hero,
.home-stage .entry {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  flex: none;
}

/* ---------- entry: one thick line, one red disc ---------- */
.entry { margin-top: 1.85rem; }
.search-leaf { display: none; }
.entry-hint {
  margin: .8rem 0 0;
  font-size: var(--fs-tiny); font-weight: 500;
  color: var(--espresso-60); letter-spacing: .02em;
  justify-content: center;
}

/* ---------- ground ---------- */
.ground { padding: 1.2rem 1.25rem 9rem; position: relative; z-index: 1; }
body:not(.is-browsing) .ground {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 0;
}

.section-label {
  font-size: var(--fs-tiny); font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--espresso);
  margin: 0 0 1.1rem;
}
.section-label::after { content: ""; flex: 1; height: 2px; background: var(--espresso); }

/* secondary paths — quiet, centered under search */
.home-alts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  width: 100%;
  margin-top: 1.45rem;
}
.guided-btn {
  width: auto;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  text-align: center;
  padding: .52rem 1.15rem;
  margin: 0;
  border: none;
  border-radius: var(--radius-ui, 0.75rem);
  background: var(--espresso);
  color: var(--milk);
  box-shadow: var(--shadow-soft, none);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.guided-btn:hover {
  background: var(--terre);
  color: var(--milk);
  transform: translateY(-1px);
}
.guided-btn .g-title {
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.25;
}
.guided-btn .g-sub,
.guided-btn .g-arrow { display: none; }

.browse-btn {
  width: auto;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  text-align: center;
  padding: .35rem .7rem;
  margin: 0;
  border: none;
  border-radius: var(--radius-ui, 0.75rem);
  background: transparent;
  color: var(--espresso-60);
  box-shadow: none;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.browse-btn:hover {
  color: var(--espresso);
  background: transparent;
  transform: none;
}
.browse-btn .browse-title {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.3;
  color: inherit;
}
.browse-btn .browse-arrow { display: none; }

/* category tiles: pure shapes, no icons — soft geometric cards */
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.cat-sticker {
  background: var(--surface, var(--milk));
  border: var(--line-soft, var(--line));
  border-radius: var(--radius-card, 0.9rem);
  padding: 1.05rem;
  min-height: 122px;
  display: flex; flex-direction: column; justify-content: space-between; gap: .8rem;
  box-shadow: var(--shadow-soft, none);
  transition: background var(--t-fast) var(--ease), transform var(--t-med) var(--ease);
}
.cat-sticker:hover { background: var(--surface-deep, #fbf2dd); transform: translateY(-3px); }
.cat-icon { width: 38px; height: 38px; border: none; border-radius: 50%; }
.cat-icon svg { display: none; }
/* the shape alphabet: circle · square · triangle · arch, repeating */
.cat-sticker:nth-child(4n+2) .cat-icon { border-radius: 0; }
.cat-sticker:nth-child(4n+3) .cat-icon {
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.cat-sticker:nth-child(4n+4) .cat-icon { border-radius: 50% 50% 0 0; }
.cat-name { font-family: 'Josefin Sans', sans-serif; font-weight: 600; font-size: 1rem; line-height: 1.15; }
.cat-count { position: absolute; top: 10px; right: 12px; font-size: var(--fs-tiny); font-weight: 700; color: var(--espresso-30); }

/* ---------- results ---------- */
.res-card {
  background: var(--surface, var(--milk));
  border: var(--line-soft, var(--line));
  border-radius: var(--radius-card, 0.9rem);
  padding: 1.1rem 1.1rem 1rem 1.4rem;
  box-shadow: var(--shadow-soft, none);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  animation: softSettle var(--t-slow) var(--ease) backwards;
}
.result-list .res-card:nth-child(2) { animation-delay: 70ms; }
.result-list .res-card:nth-child(3) { animation-delay: 140ms; }
@keyframes slide { from { opacity: 0; transform: translateX(-12px); } }
.res-card:hover { transform: translateY(-2px); background: var(--surface-deep, #fbf2dd); }
.res-card .cat-strip { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; border-radius: var(--radius-card, 0.9rem) 0 0 var(--radius-card, 0.9rem); }
.res-name { font-family: 'Josefin Sans', sans-serif; font-size: var(--fs-h3); font-weight: 600; line-height: 1.2; }
.res-sub { font-size: var(--fs-tiny); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--espresso-60); }
.res-desc { margin: .5rem 0 .7rem; color: var(--espresso-60); font-size: var(--fs-small); line-height: 1.5; }

.badge {
  font-size: var(--fs-tiny); font-weight: 700;
  padding: .24rem .55rem;
  border: 1.5px solid var(--espresso);
  border-radius: var(--radius-chip, 0.65rem);
  background: var(--surface, var(--milk)); color: var(--espresso);
  letter-spacing: .04em; text-transform: uppercase;
}
.badge.b-free { background: var(--miel); }
.badge.b-paid { background: transparent; border-style: dashed; }
.badge.b-open { background: var(--bleu); }
.badge.b-open .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--espresso); animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.badge.b-closed { color: var(--espresso-30); border-color: var(--espresso-30); }
.badge.b-urgent { background: var(--terre); border-color: var(--terre); color: var(--milk); }

.no-results { padding: 3rem 1rem; color: var(--espresso-60); }
.no-results .display { font-size: var(--fs-h2); color: var(--espresso); margin-bottom: .5rem; }

/* ---------- sheet ---------- */
.sheet-veil { background: rgba(84, 41, 22, .4); }
.sheet {
  background: var(--surface, var(--milk));
  border-top: 3px solid var(--espresso);
  border-radius: var(--radius-card, 0.9rem) var(--radius-card, 0.9rem) 0 0;
}
@media (min-width: 760px) {
  .sheet {
    border-left: var(--line-soft, var(--line));
    border-right: var(--line-soft, var(--line));
    border-radius: var(--radius-card, 0.9rem) 0 0 var(--radius-card, 0.9rem);
  }
}
.sheet-handle::before { content: ""; width: 46px; height: 4px; background: var(--espresso); border-radius: 999px; }
.sheet-scroll { padding: 0 1.5rem 2.4rem; }
.sheet-head { margin-bottom: .5rem; }
.sheet-cat {
  font-size: var(--fs-tiny); font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--milk); padding: .28rem .7rem; border-radius: var(--radius-chip, 0.65rem);
  margin-bottom: .6rem;
}
.sheet h2 { font-size: var(--fs-h2); line-height: 1.1; }
.sheet-close { width: 40px; height: 40px; border: var(--line-soft, var(--line)); border-radius: 50%; font-size: 1rem; background: var(--surface, var(--milk)); }
.sheet-close:hover { background: var(--miel); }
.sheet-desc { color: var(--espresso-60); line-height: 1.55; margin: .5rem 0 1.2rem; }
.sheet .badges { margin-bottom: 1.4rem; }

.action-row { margin-bottom: 1.8rem; }
.act {
  padding: .9rem 1.1rem;
  border: var(--line-soft, var(--line)); border-radius: var(--radius-ui, 0.75rem);
  font-weight: 700; font-size: var(--fs-small);
  transition: transform var(--t-fast) var(--ease);
}
.act:hover { transform: translateY(-2px); }
.act-call { background: var(--espresso); color: var(--milk); }
.act-web { background: var(--surface, var(--milk)); color: var(--espresso); }
.act-share { background: var(--terre); border-color: var(--terre); color: var(--milk); }

.expect {
  background: var(--miel);
  border: none; border-left: 6px solid var(--espresso);
  border-radius: var(--radius-card, 0.9rem);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.8rem;
}
.expect h3 {
  font-family: 'Familjen Grotesk', sans-serif;
  font-size: var(--fs-tiny); font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  margin-bottom: .45rem;
}
.expect p { margin: 0; line-height: 1.55; font-size: 1rem; }

.facts { margin-bottom: 1.8rem; }
.fact h4 {
  font-size: var(--fs-tiny); font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--espresso-30);
}
.fact p { font-size: var(--fs-small); line-height: 1.45; }

.also-row { margin-bottom: 1.2rem; }
.also-chip {
  border: var(--line-soft, 1.5px solid var(--espresso));
  background: var(--surface, var(--milk));
  padding: .45rem .85rem; border-radius: var(--radius-chip, 0.65rem);
  font-size: var(--fs-small); font-weight: 600;
  box-shadow: var(--shadow-soft, none);
}
.also-chip:hover { background: var(--miel); }

.verified { font-size: var(--fs-tiny); color: var(--espresso-60); border-top: var(--line-soft, var(--line)); padding-top: .8rem; }
.verified.warn { color: var(--eau); }

/* ---------- dynamic refinement (search v2 — one question, never a wall) ---------- */
.refine-card { max-width: 640px; margin: 0 auto; padding: 1.6rem 1rem 2rem; }
.refine-q {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.35rem, 3.5vw, 1.7rem); line-height: 1.25;
  margin: .5rem 0 1.4rem;
}
.refine-opts { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1.4rem; }
.refine-opt {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  width: 100%; text-align: left; cursor: pointer;
  border: var(--line-soft, 1.5px solid var(--espresso));
  background: var(--surface, var(--milk)); color: inherit;
  padding: .9rem 1.15rem; border-radius: var(--radius-card, 0.9rem);
  font-family: inherit; font-size: 1.05rem; font-weight: 600;
  box-shadow: var(--shadow-soft, none);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  animation: softSettle var(--t-med) var(--ease) backwards;
}
.refine-opt:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(84, 41, 22, 0.08); background: var(--surface-deep, #fbf2dd); }
.refine-opt:active { transform: translateY(0); }
.refine-count { font-size: var(--fs-tiny); font-weight: 500; color: var(--espresso-60); white-space: nowrap; }

/* ---------- guided tree ---------- */
.tree-overlay {
  background: var(--espresso);
  color: var(--milk);
  padding: max(env(safe-area-inset-top), 1.25rem) 1.25rem 2.5rem;
}
.tree-overlay .pill-btn { border-color: var(--milk); color: var(--milk); background: transparent; }
.tree-overlay .pill-btn:hover { background: var(--milk); color: var(--espresso); }
.tree-bar { margin-bottom: 2.6rem; }
.tree-crumb { font-size: var(--fs-tiny); letter-spacing: .22em; text-transform: uppercase; opacity: .5; }
.tree-q { font-size: var(--fs-h2); line-height: 1.12; margin-bottom: 1.8rem; max-width: 22ch; text-transform: lowercase; }
.tree-choice {
  background: var(--surface, var(--milk)); color: var(--espresso);
  border-radius: var(--radius-card, 0.9rem);
  border: none;
  padding: 1.05rem 1.3rem;
  box-shadow: var(--shadow-soft, none);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  animation: softSettle var(--t-med) var(--ease) backwards;
}
.tree-choice:nth-child(2) { animation-delay: 50ms; }
.tree-choice:nth-child(3) { animation-delay: 100ms; }
.tree-choice:nth-child(4) { animation-delay: 150ms; }
.tree-choice:nth-child(5) { animation-delay: 200ms; }
.tree-choice:nth-child(6) { animation-delay: 250ms; }
.tree-choice:hover { transform: translateY(-2px); background: var(--surface-deep, #fbf2dd); }
.tree-choice .t-label { font-weight: 600; font-size: 1rem; }
.tree-choice .t-sub { font-size: var(--fs-tiny); text-transform: uppercase; letter-spacing: .1em; color: var(--espresso-60); margin-top: 2px; }
.tree-choice .t-go { color: var(--terre); font-size: 1.15rem; }

/* ---------- themes page (full takeover, same tiles as before) ---------- */
.themes-overlay {
  color: var(--espresso);
  padding: max(env(safe-area-inset-top), 1.25rem) 1.25rem 2.5rem;
}
.themes-overlay .pill-btn {
  border-color: var(--espresso);
  color: var(--espresso);
  background: transparent;
}
.themes-overlay .pill-btn:hover { background: var(--espresso); color: var(--milk); }
.themes-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 2.2rem;
  /* Keep clear of the fixed hamburger on the right */
  padding-right: calc(3.6rem + env(safe-area-inset-right, 0px));
}
.themes-title {
  font-size: var(--fs-h2);
  line-height: 1.12;
  margin: 0 0 .55rem;
  max-width: 18ch;
  text-transform: lowercase;
}
.themes-sub {
  margin: 0 0 1.8rem;
  font-size: var(--fs-small);
  color: var(--espresso-60);
  max-width: 32ch;
}
.themes-inner {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 6rem;
}

/* ---------- SOS ---------- */
.sos {
  background: var(--terre); color: var(--milk);
  border: 2px solid var(--espresso);
  border-radius: 999px;
  padding: .8rem 1.5rem;
  font-weight: 700; font-size: var(--fs-small);
  transition: transform var(--t-fast) var(--ease);
}
.sos:hover { transform: translateX(-50%) translateY(-2px); }

/* ---------- crisis: opaque calm room ---------- */
.crisis {
  background: var(--ground, #fdf0e8);
  color: var(--espresso);
  transition: opacity 0.55s var(--ease, cubic-bezier(.22, 1, .36, 1));
}
/* Typed trigger — slower, softer arrive */
.crisis.from-gentle {
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.crisis.from-gentle:not(.on) {
  transition: opacity 0.45s var(--ease, cubic-bezier(.22, 1, .36, 1));
}
.crisis h2:focus {
  outline: none;
}
.crisis h2:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--terre) 55%, transparent);
  outline-offset: 4px;
}
.crisis-blob-stage.blob-stage,
.crisis-blob-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  flex: none;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;
}
.crisis-blob-stage .blob-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.crisis-blob-stage .blob-label {
  display: none !important;
}
/* Light veil only — blobs stay readable underneath */
.crisis-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: transparent;
}
.crisis-inner {
  position: relative;
  z-index: 2;
  padding: max(env(safe-area-inset-top), 2.4rem) 1.25rem calc(2.8rem + env(safe-area-inset-bottom));
  max-width: 34rem;
}

/* Gentle enter: content settles in after the room fades up */
.crisis.from-gentle.on .crisis-blob-stage {
  animation: crisisFieldIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.crisis.from-gentle.on .crisis-kicker,
.crisis.from-gentle.on h2,
.crisis.from-gentle.on .crisis-sub,
.crisis.from-gentle.on .crisis-gentle,
.crisis.from-gentle.on .line-card,
.crisis.from-gentle.on .crisis-leave {
  animation: crisisSettle 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.crisis.from-gentle.on .crisis-kicker { animation-delay: 0.12s; }
.crisis.from-gentle.on h2 { animation-delay: 0.22s; }
.crisis.from-gentle.on .crisis-sub { animation-delay: 0.34s; }
.crisis.from-gentle.on .crisis-gentle { animation-delay: 0.42s; }
.crisis.from-gentle.on .line-card:nth-child(1) { animation-delay: 0.52s; }
.crisis.from-gentle.on .line-card:nth-child(2) { animation-delay: 0.6s; }
.crisis.from-gentle.on .line-card:nth-child(3) { animation-delay: 0.68s; }
.crisis.from-gentle.on .line-card:nth-child(4) { animation-delay: 0.76s; }
.crisis.from-gentle.on .line-card:nth-child(5) { animation-delay: 0.84s; }
.crisis.from-gentle.on .crisis-leave { animation-delay: 0.92s; }

@keyframes crisisSettle {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes crisisFieldIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.crisis-kicker {
  margin: 0 auto 0.85rem;
  text-align: center;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terre);
  opacity: 0.85;
}
.breath {
  width: 72px; height: 72px; margin: 0 auto 1.5rem; border-radius: 50%;
  background: color-mix(in srgb, var(--bleu) 45%, var(--miel));
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--bleu) 25%, transparent);
  animation: inhale 7s ease-in-out infinite;
}
@keyframes inhale {
  0%, 100% { transform: scale(.88); opacity: .8; box-shadow: 0 0 0 0 color-mix(in srgb, var(--bleu) 20%, transparent); }
  50% { transform: scale(1.08); opacity: 1; box-shadow: 0 0 0 18px transparent; }
}
.crisis h2 {
  text-align: center;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.1;
  text-transform: lowercase;
  margin: 0 0 0.75rem;
  color: var(--espresso);
}
.crisis-sub {
  text-align: center;
  color: var(--espresso-60);
  line-height: 1.6;
  max-width: 34ch;
  margin: 0 auto 1.8rem;
  font-size: 1.02rem;
}
.crisis-gentle {
  background: color-mix(in srgb, var(--miel) 55%, var(--surface, #fff8f2));
  border: none;
  border-left: 6px solid var(--terre);
  border-radius: var(--radius-card, 0.9rem);
  padding: 1rem 1.15rem;
  margin-bottom: 1.4rem;
  font-size: var(--fs-small);
  line-height: 1.55;
  box-shadow: var(--shadow-soft, none);
}
.line-card {
  background: color-mix(in srgb, var(--surface, #fff8f2) 96%, transparent);
  border: var(--line-soft, var(--line));
  border-radius: var(--radius-card, 0.9rem);
  padding: 1.05rem 1.15rem;
  margin-bottom: .75rem;
  box-shadow: var(--shadow-soft, none);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.line-card.accent {
  background: color-mix(in srgb, var(--miel) 40%, var(--surface, #fff8f2));
}
.line-name { font-family: 'Josefin Sans', sans-serif; font-weight: 600; font-size: var(--fs-h3); }
.line-note { font-size: var(--fs-tiny); color: var(--espresso-60); margin-top: 2px; }
.line-act {
  background: var(--espresso); color: var(--milk);
  border: 2px solid var(--espresso); border-radius: 999px;
  padding: .55rem 1rem; font-weight: 700; font-size: var(--fs-small);
}
.line-act.alt {
  background: var(--surface, var(--milk));
  color: var(--espresso);
  border-color: color-mix(in srgb, var(--espresso) 35%, transparent);
}
.crisis-leave {
  display: block;
  margin: 2.2rem auto 0;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--espresso-60);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.crisis-leave:hover { color: var(--terre); }

/* Living field is the calm motion — hide the small content orb */
body.crisis-blobs-live .breath {
  display: none;
}

/* Confirm leave — solid veil, no page bleed */
.confirm-veil {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--ground, #fdf0e8) 88%, var(--espresso));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease, cubic-bezier(.22, 1, .36, 1)),
              visibility 0.35s var(--ease, cubic-bezier(.22, 1, .36, 1));
}
.confirm-veil.on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.confirm-veil h3:focus { outline: none; }
.confirm-veil h3:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--terre) 55%, transparent);
  outline-offset: 4px;
}
.confirm-veil::before {
  content: none;
}
.about-veil:not(.menu-veil),
.helper-info-veil {
  background: color-mix(in srgb, var(--espresso) 45%, transparent);
}
.confirm-box {
  position: relative;
  z-index: 1;
  background: var(--surface, #fff8f2);
  border: var(--line-soft, var(--line));
  border-radius: var(--radius-card, 0.9rem);
  padding: 1.85rem 1.5rem 1.5rem;
  box-shadow: 0 12px 40px rgba(84, 41, 22, 0.14);
}
.confirm-box h3 { font-size: var(--fs-h2); margin: 0 0 .55rem; }
.confirm-box p { color: var(--espresso-60); font-size: var(--fs-small); line-height: 1.55; margin: 0 0 1.25rem; }
.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.confirm-actions .act {
  width: 100%;
  justify-content: center;
  border-radius: var(--radius-ui, 0.75rem);
}

.about-box:not(.menu-box) {
  background: var(--surface, #fff8f2);
  border: var(--line-soft, var(--line));
  border-radius: var(--radius-card, 0.9rem);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-soft, none);
}
.about-box:not(.menu-box) h3 { font-size: var(--fs-h2); margin-bottom: .6rem; }
.about-box:not(.menu-box) p { color: var(--espresso-60); font-size: var(--fs-small); line-height: 1.6; margin: 0 0 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  .breath { animation: none; }
  .crisis,
  .crisis.from-gentle {
    transition: opacity 0.2s ease;
  }
  .crisis.from-gentle.on .crisis-blob-stage,
  .crisis.from-gentle.on .crisis-kicker,
  .crisis.from-gentle.on h2,
  .crisis.from-gentle.on .crisis-sub,
  .crisis.from-gentle.on .crisis-gentle,
  .crisis.from-gentle.on .line-card,
  .crisis.from-gentle.on .crisis-leave {
    animation: none;
  }
}
.menu-box.about-box {
  padding: 0;
  border: none;
}
.menu-box .menu-kicker { color: var(--espresso); font-size: .95rem; margin: .35rem 0 0; }
.menu-box .menu-detail-title {
  font-size: 1rem;
  margin: 0;
  color: var(--menu-fg, var(--espresso));
}

/* ---------- Full-page menu · liquid wipe + index/detail ---------- */
.menu-veil {
  display: flex !important;
  justify-content: stretch;
  align-items: stretch;
  padding: 0;
  background: rgba(84, 41, 22, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: background .35s var(--ease, cubic-bezier(.22,1,.36,1)),
              opacity .28s var(--ease, cubic-bezier(.22,1,.36,1));
}
/* Closed veil stays mounted for wipe anim — but children with pointer-events:auto
   (esp. ✕ at top-right) were stealing taps from the page hamburger on mobile */
.menu-veil:not(.on),
.menu-veil:not(.on) * {
  pointer-events: none !important;
}
.menu-veil:not(.on) {
  /* Beat any leftover GSAP inline opacity so menu copy never ghosts on the site */
  opacity: 0 !important;
  visibility: hidden !important;
}
.menu-veil.on {
  background: rgba(84, 41, 22, .22);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.menu-wipe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.menu-wipe-path {
  vector-effect: non-scaling-stroke;
}
.menu-clip-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
/* Inline clip-path is set by JS (from the tapped button). Don't force an SVG clip. */
.menu-detail.is-liquid-clip,
.menu-index.is-liquid-clip {
  will-change: clip-path;
}
.menu-item {
  transform-origin: center center;
}
.menu-box {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  border: none;
  background: var(--milk);
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
.menu-veil.on .menu-box { transform: translateX(0); }

/* With GSAP wipe: panel sits still; wipe paints the surface */
body.has-gsap .menu-box {
  background: transparent;
  transform: none !important;
}
body.has-gsap .menu-index {
  background: transparent;
}

/* Full-bleed color; detail copy column centered on desktop */
@media (min-width: 721px) {
  .menu-box {
    width: 100%;
    max-width: none;
    border: none;
  }
  .menu-detail-scroll {
    width: 100%;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }
}

.menu-stage {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
.menu-stage[data-view="index"] { transform: translateX(0); }
.menu-stage[data-view="detail"] { transform: translateX(-50%); }
.menu-stage.no-anim { transition: none !important; }

.menu-view {
  width: 50%;
  height: 100%;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--milk);
  box-sizing: border-box;
}

.menu-index-top {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  gap: 1rem;
  padding: max(1.15rem, env(safe-area-inset-top, 0px)) 3.5rem 1.5rem;
  flex: none;
}
.menu-kicker {
  margin: .35rem 0 0;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: lowercase;
  color: var(--espresso);
}
.menu-x {
  border: none;
  background: transparent;
  width: 44px; height: 44px; flex: none;
  font-size: 1.15rem; font-weight: 700;
  color: var(--espresso);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  position: absolute;
  top: max(.65rem, env(safe-area-inset-top, 0px));
  right: .85rem;
}
/* Always above stage / clipped detail so ✕ stays clickable — only while menu is open */
.menu-box-close {
  z-index: 40;
  pointer-events: none;
  color: var(--espresso);
}
.menu-veil.on .menu-box-close {
  pointer-events: auto;
}
.menu-box[data-on-detail="1"] .menu-box-close {
  color: var(--menu-fg, var(--espresso));
  /* mix with detail palette via currentColor on detail head spacer alignment */
  filter: none;
}
.menu-detail-head-spacer {
  width: 44px;
  height: 44px;
  flex: none;
}
.menu-x:focus-visible,
.menu-item:focus-visible,
.menu-back:focus-visible {
  outline: 2px solid var(--terre);
  outline-offset: 2px;
}

.menu-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  border: none;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  margin: 0;
  padding: 1.35rem 1.35rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--espresso);
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: clamp(1.55rem, 6vw, 2.25rem);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: filter .18s ease;
  box-sizing: border-box;
  z-index: 1;
}
.menu-item-wipe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.menu-detail.is-reveal-layer {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  z-index: 8;
  flex: none !important;
  margin: 0;
  /* cover the live index while the blob expands from the tapped row */
  pointer-events: auto;
  box-shadow: none;
}
.menu-detail.is-reveal-layer.is-liquid-clip {
  /* clip-path is the only reveal — never let unclipped content flash over rows */
  overflow: hidden;
}
.menu-item > span {
  position: relative;
  z-index: 1;
  pointer-events: none;
  font-weight: inherit;
}
.menu-item[data-panel="about"] { color: var(--espresso); }
.menu-item[data-panel="contact"] { color: var(--espresso); }
.menu-item[data-panel="flag"] { color: var(--milk); }
.menu-item[data-panel="settings"] { color: var(--espresso); }
/* Fallback fills when GSAP wipe isn’t running */
body:not(.has-gsap) .menu-item[data-panel="about"] { background: var(--milk); }
body:not(.has-gsap) .menu-item[data-panel="contact"] { background: var(--bleu); }
body:not(.has-gsap) .menu-item[data-panel="flag"] { background: var(--terre); }
body:not(.has-gsap) .menu-item[data-panel="settings"] { background: var(--miel); }
body:not(.has-gsap) .menu-item-wipe { display: none; }
.menu-item:hover { filter: brightness(.97); }
.menu-item:active { filter: brightness(.93); }
body.has-gsap .menu-item { transition: none; }
body.has-gsap.menu-animating .menu-veil {
  /* keep menu interactive (Back / ✕); only the page under stays locked via overflow */
}

/* Detail pages: same palette, different contrast per section */
.menu-detail {
  --menu-bg: var(--milk);
  --menu-fg: var(--espresso);
  --menu-muted: var(--espresso-60);
  --menu-line: var(--espresso);
  --menu-accent: var(--terre);
  --menu-field-bg: var(--milk);
  --menu-field-border: var(--espresso);
  --menu-cta-bg: var(--espresso);
  --menu-cta-fg: var(--milk);
  background: var(--menu-bg);
  color: var(--menu-fg);
  transition: background .28s ease, color .28s ease;
}
.menu-detail[data-panel="about"] {
  --menu-bg: var(--milk);
  --menu-fg: var(--espresso);
  --menu-accent: var(--terre);
}
.menu-detail[data-panel="contact"] {
  --menu-bg: var(--bleu);
  --menu-fg: var(--espresso);
  --menu-muted: rgba(84, 41, 22, .72);
  --menu-accent: var(--espresso);
  --menu-cta-bg: var(--espresso);
  --menu-cta-fg: var(--milk);
}
.menu-detail[data-panel="flag"] {
  --menu-bg: var(--terre);
  --menu-fg: var(--milk);
  --menu-muted: rgba(254, 250, 240, .78);
  --menu-line: var(--milk);
  --menu-accent: var(--miel);
  --menu-field-bg: rgba(254, 250, 240, .12);
  --menu-field-border: var(--milk);
  --menu-cta-bg: var(--miel);
  --menu-cta-fg: var(--espresso);
}
.menu-detail[data-panel="settings"] {
  --menu-bg: var(--miel);
  --menu-fg: var(--espresso);
  --menu-muted: rgba(84, 41, 22, .7);
  --menu-accent: var(--terre);
  --menu-field-bg: rgba(254, 250, 240, .55);
}

.menu-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: max(.85rem, env(safe-area-inset-top, 0px)) .85rem .85rem;
  border-bottom: 2px solid var(--menu-line);
  flex: none;
  background: transparent;
  position: relative;
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
  pointer-events: auto;
}
.menu-detail .menu-back,
.menu-detail .menu-detail-title {
  color: var(--menu-fg);
}
.menu-back {
  border: none;
  background: transparent;
  padding: .55rem .4rem;
  min-height: 44px;
  font: inherit;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  position: relative;
  z-index: 21;
  pointer-events: auto;
}
.menu-detail-title {
  margin: 0;
  flex: 1;
  text-align: center;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.menu-detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.35rem 1.35rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}
.menu-panel { display: none; }
.menu-panel.on { display: block; }
.menu-panel[hidden] { display: none !important; }
.menu-detail .menu-panel > p:first-child {
  color: var(--menu-muted);
  font-size: var(--fs-small);
  line-height: 1.6;
  margin: 0 0 1.1rem;
}
.menu-about-body {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--menu-fg);
  margin: 0 0 1rem;
  font-weight: 500;
}
.menu-box .menu-about-body p {
  margin: 0 0 .9rem;
  color: var(--menu-fg);
  font-size: 1.05rem;
  line-height: 1.65;
}
.menu-about-kicker {
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: .72rem !important;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--menu-muted) !important;
  margin: 0 0 1rem !important;
}
.menu-about-body a {
  color: var(--menu-accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.menu-note {
  font-size: .8rem; color: var(--menu-muted); line-height: 1.5;
  margin: .85rem 0 0;
}
.menu-mail {
  display: inline-block; font-weight: 800; color: var(--menu-accent);
  word-break: break-all; margin: .35rem 0 .5rem;
}
.menu-mail-card {
  display: block;
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 2px solid var(--menu-line);
  background: var(--menu-field-bg, var(--milk));
  text-decoration: none;
  color: inherit;
  transition: filter .15s ease;
}
.menu-mail-card:hover { filter: brightness(.97); }
.menu-mail-card .menu-label {
  margin: 0 0 .35rem;
  color: var(--menu-muted);
}
.menu-mail-card .menu-mail {
  display: block;
  margin: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  color: var(--menu-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.menu-form-block {
  border-top: 2px solid var(--menu-line);
  padding-top: 1.15rem;
}
.menu-form-title {
  margin: 0 0 1rem !important;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: .78rem !important;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--menu-fg) !important;
}
.menu-field-hint {
  margin: .4rem 0 0;
  font-size: .78rem;
  line-height: 1.45;
  color: var(--menu-muted);
  font-weight: 600;
}
.menu-field-hint.is-warn { color: var(--terre); }
.menu-label {
  display: block; font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--menu-muted); margin: .75rem 0 .3rem;
}
.menu-panel textarea,
.menu-panel input[type="text"],
.menu-panel input[type="email"] {
  width: 100%; font: inherit; font-size: 16px;
  color: var(--menu-fg); background: var(--menu-field-bg);
  border: 2px solid var(--menu-field-border); border-radius: var(--radius-ui, 0.75rem);
  padding: .65rem .7rem; min-height: 48px;
  box-sizing: border-box;
}
.menu-panel textarea { min-height: 110px; resize: vertical; }
.menu-panel textarea::placeholder,
.menu-panel input::placeholder { color: var(--menu-muted); opacity: .85; }

.menu-detail .act-call {
  background: var(--menu-cta-bg);
  color: var(--menu-cta-fg);
  border-color: var(--menu-cta-bg);
}

.menu-detail .pref-row {
  border-bottom-color: color-mix(in srgb, var(--menu-line) 35%, transparent);
  align-items: flex-start;
}
.menu-detail .pref-copy strong { color: var(--menu-fg); }
.menu-detail .pref-copy span { color: var(--menu-muted); }
.menu-detail .pref-switch {
  border-color: var(--menu-line);
  background: var(--menu-field-bg);
}
.menu-detail[data-panel="settings"] .pref-switch:checked {
  background: var(--espresso);
}
.menu-detail[data-panel="settings"] .pref-switch:checked::after {
  background: var(--miel);
}

.pref-lang { cursor: default; }
.lang-seg {
  display: flex;
  flex: none;
  border: var(--line);
  background: var(--milk);
}
.lang-opt {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--espresso);
  font: inherit;
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .06em;
  min-width: 44px;
  min-height: 36px;
  padding: .35rem .7rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lang-opt + .lang-opt { border-left: var(--line); }
.lang-opt.on {
  background: var(--espresso);
  color: var(--milk);
}
.menu-detail[data-panel="settings"] .lang-seg {
  border-color: var(--menu-line);
  background: var(--menu-field-bg);
}
.menu-detail[data-panel="settings"] .lang-opt {
  color: var(--menu-fg);
}
.menu-detail[data-panel="settings"] .lang-opt.on {
  background: var(--espresso);
  color: var(--miel);
}

.pref-row {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--espresso-30);
  cursor: pointer;
}
.pref-row:last-of-type { border-bottom: none; }
.pref-copy { flex: 1; min-width: 0; }
.pref-copy strong {
  display: block; font-size: .95rem; margin-bottom: .3rem;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
}
.pref-copy span {
  display: block; font-size: .8rem; line-height: 1.45;
  color: var(--espresso-60);
}

.pref-switch {
  appearance: none; -webkit-appearance: none;
  width: 48px; height: 28px; flex: none; margin-top: .15rem;
  border: var(--line); background: #fbf2dd; border-radius: 999px;
  position: relative; cursor: pointer;
  transition: background .2s ease;
}
.pref-switch::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: var(--espresso); border-radius: 50%;
  transition: transform .2s ease;
}
.pref-switch:checked { background: var(--bleu); }
.pref-switch:checked::after { transform: translateX(20px); background: var(--milk); }
.pref-switch:focus-visible { outline: 2px solid var(--terre); outline-offset: 2px; }

.footer a.made-by {
  color: var(--espresso-60);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .menu-veil, .menu-box, .menu-stage { transition: none !important; }
}

/* GSAP owns panel motion — disable CSS transitions that would fight it */
body.has-gsap .menu-veil,
body.has-gsap .menu-box,
body.has-gsap .menu-stage,
body.has-gsap .sheet-veil,
body.has-gsap .sheet,
body.has-gsap .tree-overlay,
body.has-gsap .themes-overlay {
  transition: none !important;
}
body.has-gsap .menu-detail {
  /* GSAP owns the soft palette wash on background */
  transition: color .35s ease;
}
body.has-gsap .menu-box,
body.has-gsap .menu-veil.on .menu-box,
body.has-gsap .menu-stage[data-view="index"],
body.has-gsap .menu-stage[data-view="detail"],
body.has-gsap .sheet,
body.has-gsap .sheet.on,
body.has-gsap .tree-overlay,
body.has-gsap .tree-overlay.on,
body.has-gsap .themes-overlay,
body.has-gsap .themes-overlay.on {
  /* resting positions come from GSAP inline styles */
  transform: none;
}
body.has-gsap .sheet-veil.on {
  opacity: 1;
}
body.has-gsap .tree-overlay.on {
  opacity: 1;
}

/* Touch feedback: press feels immediate, not jumpy */
@media (pointer: coarse) {
  .menu-item:active { filter: brightness(.95); }
  .tree-choice:active,
  .guided-btn:active,
  .browse-btn:active,
  .act:active {
    opacity: .92;
  }
}

/* ---------- toast / footer / switcher ---------- */
.toast {
  background: var(--espresso); color: var(--milk);
  padding: .6rem 1.2rem; border-radius: var(--radius-ui, 0.75rem);
  font-size: var(--fs-small); font-weight: 700;
  box-shadow: var(--shadow-soft, none);
}
.footer {
  color: var(--espresso-30);
  font-size: var(--fs-tiny);
  padding: 0 1.25rem 1.25rem;
  line-height: 1.7;
  position: relative;
  z-index: 2;
}
.footer button { text-decoration: underline; color: var(--espresso-60); font-size: inherit; }

/* Home fits the screen — no empty rubber-band scroll */
html.home-locked,
html.home-locked body {
  overflow: hidden !important;
  overscroll-behavior: none;
  height: 100%;
  height: 100svh;
}
body.home-locked .canopy-top {
  min-height: 100svh;
  height: 100svh;
  box-sizing: border-box;
}
body.home-locked .ground {
  display: none;
}
body.home-locked .footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 4.35rem);
  padding: 0 1.25rem;
  margin: 0;
  pointer-events: none;
}
body.home-locked .footer a,
body.home-locked .footer button {
  pointer-events: auto;
}

.v-switch a { border: 2px solid var(--espresso); background: var(--milk); color: var(--espresso); }
.v-switch a[aria-current] { background: var(--espresso); color: var(--milk); }
