/* Math Cup – Ergänzungen zur übernommenen Vocab-Cup-Optik:
   Aufgabenwahl im Setup, Lösungsvorschau und Mathe-Anzeige im Spielfeld. */

:root {
  --mc-gold: #f7d84a;
  --mc-cyan: #73e8ff;
  --mc-card: rgba(255, 255, 255, 0.06);
  --mc-card-strong: rgba(255, 255, 255, 0.11);
  --mc-line: rgba(152, 217, 255, 0.26);
  --mc-text-soft: rgba(230, 242, 255, 0.78);
  --mc-warn: #ffb347;
  --mc-ok: #7ee2a8;
}

/* ---------- Setup: Aufgaben wählen ---------- */
/* Zwei Textgrößen: Inhalt 15px, Hinweise 13px. Eine Akzentfarbe (Gold) für Auswahl,
   Grün nur für „an/bereit“. Symbole in Textfarbe, 18px, Strich 2. */

.math-setup-panel {
  display: grid;
  gap: 18px;
  font-size: 15px;
}

.mc-step {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  border: 1px solid var(--mc-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.mc-step-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mc-step-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.mc-step-head > .mc-btn {
  margin-left: auto;
}

.mc-step-num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mc-gold);
  color: #1b1500;
  font-size: 14px;
  font-weight: 950;
}

.mc-caption {
  margin: 0;
  color: var(--mc-text-soft);
  font-size: 13px;
  font-weight: 600;
}

.mc-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: none;
}

.mc-icon svg {
  width: 100%;
  height: 100%;
}

/* Knöpfe */
.mc-btn {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--mc-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #eef6ff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.mc-btn::-webkit-details-marker {
  display: none;
}

.mc-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(152, 217, 255, 0.5);
}

.mc-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.mc-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mc-btn:focus-visible,
.mc-segmented button:focus-visible,
.mc-topic-main:focus-visible,
.mc-grade:focus-visible {
  outline: 3px solid var(--mc-cyan);
  outline-offset: 2px;
}

.mc-btn.is-active {
  border-color: var(--mc-gold);
  color: var(--mc-gold);
}

.mc-btn-primary {
  border-color: transparent;
  background: linear-gradient(180deg, #ffe37a, #f2c230);
  color: #1b1500;
  box-shadow: 0 8px 20px rgba(247, 216, 74, 0.25);
}

.mc-btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff0a8, #f7d84a);
}

.mc-btn-accent {
  border-color: rgba(126, 226, 168, 0.6);
  color: var(--mc-ok);
}

.mc-btn-ghost {
  border-color: transparent;
  background: transparent;
}

.mc-btn-small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

/* Umschalter */
.mc-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.mc-segmented button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--mc-text-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.mc-segmented button:hover {
  color: #fff;
}

.mc-segmented button.is-active {
  background: var(--mc-gold);
  color: #1b1500;
}

/* Schritt 1: Klasse */
.mc-grade-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.mc-grade {
  display: grid;
  gap: 0;
  place-items: center;
  min-height: 64px;
  padding: 6px 0;
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #eef6ff;
  font: inherit;
  cursor: pointer;
}

.mc-grade small {
  color: var(--mc-text-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mc-grade strong {
  font-size: 26px;
  line-height: 1;
}

.mc-grade:hover {
  border-color: rgba(247, 216, 74, 0.55);
}

.mc-grade.is-active {
  border-color: var(--mc-gold);
  background: linear-gradient(180deg, rgba(247, 216, 74, 0.3), rgba(247, 216, 74, 0.1));
  box-shadow: inset 0 0 0 1px var(--mc-gold);
}

.mc-grade.is-active small {
  color: #fff3c2;
}

.mc-grade-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: end;
}

.mc-stage-block {
  display: grid;
  gap: 6px;
}

/* Schritt 2: Themen */
.mc-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 10px;
}

.mc-topic {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 120ms ease, background 120ms ease;
}

.mc-topic.is-on {
  border-color: rgba(126, 226, 168, 0.55);
  background: rgba(126, 226, 168, 0.07);
}

.mc-topic.is-open {
  border-color: var(--mc-gold);
}

.mc-topic-main {
  display: flex;
  flex: 1;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px 8px 12px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mc-topic-text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.mc-topic-text strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-topic-text small {
  overflow: hidden;
  color: var(--mc-text-soft);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-topic:not(.is-on) .mc-topic-text strong {
  color: var(--mc-text-soft);
}

.mc-topic:not(.is-on) .mc-glyph {
  filter: grayscale(1);
  opacity: 0.5;
}

.mc-topic-settings {
  align-self: center;
  width: 38px;
  min-height: 38px;
  margin-right: 6px;
  padding: 0;
  color: var(--mc-text-soft);
}

.mc-topic-settings.is-open {
  color: var(--mc-gold);
}

.mc-switch {
  position: relative;
  flex: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: background 120ms ease;
}

.mc-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 120ms ease;
}

.mc-topic.is-on .mc-switch {
  background: #36c07a;
}

.mc-topic.is-on .mc-switch::after {
  transform: translateX(14px);
}

.mc-glyph {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 21px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.mc-glyph-small {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 12px;
}

.mc-glyph-count { background: rgba(255, 138, 101, 0.2); color: #ffb49c; }
.mc-glyph-basic { background: rgba(115, 232, 255, 0.16); color: #9bf0ff; }
.mc-glyph-fraction { background: rgba(186, 150, 255, 0.2); color: #d5c2ff; }
.mc-glyph-algebra { background: rgba(126, 226, 168, 0.18); color: #a8f0c6; }

.mc-more-topics summary {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--mc-text-soft);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.mc-more-topics summary::-webkit-details-marker {
  display: none;
}

.mc-more-topics[open] summary .mc-icon {
  transform: rotate(180deg);
}

.mc-more-topics[open] summary {
  margin-bottom: 10px;
}

/* Einstellungen eines Themas */
.mc-drawer {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--mc-gold);
  border-radius: 12px;
  background: rgba(10, 24, 40, 0.85);
}

.mc-drawer-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mc-drawer-head strong {
  font-size: 15px;
}

.mc-spacer {
  flex: 1;
}

.mc-drawer-body {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}

.mc-detail-group {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 14px;
}

.mc-detail-group legend,
.mc-detail-select > span {
  padding: 0;
  color: var(--mc-text-soft);
  font-size: 13px;
  font-weight: 700;
}

.mc-detail-select select {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--mc-line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font: inherit;
}

.mc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.mc-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mc-chip span {
  padding: 6px 12px;
  border: 1px solid var(--mc-line);
  border-radius: 999px;
  color: var(--mc-text-soft);
  font-weight: 700;
}

.mc-chip input:checked + span {
  border-color: rgba(126, 226, 168, 0.7);
  background: rgba(126, 226, 168, 0.15);
  color: #e9fff2;
}

.mc-chip input:focus-visible + span {
  outline: 3px solid var(--mc-cyan);
  outline-offset: 2px;
}

.mc-toggle,
.mc-inline-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
}

.mc-toggle input,
.mc-inline-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #36c07a;
}

.mc-detail-note {
  margin: 0;
  color: var(--mc-text-soft);
  font-size: 13px;
}

/* Schritt 3 und Erstellen */
.mc-amount {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}

.mc-create-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
}

.mc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-chip-tag {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e6f2ff;
  font-size: 13px;
  font-weight: 750;
}

.mc-create {
  min-width: 220px;
  min-height: 48px;
  font-size: 16px;
}

.mc-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid rgba(255, 179, 71, 0.6);
  border-radius: 12px;
  background: rgba(255, 179, 71, 0.1);
}

.mc-alert > .mc-icon {
  color: var(--mc-warn);
}

.mc-alert p {
  margin: 4px 0 0;
  color: var(--mc-text-soft);
  font-size: 13px;
}

.mc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* ---------- Aufgaben & Lösungen ---------- */

.mc-key {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--mc-line);
  border-radius: 14px;
  background: rgba(3, 12, 22, 0.55);
}

.mc-key.is-frozen {
  border-color: rgba(126, 226, 168, 0.55);
}

.mc-key-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.mc-key-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.mc-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.mc-pill .mc-icon {
  width: 15px;
  height: 15px;
}

