/* Anordnen — geteiltes Werkzeug fuer Anordnungsaufgaben (Zeitstrahl, Rangfolge, Ablauf).
   Datengetrieben: je Aufgabe ein Ordner mit index.html + data.json. Kein Framework.
   Gestaltung „Blatt" (2026-10-21): Farben, Schrift, Knopf und Blatt kommen aus
   ../assets/css/material.css (vorher geladen); hier nur das Layout des Werkzeugs, nur --m-*-Tokens. */

.o-huelle { max-width: 780px; margin: 0 auto; padding: 32px 20px 112px; }

.o-kopf { padding: 0 2px 20px; }
.o-kopf h1 { margin: 0 0 8px; font-size: 1.5rem; line-height: 1.25; font-weight: 700; }
.o-kopf p { margin: 0 0 6px; max-width: var(--m-mass); }
.o-ki-zeile { color: var(--m-leise); font-size: .95rem; }

/* ── Liste: jede Karte ein Blatt ─────────────────────────────────────── */
.o-liste { list-style: none; margin: 0; padding: 0; position: relative; }

.o-karte {
  display: grid; grid-template-columns: minmax(0, 40%) 1fr auto; gap: 16px; align-items: center;
  background: var(--m-blatt); border: 1px solid var(--m-linie); border-radius: 2px;
  box-shadow: var(--m-schatten);
  padding: 10px 10px 10px 10px; margin: 0 0 16px; position: relative;
  touch-action: none;           /* Ziehen mit dem Finger, kein Seiten-Scroll */
  -webkit-user-select: none; user-select: none;
}
/* Feste Karte: steht schon richtig — gestrichelter Rand, ohne Kante, keine Pfeile */
.o-karte.o-fix { border-style: dashed; box-shadow: none; background: var(--m-blatt); touch-action: auto; cursor: default; }
/* Gegriffene Karte: hebt sich mit größerer Kante ab */
.o-karte.o-greift { box-shadow: 9px 9px 0 var(--m-kante); border-color: var(--m-tinte); z-index: 40; }

.o-nr {
  position: absolute; top: -12px; left: -12px;
  min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px;
  background: var(--m-tinte); color: var(--m-blatt);
  font-size: .85rem; font-weight: 700; display: grid; place-items: center;
}
.o-karte.o-fix .o-nr { background: var(--m-blatt); color: var(--m-tinte); border: 2px solid var(--m-tinte); }

/* Das Bild ist der Hauptinhalt der Karte, nicht die Beigabe. */
.o-bild {
  width: 100%; height: 152px; display: block; pointer-events: none;
  object-fit: cover; object-position: center 38%;
  background: var(--m-notiz); border: 1px solid var(--m-linie-hell);
}
.o-bild-ganz { object-fit: contain; padding: 4px; }

.o-text { min-width: 0; }
.o-titel { margin: 0 0 6px; font-weight: 700; font-size: 1.12rem; line-height: 1.25; }
.o-satz { margin: 0; font-size: .98rem; line-height: 1.45; }

/* Pfeile nebeneinander: hält 44 px zum Antippen und lässt kompakte Karten flach (eigener-staat: alle zwölf an der Tafel) */
.o-griff { display: flex; flex-direction: row; gap: 8px; align-items: center; }
.o-pfeil {
  width: var(--m-klick); height: var(--m-klick); padding: 0; cursor: pointer;
  border: 2px solid var(--m-tinte); border-radius: var(--m-ecke); background: var(--m-blatt);
  font-size: 15px; line-height: 1;
}
.o-pfeil:disabled { opacity: .25; cursor: default; }
.o-pfeil:active { background: var(--m-notiz); }

