/* ---------- Minus-Metro - U-Bahn-Station (nur metro_-Praefix) ----------
   Idee: Die Seite ist eine U-Bahn-Station. Gemalte Kulisse (kulisse.svg,
   Generator .zcode/minusmetro-kulisse.cjs), Kopfzeile als Bahnsteig-Konsole
   mit Linienband, Punktezeile als Abfahrtstafel (LED in Bernstein),
   Aufgaben-Buehne als Stations-Schild mit LED-Anzeigen, Zahlenstrahl als
   Gleis mit Schwellen und Schienen. Markup und Klassen bleiben wie vorher,
   nur die Optik ist neu (Muster Bruch-Pizza/Zeitmeister/Wortwunder).

   WICHTIG (Lehren aus den Parallel-GUI-Neubauten):
   - Alle Regeln an body.jupi.mm_body gekettet - die Plattform-Regeln
     (html[data-theme="dark"] .jupi_header, .jupi_container > .jupi_main)
     sind sonst gleich stark oder staerker und gewinnen.
   - Dunkelmodus ueber umgeschaltete --mm-*-Variablen, damit es keine
     Regel-Schlachten pro Element gibt.
------------------------------------------------------------------ */

/* ---------- Farben (hell = Tagbetrieb) ---------- */
:root {
  --mm-navy: #123a5c;          /* Metro-Blau der Leiste/Schilder */
  --mm-navy-tief: #0d2c47;
  --mm-tafel: #16232e;         /* Anzeigetafel (LED-Grund) */
  --mm-tafel-rahmen: #0d2c47;
  --mm-tafel-label: #9db2c4;
  --mm-amber: #ffc857;         /* LED-Schrift */
  --mm-papier: #f4efe0;        /* Schild-Flaechen */
  --mm-papier-hell: #fdfaf1;
  --mm-text: #1d3346;
  --mm-text-leise: #5b7186;
  --mm-gelb: #f2c94c;          /* Bahn-Gelb */
  --mm-gelb-tief: #d9a92e;
  --mm-blau: #1b81c2;          /* Zahlenstrahl minus */
  --mm-gruen: #2f8a44;         /* Zahlenstrahl plus */
  --mm-rot: #c0392b;
  --mm-titel: #123a5c;
  --mm-strahl-minus: #2a4a63;  /* Gleisbett am Zahlenstrahl: Tunnel-Seite */
  --mm-strahl-plus: #cfe6d3;   /* Gleisbett: Tageslicht-Seite */
}

/* ---------- Dunkelmodus: Nachtbetrieb ---------- */
html[data-theme="dark"] {
  --mm-navy: #10334f;
  --mm-navy-tief: #0a2136;
  --mm-tafel: #101b24;
  --mm-tafel-rahmen: #27435c;
  --mm-tafel-label: #8fa6b8;
  --mm-amber: #ffc857;
  --mm-papier: #22303c;
  --mm-papier-hell: #2a3945;
  --mm-text: #e9eff5;
  --mm-text-leise: #a9bccb;
  --mm-gelb: #f2c94c;
  --mm-gelb-tief: #c79d22;
  --mm-blau: #6fc3ef;
  --mm-gruen: #7fd48a;
  --mm-rot: #ff9d8f;
  --mm-titel: #8fc3ea;
  --mm-strahl-minus: #1c3145;
  --mm-strahl-plus: #31544a;
}

/* ================= Szene: U-Bahn-Station ================= */
body.jupi.mm_body {
  background: #c9d4d8 url("kulisse.svg") center top / cover fixed no-repeat;
  color: var(--mm-text);
}
/* Im Dunkelmodus wird die Station zur Nachtschicht: gleiches Bild, aber
   GEDAEMPFt. Achtung: die Plattform setzt "html[data-theme=dark] body.jupi" -
   das ist spezifischer als "body.jupi.mm_body". Darum traegt die Dunkel-Regel
   den Zusatz "html[data-theme=dark]" mit. */