.mc-pill.is-ok { background: rgba(126, 226, 168, 0.16); color: var(--mc-ok); }
.mc-pill.is-pending { background: rgba(247, 216, 74, 0.14); color: var(--mc-gold); }
.mc-pill.is-stale { background: rgba(255, 179, 71, 0.16); color: var(--mc-warn); }

.mc-private,
.mc-notice {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--mc-text-soft);
  font-size: 13px;
}

.mc-notice {
  color: #ffd28a;
}

.mc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mc-menu {
  position: relative;
}

.mc-menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  gap: 2px;
  min-width: 260px;
  padding: 6px;
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  background: #0d2138;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.mc-menu-item {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #eef6ff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.mc-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mc-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  margin: 6px 0 0;
  padding: 8px 10px 4px;
  border-top: 1px solid var(--mc-line);
  color: var(--mc-text-soft);
  font-size: 12px;
}

.mc-meta dt {
  font-weight: 800;
}

.mc-meta dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* QA 01.10.2026: Blockliste statt Grid, damit zweizeilige Aufgaben ihre Zeile nicht überragen. */
.mc-task-list {
  display: block;
  max-height: 440px;
  margin: 0;
  padding: 4px;
  overflow: auto;
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  list-style: none;
}

.mc-row {
  display: grid;
  grid-template-columns: 30px 26px minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 4px 8px;
  border-radius: 10px;
}

.mc-row + .mc-row {
  border-top: 1px solid rgba(152, 217, 255, 0.08);
}

.mc-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mc-row-num {
  color: var(--mc-text-soft);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.mc-row-task {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1em 0.28em;
  align-items: center;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mc-row-task .mc-text {
  font-size: 0.8em;
  font-weight: 700;
}

.mc-row-task .mc-visual-wrap svg {
  height: 40px;
}

.mc-row-answer {
  font-size: 20px;
  font-weight: 900;
  text-align: right;
}

.mc-row-answer .mc-answer {
  background: none;
}

.mc-answer-hidden {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--mc-text-soft);
  font-size: 15px;
}

.mc-row-replace {
  width: 34px;
  min-height: 34px;
  padding: 0;
  color: var(--mc-text-soft);
  opacity: 0.55;
}

.mc-row:hover .mc-row-replace,
.mc-row-replace:focus-visible {
  opacity: 1;
}

.mc-row-divider {
  padding: 14px 10px 6px;
  color: var(--mc-text-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mc-approve-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.mc-approve-row .mc-btn-primary {
  min-width: 200px;
  min-height: 46px;
  font-size: 15px;
}

.mc-approve-done {
  display: flex;
  flex: 1;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--mc-ok);
  font-weight: 800;
}

.mc-print-frame {
  position: fixed;
  width: 0;
  height: 0;
  border: 0;
  visibility: hidden;
}

.math-single-level-setting select {
  min-height: 40px;
  font: inherit;
}

.math-deck-status a.tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: inherit;
  text-decoration: none;
}

/* Gut sichtbar: Hier sieht die Lehrkraft die Aufgaben und druckt das Lösungsblatt. */
#setup .math-deck-status a.math-deck-open {
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 2px solid rgba(247, 216, 74, 0.8);
  border-radius: 12px;
  color: #fff6cf;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 50%),
    rgba(247, 216, 74, 0.2);
  font-size: clamp(15px, 1.15vw, 18px);
  font-weight: 950;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

#setup .math-deck-status a.math-deck-open:hover,
#setup .math-deck-status a.math-deck-open:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 50%),
    rgba(247, 216, 74, 0.34);
}

#setup .math-deck-status a.math-deck-open img {
  width: 20px;
  height: 20px;
}

.math-deck-status.is-ready {
  border-color: rgba(126, 226, 168, 0.55);
}

@media (max-width: 900px) {
  .mc-grade-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .mc-row {
    grid-template-columns: 26px minmax(0, 1fr) 34px;
  }

  .mc-row .mc-glyph-small {
    display: none;
  }
}

/* ---------- Mathe-Anzeige (Spielfeld, Elfmeter, Vorschau) ---------- */

.mc-task {
  display: inline-flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 0.18em;
  row-gap: 0.1em;
  white-space: nowrap;
}

.word-display strong.mc-task {
  display: flex !important;
}

.mc-op,
.mc-eq {
  padding: 0 0.12em;
}

.mc-text {
  font-size: 0.62em;
  font-weight: 800;
  white-space: normal;
  text-align: center;
}

.mc-var {
  font-style: italic;
}

/* Sek-Paket 1: Wurzelstrich über dem Radikanden. */
.mc-root {
  display: inline-flex;
  align-items: flex-start;
  white-space: nowrap;
}

.mc-radicand {
  border-top: 0.07em solid currentColor;
  margin-left: -0.04em;
  padding: 0.04em 0.06em 0 0.08em;
  line-height: 1;
}

.mc-sup {
  font-size: 1em;
  /* Sek-Paket 1: Hochzahl direkt an der Basis (4³ statt „4 ³“). */
  margin-left: -0.18em;
}

/* Nutzerhinweis 30.09.2026: Vorgabe und Frage farbig abgesetzt. */
.mc-given {
  padding: 0.02em 0.28em 0.06em;
  border-radius: 0.22em;
  background: rgba(255, 209, 102, 0.16);
  color: #ffd166;
  font-size: 0.72em;
  font-weight: 800;
}

.mc-ask {
  margin-right: 0.12em;
  color: #ffd166;
  font-style: italic;
}

/* Klammern dicht am Inhalt: (84 − 39) statt ( 84 − 39 ). */
.mc-paren-open {
  margin-right: -0.12em;
}

.mc-paren-close {
  margin-left: -0.12em;
}

/* Pythagoras: Dreieck mit Seitenbeschriftung.
   Darstellungsprüfung 02.10.2026: Die Frage („c = □“) steht rechts neben dem Dreieck statt darunter,
   sonst begrenzt die Kartenhöhe am Beamer (1280×720) alles auf die Mindestschrift. */
.mc-triangle {
  display: flex;
  justify-content: center;
  margin-right: 0.2em;
}

.mc-triangle + .mc-break {
  display: none;
}

.mc-triangle svg {
  width: 6.4em;
  height: 2.5em;
  overflow: visible;
}

.mc-triangle text {
  font: 800 50px "Arial Rounded MT Bold", Arial, sans-serif;
  fill: currentColor;
}

.mc-triangle .mc-tri-missing {
  fill: #ffd166;
}

/* Sek-Paket 1: erzwungener Zeilenumbruch in der Aufgabenkarte. */
.mc-break {
  flex-basis: 100%;
  width: 100%;
  height: 0;
}

.mc-heart {
  color: #ff5a7a;
  padding: 0 0.12em;
}

.mc-box {
  display: inline-block;
  width: 0.9em;
  height: 0.95em;
  border: 0.07em solid currentColor;
  border-radius: 0.08em;
  vertical-align: middle;
}

.mc-answer {
  display: inline-flex;
  align-items: center;
  padding: 0 0.12em;
  border-radius: 0.12em;
  color: var(--mc-gold);
  background: rgba(247, 216, 74, 0.12);
}

.mc-frac {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.mc-frac-sign {
  padding-right: 0.06em;
}

.mc-frac-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.62em;
  line-height: 1.05;
}

.mc-frac-n {
  padding: 0 0.15em;
  border-bottom: 0.1em solid currentColor;
}

.mc-frac-d {
  padding: 0 0.15em;
}

.mc-visual-wrap {
  display: inline-flex;
  align-items: center;
}

.mc-visual-wrap svg {
  display: block;
  width: auto;
  height: 1.55em;
  max-width: 100%;
}

.word-display strong.mc-task-visual {
  height: 100%;
}

.word-display strong.mc-task-visual .mc-visual-wrap {
  height: 100%;
  max-height: 100%;
}

.word-display strong.mc-task-visual .mc-visual-wrap svg {
  height: 100%;
  max-height: 150px;
}

.word-display.answer-visible strong.mc-task-visual .mc-visual-wrap svg {
  max-height: 110px;
}

.word-display.answer-visible::after {
  content: "LÖSUNG";
}

