/* Rabenhof-Vorspiel „Das Büro“: nächtliches Detektivbüro 1924. Schriften aus den vorhandenen Rabenhof-Dateien. */
@font-face { font-family: "Marcellus"; src: url("/rabenhof-assets/fonts/marcellus-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Spectral"; src: url("/rabenhof-assets/fonts/spectral-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Spectral"; font-style: italic; src: url("/rabenhof-assets/fonts/spectral-400-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Spectral"; font-weight: 600; src: url("/rabenhof-assets/fonts/spectral-600.woff2") format("woff2"); font-display: swap; }

:root {
  --ink: #e9dfc8; --ink-dim: #b7aa8c; --ink-faint: #7f7461;
  --paper: #efe4cb; --paper-ink: #2a2219; --paper-line: #c9b78f;
  --wine: #8e2a2a; --brass: #b8924a; --night: #0b0d12; --wood: #3a2618; --wood-dark: #24170e;
  --panel: rgba(16, 13, 10, 0.94); --focus: #f2c46d;
  --serif: "Spectral", Georgia, "Times New Roman", serif; --title: "Marcellus", "Spectral", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--ink); font-family: var(--serif); }
body.pre { overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pre-root { position: fixed; inset: 0 0 var(--pre-foot-h) 0; }
:root { --pre-foot-h: 28px; }
/* Rechtslinks unter dem Spielbereich, kommen direkt aus dem HTML */
.pre-foot { position: fixed; left: 0; right: 0; bottom: 0; height: var(--pre-foot-h); z-index: 1; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 8px; background: var(--night); font-size: 12px; white-space: nowrap; overflow: hidden; }
.pre-foot a { color: var(--ink); opacity: .8; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 520px) { .pre-foot { gap: 12px; } .pre-foot-wide { display: none; } }
.pre-noscript { padding: 2rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Titel und Übergänge ---------- */
.pre-title { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1.5rem;
  background: radial-gradient(ellipse at 50% 40%, #1d1a16 0%, #07080b 70%); z-index: 50; transition: opacity 1.2s ease; }
.pre-title.is-gone { opacity: 0; pointer-events: none; }
.pre-title h1 { font-family: var(--title); font-weight: 400; letter-spacing: 0.32em; font-size: clamp(2rem, 7vw, 4.4rem); margin: 0 0 .4rem; color: #efe6d2; }
.pre-title .sub { font-style: italic; color: var(--ink-dim); margin: 0 0 2rem; font-size: clamp(1rem, 2.4vw, 1.25rem); }
.pre-title .lead { max-width: 34rem; margin: 0 auto 2rem; line-height: 1.6; color: var(--ink-dim); }
.pre-title .row { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.pre-title .note { margin-top: 1.6rem; font-size: .9rem; color: var(--ink-faint); }
.btn { appearance: none; border: 1px solid var(--brass); background: rgba(184, 146, 74, .12); color: #f3e6c4; padding: .75rem 1.4rem;
  font-family: var(--title); letter-spacing: .08em; cursor: pointer; border-radius: 2px; min-height: 44px; }
.btn:hover { background: rgba(184, 146, 74, .24); }
.btn.ghost { border-color: rgba(233, 223, 200, .3); background: transparent; color: var(--ink-dim); }
.btn.small { padding: .45rem .8rem; min-height: 36px; font-size: .9rem; }
.btn[disabled] { opacity: .45; cursor: default; }
.fade-black { position: absolute; inset: 0; background: #000; z-index: 60; opacity: 0; pointer-events: none; transition: opacity 1.6s ease; }
.fade-black.on { opacity: 1; pointer-events: auto; }

/* ---------- Bürobild ---------- */
.office-wrap { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: #050608; }
.office { position: relative; width: min(100vw, calc(100vh * 16 / 9)); aspect-ratio: 16 / 9; max-height: 100vh; }
.office svg.room { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.office canvas.rain { position: absolute; pointer-events: none; }
.office .flash { position: absolute; inset: 0; background: rgba(210, 220, 255, .0); pointer-events: none; mix-blend-mode: screen; transition: background .08s; }
.office .flash.on { background: rgba(210, 220, 255, .16); }
.office .lampglow { position: absolute; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 110, .36) 0%, rgba(255, 170, 80, .12) 35%, transparent 70%); mix-blend-mode: screen; }
.office.lamp-off .lampglow { opacity: 0; }
.office.lamp-off svg.room { filter: brightness(.55); }
.spot { position: absolute; border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 6px; min-width: 44px; min-height: 44px; }
.spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(242, 196, 109, 0); transition: box-shadow .25s, background .25s; }
.spot:hover::after, .spot:focus-visible::after { box-shadow: 0 0 0 2px rgba(242, 196, 109, .7), 0 0 24px rgba(242, 196, 109, .25); background: rgba(242, 196, 109, .06); }
.spot .lbl { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; background: rgba(10, 8, 6, .86);
  border: 1px solid rgba(184, 146, 74, .5); padding: .2rem .55rem; font-size: .82rem; color: #f3e6c4; opacity: 0; pointer-events: none; transition: opacity .2s; }
.spot:hover .lbl, .spot:focus-visible .lbl { opacity: 1; }
.spot.new::before { content: ""; position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--focus); box-shadow: 0 0 10px var(--focus); }
.spot.ringing { animation: ring .18s infinite alternate; }
@keyframes ring { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
.hint-ring { position: absolute; pointer-events: none; border: 2px solid rgba(242, 196, 109, .8); border-radius: 50%; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.4); opacity: 0; } }

/* ---------- Leiste ---------- */
.bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; padding: .5rem .6rem calc(.5rem + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(5, 4, 3, .85) 40%); z-index: 20; }
.bar .btn { padding: .5rem .85rem; font-size: .92rem; }
.bar .count { display: inline-block; min-width: 1.4em; margin-left: .3rem; padding: 0 .3rem; border-radius: 9px; background: var(--wine); color: #fff; font-size: .78rem; }
.toast { position: absolute; left: 50%; top: 1rem; transform: translateX(-50%); max-width: min(92vw, 40rem); background: rgba(14, 11, 8, .92);
  border: 1px solid rgba(184, 146, 74, .55); padding: .7rem 1rem; z-index: 40; line-height: 1.5; opacity: 0; transition: opacity .4s; pointer-events: none; }
.toast.on { opacity: 1; }
.toast b { color: var(--focus); font-weight: 600; }

/* ---------- Untertitel ---------- */
.subs { position: absolute; left: 50%; bottom: 4.6rem; transform: translateX(-50%); width: min(94vw, 46rem); z-index: 30; pointer-events: none; text-align: center; }
.subs .line { display: inline-block; background: rgba(0, 0, 0, .78); padding: .5rem .9rem; line-height: 1.55; font-size: clamp(1rem, 2.2vw, 1.18rem); }
.subs .who { color: var(--brass); font-family: var(--title); letter-spacing: .06em; margin-right: .45rem; }
.subs .dir { display: block; color: var(--ink-faint); font-style: italic; font-size: .85em; }
.choices { position: absolute; left: 50%; bottom: 4.6rem; transform: translateX(-50%); width: min(94vw, 40rem); z-index: 31; display: grid; gap: .45rem; }
.choices .btn { text-align: left; font-family: var(--serif); letter-spacing: 0; }

/* ---------- Fenster (Blätter) ---------- */
.sheet-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); z-index: 35; display: grid; place-items: center; padding: max(1rem, env(safe-area-inset-top)) .6rem calc(4.4rem + env(safe-area-inset-bottom)); }
.sheet { position: relative; width: min(100%, 58rem); max-height: 100%; display: flex; flex-direction: column; background: var(--panel); border: 1px solid rgba(184, 146, 74, .45); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.sheet header { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border-bottom: 1px solid rgba(184, 146, 74, .3); }
.sheet header h2 { flex: 1; margin: 0; font-family: var(--title); font-weight: 400; letter-spacing: .06em; font-size: 1.2rem; color: #f3e6c4; }
.sheet .x { appearance: none; border: 0; background: transparent; font-size: 1.6rem; line-height: 1; cursor: pointer; min-width: 44px; min-height: 44px; color: var(--ink-dim); }
.sheet .body { overflow: auto; padding: 1rem; -webkit-overflow-scrolling: touch; }
.sheet .tabs { display: flex; gap: .3rem; flex-wrap: wrap; padding: .5rem 1rem 0; }
.sheet .tabs button { border: 1px solid rgba(184, 146, 74, .35); background: transparent; padding: .35rem .7rem; cursor: pointer; color: var(--ink-dim); min-height: 36px; }
.sheet .tabs button[aria-selected="true"] { background: rgba(184, 146, 74, .2); color: #f3e6c4; }

/* Papier */
.paper { background: var(--paper); color: var(--paper-ink); padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.6rem); line-height: 1.65; font-size: 1.05rem;
  box-shadow: inset 0 0 60px rgba(120, 90, 40, .25); border: 1px solid #d6c39b; max-width: 44rem; margin: 0 auto; }
.paper h3 { font-family: var(--title); font-weight: 400; margin: .2rem 0 .8rem; font-size: 1.4rem; letter-spacing: .02em; }
.paper .meta { font-size: .88rem; color: #6b5a40; margin-bottom: .8rem; font-style: italic; }
.paper.newspaper { columns: 2 18rem; column-gap: 1.6rem; font-size: 1rem; }
.paper.newspaper h3 { column-span: all; text-align: center; border-bottom: 3px double #6b5a40; padding-bottom: .4rem; }
.paper.newspaper .masthead { column-span: all; text-align: center; font-family: var(--title); letter-spacing: .3em; font-size: .9rem; color: #5a4a33; }
.paper.letter { font-style: italic; }
.paper.record { font-family: "Courier New", monospace; font-size: .95rem; }
.paper.telegram { font-family: "Courier New", monospace; text-transform: uppercase; letter-spacing: .05em; }
.paper p { margin: 0 0 .8rem; }
.paper mark.clue { background: transparent; border-bottom: 2px dotted #8e2a2a; color: inherit; cursor: pointer; padding: 0 .05em; }
.paper mark.clue.got { background: rgba(142, 42, 42, .12); border-bottom-style: solid; }
.docs-list { display: grid; gap: .5rem; }
.docs-list button { text-align: left; border: 1px solid rgba(184, 146, 74, .3); background: rgba(255, 255, 255, .03); padding: .6rem .8rem; cursor: pointer; min-height: 44px; }
.docs-list button .k { color: var(--ink-faint); font-size: .85rem; display: block; }
.look { line-height: 1.7; font-size: 1.05rem; max-width: 40rem; }
.look .actions { margin-top: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }

/* Telefonbuch */
.book { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; }
.book nav { display: flex; flex-direction: column; gap: .25rem; }
.book nav button { text-align: left; border: 0; border-left: 3px solid transparent; background: transparent; padding: .45rem .6rem; cursor: pointer; color: var(--ink-dim); min-height: 40px; }
.book nav button[aria-current="true"] { border-left-color: var(--brass); color: #f3e6c4; background: rgba(184, 146, 74, .1); }
.book .page { background: #ece0c4; color: #241c13; padding: 1rem 1.2rem; font-size: .98rem; line-height: 1.45; box-shadow: inset 0 0 40px rgba(110, 80, 30, .25); min-height: 20rem; }
.book .page h3 { font-family: var(--title); font-weight: 400; margin: 0 0 .2rem; letter-spacing: .1em; text-transform: uppercase; font-size: 1.05rem; }
.book .page .amt { font-size: .85rem; color: #6b5a40; margin-bottom: .7rem; font-style: italic; }
.book .entry { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .32rem 0; border-bottom: 1px dotted #b9a67d; }
.book .entry .nm { font-weight: 600; }
.book .entry .jb { color: #4d3f2c; }
.book .entry .nr { font-family: "Courier New", monospace; white-space: nowrap; }
.book .entry .nt { grid-column: 1 / -1; font-size: .85rem; color: #6b5a40; font-style: italic; }
.book .entry button.call { grid-column: 2; justify-self: end; border: 1px solid #8a7550; background: transparent; padding: .1rem .5rem; font-size: .82rem; cursor: pointer; color: #3a2d1e; }
.book .filter { margin-bottom: .6rem; }
.book .filter input { width: 100%; padding: .5rem .6rem; background: #f6edd8; border: 1px solid #b9a67d; color: #241c13; font: inherit; }

/* Karte */
.mapbox { position: relative; height: min(70vh, 40rem); background: #d9cba4; overflow: hidden; touch-action: none; border: 1px solid #a8956a; }
.mapbox svg { position: absolute; left: 0; top: 0; transform-origin: 0 0; cursor: grab; }
.mapbox svg.marking { cursor: crosshair; }
.mapctl { position: absolute; right: .5rem; top: .5rem; display: flex; flex-direction: column; gap: .3rem; z-index: 2; }
.mapctl button { width: 44px; height: 44px; border: 1px solid #6b5a40; background: rgba(240, 228, 200, .92); color: #2a2219; font-size: 1.2rem; cursor: pointer; }
.mapinfo { margin-top: .7rem; min-height: 3.2rem; line-height: 1.55; }
.maprow { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; align-items: center; }
.map-lake { fill: #8fa7ad; stroke: #4f6870; stroke-width: 1.5; cursor: pointer; }
.map-lake:hover { fill: #9fb7bd; }
.map-line-bahn { stroke: #222; stroke-width: 3; stroke-dasharray: 10 6; fill: none; }
.map-line-strasse { stroke: #7a4b2a; stroke-width: 2.5; fill: none; }
.map-line-weg { stroke: #7a4b2a; stroke-width: 1.4; stroke-dasharray: 4 4; fill: none; }
.map-line-fluss { stroke: #4f6870; stroke-width: 2.4; fill: none; }
.map-line-grenze { stroke: #8e2a2a; stroke-width: 1.6; stroke-dasharray: 2 5; fill: none; }
.map-line-hoehe { stroke: #8a7550; stroke-width: 1; fill: none; opacity: .7; }
.map-line-hit { stroke: transparent; stroke-width: 18; fill: none; cursor: pointer; }
.map-town { fill: #2a2219; cursor: pointer; }
.map-spot { fill: #fff8e8; stroke: #2a2219; stroke-width: 1.5; cursor: pointer; }
.map-label { font-family: var(--serif); font-size: 15px; fill: #2a2219; pointer-events: none; }
.map-label.lake { font-style: italic; fill: #284048; }
.map-label.small { font-size: 12px; }
.map-mark { fill: none; stroke: #8e2a2a; stroke-width: 3; }
.map-found { fill: rgba(142, 42, 42, .2); stroke: #8e2a2a; stroke-width: 3; }

/* Telefon */
.phone { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: 1.2rem; align-items: start; }
.phone img { width: 100%; height: auto; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)); }
.phone .log { max-height: 50vh; overflow: auto; border-left: 2px solid rgba(184, 146, 74, .3); padding-left: .8rem; line-height: 1.55; }
.phone .log p { margin: 0 0 .6rem; }
.phone .log .who { color: var(--brass); font-family: var(--title); margin-right: .4rem; }
.phone .log .me { color: var(--ink-faint); font-style: italic; }
.phone .topics { display: grid; gap: .4rem; margin-top: .8rem; }
.phone .topics .btn { text-align: left; font-family: var(--serif); letter-spacing: 0; }
.phone .dial { display: grid; gap: .5rem; margin-top: .6rem; }
.phone .dial input { padding: .6rem; background: #f3e9d2; color: #241c13; border: 1px solid #b9a67d; font: inherit; }

/* Notizbuch und Pinnwand */
.notes { display: grid; gap: .6rem; }
.note { background: #f3ead2; color: #241c13; padding: .7rem .9rem; border-left: 4px solid var(--brass); line-height: 1.55; }
.note.aha { border-left-color: var(--wine); background: #f6e4d8; }
.note h4 { margin: 0 0 .25rem; font-family: var(--title); font-weight: 400; font-size: 1.05rem; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .9rem; padding: 1rem; background: url("/rabenhof-assets/ui/corkboard.webp") center / cover, #6b4a2a; min-height: 20rem; }
.board .card { background: #f6efdc; color: #241c13; padding: .7rem .8rem; box-shadow: 2px 4px 10px rgba(0, 0, 0, .45); line-height: 1.45; font-size: .95rem; position: relative; transform: rotate(var(--r, 0deg)); }
.board .card::before { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--wine); box-shadow: 0 2px 3px rgba(0, 0, 0, .5); }
.board .card h4 { margin: 0 0 .25rem; font-family: var(--title); font-weight: 400; }
.hints .lvl { margin-bottom: .8rem; padding: .7rem .9rem; border: 1px solid rgba(184, 146, 74, .35); background: rgba(255, 255, 255, .03); line-height: 1.55; }
.settings label { display: grid; grid-template-columns: 9rem 1fr 3rem; gap: .8rem; align-items: center; margin-bottom: .8rem; }

/* Finale */
.finale { position: absolute; inset: 0; z-index: 55; display: grid; place-items: center; text-align: center; padding: 1.5rem; background: #000; opacity: 0; pointer-events: none; transition: opacity 2s; }
.finale.on { opacity: 1; pointer-events: auto; }
.finale h1 { font-family: var(--title); font-weight: 400; letter-spacing: .45em; font-size: clamp(2.4rem, 9vw, 5.4rem); margin: 0; color: #efe6d2; opacity: 0; transition: opacity 3s; }
.finale p { font-style: italic; color: var(--ink-dim); font-size: clamp(1rem, 2.6vw, 1.3rem); opacity: 0; transition: opacity 3s 1.5s; }
.finale.show h1, .finale.show p { opacity: 1; }
.finale .row { margin-top: 2.4rem; display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; opacity: 0; transition: opacity 2s 4s; }
.finale.show .row { opacity: 1; }

@media (max-width: 720px) {
  .book { grid-template-columns: 1fr; }
  .book nav { flex-direction: row; overflow-x: auto; }
  .book nav button { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .book nav button[aria-current="true"] { border-bottom-color: var(--brass); }
  .phone { grid-template-columns: 1fr; }
  .phone img { max-width: 9rem; justify-self: center; }
  .paper.newspaper { columns: 1; }
  .settings label { grid-template-columns: 1fr; }
  .spot .lbl { display: none; }
}
@media (orientation: portrait) and (max-width: 720px) {
  /* Hochformat: Szene in voller Höhe, waagerecht verschiebbar, statt eines winzigen Bildes */
  .office-wrap { place-items: stretch; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
  .office { height: 100%; width: auto; max-height: none; }
}
@media (prefers-reduced-motion: reduce) { .spot.ringing { animation: none; } .hint-ring { animation: none; } }
.map-area { cursor: pointer; }
.docs-list.attached { margin-bottom: 1rem; }
.bar .btn.ringing-bar { border-color: var(--focus); box-shadow: 0 0 14px rgba(242, 196, 109, .6); animation: pulse-bar 1s infinite alternate; }
@keyframes pulse-bar { from { background: rgba(184, 146, 74, .12); } to { background: rgba(242, 196, 109, .35); } }
.toast { top: auto; bottom: 8.5rem; }
.sheet .body h4 { font-family: var(--title); font-weight: 400; margin: .8rem 0 .4rem; color: var(--ink-dim); }

/* ---------- Oberfläche wie im Hauptspiel (rabenhof.css) ---------- */
html, body { background: var(--rh-bg); color: var(--rh-text); font: 15px/1.5 var(--rh-sans); }
.pre-office-img { background-image: url("img/office.webp"); }
.pre-lampglow { position: absolute; left: 9%; top: 36%; width: 32%; height: 52%; z-index: 1; pointer-events: none; background: radial-gradient(circle at 50% 42%, rgba(255, 200, 120, .2), transparent 65%); mix-blend-mode: screen; transition: opacity .4s; }
.pre-lamp-off .rh-scene-img { filter: brightness(.5) saturate(.8); }
.pre-lamp-off .pre-lampglow { opacity: 0; }
.rh-hot.pre-ringing { border-color: rgba(233, 199, 132, .9); background: rgba(233, 199, 132, .1); box-shadow: 0 0 30px rgba(233, 199, 132, .55); animation: pre-ring .16s infinite alternate; }
.rh-hot.pre-ringing .rh-hot-label { opacity: 1; }
@keyframes pre-ring { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }
.rh-btn.pre-ringing-btn { border-color: var(--rh-brass); animation: pre-pulse .9s infinite alternate; }
@keyframes pre-pulse { from { box-shadow: 0 0 0 rgba(201, 164, 106, 0); } to { box-shadow: 0 0 18px rgba(201, 164, 106, .8); } }
.rh-btn.pre-new::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rh-brass); box-shadow: 0 0 8px var(--rh-brass); }
.rh-stage .subs { left: 50%; bottom: 18px; z-index: 9; }
.subs .line { font-family: var(--rh-serif); background: rgba(10, 8, 12, .88); border: 1px solid var(--rh-line); border-radius: 10px; color: var(--rh-text); }
.subs .who { color: var(--rh-brass); font-family: var(--rh-serif); letter-spacing: 0; }
.rh-stage .choices { bottom: 18px; z-index: 10; }
.choices .rh-btn { justify-content: flex-start; white-space: normal; text-align: left; font-family: var(--rh-serif); font-size: 16px; background: linear-gradient(180deg, #2a2028f2, #1a141cf2); }
.rh-toast { transition: opacity .5s; }
.rh-toast.pre-out { opacity: 0; }
.rh-toast b { color: #e9c784; font-weight: 600; }
.rh-inv { gap: 14px; }
.pre-inv-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0; min-width: 0; }
.pre-doc-slot { --rh-slot: 72px; width: 118px; display: flex; flex-direction: column; justify-content: flex-end; text-align: left; padding: 18px 8px 6px; background: linear-gradient(180deg, #ece0c2, #d8c79e); color: #2b2117; border-color: #a08050; }
.pre-doc-slot .rh-slot-n { color: #6b5330; }
.pre-doc-t { font-family: var(--rh-serif); font-size: 12px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.pre-k-newspaper { background: linear-gradient(180deg, #e6e2d8, #c9c3b4); }
.pre-k-telegram { background: linear-gradient(180deg, #efe2b0, #dcc98a); }
.pre-k-record { background: linear-gradient(180deg, #e9ecf2, #d0d6e2); }
.pre-sheet-title { font-size: 22px; padding-right: 48px; color: var(--rh-text); }
.pre-sheet .body { margin-top: 8px; }
.pre-sheet .body h4 { font-family: var(--rh-serif); font-weight: 400; margin: .8rem 0 .4rem; color: var(--rh-muted); }
.pre-sheet .look { color: var(--rh-muted); font-family: var(--rh-serif); font-size: 16px; line-height: 1.55; }
.pre-sheet .tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 4px 0 10px; border-bottom: 1px solid var(--rh-line); }
.pre-sheet .tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: .45rem .8rem; cursor: pointer; color: var(--rh-muted); }
.pre-sheet .tabs button[aria-selected="true"] { color: var(--rh-text); border-bottom-color: var(--rh-brass); }
.pre-sheet .docs-list button { border-color: var(--rh-line); border-radius: 8px; background: linear-gradient(180deg, #2a2028, #1a141c); }
.pre-closeup { display: flex; gap: 18px; align-items: center; margin-bottom: 12px; }
.pre-closeup img { width: 150px; height: 150px; flex: none; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .6)); }
.pre-closeup.small img { width: 110px; height: 110px; }
.pre-closeup > :not(img) { flex: 1; }
.board { background: url("img/pinboard.webp") center / cover, #6b4a2a; border-radius: 10px; }
.pre-title { background: linear-gradient(180deg, rgba(5, 4, 8, .25), rgba(5, 4, 8, .82)), url("img/title.webp") center / cover; }
.pre-title h1 { font-family: var(--rh-serif); color: #efe6d2; text-shadow: 0 4px 30px #000; }
.pre-title .lead, .pre-title .sub { color: #d9ccb2; text-shadow: 0 2px 12px #000; }
.finale { background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .8)), url("img/finale.webp") center / cover; }
.finale h1 { font-family: var(--rh-serif); text-shadow: 0 4px 30px #000; }
.pre-title .rh-btn, .finale .rh-btn { font-size: 16px; padding: 10px 20px; text-decoration: none; color: var(--rh-text); }
.phone img { max-width: 220px; }
@media (max-width: 960px) { .pre-game .rh-top .rh-progress { display: none; } }
.pre-title .note { background: none; border: 0; box-shadow: none; color: #b9ad94; text-shadow: 0 2px 10px #000; }
.pre-closeup img, .phone img { border-radius: 12px; border: 1px solid var(--rh-line); }
/* Karte: füllt das Fenster, Papier, Wasser, Wald und Schrift wie gedruckt */
.pre-sheet.rh-wide .body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pre-sheet.rh-wide .mapbox { flex: 1; height: auto; min-height: 320px; border: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px #8a7550, 0 10px 30px rgba(0, 0, 0, .5); background: #cdbb8f; }
.pre-sheet .mapinfo { min-height: 3rem; font-family: var(--rh-serif); font-size: 16px; color: var(--rh-text); }
.pre-sheet .maprow { margin-top: .3rem; }
.map-grid { stroke: #8a7550; stroke-width: .5; opacity: .25; }
.map-lake { fill: url(#pm-water); stroke: #48656e; stroke-width: 1.6; }
.map-lake:hover { fill: #a9c6cd; }
.map-lake-shore { fill: none; stroke: #9fbcc4; stroke-width: 7; opacity: .55; }
.map-frame { fill: none; stroke: #4a3826; stroke-width: 4; pointer-events: none; }
.map-frame.thin { stroke-width: 1; }
.map-line-strasse { stroke: #8a4f2a; stroke-width: 2.6; stroke-linecap: round; }
.map-line-bahn { stroke: #1e1a16; stroke-width: 3.4; stroke-dasharray: 12 6; }
.map-line-fluss { stroke: #5d8592; stroke-width: 3; stroke-linecap: round; }
.map-town { fill: #3a1e14; stroke: #f0e4c4; stroke-width: 1.5; }
.map-spot { fill: #f6ecd2; stroke: #3a2a1a; }
.map-label { font-family: var(--rh-serif); font-size: 16px; fill: #2a1d12; paint-order: stroke; stroke: rgba(232, 220, 184, .9); stroke-width: 3.5px; stroke-linejoin: round; }
.map-label.small { font-size: 12.5px; }
.map-label.lake { fill: #23424c; font-size: 15px; letter-spacing: .06em; stroke: rgba(160, 188, 196, .8); }
.board .card, .notes .note { appearance: none; border: 0; text-align: left; font: inherit; cursor: pointer; }
.notes .note { display: block; width: 100%; }
/* Fotografie und Zahlenschloss */
.pre-photo { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: 20px; align-items: center; }
.pre-photo-img { position: relative; }
.pre-photo-img img { width: 100%; border-radius: 12px; border: 1px solid var(--rh-line); display: block; }
.pre-photo-hand { position: absolute; left: 12%; top: 55%; width: 50%; transform: rotate(-14deg); color: #3a2a6a; font-family: "Segoe Script", "Bradley Hand", "Brush Script MT", cursive; font-size: clamp(12px, 1.6vw, 17px); line-height: 1.35; text-align: center; text-shadow: 0 0 1px rgba(58, 42, 106, .4); }
.pre-photo-hand p { margin: 0 0 .2em; }
.pre-photo-hand .big { font-size: 1.35em; margin: .2em 0; }
.pre-photo-hand .small { font-size: .85em; color: #555; margin-top: .6em; }
.pre-wheels { display: flex; gap: 10px; margin: 12px 0; }
.pre-wheel { display: grid; justify-items: center; gap: 4px; padding: 6px; border-radius: 10px; background: linear-gradient(180deg, #3a2e1e, #1d160e); border: 1px solid var(--rh-brass-dim); }
.pre-wheel button { width: 40px; height: 30px; border-radius: 6px; border: 1px solid var(--rh-line); background: #241b12; color: var(--rh-brass); cursor: pointer; }
.pre-wheel-n { font: 600 28px/1.1 var(--rh-serif); color: #f3e2b8; min-width: 40px; text-align: center; padding: 4px 0; background: #0f0b07; border-radius: 6px; }
@media (max-width: 700px) { .pre-photo { grid-template-columns: 1fr; } }
/* ---------- Mechanische Schatulle ---------- */
.cb-box { position: relative; width: min(100%, 860px); aspect-ratio: 1024 / 585; margin: 6px auto 10px; background: #3a2312 url("/rabenhof-assets/puzzles/puzzle_box/img/wood.webp") center / 142% 128%; border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .6), inset 0 0 0 2px #7a5a24; user-select: none; touch-action: none; }
.cb-part { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; touch-action: none; }
.cb-part:focus-visible { outline: 2px solid var(--rh-brass); outline-offset: 3px; border-radius: 8px; }
.cb-part img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.cb-rail { position: absolute; left: 10%; width: 40%; height: 12%; border-radius: 8px; background: linear-gradient(180deg, #1b120a, #3a2614); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .8); cursor: pointer; }
.cb-rail-a { top: 10%; }
.cb-rail-b { top: 29%; width: 51%; }
.cb-notch { position: absolute; top: 100%; width: 2px; height: 7px; background: #c9a46a; opacity: .7; }
.cb-notch.n0 { left: 9%; } .cb-notch.n1 { left: 50%; } .cb-notch.n2 { left: 91%; }
.cb-bar { position: absolute; top: 30%; height: 40%; left: 0; border-radius: 4px; background: linear-gradient(180deg, #e2c27a, #8a6428); box-shadow: 0 1px 2px #000; transition: width .35s cubic-bezier(.3, 1.4, .5, 1); width: 9%; }
.cb-knob { top: -30%; width: 22%; height: 160%; left: 0; transition: left .35s cubic-bezier(.3, 1.4, .5, 1); }
.cb-box[data-a="1"] .cb-a, .cb-box[data-b="1"] .cb-b { left: 39%; } .cb-box[data-a="2"] .cb-a, .cb-box[data-b="2"] .cb-b { left: 78%; }
.cb-box[data-a="1"] .cb-bar-a, .cb-box[data-b="1"] .cb-bar-b { width: 50%; } .cb-box[data-a="2"] .cb-bar-a, .cb-box[data-b="2"] .cb-bar-b { width: 90%; }
.cb-gear { position: absolute; left: 60%; top: 8%; width: 30%; opacity: .55; transition: transform .5s ease-out; pointer-events: none; filter: brightness(.7); }
.cb-disc { left: 63%; top: 14%; width: 24%; aspect-ratio: 1; border-radius: 50%; }
.cb-disc-notch { position: absolute; left: 50%; top: 2%; width: 9%; height: 16%; margin-left: -4.5%; background: #1b120a; border-radius: 0 0 40% 40%; box-shadow: inset 0 2px 3px #000; transform-origin: 50% 300%; transition: transform .5s ease-out; pointer-events: none; }
.cb-disc .cb-disc-notch { transform-origin: 50% 300%; }
.cb-turn { width: 7%; aspect-ratio: 1; top: 34%; border-radius: 50%; color: #f3e2b8; font-size: clamp(16px, 2.6vw, 26px); background: radial-gradient(circle, #5a4020, #2a1c0c); box-shadow: 0 2px 4px #000; }
.cb-turn-l { left: 56%; } .cb-turn-r { left: 88%; }
.cb-lever { left: 73%; top: 64%; width: 6%; height: 22%; }
.cb-lever-arm { position: absolute; left: 35%; top: 0; width: 30%; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #8a6428, #e2c27a, #8a6428); box-shadow: 0 2px 4px #000; transform-origin: 50% 90%; transform: rotate(-35deg); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.cb-lever-arm::after { content: ""; position: absolute; left: -40%; top: -8%; width: 180%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f3dc9a, #8a6428); }
.cb-box[data-c="1"] .cb-lever-arm { transform: rotate(0deg); }
.cb-pin { left: 22%; top: 66%; width: 11%; aspect-ratio: 1; }
.cb-pin:active img { transform: scale(.9); }
.cb-window { position: absolute; border-radius: 6px; background: #0c0805; box-shadow: inset 0 0 0 2px #b48a3e, inset 0 3px 8px #000; overflow: hidden; }
.cb-win-pin { left: 36%; top: 68%; width: 9%; height: 14%; }
.cb-win-stift { position: absolute; left: 40%; top: 15%; width: 20%; height: 70%; border-radius: 3px; background: linear-gradient(90deg, #8a6428, #f3dc9a, #8a6428); }
.cb-win-cover { position: absolute; left: -100%; top: 35%; width: 100%; height: 30%; background: linear-gradient(180deg, #e2c27a, #8a6428); transition: left .35s; }
.cb-box:not([data-b="0"]) .cb-win-cover { left: 0; width: 120%; }
.cb-win-latch { left: 48%; top: 68%; width: 9%; height: 14%; }
.cb-win-hook { position: absolute; left: 15%; top: 42%; width: 70%; height: 16%; border-radius: 3px; background: #9b2424; box-shadow: 0 0 6px rgba(199, 58, 58, .7); transition: transform .4s, background .4s; }
.cb-box[data-l="1"] .cb-win-hook { transform: translateY(-160%) rotate(-25deg); background: #6fa36f; box-shadow: 0 0 6px rgba(111, 163, 111, .7); }
.cb-lid { right: 3%; bottom: 6%; width: 16%; aspect-ratio: 720 / 480; display: grid; place-items: center; }
.cb-lid img { position: absolute; inset: 0; }
.cb-lid span { position: relative; font-family: var(--rh-serif); color: #3a2a12; font-size: clamp(11px, 1.5vw, 15px); }
.cb-jolt { animation: cb-jolt .28s; } .cb-jolt-r { animation: cb-jolt-r .28s; } .cb-jolt-l { animation: cb-jolt-l .28s; }
@keyframes cb-jolt { 25% { translate: 0 -2px; } 50% { translate: 2px 1px; } 75% { translate: -2px 0; } }
@keyframes cb-jolt-r { 40% { translate: 6px 0; } 70% { translate: -1px 0; } }
@keyframes cb-jolt-l { 40% { translate: -6px 0; } 70% { translate: 1px 0; } }
.cb-opening { animation: cb-open 1.4s ease-in forwards; }
@keyframes cb-open { 20% { transform: translateY(-2px); } 60% { transform: translateY(-8px) rotateX(18deg); filter: brightness(1.2); } 100% { transform: translateY(-20px) rotateX(55deg); opacity: .2; } }
.cb-forcing { animation: cb-force 1.8s ease-in forwards; }
@keyframes cb-force { 10%, 30%, 50% { transform: translateX(-5px) rotate(-.6deg); } 20%, 40%, 60% { transform: translateX(5px) rotate(.6deg); } 80% { transform: translateY(-6px); } 100% { transform: translateY(-20px) rotateX(55deg); opacity: .2; } }
.cb-help { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cb-help .rh-goal { flex-basis: 100%; margin: 0; }
.cb-inside { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr); gap: 20px; align-items: start; }
.cb-relief-wrap { border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 3px #7a5a24, 0 12px 30px rgba(0, 0, 0, .6); background: #2a1c0c; }
.cb-relief { display: block; width: 100%; height: auto; }
.cb-tunnel { fill: none; stroke: #2a1806; stroke-width: 2.6; filter: drop-shadow(0 0 2px #fff2c8); stroke-dasharray: 4 3; opacity: 0; transition: opacity 1.2s .3s; }
.cb-revealed .cb-tunnel { opacity: 1; animation: cb-dash 2s linear infinite; }
@keyframes cb-dash { to { stroke-dashoffset: -14; } }
.cb-cover { pointer-events: none; }
.cb-engraving { position: relative; margin: 14px 0; display: grid; place-items: center; aspect-ratio: 720 / 300; }
.cb-engraving img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.cb-engraving span { position: relative; font-family: var(--rh-serif); font-style: italic; color: #3a2a12; text-align: center; padding: 0 12%; font-size: 17px; text-shadow: 0 1px 0 rgba(255, 240, 200, .6); }
.cb-inside .rh-btn { margin: 6px 6px 0 0; }
@media (max-width: 760px) { .cb-inside { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .cb-part img, .cb-knob, .cb-bar, .cb-gear, .cb-lever-arm { transition: none; } .cb-jolt, .cb-jolt-r, .cb-jolt-l { animation: none; } }

/* Lesbarkeit der Mechanik: freie Teile schimmern, das sperrende Teil leuchtet kurz rot */
.cb-part.cb-free img, .cb-part.cb-free .cb-lever-arm { filter: drop-shadow(0 0 6px rgba(242, 210, 140, .75)); }
.cb-blocker { box-shadow: 0 0 0 3px rgba(199, 58, 58, .9), 0 0 22px rgba(199, 58, 58, .8) !important; border-radius: 10px; }
.cb-part.cb-blocker img { filter: drop-shadow(0 0 10px rgba(220, 60, 60, .95)) !important; }

/* Inventar mit Bildern wie im Hauptspiel */
.pre-slot { --rh-slot: 76px; display: grid; grid-template-rows: 1fr auto; padding: 6px 4px 3px; }
.pre-slot img { width: 100%; height: 100%; min-height: 0; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6)); }
.pre-slot-t { font-size: 10.5px; color: var(--rh-muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre-slot:hover .pre-slot-t { color: var(--rh-text); }

/* Schatulle mit gemaltem Deckel (casket_top.webp, 2032 x 1168) */
.cb-box { aspect-ratio: 2032 / 1168; background: #2a170b url("img/casket_top.webp") center / 100% 100%; box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }
.cb-rail { left: 15.5%; width: 48%; height: 9%; background: transparent; box-shadow: none; }
.cb-rail-a { top: 25.8%; width: 48%; }
.cb-rail-b { top: 55.5%; width: 48%; }
.cb-notch { display: none; }
.cb-bar { top: 38%; height: 24%; background: linear-gradient(180deg, #f0d48c, #9a7030); border-radius: 3px; }
.cb-knob { top: -70%; width: 16%; height: 240%; }
.cb-box[data-a="1"] .cb-a, .cb-box[data-b="1"] .cb-b { left: 42%; } .cb-box[data-b="2"] .cb-b { left: 84%; }
.cb-box[data-a="2"] .cb-a { left: 84%; }
.cb-gear { display: none; }
.cb-disc { left: 71.5%; top: 16.5%; width: 17%; }
.cb-disc-notch { display: none; }
.cb-turn { top: 24%; width: 6%; }
.cb-turn-l { left: 64%; } .cb-turn-r { left: 89.5%; }
.cb-lever { left: 76.9%; top: 54%; width: 6.2%; height: 25%; }
.cb-lever-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 85%; transform: rotate(-30deg); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.cb-box[data-c="1"] .cb-lever-img { transform: rotate(0deg) translateY(6%); }
.cb-pin { left: 27.4%; top: 78.6%; width: 7.6%; }
.cb-win-pin { left: 45.4%; top: 79.5%; width: 6.6%; height: 11.6%; background: rgba(8, 5, 3, .75); box-shadow: inset 0 3px 8px #000; }
.cb-win-latch { left: 61.6%; top: 79.5%; width: 6.6%; height: 11.6%; background: rgba(8, 5, 3, .75); box-shadow: inset 0 3px 8px #000; }
.cb-lid { right: 2.5%; bottom: 3%; width: 13%; }

/* Gemaltes Relief: gravierte Linie leuchtet nach dem Schieber auf */
.cb-relief .cb-tunnel { stroke: #fff0c0; stroke-width: .55; stroke-dasharray: 1.2 .9; filter: drop-shadow(0 0 .8px #ffd27a) drop-shadow(0 0 2px #ffb84a); }
.cb-relief .cb-tunnel-end { fill: #fff0c0; opacity: 0; transition: opacity 1.2s .6s; filter: drop-shadow(0 0 2px #ffb84a); }
.cb-revealed .cb-tunnel-end { opacity: 1; }
.cb-revealed .cb-tunnel { animation: cb-dash2 1.6s linear infinite; }
@keyframes cb-dash2 { to { stroke-dashoffset: -4.2; } }
/* Scheibe und Klinke genau in Fassung und Schlitz des gemalten Deckels */
.cb-disc { left: 71.7%; top: 19.6%; width: 16.5%; }
.cb-turn { top: 28.8%; }
.cb-turn-l { left: 64.6%; } .cb-turn-r { left: 89.4%; }
.cb-lever { left: 77.4%; top: 57%; width: 6.4%; height: 22%; }
.cb-lever-img { transform-origin: 24% 78%; transform: rotate(-20deg); }
.cb-box[data-c="1"] .cb-lever-img { transform: rotate(25deg); }
/* Klinke senkrecht im Schlitz: unten = frei, oben = in die Kerbe der Scheibe eingerastet */
.cb-lever { left: 77.6%; top: 56%; width: 6.4%; height: 22%; overflow: visible; }
.cb-lever-img { transform-origin: 24% 78%; transform: translateY(22%) rotate(-45deg); }
.cb-box[data-c="1"] .cb-lever-img { transform: translateY(-14%) rotate(-45deg); }
.cb-lever { left: 78.5%; }
/* Pinnwand wie im Hauptspiel (rh-board aus rabenhof.css), Korkwand aus dem Hauptspiel */
.pre-board-wrap { min-height: 0; flex: 1; }
.pre-board-world { background: url("/rabenhof-assets/ui/corkboard.webp") center / cover, #6b4a2a; }
.pre-board .rh-pin { width: 170px; }
.pre-board .rh-pin b { display: block; font-size: 13.5px; margin-top: 2px; }
.pre-pin-text { font-size: 11.5px; line-height: 1.3; color: #4a3a28; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pre-pin-clue { background: #fff6c8; }
.pre-board .rh-pin img { height: 54px; }
.pre-mini-dot { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a7a, #9b2424); flex: none; }
.pre-board-docs { margin-bottom: 8px; }
.pre-board-docs summary { cursor: pointer; color: var(--rh-muted); }
@media (max-width: 800px) { .pre-board-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .pre-board-wrap .rh-board-list { max-height: 140px; border-right: 0; } .pre-board .rh-pin { width: 120px; } }
.pre-photo-hand { display: none !important; }
/* ---------- Fernsprechbuch als Buch ---------- */
.pb-search { position: relative; max-width: 520px; margin: 0 0 10px; }
.pb-search input { width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--rh-line); background: #1f1820; color: var(--rh-text); font: inherit; }
.pb-results { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; display: grid; gap: 2px; background: var(--rh-panel-solid); border-radius: 8px; box-shadow: var(--rh-shadow); }
.pb-hit { text-align: left; padding: 8px 12px; border: 0; background: none; color: var(--rh-text); cursor: pointer; border-bottom: 1px solid var(--rh-line); }
.pb-hit:hover { background: #2a2028; }
.pb-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 120px; gap: 8px; align-items: center; }
.pb-prev, .pb-next { height: 64px; border-radius: 10px; border: 1px solid var(--rh-line); background: linear-gradient(180deg, #2a2028, #1a141c); color: var(--rh-brass); font-size: 34px; cursor: pointer; }
.pb-prev:disabled, .pb-next:disabled { opacity: .3; cursor: default; }
.pb-book { position: relative; height: min(100%, 640px); min-height: 380px; display: grid; grid-template-columns: 1fr 1fr; perspective: 2200px; background: #3a2412; border-radius: 6px 12px 12px 6px; padding: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, .7), inset 0 0 0 3px #5a3a1e; touch-action: pan-y; }
.pb-page { position: relative; overflow: hidden; padding: 18px 22px 16px; color: #241c13; background: linear-gradient(90deg, rgba(0, 0, 0, .06), transparent 12%), url("img/paper.webp") center / cover, #ece0c4; box-shadow: inset 0 0 40px rgba(110, 80, 30, .3); font-family: Georgia, "Times New Roman", serif; }
.pb-left { border-radius: 4px 0 0 4px; background: linear-gradient(270deg, rgba(0, 0, 0, .18), transparent 14%), url("img/paper.webp") center / cover, #ece0c4; }
.pb-right { border-radius: 0 4px 4px 0; background: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 14%), url("img/paper.webp") center / cover, #ece0c4; }
.pb-blank { background: url("img/paper.webp") center / cover, #ece0c4; }
.pb-spine { position: absolute; left: 50%; top: 10px; bottom: 10px; width: 2px; margin-left: -1px; background: rgba(60, 40, 20, .45); pointer-events: none; }
.pb-head { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #6b5a40; border-bottom: 1px solid #b9a67d; padding-bottom: 4px; margin-bottom: 8px; }
.pb-town h4 { font-family: Georgia, serif; letter-spacing: .16em; text-transform: uppercase; margin: 2px 0 0; font-size: 17px; text-align: center; }
.pb-amt { font-size: 12px; font-style: italic; color: #6b5a40; text-align: center; border-bottom: 2px double #8a7550; padding-bottom: 5px; margin-bottom: 6px; }
.pb-entry { position: relative; padding: 4px 0 5px; border-bottom: 1px dotted #b9a67d; }
.pb-line { display: flex; align-items: baseline; gap: 4px; font-size: 14px; }
.pb-nm { font-weight: 700; }
.pb-dots { flex: 1; border-bottom: 1px dotted #8a7550; transform: translateY(-3px); }
.pb-nr { font-family: "Courier New", monospace; font-weight: 700; }
.pb-sub { font-size: 12px; color: #4d3f2c; padding-right: 70px; }
.pb-call { position: absolute; right: 0; bottom: 4px; border: 1px solid #8a7550; background: rgba(255, 250, 235, .6); padding: 1px 7px; font-size: 11.5px; cursor: pointer; color: #3a2d1e; border-radius: 3px; }
.pb-call:hover { background: #fff6dc; }
.pb-title { text-align: center; padding-top: 18%; }
.pb-title h3 { font-family: Georgia, serif; letter-spacing: .12em; text-transform: uppercase; font-size: 22px; margin: 8px 0; }
.pb-title p { margin: 6px 0; } .pb-small { font-size: 12px; color: #6b5a40; font-style: italic; } .pb-empty { text-align: center; margin-top: 40%; }
.pb-eagle { font-size: 42px; color: #5a4630; }
.pb-title .docs-list { margin-top: 24px; text-align: left; }
.pb-title .docs-list button { background: rgba(255, 250, 235, .55); color: #2a2219; border: 1px solid #8a7550; }
.pb-title .docs-list .k { color: #6b5a40; }
.pb-tabs { display: flex; flex-direction: column; gap: 3px; align-self: stretch; justify-content: center; }
.pb-tab { text-align: left; padding: 5px 10px; border: 1px solid #8a7550; border-left: 0; border-radius: 0 8px 8px 0; background: linear-gradient(90deg, #d9c9a2, #efe2c2); color: #3a2d1e; font: 12.5px Georgia, serif; cursor: pointer; transition: transform .15s; }
.pb-tab:hover, .pb-tab.on { transform: translateX(6px); background: linear-gradient(90deg, #c9a46a, #efd9a2); }
.pb-leaf { position: absolute; top: 10px; bottom: 10px; width: calc(50% - 10px); z-index: 4; transform-style: preserve-3d; pointer-events: none; }
.pb-leaf > .pb-page { position: absolute; inset: 0; backface-visibility: hidden; }
.pb-leaf-fwd { right: 10px; transform-origin: left center; animation: pb-fwd .34s ease-in forwards; }
.pb-leaf-back { left: 10px; transform-origin: right center; animation: pb-back .34s ease-in forwards; }
@keyframes pb-fwd { to { transform: rotateY(-178deg); filter: brightness(.7); } }
@keyframes pb-back { to { transform: rotateY(178deg); filter: brightness(.7); } }
@media (max-width: 800px) { .pb-wrap { grid-template-columns: 36px minmax(0, 1fr) 36px; } .pb-tabs { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } .pb-tab { border-radius: 0 0 8px 8px; border: 1px solid #8a7550; border-top: 0; } .pb-book { grid-template-columns: 1fr; } .pb-book .pb-left { display: none; } .pb-spine { display: none; } }
@media (prefers-reduced-motion: reduce) { .pb-leaf { display: none; } }
/* Buchseiten ohne Bildtextur: gleichmäßiges, leicht vergilbtes Papier */
.pb-page, .pb-blank { background: radial-gradient(ellipse at 50% 40%, #f3e8cf 0%, #eadbb8 70%, #dccb9f 100%); }
.pb-left { background: linear-gradient(270deg, rgba(60, 40, 15, .22), transparent 10%), radial-gradient(ellipse at 50% 40%, #f3e8cf 0%, #eadbb8 70%, #dccb9f 100%); }
.pb-right { background: linear-gradient(90deg, rgba(60, 40, 15, .22), transparent 10%), radial-gradient(ellipse at 50% 40%, #f3e8cf 0%, #eadbb8 70%, #dccb9f 100%); }
.pb-town h4, .pb-title h3 { color: #241c13; }
/* ---------- Zeitungsseite 1924 ---------- */
@font-face { font-family: "Fraktur"; src: url("fonts/unifraktur-maguntia.ttf") format("truetype"); font-display: swap; }
.paper.np { background: radial-gradient(ellipse at 40% 30%, #f1ead8 0%, #e6dcc3 75%, #d8cba8 100%); color: #1d1a16; padding: 22px 28px 26px; font-family: Georgia, "Times New Roman", serif; box-shadow: inset 0 0 50px rgba(120, 100, 60, .3), 0 10px 30px rgba(0, 0, 0, .5); max-width: 760px; margin: 0 auto; }
.np-mast { font-family: "Fraktur", Georgia, serif; font-size: clamp(34px, 6vw, 58px); text-align: center; line-height: 1; letter-spacing: .01em; padding-bottom: 6px; border-bottom: 3px double #1d1a16; }
.np-dateline { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 11.5px; padding: 4px 0; border-bottom: 1px solid #1d1a16; margin-bottom: 12px; text-transform: none; }
.np-head { font-family: Georgia, serif; font-weight: 700; font-size: clamp(20px, 3vw, 28px); line-height: 1.15; text-align: center; margin: 4px 0 12px; letter-spacing: 0; }
.np-fig { margin: 0 0 12px; text-align: center; }
.np-fig img { width: 100%; max-height: 300px; object-fit: cover; border: 1px solid #3a342a; filter: contrast(1.05); }
.np-fig figcaption { font-size: 12px; font-style: italic; margin-top: 4px; }
.np-cols { columns: 2; column-gap: 26px; column-rule: 1px solid rgba(29, 26, 22, .45); text-align: justify; hyphens: auto; font-size: 15px; line-height: 1.5; }
.np-cols p { margin: 0 0 .6em; text-indent: 1.2em; }
.np-cols p:first-child { text-indent: 0; }
.np-cols p:first-child::first-letter { font-family: "Fraktur", Georgia, serif; float: left; font-size: 3.1em; line-height: .85; padding: 4px 6px 0 0; }
@media (max-width: 640px) { .np-cols { columns: 1; } }
.paper.newspaper.np { columns: auto; column-count: auto; }
.paper.np h3.np-head { font-family: Georgia, "Times New Roman", serif; font-weight: 700; border-bottom: 0; padding-bottom: 0; color: #1d1a16; }
.pre-sheet:has(.paper.np) { width: min(900px, 100%); }
/* Notizbuch des Hauptspiels: Einträge in Tinte, anklickbar */
.pre-nb .nb-overlay, .nb-overlay.pre-nb { z-index: 60; }
.pre-nb-text { margin: 2px 0 0; color: var(--nb-ink); font: italic 17px/1.55 var(--nb-hand); }
.pre-nb-click { cursor: pointer; }
.pre-nb-click:hover .nb-h { color: var(--nb-red); }
.pre-nb-line { margin: 0 0 8px; color: var(--nb-ink); font: 16px/1.5 var(--nb-hand); }
.pre-nb-line b { color: var(--nb-brown); font-weight: 600; }
.pre-nb-me { margin: 0 0 8px; color: var(--nb-muted); font: italic 15px/1.5 var(--nb-hand); }
.nb-page .docs-list button { background: rgba(255, 250, 235, .5); color: var(--nb-brown); border: 1px solid var(--nb-paper-edge); }
.nb-page .docs-list .k { color: var(--nb-muted); }
.np-cols p.np-small { font-size: 12.5px; line-height: 1.4; text-indent: 0; border-top: 1px solid rgba(29, 26, 22, .4); padding-top: 6px; margin-top: 8px; }
/* Bericht in der Schreibmaschine: endet mitten im Satz, die Schreibmarke blinkt */
.pre-caret { display: inline-block; width: .55em; height: 1.05em; margin-left: .2em; vertical-align: -.15em; background: #2a2219; animation: pre-caret 1s steps(1) infinite; }
@keyframes pre-caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pre-caret { animation: none; } }
/* Handschrift, Schreibmaschine, Durchgestrichenes; Beschreibung steht neben dem Papier */
@font-face { font-family: "Handschrift"; src: url("fonts/caveat.ttf") format("truetype"); font-display: swap; }
.paper.pre-hand { font-family: "Handschrift", "Segoe Script", cursive; font-size: 1.45rem; line-height: 1.45; color: #23305a; }
.paper.pre-hand h3 { font-family: "Handschrift", cursive; font-size: 1.7rem; color: #23305a; }
.paper.pre-hand p + p { margin-top: .5rem; }
.paper.pre-typed { font-family: "Courier New", Courier, monospace; font-size: .98rem; line-height: 1.6; color: #1d1a16; }
.paper.pre-typed h3 { font-family: "Courier New", Courier, monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: .02em; }
.pre-struck { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(35, 48, 90, .75); }
.paper.pre-hand .pre-struck + p { color: #3a2a6a; transform: rotate(-1.5deg); margin-left: 1.2rem; }
.pre-doc-desc { font-style: italic; margin: 0 0 8px; }
.pre-doc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Randnotiz in Bleistift und unterstrichene Zeile */
.paper .pre-pencil { font-family: "Handschrift", "Segoe Script", cursive; font-size: 1.35rem; line-height: 1.3; color: #4a4a52; transform: rotate(-1.2deg); margin: .8rem 0 .2rem 1.4rem; text-indent: 0; }
.paper .pre-underline { text-decoration: underline; text-decoration-color: rgba(70, 70, 80, .75); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pre-caret { display: none !important; }
/* Ende vor dem Tor der Villa */
.finale.fn-gate { background: linear-gradient(180deg, rgba(5, 6, 12, .35) 0%, rgba(5, 6, 12, .55) 45%, rgba(5, 6, 12, .9) 100%), url("img/villa_gate.webp") center 30% / cover; align-items: end; padding-bottom: 6vh; }
.fn-inner { max-width: 820px; margin: 0 auto; }
.fn-over { font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--rh-brass); margin: 0 0 6px; opacity: 1 !important; }
.fn-gate h1 { font-size: clamp(2.6rem, 8vw, 5rem); }
.fn-tag { margin: 4px 0 14px; }
.fn-lead { font-family: var(--rh-serif); font-style: normal !important; color: #e8dcc0 !important; font-size: 17px !important; line-height: 1.6; max-width: 640px; margin: 0 auto 6px !important; text-shadow: 0 2px 10px #000; }
.finale .fn-main { margin-top: 20px; }
.finale .fn-big { font-size: 17px; padding: 13px 22px; min-height: 50px; }
.finale .fn-small { margin-top: 14px; transition-delay: 4.5s; }
.fn-share { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.fn-share[hidden] { display: none; }
.fn-offer { max-width: 640px; margin: 16px auto 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--rh-brass); border-radius: 8px; background: rgba(5, 6, 12, .78); color: #e8dcc0; font-family: var(--rh-serif); }
.fn-offer[hidden] { display: none; }
.fn-offer strong { font-size: 18px; color: #f4e9cf; }
.fn-offer span { font-size: 14px; }
.fn-offer .rh-btn { align-self: center; margin-top: 8px; }
.fn-status { min-height: 1.4em; margin: 8px 0 0 !important; font-size: 14px !important; color: var(--rh-brass) !important; opacity: 1 !important; }
@media (max-width: 640px) { .finale .fn-main { flex-direction: column; align-items: stretch; } .finale.fn-gate { padding-bottom: 3vh; } }
/* Herstellerschild am Kassenschrank (Easter Egg wie im Hauptspiel) */
.pre-maker { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 10px 14px; border-radius: 8px; max-width: 460px; background: linear-gradient(180deg, #d9b56a, #9a7432); color: #2a1c0c; box-shadow: inset 0 1px 0 rgba(255, 245, 210, .6), 0 4px 10px rgba(0, 0, 0, .5); }
.pre-maker img { width: 52px; height: 52px; object-fit: contain; filter: sepia(.4) contrast(1.1); }
.pre-maker b { display: block; font-family: var(--rh-serif); letter-spacing: .2em; font-size: 16px; }
.pre-maker span { display: block; font-size: 12.5px; }
.pre-maker small { display: block; font-size: 11.5px; font-style: italic; opacity: .85; margin-top: 2px; }
/* Blitz nach Entfernung: nah hell, fern nur ein schwaches Flackern */
.pre-scene .rh-flash.rh-on { animation: pre-flash 1.3s ease-out; }
@keyframes pre-flash { 0% { background: rgba(210, 225, 255, 0); } 5% { background: rgba(210, 225, 255, var(--fl, .12)); } 12% { background: rgba(210, 225, 255, calc(var(--fl, .12) * .3)); } 20% { background: rgba(210, 225, 255, calc(var(--fl, .12) * .7)); } 100% { background: rgba(210, 225, 255, 0); } }

/* Links zu Datenschutz und Impressum auf dem Titel und in den Einstellungen */
.pre-legal { margin-top: 18px; font-size: 13px; opacity: .8; }
.pre-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Handy und Tablet: Das Spiel steht wie im Hauptspiel untereinander (rabenhof.css ab 960 px). Die Seite muss dann
   scrollen dürfen, sonst sind Raum, Inventar und Seitenleiste unten abgeschnitten. Gilt auch für niedrige Fenster
   im Querformat. */
@media (max-width: 960px), (max-height: 560px) {
  html:has(body.pre .pre-game), body.pre:has(.pre-game) { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  .pre-root:has(> .pre-game) { position: relative; inset: auto; min-height: 100vh; min-height: 100dvh; }
  body.pre:has(.pre-game) { padding-bottom: var(--pre-foot-h); }
  .pre-game.rh-game { position: static; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .pre-game .rh-top { order: 0; } .pre-game .rh-stage { order: 1; } .pre-game .rh-inv { order: 2; }
  .pre-game .rh-side { order: 3; border-left: 0; border-top: 1px solid var(--rh-line); max-height: none; }
  .pre-game .rh-side-body { overflow: visible; }
}
/* Querformat auf dem Handy: der Raum füllt höchstens die Fensterhöhe, damit man ihn ganz sieht. */
@media (max-height: 560px) and (orientation: landscape) {
  .pre-game .rh-stage { height: 100vh; height: 100dvh; }
}
/* Titel in niedrigen Fenstern: scrollt innerhalb, statt unten abgeschnitten zu sein. */
@media (max-height: 560px) { .pre-title { overflow-y: auto; place-items: start center; } .pre-title .sub { margin-bottom: 1rem; } }
.maphelp { margin-top: .6rem; }
.maphelp:not(:empty) { padding: .7rem .9rem; border: 1px solid rgba(184, 146, 74, .35); background: rgba(255, 255, 255, .03); }
.maphelp .look { margin: 0 0 .6rem; line-height: 1.55; }
.maphelp .look:last-child, .maphelp .rh-btn:last-child { margin-bottom: 0; }
/* Karte: Meldung, Hilfe und Schaltflächen behalten ihre Höhe, die Karte gibt nach (sonst überlappt der Text auf dem Handy) */
.pre-sheet.rh-wide .body > .mapinfo, .pre-sheet.rh-wide .body > .maphelp, .pre-sheet.rh-wide .body > .maprow { flex: none; }
