/* Interaktiv: Wie KI ihre Antworten würfelt
   Baut auf vorlage/handout.css auf (Schriften, Farben, Kopf, Titel, Fuß, Karten).
   Regeln aus dem CD: keine Schatten, keine Verläufe, Abstände in 8er-Schritten, Radien 16 / 8 / 999 px. */

.ki-wuerfelt {
  --modul-1: #DDE9A8; --modul-2: #FDF0A6; --modul-3: #CFE6D8;
  --modul-4: #D6E4F0; --modul-5: #F4C2D4; --modul-6: #E3DAEF;
  --zeile-hell: #F7F7F1;
  --warnrot: #CA2417;
}
.ki-wuerfelt .handout { max-width: 800px; }
.ki-wuerfelt .aktionen { align-items: center; }

.kleinlabel { display: block; font-size: .75em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--jj-brown); }
.einstieg { font-size: 1.1em; }

/* Fahrplan oben */
.fahrplan { list-style: none; padding: 0; margin: 24px 0 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.fahrplan li { display: flex; align-items: center; gap: 8px; padding: 4px 16px 4px 4px; border-radius: 999px; background: var(--jj-offwhite); font-weight: 700; font-size: .9em; }
.fahrplan li span { width: 28px; height: 28px; border-radius: 999px; background: var(--jj-white); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); padding-top: .1em; box-sizing: border-box; }
.fahrplan li.offen { background: var(--jj-green-light); cursor: pointer; }
.fahrplan li.offen:hover { background: var(--jj-orange); }
.fahrplan .fahrplan-schleife { background: transparent; padding-left: 8px; color: var(--jj-green-dark); }

.startsatz { border: 2px solid var(--jj-green-dark); border-radius: 16px; padding: 16px 24px; margin-bottom: 8px; }
.startsatz p { margin: 4px 0 0; }
q { quotes: "„" "“"; font-weight: 700; }

