/* ============================================================
   CANOPY — AFFICHE ITERATION A · FLUIDE  (flagship)
   ------------------------------------------------------------
   Loads after theme-affiche.css.

   COLOR LOGIC — the six café colors live in fixed contrast duos,
   exactly like the palette cards in the reference photo:
     espresso  #542916 ⇄ bleu porcelaine #88b8ce
     terre     #a13a1e ⇄ miel doré       #f1c166
     eau       #b79858 ⇄ nuage de lait   #fefaf0
   Every colored surface takes its partner as ink. Categories
   carry their duo (--cat / --cat-ink), set by app.js.

   MOTION LOGIC — everything moves like something on earth:
     sun     · the honey arch rises at the horizon, glows slowly
     wind    · shapes sway like branches, each on its own period
     water   · focusing the search sends a ripple; the sheet
               slides like a tide
     leaves  · results fall-and-settle; a small leaf drops from
               the canopy every so often
     roots   · category tiles grow up from the ground on scroll
   ============================================================ */

/* ---------- contrast pass (readability over mood) ---------- */
:root {
  --espresso-60: rgba(84, 41, 22, .74);  /* was .6 — descriptions must read */
  --espresso-30: rgba(84, 41, 22, .42);
}
.entry-hint { color: var(--espresso-60); }
.hero .sub { color: var(--espresso-60); }

/* ---------- retire the static pseudo-element shapes ---------- */
.canopy-top::before, .canopy-top::after, .hero::after { content: none; }

/* ---------- the earth composition ---------- */
.canopy-top { overflow: hidden; }
/* Keep the menu control outside the decorative clip so taps always land */
.canopy-top .top-bar,
.canopy-top .top-actions,
.canopy-top .menu-toggle {
  overflow: visible;
}
.shapes { position: absolute; inset: 0; pointer-events: none !important; z-index: 0; }
.sh,
.sh::before {
  pointer-events: none !important;
}
.sh {
  position: absolute;
  translate: calc(var(--mx, 0) * var(--depth, 10px))
             calc(var(--my, 0) * var(--depth, 6px) + var(--sy, 0) * var(--drop, 20px));
  transition: translate 1.2s var(--ease), scale .7s var(--ease), opacity .7s var(--ease);
}
.sh::before { content: ""; display: block; }

/* the sun — honey arch at the horizon, rising as the day breathes */
.sh-sun { bottom: -6px; left: -40px; --depth: 8px; --drop: 30px; }
.sh-sun::before {
  width: 210px; height: 105px; border-radius: 210px 210px 0 0;
  background: var(--miel);
  animation: sunrise 18s ease-in-out infinite;
}
@keyframes sunrise {
  0%, 100% { transform: translateY(26px); filter: brightness(.97); }
  50%      { transform: translateY(0);    filter: brightness(1.05); }
}

/* the moon — porcelain circle drifting like a slow cloud */
.sh-moon { top: -110px; right: -90px; --depth: 16px; --drop: 46px; }
.sh-moon::before {
  width: 300px; height: 300px; border-radius: 50%;
  background: var(--bleu);
  animation: cloud 26s ease-in-out infinite alternate;
}
@keyframes cloud {
  from { transform: translateX(0) translateY(0); }
  to   { transform: translateX(-22px) translateY(8px); }
}

/* the mountain — terre triangle, still; only the wind touches it */
.sh-mont { top: 86px; right: 15%; --depth: 24px; --drop: 60px; }
.sh-mont::before {
  width: 0; height: 0;
  border-left: 30px solid transparent; border-right: 30px solid transparent;
  border-bottom: 52px solid var(--terre);
  transform-origin: 50% 100%;
  animation: windSway 13s ease-in-out infinite alternate;
}
@keyframes windSway {
  from { transform: rotate(-1.6deg); }
  to   { transform: rotate(1.6deg); }
}

