/* ==========================================================================
   KMG Agencement — page « Nos réalisations » (refonte, maquettes 29/10/2026)

   Couleurs : uniquement les variables de css/home-premium.css (chargée avant)
     or         --kmg-gold #E8CC80, --kmg-gold-grad, --kmg-gold-fill
     anthracite --kmg-edge-dark #1f1e1c, --kmg-anth-a #262421, --kmg-anth-b #2c2a26
     crème      --kmg-cream #F5EDDF, --kmg-cream-2 #EBDFC8, texte --kmg-ink
   Préfixe : html body#top.kmg-real-page → aucune incidence sur les autres pages
   (même poids que les règles de l'accueil, et chargée après elles).
   ========================================================================== */

html body#top.kmg-real-page {
  background: var(--kmg-edge-dark) !important;
  overflow-x: hidden;
}

@media (max-width: 599px) {
  html body#top.kmg-real-page > footer .kmg-footer-bottom {
    box-sizing: border-box;
    padding-inline-end: 72px;
  }
}

/* Keep the header anchored at the top; this page hides it as soon as scrolled. */
html body#top.kmg-real-page > header {
  position: fixed !important;
  top: 0 !important;
  transform: none !important;
  animation: none !important;
}

/* The whole header disappears outside the showroom, including descendants
   whose legacy styles force their own visibility. */
html body#top.kmg-real-page.kmg-out-hero > header {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html body#top.kmg-real-page.kmg-out-hero > header * {
  pointer-events: none !important;
}

/* Hide the complete navigation, including fixed logo descendants and the
   separate mobile burger, until the visitor returns to the top. */
html body#top.kmg-real-page.kr-header-scrolled > header,
html body#top.kmg-real-page.kr-header-scrolled > .kmg-burger,
html body#top.kmg-real-page.kr-header-scrolled > .kmg-burger-panel,
html body#top.kmg-real-page.kr-header-scrolled > .kmg-burger-overlay {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html body#top.kmg-real-page.kr-header-scrolled > header *,
html body#top.kmg-real-page.kr-header-scrolled > .kmg-burger-panel * {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Same entrance rotation and gentle rebound as index.php. */
@keyframes kr-logo-spin-in {
  0%   { rotate: -360deg; scale: .8; opacity: 0; }
  60%  { rotate: 8deg; scale: 1.04; opacity: 1; }
  75%  { rotate: -4deg; scale: 1.01; }
  88%  { rotate: 2deg; scale: 1; }
  100% { rotate: 0deg; scale: 1; opacity: 1; }
}
html body#top.kmg-real-page header .logo img {
  animation: kr-logo-spin-in 1.4s ease-out forwards !important;
  transform-origin: center center;
}
@media (prefers-reduced-motion: reduce) {
  html body#top.kmg-real-page header .logo img { animation: none !important; }
}

html body#top.kmg-real-page .kr-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Lien actif « Réalisations » : même pastille dorée que « Accueil » sur l'accueil */
html body#top.kmg-real-page header nav.navbar > ul > li > a[aria-current="page"] {
  background: var(--kmg-gold-fill) !important;
  color: var(--kmg-ink) !important;
  -webkit-text-fill-color: var(--kmg-ink) !important;
  box-shadow: 0 4px 14px rgba(232, 204, 128, .3) !important;
}

html body#top.kmg-real-page .kr-main {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   1. SECTION SHOWROOM — fond, titre, filtres
   ========================================================================== */

html body#top.kmg-real-page .kr-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* !important : l'ancienne feuille impose padding et fond gris à toutes les <section> */
  --kr-pt: calc(var(--kmg-header-h, 72px) + clamp(16px, 2vw, 30px));
  --kr-pb: clamp(120px, 11vw, 170px);
  margin: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  padding: var(--kr-pt) 0 var(--kr-pb) !important;
  background: var(--kmg-edge-dark) !important;
  color: var(--kmg-light);
  text-align: center;
}

/* Les anciennes feuilles posent des calques ::before/::after sur les <section> :
   ils masquaient les filtres (clics bloqués). Neutralisés ici. */
html body#top.kmg-real-page .kr-hero::before,
html body#top.kmg-real-page .kr-hero::after,
html body#top.kmg-real-page .kr-cream::before,
html body#top.kmg-real-page .kr-cream::after {
  content: none !important;
  display: none !important;
}

/* Fond fixe : hall illuminé (images/realisations/realisations-showroom-bg.webp).
   Aucun filtre de couleur : seul un voile anthracite léger, en haut pour le
   titre et en bas pour la vague, garde la lisibilité. */
html body#top.kmg-real-page .kr-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../images/realisations/realisations-showroom-bg.webp') 50% 58% / cover no-repeat;
}
html body#top.kmg-real-page .kr-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(31, 30, 28, .80) 0%,
      rgba(31, 30, 28, .52) 22%,
      rgba(31, 30, 28, .22) 42%,
      rgba(31, 30, 28, .10) 60%,
      rgba(31, 30, 28, .30) 84%,
      rgba(31, 30, 28, .72) 100%),
    radial-gradient(ellipse 70% 40% at 50% 20%, rgba(31, 30, 28, .25), transparent 70%);
}

html body#top.kmg-real-page .kr-hero__head {
  position: relative;
  z-index: 5;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

