/* Hinweis auf den Adventskalender: Lasche am linken Rand, Gegenstück zu "Barrierefrei" rechts, aber immer sichtbar. */
.adv-rail { position: fixed; left: 0; top: 50%; z-index: 25; width: 0; height: 0; pointer-events: none; }
/* Schatten nicht per filter: die Safari-Engine schneidet sonst alles oberhalb der Bildmitte ab. */
.adv-rail-unit { position: absolute; left: 5px; top: 0; display: flex; align-items: stretch; width: max-content; transform: translateY(-50%); }
.adv-rail .adv-lasche { pointer-events: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; box-sizing: border-box; width: 2.9rem; min-height: 9.6rem; padding: 0; border-radius: 1rem 1.6rem 1.6rem 1rem; background: #CC0028; color: #fff; text-decoration: none; box-shadow: 0 14px 22px rgba(0, 0, 0, .28); }
.adv-rail .adv-lasche svg { width: 1.5rem; height: 1.5rem; flex: 0 0 auto; }
.adv-rail .adv-lasche > span { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 .95rem/1 var(--font-body, system-ui, sans-serif); letter-spacing: .04em; white-space: nowrap; }
.adv-rail .adv-lasche:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.adv-rail .adv-griff { pointer-events: auto; position: relative; flex: 0 0 auto; align-self: center; margin-left: 6px; width: 6px; height: 4.5rem; padding: 0; border: 0; border-radius: 999px; background: rgba(128, 128, 128, .5); box-shadow: 0 0 0 1px rgba(255, 255, 255, .28), 0 0 0 2px rgba(0, 0, 0, .12); transform-origin: right center; cursor: pointer; transition: transform .3s var(--ease, ease), background-color .3s; }
.adv-rail .adv-griff::before { content: ""; position: absolute; inset: -.5rem -.9rem -.5rem -3px; }
.adv-rail .adv-griff:hover, .adv-rail.hov .adv-griff { transform: scaleX(1.34); background: #CC0028; box-shadow: none; }
@media (max-width: 1024px) {
  .adv-rail .adv-griff::before { inset: -1.4rem -1.4rem -1.4rem -3px; }
  html:has(#rail.open) .adv-rail { opacity: 0; visibility: hidden; }
}
@media (max-width: 600px) {
  .adv-rail-unit { left: 0; }
  .adv-rail .adv-lasche { align-self: center; width: 24px; min-height: 150px !important; padding: 10px 0; gap: 7px; border-radius: 0 12px 12px 0; }
  .adv-rail .adv-griff { margin-left: 3px; width: 4px; }
  .adv-rail .adv-lasche svg { width: 15px; height: 15px; }
  .adv-rail .adv-lasche > span { font-size: 12px; letter-spacing: .02em; }
}
@media (prefers-reduced-motion: reduce) { .adv-rail .adv-griff { transition: none !important; } }
/* Quer gehaltenes Handy: nur so hoch wie nötig. */
@media (max-height: 500px) { .adv-rail .adv-lasche { min-height: 0 !important; padding: .8rem 0; } }
@media print { .adv-rail { display: none; } }

/* Beim Drüberfahren: der Kalender als Produkt (A4, leicht schräg). Wird erst beim ersten Zeigen gebaut. */
.adv-rail .adv-produkt { --w: max(8rem, min(17rem, calc((100vh - 15rem) * .707))); position: absolute; left: calc(2.9rem + 12px + 1.9rem); top: 0; translate: 0 -50%; width: var(--w); display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-decoration: none !important; pointer-events: none; visibility: hidden; opacity: 0; transition: opacity .25s ease, visibility 0s .35s; }
.adv-buch-link { position: relative; display: block; width: 100%; perspective: 1100px; }
.adv-rail .adv-produkt a { text-decoration: none !important; }
.adv-rail.hov .adv-produkt { pointer-events: auto; visibility: visible; opacity: 1; transition: opacity .25s ease; }
/* unsichtbare Brücke, damit die Maus von der Lasche zum Kalender kommt */
.adv-rail .adv-produkt::before { content: ""; position: absolute; left: -2rem; top: 15%; bottom: 15%; width: 2rem; }
.adv-schein { position: absolute; inset: -18% -22% 6%; background: radial-gradient(closest-side, rgba(204, 0, 40, .55), rgba(204, 0, 40, .18) 60%, transparent); pointer-events: none; }
.adv-boden { position: absolute; left: 4%; right: -6%; top: calc(var(--w) * 1.414 - .4rem); height: 1.6rem; background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); pointer-events: none; }
.adv-buch { --kx: 0deg; --ky: 0deg; position: relative; display: block; width: 100%; aspect-ratio: 210 / 297; transform-style: preserve-3d; transform: translateX(-3.5rem) rotateY(62deg) rotateZ(-8deg) scale(.82); transition: transform .65s cubic-bezier(.2, .75, .2, 1); }
.adv-rail.hov .adv-buch { transform: rotateY(calc(27deg + var(--ky))) rotateX(calc(3deg + var(--kx))) rotateZ(-3.5deg); }
.adv-vorne, .adv-ruecken, .adv-hinten, .adv-unten { position: absolute; display: block; }
.adv-vorne { inset: 0; overflow: hidden; border-radius: 2px 5px 5px 2px; background: #22000A; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.adv-vorne img { display: block; width: 100%; height: 100%; }
.adv-vorne::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 260%; background: linear-gradient(105deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,0) 22%, rgba(255,255,255,0) 40%, rgba(255,255,255,.17) 50%, rgba(255,255,255,0) 60%); transform: translateX(-61.5%); transition: transform 1.2s ease .15s; }
.adv-rail.hov .adv-vorne::after { transform: translateX(0); }
.adv-ruecken { left: 0; top: 0; width: 32px; height: 100%; transform-origin: left center; transform: rotateY(90deg); background: linear-gradient(90deg, #E3103B, #7A0018); }
.adv-ruecken b { position: absolute; left: 50%; top: 50%; white-space: nowrap; transform: translate(-50%, -50%) scaleX(-1) rotate(-90deg); font: 700 .6rem/1 var(--font-display, system-ui); letter-spacing: .22em; text-transform: uppercase; color: #fff; }
.adv-unten { left: 0; bottom: 0; width: 100%; height: 32px; transform-origin: center bottom; transform: rotateX(90deg); background: #5A0012; }
.adv-hinten { inset: 0; transform: translateZ(-32px); background: #3A000C; border-radius: 4px; box-shadow: 0 30px 50px -8px rgba(0, 0, 0, .6), 0 8px 18px rgba(0, 0, 0, .35); }
.adv-sticker { position: absolute; right: -3rem; top: -3.4rem; width: 6.2rem; height: 6.2rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: #CC0028; font: 800 .75rem/1.25 var(--font-display, system-ui); text-transform: uppercase; text-align: center; letter-spacing: .02em; box-shadow: 0 10px 20px rgba(0, 0, 0, .35); transform: translateZ(34px) rotate(12deg) scale(0); transition: transform .45s cubic-bezier(.2, .75, .2, 1); }
.adv-rail.hov .adv-sticker { transform: translateZ(34px) rotate(12deg) scale(1); transition-delay: .3s; }
.adv-produkt .adv-knopf-produkt { position: relative; margin: 0; white-space: nowrap; }
@media (max-width: 600px) {
  .adv-rail .adv-produkt { --w: max(7rem, min(58vw, 14rem, calc((100vh - 14rem) * .707))); left: calc(24px + 12px + 1.5rem); }
  .adv-sticker { width: 5.8rem; height: 5.8rem; right: -1.9rem; top: -3.2rem; }
}
:root[data-calm="1"] .adv-buch, :root[data-calm="1"] .adv-sticker, :root[data-calm="1"] .adv-vorne::after, :root[data-calm="1"] .adv-produkt { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .adv-buch, .adv-sticker, .adv-vorne::after, .adv-rail .adv-produkt { transition: none !important; } }
@media (max-width: 1024px) { html:has(#rail.open) .adv-rail .adv-produkt { visibility: hidden; pointer-events: none; } }
@media print { .adv-rail .adv-produkt { display: none; } }
/* Wenig Platz (schmale Handys, quer gehalten): ohne Aufkleber, quer auch kleiner, damit der Knopf über der Fußleiste bleibt. */
@media (max-width: 360px), (max-height: 500px) { .adv-rail .adv-sticker { display: none; } }
@media (max-height: 500px) { .adv-rail .adv-produkt { --w: 7rem; gap: .8rem; } }