/* Lösung zu einem Bild ohne eigenes Antwortfeld: großes Schild neben dem Bild. */
.mc-answer-badge {
  flex: none;
  margin-left: 18px;
  padding: 4px 22px 6px;
  border-radius: 18px;
  border: 4px solid #1d2433;
  background: #FFD34D;
  color: #1d2433 !important;
  text-shadow: none !important;
  font-size: clamp(44px, 5.4vw, 88px) !important;
  font-weight: 900;
  line-height: 1.05;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* Breite Bilder (Zehnerstreifen, Zahlenstrahl) geben Platz für das Schild ab, statt es aus der Karte zu schieben. */
.word-display strong.mc-task-visual:has(.mc-answer-badge) .mc-visual-wrap {
  flex: 0 1 auto;
  min-width: 0;
}

.word-display strong.mc-task-visual:has(.mc-answer-badge) .mc-visual-wrap svg {
  max-width: 100%;
}

.penalty-prompt-card .mc-answer-badge,
.mc-row-task .mc-answer-badge,
.mc-sheet .mc-answer-badge {
  font-size: 1em !important;
  padding: 0 .3em;
  border-width: 2px;
  box-shadow: none;
}

/* Elfmeterkarte: Bildaufgaben gut lesbar (Darstellungsprüfung 27.09.2026: 70 px waren für Auswahlwörter,
   Münzen und Uhren zu klein). Die Karte darf dafür die volle Breite nutzen. */
.penalty-prompt-card:has(.mc-task-visual) {
  max-width: 100%;
  padding: 10px;
}

.penalty-prompt-card .mc-visual-wrap svg {
  height: clamp(120px, 27vh, 240px);
  max-width: 100%;
}

/* SVG-Texte der Aufgabenbilder nie in Großbuchstaben oder gesperrt (Elternregeln der Karten). */
.mc-visual text {
  text-transform: none;
  letter-spacing: 0;
}

/* „Elfmeterchance“ ist länger als das englische Vorbild: Überschrift passt sich der Kartenbreite an. */
.penalty-card h2 {
  font-size: min(clamp(52px, 6vw, 92px), calc((min(760px, 82vw) - 68px) / 10));
}

.mc-deck-empty {
  color: var(--mc-warn);
}


.math-deck-notice {
  position: absolute;
  z-index: 8;
  top: 12%;
  left: 50%;
  display: grid;
  gap: 6px;
  width: min(70%, 820px);
  padding: 16px 20px;
  border: 1px solid rgba(255, 179, 71, 0.7);
  border-radius: 10px;
  translate: -50% 0;
  background: rgba(20, 16, 6, 0.9);
  color: #fff6e0;
  font-size: clamp(14px, 1.3vw, 18px);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.math-deck-notice strong {
  color: var(--mc-warn);
  font-size: 1.3em;
}

.math-deck-notice[hidden],
.math-single-level-setting[hidden] {
  display: none;
}

.mc-row-task .mc-answer {
  padding: 0 0.2em;
  border-radius: 6px;
  background: rgba(247, 216, 74, 0.14);
  color: var(--mc-gold);
}

/* Aufgabennummer im Spielfeld – passt zur Zeile auf dem Lösungsblatt */
.math-task-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 12px;
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(230, 242, 255, 0.85);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.math-task-badge[hidden] {
  display: none;
}

/* Nummer auf dem Knopf „Lösung zeigen“: nur in der Grundschul-Edition sichtbar (dort fehlt die
   Nummer auf der Kinderkarte); die Sek-Ausgabe zeigt sie weiter oben links in der Karte. */
.math-task-number {
  display: none;
}

/* ---------- Fertig-Karte: drucken, speichern, spielen ---------- */
.mc-result {
  display: grid;
  gap: 12px;
}

.mc-ready {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid rgba(126, 226, 168, 0.55);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(126, 226, 168, 0.12), rgba(126, 226, 168, 0.04));
}

.mc-ready.is-stale {
  display: flex;
  gap: 14px;
  align-items: center;
  border-color: rgba(255, 179, 71, 0.6);
  background: rgba(255, 179, 71, 0.08);
}

.mc-ready-head {
  display: flex;
  gap: 14px;
  align-items: center;
}

.mc-ready-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: rgba(126, 226, 168, 0.2);
  color: var(--mc-ok);
}

.mc-ready.is-stale .mc-ready-icon {
  background: rgba(255, 179, 71, 0.2);
  color: var(--mc-warn);
}

.mc-ready-icon .mc-icon {
  width: 24px;
  height: 24px;
}

.mc-ready-text strong {
  display: block;
  font-size: 19px;
  font-weight: 900;
}

.mc-ready-text p {
  margin: 2px 0 0;
  color: var(--mc-text-soft);
  font-size: 14px;
}

.mc-ready-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mc-btn-big {
  min-height: 58px;
  font-size: 16px;
}

.mc-btn-big .mc-icon {
  width: 22px;
  height: 22px;
}

.mc-ready-warn,
.mc-ready-ok {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.mc-ready-warn { color: var(--mc-warn); }

/* Schalter „Nummern im Spiel zeigen“ auf der Fertig-Karte */
.mc-numbers-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mc-numbers-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mc-numbers-text {
  display: grid;
  gap: 2px;
}

.mc-numbers-text strong {
  font-size: 15px;
  font-weight: 800;
}

.mc-numbers-text small {
  color: var(--mc-text-soft);
  font-size: 13px;
  line-height: 1.35;
}

.mc-numbers-toggle.is-on .mc-switch {
  background: #36c07a;
}

.mc-numbers-toggle.is-on .mc-switch::after {
  transform: translateX(14px);
}
.mc-ready-ok { color: var(--mc-ok); }

.mc-key-details > summary {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 2px;
  color: #dcecff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.mc-key-details > summary::-webkit-details-marker {
  display: none;
}

.mc-key-details > summary small {
  color: var(--mc-text-soft);
  font-size: 12px;
  font-weight: 700;
}

.mc-key-details[open] > summary .mc-icon {
  transform: rotate(180deg);
}

.mc-key-details[open] > .mc-key {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .mc-ready-actions {
    grid-template-columns: 1fr;
  }
}

.mc-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(247, 216, 74, 0.35);
  border-radius: 14px;
  background: rgba(247, 216, 74, 0.06);
}

/* ---------- Schwierigkeitsregler: Druckanzeige ---------- */
.mc-heat {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 12px 28px;
  align-items: center;
  margin-bottom: 14px;
  --heat-1: #5cc8ff;
  --heat-2: #58d68d;
  --heat-3: #f7d84a;
  --heat-4: #ff8a3d;
  --heat-5: #ff3b3b;
}

.mc-heat-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 40px 4px 0;
}

.mc-heat-cell {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--mc-text-soft);
  font: inherit;
  cursor: pointer;
}

.mc-heat-cell:focus-visible {
  outline: 3px solid var(--mc-cyan);
  outline-offset: 4px;
  border-radius: 12px;
}

.mc-heat-tube {
  position: relative;
  display: block;
  width: min(60px, 100%);
  border: 2px solid rgba(190, 225, 255, 0.28);
  border-radius: 18px 18px 14px 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.06)),
    rgba(4, 14, 26, 0.7);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.6);
  overflow: visible;
}

.mc-heat-1 .mc-heat-tube { height: 58px; --c: var(--heat-1); }
.mc-heat-2 .mc-heat-tube { height: 70px; --c: var(--heat-2); }
.mc-heat-3 .mc-heat-tube { height: 82px; --c: var(--heat-3); }
.mc-heat-4 .mc-heat-tube { height: 94px; --c: var(--heat-4); }
.mc-heat-5 .mc-heat-tube { height: 106px; --c: var(--heat-5); }

.mc-heat-fill {
  position: absolute;
  inset: auto 3px 3px;
  height: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, white), var(--c));
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 60%, transparent);
  transition: height 420ms cubic-bezier(0.2, 0.9, 0.2, 1.2);
}

.mc-heat-cell.is-lit .mc-heat-fill {
  height: calc(100% - 6px);
}

.mc-heat-cell:not(.is-lit):hover .mc-heat-fill {
  height: 22%;
}

.mc-heat-cell.is-lit .mc-heat-tube {
  border-color: color-mix(in srgb, var(--c) 70%, white);
}

.mc-heat-label {
  font-size: 14px;
  font-weight: 850;
}

