/* ---------- Packerl v2 (int/packerl): Trafik-Regal, Fach, Gratis, Aufreißen und Umdrehen ----------
   Packerl sind 44x60 echte Pixel, nur ganzzahlig vergrößert (hier 2-fach, im Aufreiß-Blatt 3- bzw. 4-fach). */
.packerl-bild canvas, .fach-bild canvas { width: 88px; height: 120px; display: block; image-rendering: pixelated; transform: none; }
.packerl:hover .packerl-bild canvas { transform: translateY(-4px); }
.gratis-zeile { flex-wrap: nowrap; gap: 14px; }
.gratis-text { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.gratis-text .reihe-knoepfe { margin: 0; align-items: center; }

/* Quoten: Stufe und Ausführung nebeneinander, wenn Platz ist */
.quoten { max-height: calc(100dvh - 64px); overflow: auto; }
.quoten-spalten { display: flex; flex-wrap: wrap; gap: 0 24px; }
.quoten-titel { font-family: 'CW Dick', monospace; color: var(--rot-dunkel); }

/* ---------- Aufmachen ---------- */
.aufmachen .blatt-inhalt { width: min(100%, 840px); }
.aufreiss-buehne { --kw: 4; position: relative; width: calc(64px * var(--k)); height: calc(96px * var(--k)); margin: 4px auto 0;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.aufreiss-buehne.zieht { cursor: grabbing; }
.aufreiss-buehne.offen { cursor: default; }
.aufreiss-bild { display: block; width: 100%; height: 100%; image-rendering: pixelated; filter: drop-shadow(0 calc(3px * var(--k)) 0 rgba(0, 0, 0, .45)); }

/* Hinweis „Reiß oben auf!“: Schild oben im leeren Teil der Bühne, Pfeil über der Naht, Hand wischt die Naht entlang */
.aufreiss-text { position: absolute; left: 50%; top: calc(3px * var(--k)); transform: translateX(-50%); margin: 0; white-space: nowrap; pointer-events: none;
  font-family: 'CW Dick', monospace; font-size: 32px; line-height: 1; color: var(--tinte); background: var(--papier); padding: 6px 14px 10px;
  box-shadow: 0 0 0 4px var(--tinte), 0 8px 0 4px var(--schatten); z-index: 2; }
.aufreiss-text::after { content: ''; position: absolute; left: 50%; bottom: -12px; margin-left: -8px; width: 16px; height: 8px; background: var(--tinte);
  clip-path: polygon(0 0, 100% 0, 50% 100%); }
.aufreiss-hinweis { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.aufreiss-buehne.zieht .aufreiss-hinweis, .aufreiss-buehne.zieht .aufreiss-text { visibility: hidden; }
.hinweis-pfeil { position: absolute; left: calc(19px * var(--k)); top: calc(25px * var(--k)); width: calc(26px * var(--k)); height: calc(7px * var(--k));
  image-rendering: pixelated; animation: pfeil-zupf 1.8s steps(1) infinite; }
.hinweis-hand { position: absolute; left: calc(45px * var(--k)); top: calc(37px * var(--k)); width: calc(13px * var(--k)); height: calc(15px * var(--k));
  image-rendering: pixelated; animation: hand-wisch 1.8s steps(8) infinite; }
@keyframes hand-wisch {
  0%, 10% { transform: translateX(0); opacity: 1; }
  70% { transform: translateX(calc(-32px * var(--k))); opacity: 1; }
  85%, 100% { transform: translateX(calc(-32px * var(--k))); opacity: 0; }
}
@keyframes pfeil-zupf { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(calc(-2px * var(--k))); } }
.aufreiss-hinweis.stups .hinweis-pfeil, .aufreiss-text.stups { animation: stups .36s steps(2) 2; }
.aufreiss-text.stups { animation-name: stups-schild; }
@keyframes stups { 50% { transform: translateY(calc(-2px * var(--k))); } }
@keyframes stups-schild { 0%, 100% { transform: translateX(-50%); } 50% { transform: translate(-50%, -8px); } }

/* Knopf „Aufreißen“ für Tastatur: erst mit Fokus (Tab) sichtbar */
.aufreiss-knopf { margin: 14px auto 0; }
.aufreiss-knopf:not(:focus-visible) { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; filter: none; }

/* Karten: verdeckt da, jede wird selbst umgedreht */
.aufmachen .reihe-karten { --kw: 2; gap: 28px 14px; margin: 24px 0 12px; perspective: none; }
.aufmachen .platz { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.karte-huelle { position: relative; }
.karte-huelle .karte { position: relative; z-index: 1; transform: none; }
.karte-huelle .neu-marke { z-index: 3; }
.karte-knopf { display: block; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; color: inherit; }
.karte-knopf:hover .karte { transform: translateY(calc(-2px * var(--k))); }
.karte-knopf:focus-visible { outline: 4px solid var(--gold-hell); outline-offset: 4px; }
.umdreh-zeile { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 18px; margin: 4px 0 8px; }
.umdreh-zeile p { margin: 0; }
.alle-umdrehen { font-size: var(--fs-s); min-height: 44px; text-underline-offset: 4px; }

/* Ausführung: Lichtstrahlen in Edelsteinfarbe hinter der Karte, 1-Pixel-Leuchtrand, Marke mit dem Namen */
.ausf-strahlen { position: absolute; z-index: 0; pointer-events: none; image-rendering: pixelated;
  left: calc(-20px * var(--k)); top: calc(-20px * var(--k)); width: calc(98px * var(--k)); height: calc(112px * var(--k)); }
.platz.ausf .karte { --rand: #e8c46a; filter: drop-shadow(calc(1px * var(--k)) 0 0 var(--rand)) drop-shadow(calc(-1px * var(--k)) 0 0 var(--rand))
  drop-shadow(0 calc(1px * var(--k)) 0 var(--rand)) drop-shadow(0 calc(-1px * var(--k)) 0 var(--rand)); }
.platz.ausf-glitzer .karte { --rand: #dde4ec; }
.platz.ausf-holo .karte { --rand: #7fb0e6; }
.ausf-marke { position: relative; z-index: 2; font-family: 'CW Dick', monospace; font-size: var(--fs-s); line-height: 1; padding: 4px 8px 6px; color: var(--tinte);
  background: var(--gold-hell); box-shadow: 0 0 0 2px var(--tinte); white-space: nowrap; }
.ausf-marke.ausf-glitzer { background: #dde4ec; }
.ausf-marke.ausf-holo { background: #fff8e8; padding-bottom: 10px; }
.ausf-marke.ausf-holo::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, #e0505e 0 25%, #e2c43a 25% 50%, #5fb85a 50% 75%, #4f84d8 75% 100%); }

@media (max-width: 520px) {
  .aufreiss-buehne { --kw: 3; }
  .aufmachen .blatt-inhalt { padding: 18px 14px; }
  .aufmachen .reihe-karten { --kw: 1.5; gap: 24px 10px; }
  .blatt.aufmachen .reihe-knoepfe .knopf { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hinweis-hand, .hinweis-pfeil, .aufreiss-text.stups, .aufreiss-hinweis.stups .hinweis-pfeil { animation: none; }
  .packerl:hover .packerl-bild canvas, .karte-knopf:hover .karte { transform: none; }
}