html[data-theme="dark"] body.jupi.mm_body {
  background-color: #16232e;
  background-image: url("kulisse.svg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-blend-mode: multiply;
  filter: brightness(.88) saturate(.85);
}

/* Das Plattform-Grid streckt sonst die Kopfzeile (Lehre Satz-Dungeon/
   Numbergeddon): Zeilen selbst festlegen und oben buendig beginnen. */
body.jupi.mm_body .jupi_container {
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
}
body.jupi.mm_body .jupi_main {
  background: transparent;
  padding: .7rem 1rem 0;
}
/* Spielbereich auf Schildbreite begrenzen - die Kulisse bleibt an den
   Seiten sichtbar (Muster Bruch-Pizza-Konsole). */
body.jupi.mm_body .metro_panel,
body.jupi.mm_body .metro_gleis,
body.jupi.mm_body .metro_stage,
body.jupi.mm_body .metro_done {
  max-width: 60rem;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Kopfzeile: Bahnsteig-Konsole ---------- */
body.jupi.mm_body .metro_header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .8rem;
  padding: .55rem 1rem .65rem;
  background: linear-gradient(180deg, #17425f 0%, var(--mm-navy) 48%, var(--mm-navy-tief) 100%);
  border-bottom: none;
  box-shadow: 0 6px 18px rgba(9, 26, 40, .45);
  backdrop-filter: none;
}
/* Linienband an der Unterkante: blau (minus) -> gruen (plus), wie der
   Zahlenstrahl. */
body.jupi.mm_body .metro_header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--mm-blau) 0 50%, var(--mm-gruen) 50% 100%);
}

/* Marke auf einem Stations-Schild */
body.jupi.mm_body .metro_brand {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  background: linear-gradient(180deg, #fffdf6, #efe9d6);
  border: 3px solid var(--mm-navy-tief);
  border-radius: 14px;
  padding: .3rem .85rem .3rem .45rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .4), inset 0 2px 0 rgba(255, 255, 255, .7);
}
body.jupi.mm_body .metro_brand img {
  display: block;
  width: 40px;
  height: 40px;
}
body.jupi.mm_body .metro_brand h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--mm-navy);
  white-space: nowrap;
}

/* Zurueck-Link als kleines Hinweisschild */
body.jupi.mm_body .metro_header .jupi_nav_back {
  position: static;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .4rem .85rem;
  background: linear-gradient(180deg, #fffdf6, #efe9d6);
  color: var(--mm-navy);
  font-weight: 800;
  font-size: .88rem;
  border: 2px solid var(--mm-navy-tief);
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
  text-decoration: none;
  white-space: nowrap;
}
body.jupi.mm_body .metro_header .jupi_nav_back:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

/* Werkzeuge: Sprachwahl und Dark-Mode in dunklen Mulden der Konsole */
body.jupi.mm_body .metro_header .jupi_werkzeuge {
  position: static;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: .45rem;
}
body.jupi.mm_body .metro_header .jupi_sprachen_select {
  min-height: 40px;
  width: 10.5rem;
  padding: .35rem .6rem;
  border: 2px solid #2c5170;
  border-radius: 10px;
  background: rgba(9, 26, 40, .55);
  color: #eaf1f7;
  font-size: .9rem;
  font-weight: 700;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4);
}
body.jupi.mm_body .metro_header .jupi_sprachen_select:hover {
  background: rgba(9, 26, 40, .75);
}
body.jupi.mm_body .metro_header .jupi_sprachen_select option {
  color: #212121;
  background: #ffffff;
}
body.jupi.mm_body .metro_header .jupi_theme_switch {
  width: 74px;
  height: 40px;
  min-width: 74px;
  padding: 0;
  background: rgba(9, 26, 40, .55);
  border: 2px solid #2c5170;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5), 0 3px 8px rgba(0, 0, 0, .3);
}
body.jupi.mm_body .metro_header .jupi_theme_switch:hover {
  background: rgba(9, 26, 40, .75);
}
body.jupi.mm_body .metro_header .jts_thumb {
  top: 3px;
  bottom: auto;
  left: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f2e9d0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] body.jupi.mm_body .metro_header .jts_thumb {
  left: calc(100% - 36px);
}
body.jupi.mm_body .metro_header .jts_sun { left: 9px; }
body.jupi.mm_body .metro_header .jts_moon { right: 9px; }
html[data-theme="dark"] body.jupi.mm_body .metro_header .jts_sun { color: #ffd98a; }
html[data-theme="dark"] body.jupi.mm_body .metro_header .jts_moon { color: #cfd8ff; }

/* ================= Punktezeile: Abfahrtstafel (LED) ================= */
body.jupi.mm_body .metro_panel {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.15rem;
  align-items: center;
  margin-top: .9rem;
  margin-bottom: .9rem;
  padding: .7rem 1rem;
  background: linear-gradient(180deg, #1d3140 0%, var(--mm-tafel) 70%);
  border: 2px solid var(--mm-tafel-rahmen);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(9, 26, 40, .35), inset 0 2px 0 rgba(255, 255, 255, .07);
}
body.jupi.mm_body .metro_stat {
  display: flex;
  flex-direction: column;
  min-width: 4.1rem;
}
body.jupi.mm_body .metro_stat + .metro_stat {
  border-left: 1px solid rgba(157, 178, 196, .28);
  padding-left: 1.1rem;
}
body.jupi.mm_body .metro_stat label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--mm-tafel-label);
}
body.jupi.mm_body .metro_stat span {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--mm-amber);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(255, 200, 87, .35);
}
body.jupi.mm_body .metro_controls {
  margin-left: auto;
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}
body.jupi.mm_body .metro_controls label {
  font-weight: 700;
  font-size: .9rem;
  color: #d7e2ea;
}
body.jupi.mm_body .metro_controls .jupi_select,
body.jupi.mm_body #metro_level {
  min-height: 40px;
  padding: .4rem .7rem;
  font-size: .95rem;
  font-weight: 700;
  border-radius: 10px;
  border: 2px solid #2c5170;
  background: #0f1c26;
  color: #eaf1f7;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4);
}
body.jupi.mm_body .metro_controls option {
  color: #212121;
  background: #ffffff;
}
/* Hilfe und Ton als helle Schild-Pillen vor der dunklen Tafel */
body.jupi.mm_body .metro_panel .jupi_btn {
  min-height: 40px;
  min-width: 40px;
  padding: .35rem .8rem;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1;
  color: var(--mm-navy);
  background: linear-gradient(180deg, #fffdf6, #efe9d6);
  border: 2px solid var(--mm-navy-tief);
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .4), inset 0 2px 0 rgba(255, 255, 255, .7);
  transition: transform .1s, box-shadow .12s;
}
body.jupi.mm_body .metro_panel .jupi_btn:hover {
  transform: translateY(-1px);
  background: #ffffff;
}
body.jupi.mm_body .metro_panel .jupi_btn:active {
  transform: translateY(0);
}

