/* Unter Glas: Blick von unten durch das Glasdach, Tropfen auf der Scheibe, Eindeckung im Vergleich. */
#unterglas .ug-kopf { margin-bottom: clamp(28px, 5vw, 56px); }
#unterglas .ug-kopf .lead { max-width: 34ch; }

#unterglas .ug-feld { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "buehne" "info"; }

/* Bühne: am Handy fast der ganze Bildschirm (Kopf und Schnellleiste abgezogen) */
#unterglas .ug-buehne { grid-area: buehne; position: relative; height: calc(100svh - var(--kopf) - 84px - env(safe-area-inset-bottom)); min-height: 500px; max-height: 980px;
  overflow: hidden; background: var(--anthrazit); contain: layout paint; }
#unterglas .ug-bild, #unterglas .ug-bild img, #unterglas .ug-leinwand, #unterglas .ug-glas { position: absolute; inset: 0; width: 100%; height: 100%; }
#unterglas .ug-bild img { object-fit: cover; object-position: 62% 50%; }
#unterglas .ug-leinwand { opacity: 0; transition: opacity .5s var(--kurve); }
#unterglas .ug-buehne.ug-gl-an .ug-leinwand { opacity: 1; }
#unterglas .ug-glas { z-index: 2; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#unterglas .ug-glas:focus-visible { outline: 3px solid var(--salbei); outline-offset: -6px; border-radius: 4px; }

#unterglas .ug-tipp { position: absolute; z-index: 3; left: 12px; top: 12px; margin: 0; pointer-events: none; transition: opacity .5s var(--kurve), transform .5s var(--kurve); }
#unterglas .ug-tipp svg { width: 18px; height: 18px; flex: none; }
#unterglas .ug-tipp.weg { opacity: 0; transform: translateY(-6px); }
#unterglas .ug-pause { position: absolute; z-index: 3; right: 8px; top: 8px; background: rgba(10, 14, 16, .62); color: #fff; }
#unterglas .ug-pause svg { width: 20px; height: 20px; }
#unterglas .ug-pause:hover { background: rgba(10, 14, 16, .85); }

/* Ohne WebGL: Foto mit Filtern je Eindeckung */
#unterglas .ug-ohne-gl .ug-tipp, #unterglas .ug-ohne-gl .ug-pause { display: none; }
#unterglas .ug-ohne-gl .ug-glas { cursor: default; }
#unterglas .ug-ohne-gl .ug-bild::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: var(--ug-bild) 62% 50% / cover no-repeat;
  -webkit-mask: url("../bilder/unterglas/maske.png") 62% 50% / cover no-repeat; mask: url("../bilder/unterglas/maske.png") 62% 50% / cover no-repeat; }
#unterglas .ug-ohne-gl[data-deckung="milchglas"] .ug-bild::after { opacity: 1; filter: blur(7px) brightness(1.3) contrast(.62) saturate(.5); }
#unterglas .ug-ohne-gl[data-deckung="getoent"] .ug-bild::after { opacity: 1; filter: brightness(.6) contrast(1.06) saturate(.55) hue-rotate(-12deg); }
#unterglas .ug-ohne-gl[data-deckung="steg-klar"] .ug-bild::after { opacity: 1; filter: blur(1.5px) brightness(1.1) contrast(.88);
  background: repeating-linear-gradient(219deg, rgba(255, 255, 255, .2) 0 1px, transparent 1px 8px), var(--ug-bild) 62% 50% / cover no-repeat; }
#unterglas .ug-ohne-gl[data-deckung="steg-opal"] .ug-bild::after { opacity: 1; filter: blur(11px) brightness(1.55) contrast(.42) saturate(.3); }

/* Wahl: am Handy unten auf der Bühne, waagerecht wischbar */
#unterglas .ug-wahl-feld { grid-area: buehne; align-self: end; position: relative; z-index: 4; padding: 64px 0 14px; pointer-events: none;
  background: linear-gradient(0deg, rgba(12, 16, 18, .94) 0%, rgba(12, 16, 18, .78) 52%, rgba(12, 16, 18, 0) 100%); }