.mc-heat-cell.is-selected .mc-heat-label {
  color: #fff;
}

.mc-heat-cell.is-selected .mc-heat-tube {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 45%, transparent), 0 0 26px color-mix(in srgb, var(--c) 55%, transparent);
}

/* Blasen in der gewählten Röhre */
.mc-heat-bubbles,
.mc-heat-steam {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mc-heat-bubbles i {
  position: absolute;
  bottom: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  opacity: 0;
}

.mc-heat-bubbles i:nth-child(1) { left: 22%; }
.mc-heat-bubbles i:nth-child(2) { left: 52%; width: 5px; height: 5px; }
.mc-heat-bubbles i:nth-child(3) { left: 70%; width: 6px; height: 6px; }

.mc-heat-cell.is-selected .mc-heat-bubbles i {
  animation: mcBubble 1.8s ease-in infinite;
}

.mc-heat-cell.is-selected .mc-heat-bubbles i:nth-child(2) { animation-delay: 0.6s; }
.mc-heat-cell.is-selected .mc-heat-bubbles i:nth-child(3) { animation-delay: 1.1s; }

.mc-heat-level-4 .mc-heat-cell.is-selected .mc-heat-bubbles i,
.mc-heat-level-5 .mc-heat-cell.is-selected .mc-heat-bubbles i {
  animation-duration: 0.9s;
}

@keyframes mcBubble {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  20% { opacity: 0.9; }
  100% { transform: translateY(-60px) scale(1.1); opacity: 0; }
}

/* Dampf ab „Heiß“ */
.mc-heat-steam i {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 242, 255, 0.55), rgba(235, 242, 255, 0) 70%);
  filter: blur(2px);
  opacity: 0;
}

.mc-heat-level-4 .mc-heat-4.is-lit .mc-heat-steam i,
.mc-heat-level-5 .mc-heat-4.is-lit .mc-heat-steam i,
.mc-heat-level-5 .mc-heat-5.is-lit .mc-heat-steam i {
  animation: mcSteam 2.6s ease-out infinite;
}

.mc-heat-steam i:nth-child(2) { animation-delay: 0.85s !important; margin-left: -20px; }
.mc-heat-steam i:nth-child(3) { animation-delay: 1.7s !important; margin-left: -6px; }

.mc-heat-level-5 .mc-heat-5 .mc-heat-steam i {
  animation-duration: 1.4s !important;
  width: 34px;
  height: 34px;
}

@keyframes mcSteam {
  0% { transform: translate(0, 4px) scale(0.5); opacity: 0; }
  25% { opacity: 0.8; }
  100% { transform: translate(8px, -46px) scale(1.6); opacity: 0; }
}

/* „Explosiv“: die Anzeige wird instabil */
.mc-heat-level-5 .mc-heat-5.is-selected .mc-heat-tube {
  animation: mcShake 0.34s linear infinite, mcFlicker 1.6s steps(1, end) infinite;
}

.mc-heat-level-5 .mc-heat-row {
  animation: mcRumble 2.8s ease-in-out infinite;
}

@keyframes mcShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-1.5px, 0.5px) rotate(-0.8deg); }
  50% { transform: translate(1.5px, -0.5px) rotate(0.8deg); }
  75% { transform: translate(-1px, -0.5px) rotate(-0.4deg); }
}

@keyframes mcFlicker {
  0%, 100% { filter: brightness(1); }
  40% { filter: brightness(1.35) saturate(1.3); }
  45% { filter: brightness(0.85); }
  70% { filter: brightness(1.2); }
}

@keyframes mcRumble {
  0%, 86%, 100% { transform: translateX(0); }
  88% { transform: translateX(-2px); }
  90% { transform: translateX(2px); }
  92% { transform: translateX(-1px); }
}

.mc-heat-hint {
  margin: 36px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

.mc-heat-level-4 .mc-heat-hint { box-shadow: inset 3px 0 0 var(--heat-4); }
.mc-heat-level-5 .mc-heat-hint { box-shadow: inset 3px 0 0 var(--heat-5); }
.mc-heat-level-1 .mc-heat-hint { box-shadow: inset 3px 0 0 var(--heat-1); }
.mc-heat-level-2 .mc-heat-hint { box-shadow: inset 3px 0 0 var(--heat-2); }
.mc-heat-level-3 .mc-heat-hint { box-shadow: inset 3px 0 0 var(--heat-3); }

@media (prefers-reduced-motion: reduce) {
  .mc-heat *,
  .mc-heat-row {
    animation: none !important;
    transition: none !important;
  }
}

.mc-heat-level-5 .mc-heat-row {
  border-radius: 16px;
  background: radial-gradient(ellipse at 90% 70%, rgba(255, 59, 59, 0.16), transparent 60%);
}

@media (max-width: 760px) {
  .mc-heat { grid-template-columns: 1fr; }
  .mc-heat-hint { margin-bottom: 0; }
}

/* ---------- Grundschule: Übungsbausteine ---------- */
.mc-block-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 10px;
  align-items: start;
}

.mc-block {
  display: grid;
  gap: 8px;
  padding: 0 0 2px;
  border: 1px solid var(--mc-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.mc-block.is-on {
  border-color: var(--mc-gold);
  background: rgba(247, 216, 74, 0.09);
}

.mc-block-main {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mc-block-main:focus-visible {
  outline: 3px solid var(--mc-cyan);
  outline-offset: -3px;
  border-radius: 14px;
}

.mc-block-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 48px;
  height: 48px;
  padding: 0 6px;
  border-radius: 13px;
  background: rgba(115, 232, 255, 0.14);
  color: #9bf0ff;
  font-size: 18px;
  font-weight: 950;
  white-space: nowrap;
}

.mc-block.is-on .mc-block-icon {
  background: rgba(247, 216, 74, 0.2);
  color: var(--mc-gold);
}

.mc-block-text {
  flex: 1;
  min-width: 0;
}

.mc-block-text strong {
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.mc-block:not(.is-on) .mc-block-text strong {
  color: var(--mc-text-soft);
}

.mc-check {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border: 2px solid var(--mc-line);
  border-radius: 8px;
  color: transparent;
}

.mc-check .mc-icon svg {
  width: 16px;
  height: 16px;
}

.mc-block.is-on .mc-check {
  border-color: var(--mc-gold);
  background: var(--mc-gold);
  color: #1b2330;
}

.mc-cross-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 0 12px 10px 72px;
}

.mc-cross-caption {
  color: var(--mc-text-soft);
  font-size: 12px;
  font-weight: 700;
}

.mc-cross {
  padding: 4px 10px;
  border: 1px solid var(--mc-line);
  border-radius: 999px;
  background: transparent;
  color: var(--mc-text-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.mc-cross.is-on {
  border-color: var(--mc-ok);
  background: rgba(126, 226, 168, 0.16);
  color: #d9ffe9;
}

@media (max-width: 760px) {
  .mc-cross-row { padding-left: 12px; }
}

/* Hinweis nach automatischer Anpassung (z. B. Umfang eines kleinen Bausteins) */
.mc-note {
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid var(--mc-accent, #f5c542);
  background: rgba(245, 197, 66, 0.08);
  border-radius: 6px;
}

/* ---------------------------------------------------------------------------
   Setup vereinfacht (Design-Review 26.09.2026): ruhige Überschriften ohne
   Versalien, Spieldauer in einem Kasten, ein klarer Start-Knopf. */

#setup .setup-section-title {
  margin: 18px 0 8px;
  color: rgba(226, 238, 248, 0.86);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-transform: none;
}

#setup :is(.mode-option span, .number-setting span, .timer-duration-setting > span, .setup-dashboard-card > strong, .setup-dashboard-group-title) {
  text-transform: none;
  letter-spacing: 0.01em;
}

#setup .mode-option-note {
  display: block;
  grid-column: 2 / -1;
  margin-top: 2px;
  color: rgba(197, 222, 236, 0.72);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

/* Spieldauer: oben die beiden Formate, darunter Level (nur Single Round) und Rundenlänge. */
@media (min-width: 761px) {
  #setup .game-settings {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  #setup .game-settings > .mode-option {
    grid-column: span 3;
  }

  #setup .game-settings > .round-length-setting {
    grid-column: 1 / -1;
  }

  #setup .game-settings:has(.math-single-level-setting:not([hidden])) > .math-single-level-setting {
    grid-column: span 2;
  }

  #setup .game-settings:has(.math-single-level-setting:not([hidden])) > .round-length-setting {
    grid-column: span 4;
  }

  #setup .cup-scoring-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#setup .math-single-level-setting select {
  width: 100%;
  min-width: 0;
}