html body#top.kmg-real-page .kr-title {
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--kmg-serif) !important;
  font-weight: 500 !important;
  font-size: clamp(2.3rem, 5.4vw, 4.6rem) !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #f6f0e3 !important;
  -webkit-text-fill-color: #f6f0e3 !important;
  text-shadow: 0 4px 26px rgba(0, 0, 0, .55);
  background: none !important;
}
html body#top.kmg-real-page .kr-gold {
  background: var(--kmg-gold-grad) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: var(--kmg-gold) !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, .45));
}
html body#top.kmg-real-page .kr-sub {
  margin: 12px auto 0 !important;
  max-width: 760px;
  font-family: var(--kmg-serif) !important;
  font-size: clamp(1rem, 1.55vw, 1.4rem) !important;
  line-height: 1.4 !important;
  color: rgba(246, 240, 227, .94) !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}

/* Ornement : filet doré + losange */
html body#top.kmg-real-page .kr-orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px auto 0;
  width: min(300px, 60%);
}
html body#top.kmg-real-page .kr-orn::before,
html body#top.kmg-real-page .kr-orn::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(232, 204, 128, 0), var(--kmg-gold));
}
html body#top.kmg-real-page .kr-orn::after {
  background: linear-gradient(90deg, var(--kmg-gold), rgba(232, 204, 128, 0));
}
html body#top.kmg-real-page .kr-orn i {
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: var(--kmg-gold-fill);
  box-shadow: 0 0 10px rgba(232, 204, 128, .8);
}

/* ---------- Filtres ---------- */
html body#top.kmg-real-page .kr-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: clamp(18px, 2.4vw, 28px) auto 0;
  padding: 4px;
}
html body#top.kmg-real-page .kr-filter {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 24px;
  border: 1px solid rgba(232, 204, 128, .32);
  border-radius: 999px;
  background: rgba(31, 30, 28, .74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 16px rgba(0, 0, 0, .3);
  color: var(--kmg-light);
  font-family: var(--kmg-sans);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
html body#top.kmg-real-page .kr-filter:hover {
  border-color: var(--kmg-gold);
  color: var(--kmg-gold);
}
html body#top.kmg-real-page .kr-filter.is-active {
  background: var(--kmg-gold-fill);
  border-color: #f5e6a3;
  color: var(--kmg-ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 248, 220, .35), 0 0 18px rgba(232, 204, 128, .45), 0 6px 16px rgba(0, 0, 0, .3);
}
html body#top.kmg-real-page .kr-filter:focus-visible,
html body#top.kmg-real-page .kr-arrow:focus-visible,
html body#top.kmg-real-page .kr-dot:focus-visible,
html body#top.kmg-real-page .kr-card__btn:focus-visible,
html body#top.kmg-real-page .kr-cta:focus-visible,
html body#top.kmg-real-page .kr-down:focus-visible {
  outline: 2px solid #f5e6a3;
  outline-offset: 3px;
}

/* ==========================================================================
   2. PLATEAU 3D TOURNANT
   La piste (.kr-track) a la taille de la carte centrale et porte la
   perspective. Le JavaScript place chaque carte sur l'arc du plateau.
   ========================================================================== */

html body#top.kmg-real-page .kr-stage {
  --kr-cw: clamp(300px, 40vw, 610px);     /* largeur de la carte centrale */
  --kr-ratio: 16 / 10.6;
  position: relative;
  width: 100%;
  margin: clamp(20px, 2.4vw, 34px) auto 0;
  padding: 10px 0 calc(var(--kr-cw) * .34);   /* place du reflet et de l anneau avant */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

html body#top.kmg-real-page .kr-track {
  position: relative;
  z-index: 1;
  width: var(--kr-cw);
  aspect-ratio: var(--kr-ratio);
  margin: 0 auto;
  /* ellipse du plateau (valeurs exactes posées par le JS) */
  --kr-rx: calc(var(--kr-cw) * 1.24);
  --kr-rz: calc(var(--kr-cw) * 2.7);
  --kr-k: .46;
  perspective: 1500px;
  perspective-origin: 50% 24%;       /* regard légèrement plongeant : le plateau s ouvre */
  transform-style: flat;
  outline: none;
}
html body#top.kmg-real-page .kr-track:focus-visible {
  outline: 2px solid rgba(245, 230, 163, .7);
  outline-offset: 10px;
  border-radius: 14px;
}

/* ---------- Le plateau (conforme à la maquette) ----------
   Un grand cercle aplati verticalement (scaleY) = ellipse vue en perspective.
   - bord avant juste sous le reflet de la carte centrale ;
   - plus large que l'écran : le bord remonte vers les côtés ;
   - surface sombre et brillante, bord doré épais et lumineux, tranche dessous ;
   - la moitié arrière s'efface derrière les cartes (masque).
   Les repères (.kr-plate__spin) tournent du même angle que les cartes. */
html body#top.kmg-real-page .kr-stage {
  --kr-front: calc(10px + var(--kr-cw) / (var(--kr-ratio)) + var(--kr-cw) * .14);
  --kr-pw: max(150vw, calc(var(--kr-cw) * 3.6));
  --kr-flat: .36;
}
/* Conteneur rogné à la moitié avant de l ellipse (léger à afficher) ;
   le haut s efface en fondu derrière les cartes. */
html body#top.kmg-real-page .kr-plate {
  --kr-ph: calc(var(--kr-pw) * var(--kr-flat));   /* hauteur de l ellipse */
  position: absolute;
  left: 0;
  right: 0;
  /* partie avant seulement : de la hauteur des côtés (--kr-cut, posée par le
     JS) jusqu au bord avant. Fondu en haut : rien n apparaît derrière les cartes. */
  top: calc(var(--kr-cut, 300px) - 20px);
  height: calc(var(--kr-front) - var(--kr-cut, 300px) + 66px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .6) 14%, #000 30%);
  mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .6) 14%, #000 30%);
  z-index: 0;
  pointer-events: none;
}
html body#top.kmg-real-page .kr-plate__body {
  position: absolute;
  left: 50%;
  top: calc(100% - 40px);
  width: var(--kr-pw);
  aspect-ratio: 1;
  border-radius: 50%;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) scaleY(var(--kr-flat));
}
/* tranche du plateau : second filet doré, légèrement plus bas (avant seulement) */
html body#top.kmg-real-page .kr-plate__body--edge {
  transform: translate(-50%, -100%) translateY(clamp(6px, .8vw, 12px)) scaleY(var(--kr-flat));
  opacity: .22;
}
html body#top.kmg-real-page .kr-plate__body > span,
html body#top.kmg-real-page .kr-plate__body > span > i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

