/* Lokale Pixel-Schrift: keine externe Font-Anfrage */
@font-face {
  font-family: 'Pixelify Sans';
  src: url('assets/fonts/static/PixelifySans-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root{--ink:#28264e;--edge:#342a68;--paper:#fffdf5;--gold:#ffe57e;--lilac:#e8e5ff;--shadow:#27245e;--focus:#ef6b66}*{box-sizing:border-box}body{margin:0;color:var(--ink);font-family:system-ui,-apple-system,'Segoe UI',Arial,sans-serif;background:#556cba;min-height:100vh}button,a{touch-action:manipulation}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:4px solid #f27666;outline-offset:3px}[hidden]{display:none!important}.scene{min-height:100vh;position:relative;isolation:isolate;padding:24px clamp(12px,3vw,46px) 45px;overflow:hidden}.scene:before{content:'';position:fixed;inset:0;z-index:-2;background:linear-gradient(#6887d1 0%,#8ba8e0 40%,#e4add2 68%,#6c76b4 100%)}.scene:after{content:'';position:fixed;inset:0;z-index:-1;opacity:.78;background:linear-gradient(145deg,transparent 60%,#5868a8 60% 68%,transparent 68%) 0 24vh/310px 240px repeat-x,linear-gradient(215deg,transparent 60%,#4d62a0 60% 69%,transparent 69%) 0 27vh/390px 230px repeat-x,linear-gradient(135deg,transparent 57%,#354b85 57% 75%,transparent 75%) 0 60vh/230px 250px repeat-x,linear-gradient(225deg,transparent 56%,#354b85 56% 75%,transparent 75%) 0 62vh/280px 250px repeat-x;image-rendering:pixelated}.shell{max-width:1580px;margin:auto}.topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:23px}.brand{display:flex;gap:15px;align-items:center}.brand-mark{font-size:39px;filter:drop-shadow(3px 4px #3c3972)}.brand h1{font:clamp(22px,3vw,40px)/1.2 'Pixelify Sans',monospace;letter-spacing:-1px;color:#fff;text-shadow:4px 4px #343071;margin:0 0 10px}.brand small{display:inline-block;background:#fff3bd;padding:5px 10px;border:2px solid var(--edge);font-weight:800;letter-spacing:1px}.controls{background:#29254f;color:white;border:3px solid #211e44;border-radius:12px;padding:12px 15px;display:flex;flex-wrap:wrap;gap:16px;box-shadow:4px 4px #23204c}.key{display:inline-grid;place-items:center;border-radius:50%;background:#fff;color:#30285c;width:26px;height:26px;font-weight:900;margin-right:5px}.layout{display:grid;grid-template-columns:minmax(270px,34%) minmax(0,1fr);gap:18px;align-items:start}.sidebar{display:flex;flex-direction:column;gap:13px}.station{background:#e9e7ff;border:4px solid var(--edge);border-radius:14px;box-shadow:5px 6px #302b68;overflow:hidden}.station.active{background:#ffeb96}.station-head{width:100%;background:transparent;border:0;color:var(--ink);display:flex;align-items:center;text-align:left;gap:12px;padding:17px 13px;font-size:clamp(14px,1.5vw,20px);font-weight:900;line-height:1.25}.station-head .emoji{font-size:30px;flex:none}.station-head .name{flex:1}.station-head .number{font-family:'Pixelify Sans',monospace;font-size:12px;display:block;margin-bottom:7px}.station-head .chev{font-size:20px}.game-list{padding:0 10px 12px;display:flex;flex-direction:column;gap:7px}.game-choice{width:100%;border:2px solid #d8cba6;border-radius:8px;background:#fff9e8;padding:11px 10px;text-align:left;font-size:15px;font-weight:800;color:#2d2850;display:flex;gap:10px;align-items:center}.game-choice.active{border-color:#bb9548;background:#fff6cf}.game-choice .arrow{font-size:19px}.game-choice:hover,.station-head:hover{filter:brightness(.97)}.placeholder{font-size:13px;padding:12px;background:#fff8dc;border-radius:7px}.main{background:#f4f0ff;border:4px solid var(--edge);border-radius:19px;box-shadow:7px 8px #29235f;padding:14px;min-height:620px}.panel{border:3px solid var(--edge);border-radius:11px;background:var(--paper);overflow:hidden}.content-tabs{display:flex;gap:5px;overflow-x:auto;padding:0 8px;margin-bottom:-3px}.tab{border:3px solid var(--edge);border-radius:11px 11px 0 0;padding:13px 14px;background:#e4e2fa;font-size:13px;font-weight:900;white-space:nowrap;color:var(--ink)}.tab.active{background:#ffe37b;border-bottom-color:#ffe37b;position:relative;z-index:1}.panel-body{padding:clamp(18px,2.2vw,32px);min-height:515px;display:flex;flex-direction:column}.game-head{display:flex;gap:20px;align-items:center;margin-bottom:17px}.cover{width:clamp(125px,29%,235px);height:145px;object-fit:cover;border:3px solid var(--edge);border-radius:12px;background:#c5edf3}.game-head h2{font-size:clamp(22px,2.8vw,34px);line-height:1.15;margin:0 0 10px;font-weight:900}.eyebrow{font:10px 'Pixelify Sans',monospace;color:#6b5b9a;margin-bottom:12px}.tagline{background:#e9e4fb;border:2px solid #b9addb;border-radius:7px;display:inline-block;padding:7px 9px;font-weight:700;font-size:13px}.reading{font-size:clamp(16px,1.3vw,19px);line-height:1.52;flex:1;min-height:170px;max-height:48vh;overflow:auto;padding-right:6px;overscroll-behavior:contain}.reading h2{font-size:clamp(22px,2.2vw,29px);line-height:1.2;margin:0 0 15px}.reading h3{font-size:19px;margin:20px 0 8px}.reading p{margin:0 0 13px}.reading ul{padding-left:25px}.reading li{margin:8px 0}.reading a{color:#4a419d;overflow-wrap:anywhere}.questions{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin-top:15px}.question{background:#f1edff;border:2px solid #b3a4d5;border-radius:15px;padding:14px;font-size:clamp(15px,1.2vw,18px);font-weight:700}.start{display:inline-block;text-decoration:none;background:#ffd85d;border:3px solid var(--edge);box-shadow:4px 4px var(--edge);border-radius:9px;color:#29234e!important;padding:13px 17px;font-weight:900;margin:10px 5px 15px 0}.hint{font-size:14px;color:#5e5879}.pager{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:20px;border-top:2px dashed #c6b9db;padding-top:14px}.pager button{background:#e6e1fa;border:2px solid #a49acb;border-radius:8px;padding:10px 14px;color:#31295e;font-weight:900}.pager button:disabled{opacity:.3;cursor:default}.pager strong{font-size:13px;white-space:nowrap}.foot{margin:20px 0 0;color:#fff;font-size:13px;text-align:center;text-shadow:1px 2px #302b68}.empty{display:grid;place-items:center;min-height:400px;text-align:center}.empty h2{font-size:25px}.mode{font-size:12px;font-weight:900;letter-spacing:.4px;color:#e8e5ff;text-shadow:1px 1px #302b68;margin:0 0 12px}.mode strong{color:#fff1a6}.skip{position:absolute;left:-9999px}.skip:focus{left:10px;top:10px;z-index:99;background:white;padding:12px}.mobile-controls{display:none}@media(max-width:1000px){.layout{grid-template-columns:minmax(240px,36%) minmax(0,1fr)}.station-head{font-size:14px}.controls{font-size:12px;gap:8px}.game-head{align-items:flex-start}.cover{width:145px;height:120px}}@media(max-width:760px){.scene{padding:14px 12px 30px}.topbar{flex-direction:column}.controls{display:none}.layout{grid-template-columns:1fr}.sidebar{gap:7px}.station-head{padding:11px;font-size:16px}.station-head .emoji{font-size:23px}.station-head .number{font-size:10px}.main{padding:9px;min-height:0}.panel-body{padding:16px;min-height:450px}.game-head{gap:12px}.cover{width:100px;height:90px}.reading{max-height:none}.mobile-controls{display:flex;justify-content:space-between;gap:10px;margin-top:15px}.mobile-controls button{border:2px solid #30285b;border-radius:9px;padding:10px 13px;background:#fff4bc;font-weight:800}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Version 0.6 – naturbezogene Pixelart-Kulisse und ruhiger Inhaltsbereich */
.scene:before{background:linear-gradient(180deg,rgba(30,34,76,.10),rgba(20,34,53,.14)),url('assets/pixel-nature.png') center center/cover no-repeat;image-rendering:pixelated}
.scene:after{background:none}
.brand small{font-size:clamp(12px,1.25vw,16px);letter-spacing:0;line-height:1.4;max-width:650px}
/* Gleiche Panelhöhe bei allen Reitern: nur der Lesebereich scrollt. */
.main{height:690px;min-height:690px;display:flex;flex-direction:column}
.panel{flex:1;min-height:0;display:flex;flex-direction:column}
.panel-body{height:100%;min-height:0;flex:1}
.game-head{flex:none}
.reading{min-height:0;max-height:none;flex:1;overflow-y:auto;overflow-x:hidden}
.pager{flex:none}
@media(max-width:760px){.main{height:650px;min-height:650px}.panel-body{min-height:0}.reading{min-height:0;max-height:none}.brand small{font-size:12px}}
@media(max-width:440px){.main{height:690px;min-height:690px}.game-head{align-items:flex-start}.cover{width:82px;height:82px}.game-head h2{font-size:20px}.content-tabs .tab{padding:11px 9px;font-size:11px}}

/* Pixelify Sans für die Spieloberfläche; Lesetexte bleiben gut lesbar. */
.brand h1,.station-head,.station-head .number,.game-choice,
.content-tabs .tab,.game-head h2,.eyebrow,.pager button,
.pager strong,.controls,.key,.start {
  font-family:'Pixelify Sans',monospace;
}
.brand h1 {font-size:clamp(32px,4vw,56px);letter-spacing:.01em}
.station-head {font-size:clamp(17px,1.65vw,23px)}
.station-head .number {font-size:16px}
.game-head h2 {font-size:clamp(27px,3vw,42px)}
.content-tabs .tab {font-size:17px}
.game-choice {font-size:19px}
.eyebrow {font-size:14px}
.reading,.reading p,.reading li,.reading a,.question {font-family:system-ui,-apple-system,'Segoe UI',Arial,sans-serif}
@media(max-width:760px){.station-head{font-size:19px}.game-head h2{font-size:28px}.content-tabs .tab{font-size:15px}}

/* Bildmaterial Evolution des Vertrauens */
.game-head .cover{object-fit:contain;background:#fffdf5;padding:4px}
.reading .knowledge-illustration{margin:14px auto 22px;max-width:620px}
.reading .knowledge-illustration img{display:block;width:100%;height:auto;max-height:260px;object-fit:contain;border:2px solid #c7bce2;border-radius:10px;background:#fff}
.reading .knowledge-illustration figcaption{font-size:13px;color:#625b7b;line-height:1.45;margin-top:7px;text-align:center}
/* Zusätzliche Pixelify-Schriftschnitte; Dateien selbst liegen beim Betreiber */
@font-face{font-family:'Pixelify Sans';src:url('assets/fonts/static/PixelifySans-Medium.ttf') format('truetype');font-weight:500;font-display:swap}
@font-face{font-family:'Pixelify Sans';src:url('assets/fonts/static/PixelifySans-SemiBold.ttf') format('truetype');font-weight:600;font-display:swap}
@font-face{font-family:'Pixelify Sans';src:url('assets/fonts/static/PixelifySans-Bold.ttf') format('truetype');font-weight:700;font-display:swap}
.reading h2,.reading h3{font-family:'Pixelify Sans',monospace;font-weight:700}

/* JSON-Version: Ladefehler im Inhaltsbereich anzeigen */
.load-error{padding:20px;background:#fff3db;border:2px solid #bd7755;border-radius:9px}


/* Titelbilder einheitlich im Rahmen darstellen */
.game-head .cover {
    width: clamp(125px, 29%, 235px);
    height: 145px;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
}

/* Anpassung für Tablets */
@media (max-width: 1000px) {
    .game-head .cover {
        width: 145px;
        height: 120px;
    }
}

/* Anpassung für Smartphones */
@media (max-width: 760px) {
    .game-head .cover {
        width: 100px;
        height: 90px;
    }
}

@media (max-width: 440px) {
    .game-head .cover {
        width: 82px;
        height: 82px;
    }
}


/* Version 0.9: kompakter Workshop-Kopf und lebendigere Fragekarten */
@media (min-width: 761px) {
  .topbar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 18px; margin-bottom:9px; }
  .brand, .brand > div { display:contents; }
  .brand-mark { display:none; }
  .brand h1 { grid-column:1; grid-row:1; margin:0; font-size:clamp(32px,3.2vw,48px); }
  .controls { grid-column:2; grid-row:1; padding:7px 11px; gap:10px; }
  .brand small { grid-column:1 / -1; grid-row:2; display:block; width:100%; max-width:none; padding:6px 10px; font-size:clamp(12px,1vw,15px); line-height:1.25; white-space:normal; }
}
@media (min-width: 1100px) {
  .brand small { white-space:nowrap; }
}
.mode { margin-bottom:7px; }
.scene { padding-top:12px; }
.game-head { margin-bottom:10px; }
.panel-body { padding:18px 24px; }
.reading h2 { margin-bottom:10px; }
.reading p { margin-bottom:10px; }
/* Karten behalten ihre Lesbarkeit, auch wenn die Texte länger sind. */
.questions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 5px 18px 0; counter-reset:question; }
.question { position:relative; counter-increment:question; padding:36px 14px 16px; background:#fff0af; border:3px solid #403577; border-radius:10px; box-shadow:4px 4px 0 #403577; font-size:clamp(15px,1.1vw,17px); line-height:1.45; font-weight:700; overflow-wrap:anywhere; }
.question:nth-child(3n + 2) { background:#dcecff; }
.question:nth-child(3n + 3) { background:#e9ddff; }
.question::before { content:'FRAGE ' counter(question, decimal-leading-zero) '  ✦'; position:absolute; top:8px; left:12px; font:700 14px/1.2 'Pixelify Sans',monospace; color:#51448d; }
@media (max-width:1100px) { .questions { grid-template-columns:1fr; } }
@media (min-width:761px) and (max-width:1099px) { .brand small { font-size:12px; } }
@media (max-width:760px) {
  .topbar { margin-bottom:9px; gap:8px; }
  .brand { align-items:flex-start; }
  .brand h1 { margin-bottom:5px; }
  .brand small { display:block; max-width:none; font-size:12px; line-height:1.35; }
  .panel-body { padding:14px; }
  .questions { grid-template-columns:1fr; }
}


/* MEKOBOX – größere Stationskarten */
.station-head {
    padding: 22px 16px;
    min-height: 105px;
}

.station-head .emoji {
    font-size: 30px;
}

.game-choice {
    padding: 14px 12px;
    min-height: 54px;
}

/* Inhaltsfenster nutzt mehr Bildschirmhöhe */
.main {
    height: max(690px, calc(100vh - 185px));
    min-height: 690px;
}

/* Lesebereich bleibt scrollbar */
.panel {
    min-height: 0;
}

.panel-body {
    min-height: 0;
}

.reading {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* Tablet */
@media (max-width: 1000px) {
    .station-head {
        padding: 17px 13px;
        min-height: 90px;
    }
}

/* Smartphone */
@media (max-width: 760px) {
    .station-head {
        padding: 13px;
        min-height: 75px;
    }

    .main {
        height: 650px;
        min-height: 650px;
    }
}



/* MEKOBOX 1.0 – Zwei-Klick-Videoplayer (lokales Vorschaubild) */
.reading .video-card{
  border:3px solid var(--edge);
  border-radius:12px;
  overflow:hidden;
  background:#f1edff;
  margin:14px 4px 24px 0;
  box-shadow:4px 4px 0 var(--shadow);
}
.video-stage{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  background:#242143;
  display:grid;
  place-items:center;
  overflow:hidden;
}
.video-stage img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.video-placeholder{color:#fff;font:700 64px 'Pixelify Sans',monospace}
.video-stage iframe{
  display:block;
  border:0;
  width:100%;
  height:100%;
  position:absolute;
  inset:0;
}
.video-details{padding:15px 18px 18px}
.reading .video-title{
  font:700 clamp(19px,2vw,25px)/1.25 'Pixelify Sans',monospace;
  margin:0 0 8px;
}
.reading .video-notice{
  font-size:14px;
  line-height:1.5;
  color:#4d466d;
  margin:0 0 13px;
}
.video-load{
  background:#ffe57e;
  border:3px solid var(--edge);
  border-radius:8px;
  box-shadow:3px 3px 0 var(--edge);
  padding:10px 15px;
  font:700 18px 'Pixelify Sans',monospace;
  color:var(--ink);
  margin:0 15px 8px 0;
}
.video-load:hover{background:#ffda58}
.video-external{display:inline-block;font-size:14px;font-weight:700}
.video-loaded .video-details{padding-top:10px;padding-bottom:12px}
@media(max-width:760px){
  .video-details{padding:12px}
  .video-load{width:100%;margin-right:0}
}


/* MEKOBOX 1.0.1 – kompaktere Medien im Lesebereich */
/* Videos bleiben 16:9, füllen aber nicht mehr die gesamte Textbreite. */
.reading .video-card {
  width: min(100%, 600px);
  max-width: 100%;
  margin: 12px 0 22px;
}
.reading .video-stage { aspect-ratio: 16 / 9; }
.reading .video-details { padding: 12px 15px 14px; }
.reading .video-title { margin-bottom: 6px; }
.reading .video-notice { margin-bottom: 10px; }

/* Andere Medienbilder stehen unmittelbar beim zugehörigen Text,
   ohne den großen zentrierten Freiraum der alten Figure-Darstellung. */
.reading .knowledge-illustration {
  width: fit-content;
  max-width: min(100%, 600px);
  margin: 9px 0 13px;
}
.reading .knowledge-illustration img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 225px;
  object-fit: contain;
}
.reading .knowledge-illustration figcaption {
  text-align: left;
  margin-top: 5px;
}
@media (max-width: 760px) {
  .reading .video-card { width: 100%; }
  .reading .knowledge-illustration { max-width: 100%; }
}


/* MEKOBOX 1.0.2 – kompakte Videokarten */
.reading .video-card {
  width: min(100%, 380px);
  max-width: 100%;
  margin: 10px 0 18px;
}
.reading .video-stage { aspect-ratio: 16 / 9; }
.reading .video-details { padding: 8px 10px 10px; }
.reading .video-title { font-size: 18px; margin-bottom: 5px; }
.reading .video-notice { font-size: 12px; line-height: 1.4; margin-bottom: 8px; }
.reading .video-load { font-size: 15px; padding: 7px 10px; margin: 0 10px 6px 0; }
.reading .video-external { font-size: 12px; }
.reading .video-loaded .video-details, .reading .video-card.video-loaded .video-details { padding: 8px 10px 10px; }