/* the leaf — a small eau ring that lets go and falls, then regrows */
.sh-leaf { top: 42%; left: 7%; --depth: 32px; --drop: 80px; }
.sh-leaf::before {
  width: 42px; height: 42px; border-radius: 50%;
  border: 6px solid var(--eau);
  animation: leafFall 17s var(--ease) infinite;
}
@keyframes leafFall {
  0%, 55%  { transform: translateY(0) rotate(0deg); opacity: 1; }
  70%      { transform: translateY(90px) translateX(24px) rotate(38deg); opacity: 0; }
  71%      { transform: translateY(-30px) rotate(-10deg); opacity: 0; }
  85%, 100%{ transform: translateY(0) rotate(0deg); opacity: 1; }
}
@media (max-width: 560px) { .sh-mont, .sh-leaf { display: none; } }

body.is-typing .sh { scale: 1.05; }

/* ---------- search choreography: the poster folds away ---------- */
.top-bar { transition: margin-bottom .55s var(--ease); }
.hero h1 { transition: font-size .5s var(--ease), opacity .4s var(--ease); }
.hero-morph-layer { transition: none; }
.hero .sub { transition: opacity .35s var(--ease); }
body.has-query .hero-morph-slot { filter: none; }
.canopy-top { transition: padding-bottom .55s var(--ease); }

body.has-query .top-bar { margin-bottom: 1.1rem; }
body.has-query .hero h1 { font-size: clamp(1.25rem, 1.6vw + .7rem, 1.7rem); opacity: .6; }
body.has-query .hero .sub { opacity: 0; }
body.has-query .canopy-top { padding-bottom: 2.2rem; }
body.has-query .sh { scale: .82; opacity: .55; }

/* ---------- water: the underline ripples on focus ---------- */
.search-wrap { position: relative; border-bottom-color: rgba(84, 41, 22, .5); }
.search-wrap::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: var(--terre);
  transform: scaleX(0); transform-origin: left;
  transition: transform .55s var(--ease);
}
.search-wrap:focus-within::after { transform: scaleX(1); }
/* the ripple ring, spreading from the leaf like a drop on a pond */
.search-leaf { position: relative; }
.search-wrap:focus-within .search-leaf { animation: dip .5s var(--ease); }
@keyframes dip { 35% { transform: translateY(3px) rotate(-8deg); } }
.search-wrap::before {
  content: "";
  position: absolute; left: 12px; top: 50%;
  width: 20px; height: 20px; margin-top: -10px;
  border-radius: 50%;
  border: 2px solid var(--bleu);
  opacity: 0; transform: scale(.5);
  pointer-events: none;
}
.search-wrap:focus-within::before { animation: ripple 1.1s var(--ease); }
@keyframes ripple {
  0%   { opacity: .9; transform: scale(.5); }
  100% { opacity: 0;  transform: scale(3.2); }
}

/* ---------- leaves: results fall and settle ---------- */
.res-card { animation: leafSettle .6s var(--ease) backwards; }
.result-list .res-card:nth-child(2) { animation-delay: 100ms; }
.result-list .res-card:nth-child(3) { animation-delay: 200ms; }
@keyframes leafSettle {
  0%   { opacity: 0; transform: translateY(-14px) rotate(.7deg); }
  60%  { opacity: 1; transform: translateY(4px) rotate(-.25deg); }
  100% { transform: none; }
}

/* results carry their category's duo on hover — the color logic, felt */
.res-card { border-left-width: 2px; }
.res-card:hover {
  transform: translateX(4px);
  background: color-mix(in srgb, var(--cat, var(--miel)) 14%, var(--milk));
}
.res-card .cat-strip { width: 8px; transition: width .35s var(--ease); }
.res-card:hover .cat-strip { width: 12px; }
.res-sub { color: var(--espresso-60); }

/* section rule draws itself */
#home-zone.wake .section-label::after,
#results-zone .section-label::after { transform-origin: left; animation: drawRule .9s var(--ease) both; }
@keyframes drawRule { from { transform: scaleX(0); } }

/* ---------- roots: category tiles grow up from the ground ---------- */
body.alive #home-zone .cat-sticker {
  opacity: 0; transform: translateY(22px) scale(.985);
  transition: opacity .65s var(--ease), transform .65s var(--ease),
              background .3s var(--ease), color .3s var(--ease);
  transform-origin: 50% 100%;
}
body.alive #home-zone .cat-sticker.in-view { opacity: 1; transform: none; }
body.alive #home-zone .cat-sticker:nth-child(3n+2) { transition-delay: 60ms; }
body.alive #home-zone .cat-sticker:nth-child(3n)   { transition-delay: 120ms; }
body.alive #home-zone .cat-sticker.in-view:hover   { transition-delay: 0ms; }

