/* =========================================================================
   Der Charakter-Simulator (im Launcher "Anprobe"), Teil 1: Gerüst, Bühne,
   Bedienteile der linken Spalte und Haarauswahl.

   WERTE AUS DEM LAUNCHER, NICHT ANGENÄHERT (Renés Regel für die Website):
   launcher/src/styles/anprobe.css, skillbaum.css (Haarauswahl) und
   bereiche.css (Klassenwahl), nur gelesen. Die Klassen heißen hier `ap-`
   statt `asg-ap-`, der Zustand `is-an` statt `asg-an`; die Variablen
   `--asg-*` kommen aus der Brücke in weltkarte.css.

   Groß steht der ganze Aufbau des Launchers, schmal NUR die Bühne und
   darunter die Liste (Renés Ansage vom 05.10.2026).
   ========================================================================= */

/* Der Bereich füllt den rollenden Teil, gerollt wird nur in der Liste. */
#view-anprobe:not([hidden]) {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#ap-wurzel {
  flex: 1;
  min-height: 0;
}

.ap-bereich {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.ap-rumpf {
  position: relative;
  display: flex;
  flex: 1;
  gap: 16px;
  align-items: flex-start;
  min-height: 0;
  margin-top: 10px;
}

.ap-links,
.ap-rechts {
  align-self: stretch;
  min-height: 0;
  padding-right: 4px;
}

.ap-links {
  display: flex;
  flex: 0 0 320px;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.ap-links > *,
.ap-rechts > * {
  flex: none;
}

.ap-unterbuehne {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ap-haarspalte {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 6px;
  align-self: stretch;
  width: 158px;
  min-height: 0;
  overflow: hidden;
}

.ap-haare {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.ap-rechts {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ---------------------------------------------------------------- Bühne */

.ap-buehne {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 264px;
  overflow: hidden;
  cursor: grab;
  background: rgb(0 0 0 / 30%);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 9px;
  user-select: none;
  touch-action: none;
}

.ap-buehne:active {
  cursor: grabbing;
}

.ap-ausschnitt {
  overflow: hidden;
}

.ap-ausschnitt canvas {
  display: block;
  image-rendering: auto;
  will-change: transform;
}

.ap-zoom,
.ap-drehen {
  position: absolute;
  bottom: 8px;
  display: flex;
  gap: 4px;
}

.ap-zoom {
  right: 8px;
}

.ap-drehen {
  left: 8px;
}

.ap-zoom button,
.ap-drehen button {
  width: 24px;
  height: 24px;
  padding: 0;
  cursor: pointer;
  background: rgb(11 20 32 / 75%);
  border: 1px solid var(--asg-rand);
  border-radius: 6px;
  color: var(--asg-schrift-leise);
  font: inherit;
  line-height: 1;
}

.ap-zoom button:hover,
.ap-drehen button:hover {
  color: var(--asg-schrift);
  background: rgb(94 140 210 / 25%);
}

/* ---------------------------------------------------------- Knopfreihen */

.ap-knopfreihe {
  display: flex;
  flex: 1;
  gap: 6px;
}

.ap-filter {
  flex-wrap: wrap;
}

/* In der Spalte wachsen die Reihen nicht in die Höhe (anprobe.css: `.asg-ap-links > .asg-ap-knopfreihe`). */
.ap-links > .ap-knopfreihe,
.ap-links > div > .ap-knopfreihe,
.ap-unterbuehne > .ap-knopfreihe {
  flex: none;
}

.ap-optikreihe {
  margin-bottom: -6px;
}

.ap-wahl,
.ap-reitpfeil {
  padding: 4px 0;
  cursor: pointer;
  background: rgb(255 255 255 / 3%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 6px;
  color: rgb(238 228 208 / 82%);
  font: inherit;
  font-size: calc(0.6875rem * var(--asg-schrift-skala));
}

.ap-wahl {
  flex: 1;
}

.ap-wahl.is-an {
  background: rgb(214 176 106 / 16%);
  border-color: rgb(214 176 106 / 45%);
  color: rgb(238 228 208 / 95%);
}

.ap-optikwahl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ap-reitpaar {
  display: flex;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.ap-reitpaar .ap-wahl {
  min-width: 0;
}

.ap-reitpfeil {
  flex: 0 0 auto;
  width: 18px;
  line-height: 1;
}

.ap-reitpfeil:hover:not(:disabled) {
  background: rgb(214 176 106 / 16%);
  border-color: rgb(214 176 106 / 45%);
}

.ap-wahl:disabled,
.ap-reitpfeil:disabled {
  cursor: default;
  opacity: 0.38;
}

.ap-feld {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: calc(0.6875rem * var(--asg-schrift-skala));
  color: rgb(238 228 208 / 88%);
}

.ap-feld > span:first-child {
  flex: 0 0 74px;
  color: rgb(210 190 150 / 62%);
  font-size: calc(0.625rem * var(--asg-schrift-skala));
}

.ap-leise {
  margin: 0;
  color: rgb(210 190 150 / 55%);
  font-size: calc(0.625rem * var(--asg-schrift-skala));
  line-height: 1.4;
}

/* ===================================================================
   SCHMAL: nur die Bühne und darunter die Liste (Renés Ansage 05.10.2026)
   =================================================================== */

.panel:not(.is-gross) .ap-rumpf {
  flex-direction: column;
  gap: 8px;
}

.panel:not(.is-gross) .ap-links {
  flex: none;
  align-self: stretch;
  overflow: visible;
}

.panel:not(.is-gross) .ap-links > :not(.ap-buehne),
.panel:not(.is-gross) .ap-haarspalte,
.panel:not(.is-gross) .ap-plaetze,
.panel:not(.is-gross) .ap-kats,
.panel:not(.is-gross) .ap-unterreihe {
  display: none;
}

.panel:not(.is-gross) .ap-rechts {
  flex: 1;
  align-self: stretch;
}

@media (prefers-reduced-motion: reduce) {
  .ap-klapp.ap-klapp-puls {
    animation-duration: 3s;
  }
}
