/* Tusche auf warmgrauem Papier wie in der isi-Szene. Bewusst nur dieses eine Aussehen; App-Bilder bleiben dunkel. */
@font-face { font-family: Gelasio; src: url("schriften/gelasio-latin-400-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: Gelasio; src: url("schriften/gelasio-latin-600-italic.woff2") format("woff2"); font-style: italic; font-weight: 600; font-display: swap; }
@font-face { font-family: Gelasio; src: url("schriften/gelasio-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("schriften/InstrumentSans-Variable.ttf") format("truetype"); font-style: normal; font-weight: 400 700; font-display: swap; }

:root {
  --papier-farbe: #dcd8cf;
  --blatt: #e7e3dc;
  --tusche: #1c1a17;
  --tusche-leise: #5d584f;
  --violett: #694aff;
  --film-grund: #ece9e3;
  --handy: #121214;
  --serif: Gelasio, Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --rand: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
html { background: var(--papier-farbe); }
body {
  margin: 0;
  background: var(--papier-farbe) var(--papier, none);
  color: var(--tusche);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--violett); outline-offset: 2px; border-radius: 4px; }

.gesamt { display: grid; justify-content: center; gap: 40px; padding-block: 0 48px; grid-template-columns: minmax(0, 430px); }
.seite {
  min-width: 0;
  padding-block: 14px 26px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; gap: 22px;
}
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.marke { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: 22px; letter-spacing: -.03em; }
.marke svg { width: 30px; height: 30px; display: block; overflow: hidden; }
.anmelden {
  font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 17px;
  text-decoration: none; padding: 8px 16px; background: var(--blatt);
  border: 2px solid var(--tusche); border-radius: 3px 5px 4px 6px / 5px 3px 6px 4px;
  box-shadow: 3px 3px 0 var(--papier-farbe), 3px 3px 0 1.5px var(--tusche);
  min-height: 44px; display: inline-flex; align-items: center;
}
.anmelden:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--papier-farbe), 1px 1px 0 1.5px var(--tusche); }

.karte { position: relative; padding: 24px 26px; text-align: center; }
.karten-rahmen { position: absolute; inset: 0; width: 100%; height: 100%; }
.karte > *:not(canvas) { position: relative; }
.karte h1 { margin: 0; font-style: italic; font-weight: 400; font-size: 25px; line-height: 1.22; text-wrap: balance; }
.karte p { margin: 8px 0 0; font-style: italic; font-size: 16px; color: var(--tusche-leise); text-wrap: balance; }

.szenen { display: contents; }
.stueck { position: relative; margin-inline: calc(-1 * var(--rand)); }
.stueck canvas { display: block; width: 100%; height: auto; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ziel { position: absolute; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
canvas[data-stueck="tuer"] { aspect-ratio: 720 / 560; }
canvas[data-stueck="woche"] { aspect-ratio: 720 / 640; }

/* Filme */
.filme { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.film { min-width: 0; margin: 0; }
.film.offen, .film.gross { grid-column: 1 / -1; }
.film-start { display: block; width: 100%; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.plakat { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--film-grund); border: 2px solid var(--tusche); border-radius: 3px; overflow: hidden; box-shadow: 4px 4px 0 var(--papier-farbe), 4px 4px 0 1.5px var(--tusche); }
.plakat .app-bild { position: absolute; left: 50%; top: 7%; width: 66%; height: auto; transform: translateX(-50%); border-radius: 10px; border: 3px solid var(--handy); box-shadow: 0 6px 14px rgb(0 0 0 / .25); }
.plakat .sign { position: absolute; left: 0; bottom: 0; width: 36%; }
.plakat .spiel { position: absolute; left: 50%; top: 50%; width: 72px; transform: translate(-50%, -50%); }
.film-titel { display: block; margin: 10px 0 0; font-style: italic; font-weight: 400; font-size: 17px; line-height: 1.2; cursor: pointer; }
.film-titel small { display: block; font-size: 14px; color: var(--tusche-leise); margin-top: 2px; }

.film-buehne { position: relative; aspect-ratio: 4 / 5; background: var(--film-grund); border: 2px solid var(--tusche); border-radius: 3px; overflow: hidden; }
.film-buehne video { display: block; width: 100%; height: 100%; }
.film-zu { position: absolute; right: 8px; top: 8px; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--tusche); background: var(--blatt); cursor: pointer; font-size: 22px; line-height: 1; font-family: var(--serif); }

.fuss { display: grid; gap: 8px; font-size: 15px; font-style: italic; text-align: center; color: var(--tusche-leise); }
.fuss p { margin: 0; }
.fuss nav { display: flex; justify-content: center; gap: 18px; }
.fuss nav a { min-height: 44px; display: inline-flex; align-items: center; }

/* Impressum und Datenschutz: eigene Seiten, das Blatt wächst mit dem Text */
.seite[data-seite="recht"] .card { justify-self: center; max-height: none; overflow: visible; }
.card {
  position: relative; width: 100%; max-width: 26rem; max-height: min(84vh, 44rem); overflow-y: auto; box-sizing: border-box;
  padding: 26px 24px; text-align: left; font-size: 15px; line-height: 1.55;
  background: var(--blatt); border: 2px solid var(--tusche); border-radius: 3px 5px 4px 6px / 5px 3px 6px 4px;
  box-shadow: 4px 4px 0 var(--papier-farbe), 4px 4px 0 1.5px var(--tusche);
}
.card--wide { max-width: 40rem; }
.card h2 { margin: 0 44px 14px 0; font-style: italic; font-weight: 400; font-size: 25px; line-height: 1.2; }
.card h3 { margin: 20px 0 4px; font-style: italic; font-weight: 600; font-size: 17px; }
.card address { font-style: normal; }
.card p { margin: 0 0 8px; }
.card-close { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--tusche); background: var(--blatt); font-size: 22px; line-height: 1; text-decoration: none; }

/* Schluss von /schule: dieselbe Karte wie oben, darin die beiden Anfragen als Knöpfe */
.schluss .anfrage { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; margin: 16px 0 12px; }
.knopf {
  justify-content: center; text-align: center; box-sizing: border-box;
  font-style: italic; font-weight: 600; font-size: 17px; text-decoration: none; padding: 8px 16px; background: var(--film-grund);
  border: 2px solid var(--tusche); border-radius: 3px 5px 4px 6px / 5px 3px 6px 4px;
  box-shadow: 3px 3px 0 var(--blatt), 3px 3px 0 1.5px var(--tusche);
  min-height: 44px; display: inline-flex; align-items: center;
}
.knopf:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--blatt), 1px 1px 0 1.5px var(--tusche); }
.schluss .kontakt { margin-top: 12px; font-size: 14px; overflow-wrap: anywhere; }

/* Tablet: dieselbe Spalte, nur breiter */
@media (min-width: 700px) {
  .gesamt { grid-template-columns: minmax(0, 660px); }
}

/* Bildschirm: dieselbe Seite, in die Breite gelegt. Text links, Filme so groß, wie die Fensterhöhe es erlaubt. */
@media (min-width: 1000px) {
  :root { --breite: min(1560px, calc(100vw - 64px)); --seitenrand: calc((100vw - var(--breite)) / 2); }
  .gesamt { display: block; padding-block: 0 40px; }
  .seite { overflow-x: clip; padding-inline: var(--seitenrand); padding-block: 16px 26px; gap: 28px; }
  .kopf { grid-column: 1 / -1; min-height: 56px; }
  .marke { font-size: 26px; gap: 10px; }
  .marke svg { width: 36px; height: 36px; }
  .karte h1 { font-size: 34px; }
  .karte p { font-size: 19px; margin-top: 12px; }
  .karte { padding: 34px 36px; }
  .plakat .spiel { width: 96px; }
  .film-titel { font-size: 21px; margin-top: 12px; }
  .film-titel small { font-size: 15px; }
  .film.offen, .film.gross { grid-column: auto; }


  .stueck { margin-inline: 0; }

  .fuss { grid-column: 1 / -1; }

  /* Startseite: zwei Zeilen, links je ein Film, rechts die passende Szene; der Textkasten steht über der ersten Szene */
  .seite[data-seite="start"] { --film: clamp(380px, min(44vw, calc((100vh - 182px) * .8)), 720px); grid-template-columns: var(--film) minmax(0, 1fr); column-gap: 48px; row-gap: 20px; align-items: center; }
  .seite[data-seite="start"] .filme, .seite[data-seite="start"] .szenen { display: contents; }
  .seite[data-seite="start"] .karte { grid-column: 2; grid-row: 2; justify-self: center; width: min(100%, calc(var(--film) * 1.15)); box-sizing: border-box; padding: 26px 30px; }
  .seite[data-seite="start"] .karte h1 { font-size: clamp(25px, 2.05vw, 36px); }
  .seite[data-seite="start"] .karte p { font-size: clamp(15px, 1.2vw, 19px); margin-top: 8px; }
  .seite[data-seite="start"] .film[data-film="schueler"] { grid-column: 1; grid-row: 2 / span 2; }
  .seite[data-seite="start"] .stueck-woche { grid-column: 2; grid-row: 3; justify-self: center; width: min(100%, calc(var(--film) * .95)); }
  .seite[data-seite="start"] .film[data-film="lehrer"] { grid-column: 1; grid-row: 4; margin-top: 32px; }
  .seite[data-seite="start"] .stueck-tuer { grid-column: 2; grid-row: 4; justify-self: center; width: min(100%, calc(var(--film) * 1.2)); margin-top: 32px; }

  .seite[data-seite="schule"] { grid-template-columns: 1fr 1fr; align-items: end; }
  .seite[data-seite="schule"] .karte { grid-column: 1 / -1; justify-self: center; width: min(100%, 860px); box-sizing: border-box; }
  .seite[data-seite="schule"] .stueck { grid-column: 1 / -1; justify-self: center; width: min(100%, 560px); }
  /* Die Filme stehen unter dem Lehrerzimmer eng beieinander; so groß, wie die Fensterhöhe es erlaubt */
  .seite[data-seite="schule"] { column-gap: 32px; }
  .seite[data-seite="schule"] .film { width: clamp(320px, min(44vw, calc((100vh - 270px) * .8)), 620px); }
  .seite[data-seite="schule"] .film[data-film="lehrer"] { justify-self: end; }
  .seite[data-seite="schule"] .film[data-film="schueler"] { justify-self: start; }

  /* Der Schluss bleibt klein: schmaler als die Karte oben, ruhige Schrift */
  .seite[data-seite="schule"] .schluss { width: min(100%, 620px); margin-top: 10px; }
  .schluss p { font-size: 17px; }
  .schluss .kontakt { font-size: 14px; margin-top: 12px; }

  .seite[data-seite="fehlt"] .karte { justify-self: center; width: min(100%, 720px); box-sizing: border-box; margin-top: 12vh; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .anmelden:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--papier-farbe), 4px 4px 0 1.5px var(--tusche); }
  .knopf:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--blatt), 4px 4px 0 1.5px var(--tusche); }
  .film-start:hover .plakat { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--papier-farbe), 6px 6px 0 1.5px var(--tusche); }
}
@media (prefers-reduced-motion: reduce) { .anmelden:active { transform: none; } }
