/* =========================================================
   HUNDEWETTER – „Kleiderschrank“ (kleiderschrank.html)
   Wird nach styles.css + clean.css geladen. Aufbau und Bewegung: schrank.js.

   Inhalt:
   1. Seite, Einleitung, Maße (Kopfzeile + Einleitung + Foto = ein Bildschirm)
   2. Fach-Reiter (Segment-Leiste über dem Foto)
   3. Bühne: das Foto als Schrank, Ebenen in Foto-Koordinaten (Licht, Wetter, Stangen-Streifen)
   4. Teile am Bügel + Preisschild
   5. Unter dem Foto: „Alle … im Shop“, Scroll-Hinweis
   6. Wetter
   7. Herausgenommenes Teil = Anprobe (Dialog mit Hundefoto, Farbe, Größe, In den Korb)
   7b. Türen (Foto-Ausschnitte, 3D um die äußeren Bänder)
   8. Handy
   9. Bewegung reduzieren

   Licht im Foto: LED-Leiste unter dem Oberboden (warm, von oben), Tageslicht vom Fenster rechts.
   Daraus folgt: Schatten der Teile auf der Rückwand weich, etwas nach unten und nach links.
   Foto-Geometrie (Maßstab, Versatz, Stange) rechnet schrank.js und legt sie als transform bzw. px-Variablen ab.
   Bewegt wird nur transform/opacity.
   ========================================================= */

/* ---------- 1. Seite, Einleitung, Maße ---------- */
.ks-body { background: var(--bg); }
.ks {
  --kopf: 66px;                         /* Einleitung */
  --reiter-h: 50px;                     /* Zeile mit den Fach-Reitern */
  --unten-h: 44px;                      /* Zeile unter dem Foto */
  --bh: clamp(330px, calc(100vh - var(--hdr) - var(--kopf) - var(--reiter-h) - var(--unten-h) - 6px), 900px);
  --bh: clamp(330px, calc(100svh - var(--hdr) - var(--kopf) - var(--reiter-h) - var(--unten-h) - 6px), 900px);
  --bw: min(100% - 2 * var(--gutter), var(--bh) * 1.55, 1400px);
  position: relative;
  overflow-x: clip;
  font-family: var(--sans); color: var(--ink);
}

.ks-intro {
  height: var(--kopf); padding: 0 var(--gutter);
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 3px;
}
.ks-intro__titel { font-family: var(--sans); font-weight: 400; font-size: clamp(24px, 2.1vw, 32px); line-height: 1.05; letter-spacing: -.02em; }
.ks-intro__text { font-size: 14px; line-height: 1.4; color: var(--muted); }

/* Kopfzeile: aktuelle Seite unterstrichen */
.ks-body .nav a[aria-current="page"]::after { transform: scaleX(1); }

