/* Prozent-Rallye - Welt "Preisschild-Laden" (07.11.2026)
   Typ 2: Einstellungen, Hilfe und Ton in der Spielkonsole. */

/* Grundgeruest: volle Breite bis 96rem wie die Fusszeile, bedienbare Masse. */
.jupi_container{display:block!important;min-height:100dvh}
.jupi_main{max-width:96rem;margin:0 auto;padding:.65rem!important}
.jupi_footer{padding:.65rem!important;font-size:.85rem}
.neu_header strong{white-space:nowrap}
button,select,input{min-height:40px;box-sizing:border-box}
button{min-width:40px}
select{max-width:100%;min-width:0}
/* Preiszeile: Eingabe - Einheit - Pruefen nebeneinander. */
.prozent_zeile{display:grid;grid-template-columns:minmax(0,1fr) auto auto}
.prozent_eingabe{min-width:0;width:100%}

/* Handy: Felder mit ihrem Label verbunden, kompakte Touch-Leiste. */
@media(max-width:600px){
 .prozent_controls{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.35rem}
 .prozent_controls select{width:100%}
 .prozent_controls label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .prozent_panel .prozent_stat{min-width:0;flex:1 1 20%}
 .prozent_controls button{font-size:.8rem;padding:.4rem}
 .prozent_aufgabe{padding:.65rem;font-size:1rem}
 .prozent_zeile{gap:.3rem}
 .prozent_btns_row{margin-top:.5rem}
}

/* =====================================================================
   WELT "PREISSCHILD-LADEN" (07.11.2026)

   Das Thema kommt aus der TAETIGKEIT (Regel 3.13.6b): Im Spiel wird an
   Alltagspreisen gerechnet - Prozentwert, Rabatt, Grundwert, Mehrwert-
   steuer. Der Ort ist darum ein Ladengeschaeft mit Schaufenstern und
   einer Wand voller Preisschilder; das Spiel selbst liegt als Etikett
   auf dem Ladentisch. Vorbild im Aufbau: Bruch-Pizza, Notenfall,
   Einheitenkueche, Geokoerper.

     1. Farben und Grundregeln
     2. Seitenkulisse (assets/kulisse.svg) und Schleier
     3. Ladenschild: JUPI-Kopfzeile in Ladenoptik
     4. Steuerleiste: Werte auf Etiketten
     5. Prozent-Leiste (Fortschritt = 10 % je Etappe)
     6. Buehne: das Preisschild am Messingbuegel
     7. Knoepfe, Meldungen, Quittung
     8. Hilfe-Fenster als Merkzettel, Fusszeile
     9. Dark Mode: Laden bei Nacht
    10. Handy
    11. Bedienziele >= 40 x 40 px (Regel 3.13.5) - STEHT AM ENDE

   Alle Regeln haengen an body.jupi.pr_body, damit nichts in andere
   Spiele leakt. Wo die Plattform (jupi.css, rahmen.css) !important
   setzt, gewinnen eigene !important-Regeln mit hoeherer Spezifitaet.
   ===================================================================== */

