/* ============================================================
   CANOPY — ORGANIC RESOURCE DECK + CLARIFY STRIP
   Affiche palette · mobile-first · living mode only
   ============================================================ */

/* Shared browsing lock (match blob stage) */
body.has-deck,
body.has-strip {
  overflow: hidden;
}
body.has-deck .footer,
body.has-deck .sos,
body.has-strip .footer,
body.has-strip .sos {
  display: none !important;
}
body.has-deck.is-browsing:not(.is-editing) .canopy-top,
body.has-strip.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;
}

body.has-deck.is-browsing .ground,
body.has-strip.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-deck.is-editing .ground,
body.has-strip.is-editing .ground {
  height: auto;
  max-height: calc(100dvh - 8rem);
  overflow: auto;
}
body.has-deck #results-zone,
body.has-strip #results-zone {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Focus chrome — query chip centered; brand + menu stay in corners */
body.has-deck.is-browsing .focus-bar,
body.has-strip.is-browsing .focus-bar {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  min-height: 2.85rem;
  gap: 0;
  padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
  padding-bottom: 0.55rem;
  padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  background: var(--ground, #fdf0e8);
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.has-deck.is-browsing .focus-back,
body.has-strip.is-browsing .focus-back {
  display: none !important;
}
body.has-deck.is-browsing .focus-query,
body.has-strip.is-browsing .focus-query {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  flex: none;
  width: max-content;
  max-width: min(26rem, calc(100vw - 8.5rem));
  min-width: 0;
  gap: 0;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0.48rem 1.2rem;
  border: 1.5px solid color-mix(in srgb, var(--espresso) 16%, transparent);
  background: #fffefb;
  border-radius: 999px;
  box-shadow: none;
  text-align: center;
}
body.has-deck.is-browsing .focus-q-text,
body.has-strip.is-browsing .focus-q-text {
  text-align: center;
  margin: 0;
  width: 100%;
  display: block;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: color-mix(in srgb, var(--espresso) 58%, transparent);
}
body.has-deck.is-browsing .focus-q-text::before,
body.has-strip.is-browsing .focus-q-text::before,
body.has-deck.is-browsing .focus-q-text::after,
body.has-strip.is-browsing .focus-q-text::after {
  content: none !important;
}
body.has-deck.is-browsing .focus-q-label,
body.has-strip.is-browsing .focus-q-label {
  display: none;
}
body.has-deck .menu-toggle-fixed,
body.has-strip .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: transparent;
  box-shadow: none;
  color: var(--espresso);
}

/* ---------- living clarify strip ---------- */
.assist-strip {
  flex: 1 1 auto;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto !important;
  padding: 0.35rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.is-browsing .assist-strip.assist-card {
  padding: 0.35rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important;
  margin: 0 auto !important;
}
.assist-strip.assist-card {
  border: none;
  box-shadow: none;
  border-radius: 0;
  position: relative;
  background: transparent;
}
.assist-strip.assist-card::before {
  display: none;
}
.assist-strip .assist-ack {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  color: var(--espresso-60, rgba(84, 41, 22, 0.74));
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}
.assist-strip .convo-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.assist-strip .assist-q {
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.65rem, 6vw, 2.15rem);
  color: var(--espresso);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-transform: lowercase;
  margin: 0.35rem 0 1.25rem;
  max-width: none;
  text-align: left;
}
.assist-strip .assist-choices {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1 1 auto;
}
/* Match theme refine list — milk rows, soft border, no color marks */
.assist-strip .assist-choice {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  width: 100%;
  margin: 0;
  padding: 0.9rem 1.15rem;
  border: var(--line-soft, 1.5px solid var(--espresso)) !important;
  cursor: pointer;
  background: var(--surface, var(--milk));
  color: var(--espresso);
  box-shadow: var(--shadow-soft, none);
  border-radius: var(--radius-card, 0.9rem);
  transition: transform 0.22s var(--ease), background 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
  animation: softSettle 0.5s var(--ease) both !important;
  flex-wrap: nowrap;
}
.assist-strip .assist-choice:nth-child(2) { animation-delay: 55ms !important; }
.assist-strip .assist-choice:nth-child(3) { animation-delay: 110ms !important; }
.assist-strip .assist-choice:nth-child(4) { animation-delay: 165ms !important; }
.assist-strip .assist-choice:nth-child(5) { animation-delay: 220ms !important; }
.assist-strip .assist-choice .t-mark {
  display: none !important;
}
.assist-strip .assist-choice .t-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
  justify-content: center;
}
.assist-strip .assist-choice .t-label {
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(1rem, 2.9vw, 1.08rem);
  line-height: 1.28;
  width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  color: var(--espresso);
}
.assist-strip .assist-choice .t-sub {
  display: none !important;
}
.assist-strip .assist-choice .t-go {
  position: static;
  flex: none;
  transform: none;
  margin: 0;
  opacity: 0.55;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--terre, var(--espresso));
  pointer-events: none;
  line-height: 1;
}
.assist-strip .assist-choice:hover,
.assist-strip .assist-choice:focus-visible {
  background: var(--surface-deep, #fbf2dd);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(84, 41, 22, 0.08);
  outline: none;
}
.assist-strip .assist-choice:hover .t-go,
.assist-strip .assist-choice:focus-visible .t-go {
  opacity: 0.85;
}
.assist-strip .assist-choice.is-suggested {
  background: var(--surface-deep, #fbf2dd);
  box-shadow: inset 3px 0 0 var(--miel, #d9a441);
}
.assist-strip .assist-choice.is-suggested .t-go {
  color: var(--miel, #d9a441);
  opacity: 1;
}

/* Shared list-page foot — same as search blob-chip / list-pill */
.convo-foot--list,
.list-page-foot {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.convo-foot-pills,
.list-page-foot-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}
.list-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.55rem 1.05rem;
  border: 1.5px solid color-mix(in srgb, var(--espresso) 55%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--espresso);
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.2;
  text-transform: lowercase;
  box-shadow: none;
  cursor: pointer;
  text-decoration: none;
  opacity: 1;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
              filter 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.list-pill:hover,
.list-pill:focus-visible {
  background: color-mix(in srgb, var(--espresso) 6%, transparent);
  outline: none;
}
.list-pill--cta {
  border-color: var(--espresso);
  background: var(--espresso);
  color: var(--milk, #fff8f2);
  font-weight: 700;
}
.list-pill--cta:hover,
.list-pill--cta:focus-visible {
  background: var(--espresso);
  color: var(--milk, #fff8f2);
  filter: brightness(1.08);
}
.convo-start-over {
  appearance: none;
  border: none;
  background: none;
  padding: 0.25rem 0.5rem;
  margin: 0;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: 0.84rem;
  font-weight: 500;
  text-transform: lowercase;
  color: color-mix(in srgb, var(--espresso) 40%, transparent);
  cursor: pointer;
  text-decoration: none;
}
.convo-start-over:hover,
.convo-start-over:focus-visible {
  color: var(--espresso);
  outline: none;
}
.assist-strip .helper-strip,
.assist-strip .blob-ai {
  display: none;
}

/* ---------- resource deck ---------- */
.deck-root {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: transparent;
  /* Same box as the reveal portal — mismatch here caused the post-anim jump */
  padding: 0.65rem 1rem 0;
  overflow: hidden;
  box-sizing: border-box;
}
.deck-root .assist-note {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  text-align: center;
}
.deck-path .path-row,
.deck-root .path-row {
  margin: 0;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.deck-label {
  flex: 0 0 auto;
  margin: 0.4rem 0 0.2rem;
  text-align: center;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(0.95rem, 3.2vw, 1.15rem);
  color: var(--espresso);
  line-height: 1.25;
}
.deck-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  /* horizontal swipe only — don't fight the page */
  touch-action: none;
  overflow: hidden;
}
.deck-cards {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: visible;
}
.deck-cards.is-dragging { cursor: grabbing; }

.deck-card {
  position: absolute;
  top: 50%;
  left: 50%;
  /* sized by JS via --deck-card-w / --deck-card-h */
  width: var(--deck-card-w, min(18rem, 86vw));
  height: var(--deck-card-h, min(22rem, 58dvh));
  margin: 0;
  padding: 0;
  list-style: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  text-align: left;
  pointer-events: none;
  box-sizing: border-box;
  opacity: 1 !important;
}
.deck-card.is-active {
  pointer-events: auto;
}
.deck-card-frame {
  position: absolute;
  inset: 0;
  background: var(--card-bg, var(--surface, #fff8f2));
  border-radius: var(--card-radius, var(--radius-card, 0.9rem));
  box-shadow: var(--shadow-soft, none);
  border: var(--line-soft, 1.5px solid color-mix(in srgb, var(--espresso) 22%, transparent));
  z-index: 0;
  transition: none;
  /* Fill must stay solid — never fade to transparent after reveal */
  opacity: 1 !important;
}
/* Soft Affiche option cards — same language as themes cat-stickers.
   Active card keeps a visible tint always; full flood still on focus-visible. */
.deck-card--option .deck-card-frame {
  border: var(--line-soft, 1.5px solid color-mix(in srgb, var(--espresso) 22%, transparent));
  transition: none;
  background: var(--card-bg, var(--surface, #fff8f2)) !important;
}
.deck-card--option.is-active .deck-card-frame {
  background: color-mix(in srgb, var(--cat, #f1c166) 34%, #fff8f2) !important;
}
.deck-settled .deck-card--option .deck-card-frame {
  transition: background 0.3s var(--ease, cubic-bezier(.22, 1, .36, 1)),
              border-color 0.3s var(--ease, cubic-bezier(.22, 1, .36, 1));
}
.deck-settled .deck-card--option.is-active:hover .deck-card-frame,
.deck-settled .deck-card--option.is-active:focus-visible .deck-card-frame {
  background: var(--cat, var(--miel)) !important;
  border-color: transparent;
}
.deck-settled .deck-card--option.is-active:hover .deck-card-body,
.deck-settled .deck-card--option.is-active:focus-visible .deck-card-body {
  color: var(--cat-ink, var(--espresso));
}
.deck-settled .deck-card--option.is-active:hover .deck-card-cat,
.deck-settled .deck-card--option.is-active:focus-visible .deck-card-cat,
.deck-settled .deck-card--option.is-active:hover .deck-card-sub,
.deck-settled .deck-card--option.is-active:focus-visible .deck-card-sub,
.deck-settled .deck-card--option.is-active:hover .deck-card-desc,
.deck-settled .deck-card--option.is-active:focus-visible .deck-card-desc,
.deck-settled .deck-card--option.is-active:hover .deck-card-name,
.deck-settled .deck-card--option.is-active:focus-visible .deck-card-name {
  color: var(--cat-ink, var(--espresso));
  opacity: 1;
}
.deck-settled .deck-card--option.is-active:hover .deck-card-hint,
.deck-settled .deck-card--option.is-active:focus-visible .deck-card-hint {
  color: var(--cat-ink, var(--espresso));
  opacity: 0.75;
}
.deck-settled .deck-card--option.is-active:hover .deck-card-badges .badge,
.deck-settled .deck-card--option.is-active:focus-visible .deck-card-badges .badge {
  background: color-mix(in srgb, var(--cat-ink, #542916) 14%, transparent);
  border-color: color-mix(in srgb, var(--cat-ink, #542916) 45%, transparent);
  color: var(--cat-ink, #542916);
}
.deck-card-mark { display: none !important; }
.deck-card-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.15rem 1.15rem 1.05rem;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  color: var(--card-ink, var(--espresso));
  transition: none;
}
.deck-settled .deck-card-body {
  transition: color 0.3s var(--ease, cubic-bezier(.22, 1, .36, 1));
}
.deck-card-cat {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--card-ink, var(--espresso));
  opacity: 0.78;
  margin: 0;
  max-width: 100%;
}
.deck-card-name {
  margin: 0;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 6vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--card-ink, var(--espresso));
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}
.deck-card-sub {
  margin: 0;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: clamp(1rem, 3.6vw, 1.15rem);
  color: var(--card-ink, var(--espresso));
  opacity: 0.82;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.deck-card-desc {
  margin: 0.2rem 0 0;
  flex: 1 1 auto;
  min-height: 0;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: clamp(1.02rem, 3.8vw, 1.18rem);
  line-height: 1.4;
  color: var(--card-ink, var(--espresso));
  opacity: 0.94;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.deck-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: auto;
  padding-top: 0.45rem;
  max-height: none;
  overflow: visible;
}
.deck-card-badges .badge {
  font-size: 0.68rem;
  padding: 0.18rem 0.4rem;
  background: color-mix(in srgb, var(--card-ink, #542916) 8%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--card-ink, #542916) 28%, transparent);
  color: var(--card-ink, #542916);
  border-radius: var(--radius-chip, 0.65rem);
}
.deck-card-hint {
  margin-top: 0.35rem;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--terre, #a13a1e);
  opacity: 0;
  transition: opacity 0.25s ease, color 0.3s var(--ease, cubic-bezier(.22, 1, .36, 1));
}
.deck-card.is-active .deck-card-hint { opacity: 0.95; }

/* Bottom→top cover peel — deck stays put underneath, no DOM handoff */
.deck-reveal-portal {
  position: fixed;
  inset: 0;
  z-index: 110;
  pointer-events: none;
}
.deck-reveal-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  pointer-events: none;
}
.deck-reveal-edge {
  fill: none;
}
.deck-reveal-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--ground, #fdf0e8);
  pointer-events: none;
}
.deck-reveal-page {
  display: none;
}
.deck-reveal-spacer {
  display: none;
}

/* Always-on wordmark — “canopy” text only (living / list modes) */
.living-home {
  position: fixed;
  top: max(env(safe-area-inset-top, 0px), 0.45rem);
  left: max(env(safe-area-inset-left, 0px), 0.5rem);
  z-index: 95;
  display: none;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.28rem 0.35rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--espresso, #542916);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
  transition: color 0.2s var(--ease);
}
.living-home:hover {
  background: transparent;
  transform: none;
  color: var(--terre, #a13a1e);
}
.living-home:focus-visible {
  outline: 2px solid var(--terre, #a13a1e);
  outline-offset: 2px;
}
/* Wordmark only — twin-dot mark stays in markup for a11y fallback, hidden visually */
.living-home-mark {
  display: none !important;
}
.living-home-name {
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  line-height: 1;
  display: inline;
}
body.has-deck .living-home,
body.has-blobs .living-home,
body.has-strip .living-home,
body.has-deck-detail .living-home,
body.has-list-blobs .living-home,
body.is-browsing:has(#results-zone .refine-card) .living-home,
body.is-browsing:has(#results-zone .result-list) .living-home {
  display: inline-flex;
}
body.has-blobs .living-home,
body.has-strip .living-home,
body.has-deck .living-home,
body.has-list-blobs .living-home {
  gap: 0;
  padding: 0.28rem 0.15rem;
}
@media (max-width: 560px) {
  body.has-blobs .living-home,
  body.has-strip .living-home,
  body.has-deck .living-home,
  body.has-list-blobs .living-home {
    padding: 0.2rem 0.1rem;
    border-radius: 0;
  }
}


.deck-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.2rem 0;
}
.deck-nav-btn {
  width: 2.4rem;
  height: 2.4rem;
  border: var(--line-soft, none);
  border-radius: var(--radius-ui, 0.75rem);
  background: var(--surface, #fff8f2);
  color: var(--espresso);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft, 0 1px 8px rgba(84, 41, 22, 0.07));
  flex: none;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.deck-nav-btn:hover { background: var(--miel); transform: translateY(-1px); }
.deck-nav-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}
.deck-dots {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  max-width: 60vw;
  overflow: hidden;
}
.deck-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: rgba(84, 41, 22, 0.2);
  flex: none;
}
.deck-dot.on {
  background: var(--terre);
  transform: scale(1.25);
}
.deck-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: 0.2rem 0 calc(0.65rem + env(safe-area-inset-bottom, 0px));
}

/* ---------- fullscreen detail (portaled to body) ---------- */
.deck-detail {
  position: fixed;
  inset: 0;
  z-index: 155;
  display: none;
  flex-direction: column;
  background: var(--ground, #fdf0e8);
  padding-top: max(0.45rem, env(safe-area-inset-top, 0px));
}
.deck-detail.on { display: flex; }
body.has-deck-detail .focus-bar {
  visibility: hidden;
  pointer-events: none;
}
.deck-detail-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0.35rem 0.85rem 0.5rem;
  /* Reserved right chrome rail: menu + flag stacked under it */
  padding-right: calc(3.6rem + env(safe-area-inset-right, 0px));
}
.deck-detail-back {
  border: var(--line-soft, none);
  background: var(--surface, #fff8f2);
  color: var(--espresso);
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-ui, 0.75rem);
  cursor: pointer;
  box-shadow: var(--shadow-soft, 0 1px 8px rgba(84, 41, 22, 0.06));
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.deck-detail-back:hover { background: var(--miel); transform: translateY(-1px); }
.deck-detail-scroll {
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem 1.15rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  max-width: 40rem;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
}
.deck-detail-title {
  margin: 0.55rem 0 0.45rem;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  line-height: 1.2;
  color: var(--espresso);
  word-break: normal;
  overflow-wrap: break-word;
}
.deck-detail .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.deck-detail .action-row .act {
  flex: 1 1 auto;
  min-width: min(100%, 9rem);
  justify-content: center;
}

@media (max-width: 560px) {
  body.has-deck.is-browsing .focus-bar,
  body.has-strip.is-browsing .focus-bar {
    padding-top: max(0.4rem, env(safe-area-inset-top, 0px));
    padding-bottom: 0.4rem;
    padding-left: max(0.55rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.55rem, env(safe-area-inset-right, 0px));
  }
  body.has-deck.is-browsing .focus-query,
  body.has-strip.is-browsing .focus-query {
    max-width: min(22rem, calc(100vw - 7.25rem));
  }
  .living-home {
    padding: 0.2rem 0.15rem;
  }
  .living-home-name {
    display: inline;
    font-size: 0.98rem;
  }
  body.has-deck.is-browsing .ground,
  body.has-strip.is-browsing .ground {
    height: calc(100dvh - var(--browse-chrome-h, 2.9rem));
  }
  .assist-strip {
    padding: 0.45rem 0.85rem calc(0.9rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  .assist-strip .assist-q {
    font-size: clamp(1.4rem, 7vw, 1.75rem);
    margin-bottom: 0.95rem;
  }
  .assist-strip .assist-choice {
    padding: 0.85rem 1rem;
    gap: 0.85rem;
  }
  .list-pill {
    padding: 0.5rem 0.95rem;
    font-size: 0.84rem;
  }
  .deck-card-desc {
    -webkit-line-clamp: 6;
  }
}

@media (min-width: 720px) {
  .deck-card {
    width: var(--deck-card-w, min(21rem, 44vw));
    height: var(--deck-card-h, min(26rem, 60dvh));
  }
  .deck-card-name {
    font-size: clamp(1.55rem, 2.4vw, 1.95rem);
  }
  .deck-card-sub {
    font-size: 1.12rem;
  }
  .deck-card-desc {
    font-size: 1.12rem;
    -webkit-line-clamp: 8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .assist-strip .assist-choice,
  .deck-nav-btn,
  .deck-card-hint {
    transition: none;
  }
}