/* Surface : noir anthracite poli (les reflets des cartes s'y posent) */
html body#top.kmg-real-page .kr-plate__surface {
  background: radial-gradient(circle closest-side,
    rgba(18, 17, 15, .70) 0%,
    rgba(22, 21, 19, .80) 60%,
    rgba(14, 13, 12, .90) 90%,
    rgba(14, 13, 12, .94) 96.6%,
    transparent 97%);
}
/* Lueur dorée intérieure, le long du bord, et reflet clair au centre avant */
html body#top.kmg-real-page .kr-plate__sheen {
  background:
    radial-gradient(circle closest-side, transparent 86%, rgba(232, 204, 128, .03) 93%, rgba(245, 230, 163, .08) 96.5%, transparent 97%),
    radial-gradient(ellipse 30% 10% at 50% 93%, rgba(255, 244, 205, .08), transparent 70%),
    linear-gradient(180deg, transparent 55%, rgba(255, 248, 225, .05) 80%, rgba(255, 248, 225, .09) 94%, transparent 97%);
}
/* Bord doré : filet fin et discret, léger halo autour */
html body#top.kmg-real-page .kr-plate__rim {
  background: radial-gradient(circle closest-side,
    transparent 95.2%,
    rgba(232, 204, 128, .05) 96.2%,
    rgba(240, 216, 150, .22) 96.8%,
    rgba(250, 238, 196, .72) 97.05%,
    rgba(240, 216, 150, .22) 97.3%,
    rgba(232, 204, 128, .05) 97.9%,
    transparent 98.8%);
}

/* Les traînées lumineuses tournent avec la navigation (angle posé par le JS) */
html body#top.kmg-real-page .kr-plate__spin {
  transform: rotate(var(--kr-spin, 0deg));
}


/* Traînées de lumière qui glissent lentement sur le bord (indépendantes) */
html body#top.kmg-real-page .kr-plate__idle {
  animation: kr-idle 40s linear infinite;
}
html body#top.kmg-real-page .kr-plate__trail {
  background: conic-gradient(from 0deg,
    transparent 0deg 250deg,
    rgba(255, 252, 238, 0) 250deg,
    rgba(255, 252, 238, 1) 356deg,
    transparent 360deg);
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 96.7%, #000 96.95%, #000 97.15%, transparent 97.4%);
  mask-image: radial-gradient(circle closest-side, transparent 96.7%, #000 96.95%, #000 97.15%, transparent 97.4%);
}
html body#top.kmg-real-page .kr-plate__trail--b { transform: rotate(180deg); opacity: .75; }
@keyframes kr-idle {
  to { transform: rotate(360deg); }
}

/* Rubans de lumière dorés sur les côtés (comme la maquette) */
html body#top.kmg-real-page .kr-swoosh {
  display: none;
  position: absolute;
  left: 0;
  top: calc(var(--kr-front) - var(--kr-cw) * .95);
  width: 100%;
  height: calc(var(--kr-cw) * 1.05);
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}
html body#top.kmg-real-page .kr-swoosh__p {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(245, 230, 163, .9));
  opacity: .9;
}
html body#top.kmg-real-page .kr-swoosh__p--thin { stroke-width: 1.2; opacity: .75; }
html body#top.kmg-real-page .kr-swoosh__p--soft { stroke-width: 7; opacity: .22; filter: blur(3px); }

/* Halo doux sous la carte centrale */
html body#top.kmg-real-page .kr-halo {
  position: absolute;
  left: 50%;
  top: 100%;
  width: calc(var(--kr-cw) * 1.5);
  height: calc(var(--kr-cw) * .5);
  transform: translate(-50%, -46%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(255, 244, 205, .42) 0%,
    rgba(245, 230, 163, .18) 32%,
    rgba(232, 204, 128, .06) 56%,
    transparent 72%);
  filter: blur(6px);
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   3. CARTES + REFLET AU SOL
   ========================================================================== */

html body#top.kmg-real-page .kr-card {
  --kr-dim: 0; --kr-mo: .5;
  position: absolute;
  inset: 0;
  margin: 0;
  cursor: pointer;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
html body#top.kmg-real-page .kr-card.is-out { display: none; }
html body#top.kmg-real-page .kr-card.is-active { cursor: default; }