.ks-noscript { max-width: 520px; margin: 40px auto; text-align: center; color: var(--muted); }
.ks-noscript a { color: var(--ink); text-decoration: underline; text-underline-offset: .3em; }
.ks-foot a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; transition: opacity .2s; }
.ks-foot a:hover { opacity: .6; }
.ks-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ---------- 2. Fach-Reiter: kleine Segment-Leiste direkt über dem Foto ---------- */
.ks-reiterzeile {
  height: var(--reiter-h); width: var(--bw); margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.ks-reiter {
  display: flex; align-items: center; gap: 2px; max-width: 100%;
  padding: 3px; border-radius: 999px; background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.ks-reiter::-webkit-scrollbar { display: none; }
.ks-reiter__knopf {
  flex: none; position: relative; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .01em; color: var(--muted); white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: color .25s, background-color .25s, box-shadow .25s;
}
.ks-reiter__knopf span { display: block; }
.ks-reiter__knopf:hover { color: var(--ink); }
.ks-reiter__knopf[aria-selected="true"] {
  color: var(--ink); background: #fff;
  box-shadow: 0 1px 2px rgba(27, 27, 27, .12), 0 0 0 1px rgba(27, 27, 27, .06);
}
.ks-reiter__knopf:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* ---------- 3. Bühne: das Foto ist der Schrank ---------- */
.ks-buehne { position: relative; z-index: 1; width: var(--bw); height: var(--bh); margin: 0 auto; }
.ks-schrank {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: 4px; background: #cfcdc9;
  -webkit-user-select: none; user-select: none;
}
/* ohne JS: Foto füllt die Bühne */
.ks-schrank > .ks-foto { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 49% 45%; }

/* Kamera: hält alle Ebenen; beim Heranzoomen bewegt schrank.js nur dieses eine Element (transform-Animation) */
.ks-kamera { position: absolute; inset: 0; z-index: 0; transform-origin: 0 0; }

/* Ebenen in Foto-Pixeln (1168 × 880): schrank.js setzt transform = translate(ox, oy) scale(s) */
.ks-ebene { position: absolute; left: 0; top: 0; width: 1168px; height: 880px; transform-origin: 0 0; pointer-events: none; }
.ks-ebene--hinten { z-index: 0; }
.ks-ebene--vorn { z-index: 2; }
.ks-ebene--licht { z-index: 4; }
.ks-ebene .ks-foto { position: absolute; left: 0; top: 0; width: 1168px; height: 880px; max-width: none; display: block; }

/* Licht an: zuerst ist die Öffnung gedämpft, dann geht die LED an und ein warmer Schein legt sich oben in den Schrank */
.ks-dunkel {
  position: absolute; left: 270px; top: 92px; width: 604px; height: 552px;
  background:
    linear-gradient(180deg, rgba(16, 16, 20, .62) 0, rgba(16, 16, 20, .46) 40%, rgba(16, 16, 20, .3) 100%);
  opacity: 0; transition: opacity .8s cubic-bezier(.3, 0, .2, 1);
}
.ks-schrank.is-dunkel .ks-dunkel { opacity: 1; transition: none; }
.ks-glut {
  position: absolute; left: 300px; top: 104px; width: 548px; height: 380px;
  background:
    radial-gradient(70% 34% at 50% 6%, rgba(255, 214, 150, .34), rgba(255, 214, 150, .1) 55%, rgba(255, 214, 150, 0) 100%),
    linear-gradient(180deg, rgba(255, 222, 170, .16) 0, rgba(255, 222, 170, 0) 40%);
  mix-blend-mode: soft-light;
  opacity: 0; transition: opacity .8s cubic-bezier(.3, 0, .2, 1) .05s;
}
.ks-schrank.is-licht .ks-glut { opacity: 1; }

/* Stange vor den Haken: ein 5,5 px schmaler Streifen genau dieses Fotos (untere Hälfte des Rohrs mit Glanzlinie) */
.ks-stangenstreifen {
  position: absolute; left: 297px; top: 153px; width: 548px; height: 5.6px;
  background: url("assets/schrank/schrank-foto.webp") -297px -153px / 1168px 880px no-repeat;
}

/* Untere Stange: Kopie genau des fotografierten Rohrs (y 150 … 158) und seiner Flanschplatten, 228 px tiefer
   (Mitte 382). Weiter weg von der LED → etwas dunkler. Schatten weich auf der Rückwand, leicht nach links unten. */
.ks-stange2, .ks-flansch2, .ks-stangenstreifen--unten {
  position: absolute;
  background-image: url("assets/schrank/schrank-foto.webp"); background-size: 1168px 880px; background-repeat: no-repeat;
  filter: brightness(.84) saturate(.9);
}
.ks-stange2 { left: 297px; top: 378px; width: 548px; height: 8px; background-position: -297px -150px; }
.ks-flansch2 {
  top: 372px; width: 11px; height: 20px;
  -webkit-mask: radial-gradient(closest-side, #000 70%, transparent); mask: radial-gradient(closest-side, #000 70%, transparent);
}
.ks-flansch2--l { left: 292px; background-position: -292px -144px; }
.ks-flansch2--r { left: 839px; background-position: -839px -144px; }
.ks-stange2-schatten {
  position: absolute; left: 300px; top: 389px; width: 542px; height: 9px; border-radius: 50%;
  background: rgba(30, 30, 36, .32); filter: blur(4px); transform: translateX(-3px);
}
.ks-stangenstreifen--unten { left: 297px; top: 381px; width: 548px; height: 5.6px; background-position: -297px -153px; }
/* untere Reihe: weiter weg vom Licht */
.ks-teil--unten .ks-teil__licht { background:
    linear-gradient(180deg, rgba(255, 226, 178, .08) 0, rgba(255, 226, 178, 0) 20%, rgba(58, 60, 68, .06) 45%, rgba(58, 60, 68, .24) 100%),
    linear-gradient(90deg, rgba(50, 52, 60, .1), rgba(50, 52, 60, 0) 45%, rgba(255, 250, 240, .06)); }

/* Teile-Ebene (Bildschirm-Pixel): schrank.js setzt left/top/width/height auf die Öffnung in Stangentiefe
   und --th (Höhe eines Teils), --ry/--rd (Stange), --hl/--hr (Hakenbereich). overflow: hidden = Teile
   verschwinden beim Fachwechsel hinter den Seitenwänden. */
.ks-raum {
  --th: 240px; --ry: 46px; --rd: 7px; --hl: 8px; --hr: 8px;
  position: absolute; z-index: 1; left: 0; top: 0; width: 0; height: 0; overflow: hidden;
}
.ks-raum--schilder { z-index: 3; pointer-events: none; }

/* ---------- 4. Teile am Bügel ---------- */
.ks-teile, .ks-schilder {
  position: absolute; height: 0;
  left: var(--hl); right: var(--hr);
  top: calc(var(--ry) - var(--th) * .0045);      /* Innenkante des Hakens liegt auf der Stange */
}
.ks-teile { z-index: 1; }
.ks-teil {
  position: absolute; left: 0; top: 0;
  height: calc(var(--th) * var(--ih, 1)); aspect-ratio: var(--iw, 4) / var(--ihh, 9);
  padding: 0; border: 0; background: none; color: inherit; cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  will-change: transform; backface-visibility: hidden;
  border-radius: 8px;
}
.ks-teil.is-weg, .ks-anh.is-weg { visibility: hidden; pointer-events: none; }
.ks-teil.is-zug { cursor: grabbing; }
.ks-teil.is-raus { visibility: hidden; }
.ks-teil:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .92); }
.ks-teil__bild {
  position: relative; z-index: 1;
  display: block; width: 100%; height: 100%; pointer-events: none;
  /* Studiofoto an das Zimmerlicht angleichen (etwas wärmer, minimal flacher und dunkler),
     dann zwei Schatten: weich auf der Rückwand (Licht oben + Fenster rechts → nach unten links) und eng am Stoff */
  filter:
    brightness(.95) contrast(.96) saturate(.92) sepia(.05)
    drop-shadow(calc(var(--th) * -.035) calc(var(--th) * .05) calc(var(--th) * .036) rgba(34, 34, 40, .42))
    drop-shadow(0 1px 2px rgba(30, 30, 34, .2));
}
/* Licht auf dem Teil: oben der warme Schein der LED, nach unten Abfall, links etwas weniger Tageslicht – auf die Form maskiert */
.ks-teil__licht {
  position: absolute; z-index: 2; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 226, 178, .2) 0, rgba(255, 226, 178, 0) 20%, rgba(58, 60, 68, 0) 45%, rgba(58, 60, 68, .2) 100%),
    linear-gradient(90deg, rgba(50, 52, 60, .1), rgba(50, 52, 60, 0) 45%, rgba(255, 250, 240, .06));
  -webkit-mask: var(--bild) 0 0 / 100% 100% no-repeat; mask: var(--bild) 0 0 / 100% 100% no-repeat;
}
/* Kontaktschatten: wo der Haken auf dem Rohr aufliegt */
.ks-teil__kontakt {
  position: absolute; z-index: 0; pointer-events: none;
  left: var(--hx, 50%); top: calc(var(--th) * .0045 + var(--rd) * .2);
  width: calc(var(--rd) * 3.4); height: calc(var(--rd) * 2.2);
  transform: translate(-56%, 0);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(22, 22, 26, .5), rgba(22, 22, 26, .18) 60%, rgba(22, 22, 26, 0));
}