#setup .round-length-setting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

#setup .round-length-setting > span {
  flex: 0 0 auto;
}

/* Nur ein Weg zum Season Hub: die Karte in der Übersicht. */
#setup .setup-dashboard-actions {
  display: none !important;
}

/* Übersichtskarten gleich hoch, einheitlicher Knopf. */
#setup .setup-dashboard-row {
  align-items: stretch;
}

#setup .setup-dashboard-card {
  height: 100%;
}

/* Ein klarer Start-Knopf über die volle Breite, mit Play-Symbol statt „>“. */
#setup .setup-row-primary {
  display: block;
}

#setup .setup-row-primary .start-game-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

#setup .setup-row-primary .start-game-button::before {
  content: "";
  width: 0.62em;
  height: 0.72em;
  margin: 0;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* Keine Versalien und keine gesperrte Schrift im Setup. */
#setup :where(*) {
  text-transform: none;
}

#setup .setup-layer > .setup-section-title,
#setup .setup-layer-header .setup-section-title {
  letter-spacing: 0.01em;
}

#setup .setup-row-primary .start-game-button {
  min-height: 60px;
  font-size: clamp(18px, 1.5vw, 22px);
}

/* Ballwahl kompakt: kleine Kacheln, Ring um den gewählten Ball. */
#setup .ball-visual-settings {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

#setup .ball-style-option {
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 60px;
  padding: 8px 10px;
  gap: 8px;
}

#setup .ball-style-preview {
  width: 40px;
}

#setup .ball-style-option:has(input:checked) {
  border-color: rgba(247, 216, 74, 0.8);
  box-shadow: inset 0 0 0 1px rgba(247, 216, 74, 0.5);
}

/* Zeit: Schalter gleichmäßig verteilt. */
@media (min-width: 761px) {
  #setup .timer-setup {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* Grundschul-Edition: Vorschau je Spielmodus in der Karte, Spielerklärung als Dialog. */
/* Vorschau klein rechts in der Karte, damit das Setup nicht länger wird. */
#setup label.has-mode-preview {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 0;
  padding-top: 10px;
  padding-bottom: 10px;
}

#setup label.has-mode-preview .mode-option-note {
  grid-column: 2 / 3;
}

#setup label.has-mode-preview .mca-preview {
  --mca-preview-w: 132px;
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
}

@media (max-width: 760px) {
  #setup label.has-mode-preview .mca-preview {
    --mca-preview-w: 96px;
  }
}

/* Hinweis direkt über „Spiel starten“, wenn noch keine Aufgaben bereit sind. */
#setup .start-game-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  border: 2px solid rgba(247, 216, 74, 0.72);
  border-radius: 12px;
  padding: 12px 14px 12px 18px;
  color: #fff3c4;
  background: rgba(60, 44, 6, 0.86);
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 900;
  line-height: 1.35;
}

#setup .start-game-hint[hidden] {
  display: none;
}

#setup .start-game-hint p {
  margin: 0;
}

#setup .start-game-hint .tool {
  flex: none;
  white-space: nowrap;
}

#setup .start-game-hint.is-flashing {
  animation: start-hint-flash 0.9s ease-out;
}

@keyframes start-hint-flash {
  0%, 40% { box-shadow: 0 0 0 6px rgba(247, 216, 74, 0.55); }
  100% { box-shadow: 0 0 0 0 rgba(247, 216, 74, 0); }
}

@media (prefers-reduced-motion: reduce) {
  #setup .start-game-hint.is-flashing { animation: none; }
}

#setup .setup-row-primary .tutorial-button {
  width: 100%;
  margin-bottom: 10px;
  min-height: 44px;
}

.mc-tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 16, 28, 0.62);
}

.mc-tutorial-host {
  width: min(960px, 100%);
}

/* Tour mit Kapiteln (Nachbesserung 29.09.2026): Rahmen, Kapitelleiste, Vorbereiten-Übersicht. */
.mc-tour {
  display: grid;
  gap: 10px;
  /* Auch auf 1280 × 720 ganz sichtbar: Breite folgt der Höhe (Spielfeld ist quer). */
  width: min(1000px, 100%, calc((100dvh - 250px) * 1.6));
  min-width: min(620px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: clamp(12px, 1.6vw, 20px);
  border-radius: 30px;
  background: linear-gradient(180deg, #e8f6ff 0%, #f6fbff 55%, #fffbea 100%);
  box-shadow: 0 18px 50px rgba(23, 50, 74, 0.28), inset 0 0 0 2px rgba(255, 255, 255, 0.9);
  color: #17324a;
  font-family: "Nunito", "Arial Rounded MT Bold", "Varela Round", Inter, Aptos, "Segoe UI", Arial, sans-serif;
}

.mc-tour .mc-tutorial-host {
  width: 100%;
}

.mc-tour .mca-tutorial {
  padding: 4px 0 0;
  background: transparent;
  box-shadow: none;
}

.mc-tour-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.mc-tour-head h2 {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 900;
  white-space: nowrap;
}

.mc-tour-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.mc-tour-tabs button {
  min-height: 38px;
  padding: 6px 14px;
  border: 2px solid rgba(47, 111, 214, 0.25);
  border-radius: 999px;
  background: #fff;
  color: #2459b3;
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 900;
}

.mc-tour-tabs button.is-active {
  border-color: #2f6fd6;
  background: #2f6fd6;
  color: #fff;
}

.mc-tour-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(23, 50, 74, 0.08);
  color: #17324a;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.mc-tour-foot {
  display: flex;
  justify-content: flex-end;
}

.mc-tour-next {
  min-height: 42px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #ffd23f;
  color: #17324a;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(217, 151, 26, 0.3);
}

.mc-tour-next[hidden] {
  display: none;
}

.mc-tour-setup {
  display: grid;
  gap: 14px;
  padding: 6px 4px 4px;
}

.mc-tour-setup ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mc-tour-setup li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23, 50, 74, 0.1);
}

.mc-tour-setup li > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2f6fd6;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.mc-tour-setup strong {
  display: block;
  margin-bottom: 4px;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 900;
}

.mc-tour-setup p {
  margin: 0;
  color: #4a6378;
  font-size: clamp(14px, 1.15vw, 17px);
  font-weight: 700;
  line-height: 1.4;
}

.mc-tour-setup .mc-tour-note {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 210, 63, 0.25);
  color: #17324a;
}

.mc-tour-setup > .mca-btn {
  justify-self: end;
  min-height: 48px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: #2f6fd6;
  color: #fff;
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(47, 111, 214, 0.3);
}

@media (max-width: 760px) {
  .mc-tour-head { grid-template-columns: minmax(0, 1fr) auto; }
  .mc-tour-tabs { grid-column: 1 / -1; grid-row: 2; }
  .mc-tour-setup ol { grid-template-columns: 1fr; }
}

/* Einladung zur Tour oben im Setup. */
#setup .tour-invite {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 10px 0 14px;
  padding: 12px 14px 12px 16px;
  border: 2px solid rgba(247, 216, 74, 0.7);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(247, 216, 74, 0.22), rgba(47, 111, 214, 0.18)),
    rgba(4, 17, 31, 0.72);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

#setup .tour-invite[hidden] {
  display: none;
}

#setup .tour-invite-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f7d84a;
  color: #102a43;
  font-size: 24px;
  font-weight: 1000;
}

#setup .tour-invite-copy strong {
  display: block;
  color: #fff;
  font-size: clamp(17px, 1.4vw, 21px);
  font-weight: 1000;
}

#setup .tour-invite-copy small {
  color: #d6e8f2;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 750;
}

#setup .tour-invite .tool {
  min-height: 48px;
  padding: 0 20px;
  font-size: clamp(15px, 1.15vw, 17px);
  white-space: nowrap;
}

