:root {
  --bg-canvas: #fbf9f5;
  --bg-canvas-alt: #f4ede1;
  --surface-card: #ffffff;
  --surface-card-subtle: #f8f6f0;
  --ink: #2b1f17;
  --ink-soft: #635244;
  --ink-muted: #948273;
  --brand-red: #b83a28;
  --brand-red-hover: #9c2e1f;
  --brand-red-light: #faece9;
  --brand-green: #3f6846;
  --brand-green-light: #ecf3ed;
  --brand-amber: #c47522;
  --brand-amber-light: #fcf1e5;
  --sand-pill: #eee7db;
  --line-subtle: rgba(59, 42, 30, 0.08);
  --line-medium: rgba(59, 42, 30, 0.14);
  --shadow-sm: 0 2px 8px rgba(43, 31, 23, 0.04);
  --shadow-card: 0 4px 16px rgba(43, 31, 23, 0.05), 0 1px 3px rgba(43, 31, 23, 0.02);
  --shadow-hover: 0 14px 28px rgba(43, 31, 23, 0.09), 0 4px 10px rgba(43, 31, 23, 0.03);
  --radius-card: 20px;
  --radius-pill: 999px;
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.grid > li[hidden],
.grid > li.is-hidden {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: radial-gradient(ellipse 90% 40% at 50% 0%, #ffffff 0%, #f7f1e6 60%, #efe7d8 100%), #efe7d8;
  background-attachment: fixed;
  color: var(--ink);
  font: 16px/1.5 var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   HEADER UNIFIÉ & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 249, 245, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-subtle);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

body.scrolled .site-header {
  box-shadow: 0 4px 20px rgba(43, 31, 23, 0.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover {
  transform: scale(1.02);
}

.brand-badge {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-wordmark {
  display: block;
  height: 26px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(238, 231, 219, 0.5);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-subtle);
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.nav-link.is-active {
  color: var(--brand-red);
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(43, 31, 23, 0.06);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-medium);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font: 600 13px var(--font-sans);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.4, 0.5, 1);
}

.action-btn:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--brand-amber);
}

.button, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--brand-red);
  color: #ffffff;
  font: 700 13.5px var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(184, 58, 40, 0.2);
}

.button:hover {
  background: var(--brand-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 58, 40, 0.3);
}

.button-sm {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 13px;
}

.button.secondary {
  background: transparent;
  color: var(--brand-red);
  border: 1.5px solid var(--brand-red);
  box-shadow: none;
}

.button.secondary:hover {
  background: var(--brand-red-light);
  color: var(--brand-red-hover);
}

/* ==========================================================================
   HERO ZEN
   ========================================================================== */
.hero-zen {
  text-align: center;
  padding: 20px 20px 14px;
  max-width: 820px;
  margin: 0 auto;
}

.hero-mascot-wrap {
  display: inline-block;
  margin-bottom: 6px;
}

.hero-mascot {
  display: block;
  width: min(84px, 22vw);
  height: auto;
  animation: zen-breathe 6s ease-in-out infinite;
  filter: drop-shadow(0 8px 14px rgba(59, 42, 30, 0.12));
}

@keyframes zen-breathe {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-7px) scale(1.02);
  }
}

.hero-title {
  margin: 0 0 4px;
  font: 800 clamp(26px, 3.5vw, 34px)/1.15 var(--font-serif);
  color: var(--brand-red);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(14px, 2vw, 16px);
  max-width: 540px;
  line-height: 1.4;
}

/* ==========================================================================
   GARDEN CONTROL BAR (Recherche & Filtres)
   ========================================================================== */
.control-bar {
  position: sticky;
  top: 59px;
  z-index: 30;
  background: rgba(251, 249, 245, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-subtle);
  padding: 12px 20px;
  transition: all 0.25s ease;
}

.control-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--ink-muted);
  pointer-events: none;
}

#pose-search {
  width: 100%;
  padding: 11px 40px 11px 42px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line-medium);
  background: #ffffff;
  color: var(--ink);
  font: 500 14.5px var(--font-sans);
  outline: none;
  box-shadow: 0 2px 8px rgba(43, 31, 23, 0.04);
  transition: all 0.2s ease;
}

#pose-search::placeholder {
  color: var(--ink-muted);
}

#pose-search:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px var(--brand-red-light);
}

.search-clear {
  position: absolute;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: var(--sand-pill);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-clear:hover {
  background: var(--line-medium);
}

/* ==========================================================================
   DROPDOWN FILTERS ROW (Minimalist, Clean & Functional)
   ========================================================================== */
.filter-dropdowns-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.filter-select-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-select-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff;
  border: 1.5px solid var(--line-medium);
  border-radius: var(--radius-pill);
  padding: 8px 34px 8px 16px;
  font: 600 13.5px/1.3 var(--font-sans);
  color: var(--ink);
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(43, 31, 23, 0.03);
}