/* hover floods the tile with its duo — bloom */
.cat-sticker:hover, body.alive #home-zone .cat-sticker.in-view:hover {
  background: var(--cat, var(--miel));
  color: var(--cat-ink, var(--espresso));
  transform: translateY(-3px);
}
.cat-sticker:hover .cat-count { color: var(--cat-ink); opacity: .6; }
.cat-sticker:hover .cat-icon { background: var(--cat-ink) !important; color: var(--cat) !important; transform: rotate(180deg); }
.cat-icon { transition: transform .7s var(--ease), background .3s var(--ease), color .3s var(--ease); }

#home-zone.wake .guided-btn { animation: leafSettle .55s var(--ease) backwards; }

/* ---------- badges: the duo system, readable first ---------- */
.badge { border-width: 1.5px; }
.badge.b-free   { background: var(--miel);  border-color: var(--terre);   color: #7c2c15; }
.badge.b-open   { background: var(--bleu);  border-color: var(--espresso); color: var(--espresso); }
.badge.b-open .dot { background: var(--espresso); }
.badge.b-urgent { background: var(--terre); border-color: var(--terre);   color: var(--miel); }
.badge.b-paid   { background: var(--milk);  border-color: var(--eau);     color: #6e5731; border-style: solid; }
.badge.b-closed { background: transparent;  border-color: var(--espresso-30); color: var(--espresso-60); }

/* ---------- your path, shown back (the personal part) ---------- */
.path-row { margin: 0 0 1.2rem; animation: leafSettle .5s var(--ease) backwards; }
.path-you {
  font-size: var(--fs-tiny); font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--espresso-60);
}
.path-chip {
  font-size: var(--fs-tiny); font-weight: 700;
  padding: .3rem .65rem;
  background: var(--espresso); color: var(--bleu);
  letter-spacing: .03em;
}
.path-chip + .path-chip { position: relative; margin-left: .9rem; }
.path-chip + .path-chip::before {
  content: "→"; position: absolute; left: -1.05rem;
  color: var(--espresso-60); font-weight: 400;
}
.path-edit {
  font-size: var(--fs-tiny); font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
  color: var(--terre);
}
.assist-note {
  margin: 0 0 1.1rem;
  font-size: var(--fs-small); font-style: italic;
  color: var(--espresso-60);
  border-left: 4px solid var(--bleu); padding-left: .8rem;
}

/* ---------- Enter hint: appears while you type, breathes gently ---------- */
.enter-hint {
  display: none;
  font-size: var(--fs-tiny); font-weight: 700;
  border: 1.5px solid var(--espresso-30);
  padding: .15rem .5rem;
  color: var(--espresso-60);
  animation: hintBreath 2.6s ease-in-out infinite;
}
body.has-query .enter-hint { display: inline-block; }
@keyframes hintBreath { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- constellation breath between Enter and the answer ---------- */
.searching {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3.2rem 0 2.6rem;
  min-height: 7rem;
}
.find-map {
  display: block;
  overflow: visible;
}
.find-link--espresso { stroke: var(--espresso); }
.find-link--terre { stroke: var(--terre); }
.find-link--bleu { stroke: var(--bleu); }
.find-link--miel { stroke: var(--miel); }
.find-node { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .find-node { opacity: 1; }
  .find-link { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
}

/* ---------- the guide (assist cards) ---------- */
.assist-card {
  border: var(--line);
  background: var(--milk);
  padding: 1.4rem 1.4rem 1.5rem;
  margin-bottom: 1.4rem;
  position: relative;
  animation: leafSettle .55s var(--ease) backwards;
}
.assist-card::before { /* the guide's mark: a small honey sun */
  content: "";
  position: absolute; top: -11px; left: 22px;
  width: 40px; height: 20px; border-radius: 40px 40px 0 0;
  background: var(--miel); border: 2px solid var(--espresso); border-bottom: none;
}
.assist-q {
  margin: 0 0 1.1rem;
  font-family: 'Josefin Sans', sans-serif;
  font-size: var(--fs-h3); font-weight: 600;
}
/* ---------- visible AI helper strip + info icon ---------- */
.helper-strip {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1.5px dashed var(--espresso-30);
}
.helper-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .55rem;
}
.helper-strip-label {
  margin: 0;
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--espresso-60);
}
.helper-info-btn {
  flex: none;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--line);
  border-radius: 50%;
  background: var(--milk);
  color: var(--espresso);
  font-family: 'Josefin Sans', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.helper-info-btn:hover {
  background: var(--bleu);
  color: var(--espresso);
  transform: scale(1.05);
}
.helper-info-btn:focus-visible {
  outline: 3px solid var(--terre);
  outline-offset: 2px;
}
.helper-cta {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  text-align: left;
  border: var(--line);
  background: color-mix(in srgb, var(--bleu) 14%, var(--milk));
  padding: .95rem 1.05rem;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.helper-cta:hover {
  transform: translateX(4px);
  background: color-mix(in srgb, var(--bleu) 24%, var(--milk));
}
.helper-cta-icon {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--terre);
}
.helper-cta-icon svg { width: 100%; height: 100%; display: block; }
.helper-cta-copy { flex: 1; min-width: 0; }
.helper-cta-badge {
  display: inline-block;
  margin-bottom: .28rem;
  padding: .12rem .45rem;
  border: 1.5px solid var(--bleu);
  background: color-mix(in srgb, var(--bleu) 18%, var(--milk));
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--espresso);
}
.helper-cta-title {
  display: block;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
  color: var(--espresso);
}
.helper-cta-sub {
  display: block;
  margin-top: .28rem;
  font-size: var(--fs-tiny);
  letter-spacing: .04em;
  color: var(--espresso-60);
}
.helper-cta-go {
  flex: none;
  color: var(--terre);
  font-weight: 700;
  font-size: 1.1rem;
}
.tree-foot .helper-strip { margin-top: .35rem; padding-top: .75rem; }

