/* ══════════════════════════════════════════════════════════════
   XXL ART — Room Preview (Live-Raumansicht)
   /room_preview/v3/css/room_preview.css

   Mobile-first, Breakpoint min-width 1024px.
   Alle Klassen mit Prefix .rp- — keine IDs, kollidiert nicht mit
   scaleBgZoom (#wrapper, #art …).
   Farben/Fonts aus css/tokens (colors.css, typography.css) —
   mit Fallbacks, falls die Tokens auf einer Seite fehlen.
   ══════════════════════════════════════════════════════════════ */

.rp {
  --rp-bg:        var(--color-bg, #f7f5f1);
  --rp-surface:   var(--color-surface, #fff);
  --rp-panel-bg:  rgba(255, 255, 255, .7);     /* Panels: Weiß, transparent + Blur */
  --rp-text:      var(--color-text, #1c1a17);
  --rp-muted:     var(--color-text-subtle, rgba(28, 26, 23, .55));
  --rp-line:      var(--color-border-strong, rgba(28, 26, 23, .12));
  --rp-gold:      var(--gold, #a8873a);
  --rp-dark:      var(--color-btn-inverse-bg, #1c1a17);
  --rp-dark-text: var(--color-btn-inverse-text, #f7f5f1);
  --rp-stage-bg:  var(--color-bg-deep, #efebe4);
  --rp-ease:      var(--ease, cubic-bezier(.16, 1, .3, 1));
  --rp-gap:       16px;

  box-sizing: border-box;
  font-family: var(--font-primary, "Inter", system-ui, sans-serif);
  color: var(--rp-text);
  background: var(--rp-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rp *,
.rp *::before,
.rp *::after { box-sizing: border-box; }

.rp[hidden],
.rp [hidden] { display: none !important; }

/* Layer */
.rp--layer {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 100000;
}

html.rp-lock,
html.rp-lock body { overflow: hidden; }

/* Seite (ohne Layer) */
.rp--page {
  position: relative;
  width: 100%;
}

/* ── Bausteine ─────────────────────────────────────────────── */
.rp-panel {
  background: var(--rp-panel-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  overflow: hidden;
}

.rp-kicker {
  font-family: var(--font-display, "Antonio", "Arial Narrow", sans-serif);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  color: var(--rp-muted);
}

.rp-btn {
  font-family: var(--font-display, "Antonio", "Arial Narrow", sans-serif);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--rp-text);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}

.rp-btn:hover { background: rgba(28, 26, 23, .06); }
.rp-btn.is-on { color: var(--rp-gold); }
.rp-btn:disabled { opacity: .4; cursor: default; }

.rp-btn-dark,
.rp-btn-dark:hover {
  background: var(--rp-dark);
  color: var(--rp-dark-text);
}
.rp-btn-dark:hover { color: var(--rp-gold); }

.rp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--rp-surface);
  color: var(--rp-text);
  cursor: pointer;
  transition: color .2s ease;
}
/* Icon-Buttons als Panel (Hilfe, Schließen, Pfeile): gleiche Optik wie .rp-panel */
.rp-icon.rp-panel {
  background: var(--rp-panel-bg);
  border-radius: 10px;
}
.rp-icon:hover,
.rp-icon.is-on { color: var(--rp-gold); }

.rp-btn:focus-visible,
.rp-icon:focus-visible,
.rp-chip:focus-visible,
.rp-thumb:focus-visible,
.rp-swatch:focus-visible {
  outline: 2px solid var(--rp-gold);
  outline-offset: 2px;
}

.rp-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rp-scroll::-webkit-scrollbar { display: none; }

/* ── Kopf ──────────────────────────────────────────────────── */
.rp-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  background: var(--rp-surface);
  border-bottom: 1px solid var(--rp-line);
}

.rp-head .rp-panel { box-shadow: none; border: 0; }

.rp-head-help .rp-btn-text { display: none; }

.rp-head-spacer { width: 44px; }

/* rechts oben: Merken + Schließen */
.rp-head-end {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rp-like.is-liked { color: var(--color-like, #d6455d); }
/* Größe unter dem Werk-Titel (Gemälde + Drucke) */
.rp-title-size {
  margin-top: 2px;
  font-size: 13px;
  letter-spacing: .06em;
  opacity: .85;
  white-space: nowrap;
}

/* "zurück zu Nr. …" — wenn ein anderes Bild an der Wand hängt */
.rp-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px auto 0;
  padding: 4px 12px;
  border: 0;
  border-radius: 100px;
  background: rgba(28, 26, 23, .06);
  color: var(--rp-text);
  font: inherit;
  font-size: 12px;
  text-shadow: none;
  cursor: pointer;
}
.rp-back:hover { color: var(--rp-gold); }

.rp-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.rp-title-main {
  font-family: var(--font-display, "Antonio", "Arial Narrow", sans-serif);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 18px;
  line-height: 1.2;
  /* einzeilig — sonst schiebt ein langer Titel die Größe am Handy aus der Kopfleiste */
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ── Bühne ─────────────────────────────────────────────────── */
.rp-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 260px;
  overflow: hidden;
  background: var(--rp-stage-bg);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color .3s ease;
}

.rp--page .rp-stage {
  flex: 0 0 auto;
  height: 62vh;
  min-height: 300px;
  touch-action: pan-y;   /* Seite bleibt scrollbar — Bild ziehen geht trotzdem */
}

.rp-stage.is-zoomed { cursor: grab; }
.rp-stage.is-panning { cursor: grabbing; }
.rp-stage.is-calib-a4 { cursor: crosshair; }

.rp-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.rp-world { transition: opacity .45s ease; }
.rp-world.is-animated { transition: transform .35s var(--rp-ease), opacity .45s ease; }
/* Raumwechsel = Überblendung (rp_stage.js showRoom / makeGhost):
   neuer Raum unsichtbar aufbauen, dann über dem Standbild des alten einblenden */
.rp-stage .rp-world.is-switching { opacity: 0; transition: none; }
.rp-world-ghost { pointer-events: none; }
/* Standbild bleibt voll sichtbar, bis der neue Raum drüber ist — sonst scheint kurz der Hintergrund durch */
.rp-world-ghost.is-leaving { opacity: 0; transition: opacity .25s ease .4s; }

.rp-bg,
.rp-layer,
.rp-check {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.rp-check { opacity: .5; }

.rp-art {
  position: absolute;
  cursor: grab;
  touch-action: none;
  background: var(--color-placeholder, #ebe7e0);
}

.rp-stage.is-dragging-art .rp-art { cursor: grabbing; }

/* Größenwechsel (Kunstdruck): Bild wächst/schrumpft weich mit leichtem Nachfedern — nur kurz aktiv (rp_stage.js → morphArt) */
.rp-art.is-morphing {
  transition: left .6s cubic-bezier(.34, 1.2, .64, 1),
              top .6s cubic-bezier(.34, 1.2, .64, 1),
              width .6s cubic-bezier(.34, 1.2, .64, 1),
              height .6s cubic-bezier(.34, 1.2, .64, 1),
              box-shadow .6s ease;
}
@media (prefers-reduced-motion: reduce) {
  .rp-art.is-morphing { transition: none; }
}

.rp-art-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;            /* Kunstdruck-Vorschau in anderem Format: mittig beschnitten */
  max-width: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.rp-calib-rect {
  position: absolute;
  border: 2px dashed var(--rp-gold);
  background: rgba(168, 135, 58, .14);
  pointer-events: none;
}

/* Laden: kein Abdunkeln mehr (das war der harte "Blitz") — der Spinner reicht */

/* Zoom */
.rp-zoom {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
}
.rp-zoom-line { height: 1px; background: var(--rp-line); }

/* Hilfe */
.rp-help {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  max-width: 320px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.55;
}
.rp-help p { margin: 6px 0 0; }

/* Kalibrieren — Handy: unten über dem Dock, damit die Bühne frei bleibt */
.rp-calib {
  position: fixed;
  z-index: 3;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rp-calib-text { margin: 0; font-size: 14px; line-height: 1.45; }
.rp-calib-actions { display: flex; gap: 8px; justify-content: flex-end; }

.rp-calib-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-calib-tabs .rp-chip.is-on {
  background: var(--rp-dark);
  border-color: var(--rp-dark);
  color: var(--rp-dark-text);
}
.rp-calib-pane { display: flex; flex-direction: column; gap: 10px; }

/* Wandbreite: Regler + Zahlenfeld */
.rp-calib-width {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rp-range {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  accent-color: var(--rp-gold);
  cursor: pointer;
}
.rp-calib-num {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.rp-calib-num input {
  width: 72px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--rp-line);
  border-radius: 0;
  background: var(--rp-surface);
  color: var(--rp-text);
  font: inherit;
  font-size: 16px;               /* iOS zoomt sonst beim Antippen */
  text-align: right;
}

/* Messlinie über die ganze Fotobreite (Stärke/Schrift setzt rp_stage.js gegen den Zoom) */
.rp-measure {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px dashed var(--rp-gold);
  pointer-events: none;
  text-align: center;
}
.rp-measure-label {
  display: inline-block;
  vertical-align: top;
  background: var(--rp-surface);
  color: var(--rp-text);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

/* Loader */
.rp-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.rp-spinner {
  display: block;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(28, 26, 23, .15);
  border-top-color: var(--rp-gold);
  border-radius: 50%;
  animation: rp-spin .8s linear infinite;
}
@keyframes rp-spin { to { transform: rotate(360deg); } }

/* Toast */
.rp-toast {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  background: var(--color-glass-bg, rgba(28, 26, 23, .88));
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}

/* ── Steuerung (Dock) ─────────────────────────────────────── */
.rp-dock {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px var(--rp-gap) var(--rp-gap);
  background: var(--rp-bg);
}

/* Haupt-Umschalter: Räume | Gemälde | Kunstdrucke + ein-/ausklappen (v3) */
.rp-switch {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 3px;
  margin: 0 0 -4px;
  border-radius: 100px;
}
.rp-switch-btn,
.rp-switch-collapse {
  flex: 0 0 auto;
  height: 30px;
  margin: 0;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--rp-text);
  cursor: pointer;
}
.rp-switch-btn {
  padding: 0 14px;
  font-family: var(--font-display, "Antonio", "Arial Narrow", sans-serif);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.rp-switch-btn:hover,
.rp-switch-collapse:hover { color: var(--rp-gold); }
.rp-switch-btn.is-on,
.rp-switch-btn.is-on:hover {
  background: var(--rp-dark);
  color: var(--rp-dark-text);
}
.rp-switch-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  padding: 0;
}
.rp-switch-btn:focus-visible,
.rp-switch-collapse:focus-visible { outline: 2px solid var(--rp-gold); outline-offset: 2px; }
.rp-rooms-toggle-icon { transition: transform .35s var(--rp-ease); }
.rp-dock.is-rooms-closed .rp-rooms-toggle-icon { transform: rotate(180deg); }

/* Inhalt unter dem Umschalter: Räume ODER Bilder */
.rp-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Bild-Thumbs (Gemälde / Kunstdrucke): ganzes Bild in echter Proportion — Höhe wie die Raum-Thumbs,
   Breite aus dem Bild (width/height-Attribute am img → Platz steht schon vor dem Laden fest).
   button.… statt .rp-thumb-art: Skeletons (span) behalten ihre feste Breite */
button.rp-thumb-art {
  width: auto;
  min-width: 56px;                     /* Platz für den Preis bei schmalen Hochformaten */
  background: transparent;
}
.rp-thumb-art img {
  width: auto;
  max-width: 220px;                    /* extreme Panoramen: ganz, aber begrenzt */
  height: 100%;
  margin: 0 auto;
  object-fit: contain;
  transition: transform .3s var(--rp-ease);
}
/* Aktives Bild (hängt an der Wand): weißer Rahmen wie bei den Räumen, Bild leicht größer, Auge oben links */
.rp-thumb-art.is-on { outline: 0; }
.rp-thumb-art.is-on::after {          /* Rahmen ÜBER dem vergrößerten Bild (outline läge darunter) */
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1;
  border: 2px solid #fff;
  pointer-events: none;
}
.rp-thumb-art.is-on img { transform: scale(1.08); }
.rp-thumb-eye {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--rp-dark);
  color: var(--rp-dark-text);
  opacity: 0;
  transform: scale(.6);
  transition: opacity .2s ease, transform .25s var(--rp-ease);
  pointer-events: none;
}
.rp-thumb-art.is-on .rp-thumb-eye { opacity: 1; transform: scale(1); }
.rp-thumb-size {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 100px;
  background: rgba(255, 255, 255, .85);
  color: var(--rp-text);
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}
/* Laden: Skeletons — angedeutete Leinwand (Quer/Hoch/Quadrat im Wechsel) + Lichtstreifen,
   der versetzt über die Kacheln läuft. Danach blenden die Bilder ein. */
.rp-thumb-skel {
  display: block;
  overflow: hidden;
  cursor: default;
  background: rgba(255, 255, 255, .6);
}
.rp-thumb-skel::before {               /* die "Leinwand" */
  content: "";
  position: absolute;
  top: 18%; bottom: 18%; left: 12%; right: 12%;
  border-radius: 2px;
  background: rgba(28, 26, 23, .13);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .10);
  animation: rp-skel-pulse 1.6s ease-in-out infinite;
}
.rp-thumb-skel:nth-child(3n+2)::before { top: 10%; bottom: 10%; left: 30%; right: 30%; }   /* Hochformat */
.rp-thumb-skel:nth-child(3n)::before   { top: 12%; bottom: 12%; left: 24%; right: 24%; }   /* Quadrat */
.rp-thumb-skel::after {                /* Lichtstreifen */
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -70%;
  width: 70%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .9) 50%, rgba(255, 255, 255, 0) 100%);
  animation: rp-skel-sweep 1.4s ease-in-out infinite;
}
/* versetzt — der Streifen wandert durch die Reihe */
.rp-thumb-skel:nth-child(2)::after, .rp-thumb-skel:nth-child(2)::before { animation-delay: .08s; }
.rp-thumb-skel:nth-child(3)::after, .rp-thumb-skel:nth-child(3)::before { animation-delay: .16s; }
.rp-thumb-skel:nth-child(4)::after, .rp-thumb-skel:nth-child(4)::before { animation-delay: .24s; }
.rp-thumb-skel:nth-child(5)::after, .rp-thumb-skel:nth-child(5)::before { animation-delay: .32s; }
.rp-thumb-skel:nth-child(6)::after, .rp-thumb-skel:nth-child(6)::before { animation-delay: .40s; }
.rp-thumb-skel:nth-child(7)::after, .rp-thumb-skel:nth-child(7)::before { animation-delay: .48s; }
.rp-thumb-skel:nth-child(8)::after, .rp-thumb-skel:nth-child(8)::before { animation-delay: .56s; }
@keyframes rp-skel-sweep {
  0%   { transform: translateX(0); }
  100% { transform: translateX(250%); }
}
@keyframes rp-skel-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}
.rp-thumbs .rp-thumb-art { transition: opacity .3s ease; }
.rp-thumbs.is-entering .rp-thumb-art { opacity: 0; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .rp-thumb-skel::before,
  .rp-thumb-skel::after { animation: none; }
  .rp-thumbs .rp-thumb-art { transition: none; }
}
.rp-arts-empty {
  align-self: center;
  padding: 10px 16px;
  color: var(--rp-muted);
  font-size: 13px;
  text-align: center;
}

.rp-rooms {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  overflow: hidden;               /* für das Einklappen */
  transition: max-height .35s var(--rp-ease), opacity .25s ease;
}
.rp-dock.is-rooms-closed .rp-rooms { opacity: 0; }

.rp-chip {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  margin: 0;
  border: 1px solid var(--rp-line);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--rp-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.rp-chip.is-on {
  background: var(--rp-dark);
  border-color: var(--rp-dark);
  color: var(--rp-dark-text);
}

.rp-chip-toggle {
  border-style: dashed;
  color: var(--rp-muted);
}
.rp-chip-toggle:hover { color: var(--rp-text); border-style: solid; }

/* Thumb-Streifen: Pfeile nur am Desktop (Handy wischt) */
.rp-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}
.rp-strip-arrow { display: none; flex: 0 0 auto; }
.rp-strip-arrow:disabled { opacity: .35; cursor: default; }
.rp-strip-arrow:disabled:hover { color: var(--rp-text); }

.rp-thumbs {
  flex: 0 1 auto;
  min-width: 0;
  padding: 3px 2px;
}

.rp-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  height: 64px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--rp-stage-bg);
  overflow: hidden;
  cursor: pointer;
}
.rp-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
/* Nur der aktive Raum hat einen Rahmen: weiß, innen liegend (kein Springen) */
.rp-thumb.is-on { outline: 2px solid #fff; outline-offset: -2px; }

/* Farbkreis-Icon: Raum kann Wandfarbe (Thumb + Button an der Bühne) */
.rp-thumb-paint,
.rp-paint-dot {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .85);
  background: conic-gradient(#c96f4f, #d3a64a, #8fa585, #4f7f86, #4a5f85, #8c5a74, #c96f4f);
  pointer-events: none;
}
.rp-thumb-paint {
  position: absolute;
  right: 4px;
  top: 4px;
}

/* Wandfarbe-Button unter + / − */
.rp-paint-dot { box-shadow: 0 0 0 1px var(--rp-line); }
.rp-paint-btn.is-on .rp-paint-dot { box-shadow: 0 0 0 2px var(--rp-gold); }

/* "+ Foto" (Mein Raum) */
.rp-thumb-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px dashed var(--rp-line);
  background: var(--rp-surface);
  color: var(--rp-text);
  font-size: 12px;
}

/* "messen" — Foto noch nicht kalibriert */
.rp-thumb-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 6px;
  background: var(--rp-dark);
  color: var(--rp-dark-text);
  font-size: 10px;
  line-height: 1.5;
  pointer-events: none;
}

/* ── Leiste: Info + Aktionen + AR ──────────────────────────── */
.rp-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rp-info {
  display: none;                /* vorerst ausgeblendet — Größe steht im Größe-Button */
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 0 14px;
  white-space: nowrap;
  overflow: hidden;
}
.rp-size { font-size: 18px; }
.rp-info-line {
  flex: 0 0 auto;
  width: 1px;
  height: 22px;
  background: var(--rp-line);
}
.rp-room-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  color: var(--rp-muted);
}

.rp-actions {
  position: relative;            /* Anker für das Wandfarben-Popover */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rp-actions-row {
  display: flex;
  flex-wrap: wrap;
}
.rp-actions-row .rp-btn { flex: 1 1 auto; }

/* ── Wandfarbe ──────────────────────────────────────────────
   Handy (Basis): schmale Leiste am unteren Rand, Farben horizontal wischen —
   der Raum bleibt komplett sichtbar. Desktop: Popover mit Raster (siehe @media unten). */
.rp-colors {
  position: fixed;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 0 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;   /* Leiste unten: nur oben rund */
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .12);
}

.rp-colors-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 6px 16px;
}
.rp-colors-current {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.rp-colors-close { min-width: 36px; height: 36px; }

/* eine Zeile, horizontal wischen */
.rp-colors-grid {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 16px 4px;
}
.rp-colors-grid::-webkit-scrollbar { display: none; }

.rp-colors-top {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}
.rp-swatch-orig,
.rp-swatch-custom {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 12px;
  margin: 0;
  border: 1px solid var(--rp-line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.rp-swatch-orig.is-on { border-color: var(--rp-gold); box-shadow: 0 0 0 1px var(--rp-gold); }
.rp-swatch-custom input {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.rp-colors-family {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rp-colors-family-name {
  display: block;
  font-size: 10px;
  letter-spacing: .04em;
  white-space: nowrap;
  opacity: .7;
}
.rp-colors-row {
  display: flex;
  gap: 6px;
}
.rp-swatch {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: 2px solid var(--rp-surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--rp-line);
  cursor: pointer;
}
.rp-swatch.is-on { box-shadow: 0 0 0 2px var(--rp-gold); }

/* ── Größe (nur Kunstdrucke) ────────────────────────────────
   Gleiche Mechanik wie die Wandfarbe: Handy = Leiste unten, Desktop = Popover. */
.rp-sizes {
  position: fixed;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 0 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;   /* Leiste unten: nur oben rund */
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .12);
}
.rp-sizes-list {
  padding: 2px 16px 8px;
}
/* Format-Tabs optisch von den Größen getrennt: eigene Fläche + Linie */
.rp-sizes-formats {
  margin-bottom: 8px;
  padding: 8px 16px;
  background: rgba(28, 26, 23, .05);
  border-bottom: 1px solid var(--rp-line);
}
.rp-sizes-formats .rp-chip.is-on {
  background: var(--rp-dark);
  border-color: var(--rp-dark);
  color: var(--rp-dark-text);
}
/* Punkt am Format, in dem die gewählte Größe liegt — auch wenn ein anderer Tab offen ist */
.rp-chip-dot {
  display: none;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--rp-gold);
  vertical-align: middle;
}
.rp-chip.has-sel .rp-chip-dot { display: inline-block; }
.rp-size-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 7px 12px;
  margin: 0;
  border: 1px solid var(--rp-line);
  border-radius: 10px;
  background: var(--rp-surface);
  color: var(--rp-text);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.rp-size-chip.is-on { border-color: var(--rp-gold); box-shadow: 0 0 0 1px var(--rp-gold); }
.rp-size-chip-cm { font-size: 13px; font-weight: 500; }
.rp-size-chip-price { font-size: 12px; color: var(--rp-muted); }

.rp-sizes-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 16px 8px;
}
.rp-sizes-custom .rp-calib-num span:first-child { color: var(--rp-muted); }
.rp-sizes-x { color: var(--rp-muted); }

.rp-sizes-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 16px 0;
}
.rp-sizes-price { font-size: 16px; font-weight: 500; }
.rp-sizes-foot .rp-btn { padding: 0 16px; }
/* Warenkorb-Button (CartButton) im Fuß: Optik kommt komplett aus dem Shop-CSS */
.rp-sizes-cart { flex: 0 1 auto; min-width: 0; }
.rp-sizes-cart form { margin: 0; }

/* Größe-Button: Punkt, solange eine Vorschau-Größe aktiv ist */
.rp-btn.has-preview::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--rp-gold);
}

/* Farbpunkt am Wandfarbe-Button */
.rp-btn.has-wall svg { color: var(--rp-wall-hex); }

/* Shop-Link + Warenkorb nebeneinander (Shop-Link nur bei anderem Bild — rp_app.js setzt hidden)
   Handy: leerer Platzhalter .rp-bar-start weg — Desktop: hält die Aktionen in der Mitte */
.rp-bar-start { display: none; }
.rp-bar-end { display: flex; justify-content: center; align-items: stretch; gap: 8px; }
.rp-bar-end .rp-shop { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
.rp-bar-end .rp-shop svg { flex-shrink: 0; }
.rp-shop-label { overflow: hidden; text-overflow: ellipsis; }
/* Handys: "Im Shop" reicht, sonst wird abgeschnitten */
@media (max-width: 419px) {
  .rp-shop-more { display: none; }
}

/* anderes Bild an der Wand: "Im Shop ansehen" + Warenkorb (CartButton, Optik aus dem Shop-CSS) */
.rp-btn-shop {
  text-decoration: none;
  border-radius: 100px;
}
.rp-art-cart { display: flex; flex: 0 0 auto; justify-content: center; transition: opacity .2s ease; }
.rp-art-cart.is-busy { opacity: .5; pointer-events: none; }   /* Bildwechsel: alter Button bleibt, kurz gesperrt */
/* .rp-btn setzt background: transparent — als eigenes Panel braucht der Link den Panel-Hintergrund */
.rp-btn.rp-shop { justify-content: center; background: var(--rp-panel-bg); }
.rp-btn.rp-shop:hover { background: rgba(255, 255, 255, .9); }
.rp-art-cart form { margin: 0; }

/* ── Desktop: alles schwebt über dem Raum (wie im Mockup) ── */
@media (min-width: 1024px) {

  /* Bühne füllt alles, Kopf + Dock schweben darüber */
  .rp--layer .rp-stage {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
  }

  .rp--page { height: min(86vh, 900px); }
  .rp--page .rp-stage {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    height: auto;
    touch-action: none;
  }

  .rp-head {
    position: absolute;
    top: 24px; left: 24px; right: 24px;
    z-index: 2;
    padding: 0;
    background: transparent;
    border: 0;
    align-items: flex-start;
    pointer-events: none;
  }
  .rp-head > * { pointer-events: auto; }
  .rp-head .rp-panel {
    border: 1px solid var(--rp-line);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .08);
  }
  .rp-head-help { padding: 0 18px; }
  .rp-head-help .rp-btn-text {
    display: inline;
    font-family: var(--font-display, "Antonio", "Arial Narrow", sans-serif);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 15px;
  }
  .rp-title { padding: 10px 22px; }

  /* Titel schwebt frei über dem Raumfoto — nur am Desktop weiß
     (am Handy sitzt er auf der weißen Kopfleiste, dort bliebe weiße Schrift unsichtbar) */
  .rp-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none !important;
    border: none !important;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 0 18px rgba(0, 0, 0, .25);   /* lesbar auch auf hellen Wänden */
  }
  .rp-title-main { font-size: 22px; }
  .rp-title-size { font-size: 14px; font-weight: 500; opacity: 1; }

  .rp-zoom { right: 24px; }

  .rp-help {
    top: 88px;
    left: 24px;
    right: auto;
    width: 320px;
  }

  .rp-calib {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: auto;
    top: 96px;
    transform: translateX(-50%);
    width: 520px;
  }

  .rp-toast { bottom: 240px; }

  .rp-dock {
    position: absolute;
    left: 24px; right: 24px; bottom: 24px;
    z-index: 2;
    padding: 0;
    background: transparent;
    align-items: center;
    pointer-events: none;
  }
  .rp-dock > * { pointer-events: auto; max-width: 100%; }

  /* Raum-Block: volle Breite, aber nur Tabs/Thumbs fangen Klicks — daneben bleibt das Bild ziehbar */
  .rp-rooms {
    width: 100%;
    align-items: center;
    pointer-events: none;
  }
  .rp-rooms > * { pointer-events: auto; max-width: 100%; }
  .rp-pane { width: 100%; align-items: center; pointer-events: none; }
  .rp-pane > * { pointer-events: auto; max-width: 100%; }
  .rp-back {
    background: rgba(255, 255, 255, .75);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .rp-bar-end .rp-shop { flex: 0 0 auto; padding: 0 20px; }

  .rp-thumb { width: 118px; height: 76px; }

  .rp-strip.has-overflow .rp-strip-arrow { display: inline-flex; }

  .rp-bar {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 16px;
  }
  .rp-info { flex: 0 1 auto; min-width: 0; min-height: 52px; padding: 0 18px; gap: 18px; }
  .rp-size { font-size: 20px; }

  /* Leiste: links Shop-Link · Mitte Aktionen · rechts Warenkorb */
  .rp-bar { position: relative; }       /* Anker der Popovers (Wandfarbe, Größe) — rechts über der Leiste */
  .rp-bar-start,
  .rp-bar-end {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: flex-end;
  }
  .rp-bar-end { justify-content: flex-end; align-items: stretch; align-self: flex-end; }
  .rp-actions {
    position: static;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
  }
  .rp-actions-row { flex-wrap: nowrap; }
  .rp-actions-row .rp-btn { flex: 0 0 auto; }

  /* Größe: Popover über der Leiste (wie Wandfarbe) */
  .rp-sizes {
    position: absolute;
    left: auto;
    right: 60px;
    bottom: calc(100% + 12px);
    width: 380px;
    max-height: calc(100vh - 360px);
    overflow-y: auto;
    padding: 14px 0;
    border-radius: 10px;
  }
  .rp-sizes .rp-colors-head { padding: 0 14px 10px; }
  .rp-sizes-formats { flex-wrap: wrap; padding: 10px 14px; }
  .rp-sizes-list { flex-wrap: wrap; padding: 0 14px 10px; }
  .rp-sizes-custom,
  .rp-sizes-foot { padding-left: 14px; padding-right: 14px; }

  /* Wandfarbe: Popover mit Raster über der Leiste */
  .rp-colors {
    position: absolute;
    left: auto;
    right: 60px;                 /* lässt die Zoom-Spalte (+ / − / Farbkreis) frei */
    bottom: calc(100% + 12px);
    width: 300px;
    max-height: calc(100vh - 360px);
    overflow-y: auto;
    padding: 14px;
    border-radius: 10px;
  }
  .rp-colors-head { padding: 0 0 10px; }
  .rp-colors-close { min-width: 28px; height: 28px; margin-right: -6px; }
  .rp-colors-grid {
    display: block;
    overflow: visible;
    padding: 0;
  }
  .rp-colors-top { margin-bottom: 12px; }
  .rp-swatch-orig,
  .rp-swatch-custom { flex: 1 1 0; min-height: 34px; }
  .rp-colors-family { display: block; }
  .rp-colors-family + .rp-colors-family { margin-top: 10px; }
  .rp-colors-family-name { margin-bottom: 5px; font-size: 11px; }
  .rp-colors-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    justify-items: center;
  }
  .rp-swatch { width: 38px; height: 38px; }
}

/* Schmaler Desktop: Mitte nicht erzwingen (sonst überlappen Shop-Link + Warenkorb die Aktionen), Shop-Link nur als Icon */
@media (min-width: 1024px) and (max-width: 1399px) {
  .rp-bar-start,
  .rp-bar-end { flex: 0 0 auto; }
  .rp-actions { flex: 1 1 auto; justify-content: center; }
  .rp-bar-end .rp-shop { padding: 0 14px; }
  .rp-shop-label { display: none; }
}