.filter-select:hover {
  border-color: var(--ink-muted);
  background: var(--bg-canvas-alt);
}

.filter-select:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px var(--brand-red-light);
}

.select-chevron {
  position: absolute;
  right: 12px;
  color: var(--ink-muted);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.filter-select:focus + .select-chevron {
  color: var(--brand-red);
  transform: rotate(180deg);
}

/* Favorites Toggle Button */
.btn-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  border: 1.5px solid var(--line-medium);
  border-radius: var(--radius-pill);
  padding: 8px 15px;
  font: 600 13px/1.3 var(--font-sans);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(43, 31, 23, 0.03);
}

.btn-filter-toggle:hover {
  border-color: #be3e2c;
  color: #be3e2c;
  background: var(--brand-red-light);
}

.btn-filter-toggle.is-active {
  background: #be3e2c;
  color: #ffffff;
  border-color: #be3e2c;
  box-shadow: 0 2px 8px rgba(190, 62, 44, 0.25);
}

.btn-toggle-badge {
  background: rgba(0, 0, 0, 0.08);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.btn-filter-toggle.is-active .btn-toggle-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Surprise Me Button */
.btn-filter-surprise {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid var(--brand-amber);
  border-radius: var(--radius-pill);
  padding: 8px 15px;
  font: 700 13px/1.3 var(--font-sans);
  color: var(--brand-amber);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.4, 0.5, 1);
  box-shadow: 0 2px 6px rgba(196, 117, 34, 0.08);
}

.btn-filter-surprise:hover {
  background: var(--brand-amber-light);
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 12px rgba(196, 117, 34, 0.18);
}

@media (max-width: 640px) {
  .filter-dropdowns-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .filter-select-group {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
  }
  .filter-select-label {
    font-size: 10.5px;
  }
  .filter-select-wrap {
    width: 100%;
  }
  .filter-select {
    width: 100%;
    padding: 9px 30px 9px 12px;
    font-size: 13px;
  }
  .btn-filter-toggle, .btn-filter-surprise {
    justify-content: center;
    width: 100%;
    grid-column: 1 / -1;
    min-height: 44px;
  }
}

/* Méta bar sous les filtres */
.filter-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.count-pill {
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11.5px;
}

.filter-active-summary {
  color: var(--brand-red);
  font-weight: 600;
}

.btn-text-reset {
  border: 0;
  background: none;
  color: var(--brand-red);
  font: 600 12.5px var(--font-sans);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

/* ==========================================================================
   GRILLE DES CARTES & CARD DESIGN
   ========================================================================== */
.catalogue-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  width: 100%;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.grid > li {
  display: flex;
  min-width: 0;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: var(--radius-card);
  background: linear-gradient(175deg, #ffffff 0%, #fdfbf7 60%, #f7f1e7 100%);
  border: 1px solid var(--line-subtle);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.5, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(184, 58, 40, 0.2);
}

.card-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

/* Média (Illustration Gnome) */
.media {
  position: relative;
  aspect-ratio: 1 / 1.05;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 8px 8px 0;
  background: transparent;
}

.media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.card:hover .media img {
  transform: scale(1.04);
}

/* ==========================================================================
   SÉPARATION HERBE & FLEURS (L'HERBE PRÉSERVÉE SELON LE SOUHAIT DU CLIENT)
   ========================================================================== */
.label {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 24px 10px 6px;
  text-align: center;
  background: transparent;
}

.label::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: -46px;
  height: 56px;
  background-image: var(--grass-flower);
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% 56px;
  pointer-events: none;
  transition: transform 0.25s ease;
}

.card:hover .label::before {
  transform: scaleY(1.04);
}

.grass-1 { --grass-flower: url("/media/poses/dividers/alpha-20260929b/grass-01.webp"); }
.grass-2 { --grass-flower: url("/media/poses/dividers/alpha-20260929b/grass-02.webp"); }
.grass-3 { --grass-flower: url("/media/poses/dividers/alpha-20260929b/grass-03.webp"); }
.grass-4 { --grass-flower: url("/media/poses/dividers/alpha-20260929b/grass-04.webp"); }
.grass-5 { --grass-flower: url("/media/poses/dividers/alpha-20260929b/grass-05.webp"); }

/* Noms de la posture */
.en {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: var(--ink);
  min-height: 2.5em;
  text-wrap: balance;
}

.sa {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font: italic 14px var(--font-serif);
  color: var(--brand-red);
  margin-top: 3px;
  line-height: 1.2;
  min-height: 2.4em;
  text-wrap: balance;
}

.en.compact { font-size: 13.5px; }
.sa.compact { font-size: 12.5px; }

/* Bouton Favori flottant sur la carte — 44px minimum pour le tactile */
.card-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(59, 42, 30, 0.1);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: var(--ink-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.34, 1.5, 0.64, 1);
}