/* Stationen */
.station { padding: 40px 0 8px; border-top: 1px solid var(--border-content); margin-top: 40px; }
.station[hidden] { display: none; }
.station.neu { animation: einblenden .4s ease-out; }
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }
.station-kopf { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.station-nr {
  flex: none; width: 56px; height: 56px; border-radius: 999px; background: var(--jj-orange); color: var(--jj-black);
  font-family: var(--font-display); font-weight: 700; font-size: 2em; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding-top: .1em; box-sizing: border-box;
}
.inhalt .station h2 { margin: 0; font-size: 2em; }
.station > p { margin: 0 0 16px; }

.buehne { background: var(--jj-offwhite); border-radius: 16px; padding: 24px; margin: 24px 0; }
.buehne-titel { margin: 0 0 16px; }
.buehne-notiz { font-size: .85em; margin: 12px 0 0; }
.buehne-trenner { border: 0; height: 1px; background: var(--border-content); margin: 24px 0; }
.hinweis { font-size: .85em; color: #333; }
.klein { font-size: .85em; font-weight: 400; }

.merksatz { margin: 24px 0; padding-left: 20px; border-left: 3px solid var(--jj-green-dark); }
.merksatz p { font-family: var(--font-display); font-weight: 700; font-size: 1.65em; line-height: 1.1; color: var(--jj-green-dark); margin: 4px 0 0; }

.weiter { margin: 8px 0 0; font-size: .95em; padding: 10px 24px; }
.knopf--orange { background: var(--jj-orange); }
.knopf--orange:hover { background: var(--jj-green-light); }
.knopf:disabled { opacity: .5; cursor: default; }
.knopf:focus-visible, .fahrplan li:focus-visible, .token--wahl:focus-visible { outline: 3px solid var(--jj-green-dark); outline-offset: 2px; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* Token-Bausteine */
.token-reihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; min-height: 40px; }
.token {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; border-radius: 8px; font-weight: 700; background: var(--modul-1); white-space: pre;
  border: 2px solid transparent; font-family: inherit; font-size: 1em; color: var(--jj-black);
}
.token--anschluss { margin-left: -6px; }
.token[data-farbe="1"] { background: var(--modul-1); }
.token[data-farbe="2"] { background: var(--modul-2); }
.token[data-farbe="3"] { background: var(--modul-3); }
.token[data-farbe="4"] { background: var(--modul-4); }
.token[data-farbe="5"] { background: var(--modul-5); }
.token[data-farbe="6"] { background: var(--modul-6); }
.token-id { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .75em; font-weight: 400; color: var(--jj-brown); }
.token--wahl { cursor: pointer; }
.token--wahl[aria-pressed="true"] { border-color: var(--jj-green-dark); }

.feld-label { display: block; font-weight: 700; margin-bottom: 8px; }
.eingabe { font: inherit; width: 100%; box-sizing: border-box; padding: 10px 16px; border: 2px solid var(--jj-white); border-radius: 12px; background: var(--jj-white); margin-bottom: 16px; }
.eingabe:focus { outline: none; border-color: var(--jj-green-dark); }

/* Station 2: Nummern und Landkarte */
.buehne-h3 { font-size: 1em; margin: 0 0 4px; color: var(--jj-green-dark); }
.buehne-text { margin: 0 0 16px; }
.landkarte { position: relative; aspect-ratio: 16 / 10; background: var(--jj-white); border-radius: 16px; margin-top: 8px; overflow: hidden; }
/* Drei Pastellwolken im Hintergrund; multiply macht die Überschneidungen sichtbar */
.landkarte-wolken { position: absolute; inset: 0; width: 100%; height: 100%; }
.wolke { mix-blend-mode: multiply; }
.wolke--menschen { fill: #DDE9A8; }
.wolke--veranstaltungen { fill: #FDF0A6; }
.wolke--orte { fill: #D6E4F0; }
.wolke-name { position: absolute; z-index: 1; font-size: .7em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--jj-brown); }
.landkarte-linien { position: absolute; inset: 0; width: 100%; height: 100%; }
.landkarte-linien line { vector-effect: non-scaling-stroke; stroke-linecap: round; }
.linie-eng { stroke: var(--jj-green-dark); stroke-width: 4; }
.linie-mittel { stroke: var(--jj-green-light); stroke-width: 2; }
.linie-lose { stroke: #B9B9A8; stroke-width: 1; stroke-dasharray: 3 4; }
.legende--linien { margin-top: 8px; }
.legende.legende--linien i { width: 28px; height: 0; border-radius: 0; vertical-align: 4px; background: none; }
.legende.legende--linien i.linie-eng { border-top: 4px solid var(--jj-green-dark); }
.legende.legende--linien i.linie-mittel { border-top: 2px solid var(--jj-green-light); }
.legende.legende--linien i.linie-lose { border-top: 2px dashed #8C8C7C; }
.buehne-notiz--oben { margin: -8px 0 8px; }
.token--karte { position: absolute; transform: translate(-50%, -50%); padding: 4px 10px; font-size: .85em; cursor: pointer; z-index: 1; background: var(--jj-white) !important; border-color: rgba(0, 0, 0, .15); }
.token--karte[aria-pressed="true"] { border-color: var(--jj-green-dark); background: var(--jj-green-light) !important; z-index: 2; }
.landkarte-info { margin: 12px 0 0; min-height: 3em; }
/* Zahlenreihen */
.zahlenreihen { display: grid; gap: 8px; }
.zahlenreihe-zeile { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; align-items: center; background: var(--jj-white); border-radius: 8px; padding: 8px 12px; }
.zahlenreihe-name { display: flex; flex-direction: column; line-height: 1.2; }
.zahlenreihe-name strong { font-size: .9em; }
.zahlenreihe-name small { font-size: .75em; color: var(--jj-brown); }
.vektor { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 44px; }
.vektor i { position: relative; display: block; }
.vektor i::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border-content); }
.vektor i b { position: absolute; left: 0; right: 0; display: block; border-radius: 2px; }
.vektor i b.plus { bottom: 50%; background: var(--jj-green-dark); }
.vektor i b.minus { top: 50%; background: var(--jj-orange); }
.legende { display: flex; flex-wrap: wrap; gap: 16px; font-size: .8em; margin-top: 8px; }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
.legende-plus { background: var(--jj-green-dark); }
.legende-minus { background: var(--jj-orange); }
.rad-text { pointer-events: none; }

/* Aufmerksamkeit */
.stufe-1 { background: var(--jj-white); }
.stufe-2 { background: var(--modul-1); }
.stufe-3 { background: var(--jj-green-light); }
.token.stufe-1 { background: var(--jj-white); font-weight: 400; }
.token.stufe-2 { background: var(--modul-1); }
.token.stufe-3 { background: var(--jj-green-light); }
.token--naechstes { background: transparent; border: 2px dashed var(--jj-green-dark); color: var(--jj-green-dark); }
.legende--stufen i { border: 1px solid var(--border-content); }

/* Schichten */
.schichten { display: grid; gap: 4px; margin-bottom: 16px; }
.schicht { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; align-items: center; font-size: .8em; }
.schicht-name { font-weight: 700; white-space: nowrap; }
.schicht-zahlen { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; }
.schicht-zahlen i { height: 18px; border-radius: 2px; background: var(--jj-white); }
.schicht--aktiv .schicht-zahlen i { background: var(--modul-1); }
.schicht--aktiv .schicht-zahlen i.an { background: var(--jj-green-dark); }
.schicht--fertig .schicht-zahlen i { background: var(--jj-green-light); }
.schicht--luecke { color: var(--jj-brown); }
.schicht--luecke .schicht-zahlen { display: block; text-align: center; letter-spacing: .3em; }
.zaehler { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.zaehler-zahl { font-family: var(--font-display); font-weight: 700; font-size: 2.2em; line-height: 1.05; color: var(--jj-green-dark); font-variant-numeric: tabular-nums; }


/* Station 3: Zurückschauen */
.zurueck-szene { position: relative; padding: 96px 16px 16px; background: var(--jj-white); border-radius: 16px; }
.zurueck-szene.mit-boegen { padding-bottom: 36px; }
.bogen-wert--selbst { font-weight: 400; }
.boegen { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.boegen path { fill: none; stroke-linecap: round; }
.boegen .linie-eng { stroke: var(--jj-green-dark); }
.boegen .linie-mittel { stroke: var(--jj-green-light); }
.boegen .linie-lose { stroke: #8C8C7C; stroke-dasharray: 3 4; }
.bogen-wert { font-family: var(--font-body); font-size: 12px; font-weight: 700; fill: var(--jj-black); paint-order: stroke; stroke: var(--jj-white); stroke-width: 4px; }
.token-reihe--szene { flex-wrap: nowrap; gap: 6px; position: relative; }
.token--fokus { border-color: var(--jj-green-dark); }
.zurueck-text { margin: 16px 0 8px; min-height: 3em; }

/* Wahrscheinlichkeiten */
.balken-liste { display: grid; gap: 6px; }
.balken { display: grid; grid-template-columns: 160px minmax(0, 1fr) 56px; gap: 12px; align-items: center; }
.balken-wort { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balken-spur { height: 24px; background: var(--jj-white); border-radius: 8px; overflow: hidden; }
.balken-fuellung { height: 100%; background: var(--jj-green-light); border-radius: 8px; transition: width .35s ease-out; }
.balken-wert { text-align: right; font-variant-numeric: tabular-nums; font-size: .9em; }
.balken--gewaehlt .balken-fuellung { background: var(--jj-orange); }
.balken--gewaehlt .balken-wort::before { content: "> "; }
.balken-liste--klein { margin-top: 16px; }
.balken-liste--klein .balken { grid-template-columns: 150px minmax(0, 1fr) 56px; }
.balken-liste--klein .balken-spur { height: 16px; }

/* Würfeln */
.satz-zeile { background: var(--jj-white); border-radius: 16px; padding: 16px 20px; margin-bottom: 16px; }
.satz { font-size: 1.25em; margin: 4px 0 0; line-height: 1.4; }
.satz .alt { color: var(--jj-black); }
.satz .neu-wort { background: var(--jj-marker); padding: 0 3px; font-weight: 700; }
.satz .cursor { display: inline-block; width: 2px; height: 1em; background: var(--jj-green-dark); vertical-align: -2px; margin-left: 4px; animation: blinken 1s steps(1) infinite; }
@keyframes blinken { 50% { opacity: 0; } }

.kreislauf { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px; font-size: .8em; font-weight: 700; }
.kreislauf li { padding: 4px 12px; border-radius: 999px; background: var(--jj-white); }
.kreislauf li + li::before { content: "> "; color: var(--jj-green-dark); }
.kreislauf li.an { background: var(--jj-green-light); }

/* Glücksrad */
.gluecksrad-bereich { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
.gluecksrad { position: relative; width: 100%; max-width: 300px; padding-top: 18px; margin: 0 auto; }
.rad-drehteil { will-change: transform; }
.rad { display: block; width: 100%; height: auto; }
.rad-text { font-family: var(--font-body); font-weight: 700; font-size: 8.5px; fill: var(--jj-black); }
.rad-prozent { font-weight: 400; font-size: 7.5px; }
.rad-strich { stroke: var(--jj-green-dark); stroke-width: 1.2; }
.rad-rand { stroke: var(--jj-green-dark); stroke-width: 2.5; }
.rad-nabe { fill: var(--jj-green-dark); }
/* Zeiger oben, zeigt nach unten aufs Rad */
.rad-zeiger { position: absolute; top: 0; left: 50%; width: 0; height: 0; transform: translateX(-50%); z-index: 1;
  border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 28px solid var(--jj-green-dark); }
.wurf-ergebnis { font-weight: 700; margin: 0; font-size: 1.05em; }
.rad-seite .buehne-notiz:first-of-type { margin-top: 4px; min-height: 1.5em; }
.rad-legende { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 4px; font-size: .9em; }
.rad-legende li { display: grid; grid-template-columns: 14px minmax(0, 1fr) 48px; gap: 8px; align-items: center; padding: 3px 8px; border-radius: 8px; }
.rad-legende .strichliste { display: none; }
.rad-legende.mit-strichen li { grid-template-columns: 14px minmax(0, 1fr) 48px minmax(0, 1.2fr); }
.rad-legende.mit-strichen .strichliste { display: flex; }
.rad-legende li.gewonnen { background: var(--jj-white); font-weight: 700; }
.rad-farbe { width: 14px; height: 14px; border-radius: 4px; display: block; }
.rad-wort { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rad-wert { text-align: right; font-variant-numeric: tabular-nums; }
.strichliste { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-height: 16px; }
.strichliste b { display: block; width: 2px; height: 14px; background: var(--jj-black); }
.strichliste b.fuenfter { margin-right: 6px; }
.strichliste small { margin-left: 4px; color: var(--jj-brown); font-weight: 700; }
.rad-notiz { margin-top: 8px; }

.temperatur { margin-top: 24px; }
.temperatur input { width: 100%; accent-color: var(--jj-green-dark); }
.temperatur-skala { display: flex; justify-content: space-between; font-size: .75em; }
#temperatur-text { font-weight: 400; color: var(--jj-brown); }

.verlauf { margin-top: 24px; background: var(--jj-white); border-radius: 16px; padding: 16px 20px; }
.verlauf-liste { margin: 8px 0 0; padding-left: 24px; }
.verlauf-liste li { margin-bottom: 4px; }
.verlauf-liste small { color: var(--jj-brown); }

/* Fazit */
.station--fazit h2 { margin-bottom: 24px !important; }
.station--fazit .karten { margin-bottom: 24px; }
.weiterlesen-links a { font-weight: 700; }

@media (max-width: 560px) {
  .buehne { padding: 16px; }
  .balken, .balken-liste--klein .balken { grid-template-columns: 110px minmax(0, 1fr) 48px; gap: 8px; }
  .balken-wort { font-size: .9em; }
  .landkarte { aspect-ratio: 3 / 4; }
  .zurueck-szene { padding: 84px 8px 12px; }
  .zurueck-szene.mit-boegen { padding-bottom: 32px; }
  .token-reihe--szene { gap: 3px; }
  .token-reihe--szene .token { font-size: .75em; padding: 4px 6px; }
  .token-reihe--szene .token--anschluss { margin-left: -2px; }
  .zahlenreihe-zeile { grid-template-columns: 1fr; gap: 4px; }
  .token--karte { font-size: .75em; padding: 3px 8px; }
  .schicht { grid-template-columns: 64px minmax(0, 1fr); }
  .station-nr { width: 44px; height: 44px; font-size: 1.6em; }
  .inhalt .station h2 { font-size: 1.75em; }
  .merksatz p { font-size: 1.45em; }
  .gluecksrad-bereich { grid-template-columns: 1fr; }
  .gluecksrad { max-width: 280px; }
  .karten { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .station.neu, .satz .cursor { animation: none; }
  .balken-fuellung, .rad-drehteil { transition: none !important; }
}

/* Druck: alles aufgedeckt, ohne Bedienelemente */
@media print {
  .station[hidden] { display: block; }
  .weiter, .knopf-reihe, #rechnen-starten, .aktionen, .temperatur, .eingabe, .feld-label, .zurueck { display: none !important; }
  .fuss--web { display: flex; }
  .station { break-inside: avoid; }
  .buehne { break-inside: avoid; }
}
