/* Lern mit Big Mallow, Mockup v5b: Karoblock auf dem Schreibtisch */
@font-face {
  font-family: "Chewy";
  src: url("schriften/Chewy-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --papier: #fffef6;
  --karo: rgba(90, 150, 215, .30);
  --rand: #d64545;
  --tinte: #26262e;
  --stift: #4a4a52;
  --orange: #f4a640;
  --blau: #62b0ea;
  --gruen: #84c986;
  --rosa: #ee93b0;
  --gelb: #ffe66b;
  --tape: rgba(255, 214, 90, .72);
  --schrift: ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  --chewy: "Chewy", ui-rounded, "Segoe UI", system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  position: relative;
  overflow-x: clip;
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.6;
  background-color: var(--papier);
  background-image:
    linear-gradient(var(--karo) 1px, transparent 1px),
    linear-gradient(90deg, var(--karo) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* roter Heftrand */
body::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 30px;
  width: 2px;
  background: var(--rand);
  opacity: .75;
  z-index: 0;
  pointer-events: none;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #0f4fa8; }

:focus-visible {
  outline: 3px solid #1b3fd8;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Register-Reiter ---------- */
.reiter {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--papier);
  border-bottom: 3px solid var(--stift);
  padding: 6px 4px 0;
}
.reiter ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 4px;
}
.reiter li { flex: 1 1 0; min-width: 0; }
.reiter a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 4px 3px;
  font-size: .8125rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--tinte);
  text-decoration: none;
  border: 2px solid var(--stift);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
.reiter li:nth-child(1) a { background: var(--orange); }
.reiter li:nth-child(2) a { background: var(--blau); }
.reiter li:nth-child(3) a { background: var(--gruen); }
.reiter li:nth-child(4) a { background: var(--rosa); }
.reiter a[aria-current="page"] { min-height: 58px; margin-top: -6px; }

/* ---------- Seite ---------- */
.seite {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px 40px 46px;
}

h1, h2, h3 { font-family: var(--chewy); font-weight: 400; line-height: 1.15; margin: 0 0 .4em; letter-spacing: .01em; }
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.unter { position: relative; display: inline-block; padding-bottom: 12px; }
.stift {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 14px;
  overflow: visible;
}
.stift path {
  fill: none;
  stroke: var(--stift);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.stift path + path { stroke-width: 1.6; opacity: .7; }

/* Klebeband */
.tape { position: relative; }
.tape::before {
  content: "";
  position: absolute;
  top: -14px; left: 50%;
  width: 96px; height: 28px;
  margin-left: -48px;
  background: var(--tape);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  transform: rotate(-3deg);
  z-index: 3;
  /* ausgefranste Enden */
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 92% 0, 96% 10%, 100% 0, 100% 100%, 96% 90%, 92% 100%, 88% 90%, 12% 100%, 8% 90%, 4% 100%, 0 92%);
}
.tape.links::before { left: 14%; margin-left: 0; transform: rotate(-12deg); }
.tape.rechts::before { left: auto; right: 10%; margin-left: 0; transform: rotate(9deg); background: rgba(150, 215, 245, .75); }

/* Foto */
.foto {
  background: #fff;
  padding: 10px 10px 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,.22);
}
.foto img { width: 100%; }

/* Knoepfe */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  min-width: 48px;
  padding: 10px 26px;
  font-family: var(--chewy);
  font-size: 1.5rem;
  letter-spacing: .02em;
  color: var(--tinte);
  text-decoration: none;
  background: var(--orange);
  border: 3px solid var(--tinte);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--tinte);
  transform: rotate(-1deg);
  transition: transform .15s;
}
.knopf:hover { transform: rotate(0) translateY(-2px); }
.knopf.klein { min-height: 48px; font-size: 1.2rem; padding: 6px 22px; box-shadow: 3px 3px 0 var(--tinte); }
.knopf.kauf { background: var(--gruen); font-size: 1.7rem; min-height: 64px; padding: 12px 30px; }