@media (max-width: 760px) {
  #setup .tour-invite { grid-template-columns: auto minmax(0, 1fr); }
  #setup .tour-invite .tool { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------------------
   Befunde der Oberflächenprüfung (app/tools/ui-audit.mjs, 26.09.2026). */

/* Bausteinkarten: lange Wörter trennen statt über die Karte zu drücken. */
.mc-block,
.mc-block-main,
.mc-block-main > span:not(.mc-block-icon),
.mc-step,
.mc-create-row,
.mc-result {
  min-width: 0;
}

.mc-block-main {
  hyphens: auto;
  overflow-wrap: break-word;
}

.mc-block-icon {
  max-width: 64px;
  font-size: clamp(13px, 1.1vw, 18px);
}

/* Steuerleiste: an Silben trennen, nie mitten im Wort abschneiden. */
.controls .tool {
  hyphens: auto;
  overflow-wrap: normal;
  word-break: normal;
}

/* Kontrast: helle, nicht abgeblendete Texte auf den halbtransparenten Karten. */
#setup .setup-card > .eyebrow,
#setup .setup-card > .setup-hint,
#setup .setup-dashboard-group-title,
#setup .season-roster-fixed-name small,
.season-hub-screen .setup-section-title,
.season-full-placeholder > span {
  color: rgba(232, 242, 250, 0.92);
  opacity: 1;
}

#roundTimerStatus,
body.possession-rush-active #roundTimerStatus {
  color: #e6f4fa !important;
  opacity: 1 !important;
}

.season-award-preview-item.empty,
.season-award-preview-item.empty *,
.season-award-empty-mark {
  opacity: 1 !important;
  color: rgba(232, 242, 250, 0.9) !important;
}

.mc-block.is-on .mc-block-icon {
  background: rgba(58, 46, 6, 0.88);
  color: #ffe98a;
}

/* Smartphone: nichts ragt aus der Setup-Karte. */
@media (max-width: 760px) {
  #setup .cup-scoring-settings,
  #setup .season-setup-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #setup .mode-option,
  #setup .mode-option > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #setup #seasonLeaguePresetSelect {
    width: 100%;
    min-width: 0;
  }

  .mc-grade-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  }
}

/* Gruppen je Team getrennt: zwei kleine Felder nebeneinander. */
#setup .participant-count-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#setup .participant-count-pair label {
  display: grid;
  gap: 4px;
}

#setup .participant-count-pair small {
  color: rgba(214, 232, 244, 0.85);
  font-size: 12px;
  font-weight: 700;
}

#setup .participant-count-pair input {
  width: 100%;
  min-width: 0;
}

/* Bewegliche Zuschauer (math-fans.js): vordere Reihe am unteren Feldrand. Die Leinwand ist
   quadratisch, die Standlinie liegt bei 96,35 % – die Beine verschwinden unter dem Rand. */
.mc-fans {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.mc-fan {
  position: absolute;
  bottom: -3%;
  width: calc(24% * var(--fan-scale, 1));
  aspect-ratio: 1;
  translate: -50% 0;
  /* Bewegung und Schatten am Rahmen, das Bild selbst bleibt unbewegt: Ein animiertes img
     wurde in Chrome ohne GPU (Headless) gar nicht gezeichnet. */
  transform-origin: 50% 96.35%;
  animation: mcFanBob 2.4s ease-in-out infinite;
  animation-delay: var(--fan-delay, 0s);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25));
}

.mc-fan img {
  display: block;
  width: 100%;
  height: 100%;
}

.mc-fan.is-cheer {
  animation: mcFanHop 0.9s ease-out 1;
}

.mc-fan.is-goal {
  animation: mcFanJump 2.4s ease-out 1;
}

@keyframes mcFanBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-1.5%) rotate(0.6deg); }
}

@keyframes mcFanHop {
  0% { transform: translateY(0); }
  30% { transform: translateY(-9%); }
  55% { transform: translateY(0); }
  75% { transform: translateY(-4%); }
  100% { transform: translateY(0); }
}