/* ---------- 1. Farben (nur in dieser Welt) ---------- */
body.jupi.pr_body {
  --pr-laden: #123039;          /* Ladenfront (Petrol) */
  --pr-laden-hell: #17414b;
  --pr-laden-tief: #0a1d23;
  --pr-papier: #f8eeda;         /* Etikett-Papier */
  --pr-papier-tief: #efdfc0;
  --pr-papier-hell: #fffaf0;
  --pr-kante: #c9b48c;
  --pr-tinte: #1f2a30;
  --pr-rot: #cc4a34;            /* Rabatt-Rot */
  --pr-rot-hell: #e05e46;
  --pr-rot-tief: #93281a;
  --pr-messing: #c69a4e;        /* Schild-Messing */
  --pr-messing-hell: #e3bd78;
  --pr-messing-tief: #8a6524;
  --pr-gruen: #2f8f4a;
  --pr-gruen-tief: #1b5730;
  --pr-schrift: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

/* ---------- 2. Seitenkulisse -----------------------------------------
   ZWEI Szenen desselben Ladens (je EIN Bild, keine Kachel, keine
   Wiederholung - Regel 3.13.7, Generator .zcode/prozentrallye-kulisse.cjs):
     assets/kulisse.svg        Tag   (helles Theme)
     assets/kulisse-nacht.svg  Nacht (dark Theme)
   Beide 1600x1000, `no-repeat center / cover fixed`, Mitte ruhig (dort
   sitzt die Buehne). Die Motive liegen links und rechts am Rand. */
body.jupi.pr_body {
  min-height: 100vh;
  color: var(--pr-papier);
  background:
    radial-gradient(900px 480px at 50% -12%, rgba(255, 246, 226, .22) 0%, transparent 62%),
    linear-gradient(180deg, rgba(255, 250, 240, .06) 0%, rgba(24, 16, 8, .16) 100%),
    url("assets/kulisse.svg") center center / cover no-repeat fixed,
    #b5a284;
}

/* Kein weisser Plattform-Kasten - die Kulisse geht bis an den Rand. */
body.jupi.pr_body .jupi_container > .jupi_main { background: transparent; }
body.jupi.pr_body .jupi_container > .jupi_footer {
  background: transparent;
  border-top: 0;
  border-radius: 0;
  margin-top: 1.4rem;
}
body.jupi.pr_body .jupi_footer p {
  color: rgba(248, 238, 218, .78);
  font-family: var(--pr-schrift);
}
body.jupi.pr_body .jupi_footer a { color: var(--pr-messing-hell); }
body.jupi.pr_body .jupi_footer a:hover { color: #ffe0a4; text-decoration: underline; }

/* Leisten-Regel (3.13.2a): Kopf oben, Fuss am Dokumentende. */
body.jupi.pr_body .jupi_container {
  display: flex !important;
  flex-direction: column;
  min-height: 100dvh;
}
body.jupi.pr_body .jupi_container > .jupi_header { flex: 0 0 auto; }
body.jupi.pr_body .jupi_container > .jupi_main { flex: 1 0 auto; width: 100%; }
body.jupi.pr_body .jupi_container > .jupi_footer { margin-top: auto; }

/* ---------- 3. Ladenschild: die JUPI-Kopfzeile -----------------------
   Dunkles Petrol mit Messingleiste am Fuss und einer feinen Lichtkante
   oben. Das Logo haengt an einem Messingring - wie die Schilder der
   Kulisse. */
body.jupi.pr_body .neu_header.pr_header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center;
  gap: .5rem 1rem;
  min-height: 62px !important;
  margin: 0 !important;
  padding: .55rem 1rem .62rem !important;
  border: 0;
  border-bottom: 0;
  border-radius: 0 !important;
  color: var(--pr-papier) !important;
  background:
    radial-gradient(140% 130% at 18% -60%, rgba(255, 255, 255, .13) 0%, transparent 58%),
    linear-gradient(180deg, var(--pr-laden-hell) 0%, var(--pr-laden) 52%, #0c232a 100%) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12);
  font-family: var(--pr-schrift);
}
/* Messingband unter dem Ladenschild */
body.jupi.pr_body .pr_header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(180deg, var(--pr-messing-hell), var(--pr-messing) 46%, var(--pr-messing-tief));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
  pointer-events: none;
}

/* Logo: haengt an einem Messingring, sitzt auf einer Papierplakette. */
body.jupi.pr_body .pr_brand {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: .62rem;
  min-width: 0;
}
body.jupi.pr_body .pr_schild {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf6 0%, #f3e6cc 62%, #e2d0ad 100%);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .45), 0 7px 14px rgba(0, 0, 0, .40), inset 0 0 0 2px #fff;
  transform: rotate(-3deg);
}
body.jupi.pr_body .pr_schild img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}
body.jupi.pr_body .pr_schild::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border: 3px solid var(--pr-messing);
  border-radius: 50%;
  background: var(--pr-laden-tief);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
}
body.jupi.pr_body .pr_brand strong {
  color: #fdf7ea;
  font-size: clamp(1.12rem, 2.4vw, 1.5rem);
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .45);
}

/* Zurueck-Knopf: kleines Etikett auf der Ladenleiste. */
body.jupi.pr_body .pr_header .jupi_nav_back {
  position: static;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .45rem .8rem;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf6 0%, #f0e3c7 100%);
  color: var(--pr-tinte);
  font-family: var(--pr-schrift);
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--pr-laden-tief), 0 6px 12px rgba(0, 0, 0, .35);
  transition: transform .12s, box-shadow .12s, background .12s;
}
body.jupi.pr_body .pr_header .jupi_nav_back:hover {
  background: linear-gradient(180deg, #fff, #f8efdc);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--pr-laden-tief), 0 8px 14px rgba(0, 0, 0, .40);
}
body.jupi.pr_body .pr_header .jupi_nav_back:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--pr-laden-tief);
}

/* Sprache + Theme-Schalter: dunkle Felder mit Messingkante. */
body.jupi.pr_body .pr_header .jupi_werkzeuge {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: .45rem;
}
body.jupi.pr_body .pr_header .jupi_sprachen_select {
  height: 40px;
  max-width: 12rem;
  padding: .2rem .55rem;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 8px;
  background: #0e262d;
  color: #f4e7cc;
  font-family: var(--pr-schrift);
  font-size: .85rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
}
body.jupi.pr_body .pr_header .jupi_sprachen_select option { color: var(--pr-tinte); background: var(--pr-papier); }
body.jupi.pr_body .pr_header #jupi_theme_toggle {
  background: #0e262d !important;
  border: 2px solid var(--pr-laden-tief) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 2px 6px rgba(0, 0, 0, .40) !important;
}
body.jupi.pr_body .pr_header #jupi_theme_toggle:hover { background: #15343d !important; }