html body#top.kmg-real-page .kr-card__face {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(240, 213, 127, .75);
  background: var(--kmg-anth-b);
  box-shadow:
    0 0 0 1px rgba(255, 244, 205, .14),
    0 0 14px rgba(232, 204, 128, .22),
    0 26px 44px rgba(8, 8, 7, .55);
  transition: box-shadow .5s ease, border-color .5s ease;
}
/* voile des cartes éloignées (dosé par le JS) */
html body#top.kmg-real-page .kr-card__face::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #141311;
  opacity: var(--kr-dim);
  pointer-events: none;
}
html body#top.kmg-real-page .kr-card.is-active .kr-card__face {
  border: 2px solid #f0d57f;
  box-shadow:
    0 0 0 1px rgba(255, 248, 220, .6),
    0 0 12px 2px rgba(255, 235, 164, .85),
    0 0 42px 10px rgba(232, 204, 128, .34),
    0 30px 50px rgba(8, 8, 7, .55);
}
/* La carte qui arrive au centre s'illumine brièvement */
html body#top.kmg-real-page .kr-card.is-lit .kr-card__face {
  animation: kr-lit 1.1s ease-out;
}
@keyframes kr-lit {
  0%   { box-shadow: 0 0 0 1px rgba(255, 248, 220, .6), 0 0 12px 2px rgba(255, 235, 164, .85), 0 0 42px 10px rgba(232, 204, 128, .34), 0 30px 50px rgba(8, 8, 7, .55); }
  35%  { box-shadow: 0 0 0 1px rgba(255, 252, 235, .95), 0 0 20px 5px rgba(255, 240, 190, 1), 0 0 70px 18px rgba(232, 204, 128, .5), 0 30px 50px rgba(8, 8, 7, .55); }
  100% { box-shadow: 0 0 0 1px rgba(255, 248, 220, .6), 0 0 12px 2px rgba(255, 235, 164, .85), 0 0 42px 10px rgba(232, 204, 128, .34), 0 30px 50px rgba(8, 8, 7, .55); }
}

html body#top.kmg-real-page .kr-card__img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  border-radius: 0 !important;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Reflet : copie inversée sous la carte, fondu progressif + léger flou.
   Enfant de la carte → suit exactement sa position, son inclinaison, sa taille. */
html body#top.kmg-real-page .kr-card__mirror {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  height: 100%;
  z-index: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(240, 213, 127, .5);
  transform: scaleY(-1);
  opacity: var(--kr-mo);
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .86) 14%, rgba(0, 0, 0, .42) 30%, rgba(0, 0, 0, .14) 50%, transparent 64%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .86) 14%, rgba(0, 0, 0, .42) 30%, rgba(0, 0, 0, .14) 50%, transparent 64%);
  filter: blur(1.6px) saturate(.92);
  pointer-events: none;
}
html body#top.kmg-real-page .kr-card__mirror img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  border-radius: 0 !important;
}
/* Lueur dorée du bord reflété */
html body#top.kmg-real-page .kr-card.is-active .kr-card__mirror {
  border-color: rgba(245, 230, 163, .8);
  box-shadow: 0 0 18px rgba(232, 204, 128, .45);
}

/* Légende : nom, catégorie, lieu, bouton */
html body#top.kmg-real-page .kr-card__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 1.6vw, 22px) clamp(14px, 1.8vw, 24px);
  background: linear-gradient(180deg, rgba(20, 19, 17, 0) 0%, rgba(20, 19, 17, .62) 38%, rgba(20, 19, 17, .9) 100%);
  text-align: left;
}
html body#top.kmg-real-page .kr-card__txt { min-width: 0; }
html body#top.kmg-real-page .kr-card__cat {
  display: block;
  margin-bottom: 3px;
  font-family: var(--kmg-sans);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--kmg-gold);
}
html body#top.kmg-real-page .kr-card__title {
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--kmg-serif) !important;
  font-weight: 500 !important;
  font-size: clamp(1.05rem, 1.75vw, 1.6rem) !important;
  line-height: 1.18 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #f6f0e3 !important;
  -webkit-text-fill-color: #f6f0e3 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
html body#top.kmg-real-page .kr-card__loc {
  margin: 4px 0 0 !important;
  font-family: var(--kmg-sans) !important;
  font-size: .88rem !important;
  color: rgba(246, 240, 227, .86) !important;
}
html body#top.kmg-real-page .kr-card__loc i { color: var(--kmg-gold); margin-right: 3px; }

html body#top.kmg-real-page .kr-card__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--kmg-gold-fill);
  color: var(--kmg-ink) !important;
  -webkit-text-fill-color: var(--kmg-ink) !important;
  font-family: var(--kmg-sans);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 248, 220, .4), 0 6px 18px rgba(232, 204, 128, .35);
  transition: box-shadow .25s ease;
}
html body#top.kmg-real-page .kr-card.is-active .kr-card__btn {
  animation: kr-btn-in .45s ease .1s both;
}
@keyframes kr-btn-in {
  from { opacity: 0; transform: translateY(8px); }
}
html body#top.kmg-real-page .kr-card__btn:hover {
  box-shadow: 0 0 0 1px rgba(255, 248, 220, .6), 0 0 22px rgba(232, 204, 128, .6);
}

/* Cartes latérales : seulement le nom (et le lieu), comme sur la maquette */
html body#top.kmg-real-page .kr-card:not(.is-active) .kr-card__cat,
html body#top.kmg-real-page .kr-card:not(.is-active) .kr-card__btn { display: none; }
html body#top.kmg-real-page .kr-card:not(.is-active) .kr-card__title { font-size: clamp(.95rem, 1.35vw, 1.25rem) !important; }
html body#top.kmg-real-page .kr-card:not(.is-active) .kr-card__cap { opacity: 0; }
/* À droite, le bord gauche passe derrière la carte centrale : texte calé à droite */
html body#top.kmg-real-page .kr-card.is-right:not(.is-active) .kr-card__cap { justify-content: flex-end; text-align: right; }

/* Apparition après un changement de filtre */
html body#top.kmg-real-page .kr-track.is-swapping .kr-card__face,
html body#top.kmg-real-page .kr-track.is-swapping .kr-card__mirror {
  animation: kr-swap .6s cubic-bezier(.22, .8, .24, 1) both;
}
@keyframes kr-swap {
  from { opacity: 0; }
}

