:root {
  --night: #07080f;
  --night-2: #0e1222;
  --ink: #ece4d2;
  --ink-dim: #b9b09c;
  --brass: #c9a25a;
  --brass-dim: #8a6f3c;
  --star: #ffb15a;
  --star-core: #fff1d6;
  --font-title: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Cormorant Garamond", Georgia, serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --vh: 100svh;
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--night); color: var(--ink); }
body {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Buch: vertikales Scrollen mit Einrasten ---------- */
.book {
  height: var(--vh);
  width: 100%;
  max-width: 520px;          /* nur Mobile: auf Desktop eine Handy-breite Spalte */
  margin: 0 auto;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.book::-webkit-scrollbar { display: none; }

.page {
  position: relative;
  height: var(--vh);
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  cursor: pointer;
  outline: none;
}
.page__img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.page--image .page__img { object-fit: cover; }
.page--map .page__img { object-fit: contain; }

/* Sternenhimmel: Karten-Rand, Cover, Platzhalter */
.page--map,
.page--cover,
.page--end,
.page--teaser,
.placeholder {
  background:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 9%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 33%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 61%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 78%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 91% 72%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 88%, #fff5 50%, transparent 51%),
    radial-gradient(ellipse at 50% 120%, #1a2140 0%, transparent 60%),
    var(--night);
}

/* ---------- Platzhalter ---------- */
.placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 32px;
  text-align: center;
}
.placeholder::before {
  content: ""; position: absolute; inset: 18px;
  border: 1px dashed var(--brass-dim); border-radius: 4px; opacity: .6;
}
.page--map .placeholder::before { inset: 22% 18px; }
.placeholder__label {
  font-family: var(--font-title); font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--brass);
}
.placeholder__alt { font-style: italic; color: var(--ink-dim); max-width: 26ch; }

/* ---------- Cover ---------- */
.cover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(32px + var(--safe-top)) 28px calc(32px + var(--safe-bottom));
  text-align: center;
}
.cover__star { width: 18px; height: 18px; margin-bottom: 36px; }
.cover__title {
  font-family: var(--font-title); font-weight: 400;
  font-size: clamp(30px, 9vw, 44px); line-height: 1.15; letter-spacing: .08em;
  color: var(--brass);
  text-shadow: 0 0 24px #c9a25a33;
}
.cover__subtitle { margin-top: 14px; font-style: italic; color: var(--ink-dim); }
.cover__hint {
  position: absolute; bottom: calc(28px + var(--safe-bottom)); left: 0; right: 0;
  font-family: var(--font-title); font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink-dim); opacity: .7;
  animation: drift 2.8s ease-in-out infinite;
}
@keyframes drift { 0%,100% { transform: translateY(0); opacity: .4 } 50% { transform: translateY(-6px); opacity: .85 } }