.helper-info-box .helper-info-list {
  margin: 0 0 1.2rem;
  padding: 0 0 0 1.1rem;
  color: var(--espresso-60);
  font-size: var(--fs-small);
  line-height: 1.55;
}
.helper-info-box .helper-info-list li + li { margin-top: .45rem; }
.helper-info-veil { background: rgba(84, 41, 22, .5); }

/* the warm first line, before the question */
.assist-ack {
  margin: 0 0 .5rem;
  font-size: 1.05rem; font-style: italic;
  color: var(--espresso-60);
  animation: leafSettle .5s var(--ease) backwards;
}
.assist-ack-quiet {
  font-size: var(--fs-small);
  margin-top: -.2rem;
  margin-bottom: 1rem;
}
.assist-privacy-soft {
  margin: 0 0 1rem;
  font-size: var(--fs-small);
  color: var(--espresso-60);
}
.convo-crumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .9rem; }
.convo-foot {
  display: flex; flex-wrap: wrap; gap: .9rem 1.2rem; margin-top: 1.2rem;
  padding-top: .9rem; border-top: 1.5px dashed var(--espresso-30);
  align-items: center;
}
.convo-link {
  font-size: var(--fs-tiny); font-weight: 700;
  color: var(--espresso-60);
  text-decoration: underline; text-underline-offset: 3px;
}
.convo-link:hover { color: var(--terre); }
.assist-choice {
  border: var(--line);
  background: var(--milk);
  padding: .95rem 1.15rem;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  animation: leafSettle .5s var(--ease) backwards;
}
.assist-choice:nth-child(2) { animation-delay: 70ms; }
.assist-choice:nth-child(3) { animation-delay: 140ms; }
.assist-choice:nth-child(4) { animation-delay: 210ms; }
.assist-choice:nth-child(5) { animation-delay: 280ms; }
.assist-choice:hover { transform: translateX(4px); background: #fbf2dd; }
.assist-choice .t-label { font-weight: 600; }
.assist-choice .t-sub { font-size: var(--fs-tiny); text-transform: uppercase; letter-spacing: .1em; color: var(--espresso-60); width: 100%; }
.assist-choice .t-go { color: var(--terre); }
.assist-none { border-style: dashed; }

.assist-privacy {
  font-size: var(--fs-small); line-height: 1.6;
  color: var(--espresso-60);
  margin: 0 0 1rem;
}
.assist-consent .assist-choices { margin-top: .2rem; }
.assist-echo {
  margin: 0 0 1.2rem; padding: .8rem 1rem;
  border-left: 4px solid var(--eau);
  background: #fbf2dd;
  font-style: italic;
}
.assist-thinking { padding: 2.2rem 1.4rem; }
.think-dot {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  background: var(--espresso); margin: 0 4px;
  animation: think 1.3s ease-in-out infinite;
}
.think-dot:nth-child(2) { animation-delay: .18s; background: var(--terre); }
.think-dot:nth-child(3) { animation-delay: .36s; background: var(--eau); }
@keyframes think { 0%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-7px); opacity: 1; } }

