/* Formel f – Präsentationsseite. Reines CSS, keine externen Ressourcen. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("/formel-f/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("/formel-f/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("/formel-f/fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("/formel-f/fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --bg: #f6f1e8;
  --bg-2: #ede5d6;
  --surface: #fffcf6;
  --surface-2: #fbf5ea;
  --ink: #131d45;
  --ink-2: #4b5579;
  --line: rgba(19, 29, 69, .12);
  --grid: rgba(37, 88, 170, .075);
  --grid-major: rgba(37, 88, 170, .12);
  --sun: #f28a1c;
  --gold: #f6b630;
  --coral: #ef5f4c;
  --teal: #0f9b97;
  --teal-soft: rgba(15, 155, 151, .12);
  --sun-soft: rgba(242, 138, 28, .13);
  --accent-text: #a8520a;
  --deep: #0b1640;
  --deep-2: #13235c;
  --shadow: 0 1px 2px rgba(19, 29, 69, .06), 0 10px 30px -12px rgba(19, 29, 69, .18);
  --radius: 22px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090f2b;
    --bg-2: #0d1638;
    --surface: #111c48;
    --surface-2: #0f1940;
    --ink: #eef1ff;
    --ink-2: #a8b3d9;
    --line: rgba(200, 215, 255, .12);
    --grid: rgba(120, 165, 255, .06);
    --grid-major: rgba(120, 165, 255, .1);
    --teal: #3fd5cf;
    --teal-soft: rgba(63, 213, 207, .12);
    --sun-soft: rgba(255, 166, 77, .13);
    --accent-text: #ffb562;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  /* Kästchenpapier: 1er-Linien, jede 5. kräftiger */
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--gold); color: #1b1206; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: .8em 1.5em;
  border-radius: 999px; border: 0;
  font: inherit; font-weight: 700; font-size: 1.05rem; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-main {
  color: #221303;
  background: linear-gradient(135deg, #ffd25c 0%, #f6a02a 55%, #ef7a1c 100%);
  box-shadow: 0 0 0 1px rgba(255, 220, 140, .6) inset, 0 8px 28px -6px rgba(242, 138, 28, .65), 0 0 40px -10px rgba(255, 196, 80, .8);
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 230, 160, .8) inset, 0 12px 34px -6px rgba(242, 138, 28, .75), 0 0 56px -8px rgba(255, 196, 80, .9); }
.btn-main:active { transform: translateY(0); }
.btn-ghost { color: #fff; background: rgba(10, 20, 60, .35); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55) inset; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(10, 20, 60, .55); }
.btn-big { min-height: 60px; font-size: 1.2rem; padding-inline: 1.9em; }

/* ---------------------------------------------------------------- Kopf */
.top {
  position: absolute; inset: 0 0 auto; z-index: 10;
  padding-block: 14px;
}
.top .wrap { display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 700; letter-spacing: .01em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.brand .f { color: var(--gold); font-style: italic; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top nav a:not(.btn) { color: rgba(255, 255, 255, .88); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-size: .97rem; display: none; }
.top nav a:not(.btn):hover { color: #fff; background: rgba(255, 255, 255, .1); }
.top .btn { min-height: 44px; padding: .5em 1.15em; font-size: .97rem; }
@media (min-width: 900px) { .top nav a:not(.btn) { display: inline-block; } }

/* Unterseiten: Kopf auf dunklem Band */
.top-sub { position: relative; background: linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 100%); }

/* ---------------------------------------------------------------- Hero */
.hero {
  position: relative; isolation: isolate;
  min-height: min(100svh, 980px);
  display: flex; flex-direction: column;
  color: #fff;
  background: #1b3c8f;
}
.hero-bild { position: absolute; inset: 0; z-index: -2; }
.hero-bild img { width: 100%; height: 100%; object-fit: cover; object-position: 26% 100%; }
.hero::before {
  /* oben: tiefblau für den Titel; unten: Übergang ins Kästchenpapier */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 18, 66, .72) 0%, rgba(10, 26, 90, .35) 26%, rgba(10, 26, 90, 0) 46%),
    linear-gradient(0deg, var(--bg) 0%, rgba(0, 0, 0, 0) 13%);
}
.hero-text {
  padding-top: clamp(96px, 15vh, 150px);
  text-align: center;
}
.kicker {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .82rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.hero .kicker { color: #ffe3a6; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.kicker::before, .kicker::after { content: ""; width: 26px; height: 2px; border-radius: 2px; background: currentColor; opacity: .7; }

.wordmark {
  margin: .12em 0 0;
  font-size: clamp(4rem, 15vw, 9.5rem);
  line-height: .9; font-weight: 700; letter-spacing: -.035em;
  text-shadow: 0 4px 30px rgba(5, 12, 50, .55);
}
.wordmark .f {
  display: inline-block;
  font-style: italic; transform: skewX(-4deg);
  margin-left: -.02em; padding-right: .06em;
  background: linear-gradient(175deg, #fffbe8 0%, #ffe07a 30%, #ffb43c 70%, #ff8a24 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 2px rgba(255, 240, 200, .9)) drop-shadow(0 0 22px rgba(255, 170, 50, .85));
}
.hero-sub {
  max-width: 34em; margin: 1.1rem auto 0;
  font-size: clamp(1.08rem, 2.4vw, 1.3rem); line-height: 1.5;
  text-shadow: 0 1px 12px rgba(5, 12, 50, .7);
}
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 1.7rem; }
.hero-fakten {
  margin-top: auto; padding: 0 0 clamp(28px, 6vh, 56px);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  list-style: none; padding-left: 0;
}
.hero-fakten li {
  font-size: .9rem; font-weight: 700;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  padding: .45em .95em; border-radius: 999px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

/* sanftes Einblenden beim Laden */
@media (prefers-reduced-motion: no-preference) {
  .hero-text > * { animation: auf .9s var(--ease) both; }
  .hero-text > :nth-child(2) { animation-delay: .08s; }
  .hero-text > :nth-child(3) { animation-delay: .18s; }
  .hero-text > :nth-child(4) { animation-delay: .28s; }
  .hero-fakten { animation: auf .9s .4s var(--ease) both; }
  @keyframes auf { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 640px) {
  .hero { min-height: 100svh; }
  .hero-bild img { object-position: 22% 100%; }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(8, 18, 66, .8) 0%, rgba(10, 26, 90, .45) 40%, rgba(10, 26, 90, 0) 62%),
      linear-gradient(0deg, var(--bg) 0%, rgba(0, 0, 0, 0) 12%);
  }
}

/* ---------------------------------------------------------------- Abschnitte */
section { scroll-margin-top: 16px; }
.abschnitt { padding-block: clamp(64px, 10vw, 120px); position: relative; }
.kopf { max-width: 44rem; margin-bottom: clamp(32px, 5vw, 56px); }
.kopf .kicker { color: var(--accent-text); }
.kopf .kicker::before { display: none; }
.kopf .kicker::after { display: none; }
h2 {
  margin: .25em 0 .35em;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.06; letter-spacing: -.02em;
}
h2 em { font-style: normal; color: var(--accent-text); }
h3 { margin: 0 0 .35em; font-size: 1.22rem; line-height: 1.25; }
.lead { font-size: clamp(1.08rem, 2vw, 1.22rem); color: var(--ink-2); margin: 0; }
p { margin: 0 0 1em; }

/* ---------------------------------------------------------------- So geht's */
.schritte { position: relative; display: grid; gap: 22px; }
.schritt {
  position: relative; z-index: 1;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 24px; box-shadow: var(--shadow);
}
.schritt p { color: var(--ink-2); margin: 0; }
.schritt .bild { aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; margin-bottom: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.schritt .bild svg { width: 100%; height: 100%; display: block; }
.nr {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font-weight: 700; font-size: .95rem; margin-bottom: 10px;
  color: #221303; background: linear-gradient(135deg, #ffd25c, #f28a1c);
  box-shadow: 0 0 0 4px var(--sun-soft), 0 0 18px rgba(255, 170, 60, .5);
}
.kurve-hinten { display: none; }
@media (min-width: 900px) {
  .schritte { grid-template-columns: repeat(3, 1fr); gap: 28px; padding-top: 30px; }
  .schritt:nth-child(3) { transform: translateY(36px); }
  .schritt:nth-child(4) { transform: translateY(-6px); }
  .kurve-hinten { display: block; position: absolute; inset: -40px -4% auto; height: 300px; width: 108%; z-index: 0; pointer-events: none; }
}
.kurve-hinten path { fill: none; stroke-linecap: round; }
.leucht { stroke: url(#glut); stroke-width: 5; filter: drop-shadow(0 0 8px rgba(255, 170, 50, .9)); }
.leucht-weich { stroke: rgba(255, 180, 60, .25); stroke-width: 18; filter: blur(6px); }
@media (prefers-reduced-motion: no-preference) {
  .zeichnen { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .sichtbar .zeichnen { animation: zeichne 2.4s var(--ease) forwards; }
  @keyframes zeichne { to { stroke-dashoffset: 0; } }
}

.extras { margin-top: clamp(56px, 7vw, 84px); display: grid; gap: 14px; }
@media (min-width: 720px) { .extras { grid-template-columns: repeat(3, 1fr); } }
.extra {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 18px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px dashed var(--line);
}
.extra p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.extra strong { color: var(--ink); display: block; margin-bottom: 2px; }
.ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); }
.ico svg { width: 22px; height: 22px; }
.ico.warm { background: var(--sun-soft); color: var(--accent-text); }

/* ---------------------------------------------------------------- Kapitel */
.strang { margin-top: 10px; }
.strang + .strang { margin-top: clamp(48px, 6vw, 72px); }
.strang-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 18px; }
.strang-kopf h3 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 0; }
.strang-kopf span { color: var(--ink-2); }
.pille { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .04em; padding: .25em .75em; border-radius: 999px; background: var(--teal-soft); color: var(--teal); }
.pille.warm { background: var(--sun-soft); color: var(--accent-text); }

.karten { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); list-style: none; padding: 0; margin: 0; }
.karte {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px 16px 18px; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.karte:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--sun) 45%, var(--line)); }
.karte .plot { aspect-ratio: 5 / 3; border-radius: 12px; margin-bottom: 14px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.karte .plot svg { width: 100%; height: 100%; display: block; }
.plot .g1 { stroke: var(--grid-major); stroke-width: .6; }
.plot .ax { stroke: var(--ink-2); stroke-width: .9; opacity: .55; }
.plot .kv { fill: none; stroke: var(--sun); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px rgba(255, 160, 40, .55)); }
.plot .kv2 { fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-dasharray: 4 3; stroke-linecap: round; }
.plot .fl { fill: var(--teal); opacity: .22; }
.plot .pt { fill: var(--teal); stroke: var(--surface); stroke-width: 1.5; }
.karte h4 { margin: 0; font-size: 1.1rem; }
.karte .meta { font-size: .88rem; color: var(--ink-2); margin: 2px 0 8px; }
.karte .term { font-size: .95rem; font-weight: 700; color: var(--accent-text); margin: 0 0 8px; }
.karte .titel { font-size: .9rem; color: var(--ink-2); margin: auto 0 0; }
.karte .titel::before { content: "Level: "; font-weight: 700; color: var(--ink); }
.karte .titel { margin-top: 6px; }
@media (max-width: 559px) {
  .karte { display: grid; grid-template-columns: 112px 1fr; column-gap: 14px; align-items: start; padding: 12px; }
  .karte .plot { grid-row: 1 / span 4; margin: 0; aspect-ratio: 1; }
  .karte .plot svg { height: 100%; }
  .karte h4 { font-size: 1.02rem; line-height: 1.25; }
  .karte .meta { margin-bottom: 4px; }
  .karte .term { margin-bottom: 4px; font-size: .9rem; }
  .karte .titel { font-size: .85rem; }
}
.hinweis-klein { margin-top: 18px; color: var(--ink-2); font-size: .95rem; }

