@charset "utf-8";

/* ==========================================================================
   Der Kult der Ewigen Erdnuss — Stilblatt für die Kurzfassung

   Dieses Blatt gilt nur für kurzfassung.html: ein einziges A4-Blatt zum
   Vorlesen. Anders als der Spickzettel, den man in der Tasche mit sich
   herumträgt, wird dieses Blatt laut gelesen — meistens im Halbdunkel,
   am Feuer oder in einer Taverne. Deshalb ist der Satz einspaltig, die
   Schrift groß (13,5 pt) und die Zeile bewusst kurz gehalten: Ein Auge,
   das die Zeile sucht, verliert den Satz.

   css/style.css wird nicht eingebunden; was gebraucht wird, steht hier
   noch einmal in Punkt und Millimeter.

   Aufbau:
     1. Schriften
     2. Farben und Grundwerte
     3. Seitenlayout und Bogen
     4. Grundtypografie
     5. Kopf des Blattes
     6. Der Vorlesetext
     7. Regiekasten, OT-Hinweis und Fuß
     8. Werkzeugleiste (nur Bildschirm)
   ========================================================================== */

/* ==========================================================================
   1. Schriften — selbst ausgeliefert (OFL, siehe assets/fonts/LIZENZ.txt)
   ========================================================================== */