.ai-status {
  display: block;
  margin: .5rem 0 0;
  font-size: .78rem;
  font-weight: 600;
  color: var(--terre);
  animation: aiPulse 1.6s ease-in-out infinite;
}
body.ai-active .search-wrap { outline: 2px solid var(--terre); outline-offset: 3px; border-radius: 2px; }
body.ai-active .ai-status { display: block; }
.assist-echo-live { margin: .6rem 0 0; font-style: italic; opacity: .85; }
.assist-privacy-compact { font-size: .72rem; margin-top: .6rem; opacity: .75; }
.think-row { display: flex; gap: .35rem; justify-content: center; margin-top: .8rem; }
.assist-ai-foot { margin-top: .6rem; border-style: dashed; }
.ai-sent-note { margin-top: 1rem; font-size: .75rem; opacity: .8; }
@keyframes aiPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- desktop: the sheet is a side panel (a tide, not a curtain) ---------- */
@media (min-width: 900px) {
  .sheet {
    left: auto; right: 0; top: 0; bottom: 0;
    width: 560px; max-height: none;
    border: none; border-left: 3px solid var(--espresso);
    border-radius: 0;
    transform: translateX(105%);
    transition: transform .5s var(--ease);
  }
  .sheet.on { transform: translateX(0); }
  .sheet-handle { display: none; }
  .sheet-scroll { padding-top: 1.6rem; }
  .sheet-veil { background: rgba(84, 41, 22, .18); }
}

/* ---------- small signs of life ---------- */
.sos { animation: sosBreath 5s ease-in-out infinite; }
@keyframes sosBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(161, 58, 30, .35); }
  50%      { box-shadow: 0 0 0 9px rgba(161, 58, 30, 0); }
}
.badge.b-open .dot { animation-duration: 3.4s; }

/* ---------- research blobs · post-Enter options field ---------- */
body.has-blobs {
  overflow: hidden;
}
body.has-blobs .footer,
body.has-blobs .sos {
  display: none !important;
}
body.has-blobs.is-browsing:not(.is-editing) .canopy-top {
  padding: 0 !important;
  margin: 0 !important;
  max-height: 0;
  min-height: 0;
  overflow: hidden;
  border: none;
  pointer-events: none;
}