/* ---------- 4. Steuerleiste: Werte auf Etiketten -------------------- */
body.jupi.pr_body .prozent_panel.pr_panel {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem .85rem;
  margin: 0 0 .5rem;
  padding: .55rem .85rem;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 10px;
  color: var(--pr-papier);
  background:
    radial-gradient(120% 150% at 14% -60%, rgba(255, 255, 255, .12) 0%, transparent 58%),
    linear-gradient(180deg, var(--pr-laden-hell) 0%, #0f2b33 58%, #0a1f26 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12);
  font-family: var(--pr-schrift);
}
/* Messingkante auf der Leiste */
body.jupi.pr_body .pr_panel::before {
  content: "";
  position: absolute;
  left: .85rem;
  right: .85rem;
  top: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--pr-messing) 18%, var(--pr-messing-hell) 50%, var(--pr-messing) 82%, transparent);
  opacity: .55;
  pointer-events: none;
}

/* Jeder Wert ist ein kleines Etikett: Loch oben, Zahl gross, Wort klein. */
body.jupi.pr_body .pr_panel .prozent_stat {
  position: relative;
  min-width: 0;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .05rem;
  padding: .34rem .62rem .3rem;
  border: 1px solid var(--pr-kante);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--pr-papier-hell) 0%, var(--pr-papier) 62%, var(--pr-papier-tief) 100%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35), inset 0 1px 0 #fff;
  transform: rotate(-1.1deg);
}
body.jupi.pr_body .pr_panel .prozent_stat:nth-of-type(even) { transform: rotate(1deg); }
/* gestanztes Loch im Etikett */
body.jupi.pr_body .pr_panel .prozent_stat::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0d242b;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .5);
}
body.jupi.pr_body .pr_panel .prozent_stat span {
  order: 1;
  display: block;
  min-width: 2.2rem;
  color: var(--pr-tinte);
  font-family: var(--pr-schrift);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  letter-spacing: -.01em;
}
body.jupi.pr_body .pr_panel .prozent_stat label {
  order: 2;
  color: #6b5c40;
  font-family: var(--pr-schrift);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body.jupi.pr_body .pr_panel .prozent_controls {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  max-width: 100%;
}
body.jupi.pr_body .pr_panel .prozent_controls label {
  color: #f2e7d0;
  font-family: var(--pr-schrift);
  font-size: .85rem;
  font-weight: 800;
}
body.jupi.pr_body .pr_panel .jupi_select {
  min-height: 40px;
  padding: .35rem .6rem;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--pr-papier-hell) 0%, var(--pr-papier-tief) 100%);
  color: var(--pr-tinte);
  font-family: var(--pr-schrift);
  font-weight: 700;
  box-shadow: 0 2px 0 var(--pr-laden-tief);
}
body.jupi.pr_body .pr_panel .jupi_select:focus-visible {
  outline: 3px solid var(--pr-messing);
  outline-offset: 1px;
}
/* Hilfe und Ton: kleine Papier-Etiketten auf der Leiste. */
body.jupi.pr_body .pr_panel .jupi_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .4rem .7rem;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--pr-papier-hell) 0%, var(--pr-papier-tief) 100%);
  color: var(--pr-tinte);
  font-family: var(--pr-schrift);
  font-size: .9rem;
  font-weight: 800;
  box-shadow: 0 3px 0 var(--pr-laden-tief);
  transition: transform .1s, box-shadow .1s, filter .1s;
}
body.jupi.pr_body .pr_panel .jupi_btn:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 4px 0 var(--pr-laden-tief); }
body.jupi.pr_body .pr_panel .jupi_btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--pr-laden-tief); }
body.jupi.pr_body .pr_panel .jupi_btn:focus-visible { outline: 3px solid var(--pr-messing); outline-offset: 2px; }

/* ---------- 5. Prozent-Leiste (Fortschritt) -------------------------
   Zehn Etappen = zehn Prozentstufen. Die Bahn traegt Marken alle 10 %,
   der Balken laeuft in Rabatt-Rot, das Etikett daran zeigt die Zahl. */
body.jupi.pr_body .prozent_strecke.pr_strecke {
  position: relative;
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1.5rem;
  padding: .55rem 1.9rem .55rem 1.7rem;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 10px;
  background:
    radial-gradient(120% 150% at 20% -60%, rgba(255, 255, 255, .10) 0%, transparent 60%),
    linear-gradient(180deg, #11303a 0%, #0c232a 100%);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .40), inset 0 1px 0 rgba(255, 255, 255, .10);
  font-family: var(--pr-schrift);
}
body.jupi.pr_body .pr_bahn {
  position: relative;
  flex: 1 1 auto;
  height: 16px;
  border: 1px solid #05161b;
  border-radius: 999px;
  background: linear-gradient(180deg, #082027 0%, #0e2b33 100%);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .65);
}
/* Marken alle 10 % (wie auf einem Massstab) + Messing-Endmarke bei 100 % */
body.jupi.pr_body .pr_bahn::after {
  content: "";
  position: absolute;
  inset: 0 4px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(198, 154, 78, .55) calc(10% - 2px) 10%);
  pointer-events: none;
}
body.jupi.pr_body .pr_bahn::before {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border: 2px solid var(--pr-messing-tief);
  border-radius: 50%;
  background: var(--pr-messing-hell);
  box-shadow: 0 0 6px rgba(198, 154, 78, .5);
}
body.jupi.pr_body .prozent_balken {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pr-rot-tief) 0%, var(--pr-rot) 62%, var(--pr-rot-hell) 100%);
  box-shadow: 0 0 10px rgba(204, 74, 52, .55);
  transition: width .45s ease;
}
/* Das Etikett mit der Prozentzahl laeuft mit */
body.jupi.pr_body .prozent_auto {
  position: absolute;
  left: 0;
  top: 50%;
  bottom: auto;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: inline-grid;
  place-items: center;
  min-width: 3rem;
  padding: .1rem .42rem;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--pr-papier-hell) 0%, var(--pr-papier-tief) 100%);
  color: var(--pr-rot-tief);
  font-family: var(--pr-schrift);
  font-size: .82rem;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45), inset 0 0 0 1px #fff;
  transition: left .45s ease;
}