/* ---------- Flèches ---------- */
html body#top.kmg-real-page .kr-arrow {
  position: absolute;
  top: calc(10px + var(--kr-cw) / (16 / 10.6) / 2);
  z-index: 200;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 2px solid var(--kmg-gold);
  background: rgba(31, 30, 28, .88);
  color: var(--kmg-gold);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(8, 8, 7, .45), 0 0 18px rgba(232, 204, 128, .3);
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
html body#top.kmg-real-page .kr-arrow[hidden] { display: none; }
html body#top.kmg-real-page .kr-arrow:hover {
  background: var(--kmg-gold-fill);
  color: var(--kmg-ink);
  box-shadow: 0 8px 20px rgba(8, 8, 7, .45), 0 0 26px rgba(232, 204, 128, .6);
}
html body#top.kmg-real-page .kr-arrow--prev { left: max(16px, 4.5vw); }
html body#top.kmg-real-page .kr-arrow--next { right: max(16px, 4.5vw); }

/* ---------- Points ---------- */
html body#top.kmg-real-page .kr-dots {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
}
html body#top.kmg-real-page .kr-dots[hidden] { display: none; }
html body#top.kmg-real-page .kr-dot {
  width: 10px;
  height: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(246, 240, 227, .32);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  cursor: pointer;
  transition: background .3s ease, width .3s ease, box-shadow .3s ease;
}
html body#top.kmg-real-page .kr-dot:hover { background: rgba(246, 240, 227, .6); }
html body#top.kmg-real-page .kr-dot.is-active {
  width: 26px;
  background: var(--kmg-gold-fill);
  box-shadow: 0 0 10px rgba(232, 204, 128, .7);
}

/* Flèche « suite » (comme la maquette mobile) */
html body#top.kmg-real-page .kr-down {
  position: relative;
  z-index: 6;
  display: none;
  width: 40px;
  height: 40px;
  margin: 18px auto 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--kmg-gold);
  color: var(--kmg-gold) !important;
  background: rgba(31, 30, 28, .6);
  text-decoration: none;
}

/* ---------- Vague dorée vers la bande crème ---------- */
html body#top.kmg-real-page .kr-wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: clamp(70px, 8vw, 116px);
  z-index: 4;
  pointer-events: none;
}
html body#top.kmg-real-page .kr-wave svg { display: block; width: 100%; height: 100%; }
html body#top.kmg-real-page .kr-wave__fill { fill: var(--kmg-cream); }
html body#top.kmg-real-page .kr-wave__line { filter: drop-shadow(0 0 6px rgba(232, 204, 128, .7)); }
html body#top.kmg-real-page .kr-wave__glow { opacity: .55; filter: drop-shadow(0 0 4px rgba(232, 204, 128, .8)); }

/* ==========================================================================
   4. BANDE CRÈME — atouts, présentation de la catégorie, devis
   ========================================================================== */

html body#top.kmg-real-page .kr-cream {
  position: relative;
  margin: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  padding: clamp(18px, 2.4vw, 34px) 0 clamp(40px, 5vw, 64px) !important;
  background: linear-gradient(180deg, var(--kmg-cream) 0%, #f3e9d7 100%) !important;
  color: var(--kmg-ink);
  text-align: center;
}
html body#top.kmg-real-page .kr-cream__inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

html body#top.kmg-real-page .kr-feats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto !important;
  padding: 0 !important;
  list-style: none !important;
}
html body#top.kmg-real-page .kr-feats[hidden] { display: none; }
html body#top.kmg-real-page .kr-feats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  list-style: none !important;
  font-family: var(--kmg-sans);
  font-size: .98rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--kmg-ink);
}
html body#top.kmg-real-page .kr-feats li + li { border-left: 1px solid rgba(201, 171, 98, .35); }
html body#top.kmg-real-page .kr-feats i,
html body#top.kmg-real-page .kr-catinfo__ico i {
  font-size: 2rem;
  background: var(--kmg-gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--kmg-gold);
  -webkit-text-fill-color: transparent;
}

html body#top.kmg-real-page .kr-catinfo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}
html body#top.kmg-real-page .kr-catinfo[hidden] { display: none; }
html body#top.kmg-real-page .kr-catinfo__ico {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  border: 1.5px solid rgba(201, 171, 98, .7);
  background: rgba(255, 255, 255, .45);
}
html body#top.kmg-real-page .kr-catinfo__t {
  margin: 0 0 4px !important;
  font-family: var(--kmg-serif) !important;
  font-size: 1.35rem !important;
  font-weight: 500 !important;
  color: var(--kmg-ink) !important;
}
html body#top.kmg-real-page .kr-catinfo__d {
  margin: 0 !important;
  font-family: var(--kmg-sans) !important;
  font-size: .95rem !important;
  line-height: 1.5 !important;
  color: var(--kmg-ink-soft) !important;
}

html body#top.kmg-real-page .kr-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(22px, 2.6vw, 32px);
  padding: 16px 44px;
  border-radius: 999px;
  background: var(--kmg-gold-fill);
  color: var(--kmg-ink) !important;
  -webkit-text-fill-color: var(--kmg-ink) !important;
  font-family: var(--kmg-sans);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 0 0 1px rgba(201, 171, 98, .5), 0 10px 26px rgba(201, 171, 98, .38);
  transition: box-shadow .25s ease, transform .25s ease;
}
html body#top.kmg-real-page .kr-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(201, 171, 98, .7), 0 14px 32px rgba(201, 171, 98, .5);
}

/* La courbe du pied de page part de la crème (comme après « Contact » sur l'accueil) */
html body#top.kmg-real-page .kmg-curve--cf { background: linear-gradient(#f3e9d7 calc(100% - 2px), var(--kmg-footer) 0); }

/* ==========================================================================
   5. RESPONSIVE
   ========================================================================== */