/* Focus bar — clean, no decorative blobs; hide redundant back (chrome has Back) */
body.has-blobs.is-browsing .focus-bar {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  min-height: 0;
  gap: 0.5rem;
  padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
  padding-bottom: 0.55rem;
  padding-left: calc(7.25rem + env(safe-area-inset-left, 0px));
  padding-right: calc(3.4rem + env(safe-area-inset-right, 0px));
  background: linear-gradient(to bottom, #fdf0e8 75%, rgba(253, 240, 232, 0));
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.has-blobs.is-browsing .focus-back {
  display: none !important; /* query chip + bottom Back cover this */
}
body.has-blobs.is-browsing .focus-query {
  flex: 1;
  min-width: 0;
  gap: 0;
  padding: 0.5rem 0.95rem;
  border: none;
  background: #fff8f2;
  border-radius: 1.4rem;
  box-shadow: 0 1px 8px rgba(84, 41, 22, 0.06);
}
body.has-blobs.is-browsing .focus-query:hover {
  background: #fbf2dd;
}
body.has-blobs.is-browsing .focus-q-label {
  display: none;
}
body.has-blobs.is-browsing .focus-q-text {
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
}
body.has-blobs .menu-toggle-fixed {
  top: max(env(safe-area-inset-top, 0px), 0.45rem);
  right: max(env(safe-area-inset-right, 0px), 0.45rem);
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  border: none;
  background: #fff8f2;
  box-shadow: 0 1px 10px rgba(84, 41, 22, 0.08);
  color: var(--espresso);
}
body.has-blobs .menu-toggle-fixed:hover {
  background: #fbf2dd;
  color: var(--espresso);
}
body.has-blobs .menu-toggle-fixed .menu-icon {
  width: 1.15rem;
  height: 1.15rem;
}
body.has-blobs .focus-bar {
  z-index: 45;
  background: transparent;
}

/* Full-height flex field under the focus bar */
body.has-blobs.is-browsing .ground {
  max-width: none;
  margin: 0;
  padding: 0 !important;
  height: calc(100dvh - var(--browse-chrome-h, 3.25rem));
  min-height: 0;
  overflow: hidden;
}
body.has-blobs.is-editing .ground {
  height: auto;
  max-height: calc(100dvh - 8rem);
  overflow: auto;
}
body.has-blobs #results-zone {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.blob-results {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  background: #fdf0e8;
}
.blob-top {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.35rem 1rem 0.15rem;
  pointer-events: none;
}
.blob-prompt {
  margin: 0;
  text-align: center;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(0.88rem, 2.4vw, 1.05rem);
  color: var(--espresso);
  line-height: 1.35;
  max-width: min(26rem, calc(100vw - 2rem));
  pointer-events: none;
  padding: 0.5rem 1rem;
  background: #fff8f2;
  border: none;
  border-radius: 1.35rem;
  box-shadow: 0 1px 10px rgba(84, 41, 22, 0.05);
  transition: opacity 0.35s ease, transform 0.4s ease;
}
body.blobs-thinking .blob-prompt,
body.blobs-breathing .blob-prompt,
body.blobs-splitting .blob-prompt {
  /* calm — no scale buzz */
  opacity: 0.88;
  animation: none;
}
.blob-prompt.is-swapping {
  animation: blob-prompt-swap 0.45s ease;
}
@keyframes blob-prompt-swap {
  from { opacity: 0.25; }
  to { opacity: 1; }
}

.blob-stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  margin: 0;
  border: none;
  background: #fdf0e8;
  overflow: hidden;
  isolation: isolate;
}
.blob-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.blob-label {
  position: absolute;
  z-index: 5;
  text-align: center;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(84, 41, 22, 0.08);
  transition: box-shadow 0.25s ease, filter 0.2s ease, opacity 0.45s ease;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: manual;
  max-width: min(15rem, 78vw);
  min-width: min(8.5rem, 52vw);
  line-height: 1.3;
  will-change: auto;
  background: #fff8f2;
  border: none;
  border-radius: 1.15rem;
  color: var(--espresso);
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  margin: 0;
}
.blob-label:hover { filter: brightness(1.03); }
.blob-label.pressed { filter: brightness(0.96); }
.blob-label .nm {
  display: block;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}
.blob-label .sub {
  display: block;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 3px;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  line-height: 1.25;
}
.blob-label .pct {
  display: block;
  font-weight: 400;
  opacity: 0.5;
  margin-top: 2px;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
}
.blob-label.is-ghost,
.blob-label.is-fading {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden;
}

/* Bottom chrome */
.blob-chrome {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
  padding: 0.35rem 0.85rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, #fdf0e8 80%, rgba(253, 240, 232, 0));
  pointer-events: none;
  transform: none;
  animation: none;
}
.blob-chrome > * { pointer-events: auto; transform: none; animation: none; }
.blob-chrome-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}
.blob-chrome-row .also-chip,
.blob-chip {
  margin: 0;
  font-size: 0.76rem;
  padding: 0.4rem 0.85rem;
  background: #fff8f2;
  border: 1.5px solid rgba(84, 41, 22, 0.12);
  border-radius: 999px;
  box-shadow: none;
  color: var(--espresso);
  transform: none;
  animation: none;
}