/* Preisschild: Papier-Anhänger, mit einem Faden am Hakenstiel festgeknotet (unter der Stange) */
.ks-schilder { z-index: 2; pointer-events: none; }
.ks-anh {
  position: absolute; left: 0; top: 0; pointer-events: none;
  height: calc(var(--th) * var(--ih, 1)); aspect-ratio: var(--iw, 4) / var(--ihh, 9);
  will-change: transform;
}
.ks-anh.is-raus { visibility: hidden; }
.ks-etikett {
  --dy: 0px; --fl: 15.6px; --fw: -50deg;
  position: absolute; left: var(--hx, 50%); top: calc(var(--th) * var(--ih, 1) * .058); width: 0; height: 0;
  transform-origin: 0 0; transform: rotate(4deg);
  will-change: transform;
}
.ks-etikett--s1 { --dy: 40px; --fl: 51.6px; --fw: -13.1deg; }   /* Stufe = Schildhöhe + Luft, sonst überlappen tiefer gehängte Schilder */
.ks-etikett--s2 { --dy: 78px; --fl: 89.6px; --fw: -7.6deg; }
.ks-etikett--s3 { --dy: 116px; --fl: 127.6px; --fw: -5.4deg; }
.ks-etikett::before {
  content: ""; position: absolute; left: -2.5px; top: -2px; width: 5px; height: 4px; border-radius: 2px;
  background: #4a4640; box-shadow: 0 1px 1px rgba(20, 20, 24, .3);
}
.ks-etikett__faden {
  position: absolute; left: -.5px; top: 0; width: 1px; height: var(--fl);
  background: #4a4640; transform-origin: 50% 0; transform: rotate(var(--fw));
}
.ks-etikett--l .ks-etikett__faden { transform: rotate(calc(var(--fw) * -1)); }
.ks-etikett__blatt {
  position: absolute; left: 5px; top: calc(4px + var(--dy));
  display: block; padding: 6px 8px 5px 14px;
  text-align: left; white-space: nowrap;
  background: linear-gradient(172deg, #fffdf8, #ece9e2);
  border-radius: 2px;
  /* gleiches Licht wie die Teile: Schatten kurz nach unten links */
  box-shadow: 0 0 0 .5px rgba(60, 58, 52, .34), -1px 1px 1.5px rgba(24, 24, 28, .26), -2px 4px 6px rgba(24, 24, 28, .16);
}
.ks-etikett--l .ks-etikett__blatt { left: auto; right: 5px; padding: 6px 14px 5px 8px; }
.ks-etikett__blatt::after {
  content: ""; position: absolute; left: 4px; top: 3px; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, #4f4a42 0 1.5px, #cfc9bd 1.8px 3px);
}
.ks-etikett--l .ks-etikett__blatt::after { left: auto; right: 4px; }
.ks-etikett b { display: block; font: 500 10.5px/1.15 var(--sans); letter-spacing: .01em; color: #1b1b1b; }
.ks-etikett__blatt i { display: block; margin-top: 2px; font: 400 10px/1.15 var(--sans); font-style: normal; color: rgba(27, 27, 27, .72); font-variant-numeric: tabular-nums; }

/* ---------- 5. Unter dem Foto ---------- */
.ks-unten {
  position: relative; width: var(--bw); height: var(--unten-h); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.ks-alle { position: relative; font-size: 13px; letter-spacing: .01em; white-space: nowrap; color: var(--ink); }
.ks-alle::before { content: ""; position: absolute; inset: -12px -10px; }   /* Tippfläche ≥ 44 px */
.ks-alle__pfeil { display: inline-block; margin-left: 5px; transition: transform .3s var(--ease); }
.ks-alle:hover .ks-alle__pfeil { transform: translateX(4px); }
.ks-alle:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.ks-weiter { white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  pointer-events: none; transition: opacity .4s ease;
}
.ks-weiter svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; animation: ks-weiter 1.8s ease-in-out infinite; }
.ks-weiter.is-weg { opacity: 0; }
@keyframes ks-weiter { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

/* Scroll-Strecke: Schrank bleibt stehen, Scrollen wechselt das Fach (Höhe setzt schrank.js) */
.ks-strecke { position: relative; }
.ks-pin { position: sticky; top: var(--hdr); }

/* ---------- 6. Wetter (Schalter in der Kopfzeile, Klasse am <html>) ---------- */
.ks-wetter { position: absolute; opacity: 0; transition: opacity 1.1s cubic-bezier(.3, 0, .2, 1); }
.ks-wetter--schnee {          /* kühles Licht von draußen im Schrank */
  left: 280px; top: 104px; width: 584px; height: 536px;
  background: radial-gradient(70% 50% at 50% 0, rgba(214, 232, 255, .34), rgba(214, 232, 255, 0) 100%), linear-gradient(180deg, rgba(196, 220, 250, .14), rgba(196, 220, 250, .06));
}
.ks-wetter--sonne {           /* Sonnenstreifen vom Fenster rechts über Schrank und Boden */
  left: 260px; top: 90px; width: 908px; height: 700px; mix-blend-mode: soft-light;
  background:
    linear-gradient(242deg, rgba(255, 226, 160, 0) 18%, rgba(255, 226, 160, .55) 22%, rgba(255, 220, 150, .42) 34%, rgba(255, 226, 160, 0) 38%),
    linear-gradient(242deg, rgba(255, 226, 160, 0) 42%, rgba(255, 226, 160, .32) 44%, rgba(255, 220, 150, .24) 50%, rgba(255, 226, 160, 0) 52%);
}
html.fxw-w-schnee .ks-wetter--schnee { opacity: 1; }
html.fxw-w-sonne .ks-wetter--sonne { opacity: 1; }
.ks-schneekappe {             /* Schnee auf dem Oberboden, vor den Körben */
  position: absolute; left: 262px; top: 78px; width: 620px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 19' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.6' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23cfdcee'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M4 19 C0 14 2 9 10 8 C50 2 95 4 150 7 C215 11 262 1 335 4 C425 8 472 11 545 5 C622 0 702 6 772 7 C852 9 902 2 982 4 C1062 7 1122 11 1190 7 C1199 8 1200 14 1196 19 Z' fill='url(%23s)' stroke='%23b9c9df' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 2px rgba(60, 80, 115, .3));
  transform-origin: 50% 100%; transform: scaleY(.05); opacity: 0;
  transition: transform 1.6s cubic-bezier(.3, 0, .2, 1), opacity .5s;
}
html.fxw-w-schnee .ks-schneekappe { transform: none; opacity: 1; transition: transform 5s cubic-bezier(.2, .6, .2, 1) .4s, opacity .8s .4s; }
.ks-dlg .fxw-cap, .ks-dlg .fxw-beads, .ks-dlg .fxw-shade { display: none !important; }
html.fxw-w-sonne .ks-dlg .btn--primary { box-shadow: none; }

/* ---------- 7. Herausgenommenes Teil = Anprobe ---------- */
.ks-dlg {
  position: fixed; inset: 0; z-index: 200;          /* Warenkorb (.hwc) liegt mit 300 darüber */
  display: flex; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.ks-dlg[hidden] { display: none; }
.ks-dlg__dunkel { position: fixed; inset: 0; background: rgba(18, 17, 16, .8); will-change: opacity; }
.ks-dlg__box {
  position: relative; margin: auto; outline: none;
  display: flex; align-items: center; justify-content: center; gap: clamp(24px, 3.6vw, 64px);
  width: 100%; max-width: 1240px; padding: clamp(20px, 3.5vw, 44px);
  pointer-events: none;
}
/* Bühne: Hundefoto und darauf (unten links) die Karte mit dem Bügel – beide in derselben Rasterzelle */
.ks-dlg__buehne { flex: none; display: grid; pointer-events: none; }
.ks-dlg__probe {
  grid-area: 1 / 1; position: relative; margin: 0; pointer-events: auto;
  width: min(54vw, 700px, calc(78vh * 4 / 3)); aspect-ratio: 4 / 3;
  border-radius: 4px; overflow: hidden; background: #d9d6d0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .34);
  will-change: opacity, clip-path;
}
.ks-dlg__hundfoto { display: block; width: 100%; height: 100%; object-fit: cover; }
.ks-dlg__sositzt {
  position: absolute; right: 12px; bottom: 12px; max-width: calc(100% - 150px);
  padding: 6px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); color: var(--ink);
  font-size: 12px; line-height: 1.3; text-align: right;
}
.ks-dlg__buegel {
  grid-area: 1 / 1; align-self: end; justify-self: start; position: relative; z-index: 2;
  margin: 0 0 12px 12px; padding: 10px 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  pointer-events: none;
}
.ks-dlg__karte {
  position: absolute; inset: 0; border-radius: 4px;
  background: rgba(250, 249, 246, .92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18), 0 0 0 1px rgba(27, 27, 27, .05);
}
.ks-dlg__flug { position: relative; will-change: transform; pointer-events: auto; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .22)); }
.ks-dlg__teil {
  display: block; width: auto;
  height: clamp(96px, 17vh, 156px);
  aspect-ratio: var(--w, 4) / var(--h, 9);
  -webkit-user-select: none; user-select: none;
}
/* gewählte Farbe am Bügel (solange es den Hund in dieser Farbe nicht als Foto gibt): Ton auf dem Stoff, nicht auf dem Holzbügel */
.ks-dlg__toenung {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: var(--ton, transparent);
  -webkit-mask-image: var(--bild), linear-gradient(180deg, transparent 0, transparent 13%, #000 19%);
  -webkit-mask-size: 100% 100%, 100% 100%; -webkit-mask-repeat: no-repeat;
  -webkit-mask-composite: source-in;
  mask-image: var(--bild), linear-gradient(180deg, transparent 0, transparent 13%, #000 19%);
  mask-size: 100% 100%, 100% 100%; mask-repeat: no-repeat;
  mask-composite: intersect;
}
.ks-dlg__toenung--farbe { mix-blend-mode: color; }         /* Farbton + Sättigung der gewählten Farbe */
.ks-dlg__toenung--tiefe { mix-blend-mode: hard-light; }    /* … und ihre Helligkeit, damit auch dunkle Stoffe die Farbe zeigen */
.ks-dlg__flug.is-getoent .ks-dlg__toenung--farbe { opacity: .95; }
.ks-dlg__flug.is-getoent .ks-dlg__toenung--tiefe { opacity: .5; }
.ks-dlg__farbetikett { position: relative; font-size: 11.5px; line-height: 1.2; color: var(--ink); white-space: nowrap; }
.ks-dlg__farbetikett[hidden] { display: none; }

.ks-dlg__info {
  position: relative; flex: none; width: min(400px, 100%); pointer-events: auto;
  padding: clamp(22px, 2.2vw, 30px);
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
  will-change: transform, opacity;
}
.ks-dlg__x {
  position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; z-index: 1;
  display: grid; place-items: center; border: 0; background: none; color: var(--ink); cursor: pointer;
}
.ks-dlg__x svg { width: 20px; height: 20px; }
.ks-dlg__x:hover { opacity: .55; }
.ks-dlg__kopf { padding-right: 28px; }
.ks-dlg__eyebrow { display: block; }
.ks-dlg__name { margin-top: 6px; font-family: var(--sans); font-weight: 400; font-size: clamp(24px, 2vw, 30px); line-height: 1.08; letter-spacing: -.02em; }
.ks-dlg__art { margin-top: 2px; font-size: 14px; color: var(--muted); }
.ks-dlg__preis { margin-top: 4px; font-size: 16px; font-variant-numeric: tabular-nums; }
.ks-dlg__wahl[hidden] { display: none; }
.ks-dlg__wahl { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ks-dlg__labelzeile { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ks-dlg__label { font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ks-dlg__gewaehlt { margin-left: 2px; font-weight: 400; letter-spacing: .01em; text-transform: none; font-size: 13.5px; color: var(--ink); }
.ks-dlg__tabelle { font-size: 12.5px; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.ks-dlg__tabelle:hover { opacity: .6; }
.ks-dlg__tabelle[hidden] { display: none; }
.ks-dlg__farben, .ks-dlg__groessen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ks-dlg__sw {
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
  display: grid; place-items: center; color: inherit;
}
.ks-dlg__sw[hidden] { display: none; }
.ks-dlg__sw[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ks-dlg__sw:hover .ks-dlg__punkt { transform: scale(1.08); }
.ks-dlg__punkt {
  width: 26px; height: 26px; border-radius: 50%;
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 1px rgba(27, 27, 27, .16);
  transition: transform .2s var(--ease);
}
.ks-dlg__punkt--muster { background: conic-gradient(#e33529, #f2c230, #3f9a4a, #3b78c4, #e33529); }
.ks-dlg__plus {
  height: 38px; min-width: 38px; padding: 0 8px; border: 0; border-radius: 19px; background: var(--panel); cursor: pointer;
  font-size: 12.5px; color: var(--ink); font-variant-numeric: tabular-nums;
}
.ks-dlg__plus:hover { background: #ebe9e2; }
.ks-dlg__gr {
  min-width: 46px; height: 38px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; cursor: pointer;
  font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; transition: border-color .2s, background .2s, color .2s;
}
.ks-dlg__gr:hover { border-color: var(--ink); }
.ks-dlg__gr[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ks-dlg__plain { font-size: 14px; color: var(--muted); }
.ks-dlg__hinweis { min-height: 20px; margin-top: 12px; font-size: 13px; line-height: 20px; color: var(--muted); }
.ks-dlg__hinweis.is-warn { color: var(--red); }
.ks-dlg__knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ks-dlg__knoepfe .btn { padding: 0 12px; }
.ks-dlg__korb { grid-column: 1 / -1; }
.ks-dlg__korb.is-done, .ks-dlg__korb.is-done:hover { background: var(--ink); border-color: var(--ink); }
.ks-dlg__produkt, .ks-dlg__zurueck { height: 44px; }
html.ks-zu-scroll { overflow: hidden; }

/* ---------- 7b. Türen ----------
   Zwei Ausschnitte aus dem Foto mit geschlossenen Türen, auf dieselbe Abbildung gelegt (schrank.js setzt
   left/top/width/height, perspective und perspective-origin = Mitte des Schranks auf Augenhöhe, --td = Türstärke).
   Drehung um die äußeren Bänder; ab 90° sieht man die dunkle Innenseite, dazwischen die Kante. */
.ks-tueren { position: absolute; inset: 0; z-index: 5; pointer-events: none; --td: 4px; }
.ks-schrank.is-tuerweg .ks-tueren, .ks-schrank.is-ohne-tueren .ks-tueren { display: none; }
.ks-tuer { position: absolute; left: 0; top: 0; transform-style: preserve-3d; will-change: transform; }
.ks-schrank.is-offen .ks-tuer { will-change: auto; }
.ks-tuer--l { transform-origin: 0 50%; }
.ks-tuer--r { transform-origin: 100% 50%; }
.ks-schrank.is-offen .ks-tuer--l { transform: rotateY(-104deg); }   /* gleicher Wert wie WINKEL in schrank.js */
.ks-schrank.is-offen .ks-tuer--r { transform: rotateY(104deg); }
.ks-tuer__vorn { position: absolute; inset: 0; background-size: 100% 100%; background-repeat: no-repeat; backface-visibility: hidden; }
.ks-tuer__dunkel { position: absolute; inset: 0; opacity: 0; background: linear-gradient(90deg, rgba(10, 10, 14, .22), rgba(10, 10, 14, .48)); }
.ks-tuer--r .ks-tuer__dunkel { background: linear-gradient(270deg, rgba(10, 10, 14, .22), rgba(10, 10, 14, .48)); }
.ks-tuer__innen {
  position: absolute; inset: 0; backface-visibility: hidden;
  transform: translateZ(calc(var(--td) * -1)) rotateY(180deg);
  background: linear-gradient(90deg, #2a2b2e, #35363a 55%, #2b2c2f);
  box-shadow: inset 1.5px 0 0 rgba(255, 255, 255, .13), inset -1.5px 0 0 rgba(255, 255, 255, .13), inset 0 0 0 1px rgba(0, 0, 0, .35);
}
.ks-tuer__kante { position: absolute; top: 0; height: 100%; width: var(--td); background: linear-gradient(180deg, #26272a, #1c1d1f); }
.ks-tuer--l .ks-tuer__kante { left: 100%; transform-origin: 0 50%; transform: rotateY(90deg); }
.ks-tuer--r .ks-tuer__kante { right: 100%; transform-origin: 100% 50%; transform: rotateY(-90deg); }
/* Schatten der Türen im Schrank (Foto-Koordinaten, über den Teilen) und auf der Wand neben dem Schrank */
.ks-tschatten { position: absolute; top: 103px; width: 289px; height: 577px; opacity: 0; }
.ks-tschatten--l { left: 283px; transform-origin: 0 50%; background: linear-gradient(90deg, rgba(14, 14, 18, .62), rgba(14, 14, 18, .26) 60%, rgba(14, 14, 18, 0)); }
.ks-tschatten--r { left: 573px; transform-origin: 100% 50%; background: linear-gradient(270deg, rgba(14, 14, 18, .62), rgba(14, 14, 18, .26) 60%, rgba(14, 14, 18, 0)); }
.ks-wandschatten { position: absolute; top: 112px; width: 110px; height: 572px; opacity: 0; filter: blur(9px); }
.ks-wandschatten--l { left: 166px; background: linear-gradient(270deg, rgba(22, 22, 26, .3), rgba(22, 22, 26, 0)); }
.ks-wandschatten--r { left: 870px; background: linear-gradient(90deg, rgba(22, 22, 26, .3), rgba(22, 22, 26, 0)); }
.ks-schrank.is-offen:not(.is-tuerweg):not(.is-ohne-tueren) .ks-wandschatten { opacity: 1; }

/* ---------- 8. Handy / Hochkant ---------- */
@media (max-width: 760px) {
  .ks {
    --kopf: 84px; --reiter-h: 54px; --unten-h: 46px;
    --bw: 100%;
    /* Foto zeigt nur den Schrank (schrank.js: fokusSchmal) – nicht höher als nötig, damit die Teile groß bleiben */
    --bh: clamp(330px, min(calc(100svh - var(--hdr) - var(--kopf) - var(--reiter-h) - var(--unten-h)), 100vw * 1.3), 680px);
  }
  .ks-intro { gap: 5px; }
  .ks-intro__titel { font-size: 25px; }
  .ks-intro__text { font-size: 13.5px; max-width: 32em; }
  .ks-schrank { border-radius: 0; }
  .ks-reiterzeile { padding: 0 10px; }
  .ks-reiter {
    justify-content: safe center;
    -webkit-mask: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
    mask: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  }
  .ks-reiter__knopf { height: 38px; padding: 0 12px; font-size: 12.5px; }
  .ks-unten { padding: 0 var(--gutter); }
  .ks-weiter { font-size: 10.5px; letter-spacing: .1em; }
  .ks-etikett { --fl: 14.2px; --fw: -45deg; }
  .ks-etikett--s1 { --dy: 36px; --fl: 47px; --fw: -12deg; }
  .ks-etikett--s2 { --dy: 70px; --fl: 81px; --fw: -7deg; }
  .ks-etikett--s3 { --dy: 104px; --fl: 115px; --fw: -5deg; }
  .ks-etikett__blatt { left: 4px; top: calc(5px + var(--dy)); padding: 4px 6px 4px 11px; }
  .ks-etikett__blatt::after { left: 3px; top: 2px; width: 5px; height: 5px; }
  .ks-etikett b { font-size: 9.5px; white-space: nowrap; max-width: none; overflow-wrap: normal; hyphens: none; }   /* Namen nicht trennen („Berg-führer“) */
  .ks-etikett__blatt { width: max-content; }
  .ks-etikett__blatt i { font-size: 9px; margin-top: 1px; }
}
@media (max-width: 380px) {
  .ks-reiter__knopf { padding: 0 10px; font-size: 12px; }
}
@media (max-width: 440px) { .ks-weiter span { display: none; } }
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .ks-dlg__box { flex-direction: column; gap: 12px; padding: 14px 0 0; min-height: 100%; justify-content: flex-end; }
  .ks-dlg__buehne { flex: 1 0 auto; align-content: center; justify-content: center; padding: 0 var(--gutter); }
  .ks-dlg__probe { width: min(calc(100vw - 2 * var(--gutter)), calc(42svh * 4 / 3), 640px); }
  .ks-dlg__teil { height: clamp(72px, 11svh, 110px); }
  .ks-dlg__buegel { margin: 0 0 8px 8px; padding: 7px 9px 6px; }
  .ks-dlg__sositzt { right: 8px; bottom: 8px; font-size: 11px; padding: 5px 9px; max-width: calc(100% - 110px); }
  .ks-dlg__info { width: 100%; padding: 18px var(--gutter) 0; border-radius: 0; box-shadow: none; }
  .ks-dlg__name { font-size: 24px; }
  .ks-dlg__wahl { margin-top: 12px; padding-top: 12px; }
  .ks-dlg__hinweis { margin-top: 8px; }
  /* die Knöpfe bleiben immer erreichbar, auch wenn der Inhalt höher ist als das Handy */
  .ks-dlg__knoepfe {
    position: sticky; bottom: 0; z-index: 1;
    margin: 6px calc(-1 * var(--gutter)) 0; padding: 10px var(--gutter) max(10px, env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--line);
  }
}
@media (max-width: 760px) and (max-height: 760px) {
  .ks-dlg__probe { width: min(calc(100vw - 2 * var(--gutter)), calc(36svh * 4 / 3)); }
}
@media (min-width: 600px) and (max-aspect-ratio: 1/1) {
  .ks-dlg__info { padding-left: max(var(--gutter), calc(50% - 300px)); padding-right: max(var(--gutter), calc(50% - 300px)); }
  .ks-dlg__knoepfe { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}

/* ---------- 9. Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  .ks-dunkel, .ks-glut, .ks-wetter, .ks-schneekappe, html.fxw-w-schnee .ks-schneekappe { transition: none; }
  .ks-teil, .ks-anh, .ks-etikett { will-change: auto; }
  .ks-reiter__knopf, .ks-dlg__punkt, .ks-dlg__gr, .ks-dlg__toenung { transition: none; }
  .ks-weiter svg { animation: none; }
}