/* ================= Gleis: die Bahn rueckt weiter ================= */
body.jupi.mm_body .metro_gleis {
  position: relative;
  margin-bottom: .9rem;
  padding: .55rem .8rem .75rem;
  background: linear-gradient(180deg, #1d3140 0%, var(--mm-tafel) 70%);
  border: 2px solid var(--mm-tafel-rahmen);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(9, 26, 40, .35), inset 0 2px 0 rgba(255, 255, 255, .07);
}
body.jupi.mm_body .metro_bahn {
  position: absolute;
  bottom: 1.55rem;
  left: 0;
  z-index: 2;
  font-size: 2.1rem;
  transition: left .6s ease;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45));
}
body.jupi.mm_body .metro_schiene {
  position: relative;
  height: 18px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--mm-navy-tief);
  /* Schotterbett mit Schwellen */
  background:
    repeating-linear-gradient(90deg, rgba(74, 54, 39, .85) 0 10px, transparent 10px 26px),
    #22303c;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .5);
}
/* Zwei Schienen als hellere Laeufe oben und unten */
body.jupi.mm_body .metro_schiene::before,
body.jupi.mm_body .metro_schiene::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8f9ca7, #b9c4cd, #8f9ca7);
  z-index: 1;
}
body.jupi.mm_body .metro_schiene::before { top: 3px; }
body.jupi.mm_body .metro_schiene::after { bottom: 3px; }
body.jupi.mm_body .metro_fortschritt {
  height: 100%;
  width: 0;
  border-radius: 0;
  background: linear-gradient(90deg, var(--mm-blau), var(--mm-gruen));
  transition: width .6s ease;
}
body.jupi.mm_body .metro_endstation {
  position: absolute;
  right: .9rem;
  bottom: 1.3rem;
  font-size: 1.7rem;
  z-index: 2;
}

/* ================= Buehne: Stations-Schild mit LED-Anzeigen ================= */
body.jupi.mm_body .metro_stage {
  position: relative;
  padding: 1rem 1.1rem 1.2rem;
  background: linear-gradient(180deg, var(--mm-papier-hell), var(--mm-papier));
  border: 3px solid var(--mm-navy);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(9, 26, 40, .35), inset 0 2px 0 rgba(255, 255, 255, .65);
  overflow: hidden;
}
/* Linienband als Schild-Abschluss oben */
body.jupi.mm_body .metro_stage::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--mm-blau) 0 50%, var(--mm-gruen) 50% 100%);
}
body.jupi.mm_body .metro_task_label {
  display: inline-block;
  margin: .2rem 0 .75rem;
  padding: .3rem .85rem;
  background: var(--mm-navy);
  color: #ffffff;
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .04em;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(9, 26, 40, .4);
}