/* Tablette */
@media (max-width: 1023px) {
  html body#top.kmg-real-page .kr-hero { --kr-pt: 128px; }
  html body#top.kmg-real-page .kr-stage {
    --kr-cw: clamp(280px, 50vw, 480px);
    --kr-ratio: 4 / 3.7;
  }
  html body#top.kmg-real-page .kr-arrow { top: calc(10px + var(--kr-cw) / (4 / 3.7) / 2); }
  html body#top.kmg-real-page .kr-card__cap { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Téléphone */
@media (max-width: 599px) {
  html body#top.kmg-real-page .kr-hero {
    --kr-pt: 132px;        /* sous le logo et le bandeau téléphone */
    --kr-pb: 96px;
  }
  html body#top.kmg-real-page .kr-hero__bg {
    background-image: url('../images/realisations/realisations-showroom-bg-mobile.webp');
    background-position: 50% 62%;
  }
  html body#top.kmg-real-page .kr-title { font-size: clamp(2.05rem, 10vw, 2.6rem) !important; }
  html body#top.kmg-real-page .kr-sub { font-size: .98rem !important; padding: 0 8px; }
  html body#top.kmg-real-page .kr-orn { margin-top: 10px; }

  /* All categories remain visible without horizontal scrolling. */
  html body#top.kmg-real-page .kr-hero__head { width: 100%; }
  html body#top.kmg-real-page .kr-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
    padding: 4px 16px;
    overflow: visible;
  }
  html body#top.kmg-real-page .kr-filters::-webkit-scrollbar { display: none; }
  html body#top.kmg-real-page .kr-filter {
    padding: 8px 16px;
    font-size: .84rem;
    scroll-snap-align: center;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(31, 30, 28, .82);
  }

  html body#top.kmg-real-page .kr-stage {
    --kr-cw: min(56vw, 250px);
    --kr-ratio: 3 / 4.7;
    margin-top: 24px;
    padding-bottom: calc(var(--kr-cw) * .62);
  }
  html body#top.kmg-real-page .kr-track { perspective: 900px; perspective-origin: 50% 28%; }
  html body#top.kmg-real-page .kr-halo { width: calc(var(--kr-cw) * 1.7); height: calc(var(--kr-cw) * .6); }
  /* reflets plus discrets, sans flou (lisibilité + fluidité) */
  html body#top.kmg-real-page .kr-card__mirror { filter: none; border-radius: 10px; }
  html body#top.kmg-real-page .kr-card__face { border-radius: 10px; }
  html body#top.kmg-real-page .kr-card__cap { padding: 12px; gap: 6px; }
  html body#top.kmg-real-page .kr-card__cat { font-size: .6rem; letter-spacing: .1em; }
  html body#top.kmg-real-page .kr-card__title { font-size: 1.02rem !important; }
  html body#top.kmg-real-page .kr-card:not(.is-active) .kr-card__title { font-size: .82rem !important; }
  html body#top.kmg-real-page .kr-card__loc { font-size: .78rem !important; }
  html body#top.kmg-real-page .kr-card__btn {
    padding: 8px 13px;
    font-size: .76rem;
    gap: 7px;
  }

  html body#top.kmg-real-page .kr-arrow {
    top: calc(10px + var(--kr-cw) / (3 / 4.7) / 2);
    width: 40px;
    height: 40px;
    font-size: .95rem;
  }
  html body#top.kmg-real-page .kr-arrow--prev { left: 10px; }
  html body#top.kmg-real-page .kr-arrow--next { right: 10px; }
  html body#top.kmg-real-page .kr-dot { width: 8px; height: 8px; }
  html body#top.kmg-real-page .kr-dot.is-active { width: 20px; }
  html body#top.kmg-real-page .kr-down { display: flex; }

  html body#top.kmg-real-page .kr-feats { grid-template-columns: repeat(2, 1fr); row-gap: 8px; }
  html body#top.kmg-real-page .kr-feats li { font-size: .86rem; padding: 10px 6px; }
  html body#top.kmg-real-page .kr-feats li + li { border-left: 0; }
  html body#top.kmg-real-page .kr-feats li:nth-child(even) { border-left: 1px solid rgba(201, 171, 98, .35); }
  html body#top.kmg-real-page .kr-feats i { font-size: 1.6rem; }
  html body#top.kmg-real-page .kr-catinfo { gap: 14px; padding: 0 4px; }
  html body#top.kmg-real-page .kr-catinfo__ico { width: 54px; height: 54px; }
  html body#top.kmg-real-page .kr-catinfo__t { font-size: 1.15rem !important; }
  html body#top.kmg-real-page .kr-catinfo__d { font-size: .86rem !important; }
  html body#top.kmg-real-page .kr-cta { padding: 14px 34px; font-size: .98rem; }
}