/* ---------- Startseite: Begruessung ---------- */
.kopf { margin-bottom: 18px; }
.kopf p.sub { margin: 6px 0 0; font-weight: 700; }

.hallo { display: grid; gap: 28px; align-items: start; margin-bottom: 40px; }
.hallo .foto { width: min(70%, 250px); margin: 14px auto 0 6px; transform: rotate(-2.5deg); }
.blase {
  position: relative;
  background: #fff;
  border: 3px solid var(--tinte);
  border-radius: 26px;
  padding: 16px 20px;
  font-family: var(--chewy);
  font-size: 1.9rem;
  line-height: 1.2;
  transform: rotate(1deg);
}
.blase::after {
  content: "";
  position: absolute;
  left: 38px; top: -18px;
  width: 26px; height: 26px;
  background: #fff;
  border-left: 3px solid var(--tinte);
  border-top: 3px solid var(--tinte);
  transform: rotate(45deg);
}
.zettel {
  position: relative;
  background: #fffbe0;
  padding: 22px 18px 16px;
  margin-top: 26px;
  box-shadow: 0 3px 8px rgba(0,0,0,.16);
  transform: rotate(-.8deg);
}
.zettel p:last-child { margin-bottom: 0; }

/* ---------- Waescheleine ---------- */
.reihe-kopf { margin-bottom: 8px; }
.wisch { font-family: var(--chewy); font-size: 1.4rem; color: #b13b3b; margin: 0 0 6px; transform: rotate(-1deg); display: inline-block; }

.leine-wrap { position: relative; margin: 0 -16px 40px -46px; }
.leine-reihe {
  list-style: none;
  margin: 0; padding: 0 0 22px;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.leine-reihe > li {
  position: relative;
  flex: 0 0 min(76vw, 290px);
  scroll-snap-align: start;
  padding: 0 14px 6px;
}
.leine-reihe svg.leine {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 56px;
  pointer-events: none;
}
.leine path {
  fill: none;
  stroke: #6b625a;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}
.klammer {
  height: 28px !important;
  position: absolute;
  top: 17px; left: 50%;
  width: 16px; height: 40px;
  margin-left: -8px;
  z-index: 4;
  background: linear-gradient(90deg, #d79a54 0 45%, #b87a38 45% 55%, #d79a54 55%);
  border-radius: 4px 4px 6px 6px;
  box-shadow: 1px 2px 3px rgba(0,0,0,.3);
}
.klammer::after {
  content: "";
  position: absolute;
  left: 3px; right: 3px; top: 14px;
  height: 4px;
  background: #7d7d85;
  border-radius: 2px;
}
.polaroid {
  position: relative;
  margin-top: 36px;
  background: #fff;
  padding: 10px 10px 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transform-origin: 50% 0;
}
.leine-reihe > li:nth-child(odd) .polaroid { transform: rotate(-2deg); }
.leine-reihe > li:nth-child(even) .polaroid { transform: rotate(1.8deg); }
.polaroid .bild {
  position: relative;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  background: #eee;
}
.polaroid .bild img { width: 100%; height: 100%; object-fit: cover; }
.polaroid h3 { margin: 12px 4px 2px; font-size: 1.3rem; }
.polaroid p { margin: 0 4px 8px; font-size: .95rem; line-height: 1.4; }
.polaroid .knopf { margin: 6px 4px 4px; }

.bald {
  position: absolute;
  left: 8%; right: 8%; bottom: 14px;
  background: var(--gelb);
  padding: 8px 10px 9px;
  text-align: center;
  font-family: var(--chewy);
  font-size: 1.35rem;
  line-height: 1.1;
  box-shadow: 0 2px 6px rgba(0,0,0,.28);
  transform: rotate(-3deg);
  z-index: 2;
}
.leine-reihe > li:nth-child(even) .bald { transform: rotate(2.5deg); }
.bald::before {
  content: "";
  position: absolute;
  top: -10px; left: 50%;
  width: 54px; height: 18px; margin-left: -27px;
  background: var(--tape);
  transform: rotate(4deg);
}
.grau img { filter: grayscale(.35) opacity(.85); }

.pfeil { display: none; }

/* ---------- Ueber ---------- */
.ueber { display: grid; gap: 30px; margin-bottom: 36px; align-items: start; }
.ueber .foto { width: min(62%, 240px); margin: 10px auto 0 10px; transform: rotate(2deg); }
.ueber blockquote, .ueber .text { margin: 0; }
.autor { font-weight: 800; margin-top: 4px; }

/* ---------- Fuss ---------- */
.fuss {
  position: relative;
  z-index: 1;
  border-top: 3px dashed var(--stift);
  background: rgba(255, 254, 246, .92);
  padding: 18px 16px 28px 46px;
  text-align: center;
}
.fuss ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 0 0 6px; padding: 0; }
.fuss a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 6px; font-weight: 700; }
.fuss p { margin: 0; font-size: .95rem; }

/* ---------- Unterseite ---------- */
.zurueck { display: inline-flex; align-items: center; min-height: 48px; padding: 0 8px; font-weight: 800; margin-bottom: 8px; }
.heft-kopf { display: grid; align-items: start; gap: 30px; margin-bottom: 40px; }
.heft-kopf .foto { width: min(78%, 330px); margin: 16px auto 0 4px; transform: rotate(-2deg); }
.untertitel { font-family: var(--chewy); font-size: 1.5rem; margin: 10px 0 16px; color: #b13b3b; }
.eckdaten { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.eckdaten li {
  background: var(--gelb);
  padding: 6px 12px;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
  transform: rotate(-1.2deg);
}
.eckdaten li:nth-child(even) { transform: rotate(1.4deg); background: #c8ecff; }
.eckdaten li:nth-child(3n) { background: #ffd1de; }

.seiten-kopf { margin-bottom: 6px; }
.seiten-reihe-wrap { margin: 0 -16px 36px -46px; position: relative; }
.seiten-reihe {
  list-style: none;
  margin: 0; padding: 22px 0 22px 46px;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 46px;
  scrollbar-width: thin;
}
.seiten-reihe > li { flex: 0 0 min(62vw, 250px); scroll-snap-align: start; }
.seiten-reihe > li:last-child { margin-right: 30px; }
.seiten-reihe a.foto {
  display: block;
  position: relative;
  text-decoration: none;
  color: var(--tinte);
  min-height: 48px;
}
.seiten-reihe > li:nth-child(odd) a.foto { transform: rotate(-1.8deg); }
.seiten-reihe > li:nth-child(even) a.foto { transform: rotate(1.6deg); }
.seiten-reihe figcaption, .seiten-reihe .unterschrift {
  display: block;
  margin: 10px 2px 0;
  font-family: var(--chewy);
  font-size: 1.1rem;
  line-height: 1.2;
}
.lupe { display: block; margin: 2px 2px 0; font-size: .85rem; font-weight: 700; color: #0f4fa8; }

.text-heft { display: grid; gap: 28px; margin-bottom: 36px; align-items: start; }
.text-heft .zettel { margin-top: 0; }
.text-heft .foto { width: min(60%, 230px); margin: 0 auto 0 12px; transform: rotate(2deg); }
.kauf-unten { text-align: center; padding: 22px 8px 14px; margin-bottom: 20px; }

/* Grossansicht */
dialog#gross {
  width: min(94vw, 760px);
  max-height: 94vh;
  padding: 12px 12px 14px;
  border: 0;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  color: var(--tinte);
}
dialog#gross::backdrop { background: rgba(20, 20, 40, .72); }
dialog#gross img { max-height: calc(94vh - 130px); width: auto; max-width: 100%; margin: 0 auto; }
dialog#gross p { font-family: var(--chewy); font-size: 1.3rem; text-align: center; margin: 10px 0 8px; }
dialog#gross .zu { display: block; margin: 0 auto; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .seite { padding: 32px 28px 48px 70px; }
  body::before { left: 46px; }
  .fuss { padding-left: 70px; }
  .leine-wrap, .seiten-reihe-wrap { margin-left: -70px; margin-right: -28px; }
  .seiten-reihe { padding-left: 70px; scroll-padding-left: 70px; }
  h1 { font-size: 3.4rem; }
  h2 { font-size: 2.4rem; }
  .leine-reihe > li { flex-basis: 300px; }
  .hallo { grid-template-columns: 240px 1fr; gap: 36px; }
  .hallo .foto { width: 100%; margin: 12px 0 0; }
  .heft-kopf { grid-template-columns: 300px 1fr; }
  .heft-kopf .foto { width: 100%; margin: 16px 0 0; }
  .ueber { grid-template-columns: 230px 1fr; }
  .ueber .foto { width: 100%; margin: 6px 0 0; }
  .text-heft { grid-template-columns: 1fr 220px; }
  .text-heft .foto { order: 2; width: 100%; margin: 6px 0 0; }
  .reiter a { font-size: .95rem; }
}

/* ---------- Desktop: Reiter am rechten Rand ---------- */
@media (min-width: 1180px) {
  .reiter {
    position: fixed;
    top: 90px; right: 0;
    background: none;
    border: 0;
    padding: 0;
    z-index: 40;
  }
  .reiter ul { flex-direction: column; gap: 10px; }
  .reiter li { flex: none; }
  .reiter a {
    writing-mode: vertical-rl;
    min-height: 168px;
    min-width: 54px;
    padding: 12px 8px;
    font-size: 1.05rem;
    border: 2px solid var(--stift);
    border-right: 0;
    border-radius: 14px 0 0 14px;
    box-shadow: -3px 3px 0 rgba(0,0,0,.18);
    transition: transform .15s;
  }
  .reiter a:hover { transform: translateX(-6px); }
  .reiter a[aria-current="page"] { margin-top: 0; min-width: 64px; transform: translateX(-6px); }
  .seite { padding: 40px 100px 56px 90px; }
  body::before { left: 60px; }
  .fuss { padding-left: 90px; padding-right: 100px; }
  .leine-wrap, .seiten-reihe-wrap { margin-left: -90px; margin-right: -100px; }
  .seiten-reihe { padding-left: 90px; scroll-padding-left: 90px; }
  .leine-reihe > li { flex-basis: 320px; }
  h1 { font-size: 4rem; }
  .hallo { grid-template-columns: 280px 1fr; }
  .heft-kopf { grid-template-columns: 360px 1fr; gap: 56px; }
  .ueber { grid-template-columns: 260px 1fr; gap: 50px; }
  .text-heft { grid-template-columns: 1fr 260px; gap: 50px; }
  .seiten-reihe > li { flex-basis: 260px; }

  .pfeil {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -78px;
    width: 56px; height: 56px;
    z-index: 10;
    font-family: var(--chewy);
    font-size: 2rem;
    line-height: 1;
    color: var(--tinte);
    background: var(--blau);
    border: 3px solid var(--tinte);
    border-radius: 50%;
    box-shadow: 3px 3px 0 var(--tinte);
    cursor: pointer;
  }
  .pfeil.zurueck-pfeil { right: 190px; }
  .pfeil.vor-pfeil { right: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.skip { position: absolute; left: 8px; top: -80px; z-index: 100; background: #fff; color: var(--tinte); padding: 12px 16px; min-height: 48px; font-weight: 800; border: 3px solid var(--tinte); }
.skip:focus { top: 8px; }
@media (min-width: 640px) and (hover: none) { .pfeil { display: none; } }

/* ======== v5a: Schreibtisch von oben, Karoblock in der Mitte ======== */
:root { --bw: 100vw; --pl: 40px; --pr: 14px; --k: .4; }
@media (min-width: 640px) { :root { --bw: 600px; --pl: 64px; --pr: 28px; } }
@media (min-width: 900px) { :root { --k: .7; } }
@media (min-width: 1180px) { :root { --bw: 760px; --pl: 76px; --pr: 40px; --k: .8; } }
@media (min-width: 1500px) { :root { --k: 1; } }

body {
  padding: 14px 10px 28px;
  background-color: #b58650;
  background-image: url("bilder/schule/tisch-hell.jpg");
  background-size: max(100%, 1376px) auto;
  background-repeat: repeat-y;
  background-position: center top;
}
body::before { display: none; }

.seite {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--bw);
  margin: 0 auto;
  padding: 40px var(--pr) 22px var(--pl);
  background-color: var(--papier);
  background-image:
    linear-gradient(var(--karo) 1px, transparent 1px),
    linear-gradient(90deg, var(--karo) 1px, transparent 1px);
  background-size: 20px 20px;
  box-shadow: 1px 1px 0 rgba(0,0,0,.25), 6px 9px 14px rgba(40, 20, 0, .45), 14px 20px 34px rgba(40, 20, 0, .25);
  border-radius: 3px;
}
@media (min-width: 640px) { .seite { padding-top: 46px; } }
.seite::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: calc(var(--pl) - 14px);
  width: 2px;
  background: var(--rand);
  opacity: .75;
  pointer-events: none;
}
/* Spiralbindung oben */
.seite::after {
  content: "";
  position: absolute;
  top: -9px; left: 10px; right: 10px;
  height: 30px;
  background:
    radial-gradient(ellipse 3px 8px at 9px 14px, #2c2c30 0 55%, transparent 60%) 0 0 / 20px 30px repeat-x,
    radial-gradient(ellipse 3px 10px at 9px 12px, #b9bcc3 0 60%, #7a7d84 85%, transparent 100%) 0 0 / 20px 30px repeat-x;
  filter: drop-shadow(1px 2px 1px rgba(0,0,0,.4));
  pointer-events: none;
  z-index: 5;
}

/* Reiter: am Handy/Tablet Leiste oben im Block, am Desktop Klebereiter am Blockrand */
.reiter { margin: 0 calc(-1 * var(--pr) + 4px) 14px calc(-1 * var(--pl) + 4px); padding: 6px 0 0; background: none; }
.reiter { position: sticky; top: 0; }
@media (min-width: 1180px) {
  .reiter {
    position: absolute;
    top: 110px; right: -56px; left: auto;
    margin: 0;
    padding: 0;
    z-index: 40;
  }
  .reiter a { border-right: 0; }
}

.leine-wrap { margin: 0 calc(-1 * var(--pr)) 40px calc(-1 * var(--pl)); }
.seiten-reihe-wrap { margin: 0 calc(-1 * var(--pr)) 36px calc(-1 * var(--pl)); }
.seiten-reihe { padding-left: var(--pl); scroll-padding-left: var(--pl); }
@media (min-width: 1180px) {
  .pfeil { top: -74px; }
  .pfeil.zurueck-pfeil { right: 86px; }
  .pfeil.vor-pfeil { right: 16px; }
  .seite { padding-top: 52px; }
}
.leine-reihe { max-width: 100%; }

.fuss {
  background: none;
  border-top: 3px dashed var(--stift);
  padding: 14px 0 0 !important;
  margin-top: 8px;
}

/* Deko auf dem Tisch */
.tisch { display: none; position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
@media (min-width: 640px) { .tisch { display: block; } }
.tisch .d {
  position: absolute;
  width: calc(var(--w) * var(--k) * 1px);
  height: auto;
  transform: rotate(var(--r));
  filter: drop-shadow(3px 5px 4px rgba(30, 15, 0, .45));
}
.tisch .d1  { --w: 79;  --r: 24deg;  top: 6%;  right: calc(50% + var(--bw) / 2 + 12px); }
.tisch .d2  { --w: 209; --r: -12deg; top: 19%; right: calc(50% + var(--bw) / 2 + 8px); }
.tisch .d3  { --w: 112; --r: 28deg;  top: 25%; left: calc(50% + var(--bw) / 2 + 14px); }
.tisch .d4  { --w: 90;  --r: -9deg;  top: 40%; left: calc(50% + var(--bw) / 2 + 20px); }
.tisch .d5  { --w: 93;  --r: 32deg;  top: 42%; right: calc(50% + var(--bw) / 2 + 20px); }
.tisch .d6  { --w: 67;  --r: -20deg; top: 56%; left: calc(50% + var(--bw) / 2 + 24px); }
.tisch .d7  { --w: 125; --r: 18deg;  top: 58%; right: calc(50% + var(--bw) / 2 + 14px); }
.tisch .d8  { --w: 84;  --r: 14deg;  top: 72%; left: calc(50% + var(--bw) / 2 + 16px); }
.tisch .d9  { --w: 67;  --r: -28deg; top: 74%; right: calc(50% + var(--bw) / 2 + 26px); }
.tisch .d10 { --w: 79;  --r: -16deg; top: 88%; right: calc(50% + var(--bw) / 2 + 20px); }
@media (min-width: 1180px) {
  .tisch .d3, .tisch .d4, .tisch .d6, .tisch .d8 { left: calc(50% + var(--bw) / 2 + 80px); }
}
@media (max-width: 639px) { .reiter a { font-size: .75rem; padding: 2px 1px; } .reiter ul { gap: 3px; } }
@media (min-width: 640px) {
  .heft-kopf { grid-template-columns: 230px minmax(0, 1fr); gap: 30px; }
  .heft-kopf h1 { font-size: 2.3rem; }
  .heft-kopf .untertitel { font-size: 1.3rem; }
}
@media (min-width: 1180px) {
  .heft-kopf { grid-template-columns: 280px minmax(0, 1fr); gap: 36px; }
  .heft-kopf h1 { font-size: 3rem; }
}
@media (max-width: 639px) { .heft-kopf h1 { font-size: 2.2rem; } }
@media (min-width: 640px) and (max-width: 1179px) {
  .text-heft { grid-template-columns: minmax(0, 1fr) 150px; gap: 20px; }
  .heft-kopf .knopf.kauf { font-size: 1.3rem; padding: 10px 16px; white-space: nowrap; }
}
.klammer::after { top: 8px; }
.heft-kopf .foto.tape::before { top: -24px; }
@media (min-width: 640px) and (max-width: 1179px) {
  .leine-reihe > li { flex-basis: 250px; }
  .seiten-reihe > li { flex-basis: min(62vw, 230px); }
}

/* ======== v5b ======== */
/* 1) Reiter wie aufgeklebte Sticker direkt an der Blockkante, Schrift um 180 Grad gedreht */
@media (min-width: 1180px) {
  .reiter { right: auto; left: 100%; margin-left: -3px; }
  .reiter a {
    transform: rotate(180deg);
    border: 2px solid var(--stift);
    border-right: 0; /* nach der Drehung: gerade Kante ohne Rahmen liegt am Block */
    border-radius: 14px 0 0 14px; /* nach der Drehung: runde Ecken zeigen nach aussen */
    box-shadow: 3px -3px 0 rgba(0,0,0,.18);
  }
  .reiter a:hover { transform: rotate(180deg) translateX(-6px); }
  .reiter a[aria-current="page"] { transform: rotate(180deg) translateX(-6px); margin-top: 0; }
}
/* 2) Alle Knoepfe im Stil von "Bei Amazon ansehen" */
.knopf.blau { background: var(--blau); }
.knopf.zur { margin: 0 0 14px 0; }
.pfeil {
  font-family: var(--chewy);
  border: 3px solid var(--tinte);
  box-shadow: 4px 4px 0 var(--tinte);
  background: var(--blau);
  transform: rotate(-1deg);
}
.pfeil:hover { transform: rotate(0) translateY(-2px); }
/* 3) Scrollleisten der Reihen ausblenden */
.leine-reihe, .seiten-reihe { scrollbar-width: none; -ms-overflow-style: none; }
.leine-reihe::-webkit-scrollbar, .seiten-reihe::-webkit-scrollbar { display: none; }
/* 4) Heftkachel etwas vom Rand */
.leine-reihe { padding-left: 22px; scroll-padding-left: 22px; }
.leine-reihe::before {
  content: "";
  flex: 0 0 0;
  align-self: flex-start;
}
.leine-reihe > li:first-child::after {
  content: "";
  position: absolute;
  top: 13px; left: -22px; width: 22px;
  border-top: 2.5px solid #6b625a;
}
/* 6) Titel der Dummy-Karten */
.polaroid p.zweit { font-size: .85rem; margin-top: -2px; }
/* 5) Grosse Kulisse weit aussen, wird bei schmalen Fenstern abgeschnitten */
.tisch .g { position: absolute; height: auto; transform: rotate(var(--r)); width: calc(var(--w) * 1px); filter: drop-shadow(5px 8px 7px rgba(30, 15, 0, .45)); }
.tisch .g1 { --w: 380; --r: -10deg; top: 11%; right: calc(50% + var(--bw) / 2 + 330px); }
.tisch .g2 { --w: 440; --r: 8deg;   top: 19%; left: calc(50% + var(--bw) / 2 + 360px); }
.tisch .g3 { --w: 230; --r: -18deg; top: 33%; right: calc(50% + var(--bw) / 2 + 540px); }
.tisch .g4 { --w: 300; --r: 12deg;  top: 45%; left: calc(50% + var(--bw) / 2 + 420px); }
.tisch .g5 { --w: 330; --r: -6deg;  top: 52%; right: calc(50% + var(--bw) / 2 + 340px); }
.tisch .g6 { --w: 270; --r: 15deg;  top: 62%; left: calc(50% + var(--bw) / 2 + 560px); }
.tisch .g7 { --w: 170; --r: -22deg; top: 70%; right: calc(50% + var(--bw) / 2 + 600px); }
.tisch .g8 { --w: 270; --r: 6deg;   top: 76%; left: calc(50% + var(--bw) / 2 + 330px); }
.tisch .g9 { --w: 240; --r: -12deg; top: 85%; right: calc(50% + var(--bw) / 2 + 400px); }
.knopf.zur { margin-bottom: 30px; }

/* ======== v5b E-073: Anordnung nach Matthias ======== */
.tisch .m { display: none; }
@media (min-width: 1180px) {
  .tisch .d, .tisch .g { display: none; }
  .tisch .m {
    display: block;
    position: absolute;
    left: calc(50% + var(--x) * 1px);
    top: calc(var(--y) * 1px);
    width: calc(var(--w) * 1px);
    height: auto;
    transform: translate(-50%, -50%) rotate(var(--r));
    filter: drop-shadow(5px 8px 7px rgba(30, 15, 0, .45));
  }
}

/* E-074: Pfeile auch bei den Beispielseiten der Unterseite (Scrollbalken bleibt ausgeblendet) */
.seiten-reihe-wrap { position: relative; }
@media (min-width: 640px) and (hover: hover) {
  .seiten-reihe-wrap .pfeil {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -74px;
    width: 56px; height: 56px;
    z-index: 10;
    font-size: 2rem;
    line-height: 1;
    color: var(--tinte);
    border-radius: 50%;
    cursor: pointer;
  }
  .seiten-reihe-wrap .pfeil.zurueck-pfeil { right: 86px; }
  .seiten-reihe-wrap .pfeil.vor-pfeil { right: 16px; }
}

/* Aktiver Reiter am Desktop: gleiche Laenge wie die anderen (die Handy-Regel min-height 58px galt hier faelschlich), etwas breiter und mit kraeftigerem Schatten */
@media (min-width: 1180px) {
  .reiter a[aria-current="page"] { min-height: 168px; min-width: 64px; font-weight: 900; box-shadow: 4px -4px 0 rgba(0,0,0,.28); }
}

/* Impressum und Datenschutz */
.recht { margin-top: 18px; }
.recht h1 { margin-bottom: .6em; }
.recht .zettel { margin: 0 0 26px; }
.recht h2 { font-size: 1.55rem; }
.recht h3 { font-size: 1.25rem; margin-top: 1.1em; }
.recht h4 { font-size: 1rem; margin: 1em 0 .3em; }
.recht address { font-style: normal; }
.recht a { overflow-wrap: anywhere; }