/* Aufgabentext auf der LED-Anzeige */
body.jupi.mm_body .metro_aufgabe {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: .9rem 1rem;
  background: radial-gradient(130% 170% at 50% 0%, #22384a 0%, var(--mm-tafel) 62%);
  border: 2px solid var(--mm-tafel-rahmen);
  border-radius: 12px;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .55), 0 2px 0 rgba(255, 255, 255, .45);
  color: var(--mm-amber);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px rgba(255, 200, 87, .22);
}
body.jupi.mm_body .metro_icon { flex: none; }

/* Die Rechnung gross auf der zweiten Anzeige */
body.jupi.mm_body .metro_rechnung {
  margin: .75rem 0 0;
  padding: .55rem 1rem;
  background: radial-gradient(130% 190% at 50% 0%, #22384a 0%, var(--mm-tafel) 62%);
  border: 2px solid var(--mm-tafel-rahmen);
  border-radius: 12px;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .55), 0 2px 0 rgba(255, 255, 255, .45);
  color: var(--mm-amber);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(255, 200, 87, .35);
}

/* ---------- Zahlenstrahl als Gleis am Bahnsteig ---------- */
/* Abstand grosszuegig: ueber der Leiste haengt das "0"-Schildchen */
body.jupi.mm_body .metro_strahl { margin-top: 1.8rem; }
body.jupi.mm_body .metro_strahl_leiste {
  position: relative;
  height: 2.8rem;
  border-radius: 8px;
  border: 2px solid var(--mm-navy-tief);
  /* links (minus) liegt im Tunnel-Schatten, rechts (plus) im Tageslicht,
     darueber Schwellen; KEIN overflow:hidden - der Zug schaut oben raus */
  background:
    repeating-linear-gradient(90deg, rgba(74, 54, 39, .8) 0 8px, transparent 8px 24px),
    linear-gradient(90deg, var(--mm-strahl-minus) 0 50%, var(--mm-strahl-plus) 50% 100%);
  box-shadow:
    inset 0 5px 0 -2px #9aa7b1,
    inset 0 -5px 0 -2px #9aa7b1,
    inset 0 3px 7px rgba(0, 0, 0, .3);
}
body.jupi.mm_body .metro_strahl_null {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 5px;
  left: 50%;
  background: var(--mm-navy-tief);
  border-radius: 2px;
  z-index: 1;
}
body.jupi.mm_body .metro_strahl_null::after {
  content: "0";
  position: absolute;
  top: -1.55rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 .35rem;
  font-size: .85rem;
  font-weight: 800;
  color: var(--mm-titel);
  background: var(--mm-papier-hell);
  border-radius: .4rem;
}
body.jupi.mm_body .metro_zug {
  position: absolute;
  bottom: .1rem;
  z-index: 2;
  font-size: 1.6rem;
  transform: translateX(-50%);
  transition: left .5s ease;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .4));
}
body.jupi.mm_body .metro_startpunkt {
  position: absolute;
  bottom: .85rem;
  width: .85rem;
  height: .85rem;
  border-radius: 50%;
  background: var(--mm-blau);
  border: 2px solid var(--mm-navy-tief);
  transform: translateX(-50%);
  z-index: 1;
}
body.jupi.mm_body .metro_zug svg,
body.jupi.mm_body .metro_bahn svg,
body.jupi.mm_body .metro_endstation svg { display: block; }

