/* Pro & Contra (A.13.0.0): oben das Ergebnis (Waage oder Rangliste), darunter die Eingabe direkt
   auf der Bühne — zwei Spalten Dafür/Dagegen oder Möglichkeiten, Kriterien, Bewertungskarten. */

.buehne-waage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 14px 26px;
}
.w-titel {
  width: min(100%, 640px);
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 8px 24px rgba(80, 60, 160, .12);
  color: var(--tusche);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}
.w-titel:focus { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* ---------- Ergebnis ---------- */
.w-ergebnis { display: grid; justify-items: center; gap: 6px; width: min(100%, 640px); }
.w-waage { width: min(100%, 360px); }
.w-waage svg { display: block; width: 100%; overflow: visible; }
.w-waage .faden { stroke: #b4aad6; stroke-width: 1.5; fill: none; }
.w-waage .schale.pro { fill: #a7f3d0; stroke: #10b981; stroke-width: 2; }
.w-waage .schale.contra { fill: #fbcfe8; stroke: #ec4899; stroke-width: 2; }
.w-waage .w-zahl { font: 750 15px var(--schrift-titel, sans-serif); fill: var(--tusche); }
.w-urteil { display: grid; justify-items: center; gap: 2px; text-align: center; }
.w-urteil strong { font-size: clamp(1.4rem, 5.5vw, 2rem); font-weight: 750; letter-spacing: -.02em; }
.w-urteil span { color: var(--tusche-weich); font-weight: 550; }
.w-urteil[data-urteil="ja"] strong { color: #059669; }
.w-urteil[data-urteil="nein"] strong { color: #db2777; }
.w-urteil[data-urteil="knapp"] strong { color: #7c3aed; }
.w-urteil[data-urteil="leer"] strong { color: var(--tusche-weich); font-size: 1.25rem; }
.w-urteil a { color: #7c3aed; font-weight: 650; }
.w-ergebnis[data-art="vergleich"] .w-urteil[data-urteil="ja"] strong { color: #b45309; }

.w-rang { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; display: grid; gap: 6px; }
.w-rang li {
  display: grid;
  grid-template-columns: 30px minmax(0, 9em) minmax(0, 1fr) 3.4em;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 14px;
  background: var(--flaeche);
  box-shadow: var(--schatten-klein);
  font-weight: 650;
}
.w-rang-nr { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(139, 92, 246, .14); color: #5b21b6; font-size: .9rem; }
.w-rang-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-rang-balken { height: 10px; border-radius: 999px; background: rgba(139, 92, 246, .12); overflow: hidden; }
.w-rang-balken i { display: block; width: var(--p); height: 100%; border-radius: inherit; background: var(--verlauf); transition: width .4s cubic-bezier(.2, .9, .3, 1); }
.w-rang b { text-align: right; color: var(--tusche-weich); }
.w-rang li.vorn { box-shadow: inset 0 0 0 2px rgba(245, 158, 11, .55), 0 8px 20px rgba(245, 158, 11, .18); }
.w-rang li.vorn .w-rang-nr { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #78350f; }
.w-rang li.vorn .w-rang-balken i { background: linear-gradient(90deg, #fbbf24, #f59e0b); }

.w-knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Eingabe ---------- */
.w-editor { width: min(100%, 980px); }
.w-spalten { display: grid; gap: 14px; }
.w-spalte, .w-block {
  padding: 14px;
  border-radius: 22px;
  background: var(--flaeche);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  box-shadow: var(--schatten-klein);
}
.w-spalte h3, .w-block h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-size: 1.1rem; }
.w-block h3 small { font-size: .82rem; font-weight: 550; color: var(--tusche-weich); }
.w-spalte h3 b { min-width: 2em; padding: 2px 10px; border-radius: 999px; font-size: .95rem; text-align: center; }
.w-spalte.pro { box-shadow: inset 0 3px 0 #34d399, var(--schatten-klein); }
.w-spalte.contra { box-shadow: inset 0 3px 0 #f472b6, var(--schatten-klein); }
.w-spalte.pro h3 b { background: #d1fae5; color: #047857; }
.w-spalte.contra h3 b { background: #fce7f3; color: #be185d; }
.w-gruende, .w-optionen { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.w-gruende li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; }
.w-optionen li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.w-editor .feld-text { grid-area: auto; min-width: 0; }

/* fünf Punkte (Gewicht 1–5 / Bewertung 0–5) */
.punkte { display: inline-flex; gap: 2px; }
.punkte button {
  width: 22px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.punkte button::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin: auto;
  border-radius: 50%;
  background: rgba(139, 92, 246, .16);
  box-shadow: inset 0 0 0 1.5px rgba(139, 92, 246, .3);
  transition: transform .12s, background .12s;
}
.punkte button[aria-pressed="true"]::before { background: var(--verlauf); box-shadow: none; }
.w-spalte.pro .punkte button[aria-pressed="true"]::before { background: #10b981; }
.w-spalte.contra .punkte button[aria-pressed="true"]::before { background: #ec4899; }
.punkte button:active::before { transform: scale(1.3); }
.punkte button:focus-visible { outline: 2px solid var(--akzent); outline-offset: -2px; border-radius: 8px; }
@media (pointer: coarse) {
  .punkte button { width: 26px; height: 40px; }
  .punkte button::before { width: 16px; height: 16px; }
}

.w-vergleich { display: grid; gap: 14px; }
.w-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 10px; }
.w-karte { padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .15); }
.w-karte h4 { margin: 0 0 6px; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-karte ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.w-karte li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; font-weight: 550; }
.w-karte li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tusche-weich); }

/* Werkbank: gespeicherte Entscheidungen */
.w-eintrag { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.w-eintrag > button:first-child svg { width: 20px; height: 20px; flex: none; color: #7c3aed; }
.w-eintrag > button:first-child span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 760px) {
  .w-spalten { grid-template-columns: 1fr 1fr; }
  .w-vergleich { grid-template-columns: 1fr 1fr; align-items: start; }
  .w-block.breit { grid-column: 1 / -1; }
}

/* Handy quer (A.14.4.0): links Frage, Waage und Urteil, rechts die Eingabe — vorher begann sie erst unter dem Rand. */
@media (orientation: landscape) and (max-height: 540px) and (min-width: 480px) {
  .buehne-waage {
    display: grid;
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    align-items: start;
    column-gap: 18px;
    row-gap: 8px;
    padding-top: 0;
  }
  .w-titel, .w-ergebnis, .w-knoepfe { grid-column: 1; }
  .w-titel { min-height: 44px; font-size: 1.05rem; }
  .w-editor { grid-column: 2; grid-row: 1 / span 4; }
  .w-waage { width: min(100%, 250px); }
  .w-urteil strong { font-size: 1.3rem; }
  .w-spalten { grid-template-columns: 1fr; }
}

/* Handy hoch (A.14.4.0): Feld volle Breite, Gewicht darunter mit 44-px-Punkten; Waage etwas kleiner. */
@media (max-width: 520px) {
  .w-gruende li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; }
  .w-gruende li .punkte { grid-column: 1; grid-row: 2; }
  .w-gruende li > .ikon-knopf { grid-column: 2; grid-row: 1; }
  .w-waage { width: min(100%, 280px); }
}
@media (pointer: coarse) {
  .w-gruende .punkte button { width: 44px; height: 44px; }
  .w-karte .punkte button { width: 34px; height: 44px; }
}
