/* 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;
}

.mc-task-list {
  display: grid;
  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.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;
}

.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;
}

.mc-sup {
  font-size: 1em;
}

.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(250px, 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;
}

.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;
  }
}

#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%);
}

/* ---------------------------------------------------------------------------
   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;
}
