/* Gallery wall — desktop styles (fonts: kt-fonts.css, chrome: kt-site-chrome.css) */
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; padding: 0; overflow-x: clip; }
html { background: #080604; }
body { background: transparent; }
.kt-zone-img-wrap,
.kt-zone-img-wrap--amani {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #080604 url("../images/gallery/011-dt-amani-stone-tile.webp") center / cover no-repeat;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.kt-bg-zone--amani-bronze .kt-bg-zone__content { position: relative; z-index: 1; }
.kt-bg-zone--amani-bronze :is(.kt-bg-zone__content, main, .kt-gw-zone) { background: transparent; }

/* Gallery media is presentation, never a draggable interaction surface. */
.kt-gallery-wall img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  pointer-events: none;
}

/* ===== GALLERY WALL ===== */
/* Desktop-fluid scaling layer:
   Values are tuned around the original 1440px desktop canvas, with lower and upper rails
   so the gallery, media, spacing, panels, captions and typography scale together across desktop monitors. */
.kt-bg-zone--amani-bronze .kt-gallery-wall { margin-top: 0; position: relative; isolation: isolate; }

.kt-gallery-wall {
  --kt-gw-opener-rail: clamp(980px, 78vw, 1440px);
  --amani-rail-pad: clamp(56px, 8.9vw, 156px);
  --kt-gw-gap: clamp(4px, 0.42vw, 8px);
  --kt-gw-stack-gap: clamp(96px, 9.7vw, 170px);
  --kt-gw-cluster-tall: clamp(780px, 66.4vw, 1120px);
  --kt-gw-cols-3-balanced: 1fr 0.54fr 1fr;
  --mdl-rail: clamp(980px, 86vw, 1360px);
  --mdl-gallery-offset: clamp(150px, 15.3vw, 260px);
  --kt-gw-ui: 214 164 91;
  --kt-gw-gold-title: 224 177 105;
  --kt-gw-bronze-frame: rgb(var(--kt-gw-ui) / 0.14);
  --kt-gw-bronze-border: rgb(var(--kt-gw-ui) / 0.16);
  --kt-gw-bronze-glow: rgb(var(--kt-gw-ui) / 0.18);
  --kt-gw-edge-rule: linear-gradient(90deg, transparent, rgb(var(--kt-gw-ui) / 0.75), transparent);
  --kt-gw-frame-shadow: 0 40px 120px rgb(0 0 0 / 0.58), inset 0 1px 0 rgb(255 255 255 / 0.04);
  --kt-gw-media-bg: #0b0907;
  --kt-gw-img-filter: contrast(1.06) saturate(0.94) brightness(1);
  --kt-gw-text-title: rgb(var(--kt-gw-gold-title) / 0.96);
  --kt-gw-text-kicker: rgb(var(--kt-gw-ui) / 0.72);
  --kt-gw-text-body: rgb(245 235 216 / 0.86);
  --kt-gw-text-body-muted: rgb(245 235 216 / 0.64);
  --kt-gw-accent: rgb(224 163 83 / 0.92);
  --kt-gw-accent-hover: rgb(246 207 142 / 0.98);
  --kt-gw-highlight: rgb(245 204 135 / 0.94);
  --kt-gw-plaque-border: #4a2712;
  --kt-gw-panel-bg: linear-gradient(180deg, rgb(255 255 255 / 0.055), transparent 28%),
    radial-gradient(circle at 50% 0%, var(--kt-gw-bronze-border), transparent 36%),
    linear-gradient(180deg, rgb(46 28 16 / 0.92), rgb(18 14 10 / 0.98));
  --kt-gw-panel-overlay: linear-gradient(90deg, var(--kt-gw-bronze-border), transparent 18%, transparent 82%, rgb(var(--kt-gw-ui) / 0.11)),
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.025) 0, rgb(255 255 255 / 0.025) 1px, transparent 1px, transparent 38px);
  --kt-gw-rule: linear-gradient(90deg, transparent, var(--kt-gw-text-kicker), transparent);
  --kt-gw-reveal-duration: 2600ms;
  --kt-gw-reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --kt-gw-hero-vignette: radial-gradient(ellipse at 13% 13%, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.12) 28%, rgba(0, 0, 0, 0.1) 50%, transparent 68%);
  --kt-gw-fs-kicker: clamp(10px, 0.76vw, 12px);
  --kt-gw-fs-title: clamp(31px, 2.78vw, 44px);
  --kt-gw-fs-body: clamp(15px, 1.18vw, 18px);
  --kt-gw-fs-credit: clamp(12.5px, 0.97vw, 15px);
  --kt-gw-letter-kicker: clamp(0.18em, 0.22vw, 0.24em);
  --kt-gw-letter-credit: clamp(0.16em, 0.2vw, 0.23em);
  --kt-gw-rule-gap-top: clamp(18px, 1.53vw, 26px);
  --kt-gw-rule-gap-bottom: clamp(18px, 1.67vw, 28px);
  /* opening */
  .kt-gallery-wall-opening {
    width: min(var(--kt-gw-opener-rail), calc(100% - var(--amani-rail-pad)));
    max-width: none;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    isolation: isolate;
    padding-top: clamp(64px, 7vw, 108px);
    padding-bottom: 0;
    + .kt-gw-zone { margin-top: var(--kt-gw-stack-gap); }
    .kt-gallery-opener-card { width: 100%; max-width: none; margin: 0; padding: 0; display: block; }
    .kt-gallery-opener-card img { display: block; width: 100%; height: auto; }
    .mdl-gallery {
      width: min(var(--mdl-rail), calc(100% - var(--amani-rail-pad)));
      max-width: none;
      margin: var(--mdl-gallery-offset) auto 0;
    }
    .mdl-gallery--editorial {
      width: 100vw;
      max-width: 100vw;
      margin-left: calc(50% - 50vw);
      margin-right: 0;
    }
    .mdl-editorial-shell { width: 100%; max-width: none; margin-inline: 0; }
  }

  .mdl-gallery--editorial {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: 0;
  }

  .mdl-editorial-shell {
    width: min(var(--mdl-rail), calc(100% - var(--amani-rail-pad)));
    margin-inline: auto;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.52fr);
    gap: 6px;
    align-items: stretch;
    padding: 6px;
    background: var(--kt-gw-bronze-frame);
  }

  .mdl-gallery--editorial .mdl-editorial-shell {
    width: 100%;
  }

  .mdl-editorial-hero {
    position: relative;
    min-height: 0;
  }

  .mdl-editorial-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(
      ellipse at center,
      transparent 38%,
      rgba(0, 0, 0, 0.1) 68%,
      rgba(0, 0, 0, 0.46) 100%
    ),
      radial-gradient(circle at 0 0, rgba(0, 0, 0, 0.26), transparent 19%),
      radial-gradient(circle at 100% 0, rgba(0, 0, 0, 0.16), transparent 89%),
      radial-gradient(circle at 0 100%, rgba(0, 0, 0, 0.2), transparent 18%),
      radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.22), transparent 21%);
  }

  .mdl-editorial-hero img,
  .mdl-hero img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 1080 / 852;
    object-fit: cover;
  }

  .mdl-editorial-card {
    min-height: 0;
    display: flex;
  }

  .mdl-editorial-card-inner.kt-gw-panel-inner {
    align-items: stretch;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: clamp(18px, 1.8vw, 28px) clamp(18px, 1.67vw, 30px);
    gap: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    .kt-gw-body {
      max-width: 36ch;
      margin-inline: auto;
      line-height: 1.62;
    }
    .kt-gw-rule {
      margin: clamp(15px, 1.25vw, 22px) auto clamp(17px, 1.4vw, 25px);
    }
  }

  .mdl-editorial-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(4px, 0.42vw, 8px);
    margin-top: clamp(18px, 2vw, 34px);
  }

  .mdl-step {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 0.88;
    overflow: hidden;
    background: var(--kt-gw-media-bg);
    img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }
  }

  .mdl-editorial-progress-note {
    margin: clamp(13px, 1.1vw, 18px) 0 0;
    color: rgb(245 235 216 / 0.72);
    font-size: clamp(17.5px, 0.96vw, 19px);
    line-height: 1.35;
    text-align: center;
  }

  /* shell */
  .kt-gw-zone {
    position: relative;
    display: grid;
    isolation: isolate;
    z-index: 1;
    .kt-gw-zone-content { grid-area: 1 / 1; position: relative; z-index: 1; }
  }

  .kt-museum-gallery { width: 100%; max-width: none; margin-inline: auto; img { display: block; max-width: 100%; } }
  .kt-gallery-stack { display: flex; flex-direction: column; gap: var(--kt-gw-stack-gap); }

  /* Keep responsive picture wrappers dimensionally identical to the images
     they replace, so mobile sources cannot alter the desktop layouts. */
  picture.kt-gallery-responsive-image {
    display: block;
    width: 100%;
    height: 100%;
    filter: none;
  }

  /* shared components */
  .kt-gw-cluster {
    position: relative;
    isolation: isolate;
    width: 100%;
    margin-inline: auto;
    font-family: var(--font-sans);
    color: var(--kt-gw-text-body);

    &::before {
      content: "";
      position: absolute;
      inset: clamp(-22px, -1.25vw, -14px);
      z-index: -2;
      background: linear-gradient(90deg, transparent, var(--kt-gw-bronze-glow), transparent),
        radial-gradient(circle at 34% 10%, var(--kt-gw-bronze-glow), transparent 34%),
        radial-gradient(circle at 75% 70%, rgba(255, 255, 255, 0.05), transparent 36%);
      filter: blur(clamp(16px, 1.4vw, 24px));
      opacity: 0.75;
      pointer-events: none;
    }

    &::after { z-index: -1; }

    .kt-gw-grid {
      grid-template-columns: var(--kt-gw-cols);
      grid-template-rows: var(--kt-gw-rows);
      min-height: var(--kt-gw-min-h);
    }

    .kt-gw-media { min-height: var(--kt-gw-media-min-h); }
    :is(.kt-gw-cell-panel, .kt-gw-panel) { min-height: var(--kt-gw-panel-min-h); }
  }

  /* bronze ring — clusters (::after), frames & galleries (::before) */
  .kt-gw-cluster::after,
  :is(.mdl-editorial-shell, .kt-mitre-detailing .kt-md-gallery)::before {
    content: "";
    position: absolute;
    inset: -1px;
    border: 1px solid var(--kt-gw-bronze-border);
    pointer-events: none;
  }

  .kt-gw-frame { box-shadow: var(--kt-gw-frame-shadow); }

  :is(.kt-gw-shell, .kt-gw-grid) { padding: var(--kt-gw-gap); background: var(--kt-gw-bronze-frame); }
  .kt-gw-grid { display: grid; gap: var(--kt-gw-gap); }

  .kt-gw-cell-hero { grid-column: 1 / 4; grid-row: 1; }
  .kt-gw-cell-left { grid-column: 1; grid-row: 2; }
  .kt-gw-cell-panel { grid-column: 2; grid-row: 2; }
  .kt-gw-cell-right { grid-column: 3; grid-row: 2; }
  .kt-gw-hero-reveal {
    &::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 2;
      opacity: 0;
      pointer-events: none;
      background: var(--kt-gw-hero-vignette);
      transition: opacity var(--kt-gw-reveal-duration) var(--kt-gw-reveal-ease);
    }
    &:hover::before { opacity: 1; }
  }

  .kt-gw-media {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: var(--kt-gw-media-bg);
    aspect-ratio: var(--kt-gw-media-aspect, auto);
    align-self: var(--kt-gw-media-align, stretch);
    :is(img, picture) {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: var(--kt-gw-img-position, center);
      filter: var(--kt-gw-img-filter);
    }
  }

  .kt-gw-edge::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    z-index: 3;
    background: var(--kt-gw-edge-rule);
    opacity: 0.55;
    pointer-events: none;
  }

  .kt-gw-panel {
    position: relative;
    overflow: hidden;
    background: var(--kt-gw-panel-bg);
    &::before {
      content: "";
      position: absolute;
      inset: 0;
      background: var(--kt-gw-panel-overlay);
      opacity: 0.42;
      pointer-events: none;
    }
  }

  .kt-gw-panel-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    padding: clamp(30px, 2.64vw, 46px) clamp(22px, 1.94vw, 34px);
  }

  /* typography */
  .kt-gw-kicker {
    margin: 0 0 clamp(12px, 1.11vw, 18px);
    font-size: var(--kt-gw-fs-kicker);
    line-height: 1;
    letter-spacing: var(--kt-gw-letter-kicker);
    text-transform: uppercase;
    color: var(--kt-gw-text-kicker);
  }

  .kt-gw-title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: var(--kt-gw-fs-title);
    line-height: 0.94;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--kt-gw-text-title);
  }

  .kt-gw-credit {
    width: 100%;
    margin-top: clamp(6px, 0.56vw, 10px);
    border-top: 1px solid var(--kt-gw-bronze-frame);
    :is(p, span) {
      display: block;
      margin-bottom: clamp(6px, 0.56vw, 10px);
      font-size: var(--kt-gw-fs-credit);
      line-height: 1.35;
      letter-spacing: var(--kt-gw-letter-credit);
      text-transform: uppercase;
      color: var(--kt-gw-text-body-muted);
    }
    a {
      display: inline-block;
      color: var(--kt-gw-accent);
      font-size: var(--kt-gw-fs-credit);
      line-height: 1;
      font-weight: 700;
      letter-spacing: var(--kt-gw-letter-kicker);
      text-transform: uppercase;
      text-decoration: none;
      transition: color 450ms ease, text-shadow 450ms ease;
      &:hover { color: var(--kt-gw-accent-hover); }
    }
  }

  .kt-gw-rule {
    flex-shrink: 0;
    width: 72%;
    min-height: 1px;
    height: 1px;
    margin: var(--kt-gw-rule-gap-top) 0 var(--kt-gw-rule-gap-bottom);
    background: var(--kt-gw-rule);
  }

  .kt-gw-body {
    margin: 0;
    max-width: 32ch;
    font-family: var(--font-sans);
    font-size: var(--kt-gw-fs-body);
    line-height: 1.55;
    letter-spacing: 0.015em;
    color: var(--kt-gw-text-body);
    + .kt-gw-body { margin-top: clamp(12px, 1.04vw, 18px); color: var(--kt-gw-text-body-muted); }
  }

  .kt-gw-credit--attribution {
    font-size: var(--kt-gw-fs-credit);
    line-height: 1.45;
    letter-spacing: clamp(0.1em, 0.12vw, 0.14em);
    text-transform: uppercase;
    font-weight: 500;
    color: rgb(var(--kt-gw-ui) / 0.64);
    margin: clamp(18px, 1.67vw, 28px) 0 0;
    a {
      color: rgb(var(--kt-gw-ui) / 0.7);
      text-decoration: none;
      transition: color 400ms ease;
      &:hover { color: var(--kt-gw-highlight); }
    }
  }

  /* large format + onyx */
  :is(.ktx-large-format-cluster, .ktx-onyx-standalone-cluster, .gpx-geometric-pool-spa) { max-width: none; }
  :is(.ktx-large-format-cluster, .ktx-onyx-standalone-cluster) {
    --kt-gw-panel-min-h: clamp(430px, 36.1vw, 610px);
  }

  .ktx-large-format-cluster {
    --kt-gw-cols:
      minmax(0, 1.1fr)
      minmax(0, 0.48fr)
      minmax(0, 0.72fr);
    --kt-gw-rows: calc(100svh - clamp(32px, 3vw, 56px));
    --kt-gw-min-h: 0;
    --kt-gw-media-min-h: 0;
    --kt-gw-panel-min-h: 0;
    --kt-gw-large-panel-img-h: calc(100cqw * 980 / 929);
    --kt-gw-large-panel-img-drop: clamp(18px, 1.5vw, 28px);

    > .kt-gw-grid > :is(.kt-gw-media, .kt-gw-panel) {
      min-width: 0;
      width: 100%;
      max-width: 100%;
    }

    .kt-gw-media {
      aspect-ratio: auto;
      align-self: stretch;
    }

    .kt-gw-panel {
      container-type: inline-size;
      width: 100%;
    }

    .kt-gw-panel-inner {
      padding-bottom: calc(
        var(--kt-gw-large-panel-img-h)
        - var(--kt-gw-large-panel-img-drop)
        + clamp(30px, 2.64vw, 46px)
      );
    }

    .kt-gw-panel-img-crop {
      position: absolute;
      left: 0;
      right: 0;
      bottom: calc(-1 * var(--kt-gw-large-panel-img-drop));
      height: auto;
      aspect-ratio: 929 / 980;
      overflow: hidden;
    }

    .kt-gw-panel-img {
      display: block;
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: auto;
      aspect-ratio: 929 / 1400;
      object-fit: cover;
      filter: var(--kt-gw-img-filter);
    }
  }

  .ktx-onyx-standalone-cluster {
    --kt-gw-cols: 0.46fr 0.78fr 0.40fr 0.66fr 0.12fr;
    --ktx-onyx-bottom-cols: 0.56fr 1.1fr 0.9fr;
    --kt-gw-min-h: clamp(540px, 45vw, 780px);
    --kt-gw-media-min-h: clamp(540px, 45vw, 780px);
    --kt-gw-rows: clamp(540px, 45vw, 780px) clamp(560px, 46vw, 820px);

    .ktx-onyx-primary-media {
      grid-column: 1 / 3;
      grid-row: 1;
    }

    .ktx-onyx-main-panel {
      grid-column: 3;
      grid-row: 1;
    }

    .ktx-onyx-detail-media {
      grid-column: 4 / 6;
      grid-row: 1;
    }

    .ktx-onyx-bottom-row {
      display: grid;
      grid-column: 1 / -1;
      grid-row: 2;
      grid-template-columns: var(--ktx-onyx-bottom-cols);
      gap: var(--kt-gw-gap);
      min-height: 0;
    }

    .ktx-onyx-bottom-row > :is(.ktx-onyx-template-panel, .ktx-onyx-second-row-left, .ktx-onyx-second-row-right) {
      min-height: 0;
    }

    .ktx-onyx-template-panel {
      grid-column: 1;
      grid-row: 1;
    }

    .ktx-onyx-second-row-left {
      grid-column: 3;
      grid-row: 1;
    }

    .ktx-onyx-second-row-right {
      grid-column: 2;
      grid-row: 1;
    }
  }

  /* stone pool + geometric pool — shared tall min-height */
  :is(.spx-stone-pool-variations, .gpx-geometric-pool-spa) { --kt-gw-min-h: var(--kt-gw-cluster-tall); }

  .spx-stone-pool-variations {
    --kt-gw-cols: 50fr 50fr;
    --kt-gw-rows: clamp(650px, 54vw, 930px) clamp(435px, 36.9vw, 640px);
    --kt-gw-media-min-h: clamp(435px, 36.9vw, 640px);
    --kt-gw-panel-min-h: clamp(390px, 33.1vw, 570px);
    .kt-gw-cell-panel {
      grid-column: 1 / 4;
      grid-row: 1;
      align-self: end;
      z-index: 6;
      min-height: 0;
      background: linear-gradient(180deg, rgb(46 28 16), rgb(18 14 10));
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }
    .kt-gw-panel-inner {
      display: grid;
      grid-template-columns: minmax(190px, max-content) 1px minmax(0, 1fr) minmax(210px, 0.48fr);
      grid-template-areas:
        "kicker rule body-one credit"
        "title rule body-two credit";
      column-gap: clamp(18px, 2.8vw, 46px);
      row-gap: clamp(7px, 0.7vw, 11px);
      align-items: center;
      height: auto;
      padding: clamp(18px, 1.7vw, 28px) clamp(32px, 4.4vw, 72px);
      text-align: left;
    }
    .kt-gw-kicker { grid-area: kicker; margin: 0; }
    .kt-gw-title { grid-area: title; }
    .kt-gw-rule {
      grid-area: rule;
      width: 1px;
      height: 100%;
      min-height: clamp(74px, 6.8vw, 110px);
      margin: 0;
      background: linear-gradient(180deg, transparent, var(--kt-gw-text-kicker), transparent);
    }
    .kt-gw-body {
      margin: 0;
      max-width: none;
      line-height: 1.42;
    }
    .kt-gw-body:nth-of-type(2) { grid-area: body-one; }
    .kt-gw-body:nth-of-type(3) { grid-area: body-two; }
    .kt-gw-body + .kt-gw-body { margin-top: 0; }
    .kt-gw-credit {
      grid-area: credit;
      align-self: center;
      margin-top: 0;
      padding-top: 0;
      border-top: 0;
      text-align: center;
    }
    .kt-gw-cell-left { grid-column: 1; grid-row: 2; }
    .kt-gw-cell-right { grid-column: 2; grid-row: 2; }
    .kt-gw-body { max-width: none; }
  }

  /* mosaics */
  .ktmx-study {
    --ktmx-top-rows: clamp(370px, 30.5vw, 520px);
    --ktmx-top-cols: minmax(0, 2fr) minmax(0, 0.9fr);
    --ktmx-bottom-cols: minmax(clamp(170px, 14.6vw, 245px), clamp(230px, 19.8vw, 330px)) minmax(clamp(170px, 14.6vw, 245px), clamp(205px, 17.7vw, 300px)) minmax(0, 1fr);
    --ktmx-bottom-rows: clamp(400px, 34vw, 565px) clamp(360px, 30.6vw, 510px);
    --ktmx-panel-pad: clamp(30px, 2.64vw, 46px) clamp(20px, 1.8vw, 32px);
    --ktmx-inset-shadow: inset 0 0 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.045);

    display: grid;
    grid-template-rows: auto auto;
    gap: var(--kt-gw-gap);

    .ktmx-media { isolation: isolate; border: 0; }
    .ktmx-curve {
      --kt-gw-img-position: right bottom;

      picture {
        position: absolute;
        inset: 0;
        display: block;
      }

      img {
        position: absolute;
        width: 106%;
        height: 106%;
        right: 0;
        bottom: 0;
        max-width: none;
        object-fit: cover;
        object-position: right bottom;
      }
    }
    :is(.ktmx-top, .ktmx-bottom) { display: grid; gap: var(--kt-gw-gap); }
    .ktmx-top {
      grid-template-columns: var(--ktmx-top-cols);
      grid-template-rows: var(--ktmx-top-rows);
    }
    .ktmx-bottom {
      grid-template-columns: var(--ktmx-bottom-cols);
      grid-template-rows: var(--ktmx-bottom-rows);
    }

    :is(.ktmx-top, .ktmx-bottom, .ktmx-under) > * {
      min-width: 0;
      width: 100%;
      max-width: 100%;
    }

    .ktmx-tall { grid-area: 1 / 1 / span 2 / 2; }
    .ktmx-blue { grid-area: 1 / 3; }
    .ktmx-under { grid-area: 2 / 2 / 3 / 4; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--kt-gw-gap); }
    @media (min-width: 901px) {
      .ktmx-tall {
        --kt-gw-img-position: left top;
      }

      .ktmx-under > .ktmx-media:nth-child(2) {
        --kt-gw-img-position: 8% center;
      }
    }
    .ktmx-under > .ktmx-media:nth-child(3) img { object-position: 62% center; }
    .ktmx-panel {
      grid-area: 1 / 2;
      min-height: 100%;
      padding: var(--ktmx-panel-pad);
      border: 0;
      box-shadow: var(--ktmx-inset-shadow);
      > * { position: relative; z-index: 2; }
    }
  }

  /* true circle */
  .tcx-true-circle {
    --kt-gw-cols: repeat(10, 1fr);
    --tcx-top-row-h: clamp(670px, 49vw, 960px);
    --kt-gw-rows: var(--tcx-top-row-h) clamp(445px, 37.5vw, 650px);
    --kt-gw-min-h: clamp(920px, 80vw, 1320px);
    --tcx-cell-min-h: clamp(340px, 29.2vw, 500px);
    --kt-gw-media-min-h: var(--tcx-cell-min-h);
    --kt-gw-panel-min-h: var(--tcx-cell-min-h);

    .tcx-hero {
      grid-area: 1 / 1 / 2 / 8;
      align-self: stretch;
      min-height: var(--tcx-top-row-h);

      :is(img, picture) {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 80%;
      }
    }
    .tcx-main-panel {
      grid-area: 1 / 8 / 2 / 11;
      --kt-gw-panel-min-h: var(--tcx-top-row-h);
      min-height: var(--tcx-top-row-h);
    }
    .tcx-panel-progress {
      --kt-gw-media-aspect: auto;
      --kt-gw-media-min-h: var(--tcx-top-row-h);
      --kt-gw-img-position: 38% center;
      min-height: var(--tcx-top-row-h);
      height: 100%;
      align-self: stretch;
    }
    .tcx-progress {
      grid-area: 2 / 1 / 3 / 5;
      --kt-gw-img-position: center 40%;
    }
    .tcx-bottom-panel {
      grid-area: 2 / 5 / 3 / 7;
      scroll-margin-top: clamp(96px, 9vw, 130px);
    }
    .tcx-spa { grid-area: 2 / 7 / 3 / 11; }
    .kt-gw-body strong { color: var(--kt-gw-highlight); font-weight: 600; }
  }

  /* moroccan + geometric pool — shared 3-col rhythm */
  :is(.mox-cluster, .gpx-geometric-pool-spa) { --kt-gw-cols: var(--kt-gw-cols-3-balanced); }

  .mox-cluster {
    --kt-gw-rows: clamp(460px, 38.9vw, 660px) clamp(395px, 33.3vw, 570px) clamp(410px, 34.7vw, 595px);
    .mox-media-top { grid-area: 1 / 1 / 2 / -1; }
    .mox-media-left { grid-area: 2 / 1; }
    .mox-panel { grid-area: 2 / 2; }
    .mox-media-right { grid-area: 2 / 3; }
    .mox-media-bottom { grid-area: 3 / 1 / 4 / -1; }
    .kt-gw-media { min-height: 100%; }
  }

  .gpx-geometric-pool-spa {
    --kt-gw-cols: 1fr 0.54fr 1fr;
    --kt-gw-rows: clamp(540px, 45.8vw, 790px) clamp(540px, 45.8vw, 790px);
    --kt-gw-media-min-h: clamp(540px, 45.8vw, 790px);
    --kt-gw-panel-min-h: clamp(540px, 45.8vw, 790px);
    .kt-gw-body { max-width: none; }
  }

  /* mitre detailing */
  .kt-mitre-detailing {
    --kt-md-cap-h: 100vh;
    --kt-md-half-h: calc((var(--kt-md-cap-h) - var(--kt-gw-gap)) / 2);
    --kt-md-h-wide: clamp(270px, 22.9vw, 390px);
    --kt-md-h-md: clamp(350px, 29.9vw, 510px);
    --kt-md-h-panel: clamp(390px, 33.3vw, 560px);
    --kt-md-h-grid-wide: clamp(380px, 31.5vw, 530px);
    --kt-md-h-tail-duo: clamp(440px, 36.5vw, 620px);
    --kt-md-h-tall: clamp(640px, 54.2vw, 900px);
    overflow: visible;
    padding: 0;
    figure { margin: 0; }

    .kt-md-shell { position: relative; z-index: 2; isolation: isolate; }

    :is(.kt-md-gallery, .kt-md-top, .kt-md-stack, .kt-md-mid, .kt-md-tail, .kt-md-tail-grid, .kt-md-two) {
      display: grid;
      gap: var(--kt-gw-gap);
    }

    .kt-md-top {
      grid-template-columns: 1.02fr 0.98fr;
      align-items: stretch;
      min-height: 0;
    }
    :is(.kt-md-top, .kt-md-stack) { height: var(--kt-md-cap-h); max-height: var(--kt-md-cap-h); }
    .kt-md-stack {
      grid-template-rows: var(--kt-md-half-h) var(--kt-md-half-h);
      min-height: 0;
    }
    .kt-md-mid { grid-template-columns: 1fr 0.6fr 1fr; }
    .kt-md-tail { grid-template-columns: 1.35fr 0.65fr; align-items: stretch; }
    .kt-md-tail-grid { grid-template-rows: var(--kt-md-h-grid-wide) auto; }
    .kt-md-two { grid-template-columns: 1fr 1fr; }

    :is(.kt-md-card, .kt-md-authority) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035); }

    .kt-md-card {
      aspect-ratio: unset;
      --kt-gw-media-aspect: unset;
      --kt-gw-media-align: stretch;
      height: min(var(--kt-md-h-md), var(--kt-md-cap-h));
      border: 0;
      outline: none;
      &.medium { height: min(var(--kt-md-h-panel), var(--kt-md-cap-h)); }
      &.wide { height: min(var(--kt-md-h-wide), var(--kt-md-cap-h)); }
      &.tall { height: min(var(--kt-md-h-tall), var(--kt-md-cap-h)); }
    }

    .kt-md-top > .kt-md-card.tall { height: var(--kt-md-cap-h); max-height: var(--kt-md-cap-h); }
    .kt-md-stack > .kt-md-card.medium { height: 100%; min-height: 0; max-height: none; }
    .kt-md-tail-grid > .kt-md-card.wide { height: var(--kt-md-h-grid-wide); }
    .kt-md-two > .kt-md-card.medium { height: min(var(--kt-md-h-tail-duo), var(--kt-md-cap-h)); }
    .kt-md-tail > .kt-md-card.tall {
      height: 100%;
      min-height: 0;
      align-self: stretch;
    }

    .kt-md-authority {
      display: flex;
      align-items: center;
      justify-content: center;
      height: min(var(--kt-md-h-panel), var(--kt-md-cap-h));
      padding: clamp(30px, 3.6vw, 58px);
      border: 0;
      &::after {
        content: "";
        position: absolute;
        left: 14%;
        right: 14%;
        bottom: 0;
        height: 1px;
        background: var(--kt-gw-rule);
        opacity: 0.7;
        pointer-events: none;
      }
    }

    .kt-md-authority-inner { max-width: clamp(330px, 27.1vw, 430px); }
    .kt-md-gallery { position: relative; }
  }

  /* final plaque */
  .kt-gallery-wall-final {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .kt-gallery-wall-final-plaque {
    width: 100%;
    margin: clamp(18px, 3vw, 34px) auto 0;
    position: relative;
    img { display: block; width: 100%; height: auto; }

    &::before,
    &::after {
      content: "";
      position: absolute;
      z-index: 2;
      pointer-events: none;
      border: clamp(1px, 0.14vw, 2px) solid var(--kt-gw-plaque-border);
      clip-path: polygon(clamp(12px, 1.11vw, 18px) 0, calc(100% - clamp(12px, 1.11vw, 18px)) 0, 100% clamp(12px, 1.11vw, 18px), 100% calc(100% - clamp(12px, 1.11vw, 18px)),
        calc(100% - clamp(12px, 1.11vw, 18px)) 100%, clamp(12px, 1.11vw, 18px) 100%, 0 calc(100% - clamp(12px, 1.11vw, 18px)), 0 clamp(12px, 1.11vw, 18px));
    }

    &::before { left: 10.05%; top: 9.78%; width: 79.78%; height: 52.92%; }
    &::after { left: 10.05%; top: 72.48%; width: 79.78%; height: 14.77%; }
  }

  .kt-gallery-wall-final-plaque__link {
    position: absolute;
    z-index: 4;
    left: 5.95%;
    top: 68.95%;
    width: 88.1%;
    height: 19.9%;
    display: block;
    cursor: pointer;
    &:focus-visible { outline: 2px solid var(--kt-gw-accent); outline-offset: 4px; }
  }

  .kt-gallery-wall-final__home {
    position: relative;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    /* Pull the link into the plaque asset's transparent lower gutter. */
    margin-top: clamp(-56px, -4vw, -28px);
    padding: 10px clamp(18px, 2vw, 30px);
    border-bottom: 1px solid rgb(var(--kt-gw-gold-title) / 0.54);
    font-family: var(--font-sans);
    font-size: clamp(11px, 0.82vw, 13px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.2em;
    text-align: center;
    text-transform: uppercase;
    color: var(--kt-gw-text-title);
    text-decoration: none;
    transition: color 180ms ease, border-color 180ms ease;

    &:hover {
      color: var(--kt-gw-accent-hover);
      border-color: var(--kt-gw-accent-hover);
    }

    &:focus-visible {
      outline: 2px solid var(--kt-gw-accent);
      outline-offset: 4px;
    }
  }
}

/* =============================================================================
   MOBILE ONLY — Gallery Wall
   Do not alter desktop rules above. Stone is pin-fixed; content scrolls over it.
   ============================================================================= */
@media (max-width: 900px) {
  /* Native viewport scrolling. `overflow-x: hidden` must not be used on the
     root or body here: paired with a visible y-axis it computes to `auto` and
     creates an extra scroll container, producing a grab before page movement. */
  html {
    background-color: #080604;
    background-image: none !important;
    height: auto;
    overflow-x: clip;
    overflow-y: visible;
    -webkit-text-size-adjust: 100%;
  }

  body {
    background: transparent !important;
    position: relative;
    height: auto;
    min-height: 100%;
    max-height: none;
    overflow-x: clip;
    overflow-y: visible;
    overscroll-behavior: auto;
    touch-action: auto;
  }

  body > main {
    position: relative;
    z-index: 1;
    height: auto;
    max-height: none;
    overflow: visible;
    touch-action: auto;
  }

  .kt-bg-zone--amani-bronze {
    position: relative;
    isolation: isolate;
    height: auto;
    max-height: none;
    overflow: visible;
    background: transparent;
  }

  /* Fixed stone — pointer-events none so it never steals the pan. */
  .kt-zone-img-wrap,
  .kt-zone-img-wrap--amani {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    z-index: 0 !important;
    width: 100% !important;
    /* Locked height set by JS; 100lvh fallback is the largest viewport unit. */
    height: var(--kt-gallery-app-h, 100lvh) !important;
    min-height: var(--kt-gallery-app-h, 100lvh) !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background-color: #080604 !important;
    background-image: url("../images/gallery/mobile/011-dt-amani-stone-tile.webp") !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
  }

  .kt-bg-zone__content {
    position: relative;
    z-index: 1;
    height: auto;
    max-height: none;
    overflow: visible;
    background: transparent;
    touch-action: auto;
  }

  .header {
    z-index: 9012;
    pointer-events: none;
  }

  .header-left,
  .header-right {
    pointer-events: auto;
  }

  /* --- Gallery shell / spacing --- */
  .kt-gallery-wall {
    --kt-gw-opener-rail: 100%;
    --amani-rail-pad: 0px;
    --kt-gw-gap: 4px;
    --kt-gw-stack-gap: 48px;
    --kt-gw-cluster-tall: auto;
    --mdl-rail: 100%;
    --mdl-gallery-offset: 28px;
    --kt-gw-cols: 1fr;
    --kt-gw-rows: none;
    --kt-gw-min-h: 0;
    --kt-gw-media-min-h: 0;
    --kt-gw-panel-min-h: 0;
    --kt-gw-media-aspect: auto;
    --kt-gw-fs-kicker: 14px;
    --kt-gw-fs-title: clamp(32px, 9vw, 40px);
    --kt-gw-fs-body: 20px;
    --kt-gw-fs-credit: 13px;
    --kt-gw-letter-kicker: 0.2em;
    --kt-gw-letter-credit: 0.16em;
    --kt-gw-rule-gap-top: 14px;
    --kt-gw-rule-gap-bottom: 14px;
    width: 100%;
    padding: 0 0 72px;
    overflow: visible;
  }

  .kt-gallery-wall .kt-gallery-wall-opening {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 72px 12px 0;
    box-shadow: none;
  }

  .kt-gallery-wall .kt-gallery-wall-opening + .kt-gw-zone {
    margin-top: 40px;
  }

  /*
    Mobile opener — portrait: real 1.42 zoom of the FULL plaque (no crop).
    Card is rail/1.42 wide; image scales 1.42 so visual width = gallery rail.
    object-fit: contain keeps every pixel of the webp; margins reserve the
    scaled footprint so nothing is clipped by the card or the next section.
  */
  .kt-gallery-wall .kt-gallery-opener-card {
    --kt-opener-zoom: 1;
    --kt-opener-rail: calc(100% - (2 * var(--kt-gw-gap)));
    display: block;
    width: var(--kt-opener-rail);
    max-width: none;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: visible !important;
    aspect-ratio: auto;
    background: transparent;
  }

  .kt-gallery-wall .kt-gallery-opener-card picture {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible !important;
  }

  .kt-gallery-wall .kt-gallery-opener-card img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: contain;
    object-position: center center;
  }

  @media (orientation: portrait) {
    .kt-gallery-wall .kt-gallery-wall-opening {
      padding-top: calc(
        var(--kt-header-height, 70px) + env(safe-area-inset-top, 0px) + 40px
      );
      overflow: visible !important;
    }

    .kt-gallery-wall .kt-gallery-opener-card {
      --kt-opener-zoom: 1.42;
      /* Base box smaller; after scale, visual = full rail width. */
      width: calc(var(--kt-opener-rail) / var(--kt-opener-zoom));
      overflow: visible !important;
      aspect-ratio: auto;
    }

    .kt-gallery-wall .kt-gallery-opener-card picture {
      width: 100%;
      height: auto;
      overflow: visible !important;
    }

    .kt-gallery-wall .kt-gallery-opener-card img {
      width: 100% !important;
      height: auto !important;
      max-width: none !important;
      object-fit: contain !important;
      object-position: center center !important;
      transform: scale(var(--kt-opener-zoom)) !important;
      transform-origin: center center !important;
      /*
        % margin is relative to card width. For a square plaque,
        (z-1)/2 * width top + bottom frees exactly the scaled height.
      */
      margin-top: calc((var(--kt-opener-zoom) - 1) / 2 * 100%) !important;
      margin-bottom: calc((var(--kt-opener-zoom) - 1) / 2 * 100%) !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
  }

  @media (orientation: landscape) {
    .kt-gallery-wall .kt-gallery-opener-card {
      --kt-opener-zoom: 1;
      width: var(--kt-opener-rail);
      aspect-ratio: auto;
    }

    .kt-gallery-wall .kt-gallery-opener-card picture {
      width: 100%;
      height: auto;
      transform: none;
    }

    .kt-gallery-wall .kt-gallery-opener-card img {
      width: 100% !important;
      height: auto !important;
      object-fit: contain !important;
      transform: none !important;
      margin: 0 !important;
    }
  }

  .kt-gallery-wall .kt-gw-zone {
    width: 100%;
    padding: 0 12px;
  }

  .kt-gallery-wall .kt-gallery-stack {
    gap: var(--kt-gw-stack-gap);
  }

  /* --- Universal single-column stack --- */
  .kt-gallery-wall .kt-gw-cluster {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  .kt-gallery-wall .kt-gw-cluster::before {
    inset: -10px;
    filter: blur(14px);
    opacity: 0.55;
  }

  .kt-gallery-wall :is(.kt-gw-shell, .kt-gw-grid) {
    padding: var(--kt-gw-gap);
  }

  .kt-gallery-wall .kt-gw-grid,
  .kt-gallery-wall .ktmx-top,
  .kt-gallery-wall .ktmx-bottom,
  .kt-gallery-wall .ktmx-under,
  .kt-gallery-wall .ktx-onyx-bottom-row,
  .kt-gallery-wall .kt-md-gallery,
  .kt-gallery-wall .kt-md-top,
  .kt-gallery-wall .kt-md-stack,
  .kt-gallery-wall .kt-md-mid,
  .kt-gallery-wall .kt-md-tail,
  .kt-gallery-wall .kt-md-tail-grid,
  .kt-gallery-wall .kt-md-two,
  .kt-gallery-wall .mdl-editorial-shell,
  .kt-gallery-wall .mdl-editorial-progress {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    grid-auto-rows: auto !important;
    gap: var(--kt-gw-gap) !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    width: 100% !important;
  }

  .kt-gallery-wall
    :is(
      .kt-gw-media,
      .kt-gw-panel,
      .kt-gw-cell-hero,
      .kt-gw-cell-left,
      .kt-gw-cell-panel,
      .kt-gw-cell-right,
      .ktx-onyx-primary-media,
      .ktx-onyx-main-panel,
      .ktx-onyx-detail-media,
      .ktx-onyx-template-panel,
      .ktx-onyx-second-row-left,
      .ktx-onyx-second-row-right,
      .ktx-onyx-bottom-row,
      .tcx-hero,
      .tcx-main-panel,
      .tcx-panel-progress,
      .tcx-progress,
      .tcx-bottom-panel,
      .tcx-spa,
      .mox-media-top,
      .mox-media-left,
      .mox-panel,
      .mox-media-right,
      .mox-media-bottom,
      .ktmx-tall,
      .ktmx-blue,
      .ktmx-under,
      .ktmx-panel,
      .ktmx-media,
      .kt-md-card,
      .kt-md-authority,
      .kt-md-stack,
      .kt-md-tail-grid,
      .kt-md-two,
      .mdl-editorial-hero,
      .mdl-editorial-card,
      .mdl-step
    ) {
    grid-column: auto !important;
    grid-row: auto !important;
    grid-area: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    align-self: stretch !important;
  }

  /* Media cells — frames and crops centered (kill desktop right-biased positions). */
  .kt-gallery-wall {
    --kt-gw-img-position: center center !important;
  }

  .kt-gallery-wall .kt-gw-media,
  .kt-gallery-wall .mdl-editorial-hero,
  .kt-gallery-wall .kt-md-card,
  .kt-gallery-wall .ktmx-media,
  .kt-gallery-wall .mdl-step,
  .kt-gallery-wall .kt-gw-panel-img-crop {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline: auto;
    justify-self: stretch;
  }

  .kt-gallery-wall .mdl-step {
    aspect-ratio: 1 / 0.92;
  }

  .kt-gallery-wall .kt-gw-media :is(img, picture),
  .kt-gallery-wall .mdl-editorial-hero img,
  .kt-gallery-wall .mdl-hero img,
  .kt-gallery-wall .kt-md-card img,
  .kt-gallery-wall .ktmx-media img,
  .kt-gallery-wall .ktmx-curve img,
  .kt-gallery-wall .mdl-step img,
  .kt-gallery-wall .kt-gw-panel-img,
  /* Exclude opener + end plaque — they must contain/scale, not cover-crop. */
  .kt-gallery-wall figure:not(.kt-gallery-opener-card):not(.kt-gallery-wall-final-plaque) img,
  .kt-gallery-wall figure:not(.kt-gallery-opener-card):not(.kt-gallery-wall-final-plaque) picture img {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    margin-inline: 0 !important;
    transform: none !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .kt-gallery-wall .ktmx-curve :is(img, picture),
  .kt-gallery-wall .ktmx-curve img {
    width: 100% !important;
    height: 100% !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    object-position: center center !important;
  }

  /* Opener wins over generic figure img rules — never cover-crop the plaque. */
  .kt-gallery-wall .kt-gallery-opener-card,
  .kt-gallery-wall .kt-gallery-opener-card picture {
    overflow: visible !important;
  }

  .kt-gallery-wall .kt-gallery-opener-card img {
    object-fit: contain !important;
    object-position: center center !important;
    max-width: none !important;
  }

  @media (orientation: portrait) {
    .kt-gallery-wall .kt-gallery-opener-card img {
      width: 100% !important;
      height: auto !important;
      transform: scale(1.42) !important;
      transform-origin: center center !important;
      margin-top: calc((1.42 - 1) / 2 * 100%) !important;
      margin-bottom: calc((1.42 - 1) / 2 * 100%) !important;
    }
  }

  /* Kill 100vw full-bleed side-shift (scrollbar / pad makes content look right-biased). */
  .kt-gallery-wall .mdl-gallery--editorial,
  .kt-gallery-wall .mdl-gallery,
  .kt-gallery-wall .mdl-editorial-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .kt-gallery-wall .kt-gw-zone,
  .kt-gallery-wall .kt-gallery-wall-opening,
  .kt-gallery-wall .kt-gw-cluster,
  .kt-gallery-wall .kt-gw-grid,
  .kt-gallery-wall .kt-gallery-stack,
  .kt-gallery-wall .kt-museum-gallery,
  .kt-gallery-wall .kt-method-gallery {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    /* Do NOT set overflow on these — nested overflow traps iOS touch pans. */
  }

  .kt-gallery-wall {
    overflow: visible;
  }

  /* Panels */
  .kt-gallery-wall .kt-gw-panel,
  .kt-gallery-wall .mdl-editorial-card,
  .kt-gallery-wall .kt-md-authority {
    display: flex;
    min-height: 0;
    height: auto;
  }

  .kt-gallery-wall .kt-gw-panel-inner,
  .kt-gallery-wall .mdl-editorial-card-inner,
  .kt-gallery-wall .kt-md-authority-inner {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 22px 18px;
    gap: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .kt-gallery-wall .kt-gw-body,
  .kt-gallery-wall .mdl-editorial-progress-note,
  .kt-gallery-wall .kt-gw-credit,
  .kt-gallery-wall .kt-gw-credit--attribution,
  .kt-gallery-wall .kt-gw-credit :is(p, span),
  .kt-gallery-wall .kt-md-authority-inner p {
    font-size: 20px !important;
    line-height: 1.55;
  }

  .kt-gallery-wall .kt-gw-body {
    max-width: 38ch;
    margin-inline: auto;
  }

  .kt-gallery-wall .kt-gw-body + .kt-gw-body {
    margin-top: 12px;
  }

  .kt-gallery-wall
    .ktx-onyx-standalone-cluster
    .kt-gw-credit--attribution {
    font-size: 16px !important;
  }

  .kt-gallery-wall .kt-gw-rule {
    width: min(160px, 55%);
    height: 1px;
    margin: var(--kt-gw-rule-gap-top) auto var(--kt-gw-rule-gap-bottom);
    background: var(--kt-gw-rule);
  }

  .kt-gallery-wall .kt-gw-credit {
    margin-top: 14px;
    text-align: center;
  }

  /* --- Opening medallion editorial --- */
  .kt-gallery-wall .mdl-gallery,
  .kt-gallery-wall .mdl-gallery--editorial {
    width: 100% !important;
    max-width: none !important;
    margin: 28px 0 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .kt-gallery-wall .mdl-editorial-shell {
    width: 100%;
    margin: 0 0 28px;
    padding: var(--kt-gw-gap);
  }

  .kt-gallery-wall .mdl-editorial-hero img,
  .kt-gallery-wall .mdl-hero img {
    aspect-ratio: 1080 / 852;
    height: auto;
  }

  .kt-gallery-wall .mdl-editorial-progress {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin-top: 18px;
  }

  .kt-gallery-wall .mdl-step {
    aspect-ratio: 1 / 0.92;
  }

  .kt-gallery-wall .mdl-editorial-progress-note {
    margin-top: 14px;
  }

  /* --- Large format: portrait frames (override generic 4/3 media) --- */
  .kt-gallery-wall .ktx-large-format-cluster {
    --kt-gw-media-aspect: 2565 / 3000;
    --kt-gw-large-panel-img-h: auto;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-media {
    aspect-ratio: 2565 / 3000 !important;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-media:last-of-type {
    aspect-ratio: 1500 / 2101 !important;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-panel {
    width: 100%;
    margin-left: 0;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-panel-inner {
    padding-bottom: 22px;
  }

  /* Middle LF image on the text block — slightly shorter, top of crop visible. */
  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-panel-img-crop {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 929 / 1100 !important;
    margin-top: 18px;
    overflow: hidden;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-panel-img {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center top !important;
  }

  /* --- Stone pool panel: stack copy instead of multi-column desktop strip --- */
  .kt-gallery-wall .spx-stone-pool-variations .kt-gw-panel-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 18px;
    column-gap: 0;
    row-gap: 0;
  }

  .kt-gallery-wall .spx-stone-pool-variations .kt-gw-rule {
    width: min(160px, 55%);
    height: 1px;
    min-height: 0;
    margin: 14px auto;
  }

  /* 042 pool glass mosaic spa bench — taller */
  .kt-gallery-wall .spx-stone-pool-variations .kt-gw-cell-right {
    aspect-ratio: 5 / 6 !important;
  }

  .kt-gallery-wall .spx-stone-pool-variations .kt-gw-cell-right img {
    object-fit: cover !important;
    object-position: center center !important;
  }

  /* --- Mosaic study --- */
  .kt-gallery-wall .ktmx-study {
    --ktmx-top-rows: none;
    --ktmx-bottom-rows: none;
    --ktmx-top-cols: 1fr;
    --ktmx-bottom-cols: 1fr;
    --ktmx-panel-pad: 22px 18px;
  }

  .kt-gallery-wall .ktmx-study .ktmx-under {
    grid-template-columns: 1fr !important;
  }

  .kt-gallery-wall .ktmx-study .ktmx-panel {
    padding: var(--ktmx-panel-pad);
    min-height: 0;
  }

  /* 043 bath curve — landscape frame so more of the mosaic bath is visible */
  .kt-gallery-wall .ktmx-study .ktmx-curve {
    aspect-ratio: 800 / 420 !important;
  }

  .kt-gallery-wall .ktmx-study .ktmx-curve :is(img, picture),
  .kt-gallery-wall .ktmx-study .ktmx-curve img {
    object-fit: cover !important;
    object-position: center center !important;
  }

  /* 044 floor glass mosaic — taller than default 4/3 */
  .kt-gallery-wall .ktmx-study .ktmx-floor {
    aspect-ratio: 1 / 1 !important;
  }

  /* 045 Bisazza shower wall + 046 blue vanity — hide on mobile only */
  .kt-gallery-wall .ktmx-study .ktmx-tall,
  .kt-gallery-wall .ktmx-study .ktmx-blue {
    display: none !important;
  }

  /* penny-round floor — taller portrait (1632×1920 native) */
  .kt-gallery-wall .ktmx-study .ktmx-under > .ktmx-media:nth-child(1) {
    aspect-ratio: 1632 / 1920 !important;
  }

  /* 048 herringbone floor — taller portrait */
  .kt-gallery-wall .ktmx-study .ktmx-under > .ktmx-media:nth-child(3) {
    aspect-ratio: 2 / 3 !important;
  }

  .kt-gallery-wall .ktmx-study .ktmx-floor img,
  .kt-gallery-wall .ktmx-study .ktmx-under > .ktmx-media:nth-child(1) img,
  .kt-gallery-wall .ktmx-study .ktmx-under > .ktmx-media:nth-child(3) img {
    object-fit: cover !important;
    object-position: center center !important;
  }

  /* 050 onyx mirror + tapware — taller portrait (800×840 native, pushed taller) */
  .kt-gallery-wall .ktx-onyx-standalone-cluster .ktx-onyx-detail-media {
    aspect-ratio: 3 / 4 !important;
  }

  .kt-gallery-wall .ktx-onyx-standalone-cluster .ktx-onyx-detail-media img {
    object-fit: cover !important;
    object-position: center center !important;
  }

  /* Onyx bottom-row shower + templating — portrait (1050×1400 / 1023×1400) */
  .kt-gallery-wall .ktx-onyx-standalone-cluster .ktx-onyx-second-row-left {
    aspect-ratio: 1050 / 1400 !important;
  }

  .kt-gallery-wall .ktx-onyx-standalone-cluster .ktx-onyx-second-row-right {
    aspect-ratio: 1023 / 1400 !important;
  }

  .kt-gallery-wall
    .ktx-onyx-standalone-cluster
    :is(.ktx-onyx-second-row-left, .ktx-onyx-second-row-right)
    img {
    object-fit: cover !important;
    object-position: center center !important;
  }

  /* --- True circle --- */
  .kt-gallery-wall .tcx-true-circle {
    --tcx-top-row-h: auto;
    --tcx-cell-min-h: 0;
    --kt-gw-min-h: 0;
  }

  .kt-gallery-wall .tcx-true-circle .tcx-hero,
  .kt-gallery-wall .tcx-true-circle .tcx-main-panel,
  .kt-gallery-wall .tcx-true-circle .tcx-panel-progress {
    min-height: 0 !important;
    height: auto !important;
  }

  /* 057 patio pool — taller */
  .kt-gallery-wall .tcx-true-circle .tcx-hero {
    aspect-ratio: 5 / 6 !important;
  }

  /* 059 Spanish mosaic spa — taller portrait (1028×1428 native) */
  .kt-gallery-wall .tcx-true-circle .tcx-progress {
    aspect-ratio: 1028 / 1428 !important;
  }

  .kt-gallery-wall .tcx-true-circle .tcx-hero img,
  .kt-gallery-wall .tcx-true-circle .tcx-progress img,
  .kt-gallery-wall .tcx-true-circle .tcx-spa img {
    object-fit: cover !important;
    object-position: center center !important;
  }

  /* 058 Spanish glass mosaic spa — slightly shorter so spa sides aren’t clipped */
  .kt-gallery-wall .tcx-true-circle .tcx-spa {
    aspect-ratio: 1 / 1 !important;
  }

  .kt-gallery-wall .tcx-true-circle .tcx-bottom-panel {
    scroll-margin-top: 88px;
  }

  /* 052 natural stone floating vanity — hide on mobile only */
  .kt-gallery-wall .mox-cluster .mox-media-right {
    display: none !important;
  }

  /* Geometric pool — 061 hero + 063 curved radius + 064 spa taller */
  .kt-gallery-wall .gpx-geometric-pool-spa .kt-gw-cell-hero {
    aspect-ratio: 5 / 4 !important;
  }

  .kt-gallery-wall .gpx-geometric-pool-spa .kt-gw-cell-left {
    aspect-ratio: 4 / 5 !important;
  }

  .kt-gallery-wall .gpx-geometric-pool-spa .kt-gw-cell-right {
    aspect-ratio: 4 / 5 !important;
  }

  .kt-gallery-wall
    .gpx-geometric-pool-spa
    :is(.kt-gw-cell-hero, .kt-gw-cell-left, .kt-gw-cell-right)
    img {
    object-fit: cover !important;
    object-position: center center !important;
  }

  /* Mitre imgs removed on mobile only */
  .kt-gallery-wall
    .kt-mitre-detailing
    figure:has(img[src*="065-dt-mitre01-recessed-shower-niche"]),
  .kt-gallery-wall
    .kt-mitre-detailing
    figure:has(
      img[src*="066-dt-mitre05-floating-shower-divider-wall"]
    ),
  .kt-gallery-wall
    .kt-mitre-detailing
    figure:has(
      img[src*="067-dt-mitre02-floating-divider-wall"]
    ),
  .kt-gallery-wall
    .kt-mitre-detailing
    figure:has(
      img[src*="073-dt-mitre14-glazed-subway-tile"]
    ) {
    display: none !important;
  }

  /* 072 double recessed niches finger tile — portrait taller */
  .kt-gallery-wall
    .kt-mitre-detailing
    figure:has(
      img[src*="072-dt-mitre06-double-recessed-shower-niches"]
    ) {
    aspect-ratio: 3 / 5 !important;
  }

  /* 070 double recessed niches glazed ceramic — slightly taller */
  .kt-gallery-wall
    .kt-mitre-detailing
    figure:has(
      img[src*="070-dt-mitre09-double-recessed-shower-niches"]
    ) {
    aspect-ratio: 5 / 6 !important;
  }

  .kt-gallery-wall
    .kt-mitre-detailing
    figure:has(
      img[src*="072-dt-mitre06-double-recessed-shower-niches"]
    )
    img,
  .kt-gallery-wall
    .kt-mitre-detailing
    figure:has(
      img[src*="070-dt-mitre09-double-recessed-shower-niches"]
    )
    img {
    object-fit: cover !important;
    object-position: center center !important;
  }

  /* --- Mitre detailing --- */
  .kt-gallery-wall .kt-mitre-detailing {
    --kt-md-cap-h: auto;
    --kt-md-half-h: auto;
    --kt-md-h-wide: auto;
    --kt-md-h-md: auto;
    --kt-md-h-panel: auto;
    --kt-md-h-grid-wide: auto;
    --kt-md-h-tail-duo: auto;
    --kt-md-h-tall: auto;
  }

  .kt-gallery-wall .kt-mitre-detailing :is(.kt-md-top, .kt-md-stack) {
    height: auto !important;
    max-height: none !important;
  }

  .kt-gallery-wall .kt-mitre-detailing .kt-md-card,
  .kt-gallery-wall .kt-mitre-detailing .kt-md-authority {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    aspect-ratio: 4 / 3;
  }

  .kt-gallery-wall .kt-mitre-detailing .kt-md-authority {
    aspect-ratio: auto;
    padding: 28px 18px;
  }

  .kt-gallery-wall .kt-mitre-detailing .kt-md-authority-inner {
    max-width: none;
  }

  /* --- Final plaque / plark --- */
  .kt-gallery-wall .kt-gw-zone {
    padding-left: 0;
    padding-right: 0;
  }

  .kt-gallery-wall .kt-gw-zone-content {
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  .kt-gallery-wall .kt-gallery-stack {
    overflow: visible !important;
  }

  /*
    End plaque — excluded from generic figure cover-crop above.
    Portrait mobile art is crop-tight now; push it LARGE and centred.
  */
  .kt-gallery-wall figure.kt-gallery-wall-final-plaque {
    position: relative;
    display: block;
    width: calc(100% + 24px);
    max-width: none;
    margin: 20px 0 4px;
    margin-left: -12px;
    margin-right: -12px;
    overflow: visible !important;
    aspect-ratio: auto;
  }

  .kt-gallery-wall figure.kt-gallery-wall-final-plaque picture {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  .kt-gallery-wall figure.kt-gallery-wall-final-plaque img,
  .kt-gallery-wall figure.kt-gallery-wall-final-plaque picture img {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }

  /* Match the enquiry hotspot to the replacement mobile artwork's lower panel. */
  .kt-gallery-wall .kt-gallery-wall-final-plaque__link {
    left: 3%;
    top: 72%;
    width: 94%;
    height: 18%;
  }

  .kt-gallery-wall .kt-gallery-wall-final__home {
    width: max-content;
    max-width: calc(100% - 32px);
    min-height: 48px;
    margin-top: -4px;
    padding: 12px 18px;
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  /*
    Portrait: enquiry-mobile.webp is crop-tight now (dead padding removed).
    Full-bleed the content rail — plaque art fills the phone width.
    Centred; no 50vw breakout (that was shifting layout).
  */
  @media (orientation: portrait) {
    .kt-gallery-wall figure.kt-gallery-wall-final-plaque {
      width: calc(100% + 24px) !important;
      max-width: none !important;
      margin: 24px -12px 4px !important;
      overflow: visible !important;
    }

    .kt-gallery-wall figure.kt-gallery-wall-final-plaque picture {
      width: 100% !important;
      overflow: visible !important;
    }

    .kt-gallery-wall figure.kt-gallery-wall-final-plaque img,
    .kt-gallery-wall figure.kt-gallery-wall-final-plaque picture img {
      width: 100% !important;
      max-width: none !important;
      height: auto !important;
      margin: 0 auto !important;
      object-fit: contain !important;
      object-position: center center !important;
      transform: none !important;
    }

    .kt-gallery-wall .kt-gallery-wall-final-plaque__link {
      top: 76.8%;
      height: 22%;
    }

    .kt-gallery-wall .kt-gallery-wall-final__home {
      margin-top: -7px;
    }
  }

  /* Landscape phones have much less vertical room than portrait phones.
     Keep artwork at its existing aspect ratio, but give each main image a
     narrower centred rail so it does not dominate the short viewport. */
  @media (orientation: landscape) {
    /* Mobile landscape: completely remove every decorative backing layer
       behind the gallery clusters. */
    .kt-gallery-wall .kt-gw-cluster::before,
    .kt-gallery-wall .kt-gw-cluster::after,
    .kt-gallery-wall .mdl-editorial-shell::before,
    .kt-gallery-wall .kt-mitre-detailing .kt-md-gallery::before {
      content: none !important;
      display: none !important;
      background: none !important;
      border: 0 !important;
      filter: none !important;
    }

    .kt-gallery-wall .kt-gw-cluster .kt-gw-grid,
    .kt-gallery-wall .kt-gw-cluster .kt-gw-shell,
    .kt-gallery-wall .kt-gw-cluster .kt-gw-frame,
    .kt-gallery-wall .kt-mitre-detailing .kt-md-gallery,
    .kt-gallery-wall .mdl-editorial-shell {
      background: transparent !important;
      background-image: none !important;
      border: 0 !important;
      box-shadow: none !important;
    }

    /* The mosaic cluster is itself the shell/frame (not a descendant), so
       remove its own backing explicitly. */
    .kt-gallery-wall #ktmx-mosaics-immaculate.kt-gw-shell.kt-gw-frame {
      background: transparent !important;
      background-image: none !important;
      border: 0 !important;
      box-shadow: none !important;
    }

    /* The glow/ring lives on the cluster itself. Constrain this outer box so
       the light panel cannot remain full-width behind the narrower images. */
    .kt-gallery-wall .ktx-large-format-cluster {
      width: min(78vw, 640px) !important;
      max-width: min(78vw, 640px) !important;
      margin-inline: auto !important;
    }

    .kt-gallery-wall .ktx-large-format-cluster .kt-gw-grid {
      width: 100% !important;
      max-width: 100% !important;
      margin-inline: auto !important;
    }

    .kt-gallery-wall figure.kt-gw-media {
      width: min(78vw, 640px) !important;
      max-width: min(78vw, 640px) !important;
      margin-inline: auto !important;
      justify-self: center !important;
    }

    /* Text panels use the same landscape rail as gallery images. */
    .kt-gallery-wall .kt-gw-panel {
      width: min(78vw, 640px) !important;
      max-width: min(78vw, 640px) !important;
      margin-inline: auto !important;
      justify-self: center !important;
    }

    .kt-gallery-wall .ktx-large-format-cluster figure.kt-gw-media {
      width: 100% !important;
      max-width: 100% !important;
    }

    .kt-gallery-wall .ktx-large-format-cluster .kt-gw-panel {
      width: 100% !important;
      max-width: 100% !important;
    }

    /* Keep the centre large-format detail on the same rail as its two
       neighbouring images; its parent panel remains full width for copy. */
    .kt-gallery-wall .ktx-large-format-cluster .kt-gw-panel-img-crop {
      width: 100% !important;
      max-width: 100% !important;
      margin-inline: auto !important;
    }

    .kt-gallery-wall .kt-gallery-wall-final__home {
      max-width: min(78vw, 640px);
      margin-top: -2px;
    }
  }
}

/* =============================================================================
   TABLET LANDSCAPE ONLY — pin amani stone like desktop
   iOS Safari does not honour background-attachment:fixed on html, so the stone
   scrolls with the page. Use the same position:fixed layer as phone: pinned
   wall, content scrolls over it. min-width 901 leaves the phone sheet alone;
   min-height 501 keeps short phone-landscape viewports out of this band.
   ============================================================================= */
@media (orientation: landscape) and (min-width: 901px) and (max-width: 1366px) and (min-height: 501px) and (hover: none) and (pointer: coarse) {
  html {
    background-color: #080604;
    background-image: none !important;
  }

  body {
    background: transparent !important;
  }

  body > main {
    position: relative;
    z-index: 1;
  }

  .kt-bg-zone--amani-bronze {
    position: relative;
    isolation: isolate;
    overflow: visible;
    background: transparent;
  }

  /* Fixed stone — same pin model as phone / desktop intent. */
  .kt-zone-img-wrap,
  .kt-zone-img-wrap--amani {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    z-index: 0 !important;
    width: 100% !important;
    height: var(--kt-gallery-app-h, 100lvh) !important;
    min-height: var(--kt-gallery-app-h, 100lvh) !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background-color: #080604 !important;
    background-image: url("../images/gallery/011-dt-amani-stone-tile.webp") !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
  }

  .kt-bg-zone__content {
    position: relative;
    z-index: 1;
    background: transparent;
  }

  .header {
    z-index: 9012;
  }

  /* Hand-cut glass mosaic medallion — landscape touch tablets only. */
  .kt-gallery-wall
    .mdl-gallery--editorial
    .mdl-editorial-shell {
    min-height: clamp(540px, 43vw, 590px);
  }

  .kt-gallery-wall
    .mdl-gallery--editorial
    .mdl-editorial-hero,
  .kt-gallery-wall
    .mdl-gallery--editorial
    .mdl-editorial-hero
    picture,
  .kt-gallery-wall
    .mdl-gallery--editorial
    .mdl-editorial-hero
    img {
    height: 100%;
  }

  .kt-gallery-wall
    .mdl-gallery--editorial
    .mdl-editorial-hero
    img {
    aspect-ratio: auto;
    object-fit: cover;
  }

  /* Onyx Ensuite top row — give the centre copy panel more breathing room. */
  .kt-gallery-wall .ktx-onyx-standalone-cluster {
    --kt-gw-cols: 0.44fr 0.70fr 0.56fr 0.60fr 0.12fr;
  }

  /* A True Circle bottom row — widen the centre statement panel. */
  .kt-gallery-wall .tcx-true-circle {
    --kt-gw-cols: repeat(50, minmax(0, 1fr));
  }

  .kt-gallery-wall .tcx-true-circle .tcx-hero {
    grid-area: 1 / 1 / 2 / 36;
  }

  .kt-gallery-wall .tcx-true-circle .tcx-main-panel {
    grid-area: 1 / 36 / 2 / 51;
  }

  .kt-gallery-wall .tcx-true-circle .tcx-progress {
    grid-area: 2 / 1 / 3 / 19;
  }

  .kt-gallery-wall .tcx-true-circle .tcx-bottom-panel {
    grid-area: 2 / 19 / 3 / 33;
  }

  .kt-gallery-wall .tcx-true-circle .tcx-spa {
    grid-area: 2 / 33 / 3 / 51;
  }

  /* Geometric Pool & Spa — widen its centre statement panel. */
  .kt-gallery-wall .gpx-geometric-pool-spa {
    --kt-gw-cols: 1fr 0.60fr 1fr;
  }

  /*
    Large format cluster — tablet landscape only.
    Desktop aspect-ratio on .kt-gw-media + default min-width:auto lets the side
    figures size from row height and overflow their tracks, covering the centre
    panel. Keep a true 3-col rail: columns cap the width; the shared row is
    deliberately taller; both side images stretch and crop with object-fit.
  */
  .kt-gallery-wall .ktx-large-format-cluster {
    --kt-gw-cols: 1.05fr 0.58fr 0.78fr;
    /* Deliberately taller than the desktop-proportioned row on landscape tablets. */
    --kt-gw-rows: clamp(580px, 62vw, 840px);
    --kt-gw-min-h: 0;
    --kt-gw-media-min-h: 0;
    --kt-gw-panel-min-h: 0;
    --kt-gw-media-aspect: auto;
    --kt-gw-large-panel-img-h: auto;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-grid {
    align-items: stretch;
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-media,
  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-panel {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  /* Fill the taller shared row; crop the portrait image inside the frame. */
  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-media:first-of-type {
    aspect-ratio: auto;
    height: 100%;
    min-height: 0;
    align-self: stretch;
  }

  /* Right figure fills the row and crops — no width overflow via aspect-ratio. */
  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-media:last-of-type {
    aspect-ratio: auto;
    height: 100%;
    min-height: 0;
    align-self: stretch;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-media :is(img, picture) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-panel {
    margin-left: 0;
    height: auto;
    align-self: stretch;
    overflow: hidden;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-panel-inner {
    height: 100%;
    min-height: 0;
    /* Room for absolute bottom crop + readable type in a mid-width column. */
    padding: clamp(18px, 1.6vw, 28px) clamp(12px, 1.2vw, 20px);
    padding-bottom: calc(
      (100% * 980 / 929) + clamp(18px, 1.6vw, 28px)
    );
    justify-content: center;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-panel-img-crop {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 929 / 980;
    margin-top: 0;
    overflow: hidden;
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-panel-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 929 / 1400;
    object-fit: cover;
    object-position: center top;
  }

  /* Slightly tighter type so the mid column stays legible without clipping. */
  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-title {
    font-size: clamp(22px, 2.2vw, 32px);
  }

  .kt-gallery-wall .ktx-large-format-cluster .kt-gw-body {
    font-size: clamp(13px, 1.15vw, 15px);
    line-height: 1.45;
  }
}