#unterglas .ug-wahl-feld > * { pointer-events: auto; }
#unterglas .ug-wahl-titel { margin: 0 0 10px; padding: 0 var(--rand); font: 640 13px/1.3 var(--text); letter-spacing: .02em; color: #d3dbdf; }
#unterglas .ug-wahl { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--rand);
  padding: 2px var(--rand) 4px; scrollbar-width: none; }
#unterglas .ug-wahl::-webkit-scrollbar { display: none; }
#unterglas .ug-wahl::after { content: ""; flex: 0 0 1px; }
#unterglas .ug-wahl button { flex: none; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; min-height: 60px; padding: 9px 14px;
  scroll-snap-align: start; background: rgba(38, 45, 50, .94); box-shadow: inset 0 0 0 1px var(--linie); transition: background .2s, color .2s; }
#unterglas .ug-wahl button:hover { background: var(--anthrazit-2); }
#unterglas .ug-wahl button[aria-pressed="true"] { background: var(--salbei); color: var(--nacht); box-shadow: none; }
#unterglas .ug-w-name { font: 720 15px/1.1 var(--display); font-stretch: 100%; white-space: nowrap; }
#unterglas .ug-w-preis { font-size: 15px; line-height: 1; letter-spacing: 0; white-space: nowrap; color: #c9d3d8; }
#unterglas .ug-wahl button[aria-pressed="true"] .ug-w-preis { color: var(--nacht); }

/* Auswahl, Preis, Knopf */
#unterglas .ug-info { grid-area: info; width: min(100% - 2 * var(--rand), var(--breite)); margin: 22px auto 0; }
#unterglas .ug-wetter { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 28px; font-size: 15px; line-height: 1.45; color: var(--regen); }
#unterglas .ug-wetter .punkt { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--regen); flex: none; }
#unterglas .ug-wetter .punkt.an { background: var(--salbei); box-shadow: 0 0 0 4px rgba(120, 161, 117, .25); }
#unterglas .ug-name { margin-bottom: 14px; }
#unterglas .ug-preis { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 6px; }
#unterglas .ug-betrag { font-size: clamp(46px, 12vw, 68px); line-height: .95; color: #fff; }
#unterglas .ug-mass { font: 640 16px/1.2 var(--text); color: var(--regen); }
#unterglas .ug-mwst { margin: 0 0 18px; font-size: 14px; line-height: 1.4; color: var(--regen); }
#unterglas .ug-fakt { margin: 0 0 26px; max-width: 42ch; font-size: 16.5px; line-height: 1.5; color: #e2e8eb; }
#unterglas .ug-planen { width: 100%; }
#unterglas .ug-quelle { margin: 18px 0 0; max-width: 60ch; }

@media (min-width: 560px) {
  #unterglas .ug-planen { width: auto; }
}
@media (min-width: 900px) {
  #unterglas .ug-buehne { height: calc(100svh - var(--kopf)); }
}
/* Desktop: Bühne groß links, Wahl und Preis rechts */
@media (min-width: 960px) {
  #unterglas .ug-feld { width: min(100% - 2 * var(--rand), var(--breite)); margin-inline: auto; column-gap: clamp(32px, 4vw, 64px);
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "buehne wahl" "buehne info"; }
  #unterglas .ug-buehne { height: auto; aspect-ratio: 4 / 5; min-height: 0; max-height: calc(100svh - var(--kopf) - 48px); border-radius: var(--ecke); }
  #unterglas .ug-wahl-feld { grid-area: wahl; align-self: start; padding: 0; background: none; }
  #unterglas .ug-wahl-titel { padding: 0; margin-bottom: 14px; color: var(--regen); }
  #unterglas .ug-wahl { flex-direction: column; overflow: visible; padding: 0; gap: 6px; }
  #unterglas .ug-wahl::after { display: none; }
  #unterglas .ug-wahl button { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0 18px; background: var(--anthrazit); }
  #unterglas .ug-w-name { font-size: 17px; }
  #unterglas .ug-w-preis { font-size: 18px; }
  #unterglas .ug-info { width: auto; margin: 32px 0 0; align-self: start; }
  #unterglas .ug-wetter { margin-bottom: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  #unterglas .ug-leinwand, #unterglas .ug-tipp { transition: none; }
}
#unterglas .zahl { font-variant-numeric: normal; }