/* ---------- 6. Buehne: das Preisschild am Messingbuegel ------------- */
body.jupi.pr_body .prozent_stage.pr_stage {
  position: relative;
  margin: 1.9rem 0 1.1rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
body.jupi.pr_body .prozent_stage[hidden],
body.jupi.pr_body .prozent_done[hidden] { display: none; }

/* Der Buegel: kurze Messingstange mit Schnur in der Mitte. */
body.jupi.pr_body .pr_buegel {
  position: relative;
  margin: 0 auto;
  width: min(260px, 62%);
  height: 20px;
}body.jupi.pr_body .pr_buegel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--pr-messing-hell), var(--pr-messing) 52%, var(--pr-messing-tief));
  box-shadow: 0 2px 5px rgba(0, 0, 0, .5);
}
body.jupi.pr_body .pr_schnur {
  position: absolute;
  left: 50%;
  top: 2px;
  transform: translateX(-50%);
  width: 9px;
  height: 26px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(90deg, var(--pr-messing-tief), var(--pr-messing-hell) 45%, var(--pr-messing-tief));
  box-shadow: 0 2px 4px rgba(0, 0, 0, .45);
}

/* Das Etikett selbst: Papier auf dem Ladentisch. */
body.jupi.pr_body .pr_etikett {
  position: relative;
  margin-top: -2px;
  padding: 2.5rem 1.25rem 1.35rem;
  border: 2px solid var(--pr-kante);
  border-radius: 16px 16px 10px 10px;
  color: var(--pr-tinte);
  background:
    repeating-linear-gradient(0deg, rgba(120, 104, 74, .045) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, var(--pr-papier-hell) 0%, var(--pr-papier) 58%, var(--pr-papier-tief) 100%);
  box-shadow:
    0 20px 38px rgba(0, 0, 0, .48),
    0 4px 0 rgba(0, 0, 0, .22),
    inset 0 0 0 4px rgba(255, 255, 255, .55);
}
/* Gestanztes Loch oben in der Mitte, mit Messingoehse */
body.jupi.pr_body .pr_stanze {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border: 5px solid #ddcaa4;
  border-radius: 50%;
  background: #0d242b;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .7);
}
/* Strichcode als Druck-Detail unten rechts */
body.jupi.pr_body .pr_strichcode {
  position: absolute;
  right: 14px;
  bottom: 10px;
  width: 92px;
  height: 18px;
  opacity: .42;
  background-image: repeating-linear-gradient(90deg,
    var(--pr-tinte) 0 2px, transparent 2px 5px,
    var(--pr-tinte) 5px 8px, transparent 8px 10px,
    var(--pr-tinte) 10px 11px, transparent 11px 15px,
    var(--pr-tinte) 15px 18px, transparent 18px 20px);
  pointer-events: none;
}

/* Kopf des Etiketts: das rote Rabatt-Preisband */
body.jupi.pr_body .prozent_task_label {
  display: inline-block;
  margin: 0 0 .65rem;
  padding: .2rem .62rem .18rem;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--pr-rot-hell) 0%, var(--pr-rot) 58%, var(--pr-rot-tief) 100%);
  color: #fff5ef;
  font-family: var(--pr-schrift);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  box-shadow: 0 2px 0 var(--pr-rot-tief), 0 3px 8px rgba(0, 0, 0, .22);
  transform: rotate(-1.2deg);
}
/* Die Aufgabe: vorgedrucktes Feld auf dem Etikett */
body.jupi.pr_body .prozent_aufgabe {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: .8rem .9rem;
  border: 1px solid #d6c39c;
  border-left: 6px solid var(--pr-messing);
  border-radius: 8px;
  background: rgba(255, 255, 255, .55);
  color: var(--pr-tinte);
  font-size: 1.1rem;
  line-height: 1.5;
  box-shadow: inset 0 1px 0 #fff;
}
body.jupi.pr_body .prozent_emoji { font-size: 1.9rem; line-height: 1.1; }

