/* krumbi.de – Zettel, Papiere und Fotoabzüge für die Startseite
 * Jede Papierart bringt ihre Schrift mit. Gewürfelt wird im PHP
 * (Klasse + --r für die Drehung, --x/--y für den Versatz).
 */

@font-face { font-family: "Caveat"; font-weight: 400; font-display: swap; src: url("schrift/caveat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 700; font-display: swap; src: url("schrift/caveat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Patrick Hand"; font-display: swap; src: url("schrift/patrick-hand-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Kalam"; font-display: swap; src: url("schrift/kalam-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Indie Flower"; font-display: swap; src: url("schrift/indie-flower-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Special Elite"; font-display: swap; src: url("schrift/special-elite-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 400; font-display: swap; src: url("schrift/courier-prime-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 700; font-display: swap; src: url("schrift/courier-prime-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Permanent Marker"; font-display: swap; src: url("schrift/permanent-marker-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "VT323"; font-display: swap; src: url("schrift/vt323-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Architects Daughter"; font-display: swap; src: url("schrift/architects-daughter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Gochi Hand"; font-display: swap; src: url("schrift/gochi-hand-latin-400-normal.woff2") format("woff2"); }

/* ---------- Grundform ---------- */
.zettel, .abzug {
  --r: 0deg; --x: 0px; --y: 0px;
  position: relative; display: block; text-decoration: none;
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  transition: transform .35s cubic-bezier(.2,.8,.3,1.2), box-shadow .35s;
  box-shadow: 0 1px 1px rgb(0 0 0 / .2), 0 14px 22px -10px rgb(0 0 0 / .65);
  -webkit-tap-highlight-color: transparent;
}
a.zettel:hover, a.abzug:hover, a.zettel:focus-visible, a.abzug:focus-visible, a.zettel:active, a.abzug:active {
  transform: translate(var(--x), calc(var(--y) - 4px)) rotate(0deg) scale(1.03);
  box-shadow: 0 2px 2px rgb(0 0 0 / .2), 0 26px 34px -14px rgb(0 0 0 / .7);
  z-index: 5;
}
.zettel { padding: 26px 26px 24px; color: var(--tinte, #222); min-height: 11rem; }
.zettel .z-titel { margin: 0 0 .35em; line-height: 1.1; }
.zettel .z-datum { display: block; font-size: .8em; opacity: .65; margin-bottom: .6em; }
.zettel .z-text { margin: 0; }
.zettel .z-weiter { display: inline-block; margin-top: .7em; font-size: .85em; opacity: .75; }

/* 1 · Gelber Haftzettel, Filzstift */
.z-haft-gelb {
  --tinte: #24306b;
  background: linear-gradient(160deg, #fff6a8 0%, #fbe97d 70%, #f2da5e 100%);
  font-family: "Caveat", cursive; font-size: 1.45rem; line-height: 1.25;
  max-width: 19rem; aspect-ratio: 1 / 1; overflow: hidden;
  border-bottom-right-radius: 40px 8px;
}
.z-haft-gelb .z-titel { font-weight: 700; font-size: 2.1rem; }

/* 2 · Rosa Haftzettel, Druckbuchstaben */
.z-haft-rosa {
  --tinte: #3a2a33;
  background: linear-gradient(170deg, #ffd8e2, #f9bfd0);
  font-family: "Patrick Hand", cursive; font-size: 1.25rem; line-height: 1.35;
  max-width: 19rem; aspect-ratio: 1 / 1; overflow: hidden;
}
.z-haft-rosa .z-titel { font-size: 1.7rem; text-decoration: underline wavy rgb(0 0 0 / .35) 1px; text-underline-offset: 5px; }

/* 3 · Kariertes Blatt vom Block, Kugelschreiber */
.z-kariert {
  --tinte: #1d3c8f;
  background:
    linear-gradient(90deg, transparent 2.4rem, #e7837c 2.4rem, #e7837c calc(2.4rem + 1.5px), transparent calc(2.4rem + 1.5px)),
    linear-gradient(#b8d0e6 1px, transparent 1px) 0 0 / 100% 20px,
    linear-gradient(90deg, #b8d0e6 1px, transparent 1px) 0 0 / 20px 100%,
    #fdfdfb;
  font-family: "Kalam", cursive; font-size: 1.12rem; line-height: 20px;
  padding: 30px 22px 22px 3.1rem;
  /* abgerissene Kante oben */
  -webkit-mask: radial-gradient(circle 5px at 7px 0, transparent 98%, #000) -7px 0 / 14px 100% repeat-x;
          mask: radial-gradient(circle 5px at 7px 0, transparent 98%, #000) -7px 0 / 14px 100% repeat-x;
}
.z-kariert .z-titel { font-size: 1.5rem; line-height: 40px; }
.z-kariert .z-datum { line-height: 20px; margin-bottom: 0; }

/* 4 · Linierter Heftzettel mit Rand und Lochung */
.z-liniert {
  --tinte: #233f8a; --zeile: 1.75rem;
  background:
    radial-gradient(circle at 14px 50%, #151412 6px, transparent 6.5px) 0 0 / 28px 33.3% repeat-y,
    linear-gradient(90deg, transparent 3rem, #e7837c 3rem, #e7837c calc(3rem + 1.5px), transparent calc(3rem + 1.5px)),
    repeating-linear-gradient(#fbfbf6 0, #fbfbf6 calc(var(--zeile) - 1px), #a9c8e8 calc(var(--zeile) - 1px), #a9c8e8 var(--zeile)) 0 22px,
    #fbfbf6;
  font-family: "Indie Flower", cursive; font-size: 1.2rem; line-height: var(--zeile);
  padding: calc(22px + var(--zeile) - 1.3rem) 20px var(--zeile) 3.6rem;
}
.z-liniert .z-titel { font-size: 1.6rem; line-height: var(--zeile); margin: 0 0 0; }
.z-liniert .z-datum { line-height: var(--zeile); margin: 0; font-size: .95rem; }

/* 5 · Karteikarte, Schreibmaschine */
.z-karteikarte {
  --tinte: #26231f;
  background:
    linear-gradient(#df6b63, #df6b63) 0 3.4rem / 100% 1.5px no-repeat,
    repeating-linear-gradient(transparent 0, transparent calc(1.6rem - 1px), #c3d6ea calc(1.6rem - 1px), #c3d6ea 1.6rem) 0 calc(3.4rem + 1px),
    #fffef9;
  font-family: "Special Elite", monospace; font-size: .98rem; line-height: 1.6rem;
  padding: 1.15rem 24px 1.6rem;
}
.z-karteikarte .z-titel { font-size: 1.2rem; line-height: 2.25rem; text-transform: uppercase; letter-spacing: .04em; }
.z-karteikarte .z-datum { margin: 0; line-height: 1.6rem; }

/* 6 · Vergilbtes Schreibmaschinenblatt mit Kaffeerand */
.z-blatt {
  --tinte: #2b2620;
  background:
    radial-gradient(circle at 82% 80%, transparent 31px, rgb(128 80 34 / .42) 32px, rgb(128 80 34 / .16) 34px, transparent 36px),
    radial-gradient(circle at 80% 77%, transparent 33px, rgb(128 80 34 / .14) 34px, transparent 36px),
    radial-gradient(ellipse at 30% 20%, #f7f0dd, #ece1c3);
  font-family: "Courier Prime", monospace; font-size: 1rem; line-height: 1.55;
  padding: 30px 30px 34px;
}
.z-blatt .z-titel { font-weight: 700; font-size: 1.15rem; text-decoration: underline; text-underline-offset: 4px; }

/* 7 · Packpapier-Anhänger, Marker */
.z-anhaenger {
  --tinte: #241a10;
  background: radial-gradient(circle at 50% 22px, #151412 8px, #e6d3b6 9px, #e6d3b6 12px, transparent 12.5px),
              linear-gradient(175deg, #cfa77a, #bb8e5e);
  clip-path: polygon(22% 0, 78% 0, 100% 13%, 100% 100%, 0 100%, 0 13%);
  font-family: "Gochi Hand", cursive; font-size: 1.2rem; line-height: 1.3;
  padding: 54px 24px 26px; max-width: 18rem;
}
.z-anhaenger .z-titel { font-family: "Permanent Marker", cursive; font-size: 1.45rem; font-weight: 400; }
.zettel.z-anhaenger { box-shadow: none; filter: drop-shadow(0 10px 10px rgb(0 0 0 / .5)); }

/* 8 · Endlospapier vom Nadeldrucker */
.z-endlos {
  --tinte: #2e2e2e; --band: 2.7rem;
  background:
    radial-gradient(circle at 13px 50%, #151412 4.5px, transparent 5px) 0 0 / 100% 1.25rem repeat-y,
    radial-gradient(circle at calc(100% - 13px) 50%, #151412 4.5px, transparent 5px) 0 0 / 100% 1.25rem repeat-y,
    linear-gradient(90deg, transparent 26px, rgb(0 0 0 / .12) 26px, rgb(0 0 0 / .12) 27px, transparent 27px, transparent calc(100% - 27px), rgb(0 0 0 / .12) calc(100% - 27px), rgb(0 0 0 / .12) calc(100% - 26px), transparent calc(100% - 26px)),
    repeating-linear-gradient(#d9ecd9 0, #d9ecd9 var(--band), #fbfdf9 var(--band), #fbfdf9 calc(var(--band) * 2)),
    #fbfdf9;
  font-family: "VT323", monospace; font-size: 1.35rem; line-height: 1.35rem;
  padding: 22px 42px 24px; text-shadow: 0 0 .6px rgb(0 0 0 / .5);
}
.z-endlos .z-titel { font-size: 1.7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 400; }

/* 9 · Gepunktetes Notizbuch, Bleistift */
.z-punkte {
  --tinte: #4a4a4a;
  background: radial-gradient(circle, #b9b3a6 1.1px, transparent 1.6px) 0 0 / 18px 18px, #f6f2e8;
  font-family: "Architects Daughter", cursive; font-size: 1.08rem; line-height: 1.55;
  padding: 28px 28px 26px; border-radius: 3px 10px 10px 3px;
  border-left: 10px solid #2d3d4f;
}
.z-punkte .z-titel { font-size: 1.45rem; color: #2d3d4f; }

/* ---------- Befestigungen ---------- */
.b-klebeband::before {
  content: ""; position: absolute; left: 50%; top: -12px; width: 96px; height: 26px; margin-left: -48px;
  background: rgb(240 232 200 / .55); transform: rotate(-3deg);
  box-shadow: 0 1px 2px rgb(0 0 0 / .12);
  -webkit-mask: linear-gradient(90deg, transparent, #000 3px, #000 calc(100% - 3px), transparent);
}
.b-pin::before {
  content: ""; position: absolute; left: 50%; top: 9px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8d7e, #c4352a 60%, #7a1d16);
  box-shadow: 2px 5px 5px rgb(0 0 0 / .45);
}
.b-klammer::before {
  content: ""; position: absolute; right: 26px; top: -16px; width: 14px; height: 44px; border-radius: 8px;
  border: 2.5px solid #a8adb3; border-bottom-color: #8e949a; transform: rotate(6deg);
  box-shadow: inset 0 0 0 3px transparent;
}
.b-klammer::after {
  content: ""; position: absolute; right: 30px; top: -8px; width: 6px; height: 30px; border-radius: 5px;
  border: 2.5px solid #a8adb3; border-top: 0; transform: rotate(6deg);
}
.b-ecke::after {   /* Eselsohr unten rechts: die umgeknickte Lasche */
  content: ""; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px;
  background: linear-gradient(315deg, #151412 50%, rgb(0 0 0 / .12) 50%, rgb(255 255 255 / .5) 100%);
}
/* Wo der Browser es kann, wird die Ecke wirklich ausgeschnitten: Man sieht den Himmel durch.
   Die erste Maskenschicht ist größer als der Zettel, damit sein Schatten sichtbar bleibt. */
@supports (mask-clip: no-clip) and (mask-composite: exclude) {
  .b-ecke {
    mask: linear-gradient(315deg, #000 17.5px, transparent 18.5px) bottom right / 40px 40px no-repeat,
          linear-gradient(#000, #000) -80px -80px / calc(100% + 160px) calc(100% + 160px) no-repeat;
    mask-composite: exclude; mask-clip: no-clip; mask-origin: border-box;
  }
  .b-ecke::after {
    background: linear-gradient(315deg, transparent 50%, rgb(0 0 0 / .16) 50%, rgb(255 255 255 / .55) 100%);
    filter: drop-shadow(-1px -1px 1px rgb(0 0 0 / .25));
  }
}

/* ---------- Fotoabzüge ---------- */
.abzug img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* P1 · Sofortbild */
.f-sofortbild { background: #f4f2ec; padding: 12px 12px 54px; }
.f-sofortbild .bild { aspect-ratio: 1 / 1; overflow: hidden; background: #111; }
.f-sofortbild .f-text { position: absolute; left: 12px; right: 12px; bottom: 14px; font: 1.3rem/1 "Caveat", cursive; color: #2c2c48; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* P2 · Abzug mit weißem Rand */
.f-rand { background: #fbfaf6; padding: 9px; }
.f-rand .bild { aspect-ratio: 3 / 2; overflow: hidden; }

/* P3 · Fotoecken auf einer Albumseite */
.f-ecken { background: linear-gradient(160deg, #efe7d4, #e2d7bf); padding: 18px; }
.f-ecken .bild { position: relative; aspect-ratio: 3 / 2; }
.f-ecken .bild::after {
  content: ""; position: absolute; inset: -5px; pointer-events: none;
  background:
    linear-gradient(135deg, #1b1a18 17px, rgb(255 255 255 / .35) 17.5px, transparent 18.5px) top left / 30px 30px no-repeat,
    linear-gradient(225deg, #1b1a18 17px, rgb(255 255 255 / .35) 17.5px, transparent 18.5px) top right / 30px 30px no-repeat,
    linear-gradient(45deg, #1b1a18 17px, rgb(255 255 255 / .35) 17.5px, transparent 18.5px) bottom left / 30px 30px no-repeat,
    linear-gradient(315deg, #1b1a18 17px, rgb(255 255 255 / .35) 17.5px, transparent 18.5px) bottom right / 30px 30px no-repeat;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / .35));
}

/* P4 · Dia im Rähmchen */
.f-dia {
  background: linear-gradient(145deg, #f1efe9, #d9d5cc); padding: 16% 13%; aspect-ratio: 1 / 1; border-radius: 6px;
}
.f-dia .bild { width: 100%; height: 100%; overflow: hidden; border-radius: 2px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .3); }
.f-dia .f-text { position: absolute; left: 0; right: 0; bottom: 4.5%; font: .72rem/1 "Courier Prime", monospace; color: #6d675c; text-align: center; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.f-dia .f-nr { position: absolute; top: 4.5%; left: 0; right: 0; text-align: center; font: .72rem/1 "Courier Prime", monospace; color: #6d675c; letter-spacing: .12em; }

/* P5 · Nur das Bild */
.f-pur .bild { aspect-ratio: 4 / 3; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .zettel, .abzug { transition: none; }
}

/* Anpinnen: Die ersten Stücke fallen beim Laden nacheinander an die Wand, die weiteren,
   sobald sie ins Bild rollen. Nutzt translate/rotate/scale einzeln – die Lage (transform)
   der Zettel bleibt davon unberührt. */
@keyframes anpinnen { from { opacity: 0; translate: 0 -30px; scale: 1.07; rotate: -4deg; } }
@keyframes anpinnen-schmal { from { opacity: 0; translate: 0 26px; } }
@keyframes ablegen { from { opacity: 0; translate: 30px -70px; scale: 1.1; rotate: 5deg; } 60% { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .pinnwand > :nth-child(-n+8) { animation: anpinnen .6s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--n) * 55ms + 80ms); }
  .pinnwand > :nth-child(1) { --n: 0; } .pinnwand > :nth-child(2) { --n: 1; } .pinnwand > :nth-child(3) { --n: 2; }
  .pinnwand > :nth-child(4) { --n: 3; } .pinnwand > :nth-child(5) { --n: 4; } .pinnwand > :nth-child(6) { --n: 5; }
  .pinnwand > :nth-child(7) { --n: 6; } .pinnwand > :nth-child(8) { --n: 7; }
  @supports (animation-timeline: view()) {
    .pinnwand > :nth-child(n+9) { animation: anpinnen linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
  /* Schmal: ohne Drehen und Vergrößern, sonst ragen die Stücke kurz über den Bildschirmrand */
  @media (max-width: 700px) {
    .pinnwand > *, .zettel-buehne > .stapel > .seite.folge.liegt, .zettel-buehne > .textfoto { animation-name: anpinnen-schmal !important; }
  }
  /* Textseite: Das erste Blatt wächst aus dem Zettel der Startseite (Seitenübergang),
     Folgeblätter und das Foto werden dazugepinnt. */
  .zettel-buehne > .textfoto { animation: anpinnen .7s cubic-bezier(.2, .9, .3, 1.15) 1s both; }
  /* Weitere Blätter werden nacheinander auf den Tisch gelegt: seiten.js gibt jedem Blatt die
     Klasse „liegt“, sobald es ins Bild kommt – mehrere kurz hintereinander, nie gleichzeitig. */
  .zettel-buehne > .stapel > .seite.folge { opacity: 0; }
  .zettel-buehne > .stapel > .seite.folge.liegt { opacity: 1; animation: ablegen .9s cubic-bezier(.2, .85, .3, 1.08) both; }
  .zettel-buehne > .stapel > .seite.folge.liegt.sofort { animation: none; }
}

/* ---------- Pinnwand der Startseite ---------- */
.pinnwand {
  display: grid; gap: 54px 38px; align-items: start; justify-items: center; grid-auto-flow: dense;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  padding: 20px 0 10px;
}
.pinnwand > * { width: 100%; max-width: 21rem; }
.pinnwand .zettel { margin: 0; }
.pinnwand .zettel .z-titel { font-weight: inherit; }
.pinnwand .z-haft-gelb .z-titel, .pinnwand .z-blatt .z-titel { font-weight: 700; }
.wand-foto { margin: 0; }
.wand-foto figcaption {
  margin-top: 14px; font-size: .85rem; color: var(--leise); text-align: center;
  transform: rotate(calc(var(--r, 0deg) / 3));
}
.wand-foto figcaption strong { color: var(--text); font: 400 1.05rem var(--serif); }
.abzug .abspielen { z-index: 2; }
.f-dia .abspielen { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.f-dia .abspielen::after { left: 15px; top: 11px; border-left-width: 13px; border-top-width: 9px; border-bottom-width: 9px; }

/* Der neueste Beitrag: fest an erster Stelle, etwas größer */
@media (min-width: 760px) {
  .pinnwand > .fest { grid-column: span 2; max-width: 34rem; }
  .pinnwand > .zettel.fest { font-size: 1.12em; }
  .pinnwand > .z-haft-gelb.fest, .pinnwand > .z-haft-rosa.fest { aspect-ratio: auto; min-height: 19rem; max-width: 26rem; }
  .pinnwand > .z-anhaenger.fest { max-width: 24rem; }
}

/* Handy: eine Spalte, Zettel wechselnd nach links und rechts gerückt */
@media (max-width: 620px) {
  .pinnwand { gap: 40px; }
  .pinnwand > * { max-width: 86%; }
  .pinnwand > :nth-child(odd) { justify-self: start; }
  .pinnwand > :nth-child(even) { justify-self: end; }
  .pinnwand > .fest { max-width: 100%; justify-self: center; }
}

/* ---------- „Aus dem Archiv“: Stempel auf älteren Beiträgen, die heute nach vorn geholt wurden ---------- */
.archivmarke {
  position: absolute; z-index: 4; top: 10px; right: 10px; transform: rotate(7deg); pointer-events: none;
  font: 700 .62rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  color: #a5372d; border: 1.5px solid currentColor; border-radius: 3px; padding: 4px 6px 3px;
  background: rgb(255 255 255 / .55); opacity: .9;
}
.wand-foto { position: relative; }
.wand-foto > .archivmarke { top: -8px; right: 4px; background: #f4efe2; box-shadow: 0 2px 4px rgb(0 0 0 / .4); }
.z-anhaenger > .archivmarke { top: 62px; }

/* ============================================================
   Große Zettel: die Textseite auf demselben Papier wie die Vorschau
   ============================================================ */
.lesen-zettel { padding: 0 var(--rand); max-width: 66rem; margin: 0 auto; }
.zettel-buehne { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; padding-top: 30px; }

.zettel.gross {
  width: 100%; max-width: 44rem; min-height: 28rem; aspect-ratio: auto; overflow: visible;
  transform: rotate(var(--r));
  padding: clamp(30px, 6vw, 58px) clamp(22px, 6vw, 62px) clamp(40px, 7vw, 70px);
  hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty;
  box-shadow: 0 1px 1px rgb(0 0 0 / .25), 0 30px 50px -24px rgb(0 0 0 / .8);
}
.zettel.gross .z-kopf { margin-bottom: 1.2em; }
.zettel.gross .z-titel { margin: 0 0 .2em; text-wrap: balance; }
.zettel.gross .z-untertitel { margin: 0 0 .2em; opacity: .8; }
.zettel.gross .z-datum { margin: 0; }
.zettel.gross .z-inhalt p { margin: 0 0 1em; }
.zettel.gross .z-inhalt > :last-child { margin-bottom: 0; }
.zettel.gross .z-inhalt h2 { font-size: 1.2em; margin: 1.4em 0 .5em; line-height: 1.2; }
.zettel.gross .z-inhalt blockquote { margin: 1em 0; padding-left: 1em; border-left: 3px solid currentColor; opacity: .85; }
.zettel.gross .z-inhalt blockquote p { margin: 0; }
.zettel.gross .z-inhalt .trenner { text-align: center; opacity: .6; letter-spacing: .3em; }
/* Auf Papier wird unterstrichen statt kursiv gesetzt */
.zettel.gross em { font-style: normal; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* 1 · Gelber Haftzettel – groß wie vom Block */
.z-haft-gelb.gross { --z: 36px; --tz: 2; font-size: 1.75rem; line-height: var(--z); border-bottom-right-radius: 90px 14px; }
.z-haft-gelb.gross .z-titel { font-size: 3rem; font-weight: 700; }

/* 2 · Rosa Haftzettel */
.z-haft-rosa.gross { --z: 32px; --tz: 2; font-size: 1.4rem; line-height: var(--z); }
.z-haft-rosa.gross .z-titel { font-size: 2.3rem; }

/* 3 · Kariert: größere Kästchen, eine Schreibzeile je Kästchen */
.z-kariert.gross {
  --k: 28px; --z: var(--k); --tz: 2;
  background:
    linear-gradient(90deg, transparent 3.4rem, #e7837c 3.4rem, #e7837c calc(3.4rem + 1.5px), transparent calc(3.4rem + 1.5px)),
    linear-gradient(#b8d0e6 1px, transparent 1px) 0 0 / 100% var(--k),
    linear-gradient(90deg, #b8d0e6 1px, transparent 1px) 0 0 / var(--k) 100%,
    #fdfdfb;
  font-size: 1.3rem; line-height: var(--k);
  padding: calc(var(--k) * 2 + 9px) clamp(18px, 5vw, 48px) calc(var(--k) * 2) clamp(3.9rem, 9vw, 5rem);
}
.z-kariert.gross .z-kopf { margin-bottom: var(--k); }
.z-kariert.gross .z-titel { font-size: 2.1rem; line-height: calc(var(--k) * 2); margin: 0; position: relative; top: 13px; }
.z-kariert.gross .z-untertitel, .z-kariert.gross .z-datum { line-height: var(--k); margin: 0; }
.z-kariert.gross .z-inhalt p, .z-kariert.gross .z-inhalt blockquote { margin: 0 0 var(--k); }
.z-kariert.gross .z-inhalt h2 { font-size: 1.5rem; line-height: var(--k); margin: 0 0 var(--k); }

/* 4 · Liniert: Schrift sitzt auf den Linien */
.z-liniert.gross {
  --zeile: 34px; --z: var(--zeile); --tz: 1; font-size: 1.4rem; line-height: var(--zeile);
  background:
    radial-gradient(circle at 16px 50%, #151412 7px, transparent 7.5px) 0 0 / 32px 50% repeat-y,
    linear-gradient(90deg, transparent 3.6rem, #e7837c 3.6rem, #e7837c calc(3.6rem + 1.5px), transparent calc(3.6rem + 1.5px)),
    repeating-linear-gradient(#fbfbf6 0, #fbfbf6 calc(var(--zeile) - 1px), #a9c8e8 calc(var(--zeile) - 1px), #a9c8e8 var(--zeile)) 0 calc(var(--zeile) * 1.5),
    #fbfbf6;
  padding: calc(var(--zeile) * 1.5 + .62rem) clamp(18px, 5vw, 48px) calc(var(--zeile) * 2) clamp(4.2rem, 10vw, 5.2rem);
}
.z-liniert.gross .z-kopf { margin-bottom: var(--zeile); }
.z-liniert.gross .z-titel { font-size: 2rem; line-height: var(--zeile); margin: 0; }
.z-liniert.gross .z-untertitel, .z-liniert.gross .z-datum { line-height: var(--zeile); margin: 0; font-size: 1.1rem; }
.z-liniert.gross .z-inhalt p, .z-liniert.gross .z-inhalt blockquote { margin: 0 0 var(--zeile); }
.z-liniert.gross .z-inhalt h2 { font-size: 1.6rem; line-height: var(--zeile); margin: 0 0 var(--zeile); }

/* 5 · Karteikarte, groß (DIN A5) */
.z-karteikarte.gross {
  --kz: 28px; --z: var(--kz); font-size: 1.06rem; line-height: var(--kz);
  background:
    linear-gradient(#df6b63, #df6b63) 0 4.6rem / 100% 1.5px no-repeat,
    repeating-linear-gradient(transparent 0, transparent calc(var(--kz) - 1px), #c3d6ea calc(var(--kz) - 1px), #c3d6ea var(--kz)) 0 calc(4.6rem + 1px),
    #fffef9;
  padding: 1.5rem clamp(20px, 5vw, 52px) calc(var(--kz) * 2);
}
.z-karteikarte.gross .z-kopf { min-height: 3.1rem; margin-bottom: .6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1.2em; }
.z-karteikarte.gross .z-titel { font-size: 1.5rem; line-height: 2.9rem; margin: 0; }
.z-karteikarte.gross .z-untertitel { margin: 0; line-height: var(--kz); }
.z-karteikarte.gross .z-inhalt p, .z-karteikarte.gross .z-inhalt blockquote { margin: 0 0 var(--kz); }
.z-karteikarte.gross .z-inhalt h2 { font-size: 1.06rem; line-height: var(--kz); margin: 0 0 var(--kz); text-transform: uppercase; letter-spacing: .06em; }

/* 6 · Schreibmaschinenblatt */
.z-blatt.gross { --z: 30px; --tz: 1; font-size: 1.08rem; line-height: var(--z); }
.z-blatt.gross .z-titel { font-size: 1.35rem; }
.z-blatt.gross .z-inhalt p { text-indent: 0; }

/* 7 · Packpapier-Anhänger, groß */
.z-anhaenger.gross {
  font-size: 1.4rem; line-height: 1.45; max-width: 40rem;
  clip-path: polygon(70px 0, calc(100% - 70px) 0, 100% 60px, 100% 100%, 0 100%, 0 60px);
  background: radial-gradient(circle at 50% 38px, #151412 12px, #e6d3b6 13px, #e6d3b6 18px, transparent 18.5px),
              linear-gradient(175deg, #cfa77a, #bb8e5e);
  padding-top: 96px;
}
.z-anhaenger.gross .z-titel { font-size: 2.2rem; }

/* 8 · Endlospapier: läuft einfach weiter */
.z-endlos.gross {
  --band: 3.2rem; font-size: 1.55rem; line-height: 1.6rem;
  padding: 3.2rem clamp(40px, 8vw, 70px) 3.2rem;
}
.z-endlos.gross .z-kopf { margin-bottom: 1.6rem; }
.z-endlos.gross .z-titel { font-size: 2.1rem; line-height: 3.2rem; margin: 0; }
.z-endlos.gross .z-untertitel, .z-endlos.gross .z-datum { line-height: 1.6rem; margin: 0; }
.z-endlos.gross .z-inhalt p, .z-endlos.gross .z-inhalt blockquote { margin: 0 0 1.6rem; }
.z-endlos.gross .z-inhalt h2 { font-size: 1.55rem; line-height: 1.6rem; margin: 0 0 1.6rem; text-transform: uppercase; }

/* 9 · Notizbuch mit Punktraster */
.z-punkte.gross { --z: 34px; --tz: 2; font-size: 1.22rem; line-height: var(--z); border-left-width: 16px; border-radius: 4px 14px 14px 4px; }
.z-punkte.gross .z-titel { font-size: 2rem; }

/* ---------- Zeilenraster und Blätter ----------
   Papiere mit festem Format (data-seiten) halten ein strenges Zeilenraster: Jede Höhe ist ein
   Vielfaches von --z. So kann assets/seiten.js den Text Zeile für Zeile auf weitere Blätter
   verteilen, ohne eine Zeile zu zerschneiden. Beim Ändern von Abständen: immer Vielfache von --z. */
.zettel.gross[data-seiten] .z-kopf { margin-bottom: var(--z); }
.zettel.gross[data-seiten] .z-titel { margin: 0; line-height: calc(var(--z) * var(--tz, 1)); }
.zettel.gross[data-seiten] .z-untertitel, .zettel.gross[data-seiten] .z-datum { display: block; margin: 0; line-height: var(--z); }
.zettel.gross[data-seiten] .z-inhalt p, .zettel.gross[data-seiten] .z-inhalt blockquote { margin: 0 0 var(--z); }
.zettel.gross[data-seiten] .z-inhalt blockquote p { margin: 0; }
.zettel.gross[data-seiten] .z-inhalt h2 { font-size: 1.15em; line-height: var(--z); margin: 0 0 var(--z); }
.zettel.gross[data-seiten] .z-inhalt > :last-child { margin-bottom: 0; }
.zettel.gross[data-seiten] .z-inhalt .trenner { height: var(--z); overflow: hidden; }
/* Karteikarte: nur der Titel steht über der roten Linie (feste Höhe), Untertitel und Datum
   sind die ersten Schreibzeilen */
.z-karteikarte.gross[data-seiten] > .z-kopf { height: 3.1rem; min-height: 0; margin-bottom: .6rem; flex-wrap: nowrap; gap: 0 1em; }
.z-karteikarte.gross[data-seiten] > .z-kopf .z-titel { flex: 1 1 auto; min-width: 0; line-height: 3.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.z-karteikarte.gross .z-kopf .z-karte-nr { flex: none; line-height: 3.1rem; font-size: .8em; opacity: .6; }
.z-karteikarte.gross .z-beigabe { margin-bottom: var(--kz); opacity: .8; }
.z-karteikarte.gross .z-beigabe .z-datum { font-size: inherit; opacity: .8; }

/* Die Blätter im Stapel bekommen ihre Höhe vom Skript, nicht vom Seitenverhältnis */
.zettel.gross.seite { aspect-ratio: auto !important; }
/* Der Stapel loser Blätter (von seiten.js gebaut) */
.stapel { width: 100%; max-width: 44rem; display: flex; flex-direction: column; gap: 30px; }
.zettel.gross.seite { min-height: 0; max-width: none; transform: translate(var(--x, 0px)) rotate(var(--r)); }
.seite .fenster { overflow: hidden; }
.seite .seitenzahl { position: absolute; right: clamp(22px, 6vw, 60px); bottom: .7rem; line-height: 1; opacity: .55; font-size: .85em; }
.z-karteikarte.seite .seitenzahl { display: none; }
/* Das Original bleibt für Vorleseprogramme und Suchmaschinen erhalten, nur unsichtbar */
.zettel.gross.nur-vorlesen { position: absolute !important; width: 1px; height: 1px; min-height: 0 !important; padding: 0 !important; margin: 0 !important; overflow: hidden; clip-path: inset(50%); box-shadow: none; }
.nur-vorlesen::before, .nur-vorlesen::after { display: none; }

/* Bild zum Text: als Abzug versetzt über dem Zettel … */
.textfoto { z-index: 3; justify-self: end; width: min(68%, 19rem); margin: 0 2% -2.6rem 0; }
.textfoto .bild { aspect-ratio: auto !important; }
.textfoto img { height: auto; }
.textfoto.f-ecken { padding: 14px; }
.mit-foto .zettel.gross { padding-top: calc(clamp(30px, 6vw, 58px) + 2.4rem); }
.mit-foto .z-kariert.gross { padding-top: calc(var(--k) * 4 + 9px); }
.mit-foto .z-liniert.gross { padding-top: calc(var(--zeile) * 3.5 + .62rem); }
.mit-foto .z-endlos.gross { padding-top: 6.4rem; }
.mit-foto .z-karteikarte.gross { margin-top: 2.2rem; padding-top: 1.5rem; }
.mit-foto .textfoto + .z-karteikarte.gross { margin-top: 0; }
.mit-foto .z-anhaenger.gross { padding-top: 120px; }
/* Folgeblätter haben oben wieder den normalen Rand (kein Platz fürs Foto nötig) */
.mit-foto .zettel.gross.folge { padding-top: clamp(30px, 6vw, 58px); }
.mit-foto .z-kariert.gross.folge { padding-top: calc(var(--k) * 2 + 9px); }
.mit-foto .z-liniert.gross.folge { padding-top: calc(var(--zeile) * 1.5 + .62rem); }
.mit-foto .z-karteikarte.gross.folge { margin-top: 0; padding-top: 1.5rem; }

/* … und auf breiten Bildschirmen daneben, leicht überlappend */
@media (min-width: 1100px) {
  .zettel-buehne.mit-foto { grid-template-columns: minmax(0, 44rem) 17rem; justify-content: center; align-items: start; }
  .mit-foto .zettel.gross { grid-column: 1; grid-row: 1; padding-top: clamp(30px, 6vw, 58px); }
  .mit-foto .stapel { grid-column: 1; grid-row: 1; }
  .mit-foto .z-kariert.gross { padding-top: calc(var(--k) * 2 + 9px); }
  .mit-foto .z-liniert.gross { padding-top: calc(var(--zeile) * 1.5 + .62rem); }
  .mit-foto .z-endlos.gross { padding-top: 3.2rem; }
  .mit-foto .z-anhaenger.gross { padding-top: 96px; }
  .mit-foto .z-karteikarte.gross { margin-top: 0; padding-top: 1.5rem; }
  .textfoto { grid-column: 2; grid-row: 1; justify-self: start; width: 19.5rem; margin: 3.2rem 0 0 -2.6rem; }
}

.lesehilfe { text-align: center; margin: 34px 0 0; font-size: .85rem; }
.lesehilfe a { color: var(--leise); }
.lesehilfe a:hover { color: var(--akzent); }

@media (max-width: 620px) {
  .zettel.gross, .zettel.gross.seite { transform: none; min-height: 20rem; }
  .zettel.gross.seite { min-height: 0; }
  .stapel { gap: 18px; }
  .z-haft-gelb.gross { font-size: 1.55rem; } .z-haft-gelb.gross .z-titel { font-size: 2.4rem; }
  .z-kariert.gross { --k: 26px; font-size: 1.2rem; padding-left: 3.1rem;
    background:
      linear-gradient(90deg, transparent 2.5rem, #e7837c 2.5rem, #e7837c calc(2.5rem + 1.5px), transparent calc(2.5rem + 1.5px)),
      linear-gradient(#b8d0e6 1px, transparent 1px) 0 0 / 100% var(--k),
      linear-gradient(90deg, #b8d0e6 1px, transparent 1px) 0 0 / var(--k) 100%, #fdfdfb; }
  .z-liniert.gross { --zeile: 32px; font-size: 1.28rem; padding-left: 3.3rem;
    background:
      radial-gradient(circle at 12px 50%, #151412 5.5px, transparent 6px) 0 0 / 24px 50% repeat-y,
      linear-gradient(90deg, transparent 2.6rem, #e7837c 2.6rem, #e7837c calc(2.6rem + 1.5px), transparent calc(2.6rem + 1.5px)),
      repeating-linear-gradient(#fbfbf6 0, #fbfbf6 calc(var(--zeile) - 1px), #a9c8e8 calc(var(--zeile) - 1px), #a9c8e8 var(--zeile)) 0 calc(var(--zeile) * 1.5),
      #fbfbf6; }
  .z-endlos.gross { font-size: 1.4rem; padding-left: 38px; padding-right: 38px; }
  .z-anhaenger.gross { clip-path: polygon(46px 0, calc(100% - 46px) 0, 100% 44px, 100% 100%, 0 100%, 0 44px); font-size: 1.28rem; }
  .z-punkte.gross { border-left-width: 10px; }
}

/* Beim Drucken liegen alle Blätter da, auch die noch nicht abgelegten */
@media print { .zettel-buehne > .stapel > .seite.folge { opacity: 1 !important; animation: none !important; } }