@font-face { font-family: "IM Fell English"; font-style: normal; font-weight: 400; font-display: block; src: url("../assets/fonts/im-fell-english.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English"; font-style: italic; font-weight: 400; font-display: block; src: url("../assets/fonts/im-fell-english-italic.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English SC"; font-style: normal; font-weight: 400; font-display: block; src: url("../assets/fonts/im-fell-english-sc.woff2") format("woff2"); }
@font-face { font-family: "Pirata One"; font-style: normal; font-weight: 400; font-display: block; src: url("../assets/fonts/pirata-one.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: "Pirata One"; font-style: normal; font-weight: 400; font-display: block; src: url("../assets/fonts/pirata-one-latin-ext.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; }

/* ==========================================================================
   2. Farben und Grundwerte — dieselbe Palette wie die Seite, hell
   ========================================================================== */
:root {
  --papier:        #fbf6ea;
  --tinte:         #2a1f14;
  --tinte-blass:   #5c4a36;

  --roest:         #a5652c;
  --roest-dunkel:  #6b3f18;
  --roest-hell:    #c98a4b;

  --salz:          #fbfaf4;
  --rost:          #8c3b24;

  --flaeche:       #f8f1df;
  --linie:         rgba(107, 63, 24, .32);
  --scheibe:       #f3e6c8;

  --font-titel:   "Pirata One", "IM Fell English SC", serif;
  --font-kapitel: "IM Fell English SC", "Pirata One", Georgia, serif;
  --font-text:    "IM Fell English", Georgia, "Times New Roman", serif;
}

/* ==========================================================================
   3. Seitenlayout und Bogen
   ------------------------------------------------------------------------
   Ein Bogen = eine A4-Seite, und es soll genau eine bleiben. Der Bogen
   bekommt deshalb keine feste Höhe: Wächst der Text, wächst der Bogen auf
   eine zweite Seite, und das fällt beim Prüfen sofort auf.
   ========================================================================== */
@page {
  size: A4;
  margin: 12mm;
}

*, *::before, *::after { box-sizing: border-box; }

.bogen {
  background: var(--papier);
  color: var(--tinte);
}

.blatt {
  display: flex;
  flex-direction: column;
  min-height: 270mm;
}

@media screen {
  body {
    margin: 0;
    padding: 0 0 4rem;
    background: #4a3a28;
    background-image:
      radial-gradient(ellipse at 50% 0%, rgba(255, 248, 230, .18), rgba(255, 248, 230, 0) 60%);
  }

  .bogen {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 12mm;
    box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .95);
  }

  /* Auf schmalen Geräten bleibt der Bogen A4 und wandert seitwärts:
     zusammengequetscht wäre er unleserlich, und gedruckt wird er ohnehin. */
  @media (max-width: 232mm) {
    body { overflow-x: auto; }
    .bogen { margin: 0 1rem; }
  }
}

@media print {
  html, body { margin: 0; background: var(--papier); }

  .bogen {
    width: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
  }
}

/* ==========================================================================
   4. Grundtypografie
   ========================================================================== */
body {
  font-family: var(--font-text);
  font-size: 13.5pt;
  line-height: 1.5;
  color: var(--tinte);
  text-rendering: optimizeLegibility;
}

p { margin: 0 0 3mm; orphans: 2; widows: 2; }
em { font-style: italic; }
strong { font-weight: 700; color: var(--roest-dunkel); }
img { max-width: 100%; height: auto; }

/* ==========================================================================
   5. Kopf des Blattes
   ========================================================================== */
/* Die Vignette steht neben dem Titel, nicht darüber: Ein Blatt, das
   vorgelesen wird, darf oben keine Handbreit Zierde verschenken — der
   Platz gehört dem Text. */
.blatt-kopf {
  display: flex;
  align-items: center;
  gap: 6mm;
  padding-bottom: 2.5mm;
  margin-bottom: 4mm;
  border-bottom: 1pt double var(--roest-dunkel);
}

/* Die Druckfassung der Vignette ist gegen --scheibe flachgelegt, deshalb
   liegt hier eine Pergamentscheibe darunter. */
.kopf-vignette {
  flex: none;
  width: 20mm;
  height: 20mm;
  background: var(--scheibe);
  border-radius: 50%;
}

.kopf-text {
  flex: 1 1 auto;
  text-align: center;
}

.blatt-kopf .ober {
  margin: 0 0 1mm;
  font-family: var(--font-kapitel);
  font-size: 9.5pt;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tinte-blass);
}

.blatt-kopf h1 {
  margin: 0;
  font-family: var(--font-titel);
  font-weight: 400;
  font-size: 25pt;
  line-height: 1.05;
  color: var(--roest-dunkel);
}

.kopf-unter {
  margin: 1mm 0 0;
  font-family: var(--font-kapitel);
  font-size: 11pt;
  letter-spacing: .05em;
  color: var(--roest);
}

/* ==========================================================================
   6. Der Vorlesetext
   ------------------------------------------------------------------------
   Kurze Zeile, große Schrift, viel Durchschuss. Getrennt wird nicht:
   Ein Trennstrich am Zeilenende bringt beim lauten Lesen jeden aus dem Takt.
   ========================================================================== */
.vorlesetext {
  flex: 1 1 auto;
  max-width: 156mm;
  margin: 0 auto;
  hyphens: none;
}

.vorlesetext p { margin-bottom: 3mm; }
.vorlesetext p:last-child { margin-bottom: 0; }

/* Die Fünf Kerne, je drei Wörter. Zwei Spalten, damit die Liste nicht
   ein Drittel des Blattes frisst — gelesen wird sie trotzdem der Reihe
   nach, erst die linke Spalte, dann die rechte. */
.kerne-drei {
  columns: 2;
  column-gap: 8mm;
  list-style: decimal;
  padding-left: 7mm;
  margin: 0 0 3mm;
  font-family: var(--font-kapitel);
  font-size: 13.5pt;
  line-height: 1.45;
  color: var(--roest-dunkel);
}
.kerne-drei li {
  break-inside: avoid;
  margin-bottom: .6mm;
}
.kerne-drei li::marker { color: var(--roest); }

.schluss-knack {
  margin: 3mm 0 0;
  text-align: center;
  font-family: var(--font-titel);
  font-size: 23pt;
  line-height: 1;
  color: var(--roest-dunkel);
}

/* Das Fleuron ist ein Kupferstich auf fast weißem Grund. Die Maske lässt
   ihn zum Papier hin auslaufen, „multiply“ rechnet den Rest gegen das
   Papier — sonst steht auf dem Bogen ein heller Kasten. */
.kurz-fleuron {
  display: block;
  width: 52mm;
  height: auto;
  margin: 1.5mm auto 1.5mm;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent);
  mask-image: radial-gradient(closest-side, #000 62%, transparent);
  mix-blend-mode: multiply;
}

/* ==========================================================================
   7. Regiekasten, OT-Hinweis und Fuß
   ========================================================================== */
.regie-kasten {
  background: var(--flaeche);
  border: .8pt solid var(--linie);
  border-left: 2pt solid var(--roest-hell);
  border-radius: 1mm;
  padding: 2.2mm 3.5mm 2.2mm 4mm;
  margin: 0 0 3.5mm;
  break-inside: avoid;
}
.regie-kasten h2 {
  margin: 0 0 1.2mm;
  font-family: var(--font-kapitel);
  font-weight: 400;
  font-size: 12pt;
  letter-spacing: .05em;
  color: var(--roest-dunkel);
}
.regie-liste {
  margin: 0;
  padding-left: 6mm;
  font-size: 10pt;
  line-height: 1.32;
}
.regie-liste li { margin-bottom: 1mm; }
.regie-liste li:last-child { margin-bottom: 0; }
.regie-liste li::marker { font-family: var(--font-kapitel); color: var(--roest); }

.ot-kasten {
  background: rgba(140, 59, 36, .08);
  border: 1pt solid var(--rost);
  border-radius: 1mm;
  padding: 2.2mm 3mm;
  margin: 0 0 3.5mm;
  break-inside: avoid;
}
.ot-marke {
  margin: 0 0 1mm;
  font-family: var(--font-kapitel);
  font-size: 9pt;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rost);
}
.ot-kasten p:last-child { margin: 0; font-size: 10pt; line-height: 1.35; }
.ot-kasten strong { color: var(--rost); }