/* Antwort: die Preiszeile */
body.jupi.pr_body .prozent_zeile { gap: .45rem; margin-top: .95rem; align-items: stretch; }
body.jupi.pr_body .prozent_eingabe {
  width: 100%;
  min-width: 0;
  padding: .5rem .75rem;
  border: 2px solid var(--pr-laden);
  border-radius: 8px;
  background: #fffdf7;
  color: #16232a;
  font-family: var(--pr-schrift);
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .12);
}
body.jupi.pr_body .prozent_eingabe:focus-visible {
  outline: 3px solid var(--pr-messing);
  outline-offset: 1px;
  border-color: var(--pr-messing-tief);
}
body.jupi.pr_body .prozent_eingabe::placeholder {
  color: #8d836d;
  font-size: 1rem;
  font-weight: 600;
}
/* Einheit auf einer Messingplakette */
body.jupi.pr_body .prozent_einheit {
  display: inline-grid;
  place-items: center;
  min-width: 2.6rem;
  padding: 0 .55rem;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--pr-messing-hell) 0%, var(--pr-messing) 55%, var(--pr-messing-tief) 100%);
  color: #2a1f0d;
  font-family: var(--pr-schrift);
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .55);
}

/* ---------- 7. Knoepfe, Meldungen, Quittung -------------------------- */
body.jupi.pr_body .prozent_stage .jupi_btn {
  min-height: 44px;
  padding: .5rem 1.05rem;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 8px;
  font-family: var(--pr-schrift);
  font-size: .95rem;
  font-weight: 900;
  letter-spacing: .02em;
  transition: transform .1s, box-shadow .1s, filter .1s;
}
body.jupi.pr_body .prozent_stage .jupi_btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
body.jupi.pr_body .prozent_stage .jupi_btn:active { transform: translateY(2px); }
body.jupi.pr_body .prozent_stage .jupi_btn:focus-visible { outline: 3px solid var(--pr-messing); outline-offset: 2px; }
/* Pruefen = Rabatt-Knopf in Signalrot */
body.jupi.pr_body #prozent_pruefen {
  background: linear-gradient(180deg, var(--pr-rot-hell) 0%, var(--pr-rot) 55%, var(--pr-rot-tief) 100%);
  color: #fff6f1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .40);
  box-shadow: 0 3px 0 #6f1c11, 0 6px 14px rgba(0, 0, 0, .32);
}
body.jupi.pr_body #prozent_pruefen:hover { box-shadow: 0 4px 0 #6f1c11, 0 8px 16px rgba(0, 0, 0, .38); }
body.jupi.pr_body #prozent_pruefen:active { box-shadow: 0 1px 0 #6f1c11; }
/* Weiter = Messing-Knopf */
body.jupi.pr_body #prozent_next {
  background: linear-gradient(180deg, var(--pr-messing-hell) 0%, var(--pr-messing) 55%, var(--pr-messing-tief) 100%);
  color: #261b09;
  box-shadow: 0 3px 0 #6b4c15, 0 6px 14px rgba(0, 0, 0, .30);
}
body.jupi.pr_body #prozent_next:active { box-shadow: 0 1px 0 #6b4c15; }
/* Tipp = Papier-Knopf mit Messingkante */
body.jupi.pr_body #prozent_tipp {
  background: linear-gradient(180deg, #fffdf6 0%, var(--pr-papier) 100%);
  border-color: var(--pr-messing-tief);
  color: #3a2f1c;
  box-shadow: 0 3px 0 var(--pr-messing-tief), 0 6px 12px rgba(0, 0, 0, .22);
}
body.jupi.pr_body #prozent_tipp:active { box-shadow: 0 1px 0 var(--pr-messing-tief); }

/* Rueckmeldung wie ein Stempel auf dem Etikett */
body.jupi.pr_body .prozent_msg {
  min-height: 1.6rem;
  margin-top: .75rem;
  color: #4c422f;
  font-weight: 700;
  font-size: .95rem;
}
body.jupi.pr_body .prozent_msg_ok {
  display: inline-block;
  padding: .42rem .8rem;
  border: 2px solid var(--pr-gruen-tief);
  border-radius: 6px;
  background: linear-gradient(180deg, #3aa45a 0%, var(--pr-gruen) 60%, #1f6b35 100%);
  color: #f2fbf4;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22), 0 3px 8px rgba(0, 0, 0, .25);
}
body.jupi.pr_body .prozent_msg_err {
  display: inline-block;
  padding: .42rem .8rem;
  border: 2px solid #7d1c12;
  border-radius: 6px;
  background: linear-gradient(180deg, #dd5140 0%, #bd3927 58%, #9d2818 100%);
  color: #fff4f0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18), 0 3px 8px rgba(0, 0, 0, .25);
}

/* Ergebnis = Quittung: Papier mit Perforationskante */
body.jupi.pr_body .prozent_done.pr_done {
  position: relative;
  margin: .4rem 0 .8rem;
  padding: 1.5rem 1.2rem 1.9rem;
  border: 2px solid var(--pr-kante);
  border-radius: 10px;
  color: var(--pr-tinte);
  background:
    repeating-linear-gradient(0deg, rgba(120, 104, 74, .05) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, var(--pr-papier-hell) 0%, var(--pr-papier) 60%, var(--pr-papier-tief) 100%);
  box-shadow: 0 18px 34px rgba(0, 0, 0, .48), inset 0 0 0 4px rgba(255, 255, 255, .55);
}
/* Perforation: kleine Halbkreise am unteren Rand */
body.jupi.pr_body .pr_done::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 9px;
  background-image: radial-gradient(circle at 9px 0, var(--pr-papier-tief) 8px, transparent 9px);
  background-size: 18px 9px;
  background-repeat: repeat-x;
  pointer-events: none;
}
body.jupi.pr_body .pr_done::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  top: 0.9rem;
  height: 0;
  border-top: 2px dashed #cbb894;
  pointer-events: none;
}
body.jupi.pr_body .pr_done h3 {
  margin: .9rem 0 .5rem;
  color: var(--pr-rot-tief);
  font-family: var(--pr-schrift);
  font-size: 1.45rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
body.jupi.pr_body .pr_done p { margin: .3rem 0 .8rem; color: #3a3325; font-size: 1.02rem; }
body.jupi.pr_body .prozent_sterne { font-size: 2rem; margin-bottom: .9rem; }
body.jupi.pr_body #prozent_again {
  min-height: 44px;
  padding: .5rem 1.05rem;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--pr-messing-hell) 0%, var(--pr-messing) 55%, var(--pr-messing-tief) 100%);
  color: #261b09;
  font-family: var(--pr-schrift);
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 3px 0 #6b4c15, 0 6px 14px rgba(0, 0, 0, .28);
}
body.jupi.pr_body #prozent_again:hover { filter: brightness(1.05); transform: translateY(-1px); }
body.jupi.pr_body #prozent_again:active { transform: translateY(2px); box-shadow: 0 1px 0 #6b4c15; }