@keyframes mcFanJump {
  0% { transform: translateY(0) rotate(0deg); }
  12% { transform: translateY(-12%) rotate(-3deg); }
  24% { transform: translateY(0) rotate(0deg); }
  38% { transform: translateY(-10%) rotate(3deg); }
  50% { transform: translateY(0) rotate(0deg); }
  64% { transform: translateY(-8%) rotate(-2deg); }
  76% { transform: translateY(0) rotate(0deg); }
  88% { transform: translateY(-4%) rotate(1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .mc-fan { animation: none !important; }
}

body.performance-mode .mc-fan {
  animation: none !important;
}

/* Keine Platzhalter-Ringe für die Ballpositionen: Der Ball selbst zeigt, wo er steht.
   Die Zonen bleiben als Rechenpunkte im Spiel, nur die Markierungen sind ausgeblendet. */
.field .zones,
.field .zone-dot {
  visibility: hidden !important;
}

/* Symbole der Season-Auszeichnungen (Vorlage bzw. Kinderbilder der Grundschul-Edition). */
.season-award-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.season-award-label .season-award-icon {
  flex: none;
  width: 30px;
  height: 30px;
}

.season-award-icon {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.season-award-icon.is-empty {
  opacity: 0.45;
  filter: grayscale(0.7);
}

/* Lebendiges Stadion (stadium-ambience.js): Leinwand über dem Stadionbild, unter Fans und Karte. */
.mc-ambience {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .mc-ambience {
    display: none;
  }
}

body.performance-mode .mc-ambience {
  display: none;
}

/* Leistungsmodus im Spiel: Tacho-Knopf neben Ton und Vollbild, Hinweis bei Ruckeln (29.09.2026). */
.field-performance-toggle {
  position: absolute;
  top: clamp(6px, 1.4%, 14px);
  left: calc(clamp(6px, 1%, 14px) + 84px);
  z-index: 12;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(4, 14, 26, 0.55);
  color: rgba(230, 244, 255, 0.72);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.field-performance-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.field-performance-toggle circle { fill: currentColor; stroke: none; }

.field-performance-toggle[aria-pressed="true"] {
  border-color: rgba(247, 216, 74, 0.8);
  background: rgba(247, 216, 74, 0.28);
  color: #ffe98a;
}

.field-performance-toggle:focus-visible {
  outline: 2px solid #f7d84a;
  outline-offset: 2px;
}

@media (min-width: 981px) and (min-height: 621px) and (min-aspect-ratio: 7/5) and (orientation: landscape) {
  #field .field-performance-toggle {
    top: calc(var(--hud-overlap) + 8px);
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .field-performance-toggle {
    left: calc(clamp(6px, 1%, 14px) + 68px);
    width: 28px;
    height: 28px;
  }
}

.performance-hint {
  position: absolute;
  /* Unten links über der Tierreihe: die Aufgabenkarte oben bleibt frei. */
  bottom: calc(var(--hud-overlap, 0px) + clamp(10px, 2%, 20px));
  left: clamp(8px, 1.2%, 16px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border: 2px solid rgba(247, 216, 74, 0.75);
  border-radius: 14px;
  background: rgba(4, 14, 26, 0.88);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.performance-hint button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: #f7d84a;
  color: #061421;
  font-weight: 950;
}

.performance-hint .performance-hint-close {
  min-height: 32px;
  width: 32px;
  padding: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
}

/* Elfmeter-Knopf: für wen der Elfmeter ist (Nachbesserung 29.09.2026, Game-Design-Test V4). */
.controls .action .penalty-for {
  display: block;
  margin-top: 2px;
  font-size: clamp(11px, 0.85vw, 14px);
  font-weight: 800;
  opacity: 0.88;
  text-transform: none;
  letter-spacing: 0;
}

.controls .action .penalty-for:empty {
  display: none;
}

/* Zurück ins laufende Spiel (V17). */
#setup .setup-resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 0 0 12px;
  padding: 0 20px;
  font-size: clamp(15px, 1.15vw, 18px);
}

#setup .setup-resume[hidden] {
  display: none;
}

/* Elfmeter-Dialog: Aufgabe groß genug für die letzte Reihe (V5). */
.penalty-card .penalty-prompt-card strong {
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 1.1;
}

/* Die Aufgabe besteht aus span-Elementen; styles.css setzt „.penalty-prompt-card span“ auf 12 px für das
   Etikett. In der Aufgabe gilt die Schriftgröße der Karte (Fehler in 1.1.0, gefunden bei der Reel-Aufnahme). */
.penalty-card .penalty-prompt-card strong span {
  font-size: 1em;
  color: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.penalty-card .penalty-prompt-card strong .mc-text {
  font-size: 0.62em;
}

/* Pausenbild (Game-Design-Test V27): deckt Aufgabe und Spielfeld ab. */
.pause-cover {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  background: rgba(4, 14, 26, 0.9);
  backdrop-filter: blur(14px);
  color: #fff;
}

.pause-cover strong {
  font-size: clamp(56px, 8vw, 120px);
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pause-cover span {
  font-size: clamp(16px, 1.5vw, 24px);
  font-weight: 800;
  color: #d6e8f2;
}

/* ----- Season-Tour (29.09.2026): Einladung im Season-Bereich und Kapitel mit animierter Bühne ----- */
.season-tour-invite {
  display: none;
  align-items: center;
  gap: 14px;
  margin: 10px 0 12px;
  padding: 12px 16px;
  border: 2px solid rgba(255, 210, 63, 0.85);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 0% 50%, rgba(255, 210, 63, 0.28), transparent 55%),
    rgba(12, 32, 52, 0.86);
  box-shadow: 0 0 26px rgba(255, 210, 63, 0.18);
}

body.season-mode-on .season-tour-invite {
  display: flex;
}

.season-tour-invite > div {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.season-tour-invite strong {
  color: #fff3c4;
  font-size: 1.15rem;
}

.season-tour-invite small {
  color: rgba(240, 248, 255, 0.86);
  font-size: 0.92rem;
}

.season-tour-invite-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.season-tour-invite .tool.primary {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 20px;
  font-size: 1rem;
}

@media (max-width: 760px) {
  .season-tour-invite {
    flex-wrap: wrap;
  }

  .season-tour-invite .tool.primary {
    width: 100%;
  }
}

.mc-st {
  display: grid;
  gap: 10px;
}

.mc-st-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 22px;
  background-color: #cfe9ff;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.mc-st-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 960px;
  height: 600px;
  transform: scale(var(--mc-st-scale, 1));
  transform-origin: 0 0;
}

.mc-st-scene {
  position: absolute;
  inset: 0;
  color: #17324a;
  font-family: "Nunito", "Arial Rounded MT Bold", "Varela Round", Inter, Aptos, "Segoe UI", Arial, sans-serif;
}

.mc-st-caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
}

.mc-st-progress {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
}

.mc-st-progress i {
  flex: 1 1 0;
  height: 6px;
  border-radius: 999px;
  background: rgba(23, 50, 74, 0.14);
}

.mc-st-progress i.is-done {
  background: #2f6fd6;
}

.mc-st-progress i.is-current {
  background: linear-gradient(90deg, #2f6fd6 50%, rgba(23, 50, 74, 0.14) 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
}

.mc-st.is-playing .mc-st-progress i.is-current {
  animation: mcStProgress var(--mc-st-step-ms, 8000ms) linear both;
}

@keyframes mcStProgress {
  to {
    background-position: 0 0;
  }
}

.mc-st-text small {
  color: #2459b3;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mc-st-text h3 {
  margin: 2px 0 4px;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 900;
}

.mc-st-text p {
  margin: 0;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.4;
}

.mc-st-controls {
  display: flex;
  gap: 8px;
}

.mc-st-controls button {
  min-height: 44px;
  padding: 6px 16px;
  border: 2px solid rgba(47, 111, 214, 0.25);
  border-radius: 999px;
  background: #fff;
  color: #2459b3;
  font-size: 15px;
  font-weight: 900;
}

.mc-st-controls button:disabled {
  opacity: 0.4;
}

.mc-st-controls .mc-st-next {
  border-color: #e0a91d;
  background: #ffd23f;
  color: #17324a;
}

@media (max-width: 760px) {
  .mc-st-caption {
    grid-template-columns: 1fr;
  }
}

/* Tour-Kapitel „Sichern & Einstellungen“ */
.mc-st-tools {
  grid-template-rows: repeat(4, 1fr);
  gap: 18px;
}

.mc-st-tools .mc-st-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 20px;
  row-gap: 2px;
  padding: 18px 26px;
  color: #17324a;
  font-size: 30px;
}

.mc-st-tools .mc-st-tool-icon {
  grid-row: 1 / span 2;
}

.mc-st-tools .mc-st-row small {
  grid-column: 2;
  font-size: 20px;
  color: #3d5a73;
}

.mc-st-tool-icon svg {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: #17324a;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Bühne: 960 × 600, alle Maße in Bühnenpixeln */
.mc-st-spot {
  border: 3px solid transparent;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0.38;
  transition: opacity 0.3s;
}

.mc-st-scene[data-step="0"] .mc-st-spot-0,
.mc-st-scene[data-step="1"] .mc-st-spot-1,
.mc-st-scene[data-step="2"] .mc-st-spot-2,
.mc-st-scene[data-step="3"] .mc-st-spot-3 {
  border-color: #ffd23f;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(23, 50, 74, 0.22);
  opacity: 1;
  animation: mcStFadeIn 0.5s both;
}

@keyframes mcStFadeIn {
  from {
    opacity: 0.38;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes mcStPopIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes mcStFadeOut {
  to {
    opacity: 0;
  }
}

@keyframes mcStPress {
  0%,
  100% {
    transform: none;
  }
  45% {
    transform: scale(0.92);
    filter: brightness(1.1);
  }
}

@keyframes mcStGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 210, 63, 0);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 210, 63, 0.45);
  }
}

.mc-st-stack {
  position: absolute;
  inset: 30px 56px;
  display: grid;
  grid-template-rows: 1.3fr 1fr 0.8fr;
  gap: 16px;
}

.mc-st-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 12px 18px;
}

.mc-st-main {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 26px;
  font-weight: 900;
}

.mc-st-emblem {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(23, 50, 74, 0.28));
}

.mc-st-term {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 0 28px;
}

.mc-st-term b {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #ffd23f;
  color: #17324a;
  font-size: 24px;
  font-weight: 900;
}

.mc-st-term small,
.mc-st-rotation small,
.mc-st-label,
.mc-st-field small,
.mc-st-award small,
.mc-st-ceremony small,
.mc-st-backup small,
.mc-st-kicker {
  color: #2459b3;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mc-st-pairs {
  justify-content: space-between;
}

.mc-st-pairlist {
  display: flex;
  gap: 8px;
}

.mc-st-pair {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.mc-st-rotation {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 4px 14px;
  font-size: 19px;
  font-weight: 800;
}

.mc-st-standing {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
}

.mc-st-standing em {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: #c2410c;
  font-style: normal;
  font-weight: 900;
}

.mc-st-num {
  display: inline-grid;
}

.mc-st-num i {
  grid-area: 1 / 1;
  font-style: normal;
}

.mc-st-after {
  opacity: 0;
}

.mc-st-scene-season-idee[data-step="2"] .mc-st-before,
.mc-st-scene-season-spieltag[data-step="3"] .mc-st-before {
  animation: mcStFadeOut 0.3s 1.6s both;
}

.mc-st-scene-season-idee[data-step="2"] .mc-st-after,
.mc-st-scene-season-spieltag[data-step="3"] .mc-st-after {
  animation: mcStPopIn 0.45s 1.8s both;
}

.mc-st-scene-season-idee[data-step="1"] .mc-st-pair {
  animation: mcStPopIn 0.5s both;
}

.mc-st-scene-season-idee[data-step="1"] .mc-st-pair:nth-child(2) {
  animation-delay: 0.3s;
}

.mc-st-mini {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.mc-st-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #e7f0ff;
  color: #2459b3;
  font-size: 17px;
  font-weight: 900;
}

.mc-st-chip-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.mc-st-image-missing {
  display: inline-block;
  border-radius: 50%;
  background: rgba(23, 50, 74, 0.12);
}

/* Einrichten */
.mc-st-card {
  position: absolute;
  inset: 26px 40px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px 28px;
  border-radius: 26px;
  background: rgba(246, 251, 255, 0.9);
  box-shadow: 0 20px 50px rgba(23, 50, 74, 0.25);
}

.mc-st-kicker {
  margin: 0;
}

.mc-st-setup .mc-st-row {
  justify-content: flex-start;
  min-height: 84px;
}

.mc-st-switch {
  position: relative;
  width: 60px;
  height: 34px;
  border-radius: 999px;
  background: rgba(23, 50, 74, 0.22);
}

.mc-st-switch i {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
}

.mc-st-scene-season-einrichten[data-step="0"] .mc-st-switch {
  animation: mcStSwitchOn 0.4s 0.8s both;
}

.mc-st-scene-season-einrichten[data-step="0"] .mc-st-switch i {
  animation: mcStSwitchThumb 0.4s 0.8s both;
}

.mc-st-scene-season-einrichten:not([data-step="0"]) .mc-st-switch {
  background: #22a35a;
}

.mc-st-scene-season-einrichten:not([data-step="0"]) .mc-st-switch i {
  transform: translateX(26px);
}

@keyframes mcStSwitchOn {
  to {
    background: #22a35a;
  }
}

@keyframes mcStSwitchThumb {
  to {
    transform: translateX(26px);
  }
}

.mc-st-toggle-row b {
  margin-right: 10px;
  font-size: 21px;
}

.mc-st-mini-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid rgba(47, 111, 214, 0.25);
  border-radius: 14px;
  background: #fff;
  font-size: 17px;
  font-weight: 900;
}