.card-fav-btn svg {
  width: 18px;
  height: 18px;
}

.card-fav-btn:hover {
  background: #ffffff;
  color: var(--brand-red);
  transform: scale(1.15);
  box-shadow: 0 3px 8px rgba(43, 31, 23, 0.12);
}

.card-fav-btn.is-fav {
  color: var(--brand-red);
  background: var(--brand-red-light);
  border-color: rgba(184, 58, 40, 0.3);
}

.card-fav-btn.is-fav svg {
  fill: var(--brand-red);
}

/* Métadonnées de carte (Catégorie & Niveau) */
.card-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 4px 8px 12px;
}

.card-meta .category {
  margin: 0;
  background: var(--sand-pill);
  color: var(--ink-soft);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 22px;
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 2px 7px;
  white-space: nowrap;
  font: 700 9.5px var(--font-sans);
  cursor: pointer;
  transition: all 0.15s ease;
}

.level-badge:hover {
  background: #ffffff;
  border-color: var(--ink-soft);
  transform: translateY(-1px);
}

.level-hat {
  width: 14px;
  height: 16px;
  flex: none;
  color: var(--hat-color);
}

.level-beginner { --hat-color: #4f8057; }
.level-intermediate { --hat-color: #cf7c27; }
.level-advanced { --hat-color: #b83a28; }

.level-spacer {
  display: inline-block;
  width: 78px;
  height: 22px;
}

/* Highlight animation pour la posture surprise */
@keyframes surprise-glow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(184, 58, 40, 0.6);
  }
  50% {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 0 0 12px rgba(184, 58, 40, 0);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

.card-item.is-highlighted .card {
  animation: surprise-glow 0.8s cubic-bezier(0.34, 1.4, 0.5, 1);
  border-color: var(--brand-red);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-card);
  border: 1px dashed var(--line-medium);
  max-width: 520px;
  margin: 30px auto;
}

.empty-illustration {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state h2 {
  font: 800 24px/1.2 var(--font-serif);
  color: var(--brand-red);
  margin: 0 0 8px;
}

.empty-state p {
  color: var(--ink-soft);
  margin: 0 0 20px;
}

/* ==========================================================================
   PAGE DÉTAIL D'UNE POSTURE
   ========================================================================== */
.detail {
  max-width: 1040px;
  margin: 0 auto;
  padding: 30px 20px 80px;
  width: 100%;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  color: var(--brand-red);
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.back:hover {
  transform: translateX(-4px);
  text-decoration: underline;
}

.detail-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(24px, 4vw, 50px);
  align-items: center;
  background: #ffffff;
  padding: clamp(20px, 4vw, 44px);
  border-radius: 28px;
  border: 1px solid var(--line-subtle);
  box-shadow: 0 12px 36px rgba(43, 31, 23, 0.07);
}

.detail-images {
  display: grid;
  place-items: center;
  background: linear-gradient(165deg, #f7faf8 0%, #faf5ec 100%);
  border-radius: 20px;
  padding: 24px;
}

.detail-images img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(43, 31, 23, 0.1));
}

.detail-content h1 {
  font: 800 clamp(30px, 4vw, 46px)/1.1 var(--font-serif);
  color: var(--brand-red);
  margin: 0 0 6px;
}

.detail-content .sa {
  font-size: 21px;
  margin: 0 0 18px;
  display: block;
  min-height: auto;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta .category {
  background: var(--sand-pill);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.detail-focus {
  background: var(--surface-card-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 20px 0;
  border: 1px solid var(--line-subtle);
  font-size: 13.5px;
  line-height: 1.5;
}

.detail-focus-label {
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}

.detail-focus-text {
  color: var(--ink-soft);
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ==========================================================================
   BOUTON PAGINATION & SECTIONS DÉTAIL (Try it / Pager / Related)
   ========================================================================== */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 8px;
}

.load-more-wrap .button {
  min-height: 48px;
  padding: 12px 28px;
}

.detail-how {
  background: var(--surface-card-subtle);
  border: 1px solid var(--line-subtle);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 20px 0 0;
}

.detail-how h2 {
  font: 800 18px/1.2 var(--font-serif);
  color: var(--ink);
  margin: 0 0 10px;
}

.detail-how ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.detail-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
  font-style: italic;
}

.detail-pager {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.pager-link {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #ffffff;
  border: 1px solid var(--line-subtle);
  border-radius: 16px;
  padding: 12px 16px;
  min-height: 48px;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.pager-link:hover {
  border-color: rgba(184, 58, 40, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.pager-next {
  text-align: right;
}

.pager-dir {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-red);
}

.pager-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-related {
  margin-top: 28px;
}

.detail-related h2 {
  font: 800 20px/1.2 var(--font-serif);
  color: var(--ink);
  margin: 0 0 12px;
  text-align: center;
}

.related-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--line-subtle);
  border-radius: 16px;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  transition: all 0.2s ease;
}

.related-card:hover {
  border-color: rgba(184, 58, 40, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.related-card img {
  width: 100%;
  height: 96px;
  object-fit: contain;
}

/* ==========================================================================
   GUIDE DES NIVEAUX (DIALOG)
   ========================================================================== */
.level-guide {
  max-width: min(440px, calc(100vw - 32px));
  border: 1px solid var(--line-medium);
  border-radius: 24px;
  background: #ffffff;
  color: var(--ink);
  padding: 28px;
  box-shadow: 0 24px 60px rgba(43, 31, 23, 0.25);
}

.level-guide::backdrop {
  background: rgba(30, 22, 16, 0.45);
  backdrop-filter: blur(4px);
}

.level-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.level-guide-header h2 {
  font: 800 24px/1.2 var(--font-serif);
  color: var(--brand-red);
  margin: 0;
}

.level-close {
  border: 0;
  background: var(--sand-pill);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.level-close:hover {
  background: var(--line-medium);
}

.level-guide-intro {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 0 0 18px;
}

.level-guide-list {
  display: grid;
  gap: 12px;
}

.level-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-card-subtle);
  border: 1px solid var(--line-subtle);
}

.level-item-icon {
  font-size: 20px;
  line-height: 1;
}

.level-item-body strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}

.level-item-body p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.level-guide-footer {
  margin-top: 20px;
  text-align: right;
}

/* ==========================================================================
   BOUTON BACK TO TOP RAFFINÉ
   ========================================================================== */
.backtop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--ink);
  padding: 9px 15px;
  font: 700 12.5px var(--font-sans);
  box-shadow: 0 6px 20px rgba(43, 31, 23, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.34, 1.4, 0.5, 1);
  cursor: pointer;
}

body.scrolled .backtop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.backtop:hover {
  background: var(--brand-red);
  color: #ffffff;
  border-color: var(--brand-red);
  transform: translateY(-2px) scale(1.03);
}

/* ==========================================================================
   MOBILE TAB BAR (Ergonomie au pouce)
   ========================================================================== */
.mobile-tab-bar {
  display: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.6);
  padding: 36px 20px;
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  opacity: 0.85;
  margin-bottom: 8px;
}

.footer-tagline {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.footer-links {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.footer-links a:hover {
  color: var(--brand-red);
  text-decoration: underline;
}

.footer-copy {
  margin: 0;
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablettes & Mobiles)
   ========================================================================== */
@media (max-width: 1120px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 860px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .header-nav {
    display: none; /* Remplacé par la Bottom Bar sur mobile */
  }
  .detail-card {
    grid-template-columns: 1fr;
  }
  .detail-images img {
    max-height: 48vh;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 64px; /* Espace pour la tab bar */
  }

  .catalogue-main {
    padding: 16px 12px 60px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .control-bar {
    top: 53px;
    padding: 10px 12px;
  }

  .card {
    border-radius: 16px;
  }

  .label {
    padding: 22px 6px 4px;
  }

  .label::before {
    top: -38px;
    height: 46px;
    background-size: 100% 46px;
  }

  .en {
    font-size: 13px;
    min-height: 2.5em;
  }

  .sa {
    font-size: 12px;
    min-height: 2.3em;
  }

  .card-meta {
    flex-direction: column;
    gap: 4px;
    min-height: 48px;
    padding: 2px 4px 8px;
  }

  .card-meta .category {
    font-size: 8px;
    padding: 2px 6px;
  }

  .level-badge {
    font-size: 8.5px;
    padding: 1px 5px;
  }

  .card-fav-btn {
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
  }

  .card-fav-btn svg {
    width: 18px;
    height: 18px;
  }

  .backtop {
    right: 14px;
    bottom: 74px; /* Au-dessus de la tab bar */
    padding: 7px 11px;
    font-size: 11px;
  }

  /* Mobile Bottom Tab Bar */
  .mobile-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(251, 249, 245, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line-subtle);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(43, 31, 23, 0.05);
  }

  .tab-item {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 2px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.15s ease;
  }

  .tab-item.is-active {
    color: var(--brand-red);
  }

  .tab-icon {
    font-size: 19px;
    line-height: 1;
  }

  .tab-btn {
    border: 0;
    background: none;
    cursor: pointer;
  }
}

/* ==========================================================================
   COMPACT PASS — search-first, one logo, zero dead space
   ========================================================================== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Header: 48px, brand + nav, nothing else */
.header-inner { max-width: 1320px; padding: 3px 16px; gap: 12px; min-height: 48px; }
.brand { gap: 4px; }
.brand-badge { width: 42px; height: 42px; }
/* Sticker wordmark (white border + soft shadow); the PNG src stays as fallback */
.brand-wordmark { height: 30px; width: auto; content: url("/assets/logo-wordmark-sticker.svg"); }
.brand-wordmark { height: 32px; }
.header-nav { gap: 2px; padding: 3px; }
.nav-link { padding: 5px 12px; font-size: 13px; }
.header-actions:empty { display: none; }

/* Footer: one quiet line, no second logo */
.site-footer { padding: 18px 16px 22px; background: transparent; }
.footer-logo, .footer-tagline { display: none; }
.footer-links { margin-bottom: 6px; }

/* Home finder: title + search + one filter row */
.finder { top: 48px; padding: 10px 16px 10px; }
.finder .control-bar-inner { max-width: 760px; gap: 8px; }
.finder-title { margin: 2px 0 0; font: 800 20px/1.15 var(--font-serif); letter-spacing: -0.015em; color: var(--ink); text-align: center; }
.finder-title span { display: block; font: 500 13px/1.3 var(--font-sans); letter-spacing: 0; color: var(--ink-muted); margin-top: 2px; }
body.scrolled .finder-title { display: none; }
.finder .search-box { max-width: none; }
.finder #pose-search { padding: 12px 40px 12px 42px; font-size: 16px; border-radius: 14px; }
.finder-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.finder-row::-webkit-scrollbar { display: none; }
.pill-select { position: relative; flex: 0 0 auto; display: inline-flex; }
.pill-select::after { content: ''; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted); transform: rotate(45deg); pointer-events: none; }
.finder .filter-select { padding: 6px 28px 6px 12px; font-size: 13px; border-width: 1px; box-shadow: none; min-height: 34px; }
.finder .btn-filter-toggle { flex: 0 0 auto; padding: 6px 11px; min-height: 34px; border-width: 1px; box-shadow: none; gap: 5px; color: var(--brand-red); }
.finder .count-pill { margin-left: auto; flex: 0 0 auto; font-size: 11px; white-space: nowrap; padding-left: 6px; }
.finder .btn-text-reset { flex: 0 0 auto; }
.catalogue-main { padding-top: 14px; }

/* Desktop: search + filters share one line (title stays on its own line) */
@media (min-width: 900px) {
  .finder .control-bar-inner { max-width: 1040px; flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 10px; }
  .finder-title { flex: 0 0 100%; }
  .finder .search-box { flex: 1 1 320px; width: auto; min-width: 0; }
  .finder .finder-row { flex: 0 0 auto; overflow: visible; }
  .finder .count-pill { margin-left: 8px; }
}

@media (max-width: 640px) {
  .finder { top: 48px; padding: 8px 12px; }
  .finder-title { font-size: 18px; }
  .finder .filter-select { width: auto; padding: 6px 26px 6px 11px; }
  .finder .btn-filter-toggle { width: auto; grid-column: auto; min-height: 34px; }
  .catalogue-main { padding: 10px 10px 40px; }
  .detail { padding-top: 10px; }
  .site-footer { padding-bottom: 80px; }
}

/* Pose detail: less frame, more gnome */
.back { margin-bottom: 10px; font-size: 13.5px; }
@media (max-width: 640px) {
  .detail { padding: 10px 12px 40px; }
  .detail-card { padding: 12px; gap: 14px; border-radius: 22px; }
  .detail-images { padding: 10px; border-radius: 16px; }
  .detail-images img { max-height: 40vh; height: auto; }
  .detail-content h1 { font-size: 30px; }
  .finder .count-pill { display: none; }
}

/* ==========================================================================
   HEADER: sticker wordmark micro-animation
   ========================================================================== */
.brand { position: relative; z-index: 2; }
.brand-badge {
  transform-origin: 50% 80%;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.brand:hover .brand-badge { transform: rotate(-8deg) scale(1.06); }
.brand-wordmark { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.brand:hover .brand-wordmark { transform: rotate(-1.5deg) scale(1.03); }

/* Header: text logo only (no mascot badge), slightly larger */
.brand-badge { display: none; }
.brand-wordmark { height: 38px; }
@media (max-width: 640px) { .brand-wordmark { height: 32px; } }

@media (prefers-reduced-motion: reduce) {
  .brand-badge, .brand-wordmark { transition: none; }
}

/* ==========================================================================
   REFONTE — points de niveau, cartes compactes, en-tête sur une ligne
   Règle : une INFO est du texte simple ; un BOUTON a un fond ou une bordure.
   ========================================================================== */
.level-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, #3f6846); }
.dot-green { --dot: #4f8f5b; }
.dot-amber { --dot: #e0a12b; }
.dot-red { --dot: #c8412f; }
.level-fact { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--ink-soft); }

/* Level guide trigger on pose pages: small dotted text, underlined = clickable */
.level-badge { min-height: 0; padding: 2px 4px; gap: 6px; border: 0; background: transparent; font: 700 13px var(--font-sans); color: var(--ink-soft); text-decoration: underline dotted var(--ink-muted); text-underline-offset: 3px; }
.level-badge:hover { background: transparent; transform: none; color: var(--ink); }

/* Header: no title, everything on one line */
.finder-title.visually-hidden { display: block; }
.finder { padding-top: 8px; padding-bottom: 8px; }
.finder .control-bar-inner { gap: 8px; }
.level-seg { display: inline-flex; flex: 0 0 auto; padding: 2px; gap: 2px; background: var(--sand-pill); border-radius: 999px; }
.level-seg__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 11px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font: 700 12.5px var(--font-sans); cursor: pointer; white-space: nowrap; }
.level-seg__btn:hover { color: var(--ink); }
.level-seg__btn.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(43, 31, 23, .14); }
@media (max-width: 640px) {
  .level-seg__btn span { display: none; }
  .level-seg__btn[data-level-chip="all"] span, .level-seg__btn { padding: 4px 10px; }
}
@media (min-width: 900px) {
  .finder .control-bar-inner { flex-wrap: nowrap; max-width: 1180px; }
  .finder .search-box { flex: 1 1 200px; min-width: 160px; }
  .finder .finder-row { flex: 0 1 auto; flex-wrap: nowrap; gap: 8px; }
  .finder .count-pill { margin-left: 2px; }
}

/* Compact card: photo, tight title block, one facts line, one actions line */
.label { padding: 22px 10px 2px; gap: 1px; }
.en { min-height: 0; font-size: 15px; line-height: 1.2; -webkit-line-clamp: 2; }
.en.s2 { font-size: 13.5px; }
.en.s3 { font-size: 12.5px; }
.sa { min-height: 0; margin-top: 0; font-size: 13.5px; line-height: 1.15; -webkit-line-clamp: 1; }
.sa.s2 { font-size: 12px; }
.card-info { margin-top: auto; padding: 4px 8px 8px; display: grid; gap: 6px; }
.card-facts { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 12px; color: var(--ink-soft); min-width: 0; }
.card-facts .category { margin: 0; padding: 0; background: none; border-radius: 0; font: 600 12px var(--font-sans); letter-spacing: 0; text-transform: capitalize; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sep { color: var(--ink-muted); }
.card-actions { display: flex; align-items: center; gap: 6px; min-height: 34px; }
.card-actions .card-fav-btn { position: static; flex: none; width: 34px; height: 34px; background: transparent; border: 1px solid var(--line-medium); backdrop-filter: none; }
.card-actions .card-fav-btn:hover { transform: none; }
.card-photos { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.card-add { display: inline-flex; align-items: center; gap: 5px; flex: none; min-height: 34px; padding: 0 12px 0 10px; margin-left: auto; border: 1.5px solid var(--brand-red); border-radius: 999px; background: #fff; color: var(--brand-red); font: 700 12.5px var(--font-sans); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.card-add:hover, .card-add:focus-visible { background: var(--brand-red); color: #fff; }
.card-photos .practice-badge { position: static; box-shadow: none; background: transparent; padding: 0; }
.card-photos .practice-badge img { width: 24px; height: 24px; }
.card-photos .practice-badge__count { font-size: 11.5px; }
.card-photos .practice-badge__hint { font-size: 11.5px; color: var(--ink-muted); }
@media (max-width: 640px) {
  .label { padding: 20px 6px 2px; }
  .en { font-size: 13px; } .en.s2 { font-size: 12px; } .en.s3 { font-size: 11.5px; }
  .sa { font-size: 12px; } .sa.s2 { font-size: 11px; }
  .card-info { padding: 3px 6px 7px; gap: 5px; }
  .card-add span { display: none; }
  .card-add { padding: 0; width: 34px; justify-content: center; }
  .card-actions .card-fav-btn { top: auto; right: auto; width: 34px; height: 34px; }
  .card-facts { flex-direction: row; }
}
.load-sentinel { height: 1px; margin-bottom: 60px; }
.card-actions .card-fav-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.card-actions .card-fav-btn.is-fav svg { fill: var(--brand-red); stroke: var(--brand-red); }
.result-summary { max-width: 1280px; margin: 0 auto 10px; padding: 0 2px; font-size: 14px; color: var(--ink-soft); }
.result-summary strong { color: var(--ink); font-weight: 800; }

/* Left-aligned finder, same edges as the logo and the first card column */
.finder { padding-left: 0; padding-right: 0; }
.finder .control-bar-inner { max-width: 1320px; padding: 0 20px; }
.result-summary { max-width: none; }
@media (min-width: 900px) {
  .finder .search-box { flex: 0 1 340px; }
  .finder .control-bar-inner { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .finder { padding-left: 0; padding-right: 0; }
  .finder .control-bar-inner { padding: 0 10px; }
}
.finder .search-box { margin: 0; }

/* Discreet favourite heart: bottom-right of the illustration, on the grass line */
.card-heart { position: absolute; z-index: 5; top: 0; left: 0; right: 0; aspect-ratio: 1 / 1.05; pointer-events: none; }
.card-heart .card-fav-btn { position: absolute; top: auto; left: auto; right: 6px; bottom: 6px; width: 34px; height: 34px; border: 0; background: transparent; backdrop-filter: none; color: rgba(59, 42, 30, .45); pointer-events: auto; }
.card-heart .card-fav-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px #fff); }
.card-heart .card-fav-btn:hover { color: var(--brand-red); background: transparent; box-shadow: none; transform: none; }
.card-heart .card-fav-btn.is-fav { color: var(--brand-red); background: transparent; border: 0; }
.card-heart .card-fav-btn.is-fav svg { fill: var(--brand-red); stroke: var(--brand-red); }
.card-actions { justify-content: center; }
.card-add { margin-left: 0; }
.card-photos:empty { display: none; }
.card-photos { flex: 0 1 auto; }
@media (max-width: 640px) {
  .card-add { width: auto; padding: 0 10px 0 8px; font-size: 11.5px; }
}

/* ==========================================================================
   Gnome tip: a small speech bubble from the gnome ("Psst! ..."), shared by several pages
   ========================================================================== */
.gnome-tip { display: inline-flex; align-items: center; gap: 2px; color: var(--ink); text-decoration: none; }
.gnome-tip__gnome { width: 46px; height: 46px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 6px rgba(43, 31, 23, 0.18)); transition: transform 0.4s cubic-bezier(0.34, 1.5, 0.64, 1); }
.gnome-tip__bubble { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 10px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line-medium); font-size: 13.5px; font-weight: 600; box-shadow: 0 2px 8px rgba(43, 31, 23, 0.06); transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.gnome-tip__bubble::before { content: ''; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: #fff; border-left: 1px solid var(--line-medium); border-bottom: 1px solid var(--line-medium); transform: rotate(45deg); transition: border-color 0.25s ease; }
.gnome-tip__bubble strong { color: var(--brand-red); font-weight: 800; }
.gnome-tip__bubble .lucide { color: var(--brand-red); }
.gnome-tip:hover .gnome-tip__gnome { transform: translateY(-3px); }
.gnome-tip:hover .gnome-tip__bubble { border-color: var(--brand-red); box-shadow: 0 4px 12px rgba(43, 31, 23, 0.1); }
.gnome-tip:hover .gnome-tip__bubble::before { border-color: var(--brand-red); }
@media (prefers-reduced-motion: reduce) { .gnome-tip__gnome, .gnome-tip__bubble { transition: none; } }
@media (max-width: 640px) { .gnome-tip { margin-left: auto; } .gnome-tip__bubble { font-size: 13px; padding: 8px 12px; } }

/* Card button wording: full on wide cards, short on narrow phones */
.card-add .lbl-short { display: none; }
@media (max-width: 640px) {
  .card-add .lbl-long { display: none; }
  .card-add .lbl-short { display: inline; }
}

/* Social links as icons (the network's name is the tooltip and accessible label) */
.net-icons { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.net-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-red-light, #faece9); color: var(--brand-red, #b83a28); transition: background .15s ease, color .15s ease, transform .2s cubic-bezier(.34, 1.5, .64, 1); }
.net-icon:hover, .net-icon:focus-visible { background: var(--brand-red, #b83a28); color: #fff; transform: translateY(-2px); }
.pf-label { display: inline-flex; align-items: center; gap: 7px; }
.pf-label .lucide { color: var(--brand-red, #b83a28); }

/* Back to top: the gnome on a rocket replaces the arrow icon (decorative, 96px source) */
.backtop svg { display: none; }
.backtop::before { content: ''; width: 34px; height: 34px; margin: -6px 0 -6px -4px; background: url('/assets/gnome/gnome-scroll-to-top-96.webp') center / contain no-repeat; transition: transform 0.25s cubic-bezier(0.34, 1.6, 0.5, 1); }
.backtop:hover::before { transform: translateY(-3px) rotate(-8deg); }
.empty-illustration img { width: 140px; height: 140px; object-fit: contain; display: block; margin: 0 auto; }

/* Gnomes that float above the grass are lowered a touch (--sink is set per card by the build) */
.media img { translate: 0 calc(var(--sink, 0) * 100%); }

/* Favourites filter: heart and count stay readable when the filter is on (red-on-red before) */
.finder .btn-filter-toggle.is-active, .finder .btn-filter-toggle.is-active:hover { color: #fff; background: #be3e2c; border-color: #be3e2c; }
.finder .btn-filter-toggle:focus:not(:focus-visible) { outline: none; }
/* A card heart only turns red on hover when it is not already switched off by a tap */
@media (hover: none) {
  .card-heart .card-fav-btn:not(.is-fav):hover { color: rgba(59, 42, 30, .45); }
}

/* Card footer: members' versions on their own line, so the "Add your version" button never shifts */
.card-actions { flex-direction: column; gap: 6px; align-items: stretch; }
.card-actions .card-add { align-self: center; }
.card-photos { flex: none; justify-content: center; }
.card-photos .practice-badge { display: inline-flex; gap: 0; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--brand-red-light); border: 1px solid rgba(184, 58, 40, .22); }
.card-photos .practice-badge img { border-color: var(--brand-red-light); }
.card-photos .practice-badge:hover { background: #f6dcd6; }
.card-photos .practice-badge__count { margin-left: 4px; color: var(--brand-red); }
.practice-badge__label { margin-left: 7px; font: 700 11.5px var(--font-sans); color: var(--brand-red); white-space: nowrap; }
@media (max-width: 640px) { .practice-badge__label { font-size: 11px; margin-left: 5px; } }

/* Page title: one calm heading under the logo on every main page */
.page-title { width: 100%; max-width: 1320px; margin: 0 auto; padding: 18px 20px 4px; }
.page-title h1 { margin: 0; font: 800 clamp(26px, 4vw, 34px)/1.1 var(--font-serif); letter-spacing: -0.02em; color: var(--ink); }
.page-title p { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.cg .page-title, .flows .page-title { padding-left: 0; padding-right: 0; }
.cg .page-title { padding-top: 6px; padding-bottom: 12px; }
.flows .page-title { padding-top: 6px; padding-bottom: 10px; }
@media (max-width: 640px) { .page-title { padding: 12px 12px 2px; } .page-title p { font-size: 13.5px; } }

/* Footer: the gnome peeks over the edge, brand, tagline and a tidy row of links */
.site-footer { position: relative; margin-top: 90px; padding: 22px 20px 30px; border-top: 1px solid var(--line-medium); background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(244, 237, 225, .9)); }
.footer-inner { position: relative; max-width: 720px; display: grid; justify-items: center; gap: 4px; }
.footer-gnome { position: absolute; top: -82px; left: 50%; width: 120px; height: auto; margin-left: -60px; pointer-events: none; filter: drop-shadow(0 -2px 6px rgba(43, 31, 23, .08)); }
.footer-brand { display: inline-block; margin-top: 24px; }
.footer-logo { opacity: 1; margin: 0; height: 26px; width: auto; }
.footer-tagline { margin: 2px 0 8px; font: italic 14px var(--font-serif); color: var(--ink-soft); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin: 0 0 10px; }
.footer-links a { padding: 6px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line-subtle); font: 700 13px var(--font-sans); color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--brand-red); border-color: rgba(184, 58, 40, .3); background: var(--brand-red-light); text-decoration: none; }
.footer-copy a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-copy a:hover { color: var(--brand-red); }
@media (max-width: 640px) {
  .site-footer { margin-top: 80px; padding: 20px 14px 90px; }
  .footer-gnome { width: 104px; margin-left: -52px; top: -72px; }
}
.footer-logo, .footer-tagline { display: block; }
.media img { scale: var(--fit, 1); transform-origin: 50% 100%; }

/* Members' versions: a small pill on the grass line (left), mirroring the heart (right). No extra card height. */
.card-heart .practice-badge { position: absolute; left: 8px; bottom: 8px; top: auto; z-index: 6; pointer-events: auto; padding: 2px 8px 2px 3px; background: rgba(255, 255, 255, .92); border: 1px solid rgba(184, 58, 40, .25); box-shadow: 0 1px 4px rgba(43, 31, 23, .12); }
.card-heart .practice-badge img { width: 22px; height: 22px; margin-left: -8px; border-color: #fff; }
.card-heart .practice-badge img:first-child { margin-left: 0; }
.card-heart .practice-badge:not(:has(.practice-badge__count)) { padding-right: 3px; }
.card-heart .practice-badge:hover { background: #fff; border-color: var(--brand-red); }
.card-photos { display: none; }

/* The gnome whispers toward his message: mirrored (scale keeps the hover lift working) */
.gnome-tip__gnome { scale: -1 1; }

/* Finder row blends into the page; it only gets a soft backing once you scroll beneath it */
.finder { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.scrolled .finder { background: rgba(251, 249, 245, .94); border-bottom-color: var(--line-subtle); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.card-heart .practice-badge__count { margin-left: 5px; font: 800 12.5px var(--font-sans); color: var(--brand-red); }

/* Tall, narrow gnomes were pushed past the picture box and clipped (legs cut): keep the grid track and image inside it */
.media { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.media img { min-height: 0; max-height: 100%; }
.card-heart .practice-badge__count::after { content: ' ' attr(data-unit); font-weight: 700; }
@media (max-width: 640px) { .card-heart .practice-badge__count::after { content: none; } }