/* ---------- 8. Hilfe-Fenster (Merkzettel) und Fusszeile ------------- */
body.jupi.pr_body .pr_dialog.neu_dialog {
  width: min(46rem, calc(100vw - 24px));
  max-height: 88dvh;
  overflow: auto;
  padding: 1.1rem 1.2rem 1.3rem;
  border: 2px solid var(--pr-kante);
  border-radius: 12px;
  background:
    repeating-linear-gradient(0deg, rgba(120, 104, 74, .05) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, var(--pr-papier-hell) 0%, var(--pr-papier) 62%, var(--pr-papier-tief) 100%);
  color: var(--pr-tinte);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .58), inset 0 0 0 4px rgba(255, 255, 255, .55);
  z-index: 60;
}
/* Messingklammer am Kopf des Merkzettels */
body.jupi.pr_body .pr_dialog::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 18px;
  border: 2px solid var(--pr-messing-tief);
  border-radius: 5px;
  background: linear-gradient(180deg, var(--pr-messing-hell), var(--pr-messing) 60%, var(--pr-messing-tief));
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45);
  pointer-events: none;
}
body.jupi.pr_body .pr_dialog::backdrop {
  background: rgba(5, 12, 15, .74);
  backdrop-filter: blur(3px);
}
body.jupi.pr_body .pr_dialog h2 {
  margin: .2rem 0 .8rem;
  padding-bottom: .45rem;
  border-bottom: 3px solid var(--pr-rot);
  color: var(--pr-tinte);
  font-family: var(--pr-schrift);
  font-size: 1.22rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
body.jupi.pr_body .pr_dialog .neu_schliessen button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: .3rem;
  border: 2px solid var(--pr-laden-tief);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--pr-rot-hell) 0%, var(--pr-rot) 55%, var(--pr-rot-tief) 100%);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 3px 0 #6f1c11;
}
body.jupi.pr_body .pr_dialog .neu_schliessen button:hover { filter: brightness(1.07); }
body.jupi.pr_body .pr_dialog .prozent_info_inhalt p { color: #332e24; }
body.jupi.pr_body .pr_dialog ul { margin: .4rem 0 .6rem; padding-left: 1.3rem; }
body.jupi.pr_body .pr_dialog li { margin: .45rem 0; color: #332e24; }
body.jupi.pr_body .pr_dialog b { color: var(--pr-tinte); }
body.jupi.pr_body .pr_dialog .prozent_lernziel,
body.jupi.pr_body .prozent_lernziel {
  margin-top: .9rem;
  padding: .65rem .85rem;
  border-left: 5px solid var(--pr-messing);
  border-radius: 6px;
  background: rgba(198, 154, 78, .16);
  color: #3a3325;
  font-size: .93rem;
}

/* ---------- 9. Dark Mode: der Laden bei Nacht -----------------------
   Eigene Nachtszene (assets/kulisse-nacht.svg), warmes Licht aus den
   Schaufenstern. Etiketten und Papiere bleiben hell (sie werden im
   Licht gelesen). */
html[data-theme="dark"] body.jupi.pr_body {
  background:
    radial-gradient(44% 28% at 23% 30%, rgba(255, 214, 150, .12) 0%, transparent 76%),
    radial-gradient(44% 28% at 77% 30%, rgba(255, 214, 150, .11) 0%, transparent 76%),
    radial-gradient(52% 26% at 50% 88%, rgba(255, 224, 170, .07) 0%, transparent 78%),
    url("assets/kulisse-nacht.svg") center center / cover no-repeat fixed,
    #061014;
}
html[data-theme="dark"] body.jupi.pr_body .neu_header.pr_header {
  background:
    radial-gradient(140% 130% at 18% -60%, rgba(255, 236, 190, .08) 0%, transparent 58%),
    linear-gradient(180deg, #0f2a31 0%, #0a1f26 52%, #061419 100%) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .70), inset 0 1px 0 rgba(255, 255, 255, .08);
}
html[data-theme="dark"] body.jupi.pr_body .pr_schild {
  background: linear-gradient(180deg, #f4ead6 0%, #e6d7b8 62%, #cdbb98 100%);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .60), 0 7px 14px rgba(0, 0, 0, .55), inset 0 0 0 2px #fbf7ee;
}
html[data-theme="dark"] body.jupi.pr_body .pr_header .jupi_nav_back {
  background: linear-gradient(180deg, #f2e8d4 0%, #ddcdae 100%);
  color: #17262d;
  box-shadow: 0 3px 0 #041014, 0 6px 12px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] body.jupi.pr_body .pr_header .jupi_sprachen_select {
  background: #0a1f26;
  color: #f2e5c8;
}
html[data-theme="dark"] body.jupi.pr_body .pr_header #jupi_theme_toggle { background: #0a1f26 !important; }
html[data-theme="dark"] body.jupi.pr_body .pr_header #jupi_theme_toggle:hover { background: #123039 !important; }
html[data-theme="dark"] body.jupi.pr_body .prozent_panel.pr_panel {
  background:
    radial-gradient(120% 150% at 14% -60%, rgba(255, 236, 190, .07) 0%, transparent 58%),
    linear-gradient(180deg, #0f2a31 0%, #0a1f26 58%, #05141a 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .60), inset 0 1px 0 rgba(255, 255, 255, .08);
}
html[data-theme="dark"] body.jupi.pr_body .pr_panel .prozent_stat {
  background: linear-gradient(180deg, #f6eedb 0%, #e9dcc0 62%, #d8c8a6 100%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .50), inset 0 1px 0 #fff;
}
html[data-theme="dark"] body.jupi.pr_body .pr_panel .prozent_stat label { color: #5f5138; }
html[data-theme="dark"] body.jupi.pr_body .pr_panel .prozent_controls label { color: #e6d9bd; }
html[data-theme="dark"] body.jupi.pr_body .pr_panel .jupi_select,
html[data-theme="dark"] body.jupi.pr_body .pr_panel .jupi_btn {
  background: linear-gradient(180deg, #f6eedb 0%, #dccdaa 100%);
  color: #17262d;
}
html[data-theme="dark"] body.jupi.pr_body .pr_panel::before { opacity: .42; }
html[data-theme="dark"] body.jupi.pr_body .prozent_strecke.pr_strecke {
  background: linear-gradient(180deg, #0d252c 0%, #071a20 100%);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .60), inset 0 1px 0 rgba(255, 255, 255, .07);
}
html[data-theme="dark"] body.jupi.pr_body .prozent_auto {
  background: linear-gradient(180deg, #f6eedb 0%, #e0d1ae 100%);
  color: var(--pr-rot-tief);
}
html[data-theme="dark"] body.jupi.pr_body .pr_etikett {
  background:
    repeating-linear-gradient(0deg, rgba(120, 104, 74, .06) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #f6eedb 0%, #ecdfc4 58%, #ddcead 100%);
  border-color: #b7a788;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, .70),
    0 4px 0 rgba(0, 0, 0, .40),
    inset 0 0 0 4px rgba(255, 255, 255, .45);
}
html[data-theme="dark"] body.jupi.pr_body .prozent_aufgabe {
  background: rgba(255, 255, 255, .45);
  border-color: #c9b795;
}
html[data-theme="dark"] body.jupi.pr_body .prozent_eingabe {
  background: #fffaf0;
  border-color: #0c232a;
}
html[data-theme="dark"] body.jupi.pr_body .prozent_msg { color: #4c422f; }
html[data-theme="dark"] body.jupi.pr_body .prozent_done.pr_done,
html[data-theme="dark"] body.jupi.pr_body .pr_dialog.neu_dialog {
  background:
    repeating-linear-gradient(0deg, rgba(120, 104, 74, .06) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #f6eedb 0%, #e6d8bb 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .72), inset 0 0 0 4px rgba(255, 255, 255, .45);
}
html[data-theme="dark"] body.jupi.pr_body .pr_done::after {
  background-image: radial-gradient(circle at 9px 0, #e6d8bb 8px, transparent 9px);
}
html[data-theme="dark"] body.jupi.pr_body .jupi_footer p { color: rgba(248, 238, 218, .68); }
html[data-theme="dark"] body.jupi.pr_body .jupi_footer a { color: #e8c98a; }

/* ---------- 10. Handy ------------------------------------------------- */
@media (max-width: 800px) {
  body.jupi.pr_body .neu_header.pr_header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: .4rem .5rem;
    padding: .7rem .55rem .6rem !important;
  }
  body.jupi.pr_body .pr_brand { grid-row: 1; grid-column: 1 / -1; justify-self: center; }
  body.jupi.pr_body .pr_schild { width: 40px; height: 40px; }
  body.jupi.pr_body .pr_schild img { width: 31px; height: 31px; }
  body.jupi.pr_body .pr_schild::before { top: -7px; width: 9px; height: 9px; border-width: 2px; }
  body.jupi.pr_body .pr_brand strong { font-size: 1.08rem; }
  body.jupi.pr_body .pr_header .jupi_nav_back { grid-row: 2; grid-column: 1; justify-self: start; font-size: .82rem; padding: .4rem .6rem; }
  body.jupi.pr_body .pr_header .jupi_werkzeuge { grid-row: 2; grid-column: 2; justify-self: end; }
  body.jupi.pr_body .pr_header .jupi_sprachen_select { max-width: 7.5rem; font-size: .78rem; }
}
@media (max-width: 600px) {
  body.jupi.pr_body .jupi_main { padding: .45rem .5rem 0 !important; }
  body.jupi.pr_body .prozent_panel.pr_panel { gap: .4rem .45rem; padding: .45rem .5rem; margin-bottom: .45rem; }
  body.jupi.pr_body .pr_panel .prozent_stat { flex: 1 1 0; padding: .26rem .4rem .24rem; }
  body.jupi.pr_body .pr_panel .prozent_stat span { font-size: 1.05rem; }
  body.jupi.pr_body .pr_panel .prozent_stat label { font-size: .52rem; letter-spacing: .07em; }
  body.jupi.pr_body .pr_panel .prozent_controls {
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .4rem;
  }
  body.jupi.pr_body .pr_panel .prozent_controls select { width: 100%; min-width: 0; font-size: .8rem; }
  body.jupi.pr_body .pr_panel .prozent_controls .jupi_btn { font-size: .8rem; padding: .35rem .5rem; }
  body.jupi.pr_body .prozent_strecke.pr_strecke { margin-bottom: .8rem; padding: .45rem 1.6rem .45rem 1.5rem; gap: .5rem; }
  body.jupi.pr_body .prozent_auto { font-size: .74rem; min-width: 2.6rem; }
  body.jupi.pr_body .prozent_ziel { font-size: .66rem; padding: .12rem .38rem; }
  body.jupi.pr_body .prozent_stage.pr_stage { margin: 1.5rem 0 .9rem; }
  body.jupi.pr_body .pr_buegel { width: 92%; height: 18px; }
  body.jupi.pr_body .pr_schnur { height: 22px; width: 7px; }
  body.jupi.pr_body .pr_etikett { padding: 2.1rem .75rem 1.1rem; border-radius: 12px 12px 8px 8px; }
  body.jupi.pr_body .pr_stanze { width: 21px; height: 21px; border-width: 4px; top: 8px; }
  body.jupi.pr_body .prozent_task_label { font-size: .7rem; letter-spacing: .06em; margin-bottom: .5rem; }
  body.jupi.pr_body .prozent_aufgabe { padding: .62rem .7rem; font-size: 1rem; gap: .6rem; }
  body.jupi.pr_body .prozent_emoji { font-size: 1.6rem; }
  body.jupi.pr_body .prozent_zeile { gap: .3rem; margin-top: .75rem; }
  body.jupi.pr_body .prozent_eingabe { font-size: 1.15rem; padding: .45rem .55rem; }
  body.jupi.pr_body .prozent_einheit { min-width: 2.1rem; font-size: 1rem; padding: 0 .35rem; }
  body.jupi.pr_body .prozent_stage .jupi_btn { font-size: .82rem; padding: .4rem .62rem; }
  body.jupi.pr_body .prozent_btns_row { gap: .4rem; margin-top: .7rem; }
  body.jupi.pr_body .prozent_msg { font-size: .88rem; }
  body.jupi.pr_body .pr_strichcode { display: none; }
  body.jupi.pr_body .prozent_done.pr_done { padding: 1.2rem .8rem 1.5rem; }
  body.jupi.pr_body .pr_done h3 { font-size: 1.2rem; }
  body.jupi.pr_body .pr_dialog.neu_dialog { padding: .9rem .8rem 1rem; }
  body.jupi.pr_body .pr_dialog h2 { font-size: 1.02rem; }
}
@media (max-width: 380px) {
  body.jupi.pr_body .pr_brand strong { font-size: .96rem; letter-spacing: .02em; }
  body.jupi.pr_body .pr_panel .prozent_stat span { font-size: .95rem; }
  body.jupi.pr_body .pr_header .jupi_sprachen_select { max-width: 6.4rem; font-size: .72rem; }
  body.jupi.pr_body .pr_header .jupi_nav_back { font-size: .76rem; padding: .35rem .45rem; }
}

/* ---------- 11. Bedienziele: mindestens 40 x 40 px (Regel 3.13.5) ----
   STEHT AM ENDE der Datei: eine spaetere Grundregel wuerde sonst gewinnen. */
body.jupi.pr_body .pr_header a,
body.jupi.pr_body .pr_header button,
body.jupi.pr_body .pr_header select,
body.jupi.pr_body .pr_panel button,
body.jupi.pr_body .pr_panel select,
body.jupi.pr_body .pr_panel input,
body.jupi.pr_body .pr_dialog button,
body.jupi.pr_body .prozent_stage button,
body.jupi.pr_body .prozent_stage input,
body.jupi.pr_body #prozent_again {
  min-width: 40px;
  min-height: 40px;
}