/* Navigateurs sans masque CSS : reflet simplement très atténué */
@supports not ((mask-image: linear-gradient(#000, transparent)) or (-webkit-mask-image: linear-gradient(#000, transparent))) {
  html body#top.kmg-real-page .kr-card__mirror { opacity: calc(var(--kr-mo) * .35); }
  html body#top.kmg-real-page .kr-plate__trail { display: none; }
}

/* Mouvement réduit : pas de rotation continue ni d'éclat (le JS supprime aussi les transitions) */
@media (prefers-reduced-motion: reduce) {
  html body#top.kmg-real-page .kr-plate__idle,
  html body#top.kmg-real-page .kr-card.is-lit .kr-card__face,
  html body#top.kmg-real-page .kr-card.is-active .kr-card__btn,
  html body#top.kmg-real-page .kr-track.is-swapping .kr-card__face,
  html body#top.kmg-real-page .kr-track.is-swapping .kr-card__mirror { animation: none !important; }
}

/* Reflet de la carte centrale : la bande sombre de la légende se reflète aussi
   (comme sur la maquette), au plus près du bord de la carte. */
html body#top.kmg-real-page .kr-card__mirror::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 19, 17, .7) 0%, rgba(20, 19, 17, .35) 14%, rgba(20, 19, 17, 0) 30%);
  pointer-events: none;
}
html body#top.kmg-real-page .kr-card:not(.is-active) .kr-card__mirror::after { opacity: .4; }

/* Le bord doré du plateau délimite la section : la vague ne garde que
   son fond crème (ses filets dorés feraient double emploi). */
html body#top.kmg-real-page .kr-wave__line,
html body#top.kmg-real-page .kr-wave__glow { display: none; }

/* Shared camera for the circular display and its projected mirror floor. */
html body#top.kmg-real-page .kr-stage {
  --kr-cw: clamp(300px, 40vw, 610px);
  --kr-ratio: 16 / 10.6;
  --kr-arrow-size: 58px;
  --kr-arrow-inset: clamp(8px, .8vw, 16px);
  --kr-arrow-gap: clamp(32px, 3vw, 56px);
  --kr-control-space: calc(var(--kr-arrow-inset) + var(--kr-arrow-size) + var(--kr-arrow-gap));
  --kr-floor-space: .58;
  margin-top: clamp(80px, 6.6vw, 96px);
  padding-bottom: calc(var(--kr-cw) * var(--kr-floor-space));
}
html body#top.kmg-real-page .kr-track {
  perspective: var(--kr-camera, 1300px);
  perspective-origin: 50% 50%;
  /* Reserve side corridors for controls, including throughout rotation.
     Leave the vertical projection and the mirror reflections unrestricted. */
  clip-path: inset(-100vmax calc(50% - 50vw + var(--kr-control-space)) -100vmax);
}
html body#top.kmg-real-page .kr-arrow {
  width: var(--kr-arrow-size);
  height: var(--kr-arrow-size);
}
html body#top.kmg-real-page .kr-arrow--prev { left: var(--kr-arrow-inset); }
html body#top.kmg-real-page .kr-arrow--next { right: var(--kr-arrow-inset); }
html body#top.kmg-real-page .kr-card {
  transform-origin: 50% 50%;
}
html body#top.kmg-real-page .kr-floor {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  overflow: visible;
  z-index: 0;
  pointer-events: none;
}
html body#top.kmg-real-page .kr-floor__edge {
  fill: none;
  stroke: #E8CC80;
  stroke-width: 4;
  opacity: .18;
  transform: translateY(7px);
}
html body#top.kmg-real-page .kr-floor__rim {
  fill: none;
  stroke-width: 1.8;
  filter: drop-shadow(0 0 5px rgba(232, 204, 128, .6));
}
html body#top.kmg-real-page .kr-floor__accent {
  fill: none;
  stroke: #f5e6a3;
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: .8;
  filter: drop-shadow(0 0 4px #E8CC80);
}
html body#top.kmg-real-page .kr-card__mirror {
  top: calc(100% + 8px);
  /* Virtual image reflected across the floor, in the card's own 3D plane.
     The floor is halfway between the card and this inverted image. */
  transform: scaleY(-1);
  filter: blur(.4px);
  -webkit-mask-image: linear-gradient(to top, #000, rgba(0,0,0,.76) 16%, transparent 54%);
  mask-image: linear-gradient(to top, #000, rgba(0,0,0,.76) 16%, transparent 54%);
}
html body#top.kmg-real-page .kr-card.is-active .kr-card__face {
  border-color: #E8CC80;
  box-shadow: 0 0 0 1px rgba(255,248,220,.55), 0 0 13px 2px rgba(232,204,128,.65), 0 0 32px rgba(232,204,128,.24), 0 24px 40px rgba(0,0,0,.45);
}
html body#top.kmg-real-page .kr-card.is-lit .kr-card__face {
  animation: none;
}
@media (max-width: 1023px) {
  html body#top.kmg-real-page .kr-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    box-sizing: border-box;
  }
  html body#top.kmg-real-page .kr-filter {
    min-width: 0;
    white-space: normal;
  }
  html body#top.kmg-real-page .kr-stage {
    --kr-cw: 40vw;
    --kr-arrow-size: 44px;
    --kr-arrow-inset: 8px;
    --kr-arrow-gap: 14px;
    margin-top: 72px;
    padding-top: 6px;
  }
  html body#top.kmg-real-page .kr-arrow { top: calc(6px + var(--kr-cw) / (var(--kr-ratio)) / 2); }
  html body#top.kmg-real-page .kr-card__mirror { top: calc(100% + 4px); }
  html body#top.kmg-real-page .kr-card__cap {
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
    padding: 12px;
  }
  html body#top.kmg-real-page .kr-card__title { font-size: clamp(.85rem, 1.75vw, 1.15rem) !important; }
  html body#top.kmg-real-page .kr-card__cat { font-size: .55rem; }
  html body#top.kmg-real-page .kr-card__loc { font-size: .7rem !important; }
  html body#top.kmg-real-page .kr-card__btn { padding: 8px 12px; font-size: .7rem; gap: 7px; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  html body#top.kmg-real-page .kr-stage {
    --kr-ratio: 4 / 4.2;
    --kr-floor-space: .58;
    --kr-control-space: 0px;
    margin-top: calc(var(--kr-cw) * .24 + 8px);
    padding-bottom: calc(var(--kr-cw) * var(--kr-floor-space) + 80px);
  }
  html body#top.kmg-real-page .kr-arrow {
    top: calc(6px + var(--kr-cw) / (var(--kr-ratio)) + var(--kr-cw) * var(--kr-floor-space) + 22px);
    transform: none;
  }
  html body#top.kmg-real-page .kr-arrow--prev { left: calc(50% - 54px); }
  html body#top.kmg-real-page .kr-arrow--next { right: calc(50% - 54px); }
  html body#top.kmg-real-page .kr-card__mirror {
    -webkit-mask-image: linear-gradient(to top, #000, rgba(0,0,0,.76) calc(var(--kr-cw) * .15), transparent calc(var(--kr-cw) * .5));
    mask-image: linear-gradient(to top, #000, rgba(0,0,0,.76) calc(var(--kr-cw) * .15), transparent calc(var(--kr-cw) * .5));
  }
}
@media (max-width: 599px) {
  html body#top.kmg-real-page .kr-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html body#top.kmg-real-page .kr-stage {
    --kr-cw: min(40vw, calc((100vw - 104px) * .54));
    --kr-ratio: 16 / 10.6;
    --kr-arrow-size: 34px;
    --kr-arrow-inset: 4px;
    --kr-arrow-gap: 6px;
    margin-top: 56px;
    padding-top: 3px;
  }
  html body#top.kmg-real-page .kr-arrow {
    top: calc(3px + var(--kr-cw) / (16 / 10.6) / 2);
    width: 34px;
    height: 34px;
  }
  html body#top.kmg-real-page .kr-card__mirror {
    top: calc(100% + 2px);
    filter: none;
    border-radius: 4px;
  }
  html body#top.kmg-real-page .kr-card__face { border-radius: 4px; }
  html body#top.kmg-real-page .kr-card__cap {
    flex-direction: row;
    align-items: flex-end;
    gap: 5px;
    padding: 7px;
  }
  html body#top.kmg-real-page .kr-card__cat {
    font-size: .46rem;
    letter-spacing: .06em;
    margin-bottom: 2px;
  }
  html body#top.kmg-real-page .kr-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: clamp(.65rem, 2.8vw, .85rem) !important;
  }
  html body#top.kmg-real-page .kr-card__loc { display: none; }
  html body#top.kmg-real-page .kr-card__btn {
    position: relative;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: .7rem;
    gap: 0;
  }
  /* The complete label stays available to assistive technology; the card
     itself remains a project link, with a compact gold arrow like desktop. */
  html body#top.kmg-real-page .kr-card__btn > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body#top.kmg-real-page .kr-card__face { transition: none; }
}