.mc-st-mini-card small {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffd23f;
  font-size: 14px;
}

.mc-st-scene-season-einrichten[data-step="0"] .mc-st-mini-card-1 {
  animation: mcStPopIn 0.5s 1.4s both;
}

.mc-st-scene-season-einrichten[data-step="0"] .mc-st-mini-card-2 {
  animation: mcStPopIn 0.5s 1.7s both;
}

.mc-st-field {
  display: grid;
  gap: 2px;
  min-width: 220px;
  padding: 8px 14px;
  border: 2px solid rgba(47, 111, 214, 0.2);
  border-radius: 12px;
  background: #fff;
  font-size: 19px;
  font-weight: 800;
}

.mc-st-teams {
  gap: 34px;
}

.mc-st-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 800;
}

.mc-st-team b {
  margin-right: 6px;
}

.mc-st-pair-small {
  width: 42px;
  height: 42px;
  object-fit: contain;
  vertical-align: middle;
}

.mc-st-scene-season-einrichten[data-step="3"] .mc-st-pair-small {
  animation: mcStPopIn 0.45s both;
}

/* Spieltag */
.mc-st-hub-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 14px;
  height: 470px;
}

.mc-st-side {
  display: grid;
  gap: 10px;
}

.mc-st-panel {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 8px;
  padding: 14px 16px;
}

.mc-st-ready {
  color: #1d7f45;
  font-size: 16px;
  font-weight: 900;
}

.mc-st-rule-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mc-st-rule-chips span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff3c4;
  color: #8a5a00;
  font-size: 15px;
  font-weight: 900;
}

.mc-st-fixture {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 900;
}

.mc-st-button {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: #ffd23f;
  color: #17324a;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(217, 151, 26, 0.3);
}

.mc-st-scene-season-spieltag[data-step="2"] .mc-st-start {
  animation: mcStGlow 1.2s 0.6s both, mcStPress 0.5s 1.8s both;
}

.mc-st-scene-season-spieltag[data-step="3"] .mc-st-save {
  animation: mcStGlow 1.2s 0.4s both, mcStPress 0.5s 1.4s both;
}

.mc-st-saved {
  color: #1d7f45;
  font-size: 15px;
  font-weight: 900;
  opacity: 0;
}

.mc-st-scene-season-spieltag[data-step="3"] .mc-st-saved {
  animation: mcStPopIn 0.45s 1.9s both;
}

/* Ehrung & Sicherung */
.mc-st-awards {
  gap: 18px;
}

.mc-st-award {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 220px;
  padding: 10px;
  border: 2px solid rgba(255, 210, 63, 0.7);
  border-radius: 16px;
  background: #fff;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.mc-st-award-icon {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.mc-st-scene-season-ehrung[data-step="0"] .mc-st-award {
  animation: mcStPopIn 0.5s both;
}

.mc-st-scene-season-ehrung[data-step="0"] .mc-st-award:nth-child(2) { animation-delay: 0.35s; }
.mc-st-scene-season-ehrung[data-step="0"] .mc-st-award:nth-child(3) { animation-delay: 0.7s; }

.mc-st-ceremony span,
.mc-st-backup span {
  display: grid;
  gap: 4px;
  font-size: 25px;
  font-weight: 900;
}

.mc-st-cup {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.mc-st-scene-season-ehrung[data-step="1"] .mc-st-cup {
  animation: mcStPopIn 0.6s 0.4s both, mcStCupShine 1.4s 1s 2 both;
}

@keyframes mcStCupShine {
  50% {
    filter: drop-shadow(0 0 30px rgba(255, 190, 30, 0.9));
  }
}

.mc-st-backup svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: #2f6fd6;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mc-st-scene-season-ehrung[data-step="2"] .mc-st-backup-arrow {
  animation: mcStBackupDrop 1.2s 0.5s 2 both;
}

@keyframes mcStBackupDrop {
  0% {
    opacity: 0.3;
    transform: translateY(-6px);
  }
  60%,
  100% {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mc-st-scene *,
  .mc-st-progress i {
    animation: none !important;
  }

  .mc-st-after {
    opacity: 1;
  }

  .mc-st-before {
    opacity: 0;
  }
}

/* Season-Tour: Der Rahmen bleibt breit (Reiter in einer Zeile, Schrittext in voller Breite);
   nur die Bühne richtet sich nach der Bildhöhe (1280 × 720: Reiter stapelten sich, Text lief heraus). */
.mc-tour.mc-tour-season {
  width: min(1000px, 100%);
  min-width: 0;
}

.mc-tour-season .mc-st-stage {
  width: min(100%, calc((100dvh - 330px) * 1.6));
  justify-self: center;
}

.mc-tour-season .mc-st-caption {
  width: min(100%, 900px);
  justify-self: center;
}

@media (max-height: 760px) {
  .mc-tour-season .mc-st-text h3 {
    font-size: 19px;
  }

  .mc-tour-season .mc-st-text p {
    font-size: 15px;
  }

  .mc-tour-season .mc-st-controls button {
    min-height: 40px;
  }
}

.mc-st-rotation b {
  font-size: 17px;
  white-space: nowrap;
}

/* Neues Gerät: „Sicherung laden“ neben „Aufgaben erstellen“ (QA 01.10.2026). */
.mc-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Darstellungsprüfung 02.10.2026: Die Pokalkarte nach einer Stufe (Normal-, Challenge-, Elite-Pokal)
   war bei 1280×720 etwa 12 px höher als der Bildschirm. Auf niedrigen Bildschirmen etwas kompakter.
   Die Grundschul-Edition hat eigene, schon passende Maße und bleibt unverändert. */
@media (max-height: 760px) {
  body:not(.edition-grundschule) .result-card.transition-result {
    --mode-result-trophy-size: clamp(110px, 21vh, 160px);
    padding-top: clamp(16px, 3dvh, 24px);
    padding-bottom: clamp(16px, 3dvh, 24px);
  }

  body:not(.edition-grundschule) .result-card.transition-result h2 {
    margin-bottom: 12px;
  }
}

/* Darstellungsprüfung 02.10.2026: Im Season Hub brach „Noch keine Auszeichnungen“ bei 1024×768
   mitten im Wort um („Auszeichn-ungen“). Die Überschrift rückt jetzt bei Platzmangel in eine eigene
   Zeile; nur ein Wort, das allein nicht passt, wird noch umgebrochen. */
.season-awards-preview-header {
  flex-wrap: wrap;
}

.season-awards-preview-header > strong {
  overflow-wrap: break-word;
}

/* Darstellungsprüfung 02.10.2026: Possession Rush schnitt den Teamnamen („LIONS“) oben/unten um
   einige Pixel an (Zeilenhöhe 0,92 mit overflow: hidden). Waagerecht bleibt er begrenzt,
   senkrecht darf die Schrift über die knappe Zeilenbox hinausragen. */
body.possession-rush-active #possessionRushTeam {
  overflow: hidden;
  overflow: clip visible;
}