.blatt-fuss {
  margin-top: auto;
  padding-top: 1.6mm;
  border-top: .5pt solid var(--linie);
  text-align: center;
}
.blatt-fuss p {
  margin: 0;
  font-family: var(--font-kapitel);
  font-size: 11pt;
  color: var(--roest-dunkel);
}
.blatt-fuss strong { font-weight: 400; color: var(--roest); }
.fuss-zeile {
  margin-top: 1mm !important;
  font-family: var(--font-text) !important;
  font-size: 8pt !important;
  color: var(--tinte-blass) !important;
}

/* ==========================================================================
   8. Werkzeugleiste — nur am Bildschirm, im Druck weg
   ========================================================================== */
@media print {
  .werkzeugleiste { display: none !important; }
}

@media screen {
  .werkzeugleiste {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .9rem 1.4rem;
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 0 0 2rem;
    padding: .9rem 1.2rem;
    background: #2a1f14;
    color: #f3e6c8;
    box-shadow: 0 6px 20px -10px rgba(0, 0, 0, .9);
  }
  .werkzeugleiste a,
  .werkzeugleiste p,
  .werkzeugleiste button {
    font-family: var(--font-kapitel);
    margin: 0;
  }
  .wz-zurueck { color: #e6d3ac; text-decoration: none; font-size: 1.05rem; }
  .wz-zurueck:hover, .wz-zurueck:focus-visible { color: #fff; text-decoration: underline; }
  .wz-status { flex: 1 1 12rem; color: #f3e6c8; font-size: 1.05rem; letter-spacing: .04em; }
  .wz-knopf {
    min-height: 44px;
    padding: .5em 1.3em;
    font-size: 1.05rem;
    letter-spacing: .06em;
    color: #fbfaf4;
    background: linear-gradient(180deg, #a5652c, #6b3f18);
    border: 2px solid #c98a4b;
    border-radius: 4px;
    cursor: pointer;
  }
  .wz-knopf:hover, .wz-knopf:focus-visible { background: #a5652c; }
  .wz-hinweis { flex: 1 1 100%; font-size: .9rem; color: #c9b894; }

  :focus-visible { outline: 3px solid #c98a4b; outline-offset: 3px; }
}