/* Frame the complete desktop orbit and mirror floor on a phone, including
   touch devices in landscape. Controls keep their own accessible row. */
@media (max-width: 599px), (max-width: 1023px) and (max-height: 599px) and (pointer: coarse) {
  html body#top.kmg-real-page .kr-hero { --kr-pb: 64px; }
  html body#top.kmg-real-page .kr-filters { padding-inline: 12px; margin-top: 12px; }
  html body#top.kmg-real-page .kr-filter { min-height: 44px; padding: 10px 16px; }
  html body#top.kmg-real-page .kr-stage {
    --kr-cw: calc(40vw * var(--kr-mobile-fit, 1));
    --kr-ratio: 1 / 1.9;
    --kr-floor-space: .38;
    --kr-control-space: 0px;
    margin-top: var(--kr-phone-headroom, calc(var(--kr-cw) * .85 + 8px));
    padding-top: 3px;
    padding-bottom: calc(var(--kr-cw) * var(--kr-floor-space) + 72px);
  }
  html body#top.kmg-real-page .kr-track {
    clip-path: none;
    /* Keep the camera above a flat floor even with much taller panels. */
    perspective-origin: 50% calc(100% - var(--kr-cw) * 0.62);
  }
  html body#top.kmg-real-page .kr-card__mirror {
    top: calc(100% + 2px);
    filter: none;
    /* A taller photograph must not lengthen its reflection past the floor. */
    -webkit-mask-image: linear-gradient(to top, #000, rgba(0,0,0,.76) calc(var(--kr-cw) * .05), transparent calc(var(--kr-cw) * var(--kr-mirror-depth, .24)));
    mask-image: linear-gradient(to top, #000, rgba(0,0,0,.76) calc(var(--kr-cw) * .05), transparent calc(var(--kr-cw) * var(--kr-mirror-depth, .24)));
  }
  html body#top.kmg-real-page .kr-card__face { border-radius: 10px; }
  html body#top.kmg-real-page .kr-card__cap { padding: 6px; gap: 5px; align-items: flex-end; }
  html body#top.kmg-real-page .kr-card__txt { flex: 1 1 auto; }
  html body#top.kmg-real-page .kr-card__cat { font-size: .5rem; letter-spacing: .04em; }
  html body#top.kmg-real-page .kr-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: clamp(.68rem, 2.8vw, .85rem) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere;
  }
  html body#top.kmg-real-page .kr-card__btn {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    font-size: .78rem;
    gap: 7px;
  }
  html body#top.kmg-real-page .kr-card__btn > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  html body#top.kmg-real-page .kr-arrow {
    top: calc(3px + var(--kr-cw) / (var(--kr-ratio)) + var(--kr-cw) * var(--kr-floor-space) + 16px);
    width: 44px;
    height: 44px;
    transform: none;
  }
  html body#top.kmg-real-page .kr-arrow--prev { left: calc(50% - 54px); }
  html body#top.kmg-real-page .kr-arrow--next { right: calc(50% - 54px); }
}
@media (max-width: 1023px) and (max-height: 599px) and (orientation: landscape) and (pointer: coarse) {
  html body#top.kmg-real-page .kr-stage {
    --kr-ratio: 3 / 4;
    --kr-floor-space: .38;
    /* Keep the full-width scene in landscape; the taller section scrolls. */
  }
}