/* ---------- Eingabe und Knöpfe ---------- */
body.jupi.mm_body .metro_zeile {
  display: flex;
  gap: .6rem;
  align-items: center;
  margin-top: 1.05rem;
  flex-wrap: wrap;
}
body.jupi.mm_body .metro_eingabe {
  flex: 1 1 10rem;
  min-width: 8rem;
  min-height: 46px;
  padding: .55rem .8rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--mm-text);
  background: var(--mm-papier-hell);
  border: 3px solid var(--mm-navy);
  border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(9, 26, 40, .08);
}
body.jupi.mm_body .metro_eingabe:focus-visible {
  outline: 3px solid var(--mm-blau);
  outline-offset: 1px;
}
/* Der Pruefen-Knopf in Bahn-Gelb - die Farbe der Zuege */
body.jupi.mm_body .metro_zeile .jupi_btn {
  min-height: 46px;
  padding: .5rem .95rem;
  font-size: .98rem;
  font-weight: 800;
  color: var(--mm-navy-tief);
  background: linear-gradient(180deg, #f7d868, var(--mm-gelb-tief));
  border: 2px solid var(--mm-navy-tief);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(9, 26, 40, .35), inset 0 2px 0 rgba(255, 255, 255, .5);
  transition: transform .1s, box-shadow .12s;
}
body.jupi.mm_body .metro_zeile .jupi_btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(9, 26, 40, .4), inset 0 2px 0 rgba(255, 255, 255, .5);
}
body.jupi.mm_body .metro_zeile .jupi_btn:active {
  transform: translateY(0);
}
body.jupi.mm_body .metro_btns_row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .9rem;
}
body.jupi.mm_body .metro_btns_row .jupi_btn {
  min-height: 44px;
  padding: .5rem .9rem;
  font-size: .95rem;
  font-weight: 800;
  color: var(--mm-navy);
  background: linear-gradient(180deg, #fffdf6, #efe9d6);
  border: 2px solid var(--mm-navy-tief);
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(9, 26, 40, .25), inset 0 2px 0 rgba(255, 255, 255, .7);
  transition: transform .1s;
}
html[data-theme="dark"] body.jupi.mm_body .metro_btns_row .jupi_btn {
  color: #f4e9c8;
  background: linear-gradient(180deg, #33475a, #243543);
  border-color: #0a2136;
}
body.jupi.mm_body .metro_btns_row .jupi_btn:hover {
  transform: translateY(-1px);
}
body.jupi.mm_body .metro_msg {
  min-height: 2.4rem;
  margin-top: .7rem;
  font-weight: 700;
  line-height: 1.5;
}
body.jupi.mm_body .metro_msg_ok { color: var(--mm-gruen); }
body.jupi.mm_body .metro_msg_err { color: var(--mm-rot); }

/* ================= Rundenende: Endstation-Schild ================= */
body.jupi.mm_body .metro_done {
  position: relative;
  margin-top: 1rem;
  padding: 1.6rem 1.2rem;
  text-align: center;
  background: linear-gradient(180deg, var(--mm-papier-hell), var(--mm-papier));
  border: 3px solid var(--mm-navy);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(9, 26, 40, .35), inset 0 2px 0 rgba(255, 255, 255, .65);
  overflow: hidden;
}
body.jupi.mm_body .metro_done::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--mm-blau) 0 50%, var(--mm-gruen) 50% 100%);
}
body.jupi.mm_body .metro_done h3 {
  margin: .2rem 0 .5rem;
  font-size: 1.55rem;
  letter-spacing: .03em;
  color: var(--mm-titel);
}
body.jupi.mm_body .metro_done p {
  margin: .3rem auto .8rem;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.5;
}
body.jupi.mm_body .metro_sterne {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
body.jupi.mm_body .metro_done .jupi_btn {
  min-height: 44px;
  padding: .55rem 1.4rem;
  font-weight: 800;
  color: var(--mm-navy-tief);
  background: linear-gradient(180deg, #f7d868, var(--mm-gelb-tief));
  border: 2px solid var(--mm-navy-tief);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(9, 26, 40, .35), inset 0 2px 0 rgba(255, 255, 255, .5);
}
html[data-theme="dark"] body.jupi.mm_body .metro_done .jupi_btn {
  color: #10222f;
}

/* ================= ❓-Hilfe-Fenster ================= */
dialog.metro_modal {
  padding: 0;
  width: 92%;
  max-width: 38rem;
  max-height: 90vh;
  margin: auto;
  border: 3px solid var(--mm-navy);
  border-radius: 16px;
  background: var(--mm-papier);
  color: var(--mm-text);
  box-shadow: 0 14px 38px rgba(9, 26, 40, .4);
}
dialog.metro_modal::backdrop {
  background: rgba(9, 26, 40, .6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
body.jupi.mm_body .metro_modal_kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .9rem 1.2rem;
  background: linear-gradient(180deg, #17425f, var(--mm-navy-tief));
  border-bottom: none;
}
body.jupi.mm_body .metro_modal_kopf h2 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  color: #ffffff;
}
body.jupi.mm_body .metro_modal_zu {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #d7e2ea;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: .5rem;
}
body.jupi.mm_body .metro_modal_zu:hover {
  background: rgba(255, 255, 255, .14);
  color: #ffffff;
}
body.jupi.mm_body .metro_modal_body {
  padding: 1.1rem 1.3rem;
  overflow-y: auto;
  max-height: calc(90vh - 120px);
  line-height: 1.5;
}
body.jupi.mm_body .metro_modal_body h3 {
  margin: .8rem 0 .4rem;
  font-size: 1.05rem;
  color: var(--mm-titel);
}
body.jupi.mm_body .metro_modal_body h3:first-child {
  margin-top: .2rem;
}
body.jupi.mm_body .metro_modal_body h4 {
  margin: 1.1rem 0 .4rem;
  font-size: 1rem;
  color: var(--mm-titel);
}
body.jupi.mm_body .metro_modal_body ul {
  margin: .4rem 0 .9rem;
  padding-left: 1.3rem;
}
body.jupi.mm_body .metro_modal_body li {
  margin: .35rem 0;
}
body.jupi.mm_body .metro_modal_body p {
  margin: .4rem 0 .6rem;
}
body.jupi.mm_body .metro_lernziel {
  margin: .9rem 0 .4rem;
  padding: .75rem 1rem;
  background: var(--mm-papier-hell);
  border-left: 4px solid var(--mm-gruen);
  border-radius: .5rem;
  font-size: .95rem;
}
body.jupi.mm_body .metro_modal_fuss {
  display: flex;
  justify-content: flex-end;
  padding: .75rem 1.2rem;
  border-top: 2px dashed var(--mm-kante, #c9bfa4);
}
html[data-theme="dark"] body.jupi.mm_body .metro_modal_fuss {
  border-top-color: #3f5261;
}
body.jupi.mm_body .metro_modal_fuss .jupi_btn {
  min-height: 40px;
  min-width: 100px;
  font-weight: 800;
  color: var(--mm-navy-tief);
  background: linear-gradient(180deg, #f7d868, var(--mm-gelb-tief));
  border: 2px solid var(--mm-navy-tief);
  border-radius: 12px;
}
html[data-theme="dark"] body.jupi.mm_body .metro_modal_fuss .jupi_btn {
  color: #10222f;
}

/* ================= Fusszeile: dunkles Band ueber der Szene ================= */
body.jupi.mm_body .jupi_footer {
  margin: .6rem auto 0;
  max-width: none;
  width: auto;
  border-radius: 0;
  border: none;
  padding: .5rem .8rem;
  background: rgba(13, 44, 71, .5);
  backdrop-filter: blur(3px);
  color: #dfe9f2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}
body.jupi.mm_body .jupi_footer a {
  color: #ffd98a;
}
html[data-theme="dark"] body.jupi.mm_body .jupi_footer {
  background: rgba(6, 20, 32, .65);
}

/* ================= Handy ================= */
@media (max-width: 680px) {
  /* Am Handy bricht die Leiste in zwei Zeilen (Muster Audio-Werkstatt):
     Marke oben, Zurueck und Werkzeuge darunter. */
  body.jupi.mm_body .metro_header {
    grid-template-columns: 1fr auto;
    gap: .5rem;
    padding: .5rem .75rem .6rem;
  }
  body.jupi.mm_body .metro_brand {
    grid-row: 1;
    grid-column: 1 / -1;
    justify-content: center;
  }
  body.jupi.mm_body .metro_brand h1 {
    font-size: 1.1rem;
  }
  body.jupi.mm_body .metro_brand img {
    width: 32px;
    height: 32px;
  }
  body.jupi.mm_body .metro_header .jupi_nav_back {
    grid-row: 2;
    grid-column: 1;
    font-size: .82rem;
    padding: .35rem .65rem;
  }
  body.jupi.mm_body .metro_header .jupi_werkzeuge {
    grid-row: 2;
    grid-column: 2;
  }
  body.jupi.mm_body .metro_header .jupi_sprachen_select {
    width: 8rem;
  }
}
@media (max-width: 600px) {
  body.jupi.mm_body .metro_panel {
    padding: .7rem .8rem;
    gap: .5rem .8rem;
  }
  body.jupi.mm_body .metro_stat + .metro_stat {
    border-left: none;
    padding-left: 0;
  }
  body.jupi.mm_body .metro_controls {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  body.jupi.mm_body .metro_aufgabe {
    font-size: 1.02rem;
    padding: .85rem .7rem;
  }
  body.jupi.mm_body .metro_rechnung {
    font-size: 1.35rem;
  }
  body.jupi.mm_body .metro_eingabe {
    font-size: 1.15rem;
  }
  dialog.metro_modal {
    width: 96%;
    max-height: 92vh;
  }
}