/* ---------- Der brennende Stern (dezent animiert) ---------- */
.star {
  position: relative; border-radius: 50%;
  background: radial-gradient(circle, var(--star-core) 0 22%, var(--star) 40%, transparent 72%);
  animation: flicker 3.7s infinite;
}
@keyframes flicker {
  0%, 100% { opacity: .95; transform: scale(1); filter: drop-shadow(0 0 6px #ffb15a99); }
  17% { opacity: .7;  transform: scale(.9); }
  21% { opacity: 1;   transform: scale(1.08); filter: drop-shadow(0 0 10px #ffb15acc); }
  48% { opacity: .82; transform: scale(.96); }
  52% { opacity: .6;  transform: scale(.88); }
  56% { opacity: .95; transform: scale(1.02); }
  80% { opacity: .78; transform: scale(.94); }
}

/* ---------- Text: Antippen zum Einblenden ---------- */
.text {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 96px 26px calc(34px + var(--safe-bottom));
  background: linear-gradient(to top, #07080ff2 0%, #07080fd9 45%, #07080f00 100%);
  opacity: 0; transform: translateY(16px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}
.page.is-open .text { opacity: 1; transform: none; }
.text__place {
  font-family: var(--font-title); font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 10px;
}
.text__caption { color: var(--ink); }
.text__quote {
  margin-top: 18px; padding-left: 14px;
  border-left: 1px solid var(--brass-dim);
  font-style: italic; color: var(--ink);
}
.text__quote cite {
  display: block; margin-top: 6px;
  font-style: normal; font-size: 14px; letter-spacing: .04em; color: var(--ink-dim);
}

.tap-hint {
  position: absolute; left: 0; right: 0; bottom: calc(26px + var(--safe-bottom));
  text-align: center;
  font-family: var(--font-title); font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink); opacity: .75; text-shadow: 0 1px 6px #000;
  transition: opacity .3s;
  pointer-events: none;
}
.page.is-open .tap-hint { opacity: 0; }

/* ---------- Fortschritt ---------- */
.progress {
  position: fixed; z-index: 5;
  top: calc(var(--safe-top) + 70px); bottom: calc(var(--safe-bottom) + 70px);
  right: max(10px, calc((100vw - 520px) / 2 + 10px));
  width: 10px;
  opacity: 0; transition: opacity .5s;
  pointer-events: none;
}
.progress.is-visible { opacity: 1; }
.progress__track { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #c9a25a40; }
.progress__star {
  --p: 0;
  position: absolute; left: 0; width: 10px; height: 10px;
  top: calc(var(--p) * (100% - 10px));
}

/* ---------- Musik-Button ---------- */
.music {
  position: fixed; z-index: 6;
  top: calc(var(--safe-top) + 14px);
  right: max(14px, calc((100vw - 520px) / 2 + 14px));
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid #c9a25a66; background: #07080f99;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: grid; place-items: center; cursor: pointer;
}
.music__icon { width: 16px; height: 14px; position: relative; }
.music__icon::before, .music__icon::after {
  content: ""; position: absolute; bottom: 0; width: 3px; border-radius: 1px; background: var(--brass);
}
/* aus: zwei flache Balken mit Strich; an: animierte Balken */
.music__icon::before { left: 3px; height: 4px; box-shadow: 4px 0 0 var(--brass), 8px 0 0 var(--brass); }
.music__icon::after { display: none; }
.music.is-on .music__icon::before { animation: eq 1.1s ease-in-out infinite; }
@keyframes eq { 0%,100% { height: 4px } 50% { height: 13px } }
.music.is-error { border-color: #a5483f; }

@media (prefers-reduced-motion: reduce) {
  .star, .cover__hint, .music.is-on .music__icon::before { animation: none; }
  .text { transition: opacity .2s; transform: none; }
}

/* Platzhaltertext weicht, wenn der Text eingeblendet ist */
.placeholder__label, .placeholder__alt { transition: opacity .3s; }
.page.is-open .placeholder__label, .page.is-open .placeholder__alt { opacity: 0; }

/* Ton-Knopf auf dem Cover */
.cover__sound {
  margin-top: 40px;
  padding: 12px 26px;
  border: 1px solid var(--brass-dim);
  border-radius: 999px;
  background: #07080f80;
  color: var(--brass);
  font-family: var(--font-title); font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.cover__sound:active { background: #c9a25a22; }
.cover__sound.is-on { color: var(--ink-dim); border-color: #c9a25a40; }

/* Schlussseite */
.page--end { cursor: default; display: grid; place-items: center; }
.end__star { width: 26px; height: 26px; }
.cover__fs { margin-top: 14px; }
.cover__sound { min-width: 250px; }

/* Vorletzte Seite: noch nicht enthüllt – ein Orrery aus Messingringen */
.page--teaser { cursor: default; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.orrery-wrap { position: relative; width: min(78vw, 360px); aspect-ratio: 1; margin-top: -14vh; }
.orrery {
  display: block; width: 100%; height: 100%; overflow: visible;
  filter: drop-shadow(0 0 10px #c9a25a22);
}
.orrery__ring { transform-origin: 0 0; transform-box: view-box; }
.orrery__ring circle:first-child { fill: none; stroke: var(--brass-dim); stroke-width: .6; }
.orrery__ring line { stroke: var(--brass-dim); stroke-width: .5; opacity: .8; }
.orrery__planet { fill: var(--brass); }
.orrery__planet--red { fill: #c0392b; filter: drop-shadow(0 0 3px #e74c3c); }
.orrery__ring--a { animation: spin 90s linear infinite; }
.orrery__ring--b { animation: spin 55s linear infinite reverse; }
.orrery__ring--c { animation: spin 34s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.teaser__star {
  position: absolute; width: 14px; height: 14px;
  top: calc(50% - 7px); left: calc(50% - 7px);
  opacity: .5; filter: saturate(.6);
  animation-duration: 6s;
}
.teaser__text {
  position: absolute; left: 0; right: 0; bottom: calc(15vh + var(--safe-bottom));
  padding: 0 32px; text-align: center;
}
.teaser__title {
  font-family: var(--font-title); font-weight: 400;
  font-size: 22px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brass);
}
.teaser__line { margin-top: 12px; font-style: italic; color: var(--ink-dim); }
@media (prefers-reduced-motion: reduce) {
  .orrery__ring--a, .orrery__ring--b, .orrery__ring--c { animation: none; }
}

/* ---------- Points of Interest: Scanner ---------- */
:root { --scan: #ff6a3d; --scan-soft: #ff6a3d55; }
.page {
  --poi: var(--star); --poi-core: var(--star-core);
  --poi-glow: #ffb15aaa; --poi-glow-soft: #ffb15a66; --poi-backdrop: #07080fb3;
}

.pois { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
/* Marker erst einblenden, wenn die Seite eine Weile im Bild ist (Verzögerung in app.js) */
.page .pois { opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s linear .8s; }
.page.pois-ready .pois { opacity: 1; visibility: visible; transition: opacity .8s ease; }
.poi {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 0; background: none; padding: 0; cursor: pointer;
  pointer-events: auto;
  transition: opacity .3s;
}
.poi[hidden] { display: none; }
/* fester Ring mit dunklem Grund: hebt den Punkt auch auf hellen Bildstellen ab */
.poi > .poi__dot::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  background: radial-gradient(circle, #07080f00 30%, var(--poi-backdrop) 31%, #07080f00 72%);
  border: 1.5px solid var(--poi);
  box-shadow: 0 0 10px var(--poi-glow), inset 0 0 6px var(--poi-glow-soft);
}
.poi__dot {
  position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--poi-core);
  box-shadow: 0 0 6px var(--poi), 0 0 14px var(--poi), 0 0 24px var(--poi-glow);
}
.poi__ring {
  position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; border: 2px solid var(--poi);
  box-shadow: 0 0 8px var(--poi-glow);
  animation: poi-pulse 2.2s ease-out infinite;
}
/* zufällig wirkender Versatz, damit nicht alle Punkte im Gleichtakt pulsieren */
.poi:nth-child(2) .poi__ring { animation-delay: .7s; }
.poi:nth-child(3) .poi__ring { animation-delay: 1.3s; }
.poi:nth-child(4) .poi__ring { animation-delay: 1.9s; }
@keyframes poi-pulse {
  0% { transform: scale(1); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: scale(2.3); opacity: 0; }
}

/* Fadenkreuz: vier Ecken rasten um den aktiven Punkt ein */
.poi::before, .poi::after {
  content: ""; position: absolute; inset: 4px; pointer-events: none;
  opacity: 0; transform: scale(1.8) rotate(45deg);
  transition: opacity .2s, transform .3s cubic-bezier(.2,.9,.3,1.3);
}
.poi::before {
  border: 1.5px solid var(--scan);
  -webkit-mask: conic-gradient(#000 0 0) top left / 9px 9px no-repeat, conic-gradient(#000 0 0) bottom right / 9px 9px no-repeat;
          mask: conic-gradient(#000 0 0) top left / 9px 9px no-repeat, conic-gradient(#000 0 0) bottom right / 9px 9px no-repeat;
}
.poi::after {
  border: 1.5px solid var(--scan);
  -webkit-mask: conic-gradient(#000 0 0) top right / 9px 9px no-repeat, conic-gradient(#000 0 0) bottom left / 9px 9px no-repeat;
          mask: conic-gradient(#000 0 0) top right / 9px 9px no-repeat, conic-gradient(#000 0 0) bottom left / 9px 9px no-repeat;
}
.poi.is-active::before, .poi.is-active::after { opacity: 1; transform: none; }
.poi.is-active .poi__ring { animation: none; opacity: 0; }
.poi.is-active .poi__dot { background: #fff; box-shadow: 0 0 0 1px #07080f99, 0 0 10px var(--scan), 0 0 22px var(--scan); }
.page.has-poi .poi:not(.is-active) { opacity: .35; }
.page.has-poi .tap-hint { opacity: 0; }

/* Verbindungslinie */
.poi-beam { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 3; overflow: visible; }
.poi-beam polyline {
  fill: none; stroke: var(--scan); stroke-width: 1;
  filter: drop-shadow(0 0 3px var(--scan));
  transition: stroke-dashoffset .3s linear;
}
.poi-beam.is-closing { opacity: 0; transition: opacity .25s; }

/* Panel */
.poi-panel {
  position: absolute; z-index: 4;
  padding: 14px 16px 16px;
  background:
    repeating-linear-gradient(to bottom, #ffffff05 0 1px, transparent 1px 3px),
    linear-gradient(160deg, #0e1222f0, #07080ff2);
  border: 1px solid #ff6a3d66;
  box-shadow: 0 0 0 1px #07080f, 0 10px 40px #000a, inset 0 0 30px #ff6a3d12;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  cursor: default;
  clip-path: inset(50% 0 50% 0);
  opacity: 0;
  transition: clip-path .32s cubic-bezier(.6,0,.2,1), opacity .15s;
}
.poi-panel.is-in { clip-path: inset(0 0 0 0); opacity: 1; }
.poi-panel.is-closing { clip-path: inset(50% 0 50% 0); opacity: 0; transition-duration: .22s; }
/* Eckmarken am Rahmen */
.poi-panel::before, .poi-panel::after {
  content: ""; position: absolute; width: 10px; height: 10px; border: 0 solid var(--scan);
}
.poi-panel::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.poi-panel::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
/* Scanbalken, der einmal über das Panel läuft */
.poi-panel__sweep {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--scan), transparent);
  box-shadow: 0 0 12px var(--scan);
  opacity: 0;
}
.poi-panel.is-in .poi-panel__sweep { animation: poi-sweep 1.1s .15s ease-in-out 1; }
@keyframes poi-sweep {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.poi-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.poi-panel__label {
  font-family: var(--font-title); font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--scan); text-shadow: 0 0 8px #ff6a3d66;
  padding-top: 4px;
}
.poi-panel__close {
  flex: none; width: 30px; height: 30px; margin: -4px -6px 0 0;
  border: 0; background: none; color: var(--ink-dim);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.poi-panel__text { color: var(--ink); font-size: 18px; line-height: 1.4; }
.poi-panel .ghost { visibility: hidden; }
/* blinkender Cursor hinter dem getippten Text, bis alles da ist */
.poi-panel__text .typed::after {
  content: ""; display: inline-block; width: .5em; height: 2px; margin-left: 2px;
  background: var(--scan); vertical-align: baseline;
  animation: poi-caret .6s steps(1) infinite;
}
.poi-panel.is-done .poi-panel__text .typed::after { display: none; }
@keyframes poi-caret { 50% { opacity: 0; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .poi__ring { animation: none; opacity: .6; }
  .poi-panel { transition: opacity .2s; clip-path: none; }
  .poi-panel.is-in .poi-panel__sweep { animation: none; }
}
.poi.is-active > .poi__dot::before { border-color: var(--scan); box-shadow: 0 0 10px var(--scan); }
.poi-panel.is-title-only .poi-panel__head { margin-bottom: 0; align-items: center; }
.poi-panel.is-title-only .poi-panel__label { padding-top: 0; }
/* ohne Fließtext blinkt der Cursor hinter dem Titel */
.poi-panel.is-title-only .poi-panel__label .typed::after {
  content: ""; display: inline-block; width: .6em; height: 2px; margin-left: 4px;
  background: var(--scan); animation: poi-caret .6s steps(1) infinite;
}
.poi-panel.is-title-only.is-done .poi-panel__label .typed::after { display: none; }
/* Kleiner Marker: alles auf 65 % – die Trefferfläche bleibt dank größerem Button bei ~44 px */
.poi--small { width: 68px; height: 68px; margin: -34px 0 0 -34px; transform: scale(.65); }
.poi--small::before, .poi--small::after { inset: 16px; }

/* Farbton „green“ (Seite: poiTone: "green") – kühles Meergrün, leichter, ohne dunklen Grund */
.page.poi-tone--green {
  --poi: #7fe0c4; --poi-core: #e6fff7;
  --poi-glow: #5fd6b366; --poi-glow-soft: #5fd6b333; --poi-backdrop: #00000000;
  --scan: #6fdcbf; --scan-soft: #6fdcbf55;
}
.page.poi-tone--green .poi__ring { border-width: 1px; }
.page.poi-tone--green .poi-panel {
  border-color: #6fdcbf55;
  background:
    repeating-linear-gradient(to bottom, #ffffff05 0 1px, transparent 1px 3px),
    linear-gradient(160deg, #06161ae6, #040b0ee6);
  box-shadow: 0 0 0 1px #02090b, 0 10px 40px #000a, inset 0 0 30px #6fdcbf12;
}
.page.poi-tone--green .poi-panel__label { text-shadow: 0 0 8px #6fdcbf66; }

/* ---------- Aufnahme im POI-Panel ---------- */
.poi-audio { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.poi-audio__btn {
  flex: none; position: relative; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--scan); background: #07080f80; cursor: pointer;
  box-shadow: 0 0 8px var(--scan-soft);
}
/* aus: Dreieck; an: zwei Balken */
.poi-audio__btn::before {
  content: ""; position: absolute; left: 50%; top: 50%; margin: -6px 0 0 -3px;
  border-style: solid; border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent var(--scan);
}
.poi-audio__btn.is-on::before {
  width: 10px; height: 12px; margin: -6px 0 0 -5px;
  border-width: 0 3px; border-color: var(--scan);
}
.poi-audio__bar { flex: 1; position: relative; height: 20px; cursor: pointer; }
.poi-audio__bar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--scan-soft);
}
.poi-audio__fill {
  position: absolute; left: 0; top: 9px; height: 2px; width: 0;
  background: var(--scan); box-shadow: 0 0 6px var(--scan);
}
.poi-audio__time {
  flex: none; min-width: 7.5ch; text-align: right;
  font-family: var(--font-title); font-size: 11px; letter-spacing: .1em;
  color: var(--ink-dim); font-variant-numeric: tabular-nums;
}
/* Marker, dessen Aufnahme gerade läuft */
.poi.is-playing .poi__ring { border-color: var(--scan); animation-duration: 1.1s; }
.poi.is-playing .poi__dot { background: #fff; box-shadow: 0 0 6px var(--scan), 0 0 16px var(--scan); }

/* ---------- Aufnahme-Knopf oben links (Seite: audio) ---------- */
.page-audio {
  position: absolute; z-index: 3;
  top: calc(var(--safe-top) + 14px); left: 14px;
  height: 40px; max-width: calc(100% - 90px);
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px 0 14px; overflow: hidden;
  border: 1px solid #c9a25a66; border-radius: 999px;
  background: #07080f99;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--brass);
  font-family: var(--font-title); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  white-space: nowrap; cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s linear .8s;
}
.page.pois-ready .page-audio { opacity: 1; visibility: visible; transition: opacity .8s ease; }
.page-audio__icon { flex: none; position: relative; width: 10px; height: 12px; }
.page-audio__icon::before {
  content: ""; position: absolute; left: 1px; top: 0;
  border-style: solid; border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--brass);
}
.page-audio.is-on .page-audio__icon::before {
  left: 0; width: 10px; height: 12px; box-sizing: border-box;
  border-width: 0 3px; border-color: var(--brass);
}
.page-audio__label { overflow: hidden; text-overflow: ellipsis; }
.page-audio__time { flex: none; color: var(--ink-dim); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.page-audio__fill {
  position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--brass); box-shadow: 0 0 6px #c9a25a99;
}
.page-audio.is-on { border-color: var(--brass); }
/* Musik-Knopf zeigt eine laufende Aufnahme an */
.music.is-voice { border-color: var(--brass); }
.music.is-voice .music__icon::before { animation: eq 1.1s ease-in-out infinite; }

/* ---------- Note neben dem Sprecher (audio.note) ---------- */
.voice-note {
  position: absolute; z-index: 2;
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 0; background: none; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s linear 1s;
}
.page.note-ready .voice-note { opacity: 1; visibility: visible; transition: opacity 1s ease; }
/* fester Ring mit dunklem Grund und pulsierender Ring – wie bei den POI-Markern */
.voice-note::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  background: radial-gradient(circle, var(--poi-backdrop) 0 55%, #07080f00 75%);
  border: 1.5px solid var(--poi);
  box-shadow: 0 0 10px var(--poi-glow), inset 0 0 6px var(--poi-glow-soft);
}
.voice-note__ring {
  position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; border: 1.5px solid var(--poi);
  box-shadow: 0 0 6px var(--poi-glow);
  animation: note-pulse 3.6s ease-out infinite;
}
/* ruhiger als bei den POIs: langsamer, kleiner, schwächer */
@keyframes note-pulse {
  0% { transform: scale(1); opacity: 0; }
  20% { opacity: .55; }
  100% { transform: scale(1.7); opacity: 0; }
}
.voice-note svg {
  position: relative; width: 10px; height: 13px; fill: var(--poi-core);
  filter: drop-shadow(0 0 3px var(--poi)) drop-shadow(0 0 8px var(--poi-glow));
}
/* läuft die Aufnahme: etwas schnellerer Puls; die Note selbst bleibt ruhig */
.voice-note.is-playing .voice-note__ring { animation-duration: 2s; }
@media (prefers-reduced-motion: reduce) {
  .voice-note__ring { animation: none; opacity: .6; }
}

/* PC: Seiten mit der Maus ziehen */
@media (hover: hover) and (pointer: fine) {
  .book.is-dragging, .book.is-dragging * { cursor: grabbing !important; user-select: none; }
}

/* „Nach oben wischen“ erst nach dem Delay bzw. beim Tippen */
.page .tap-hint--swipe { opacity: 0; transition: opacity .8s ease; }
.page.swipe-ready .tap-hint--swipe { opacity: .75; }
/* Am PC (Maus) „↓ Weiter“, sonst „Nach oben wischen“ */
.hint--pc { display: none; }
@media (hover: hover) and (pointer: fine) {
  .hint--pc { display: inline; }
  .hint--touch { display: none; }
}