/* ---------------------------------------------------------------- Bausteine (Bento) */
.bento { display: grid; gap: 14px; }
@media (min-width: 820px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .b-welt { grid-column: span 4; grid-row: span 2; }
  .b-tour { grid-column: span 2; }
  .b-garage { grid-column: span 2; }
  .b-hilfe { grid-column: span 3; }
  .b-uebung { grid-column: span 3; }
}
.kachel {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.kachel p { color: var(--ink-2); margin: 0; }
.kachel.mit-bild { padding: 0; display: flex; flex-direction: column; }
.kachel.mit-bild .txt { padding: 20px 22px 22px; }
.kachel.mit-bild img { width: 100%; aspect-ratio: 1180 / 820; object-fit: cover; }
.b-welt img { flex: 1; min-height: 0; }
.kachel .ico { margin-bottom: 12px; }

/* ---------------------------------------------------------------- Im Unterricht (dunkles Band) */
.band {
  color: #eef1ff;
  background:
    radial-gradient(1200px 500px at 85% 0%, rgba(255, 150, 60, .18), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(40, 200, 200, .14), transparent 60%),
    linear-gradient(180deg, #0b1640 0%, #0a1233 100%);
  position: relative; overflow: hidden;
}
.band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(140, 180, 255, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 180, 255, .09) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
}
.band .kopf .kicker { color: #ffc77a; }
.band h2 em { color: #ffc461; }
.band .lead { color: #b9c3e6; }
.unterricht { position: relative; display: grid; gap: 28px; }
@media (min-width: 960px) { .unterricht { grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; } }
.punkte { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.punkte li { display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(200, 215, 255, .12); }
.punkte li p { margin: 0; color: #b9c3e6; }
.punkte strong { display: block; color: #fff; margin-bottom: 2px; }
.band .ico { background: rgba(63, 213, 207, .14); color: #5fe3dd; }
.band .ico.warm { background: rgba(255, 170, 70, .15); color: #ffc070; }

.tafel {
  position: relative;
  border-radius: 24px; padding: 26px 24px 24px;
  background: linear-gradient(160deg, #173a3a 0%, #102b2d 100%);
  border: 10px solid #6b4a2b;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), inset 0 0 60px rgba(0, 0, 0, .35);
  color: #f2f4ea;
}
.tafel h3 { font-size: 1.35rem; color: #fff6d8; margin-bottom: .2em; }
.tafel .klein { color: #c6d3c8; font-size: .95rem; margin-bottom: 18px; }
.tafel ol { margin: 0; padding: 0; list-style: none; counter-reset: t; display: grid; gap: 14px; }
.tafel li { counter-increment: t; display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; }
.tafel li::before {
  content: counter(t); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(255, 246, 216, .75); font-weight: 700; color: #fff6d8;
}
.tafel li p { margin: 4px 0 0; color: #dfe7da; }
.felder { display: flex; gap: 8px; margin: 10px 0 2px; }
.felder span {
  width: 42px; height: 50px; border-radius: 8px; display: grid; place-items: center;
  border: 2px dashed rgba(255, 246, 216, .55); font-size: 1.4rem; font-weight: 700; color: rgba(255, 246, 216, .7);
}
.kreide { font-size: .85rem; color: #aebfb0; margin-top: 4px; }

/* ---------------------------------------------------------------- Galerie */
.galerie { display: grid; gap: 14px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .galerie { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .galerie { grid-template-columns: repeat(4, 1fr); }
  .galerie li:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .galerie li:nth-child(8) { grid-column: span 2; }
  .galerie li:nth-child(8) img { aspect-ratio: 2.95 / 1; object-position: 50% 62%; }
}
.galerie figure { margin: 0; height: 100%; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.galerie button { all: unset; cursor: zoom-in; display: block; flex: 1; position: relative; overflow: hidden; }
.galerie button:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.galerie img { width: 100%; height: 100%; aspect-ratio: 1180 / 820; object-fit: cover; transition: transform .6s var(--ease); }
.galerie button:hover img { transform: scale(1.035); }
.galerie figcaption { padding: 12px 16px 14px; font-size: .95rem; color: var(--ink-2); }
.galerie figcaption strong { color: var(--ink); }

dialog.gross {
  padding: 0; border: 0; border-radius: 16px; background: #000; max-width: min(1200px, 96vw); width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
dialog.gross::backdrop { background: rgba(5, 10, 30, .82); backdrop-filter: blur(4px); }
dialog.gross img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; }
dialog.gross p { margin: 0; padding: 12px 56px 14px 16px; color: #e6e9f7; background: #0b1233; font-size: .98rem; }
dialog.gross .zu {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(10, 18, 50, .75); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}

/* ---------------------------------------------------------------- Installieren */
.install { display: grid; gap: 16px; }
@media (min-width: 820px) { .install { grid-template-columns: 1fr 1fr; } }
.install .kachel ol { margin: 8px 0 0; padding-left: 1.3em; color: var(--ink-2); }
.install .kachel li { margin-bottom: .35em; }
.install .kachel li strong { color: var(--ink); }
.install-fuss { margin-top: 18px; display: flex; gap: 12px; align-items: center; color: var(--ink-2); }

/* ---------------------------------------------------------------- Datenschutz-Teaser */
.drei { display: grid; gap: 14px; }
@media (min-width: 760px) { .drei { grid-template-columns: repeat(3, 1fr); } }
.drei .kachel strong { display: block; font-size: 1.15rem; margin-bottom: 4px; }

/* ---------------------------------------------------------------- Schluss */
.schluss {
  text-align: center; color: #fff;
  background:
    linear-gradient(180deg, rgba(10, 20, 70, .55), rgba(10, 20, 70, .78)),
    var(--schluss-bild, none) center 70% / cover no-repeat, #16306f;
  border-radius: 28px; padding: clamp(48px, 8vw, 88px) 22px;
  box-shadow: var(--shadow);
}
.schluss h2 { color: #fff; }
.schluss p { color: #dfe5ff; max-width: 32em; margin: 0 auto 1.6em; }

/* ---------------------------------------------------------------- Fuß */
.fuss { padding: 48px 0 40px; margin-top: clamp(64px, 9vw, 110px); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.fuss .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.fuss .brand { color: var(--ink); }
.fuss nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.fuss nav a { text-decoration: none; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); }
.fuss nav a:hover { color: var(--ink); background: var(--surface); }
.fuss small { color: var(--ink-2); display: block; width: 100%; font-size: .88rem; }
.fuss small a { color: var(--accent-text); }

/* ---------------------------------------------------------------- Textseiten (Datenschutz) */
.seite-kopf { padding: 48px 0 8px; }
.seite-kopf h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: -.02em; margin: .2em 0 .3em; }
.text { max-width: 46rem; }
.text h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); margin-top: 1.8em; }
.text h3 { margin-top: 1.4em; }
.text ul { padding-left: 1.2em; }
.text li { margin-bottom: .4em; }
.text a { color: var(--accent-text); }
.kasten {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 20px; box-shadow: var(--shadow); margin: 1.2em 0;
}
.platzhalter {
  background: var(--sun-soft); border: 2px dashed color-mix(in srgb, var(--sun) 60%, transparent);
  border-radius: 14px; padding: 14px 16px; margin: 1em 0;
}
.platzhalter::before { content: "Bitte prüfen"; display: block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 4px; }
mark.ph { background: var(--gold); color: #1b1206; padding: 0 .3em; border-radius: 4px; font-weight: 700; }
.zurueck { display: inline-flex; gap: .4em; align-items: center; color: var(--accent-text); font-weight: 700; text-decoration: none; }
.zurueck:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- Einblenden beim Scrollen (nur mit JS) */
@media (prefers-reduced-motion: no-preference) {
  .js .zeig { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .zeig.sichtbar { opacity: 1; transform: none; }
}

.kasten h3 { margin-top: 0; }
.kasten p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- Spielbilder in Schritt- und Extra-Karten */
.schritt .bild {
  position: relative; background: #0b1640;
  border: 0; box-shadow: 0 0 0 1px rgba(255, 200, 110, .55), 0 0 22px -6px rgba(255, 170, 60, .55), 0 10px 24px -14px rgba(10, 20, 60, .55);
}
.schritt .bild img, .extra.mit-bild img, .b-tour img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bild-doppel { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.bild-doppel figure { margin: 0; position: relative; overflow: hidden; min-height: 0; }
.bild-doppel figcaption {
  position: absolute; left: 8px; bottom: 8px; padding: .2em .65em; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em; box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.chip-regler { background: #f6b630; color: #221303; }
.chip-term { background: #1f5fd1; color: #fff; }
.extra.mit-bild { flex-direction: column; gap: 0; padding: 0; overflow: hidden; border-style: solid; background: var(--surface); box-shadow: var(--shadow); }
.extra.mit-bild picture { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); }
.extra.mit-bild p { padding: 14px 18px 18px; }
.b-tour picture { display: block; aspect-ratio: 16 / 10; overflow: hidden; }

.heft {
  position: relative; z-index: 1;
  margin-top: clamp(40px, 6vw, 72px);
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--sun-soft), var(--teal-soft));
  border: 2px solid color-mix(in srgb, var(--sun) 55%, transparent);
  box-shadow: var(--shadow);
}
.heft strong { display: block; font-size: clamp(1.15rem, 2.4vw, 1.4rem); line-height: 1.3; margin-bottom: 6px; }
.heft p { margin: 0; color: var(--ink-2); max-width: 60rem; }
.heft-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #221303; background: linear-gradient(135deg, #ffd25c, #f28a1c); box-shadow: 0 0 18px rgba(255, 170, 60, .45); }
.heft-ico svg { width: 28px; height: 28px; }
.heft + .extras { margin-top: 22px; }
.punkte li.heft-punkt { border-color: rgba(255, 190, 100, .55); background: rgba(255, 170, 70, .1); }
@media (max-width: 560px) { .heft { flex-direction: column; } }
.schritt .bild picture { display: block; height: 100%; }

/* Aufgabe des Tages: echtes Bild des Lehrer-Dialogs unter den drei Schritten (vergrößerbar) */
.tafel-bild { display: block; width: 100%; margin-top: 18px; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; color: inherit; font: inherit; }
.tafel-bild img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 0 0 2px rgb(255 200 80 / .55), 0 14px 36px rgb(0 0 0 / .4); transition: transform .2s ease; }
.tafel-bild:hover img, .tafel-bild:focus-visible img { transform: scale(1.015); }
.tafel-bild-text { display: block; margin-top: 8px; font-size: .9rem; color: #c6d3c8; }
