/* ==========================================================================
   PRAXIS-KONSOLE  -  Knopf auf der Startseite
   ========================================================================== */
.pxk {
  position: relative; display: flex; align-items: center; gap: 16px;
  margin: 4px 0 18px; padding: 14px 18px; cursor: pointer;
  font-family: "Press Start 2P", monospace;
  background:
    radial-gradient(120% 160% at 0% 50%, rgba(61,169,255,.22), transparent 55%),
    radial-gradient(120% 160% at 100% 50%, rgba(255,59,92,.24), transparent 55%),
    linear-gradient(180deg, #14141d, #0a0a11);
  border: 3px solid #262636;
  /* abgeschraegte Ecken wie bei einem Automatengehaeuse */
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 22px),
                     calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 22px), 0 22px);
  transition: transform .12s, filter .18s;
  image-rendering: pixelated;
}
.pxk:hover { filter: brightness(1.12); }
.pxk:active { transform: translateY(2px); }
.pxk:focus-visible { outline: 3px solid #ffd23f; outline-offset: 3px; }
/* Leuchtkanten links blau, rechts rot */
.pxk::before, .pxk::after {
  content: ""; position: absolute; top: 6px; bottom: 6px; width: 6px;
}
.pxk::before { left: 4px;  background: #3da9ff; box-shadow: 0 0 14px rgba(61,169,255,.75); }
.pxk::after  { right: 4px; background: #ff3b5c; box-shadow: 0 0 14px rgba(255,59,92,.75); }

.pxk-geraet { flex: none; line-height: 0; margin-left: 8px; }
.pxk-geraet svg { display: block; }

.pxk-mitte { flex: 1; min-width: 0; }
.pxk-wort { font-size: 22px; line-height: 1.2; }
.pxk-wort .t1 { color: #3da9ff; text-shadow: 3px 3px 0 #06213f; }
.pxk-wort .t2 { color: #ff3b5c; text-shadow: 3px 3px 0 #3d0912; }
.pxk-unter {
  margin-top: 9px; font-family: "Inter", system-ui, sans-serif;
  font-size: 12px; color: #c3ccdd; letter-spacing: .01em;
}

/* Modulmarken - bewusst winzig, damit der Knopf schmal bleibt */
.pxk-marken { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }
.pxk-marken .m {
  font-family: "Press Start 2P", monospace; font-size: 5.5px; line-height: 1;
  letter-spacing: .05em; padding: 4px 5px; white-space: nowrap;
  color: var(--pxk-f, #3da9ff);
  border: 1px solid var(--pxk-f, #3da9ff);
  background: rgba(255,255,255,.03);
}
.pxk-marken .f-blau    { --pxk-f: #3da9ff; }
.pxk-marken .f-gruen   { --pxk-f: #3ddc84; }
.pxk-marken .f-gold    { --pxk-f: #ffb347; }
.pxk-marken .f-violett { --pxk-f: #b47bff; }
.pxk-marken .f-rot     { --pxk-f: #ff3b5c; }
.pxk-marken .f-tuerkis { --pxk-f: #2fd6c3; }
.pxk-marken .f-weiss   { --pxk-f: #d5dae6; }

.pxk-start {
  flex: none; display: flex; align-items: center; gap: 8px; margin-right: 10px;
  padding: 11px 16px; font-size: 14px; color: #ffd23f;
  background: linear-gradient(180deg, rgba(255,179,71,.18), rgba(180,90,10,.22));
  border: 2px solid #ffb347;
  box-shadow: inset 0 0 12px rgba(255,179,71,.25), 0 0 14px -4px rgba(255,179,71,.6);
}
.pxk-start .pf { font-size: 11px; }

@media (max-width: 640px) {
  .pxk { gap: 10px; padding: 11px 12px; }
  .pxk-geraet { margin-left: 4px; }
  .pxk-geraet svg { width: 44px; height: 56px; }
  .pxk-wort { font-size: 14px; }
  .pxk-unter { font-size: 10.5px; margin-top: 7px; }
  .pxk-marken { gap: 3px; margin-top: 7px; }
  .pxk-marken .m { font-size: 5px; padding: 3px 4px; }
  .pxk-start { padding: 9px 11px; font-size: 11px; margin-right: 4px; }
}
@media (max-width: 420px) {
  .pxk-unter { display: none; }
  .pxk-marken .m:nth-child(n+7) { display: none; }
  .pxk-start span:first-child { display: none; }
  .pxk-start .pf { font-size: 14px; }
}

/* ==========================================================================
   UEBERBLENDUNG mit dem Automaten
   ========================================================================== */
.pxk-lage {
  position: fixed; inset: 0; z-index: 900; display: none;
  align-items: flex-start; justify-content: center;
  background: rgba(3, 3, 8, .88);
  padding: 18px 12px; overflow-y: auto;
}
.pxk-lage.auf { display: flex; }
.pxk-buehne { position: relative; width: 100%; max-width: 760px; margin: auto; }
.pxk-zu {
  position: absolute; top: -6px; right: -6px; z-index: 5;
  width: 34px; height: 34px; cursor: pointer;
  background: #ff3b5c; border: 3px solid #05050c; color: #05050c;
  font-family: "Press Start 2P", monospace; font-size: 12px; line-height: 1;
}
.pxk-zu:hover { background: #ff6b81; }
@media (max-width: 640px) {
  .pxk-lage { padding: 10px 6px; }
  .pxk-zu { top: -4px; right: -4px; width: 28px; height: 28px; font-size: 10px; }
}
.pxk-lage .aa { margin: 0; }

/* ==========================================================================
   ARCADE-AUTOMAT  -  Modulauswahl
   Alles unter .aa gescoped. Lektionen und uebrige Startseite bleiben unberuehrt.
   ========================================================================== */
.aa {
  position: relative; margin: 4px 0 16px; padding: 7px 11px 0;
  font-family: "Press Start 2P", monospace;
  background:
    linear-gradient(180deg, #1a1a22 0%, #101016 40%, #0a0a10 100%);
  border: 3px solid #2a2a36;
  image-rendering: pixelated;
}
/* seitliche Leuchtstreifen des Gehaeuses */
.aa::before, .aa::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 10px; z-index: 1;
  background: linear-gradient(180deg, #ff3b5c, #8d1024 55%, #ff3b5c);
  box-shadow: 0 0 14px rgba(255,59,92,.55);
}
.aa::before { left: 0; }
.aa::after { right: 0; }
.aa.blitz { background: #e8e8f0; }

/* ---------- Leuchtschild ---------- */
.aa-schild {
  position: relative; z-index: 2; margin: 0 5px 7px; padding: 7px 10px 6px;
  background: linear-gradient(180deg, #15151d, #0c0c12);
  border: 3px solid #2f2f3e; text-align: center;
}
.aa-logo { font-size: 17px; line-height: 1.15; letter-spacing: .02em; }
.aa-logo .t1 { color: #3da9ff; text-shadow: 4px 4px 0 #06213f, 0 0 18px rgba(61,169,255,.5); }
.aa-logo .t2 { color: #ff3b5c; text-shadow: 4px 4px 0 #3d0912, 0 0 18px rgba(255,59,92,.5); }
.aa-unter {
  margin-top: 5px; font-size: 7.5px; color: #ffd23f; letter-spacing: .1em;
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.aa-unter .str { color: #ffb347; }

/* ---------- Bildschirm ---------- */
.aa-schirm {
  position: relative; z-index: 2; margin: 0 5px;
  background: #05050c; border: 3px solid #16324e; padding: 9px 9px 9px;
}
.aa-schirm::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,.30) 0 2px, transparent 2px 4px);
}
.aa-innen { position: relative; }

/* Punktestand */
.aa-stand {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 7px; text-align: center;
}
.aa-feld .l { font-size: 8.5px; letter-spacing: .08em; }
.aa-feld .l-blau { color: #3da9ff; }
.aa-feld .l-rot { color: #ff3b5c; }
.aa-feld .l-gold { color: #ffd23f; }
.aa-feld .v { font-size: 9.5px; color: #e8e8f0; margin-top: 5px; }
.aa-muenze {
  display: inline-block; width: 10px; height: 10px; margin-left: 5px;
  background: #ffd23f; box-shadow: inset 0 0 0 2px #a87d10; vertical-align: -1px;
}
@media (max-width: 560px) {
  .aa-feld .l { font-size: 8px; }
  .aa-feld .v { font-size: 9px; }
}

/* ---------- Kartenraster ---------- */
.aa-raster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
@media (max-width: 720px) { .aa-raster { grid-template-columns: repeat(2, 1fr); } }

.aa-karte {
  position: relative; cursor: pointer; padding: 5px 4px 5px;
  background: #080810;
  border: 2px solid var(--aa-f, #3da9ff);
  text-align: center;
  transition: background .18s, box-shadow .18s, transform .12s;
}
.aa-karte:hover { background: #0d0d1a; }
.aa-karte .nr {
  position: absolute; top: 4px; left: 5px;
  font-size: 9px; color: var(--aa-f, #3da9ff);
}
.aa-karte .bild { line-height: 0; margin: 2px 0 1px; }
.aa-karte .bild svg { display: block; margin: 0 auto; }
/* angedeutetes Bodenraster unter dem Cover */
.aa-karte .boden {
  height: 6px; margin: 0 4px 4px;
  background-image:
    repeating-linear-gradient(90deg, var(--aa-f, #3da9ff) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(180deg, var(--aa-f, #3da9ff) 0 1px, transparent 1px 7px);
  opacity: .22;
}
.aa-karte .tit {
  font-size: 7px; line-height: 1.4; color: var(--aa-f, #3da9ff); word-break: break-word;
}
.aa-karte .tit span { display: block; }
.aa-karte .ps {
  margin-top: 4px; font-size: 5.5px; letter-spacing: .08em;
  color: var(--aa-f, #3da9ff); visibility: hidden;
}
.aa-karte.ps-an .ps { visibility: visible; }
.aa-karte.aktiv { background: #101024; }
.aa-karte.aktiv.puls {
  box-shadow: 0 0 0 2px #05050c, 0 0 0 5px var(--aa-f, #3da9ff),
              0 0 22px -2px var(--aa-f, #3da9ff);
}
.aa-karte:active { transform: translateY(2px); }

/* Farben je Modul */
.aa-karte.f-blau    { --aa-f: #3da9ff; }
.aa-karte.f-gruen   { --aa-f: #3ddc84; }
.aa-karte.f-gold    { --aa-f: #ffb347; }
.aa-karte.f-violett { --aa-f: #b47bff; }
.aa-karte.f-rot     { --aa-f: #ff3b5c; }
.aa-karte.f-tuerkis { --aa-f: #2fd6c3; }
.aa-karte.f-weiss   { --aa-f: #d5dae6; }

/* ---------- Hinweiszeilen ---------- */
.aa-hinweis { margin-top: 7px; text-align: center; }
.aa-hinweis .z1 { font-size: 7px; color: #8f98ad; letter-spacing: .06em; }
.aa-hinweis .z1 b {
  color: #ff3b5c; font-weight: normal; border: 2px solid #ff3b5c; padding: 2px 5px; margin: 0 2px;
}
.aa-hinweis .z1 .pf { color: #ff3b5c; margin: 0 4px; }
@media (max-width: 560px) {
  .aa-hinweis .z1 { font-size: 6.5px; }
}

/* ---------- Bedienpult ---------- */
.aa-pult {
  position: relative; z-index: 2; margin: 7px 5px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #1c1c26, #101018);
  border: 3px solid #2f2f3e; border-bottom: none; padding: 8px 14px 9px;
}

/* Joystick */
.aa-joy { position: relative; width: 54px; height: 44px; flex: none; }
.aa-basis {
  position: absolute; left: 50%; bottom: 4px; margin-left: -13px;
  width: 26px; height: 9px; background: #2a2a38;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.10); display: block;
}
.aa-joy-stange {
  position: absolute; left: 50%; bottom: 9px; margin-left: -10px; width: 20px;
  transform-origin: 50% 100%;
  transition: transform .16s ease-out;
}
.aa-joy-stange .stange {
  display: block; width: 6px; height: 14px; margin: 0 auto;
  background: linear-gradient(90deg, #4a4a5e, #8e8ea6 45%, #3a3a4c);
}
.aa-joy-stange .kugel {
  display: block; width: 17px; height: 17px; margin: 0 auto -2px;
  background: radial-gradient(circle at 32% 30%, #ff7b8e, #ff3b5c 45%, #8d1024);
  box-shadow: 0 3px 0 rgba(0,0,0,.5);
}
.aa-joy-stange.kipp-links  { transform: rotate(-20deg); }
.aa-joy-stange.kipp-rechts { transform: rotate(20deg); }
.aa-joy-stange.kipp-hoch   { transform: translateY(-3px) scaleY(1.06); }
.aa-joy-stange.kipp-runter { transform: translateY(3px) scaleY(.94); }

.aa-pfeil {
  position: absolute; width: 0; height: 0; display: block; opacity: .75;
}
.aa-pfeil.p-links  { left: 0;  top: 24px; border: 5px solid transparent; border-right-color: #ff3b5c; }
.aa-pfeil.p-rechts { right: 0; top: 24px; border: 5px solid transparent; border-left-color: #ff3b5c; }
.aa-pfeil.p-hoch   { left: 22px; top: 0;  border: 5px solid transparent; border-bottom-color: #ff3b5c; }
.aa-pfeil.p-runter { left: 22px; bottom: 0; border: 5px solid transparent; border-top-color: #ff3b5c; }

/* Knoepfe */
.aa-knoepfe { display: flex; gap: 16px; flex: 1; justify-content: center; }
.aa-gruppe { text-align: center; }
.aa-gruppe .reihe { display: flex; gap: 7px; }
.aa-knopf {
  width: 25px; height: 25px; border: none; cursor: pointer; padding: 0;
  transition: transform .09s, box-shadow .09s, filter .15s;
}
.aa-knopf.k-rot {
  background: radial-gradient(circle at 34% 30%, #ff7b8e, #ff3b5c 48%, #a01528);
  box-shadow: 0 4px 0 #5e0c18;
}
.aa-knopf.k-blau {
  background: radial-gradient(circle at 34% 30%, #86c8ff, #3da9ff 48%, #1550a0);
  box-shadow: 0 4px 0 #0b3468;
}
.aa-knopf:hover { filter: brightness(1.12); }
.aa-knopf.gedrueckt, .aa-knopf:active { transform: translateY(4px); box-shadow: 0 1px 0 #0b3468; }
.aa-gruppe .lab { margin-top: 5px; font-size: 7.5px; letter-spacing: .08em; }
.aa-gruppe .l-rot { color: #3da9ff; }
.aa-gruppe .l-blau { color: #ff3b5c; }

/* Muenzschlitz */
.aa-schlitz { flex: none; text-align: center; }
.aa-schlitz .txt { font-size: 7.5px; color: #ffd23f; line-height: 1.5; }
.aa-schlitz .loch {
  display: block; width: 10px; height: 20px; margin: 5px auto 0;
  background: #05050c; box-shadow: inset 0 0 0 2px #3a3a4c;
}

@media (max-width: 660px) {
  .aa-logo { font-size: 15px; }
  .aa-unter { font-size: 8px; }
  .aa-pult { justify-content: center; gap: 18px; padding: 14px 10px 16px; }
  .aa-knoepfe { gap: 14px; }
  .aa-knopf { width: 26px; height: 26px; }
  .aa-gruppe .lab { font-size: 9px; }
  .aa-schlitz .txt { font-size: 8px; }
  .aa-joy { width: 56px; height: 50px; }
}
@media (max-width: 400px) {
  .aa-logo { font-size: 15px; }
  .aa-karte .tit { font-size: 7px; }
}