/* Ask AI — simple soft pill + leaf */
.blob-ai {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
}
.blob-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.55rem 1.05rem 0.55rem 0.7rem;
  border: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bleu) 28%, #fff8f2);
  color: var(--espresso);
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 2px 10px rgba(84, 41, 22, 0.07);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s ease, filter 0.2s ease;
}
.blob-ai-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}
.blob-ai-btn.is-busy {
  pointer-events: none;
  opacity: 0.72;
  animation: none;
}
.blob-ai-seed {
  /* legacy class — render as quiet leaf disc */
  width: 1.35rem;
  height: 1.35rem;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--terre) 35%, #fff);
  box-shadow: none;
  animation: none;
  position: relative;
}
.blob-ai-seed::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 60% 40% 55% 45%;
  background: var(--terre);
  opacity: 0.55;
}
.blob-ai-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  line-height: 1.15;
}
.blob-ai-kicker {
  display: none; /* less chrome on small screens */
}
.blob-ai-label {
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.88rem;
}
.blob-ai-info {
  flex: none;
  width: 2.15rem;
  height: 2.15rem;
  margin: 0;
  padding: 0;
  border: 1.5px solid rgba(84, 41, 22, 0.12);
  border-radius: 50%;
  background: #fff8f2;
  color: var(--espresso);
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
.blob-ai-info:hover { background: var(--miel); }

/* Breath / split / ritual states */
body.blobs-breathing .blob-chrome,
body.blobs-splitting .blob-chrome {
  opacity: 0;
  pointer-events: none;
  transition: none;
}
body:not(.blobs-breathing):not(.blobs-splitting) .blob-chrome {
  opacity: 1;
  transition: opacity 0.55s ease;
}
body.blobs-breathing .blob-label,
body.blobs-splitting .blob-label,
body.blobs-thinking:not(.blobs-breathing):not(.blobs-splitting) .blob-label,
body.blobs-ritual .blob-label {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.blobs-ritual .blob-chrome {
  opacity: 0.4;
  pointer-events: none;
}
.blob-stage.blob-reveal .blob-label:not(.is-ghost) {
  animation: blob-label-in 0.9s ease backwards;
}
@keyframes blob-label-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.has-blobs.is-editing .blob-results {
  opacity: 0.4;
  pointer-events: none;
}

@media (max-width: 560px) {
  body.has-blobs.is-browsing .focus-bar {
    padding-top: max(0.4rem, env(safe-area-inset-top, 0px));
    padding-bottom: 0.4rem;
    padding-left: calc(3.4rem + env(safe-area-inset-left, 0px));
    padding-right: calc(3.15rem + env(safe-area-inset-right, 0px));
  }
  body.has-blobs.is-browsing .ground {
    height: calc(100dvh - var(--browse-chrome-h, 2.9rem));
  }
  .blob-top { padding: 0.25rem 0.75rem 0.1rem; }
  .blob-prompt {
    font-size: 0.86rem;
    padding: 0.45rem 0.85rem;
    max-width: calc(100vw - 1.5rem);
  }
  .blob-label .pct { display: none; }
  .blob-label .sub {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .blob-label {
    max-width: min(13.5rem, 82vw);
    min-width: min(7.5rem, 58vw);
  }
  .blob-chrome {
    gap: 0.35rem;
    padding: 0.25rem 0.65rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  }
  .blob-ai-btn {
    padding: 0.48rem 0.9rem 0.48rem 0.55rem;
    font-size: 0.82rem;
  }
  .blob-ai-label { font-size: 0.82rem; }
  .blob-ai-seed { width: 1.2rem; height: 1.2rem; }
  .blob-ai-info { width: 2rem; height: 2rem; }
  .blob-chrome-row .also-chip,
  .blob-chip {
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob-label { transition: none; box-shadow: none; }
  body.blobs-thinking .blob-prompt,
  body.blobs-breathing .blob-prompt,
  body.blobs-splitting .blob-prompt,
  .blob-ai-btn.is-busy,
  .blob-stage.blob-reveal .blob-label,
  .blob-prompt.is-swapping {
    animation: none;
  }
}