/* KI-Knopf unter dem Text der Karte (Gestalt aus .m-knopf), kleiner, damit die Karte führt */
.o-ki-huelle { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.o-ki { min-height: 40px; padding: 0 14px; font-size: .92rem; }
.o-ki-hinweis { font-size: .88rem; color: var(--m-leise); }

/* ── Leiste unten: die eine Handlung ─────────────────────────────────── */
.o-leiste {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--m-blatt); border-top: 1px solid var(--m-linie);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
}
.o-knopf {
  min-height: var(--m-klick); padding: 0 22px; cursor: pointer;
  border: 2px solid var(--m-tinte); border-radius: var(--m-ecke);
  background: var(--m-tinte); color: var(--m-blatt); font-size: 1rem; font-weight: 600;
}
.o-knopf.o-zweit { background: var(--m-blatt); color: var(--m-tinte); }
.o-knopf:active { opacity: .85; }
.o-stand { font-size: .95rem; color: var(--m-leise); min-width: 0; }
.o-stand strong { color: var(--m-tinte); }

/* ── Fragen zum Schluss ──────────────────────────────────────────────── */
.o-fragen { margin-top: 40px; }
.o-fragen h2 { font-size: 1.15rem; margin: 0 0 6px; }
.o-hinweis { font-size: .9rem; color: var(--m-leise); margin: 0 0 16px; max-width: var(--m-mass); }
.o-frage {
  background: var(--m-blatt); border: 1px solid var(--m-linie); border-radius: 2px;
  box-shadow: var(--m-schatten); padding: 16px 18px; margin-bottom: 18px;
}
.o-frage p { margin: 0 0 10px; }
.o-frage textarea {
  width: 100%; min-height: 84px; padding: 8px 10px; resize: vertical;
  border: 1px solid var(--m-linie); border-radius: var(--m-ecke); background: var(--m-blatt);
}
/* Frage für Schnelle: gestrichelt, ohne Kante; der Satz „Für Schnelle" leise darüber */
.o-fuer-schnelle { border-style: dashed; box-shadow: none; }
.o-fuer-schnelle .o-fahne { display: block; margin-bottom: 6px; font-size: .9rem; font-style: italic; color: var(--m-leise); }

.o-nachweis { margin-top: 36px; font-size: .8rem; color: var(--m-leise); line-height: 1.5; }
.o-nachweis h3 { font-size: .85rem; margin: 0 0 4px; }

/* Schmales Gerät: Bild oben, Text darunter — das Bild bleibt groß. */
@media (max-width: 560px) {
  .o-huelle { padding: 20px 14px 112px; }
  .o-karte { grid-template-columns: 1fr auto; grid-template-areas: "bild bild" "text griff"; gap: 10px; padding: 10px; }
  .o-bild { grid-area: bild; height: 168px; }
  .o-text { grid-area: text; }
  .o-griff { grid-area: griff; flex-direction: row; align-self: end; }
  .o-titel { font-size: 1.05rem; }
}

/* ── Übersicht der Anordnungsaufgaben (ordnen/index.html) ─────────────── */
.o-wahl { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.o-wahl a {
  display: block; padding: 16px 18px; color: var(--m-tinte); text-decoration: none;
  background: var(--m-blatt); border: 1px solid var(--m-linie); border-radius: 2px; box-shadow: var(--m-schatten);
}
.o-wahl a:active { box-shadow: 2px 2px 0 var(--m-kante); transform: translate(3px, 3px); }
.o-wahl strong { display: block; font-size: 1.12rem; margin-bottom: 3px; }
.o-wahl span { font-size: .95rem; color: var(--m-leise); }

/* KI-Knopf unscheinbar (2026-11-26, Lehrkraft: soll im Lesen nicht ablenken): leiser Textknopf rechts, Tippfläche bleibt groß */
.o-ki-huelle { justify-content: flex-end; }
.o-ki-huelle .o-ki { background: none; border: 0; box-shadow: none; color: var(--m-leise); font-size: .82rem; font-weight: 400;
  text-decoration: underline dotted; text-underline-offset: 3px; padding: 0 4px; min-height: var(--m-klick); }
.o-ki-huelle .o-ki:hover, .o-ki-huelle .o-ki:focus-visible { color: var(--m-tinte); }
