/* Mord im Rabenhof: gemeinsamer Stil für Spielseite, Testlabor und Zuschauerseite. */
:root {
  --rh-bg: #0b0a10;
  --rh-bg2: #15111a;
  --rh-panel: rgba(21, 16, 23, 0.92);
  --rh-panel-solid: #17121b;
  --rh-line: rgba(176, 141, 87, 0.38);
  --rh-brass: #c9a46a;
  --rh-brass-dim: #a08050; /* 5,0:1 auf --rh-panel-solid (vorher #8c6f45, 3,93:1) */
  --rh-text: #efe6d2;
  --rh-muted: #b4a78f;
  --rh-blood: #9b2424;
  --rh-blood-hi: #c73a3a;
  --rh-cold: #7fa2c9;
  --rh-green: #6fa36f;
  --rh-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --rh-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --rh-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--rh-bg); color: var(--rh-text); font: 15px/1.5 var(--rh-sans); }
body { overflow: hidden; }
body.rh-page-viewer, body.rh-page-lab { overflow: auto; }
button { font: inherit; color: inherit; }
a { color: var(--rh-brass); }
h1, h2, h3, h4 { font-family: var(--rh-serif); font-weight: 600; letter-spacing: 0.01em; margin: 0 0 0.4em; }
.rh-hidden { display: none !important; }
.rh-muted { color: var(--rh-muted); }
.rh-small { font-size: 13px; }

/* Laden */
.rh-loading { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 50% 40%, #1b1520, #07060a 70%); }
.rh-loading p { font-family: var(--rh-serif); font-size: 20px; color: var(--rh-muted); margin-top: 90px; }
.rh-loading-raven { position: absolute; width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--rh-brass-dim); border-top-color: var(--rh-brass); animation: rh-spin 1.2s linear infinite; }
@keyframes rh-spin { to { transform: rotate(360deg); } }

/* Schaltflächen */
.rh-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--rh-line); background: linear-gradient(180deg, #2a2028, #1a141c);
  cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.08s; white-space: nowrap; min-height: 38px; }
.rh-btn:hover { border-color: var(--rh-brass); background: linear-gradient(180deg, #34272f, #1f171f); }
.rh-btn:active { transform: translateY(1px); }
.rh-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.rh-btn.rh-primary { background: linear-gradient(180deg, #7a1d1d, #4e1111); border-color: #b0453f; }
.rh-btn.rh-primary:hover { background: linear-gradient(180deg, #8f2424, #5c1515); }
.rh-btn.rh-gold { background: linear-gradient(180deg, #6b5330, #3e2f1a); border-color: var(--rh-brass); }
.rh-btn.rh-ghost { background: transparent; }
.rh-btn.rh-active { border-color: var(--rh-brass); box-shadow: inset 0 0 0 1px var(--rh-brass); }
.rh-btn img { width: 22px; height: 22px; object-fit: contain; }
.rh-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--rh-line); font-size: 12px; color: var(--rh-muted); }
.rh-input, .rh-select, textarea.rh-input { width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--rh-line); background: #0f0c12; color: var(--rh-text); font: inherit; }
.rh-input:focus, .rh-select:focus { outline: 2px solid var(--rh-brass-dim); outline-offset: 1px; }
label.rh-label { display: block; font-size: 13px; color: var(--rh-muted); margin: 10px 0 4px; }

/* Grundlayout der Spielseite */
.rh-game { position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: 1fr 380px; grid-template-areas: 'top top' 'stage side' 'inv side'; }
/* Passen nicht alle Schaltflächen in eine Zeile, bricht die Kopfleiste um, statt „Finale einleiten“ über den Rand zu schieben */
.rh-top { grid-area: top; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 56px; padding: 6px 14px; background: linear-gradient(180deg, #1b151d, #120e14); border-bottom: 1px solid var(--rh-line); }
.rh-brand { font-family: var(--rh-serif); font-size: 19px; color: var(--rh-brass); white-space: nowrap; }
.rh-brand small { display: block; font-size: 12px; color: var(--rh-muted); font-family: var(--rh-sans); }
.rh-top-spacer { flex: 1; }
.rh-clock { font-variant-numeric: tabular-nums; font-family: var(--rh-serif); font-size: 18px; min-width: 120px; text-align: center; }
.rh-clock small { display: block; font: 11px var(--rh-sans); color: var(--rh-muted); }
.rh-progress { width: 150px; }
.rh-progress-bar { height: 6px; border-radius: 3px; background: #2a2128; overflow: hidden; }
.rh-progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--rh-brass-dim), var(--rh-brass)); transition: width 0.6s; }
.rh-progress small { font-size: 11px; color: var(--rh-muted); }
/* Freie Ermittlung: Fortschritt als Schaltfläche zum Fallstatus */
.rh-progress-btn { width: auto; min-width: 150px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rh-progress-btn small { white-space: nowrap; }
.rh-progress-btn:focus-visible { outline: 2px solid var(--rh-brass); outline-offset: 3px; }
.rh-case-status h3 { margin: 14px 0 4px; font-size: 16px; }
.rh-case-next { color: var(--rh-text); }

.rh-stage { grid-area: stage; position: relative; overflow: hidden; background: #000; display: grid; place-items: center; }
/* Szene: Größe setzt scene.js (einpassen ohne Beschnitt), Seitenverhältnis immer 1920 × 1104 */
.rh-scene { position: relative; width: 100%; aspect-ratio: 1920 / 1104; overflow: hidden; flex: none; }
/* Weltebene: alles, was im Raum steht, teilt diese eine Transformation */
.rh-world { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform 0.45s ease-out, opacity 0.5s; will-change: transform; }
.rh-world[data-focus="1"] { transition: transform 0.7s cubic-bezier(.2, .8, .2, 1); }
.rh-scene-img { position: absolute; inset: 0; background-size: 100% 100%; background-repeat: no-repeat; transition: filter 0.6s; }
.rh-scene.rh-entering .rh-world { opacity: 0; transform: scale(1.1) !important; }
/* Reihenfolge in der Weltebene: geöffnete Möbel, Figuren (2), Klickflächen (3), Fundstücke (4), sprechende Figur (5) */
.rh-hotlayer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.rh-hotlayer > * { pointer-events: auto; }
.rh-hud { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.rh-hud > * { pointer-events: auto; }
.rh-hud > .rh-room-title { pointer-events: none; }
.rh-scene-rain, .rh-scene-vignette, .rh-flash { z-index: 7; }
.rh-dark { z-index: 7; }
/* Debug-Ansicht für Admins (Taste D): Anker, Klickflächen, Szenengrenzen */
.rh-debug-layer { position: absolute; inset: 0; z-index: 9; pointer-events: none; }
.rh-dbg { position: absolute; border: 2px solid #3cf; background: rgba(60, 200, 255, 0.08); }
.rh-dbg span { position: absolute; left: 0; top: 0; padding: 1px 5px; background: rgba(0, 30, 50, 0.85); color: #bff; font: 11px/1.3 monospace; white-space: nowrap; }
.rh-dbg-open { border: 2px dashed #ffd23c; background: rgba(255, 210, 60, 0.06); }
.rh-dbg-open span { top: auto; bottom: 0; color: #ffe9a8; background: rgba(50, 40, 0, 0.85); }
.rh-dbg-body { border-color: #ff5a5a; }
.rh-dbg-spot { position: absolute; width: 0; border-left: 2px dotted #7f7; transform: translateY(-100%); }
.rh-dbg-spot::after { content: ''; position: absolute; left: -9px; bottom: -3px; width: 16px; height: 6px; border-radius: 50%; background: #7f7; }
.rh-dbg-spot span { position: absolute; left: 6px; top: 0; color: #cfc; font: 11px monospace; background: rgba(0, 40, 0, 0.8); padding: 1px 4px; white-space: nowrap; }
.rh-dbg-bounds { position: absolute; inset: 0; outline: 3px solid #f0f; outline-offset: -3px; }
.rh-debug .rh-hot { outline: 1px solid rgba(60, 200, 255, 0.9); }
.rh-debug-info { position: absolute; right: 10px; top: 10px; z-index: 9; padding: 6px 10px; border-radius: 8px; background: rgba(0, 20, 30, 0.88); color: #bff; font: 12px/1.4 monospace; pointer-events: none; white-space: pre; }
.rh-scene-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%); }
.rh-scene-rain { position: absolute; inset: 0; pointer-events: none; opacity: 0.25; background-image: linear-gradient(105deg, transparent 0 48%, rgba(180, 200, 255, 0.25) 49%, transparent 50%);
  background-size: 22px 90px; animation: rh-rain 0.5s linear infinite; mix-blend-mode: screen; }
.rh-scene.rh-indoor .rh-scene-rain { opacity: 0.06; }
@keyframes rh-rain { to { background-position: -30px 90px; } }
.rh-flash { position: absolute; inset: 0; pointer-events: none; background: rgba(210, 225, 255, 0); }
.rh-flash.rh-on { animation: rh-flash 1.4s ease-out; }
/* Rückfall ohne atmo.js: nur sanftes Aufhellen, nie ein greller Vollbildblitz (Lichtempfindlichkeit) */
@keyframes rh-flash { 0% { background: rgba(210, 225, 255, 0); } 6% { background: rgba(210, 225, 255, 0.1); } 14% { background: rgba(210, 225, 255, 0.03); } 22% { background: rgba(210, 225, 255, 0.07); } 100% { background: rgba(210, 225, 255, 0); } }
/* Lebendige Räume (atmo.js): zwei Canvas-Ebenen in der Weltebene, nehmen nie Klicks an */
.rh-atmo-cv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rh-atmo-front { z-index: 3; }
/* Räume mit eigener Beschreibung: der alte Bildschirmregen entfällt, Regen kommt aus den Tiefenschichten */
.rh-atmo-managed .rh-scene-rain { display: none; }
.rh-dark { position: absolute; inset: 0; pointer-events: none; background: rgba(0, 0, 4, 0); transition: background 0.4s; }
.rh-dark.rh-on { background: rgba(0, 0, 4, 0.86); }
.rh-hot { position: absolute; padding: 0; margin: 0; appearance: none; background: transparent; border-radius: 10px; cursor: pointer; border: 2px solid transparent; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.rh-hot:hover, .rh-hot:focus-visible { border-color: rgba(233, 199, 132, 0.85); background: rgba(233, 199, 132, 0.08); box-shadow: 0 0 22px rgba(233, 199, 132, 0.35); outline: none; }
.rh-hot-label { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 3px 9px; border-radius: 6px; background: rgba(10, 8, 12, 0.88); border: 1px solid var(--rh-line);
  font-size: 13px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.rh-hot:hover .rh-hot-label, .rh-hot:focus-visible .rh-hot-label, .rh-show-hot .rh-hot .rh-hot-label { opacity: 1; }
.rh-show-hot .rh-hot { border-color: rgba(233, 199, 132, 0.45); }
.rh-hot.rh-searched::after { content: ''; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--rh-green); box-shadow: 0 0 6px var(--rh-green); }
.rh-hot.rh-has-item::before { content: ''; position: absolute; top: 6px; left: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--rh-brass); animation: rh-pulse 1.4s infinite; }
@keyframes rh-pulse { 50% { box-shadow: 0 0 0 7px rgba(201, 164, 106, 0); } 0% { box-shadow: 0 0 0 0 rgba(201, 164, 106, 0.7); } }
.rh-body-sprite { position: absolute; padding: 0; border: 0; background-color: transparent; appearance: none; background-size: contain; background-repeat: no-repeat; background-position: center bottom; cursor: pointer; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.7)); }
.rh-body-sprite:hover { filter: drop-shadow(0 0 14px rgba(199, 58, 58, 0.8)); }
.rh-doors { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; z-index: 7; pointer-events: none; }
.rh-door { pointer-events: auto; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--rh-line); background: rgba(12, 9, 14, 0.82); cursor: pointer; font-size: 14px; backdrop-filter: blur(4px); }
.rh-door:hover { border-color: var(--rh-brass); }
.rh-door.rh-locked { color: var(--rh-muted); border-style: dashed; }
.rh-door.rh-new::after { content: ' neu'; color: var(--rh-brass); font-size: 11px; }
html[lang='en'] .rh-door.rh-new::after { content: ' new'; }
.rh-npcs { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 7; pointer-events: none; max-height: calc(100% - 80px); overflow: auto; }
.rh-npc { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1px solid var(--rh-line); background: rgba(12, 9, 14, 0.86); cursor: pointer; min-width: 190px; text-align: left; }
.rh-npc:hover { border-color: var(--rh-brass); }
.rh-npc img { width: 46px; height: 58px; object-fit: cover; object-position: top; border-radius: 8px; }
.rh-npc b { display: block; font-family: var(--rh-serif); font-size: 15px; }
.rh-npc span { font-size: 12px; color: var(--rh-muted); }
.rh-room-title { position: absolute; left: 14px; top: 12px; z-index: 7; padding: 8px 14px; border-radius: 10px; background: rgba(10, 8, 12, 0.78); border: 1px solid var(--rh-line); }
.rh-room-title h2 { margin: 0; font-size: 22px; }
.rh-room-title small { color: var(--rh-muted); }

.rh-side { grid-area: side; display: flex; flex-direction: column; min-height: 0; background: var(--rh-panel-solid); border-left: 1px solid var(--rh-line); }
.rh-side-tabs { display: flex; border-bottom: 1px solid var(--rh-line); }
.rh-side-tabs button { flex: 1; padding: 10px 6px; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; color: var(--rh-muted); font-size: 13px; }
.rh-side-tabs button.rh-active { color: var(--rh-text); border-bottom-color: var(--rh-brass); }
.rh-side-body { flex: 1; overflow: auto; padding: 14px; min-height: 0; }
.rh-msg { padding: 12px 14px; border-radius: 10px; background: #1f1820; border: 1px solid var(--rh-line); margin-bottom: 12px; font-family: var(--rh-serif); font-size: 16px; line-height: 1.55; }
.rh-msg.rh-fail { border-color: #6b3434; }
.rh-found { display: grid; gap: 8px; margin: 10px 0; }
.rh-found-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--rh-line); border-radius: 10px; background: #1a141c; }
.rh-found-item img { width: 44px; height: 44px; object-fit: contain; }
.rh-found-item b { flex: 1; font-weight: 500; }
.rh-log-entry { font-size: 13px; padding: 7px 0; border-bottom: 1px dashed rgba(176, 141, 87, 0.18); }
.rh-log-entry.rh-event { color: #e9c784; }
.rh-log-entry.rh-discovery { color: #a8c9a8; }
.rh-log-entry time { color: var(--rh-muted); margin-right: 6px; font-variant-numeric: tabular-nums; }

/* Verhör */
.rh-talk-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.rh-talk-head img { width: 96px; height: 124px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--rh-line); transition: filter 0.3s; }
.rh-talk-head img.rh-nervous { filter: saturate(0.8) contrast(1.1); animation: rh-shake 0.35s 2; }
@keyframes rh-shake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.rh-talk-head h3 { margin: 0; }
.rh-meter { height: 5px; border-radius: 3px; background: #2a2128; margin-top: 6px; overflow: hidden; }
.rh-meter span { display: block; height: 100%; background: linear-gradient(90deg, #8a6f3f, var(--rh-blood-hi)); }
.rh-topics { display: grid; gap: 6px; margin: 10px 0; }
/* Living World: Wartehinweis und persönliche Themen im Gesprächsfenster */
.rh-world-wait { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: rgba(201, 163, 91, 0.12); border: 1px solid rgba(201, 163, 91, 0.35); }
.rh-personal-head { margin-top: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.rh-topics.rh-personal .rh-btn { text-align: left; white-space: normal; line-height: 1.35; }
.rh-topics .rh-btn { justify-content: flex-start; white-space: normal; text-align: left; }
.rh-quote { margin: 8px 0; padding: 10px 12px; border-left: 3px solid var(--rh-brass-dim); background: #1c161e; border-radius: 0 8px 8px 0; font-family: var(--rh-serif); font-size: 15.5px; }
.rh-quote.rh-q { border-left-color: var(--rh-cold); font-family: var(--rh-sans); font-size: 13px; color: var(--rh-muted); }

/* Inventar */
.rh-inv { grid-area: inv; display: flex; align-items: center; gap: 10px; padding: 8px 14px; min-height: 92px; min-width: 0; background: linear-gradient(0deg, #17121a, #120e14); border-top: 1px solid var(--rh-line); overflow: hidden; }
.rh-inv-label { font-family: var(--rh-serif); color: var(--rh-brass); font-size: 14px; writing-mode: vertical-rl; transform: rotate(180deg); }
.rh-slot { position: relative; flex: 0 0 auto; width: var(--rh-slot, 72px); height: var(--rh-slot, 72px); border-radius: 12px; border: 1px solid var(--rh-line); background: radial-gradient(circle at 50% 35%, #2a2128, #151017); cursor: pointer; padding: 6px; }
.rh-slot:hover, .rh-slot.rh-armed { border-color: var(--rh-brass); box-shadow: 0 0 14px rgba(201, 164, 106, 0.35); }
.rh-slot img { width: 100%; height: 100%; object-fit: contain; }
.rh-slot .rh-slot-n { position: absolute; top: 3px; left: 6px; font-size: 11px; color: var(--rh-muted); }
.rh-slot.rh-pending::after { content: '?'; position: absolute; right: 5px; top: 2px; color: var(--rh-brass); font-weight: 700; }
.rh-armed-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 7; padding: 8px 14px; border-radius: 999px; background: rgba(60, 40, 20, 0.92); border: 1px solid var(--rh-brass); }

/* Modale Fenster */
.rh-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(4, 3, 6, 0.72); backdrop-filter: blur(3px); padding: 16px; }
/* Großer Dialog (Pinnwand): kein Weichzeichner, dafür dunkler; Szene darunter ruht */
.rh-modal.rh-modal-wide { backdrop-filter: none; background: rgba(4, 3, 6, 0.86); }
.rh-modal-open .rh-scene *, .rh-modal-open .rh-scene { animation-play-state: paused !important; }
.rh-modal-box { width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--rh-panel-solid); border: 1px solid var(--rh-line); border-radius: 16px; box-shadow: var(--rh-shadow); padding: 22px 24px; position: relative; }
.rh-modal-box.rh-wide { width: min(1500px, 100%); height: calc(100vh - 32px); display: flex; flex-direction: column; }
.rh-modal-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rh-line); background: #1f1820; cursor: pointer; font-size: 20px; line-height: 1; }
.rh-ev-head { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.rh-ev-head img { width: 96px; height: 96px; object-fit: contain; }
.rh-paper { background: linear-gradient(180deg, #efe3c4, #e2d2ab); color: #2b2117; border-radius: 6px; padding: 16px 18px; font-family: var(--rh-serif); font-size: 16.5px; line-height: 1.6; box-shadow: inset 0 0 40px rgba(120, 90, 40, 0.25); }
.rh-paper.rh-detail { margin-top: 10px; background: linear-gradient(180deg, #e9ecf2, #d8dde8); }
.rh-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rh-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Pinnwand */
.rh-board-wrap { flex: 1; display: grid; grid-template-columns: 260px 1fr; gap: 12px; min-height: 0; }
.rh-board-list { overflow: auto; border-right: 1px solid var(--rh-line); padding-right: 10px; }
.rh-board-list .rh-card-mini { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 8px; border: 1px solid transparent; cursor: grab; }
.rh-board-list .rh-card-mini:hover { border-color: var(--rh-line); background: #1d171f; }
.rh-board-list img { width: 36px; height: 36px; object-fit: contain; }
.rh-board-right { display: flex; flex-direction: column; min-height: 0; gap: 6px; }
.rh-board-toolrow { flex-wrap: wrap; gap: 6px; }
.rh-board-toolrow .rh-select { max-width: 190px; }
.rh-board-toolrow .rh-btn:disabled { opacity: 0.4; cursor: default; }
.rh-board-sep { width: 1px; align-self: stretch; background: var(--rh-line); margin: 0 4px; }
.rh-board-info { line-height: 1.35; }
/* Pinnwand: Ansichtsfenster mit einer zoombaren Ebene für Karten und Fäden */
.rh-board { position: relative; flex: 1; border-radius: 12px; overflow: hidden; background: #1b1410; min-height: 0; touch-action: none; cursor: grab; user-select: none; }
.rh-board-world { position: absolute; inset: 0; transform-origin: 0 0; background-size: cover; background-position: center; }
.rh-board-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.rh-board-cards { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.rh-board-cards > * { pointer-events: auto; }
.rh-link { stroke: #c62b2b; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: round; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)); }
.rh-link.rh-kind-contradiction { stroke: #ff5a4a; stroke-width: 4; stroke-dasharray: 10 6; }
.rh-link.rh-kind-suspect { stroke: #c070ff; }
.rh-link.rh-sel { stroke: #ffd36b; stroke-width: 6; }
.rh-link-temp { stroke-dasharray: 6 5; opacity: 0.9; }
.rh-link-hit { stroke: transparent; stroke-width: 16; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: pointer; }
.rh-pin { position: absolute; width: 150px; transform: translate(-50%, -50%); background: #f2e8cf; color: #2b2117; border-radius: 4px; padding: 8px 8px 6px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  cursor: grab; user-select: none; touch-action: none; font-family: var(--rh-serif); font-size: 13px; line-height: 1.3; }
/* Der rote Pin ist der Griff für Fäden */
.rh-pin-knob { position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a7a, #9b2424); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); cursor: crosshair; z-index: 2; touch-action: none; }
.rh-pin-knob:hover { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(255, 120, 100, 0.35), 0 2px 3px rgba(0, 0, 0, 0.5); }
.rh-pin.rh-dragging { cursor: grabbing; z-index: 10; box-shadow: 0 18px 30px rgba(0, 0, 0, 0.6); }
.rh-pin.rh-target { outline: 3px dashed #ff8a7a; outline-offset: 3px; }
.rh-pin img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
.rh-board-list .rh-card-mini.rh-pinned { opacity: 0.7; }
.rh-pin img { width: 100%; height: 76px; object-fit: contain; display: block; }
.rh-pin.rh-pin-person img { object-fit: cover; object-position: top; height: 90px; border-radius: 3px; }
.rh-pin.rh-note { background: #fff6a8; }
.rh-pin.rh-sel { outline: 3px solid #e6b85c; }
.rh-pin.rh-mark-important { box-shadow: 0 0 0 3px #e6b85c, 0 8px 18px rgba(0, 0, 0, 0.45); }
.rh-pin.rh-mark-contradiction { box-shadow: 0 0 0 3px #c73a3a, 0 8px 18px rgba(0, 0, 0, 0.45); }
.rh-pin.rh-mark-cleared { opacity: 0.55; }
.rh-pin.rh-mark-suspect { box-shadow: 0 0 0 3px #b04ad0, 0 8px 18px rgba(0, 0, 0, 0.45); }
.rh-board-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rh-timeline { overflow: auto; }
.rh-tl { display: grid; grid-template-columns: 170px repeat(var(--rh-cols), minmax(64px, 1fr)); font-size: 12px; border: 1px solid var(--rh-line); border-radius: 10px; overflow: hidden; }
.rh-tl > div { padding: 6px; border-bottom: 1px solid rgba(176, 141, 87, 0.15); border-right: 1px solid rgba(176, 141, 87, 0.08); min-height: 34px; }
.rh-tl .rh-tl-h { background: #221b24; color: var(--rh-muted); font-weight: 600; }
.rh-tl .rh-tl-claim { background: rgba(127, 162, 201, 0.15); }
.rh-tl .rh-tl-fact { background: rgba(111, 163, 111, 0.22); }
.rh-tl .rh-tl-witness { background: rgba(201, 164, 106, 0.18); }
.rh-tl .rh-tl-conflict { background: rgba(199, 58, 58, 0.35); }
.rh-tl .rh-tl-window { box-shadow: inset 0 0 0 2px rgba(201, 164, 106, 0.6); }

/* Karte */
.rh-map { display: grid; gap: 14px; }
.rh-map-floor h3 { font-size: 16px; color: var(--rh-brass); }
.rh-map-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rh-map-room { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--rh-line); font-size: 13px; background: #1a141c; }
.rh-map-room.rh-visited { background: #261d23; }
.rh-map-room.rh-current { border-color: var(--rh-brass); box-shadow: inset 0 0 0 1px var(--rh-brass); }
.rh-map-room.rh-unknown { opacity: 0.45; }

/* Personen */
.rh-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rh-person { border: 1px solid var(--rh-line); border-radius: 12px; overflow: hidden; background: #1a141c; }
.rh-person img { width: 100%; height: 220px; object-fit: cover; object-position: top; display: block; }
.rh-person div { padding: 10px 12px; }
.rh-person.rh-absent { opacity: 0.5; }

/* Ermittlungszentrale */
.rh-poll-opt { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; margin: 6px 0; }
.rh-bar { height: 8px; border-radius: 4px; background: #2a2128; overflow: hidden; }
.rh-poll-opt .rh-bar { grid-column: 2 / 4; }
.rh-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--rh-brass-dim), var(--rh-brass)); transition: width 0.4s; }
.rh-baro-row { display: grid; grid-template-columns: 120px 1fr 36px; gap: 8px; align-items: center; font-size: 13px; margin: 5px 0; }

/* Finale und Auflösung */
.rh-finale { text-align: center; }
.rh-finale-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.rh-suspect-pick { border: 2px solid var(--rh-line); border-radius: 12px; background: #1a141c; cursor: pointer; padding: 6px; }
.rh-suspect-pick img { width: 100%; height: 150px; object-fit: cover; object-position: top; border-radius: 8px; }
.rh-suspect-pick.rh-sel { border-color: var(--rh-blood-hi); box-shadow: 0 0 18px rgba(199, 58, 58, 0.5); }
.rh-reveal { position: fixed; inset: 0; z-index: 60; background: #050407; }
.rh-reveal-stage { position: absolute; inset: 0 0 76px 0; }
.rh-reveal-scene { max-width: 900px; animation: rh-fadeup 0.9s ease-out; }
.rh-reveal-scene time { display: block; font-family: var(--rh-serif); color: var(--rh-brass); font-size: 22px; margin-bottom: 10px; }
.rh-reveal-scene p { font-family: var(--rh-serif); font-size: 26px; line-height: 1.5; }
.rh-reveal-scene img.rh-reveal-face { width: 260px; height: 330px; object-fit: cover; object-position: top; border-radius: 16px; border: 2px solid var(--rh-blood-hi); box-shadow: 0 0 60px rgba(199, 58, 58, 0.5); }
.rh-reveal-scene img.rh-reveal-icon { width: 150px; height: 150px; object-fit: contain; }
.rh-reveal-nav { position: fixed; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 10px; z-index: 61; }
@keyframes rh-fadeup { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.rh-score { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; }
.rh-score-box { border: 1px solid var(--rh-line); border-radius: 14px; padding: 16px; background: #17121a; }
.rh-score-box h3 { color: var(--rh-brass); }
.rh-big { font-family: var(--rh-serif); font-size: 44px; color: var(--rh-text); }
.rh-ok { color: #8fd18f; }
.rh-no { color: #ff8a7a; }

/* Start */
.rh-start { position: fixed; inset: 0; overflow: auto; background: #050407 center / cover; display: grid; place-items: center; padding: 24px; }
.rh-start::before { content: ''; position: fixed; inset: 0; background: linear-gradient(90deg, rgba(5, 4, 7, 0.92), rgba(5, 4, 7, 0.55) 60%, rgba(5, 4, 7, 0.3)); }
.rh-start-box { position: relative; width: min(1100px, 100%); }
.rh-start h1 { font-size: clamp(36px, 6vw, 70px); color: var(--rh-brass); text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8); line-height: 1.05; margin-bottom: 4px; }
.rh-start .rh-tagline { font-family: var(--rh-serif); font-size: 22px; color: var(--rh-text); margin-bottom: 26px; }
.rh-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; max-width: 820px; }
.rh-mode { text-align: left; padding: 16px; border-radius: 14px; border: 1px solid var(--rh-line); background: rgba(20, 15, 22, 0.88); cursor: pointer; }
.rh-mode:hover, .rh-mode.rh-sel { border-color: var(--rh-brass); }
.rh-mode b { display: block; font-family: var(--rh-serif); font-size: 20px; color: var(--rh-brass); }
.rh-badge-admin { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #5a1515; border: 1px solid #b0453f; font-size: 11px; letter-spacing: 0.08em; vertical-align: middle; }

/* Meldungen */
.rh-toasts { position: fixed; left: 50%; top: 66px; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(640px, calc(100% - 32px)); pointer-events: none; }
.rh-toast { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--rh-brass); background: rgba(30, 22, 18, 0.96); box-shadow: var(--rh-shadow); font-family: var(--rh-serif); font-size: 16px; animation: rh-fadeup 0.4s ease-out; }
.rh-toast.rh-event { border-color: #e9c784; }

/* Zuschauerseite (mobil zuerst) */
.rh-viewer { max-width: 760px; margin: 0 auto; padding: 16px 16px 90px; }
.rh-viewer-hero { border-radius: 16px; overflow: hidden; position: relative; aspect-ratio: 16 / 9; background: #000 center / cover; margin-bottom: 14px; border: 1px solid var(--rh-line); }
.rh-viewer-hero.rh-viewer-live { aspect-ratio: 1920 / 1104; display: grid; place-items: center; }
.rh-viewer-hero.rh-viewer-live > .rh-scene { position: absolute; left: 0; top: 0; right: auto; bottom: auto; padding: 0; background: #000; line-height: normal; }
.rh-viewer-hero-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 9; padding: 10px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); }
.rh-viewer-live .fx-figure .fx-name { opacity: 1; font-size: 11px; }
.rh-viewer-contra { color: #ff9a8a; }
.rh-viewer-hero > div { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; line-height: 1.25; background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent); }
.rh-section { border: 1px solid var(--rh-line); border-radius: 14px; background: var(--rh-panel-solid); padding: 14px; margin-bottom: 14px; }
.rh-section h2 { font-size: 19px; color: var(--rh-brass); }
.rh-ev-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px dashed rgba(176, 141, 87, 0.2); }
.rh-ev-row img { width: 52px; height: 52px; object-fit: contain; }
.rh-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.rh-pill { padding: 9px 12px; border-radius: 999px; border: 1px solid var(--rh-line); background: #1a141c; cursor: pointer; min-height: 40px; }
.rh-pill.rh-sel { border-color: var(--rh-blood-hi); background: #2a1416; }
.rh-sticky { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(12, 9, 14, 0.96); border-top: 1px solid var(--rh-line); display: flex; gap: 8px; justify-content: center; }

/* Testlabor */
.rh-lab { padding: 18px; max-width: 1500px; margin: 0 auto; }
.rh-lab-stage { position: relative; width: 100%; height: 74vh; display: grid; place-items: center; background: #000; border-radius: 12px; overflow: hidden; }
.rh-lab pre { background: #0f0c12; border: 1px solid var(--rh-line); border-radius: 10px; padding: 12px; overflow: auto; max-height: 520px; font-size: 12px; }
.rh-lab table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rh-lab td, .rh-lab th { border-bottom: 1px solid rgba(176, 141, 87, 0.2); padding: 6px 8px; text-align: left; vertical-align: top; }

@media (max-width: 1280px) {
  .rh-game { grid-template-columns: 1fr 330px; }
}
@media (max-width: 960px) {
  body { overflow: auto; }
  .rh-game { position: static; display: flex; flex-direction: column; min-height: 100vh; }
  .rh-top { flex-wrap: wrap; padding: 8px 12px; height: auto; }
  .rh-side { border-left: 0; border-top: 1px solid var(--rh-line); max-height: none; }
  .rh-top { order: 0; }
  .rh-stage { order: 1; }
  .rh-inv { order: 2; }
  .rh-side { order: 3; }
  .rh-modes, .rh-score, .rh-grid2 { grid-template-columns: 1fr; }
  .rh-board-wrap { grid-template-columns: 1fr; }
  .rh-npcs { position: static; flex-direction: row; flex-wrap: wrap; padding: 8px; }
  /* Türen in einer Zeile, waagerecht scrollbar: in Räumen mit vielen Türen deckten sie sonst Figuren und Sprechblase zu */
  .rh-doors { left: 6px; right: 6px; bottom: 6px; flex-wrap: nowrap; justify-content: flex-start; gap: 6px; overflow-x: auto; pointer-events: auto; scrollbar-width: none; }
  .rh-doors::-webkit-scrollbar { display: none; }
  .rh-door { flex: 0 0 auto; padding: 5px 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .rh-scene-rain, .rh-flash.rh-on, .rh-hot.rh-has-item::before { animation: none; }
  .rh-scene-img { transition: none; }
}

/* Zielzeile, Tipp und Hingehen über die Karte */
.rh-goal { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: rgba(201, 164, 106, 0.1); border: 1px solid var(--rh-line); }
.rh-hint-btn { border-color: rgba(233, 199, 132, 0.6); }
button.rh-map-go { cursor: pointer; font: inherit; color: inherit; text-align: left; }
button.rh-map-go:hover { border-color: var(--rh-brass); background: rgba(201, 164, 106, 0.15); }

/* Ziehen aus dem Inventar: kombinieren, vorlegen, benutzen */
.rh-slot { touch-action: none; position: relative; }
.rh-slot img { -webkit-user-drag: none; pointer-events: none; }
.rh-slot-torn { position: absolute; right: 3px; bottom: 2px; padding: 0 5px; border-radius: 999px; background: #c9a46a; color: #1a1210; font: 700 12px/16px Georgia, serif; }
.rh-drag-ghost { position: fixed; z-index: 200; width: 64px; height: 64px; object-fit: contain; pointer-events: none; transform: translate(-50%, -50%) scale(1.1); filter: drop-shadow(0 0 14px rgba(255, 214, 140, 0.95)); }
.rh-inv-dragging .rh-slot, .rh-inv-dragging .fx-figure img, .rh-inv-dragging .rh-hot { transition: box-shadow 0.15s, border-color 0.15s, filter 0.15s; }
.rh-inv-dragging .rh-hot { border-color: rgba(233, 199, 132, 0.35); }
.rh-drop-target.rh-slot, .rh-drop-target.rh-hot { border-color: #ffd36b !important; box-shadow: 0 0 0 3px rgba(255, 211, 107, 0.55), 0 0 22px rgba(255, 211, 107, 0.6); }
.rh-drop-target.fx-figure img { filter: drop-shadow(0 0 22px rgba(255, 211, 107, 0.95)) brightness(1.1); }
.rh-inv-help { margin: 0 0 0 10px; flex: 0 1 340px; min-width: 200px; line-height: 1.3; }

/* Inventar mit vielen Hinweisen: Plätze brechen in Zeilen um und werden kleiner (Größe setzt
   layoutInv in game.js), erst danach wird der Platzbereich blätterbar. Nichts liegt außerhalb. */
.rh-inv-track { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: var(--rh-inv-gap, 10px); padding: 4px;
  max-height: var(--rh-inv-max, none); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--rh-brass-dim) transparent; }
.rh-inv-sep { flex: 0 0 1px; width: 1px; height: calc(var(--rh-slot, 72px) - 12px); background: var(--rh-line); }
.rh-inv-compact .rh-inv-help { display: none; }
.rh-inv-nav { display: none; flex: 0 0 auto; flex-direction: column; gap: 6px; }
.rh-inv-scrolls .rh-inv-nav { display: flex; }
.rh-inv-more { min-width: 56px; min-height: 44px; padding: 4px 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rh-inv-more:disabled { opacity: 0.35; cursor: default; }
.rh-inv-dragging .rh-inv-scrolls .rh-inv-more:not(:disabled) { border-color: #ffd36b; box-shadow: 0 0 12px rgba(255, 211, 107, 0.45); }
.rh-slot:focus-visible { outline: 2px solid #ffd36b; outline-offset: 2px; }
/* Hinweis beim Überfahren eines Inventarfachs: gut lesbar, nimmt keine Klicks an */
.rh-tip { position: fixed; z-index: 90; max-width: min(360px, calc(100vw - 16px)); padding: 9px 12px; border-radius: 8px; border: 1px solid var(--rh-line);
  background: rgba(16, 12, 10, 0.96); color: #f3e9d6; font-size: 15px; line-height: 1.4; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
.rh-inv-small .rh-slot-n { font-size: 10px; top: 1px; left: 4px; }
.rh-inv-small .rh-slot-torn { font-size: 11px; line-height: 14px; padding: 0 4px; }

/* Einführung zum Mitmachen */
.rh-tut { position: fixed; left: 18px; top: 172px; z-index: 60; width: min(420px, calc(100vw - 36px)); padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(40, 30, 22, .97), rgba(20, 14, 12, .97)); border: 1px solid #e9c784; box-shadow: 0 18px 50px rgba(0, 0, 0, .7); animation: rh-tut-in .4s ease-out; }
.rh-tut small { color: #e9c784; letter-spacing: .05em; text-transform: uppercase; font-size: 11px; }
.rh-tut p { margin: 6px 0 10px; font: 16px/1.45 Georgia, serif; }
/* Das Fenster liegt über der Szene: Klicks gehen hindurch, nur die Schaltflächen nehmen sie an */
.rh-tut { pointer-events: none; }
.rh-tut button { pointer-events: auto; }
@keyframes rh-tut-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rh-tut-glow { box-shadow: 0 0 0 3px rgba(233, 199, 132, .9), 0 0 26px rgba(233, 199, 132, .7) !important; border-radius: 12px; animation: rh-tut-pulse 1.4s ease-in-out infinite; }
@keyframes rh-tut-pulse { 50% { box-shadow: 0 0 0 6px rgba(233, 199, 132, .25), 0 0 30px rgba(233, 199, 132, .4); } }
.rh-tut-hot .rh-hot { border-color: rgba(233, 199, 132, .75); animation: rh-tut-pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .rh-tut-glow, .rh-tut-hot .rh-hot { animation: none; } }

/* Twitch-Anmeldung auf der Ermittlungsseite: Name, Abmelden und Meldungen nach der Rückkehr */
.rh-whoami { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.rh-linkbtn { background: none; border: 0; padding: 4px 0; color: var(--rh-brass); font: inherit; text-decoration: underline; cursor: pointer; min-height: 32px; }
.rh-toast.rh-good { border-color: var(--rh-green); }
.rh-toast.rh-bad { border-color: var(--rh-blood-hi); }

/* Sprache: kleine Leiste zum Überspringen und Wiederholen, Tonmenü */
.rh-speech { position: fixed; left: 50%; bottom: 112px; transform: translateX(-50%); z-index: 55; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border-radius: 999px;
  background: rgba(18, 13, 20, .92); border: 1px solid rgba(233, 199, 132, .55); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); font-size: 13px; }
.rh-speech-who { color: #e9c784; margin-right: 4px; }
.rh-sound-row { justify-content: space-between; gap: 14px; margin: 8px 0; }
.rh-sound-row input[type=range] { width: 220px; }

/* Zusammenfassung vor der Anklage */
.rh-accuse-confirm { margin-top: 16px; padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(199, 58, 58, .7); background: rgba(40, 14, 16, .6); text-align: center; }
.rh-accuse-confirm h3 { margin: 0 0 6px; font-family: Georgia, serif; color: #e9c784; }
.rh-accuse-sentence { font: 18px/1.45 Georgia, serif; margin: 4px 0 8px; }
/* Zuschauer: Kurz zum Mitkommen */
.rh-catchup summary { cursor: pointer; font-family: Georgia, serif; font-size: 17px; color: #e9c784; min-height: 44px; display: flex; align-items: center; }
.rh-catchup p { margin: 8px 0; }
/* Abmelden auf der Zuschauerseite: Fläche für den Finger mindestens 44 px hoch */
.rh-linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }

/* Testlabor: Living World */
.rh-lw-graph { width: 100%; max-width: 640px; height: auto; background: rgba(255, 255, 255, 0.03); border-radius: 12px; }
.rh-lw-node { fill: #2a221c; stroke: #c9a35b; stroke-width: 2; }
.rh-lw-label { fill: currentColor; font-size: 15px; }
.rh-lw-topic { margin: 10px 0; padding: 8px 10px; border-left: 3px solid rgba(201, 163, 91, 0.5); }
.rh-lw-q { margin-bottom: 4px; }
.rh-lw-scroll { max-width: 100%; overflow-x: auto; }
.rh-totop { position: sticky; bottom: 0; display: block; width: 100%; margin-top: 10px; backdrop-filter: blur(4px); }

/* Ermittlerchat der privaten Partie (party-chat.js, nur spiel.der-rabenhof.de) */
.pc { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font: 14px/1.45 var(--rh-sans); }
.pc-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; min-height: 44px; border-radius: 999px; border: 1px solid var(--rh-brass-dim);
  background: linear-gradient(180deg, #2c2129, #1a141c); color: var(--rh-text); box-shadow: var(--rh-shadow); cursor: pointer; font-family: var(--rh-serif); font-size: 15px; }
.pc-toggle:hover, .pc-toggle:focus-visible { border-color: var(--rh-brass); }
.pc-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--rh-blood-hi); color: #fff; font: 700 12px/22px var(--rh-sans); text-align: center; }
.pc-open .pc-toggle { display: none; }
.pc-panel { width: 360px; max-width: calc(100vw - 32px); height: min(520px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--rh-panel-solid);
  border: 1px solid var(--rh-line); border-radius: 12px; box-shadow: var(--rh-shadow); overflow: hidden; }
.pc-panel[hidden] { display: none; }
.pc-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--rh-line); font-family: var(--rh-serif); font-size: 16px; color: var(--rh-brass); }
.pc-close { width: 36px; height: 36px; border: 0; background: none; color: var(--rh-muted); font-size: 24px; cursor: pointer; border-radius: 6px; }
.pc-close:hover { color: var(--rh-text); background: rgba(255, 255, 255, 0.06); }
.pc-status { margin: 0; padding: 6px 12px; background: rgba(155, 36, 36, 0.25); color: var(--rh-text); font-size: 13px; }
.pc-log { list-style: none; margin: 0; padding: 10px 12px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.pc-msg { display: flex; gap: 8px; align-items: flex-start; }
.pc-sys { color: var(--rh-muted); font-style: italic; font-size: 13px; text-align: center; }
.pc-ava { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: #2a2028; border: 1px solid var(--rh-line); object-fit: cover; }
.pc-ava-x { display: grid; place-items: center; font: 700 14px/1 var(--rh-serif); color: var(--rh-brass); }
.pc-body { min-width: 0; flex: 1; }
.pc-who { display: flex; gap: 6px; align-items: baseline; font-size: 13px; color: var(--rh-brass); }
.pc-tag { font-size: 11px; color: var(--rh-muted); border: 1px solid var(--rh-line); border-radius: 4px; padding: 0 4px; }
.pc-text { word-wrap: break-word; overflow-wrap: anywhere; }
.pc-mine .pc-who b { color: var(--rh-cold); }
.pc-muted { color: var(--rh-muted); font-style: italic; }
.pc-ev { margin: 4px 0; padding: 8px 10px; border-left: 3px solid var(--rh-brass); background: rgba(201, 164, 106, 0.08); border-radius: 0 6px 6px 0; display: flex; flex-direction: column; gap: 2px; }
.pc-ev-k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rh-muted); }
.pc-ev-t { font-size: 13px; color: var(--rh-text); }
.pc-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.pc-link { border: 0; background: none; padding: 4px 0; color: var(--rh-muted); font-size: 12px; cursor: pointer; text-decoration: underline; min-height: 28px; }
.pc-link:hover { color: var(--rh-text); }
.pc-report { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; }
.pc-sel { font-size: 12px; background: #111; color: var(--rh-text); border: 1px solid var(--rh-line); border-radius: 4px; }
.pc-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rh-line); }
.pc-input { flex: 1; min-width: 0; min-height: 42px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--rh-line); background: #0f0c12; color: var(--rh-text); font: inherit; font-size: 16px; }
.pc-send { min-height: 42px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--rh-brass-dim); background: linear-gradient(180deg, #3a2a1f, #24190f); color: var(--rh-text); cursor: pointer; }
.pc-note { margin: 0; padding: 0 12px 10px; font-size: 11px; color: var(--rh-muted); }
.rh-share { margin-top: 6px; }
@media (max-width: 700px) {
  .pc { right: 12px; bottom: 12px; left: auto; }
  .pc-open { left: 0; right: 0; bottom: 0; }
  .pc-panel { width: 100vw; max-width: 100vw; height: 70vh; border-radius: 14px 14px 0 0; }
  body.pc-chat-open { padding-bottom: 70vh; }
}

/* Gemeinsame Live-Ermittlung im Ermittlungsbuch der privaten Partie */
.rh-platform .rh-viewer { max-width: 900px; }
.rh-ev-btns { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.rh-investigators .rh-mate-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rh-mate-list { display: flex; flex-wrap: wrap; gap: 10px; }
.rh-mate { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--rh-line); border-radius: 999px; background: rgba(255, 255, 255, 0.03); opacity: 0.6; }
.rh-mate.rh-online { opacity: 1; border-color: var(--rh-brass-dim); }
.rh-mate.rh-me { border-color: var(--rh-cold); }
.rh-mate-ava { width: 40px; height: 40px; border-radius: 50%; background: #2a2028; object-fit: cover; }
.rh-mate-name { font-size: 13px; }
.rh-live-talk { border-color: var(--rh-cold); }
.rh-live-talk h2 { color: var(--rh-cold); }
.rh-talk-row { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rh-line); }
.rh-talk-row img { width: 56px; height: 56px; object-fit: cover; object-position: top; border-radius: 8px; }
.rh-talk-row p { margin: 4px 0 0; }
.rh-viewer-mine { color: var(--rh-cold); }

/* Finale: Auswahl als Liste auf kleinen Bildschirmen, deutliche Markierung der Wahl */
.rh-lineup-list { display: none; }
.fx-line-fig.fx-picked span { background: var(--rh-blood); color: #fff; }
@media (max-width: 700px) {
  .rh-finale .fx-salon { pointer-events: none; max-height: 34vh; }
  .rh-finale .fx-salon .fx-line-fig span { display: none; }
  .rh-lineup-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 4px; }
  .rh-lineup-item { display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 6px 6px; min-width: 0; border-radius: 10px; border: 1px solid var(--rh-line); background: #1a141c; text-align: left; cursor: pointer; }
  .rh-lineup-item img { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 6px; object-fit: cover; object-position: top; }
  /* Nachnamen wie „Hinterdobler“ nicht mitten im Wort trennen: nur umbrechen, wenn ein Wort allein nicht passt */
  .rh-lineup-item span { min-width: 0; font-size: 13px; line-height: 1.2; overflow-wrap: break-word; word-break: normal; }
  .rh-lineup-item.rh-sel { border-color: var(--rh-blood-hi); background: rgba(155, 36, 36, 0.35); box-shadow: 0 0 0 2px var(--rh-blood-hi) inset; }
  .rh-picked { font-weight: 600; color: var(--rh-text); }
}
.rh-reveal-stage.rh-viewer-reveal { position: relative; inset: auto; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 1px solid var(--rh-line); }

/* Smartphone: Einblendungen unten (nicht über Karten und Dialogen), Raumschild kompakt, Hinweisblasen lesbar */
@media (max-width: 700px) {
  .rh-toasts { top: auto; bottom: 74px; }
  .rh-room-title { left: 8px; top: 8px; padding: 4px 10px; }
  .rh-room-title h2 { font-size: 16px; }
  .rh-room-title small { font-size: 11px; }
  .fx-puff { z-index: 8; background: rgba(10, 8, 12, .95); font-size: 13px; }
  .fx-puff-note { max-width: 72vw; }
}

/* Smartphone: Enthüllung mit umbrechender Leiste, Chat als kleine runde Schaltfläche, Namen in der Aufstellung nur auf großen Bildschirmen */
@media (max-width: 700px) {
  .rh-reveal-stage { inset: 0 0 128px 0; }
  .rh-reveal-nav { bottom: 8px; left: 8px; right: 68px; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
  .rh-reveal-nav .rh-btn { min-height: 40px; padding: 6px 10px; font-size: 14px; }
  .fx-rv-lineup .fx-line-fig span { display: none; }
  .pc-toggle { width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 50%; position: relative; }
  .pc-toggle > span:first-child { font-size: 0; }
  .pc-toggle > span:first-child::before { content: 'Chat'; font-size: 13px; }
  .pc-badge { position: absolute; top: -4px; right: -4px; }
}

/* Benutzen-Leiste: Antippen geht durch den Text auf die Stelle darunter, nur „Abbrechen“ fängt ab; auf dem Smartphone unten und klein */
.rh-armed-hint { pointer-events: none; }
.rh-armed-hint button { pointer-events: auto; }
@media (max-width: 700px) {
  .rh-armed-hint { top: auto; bottom: 6px; padding: 4px 6px 4px 10px; font-size: 12px; max-width: calc(100% - 16px); white-space: normal; }
}

/* Türleiste: nur die Türknöpfe fangen Klicks, dazwischen erreicht man Leiche und Stellen im Raum */
.rh-doors { pointer-events: none; }
.rh-doors > * { pointer-events: auto; }
/* Spielseite auf dem Smartphone: Chat-Knopf über der Reiterleiste, damit „Mitspieler“ frei bleibt */
@media (max-width: 700px) {
  body.rh-page-game .pc:not(.pc-open) { bottom: 64px; }
}

/* Sprachzeit des Gastgebers (private Partie): dezentes Feld unter der Kopfleiste, Messing und Nachtblau */
.rh-vt-btn { position: relative; align-self: center; padding: 3px 14px 3px 10px; min-height: 28px; border: 1px solid var(--rh-line); border-radius: 999px; background: transparent;
  color: var(--rh-muted); font: 12px/1.2 var(--rh-sans); cursor: pointer; white-space: nowrap; }
.rh-vt-btn:hover, .rh-vt-btn:focus-visible { color: var(--rh-text); border-color: var(--rh-brass-dim); }
.rh-vt-dot { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--rh-brass); }
.rh-vt-dot-offer { background: #e9c784; box-shadow: 0 0 0 3px rgba(233, 199, 132, 0.25); }
.rh-vt-panel { position: fixed; top: 64px; right: 16px; z-index: 70; width: 340px; max-width: calc(100vw - 32px); padding: 14px 16px 12px; background: var(--rh-panel-solid);
  border: 1px solid var(--rh-brass-dim); border-radius: 10px; box-shadow: var(--rh-shadow); font: 14px/1.45 var(--rh-sans); }
.rh-vt-panel h3 { margin: 0 24px 10px 0; font-size: 17px; color: var(--rh-brass); }
.rh-vt-close { position: absolute; top: 6px; right: 8px; width: 32px; height: 32px; border: 0; background: none; color: var(--rh-muted); font-size: 22px; cursor: pointer; }
.rh-vt-bar { position: relative; display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #0f0c12; border: 1px solid var(--rh-line); }
.rh-vt-seg { display: block; height: 100%; }
.rh-vt-regular { background: linear-gradient(180deg, #c9a46a, #8c6f45); }
.rh-vt-reserve { background: repeating-linear-gradient(135deg, #6f5a3c 0 4px, #8a7250 4px 8px); }
.rh-vt-extension { background: linear-gradient(180deg, #7fa2c9, #4f6f94); }
.rh-vt-used { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(11, 10, 16, 0.62); border-right: 2px solid #efe6d2; }
.rh-vt-finale { position: absolute; right: 0; top: 0; bottom: 0; border-left: 1px dashed #efe6d2; background: rgba(155, 36, 36, 0.35); }
.rh-vt-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 6px 0 8px; color: var(--rh-muted); }
.rh-vt-key { display: inline-block; width: 14px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.rh-vt-key-finale { background: rgba(155, 36, 36, 0.75); }
@media (max-width: 700px) { .rh-vt-panel { top: auto; bottom: 130px; right: 8px; left: 8px; width: auto; } }

/* Freie Ermittlung: Ermittler im selben Raum, Teilnehmerübersicht, Herkunft eines Hinweises */
/* Anwesenheit: Kameen der Ermittler im selben Raum in einer eigenen Leiste unter der Szene (game.js presence).
   Die Bühne hält dafür --rh-reserve frei (scene.js fit), die Szene selbst bleibt unverdeckt. */
.rh-stage.rh-has-company { --rh-reserve: 74px; grid-template-rows: auto var(--rh-reserve); align-content: center; }
.rh-company { grid-row: 2; justify-self: stretch; align-self: stretch; position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 12px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  background: linear-gradient(180deg, #1a1310 0%, #120d0b 100%); border-top: 1px solid rgba(201, 164, 106, 0.45); box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.6); }
.rh-company::-webkit-scrollbar { display: none; }
.rh-mate { position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 2px 0; cursor: default; outline: none;
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease; }
.rh-mate-cameo { display: block; width: 44px; height: 52px; border-radius: 50%; padding: 2px; background: linear-gradient(160deg, #e7cc91, #8c6f45 55%, #c9a46a);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(40, 28, 14, 0.7); transition: box-shadow 0.25s ease; }
.rh-mate-cameo img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 100%; background: #2a2119;
  filter: sepia(0.55) saturate(0.85) contrast(1.05) brightness(0.95); }
.rh-mate-name { max-width: 92px; font: 11px/1.2 var(--rh-serif); color: var(--rh-text); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-mate.rh-me .rh-mate-name { color: var(--rh-brass); }
.rh-mate-mic { position: absolute; right: -2px; top: 34px; width: 16px; height: 16px; padding: 2px; border-radius: 50%; display: none; color: #e9c784;
  background: #1a1310; border: 1px solid var(--rh-brass-dim); box-sizing: border-box; }
.rh-mate-mic svg { display: block; width: 100%; height: 100%; }
.rh-mate.rh-muted .rh-mate-mic { display: block; }
.rh-mate.rh-speaking .rh-mate-cameo { box-shadow: 0 0 0 2px rgba(233, 199, 132, 0.85), 0 0 12px 3px rgba(233, 199, 132, 0.45); animation: rh-mate-talk 1.1s ease-in-out infinite alternate; }
@keyframes rh-mate-talk { from { box-shadow: 0 0 0 2px rgba(233, 199, 132, 0.7), 0 0 8px 2px rgba(233, 199, 132, 0.3); } to { box-shadow: 0 0 0 2px rgba(233, 199, 132, 0.95), 0 0 14px 4px rgba(233, 199, 132, 0.5); } }
.rh-mate.rh-away { opacity: 0.45; filter: grayscale(0.8); }
.rh-mate.rh-mate-in, .rh-mate.rh-mate-out { opacity: 0; transform: translateY(10px); }
.rh-mate.rh-mate-out { pointer-events: none; }
.rh-mate:focus-visible .rh-mate-cameo { box-shadow: 0 0 0 2px var(--rh-brass), 0 2px 6px rgba(0, 0, 0, 0.6); }
.rh-company-alone .rh-mate.rh-me { opacity: 0.8; }
@media (max-width: 700px) {
  .rh-stage.rh-has-company { --rh-reserve: 58px; }
  .rh-company { justify-content: flex-start; gap: 6px; padding: 0 8px; }
  .rh-mate-cameo { width: 34px; height: 40px; }
  .rh-mate-mic { top: 26px; }
  /* Telefon: Name nur nach Antippen, als kleines Schild unten in der Leiste */
  .rh-mate-name { display: none; }
  .rh-mate.rh-show-name { z-index: 2; }
  .rh-mate.rh-show-name .rh-mate-name { display: block; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); padding: 1px 6px;
    border-radius: 4px; background: #1a1310; border: 1px solid var(--rh-brass-dim); max-width: 120px; }
}
@media (hover: hover) { .rh-mate:hover .rh-mate-cameo { box-shadow: 0 0 0 2px rgba(201, 164, 106, 0.8), 0 2px 6px rgba(0, 0, 0, 0.6); } }
@media (prefers-reduced-motion: reduce) {
  .rh-mate, .rh-mate-cameo { transition: none; }
  .rh-mate.rh-speaking .rh-mate-cameo { animation: none; }
}
.rh-roster { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.rh-roster-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--rh-line); }
.rh-roster-row img { border-radius: 50%; background: var(--rh-bg2); }
.rh-roster-row.rh-here { border-color: var(--rh-brass); }
.rh-ev-owner { color: var(--rh-brass); margin: 8px 0; }
.rh-discord-steps { margin: 10px 0; padding-left: 20px; display: grid; gap: 10px; }
.rh-discord-steps a { color: var(--rh-brass); }
.rh-discord-cmd { font: 600 20px/1.3 ui-monospace, Menlo, Consolas, monospace; color: var(--rh-text); background: var(--rh-bg2); border: 1px solid var(--rh-line); border-radius: 8px; padding: 8px 12px; user-select: all; }

/* Haustelefon der Freien Ermittlung: Schaltfläche unten rechts neben dem Ermittlerchat, Feld darüber, Apparate im Raum */
.rh-phone-btn { position: fixed; right: 150px; bottom: 16px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 16px 6px 8px; border-radius: 999px;
  border: 1px solid var(--rh-brass-dim); background: var(--rh-panel-solid); color: var(--rh-text); font: 600 15px/1 var(--rh-sans); cursor: pointer; user-select: none; -webkit-user-select: none; }
.rh-phone-btn img { width: 26px; height: 40px; object-fit: contain; }
.rh-phone-btn:hover, .rh-phone-btn:focus-visible { border-color: var(--rh-brass); }
.rh-phone-btn.rh-phone-ringing { border-color: var(--rh-brass); box-shadow: 0 0 0 3px rgba(201, 164, 106, 0.45); animation: rh-phone-pulse 1s ease-in-out infinite; }
.rh-phone-btn.rh-phone-live { border-color: var(--rh-brass); }
@keyframes rh-phone-pulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(201, 164, 106, 0.35); } 50% { box-shadow: 0 0 0 7px rgba(201, 164, 106, 0.15); } }
@keyframes rh-phone-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(3deg); } }
.rh-phone-panel { position: fixed; right: 16px; bottom: 80px; z-index: 75; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 120px); overflow-y: auto; padding: 14px 16px;
  border-radius: 14px; border: 1px solid var(--rh-brass-dim); background: rgba(12, 9, 14, 0.96); color: var(--rh-text); font: 14px/1.45 var(--rh-sans); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.rh-phone-panel h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 600 17px/1.2 var(--rh-serif, var(--rh-sans)); color: var(--rh-brass); }
.rh-phone-panel h2 img { width: 34px; height: 48px; object-fit: contain; }
.rh-phone-panel p { margin: 6px 0; }
.rh-phone-panel .rh-phone-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.rh-phone-panel .rh-phone-row .rh-btn { min-height: 44px; }
.rh-phone-panel .rh-phone-close { position: absolute; top: 8px; right: 8px; min-height: 36px; min-width: 36px; }
.rh-phone-panel .rh-phone-state { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--rh-line); background: rgba(255, 255, 255, 0.03); }
.rh-phone-panel .rh-phone-state.rh-phone-alert { border-color: var(--rh-brass); }
.rh-phone-panel label { display: block; margin: 8px 0 4px; }
.rh-phone-panel select { min-height: 40px; width: 100%; }
.rh-phone-rec { touch-action: none; }
.rh-phone-rec.rh-on { border-color: var(--rh-blood-hi); box-shadow: 0 0 10px var(--rh-blood-hi); }
.rh-phone-toast { position: fixed; right: 16px; bottom: 80px; z-index: 76; padding: 8px 14px; border-radius: 10px; background: rgba(10, 8, 12, 0.94); border: 1px solid var(--rh-brass-dim); color: var(--rh-text); font: 14px/1.4 var(--rh-sans); max-width: min(360px, calc(100vw - 32px)); }
.rh-phone-toast { pointer-events: none; }
.rh-phone-toast.rh-phone-toast-top { bottom: auto; top: 16px; }
.rh-phone-layer { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.rh-phone-obj { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; transform-origin: 50% 100%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55)); }
.rh-phone-obj img { display: block; width: 100%; height: auto; }
.rh-phone-obj:hover, .rh-phone-obj:focus-visible { filter: drop-shadow(0 0 6px rgba(201, 164, 106, 0.9)); outline: none; }
.rh-phone-obj.rh-phone-ringing { animation: rh-phone-shake 0.5s linear infinite; }
@media (prefers-reduced-motion: reduce) { .rh-phone-btn.rh-phone-ringing, .rh-phone-obj.rh-phone-ringing { animation: none; } }
/* Apparat im Raumbild gemalt (Bildflicken): unsichtbare Schaltfläche darüber, Hinweis bei Fokus, Hover und Klingeln als Lichtrand */
.rh-phone-obj[data-painted] { filter: none; border-radius: 10px; }
.rh-phone-obj[data-painted]:hover, .rh-phone-obj[data-painted]:focus-visible { filter: none; box-shadow: 0 0 0 2px rgba(201, 164, 106, 0.85), 0 0 14px rgba(201, 164, 106, 0.55); }
.rh-phone-obj[data-painted].rh-phone-ringing { animation: rh-phone-painted-ring 1s ease-in-out infinite; }
@keyframes rh-phone-painted-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 214, 150, 0); } 50% { box-shadow: 0 0 0 3px rgba(255, 214, 150, 0.8), 0 0 22px rgba(255, 214, 150, 0.6); } }
@media (prefers-reduced-motion: reduce) { .rh-phone-obj[data-painted].rh-phone-ringing { animation: none; box-shadow: 0 0 0 3px rgba(255, 214, 150, 0.8); } }
@media (max-width: 700px) { .rh-phone-btn { bottom: 16px; right: 80px; min-height: 52px; padding: 6px 12px 6px 6px; } .rh-phone-panel { left: 16px; right: 16px; width: auto; bottom: 150px; max-height: calc(100vh - 170px); } }
/* Offener Ermittlerchat: Telefon-Schaltfläche links neben das Chatfenster, auf dem Smartphone über das Fenster */
body.pc-chat-open .rh-phone-btn { right: 392px; }
@media (max-width: 700px) { body.pc-chat-open .rh-phone-btn { right: 16px; bottom: auto; top: 12px; } }
/* Smartphone: Hinweis zum Haustelefon oben, damit Chat- und Telefon-Schaltfläche ihn nicht verdecken */
@media (max-width: 700px) { .rh-phone-toast { top: 12px; bottom: auto; left: 16px; right: 16px; max-width: none; text-align: center; } }
/* Villa-Regie: flackerndes Licht, zugefallene Tür */
@keyframes rh-flicker { 0%, 100% { filter: none; } 10% { filter: brightness(0.35); } 20% { filter: none; } 35% { filter: brightness(0.5); } 45% { filter: none; } 60% { filter: brightness(0.3); } 70% { filter: none; } }
.rh-flicker .rh-scene { animation: rh-flicker 1.4s linear 1; }
@media (prefers-reduced-motion: reduce) { .rh-flicker .rh-scene { animation: none; } }
.rh-door-closed { color: var(--rh-muted); font-size: 11px; }

/* Gruppenentscheidung über der Szene */
.rh-votes { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); z-index: 12; width: min(520px, calc(100% - 24px)); display: grid; gap: 8px; }
.rh-vote { padding: 12px 16px; border-radius: 12px; background: rgba(15, 11, 17, 0.94); border: 1px solid var(--rh-brass); box-shadow: var(--rh-shadow); }
.rh-vote p { margin: 6px 0 10px; }
.rh-vote .rh-row { gap: 10px; margin-bottom: 6px; }
.rh-vote-accepted { border-color: var(--rh-green); }
.rh-vote-rejected { border-color: var(--rh-muted); }

/* Zahlenschloss mit Messingrädchen */
.rh-dial { display: flex; justify-content: center; gap: 10px; margin: 18px 0 8px; }
.rh-dial-wheel { display: flex; flex-direction: column; align-items: center; width: 64px; border-radius: 12px; padding: 4px 0;
  background: linear-gradient(180deg, #4a3a22, #c9a46a 30%, #f0d9a6 50%, #c9a46a 70%, #4a3a22); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.5); touch-action: none; }
.rh-dial-wheel:focus-visible { outline: 2px solid var(--rh-brass); outline-offset: 3px; }
.rh-dial-num { font: 700 38px/1.2 var(--rh-serif); color: #1b130a; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4); min-height: 46px; }
.rh-dial-btn { background: none; border: 0; color: #2a1d0e; font-size: 16px; padding: 6px 14px; cursor: pointer; }
@keyframes rh-dial-tick { 0% { transform: translateY(-3px); } 100% { transform: none; } }
.rh-dial-tick .rh-dial-num { animation: rh-dial-tick 0.12s ease-out; }
@keyframes rh-dial-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.rh-dial-shake { animation: rh-dial-shake 0.45s ease-in-out; }
.rh-dial-open .rh-dial-wheel { box-shadow: 0 0 24px var(--rh-brass), inset 0 0 0 1px rgba(0, 0, 0, 0.5); transition: box-shadow 0.4s; }
@media (prefers-reduced-motion: reduce) { .rh-dial-shake, .rh-dial-tick .rh-dial-num { animation: none; } }

/* Zerrissener Brief: zwei Hälften zusammensetzen */
.rh-assembly { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 300px; margin: 14px 0; touch-action: none; }
.rh-piece { width: 220px; min-height: 240px; padding: 14px 16px; background: #efe2c2; color: #2a1d0e; font: 14px/1.45 var(--rh-serif); text-align: left; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
.rh-piece b { display: block; margin-bottom: 6px; }
.rh-piece-left { clip-path: polygon(0 0, 100% 0, 94% 12%, 100% 25%, 92% 40%, 100% 55%, 95% 70%, 100% 85%, 93% 100%, 0 100%); }
.rh-piece-right { clip-path: polygon(6% 0, 100% 0, 100% 100%, 7% 100%, 0 85%, 5% 70%, 0 55%, 8% 40%, 0 25%, 6% 12%); margin-left: -14px; cursor: grab; transition: transform 0.08s; }
.rh-piece-right:focus-visible { outline: 2px solid var(--rh-brass); }
.rh-assembled .rh-piece { box-shadow: 0 0 22px var(--rh-brass); transition: box-shadow 0.4s; }
@media (max-width: 700px) { .rh-piece { width: 150px; min-height: 200px; font-size: 12px; } }

/* Uhrwerk der Standuhr */
.rh-clockface { width: min(300px, 70vw); height: auto; margin: 10px auto; display: block; touch-action: none; cursor: grab; }
.rh-clockface:focus-visible { outline: 2px solid var(--rh-brass); outline-offset: 4px; border-radius: 50%; }
.rh-cf-rim { fill: #6b4f2a; stroke: #c9a46a; stroke-width: 3; }
.rh-cf-face { fill: #f1e6c9; }
.rh-cf-num { font: 600 14px var(--rh-serif); fill: #2a1d0e; text-anchor: middle; }
.rh-cf-tick { stroke: #2a1d0e; stroke-width: 1.4; }
.rh-cf-hour { stroke: #1b130a; stroke-width: 7; stroke-linecap: round; }
.rh-cf-min { stroke: #1b130a; stroke-width: 4; stroke-linecap: round; }
.rh-cf-pin { fill: #c9a46a; stroke: #1b130a; }
.rh-clockface.rh-dial-open .rh-cf-rim { stroke: #f0d9a6; filter: drop-shadow(0 0 10px #c9a46a); }

/* Gesprochenes Verhör über Discord */
.rh-interview { position: absolute; left: 14px; top: 84px; z-index: 11; width: min(420px, calc(100% - 28px)); padding: 12px 14px; border-radius: 12px; background: rgba(15, 11, 17, 0.95); border: 1px solid var(--rh-brass); box-shadow: var(--rh-shadow); }
.rh-iv-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.rh-iv-head img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: top; border: 1px solid var(--rh-line); }
.rh-iv-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rh-green); margin-right: 6px; vertical-align: middle; }
.rh-iv-hearing .rh-iv-dot { background: var(--rh-blood-hi); }
.rh-iv-thinking .rh-iv-dot { background: var(--rh-brass); animation: rh-iv-pulse 1s infinite; }
.rh-iv-speaking .rh-iv-dot { background: var(--rh-cold); animation: rh-iv-pulse 0.6s infinite; }
@keyframes rh-iv-pulse { 50% { opacity: 0.3; } }
.rh-iv-lines { max-height: 160px; overflow-y: auto; margin: 6px 0; }
.rh-iv-lines p { margin: 4px 0; font-size: 14px; }
.rh-iv-a { color: var(--rh-brass); }
.rh-voice-start { margin: 8px 0; width: 100%; }
@media (max-width: 700px) { .rh-interview { position: static; width: auto; margin: 8px; } }
@media (prefers-reduced-motion: reduce) { .rh-iv-dot { animation: none !important; } }
/* Smartphone: unter dem Gespräch Platz für Telefon- und Chat-Schaltfläche lassen */
@media (max-width: 700px) { .rh-interview { margin-bottom: 96px; } }

/* Villa Plus: Stimmung je Raum, dezent und ohne Bedeutung für den Fall */
.rh-atmo { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.rh-atmo > div { position: absolute; inset: 0; }
@keyframes rh-candle { 0%, 100% { opacity: 0.55; } 18% { opacity: 0.7; } 33% { opacity: 0.5; } 52% { opacity: 0.68; } 71% { opacity: 0.45; } 86% { opacity: 0.62; } }
.rh-atmo-candle { background: radial-gradient(ellipse 60% 45% at 50% 35%, rgba(255, 180, 90, 0.10), transparent 70%); mix-blend-mode: screen; animation: rh-candle 3.7s ease-in-out infinite; }
@keyframes rh-fire { 0%, 100% { opacity: 0.35; transform: scaleY(1); } 40% { opacity: 0.55; transform: scaleY(1.04); } 70% { opacity: 0.4; transform: scaleY(0.98); } }
.rh-atmo-fire { background: radial-gradient(ellipse 45% 35% at 22% 85%, rgba(255, 120, 40, 0.16), transparent 70%); mix-blend-mode: screen; transform-origin: 22% 100%; animation: rh-fire 1.9s ease-in-out infinite; }
@keyframes rh-rain { from { background-position: 0 0, 0 0; } to { background-position: -40px 600px, -20px 400px; } }
.rh-atmo-rain { opacity: 0.18; background-image: repeating-linear-gradient(100deg, transparent 0 22px, rgba(200, 215, 235, 0.35) 22px 23px, transparent 23px 60px), repeating-linear-gradient(97deg, transparent 0 40px, rgba(200, 215, 235, 0.25) 40px 41px, transparent 41px 90px); mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 80%); animation: rh-rain 1.4s linear infinite; }
@keyframes rh-fog { from { transform: translateX(-12%); } to { transform: translateX(12%); } }
.rh-atmo-fog { inset: 40% -20% -10% -20%; background: radial-gradient(ellipse 40% 50% at 30% 70%, rgba(210, 210, 220, 0.16), transparent 70%), radial-gradient(ellipse 35% 45% at 75% 80%, rgba(210, 210, 220, 0.12), transparent 70%); filter: blur(6px); animation: rh-fog 26s ease-in-out infinite alternate; }
@keyframes rh-quake { 0%, 100% { transform: none; } 15% { transform: translate(2px, -1px) rotate(0.15deg); } 30% { transform: translate(-2px, 1px) rotate(-0.15deg); } 45% { transform: translate(1px, 1px); } 60% { transform: translate(-1px, 0); } }
.rh-quake { animation: rh-quake 0.5s ease-out 1; }
@keyframes rh-silhouette { 0% { left: -20%; opacity: 0; } 15% { opacity: 0.55; } 85% { opacity: 0.55; } 100% { left: 110%; opacity: 0; } }
.rh-silhouette { position: absolute; top: 18%; width: 12%; height: 55%; left: -20%; z-index: 6; pointer-events: none; background: radial-gradient(ellipse 50% 18% at 50% 12%, rgba(0, 0, 0, 0.8), transparent 70%), radial-gradient(ellipse 45% 60% at 50% 62%, rgba(0, 0, 0, 0.75), transparent 72%); filter: blur(3px); animation: rh-silhouette 4s ease-in-out 1 forwards; }
@media (prefers-reduced-motion: reduce) { .rh-atmo, .rh-silhouette { display: none; } .rh-quake { animation: none; } }
/* Abstimmung: Fortschritt und Ergebnis sichtbar */
.rh-vote-progress { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin: 6px 0 4px; }
.rh-vote-progress span { display: block; height: 100%; background: var(--rh-brass); transition: width 0.4s ease; }
.rh-vote-tally { display: grid; gap: 4px; margin-top: 6px; }
.rh-vote-row { display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--rh-line); }
.rh-vote-row.rh-win { border-color: var(--rh-brass); background: rgba(201, 164, 106, 0.12); }

/* Hörspiel: Untertitel der Erzählerin und der Bewohner, Eröffnung */
.rh-narr { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px); max-width: min(760px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 10px;
  background: rgba(16, 12, 10, 0.92); border: 1px solid var(--rh-line); color: #f3e9d6; font-size: 1.02rem; line-height: 1.45; z-index: 60; opacity: 0; pointer-events: none; transition: opacity 0.4s ease, transform 0.4s ease; }
.rh-narr.rh-show { opacity: 1; transform: translate(-50%, 0); }
.rh-narr b { color: var(--rh-brass); font-weight: 600; }
/* Geräuschmeldungen stehen über der Türleiste (gemessen in game.js), nie darüber gelegt */
.rh-stage .fx-whisper { bottom: var(--rh-doors-space, 72px); }
/* Abbrechen: nur die Schaltfläche nimmt Klicks an, der Untertitel selbst lässt sie zur Szene durch */
/* left: 50% ließe nur die halbe Breite zu: der Text wurde schmal und hoch und lag über Raumtitel und Schaltflächen */
.rh-narr { padding-right: 44px; width: max-content; box-sizing: border-box; }
.rh-narr.rh-show .rh-narr-skip { pointer-events: auto; }
.rh-narr-skip { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--rh-line); background: rgba(0, 0, 0, 0.35);
  color: var(--rh-brass); font-size: 0.95rem; line-height: 1; cursor: pointer; pointer-events: none; }
.rh-narr-skip:hover, .rh-narr-skip:focus-visible { background: rgba(196, 160, 90, 0.2); }
.rh-opening { position: fixed; inset: auto 0 0 0; top: 0; display: grid; place-content: center; gap: 12px; text-align: center; padding: 24px 16px; z-index: 55;
  background: radial-gradient(ellipse at center, rgba(10, 8, 6, 0.72), rgba(0, 0, 0, 0.9)); color: #f3e9d6; }
.rh-opening h2 { font-family: var(--rh-serif, Georgia, serif); color: var(--rh-brass); font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0; }
.rh-opening .rh-btn { justify-self: center; }
@media (prefers-reduced-motion: reduce) { .rh-narr { transition: none; } }

/* Eigene Sprachräume: Bedienfeld oben rechts unter der Kopfleiste */
.rh-voice { position: fixed; right: 16px; top: 132px; z-index: 70; max-width: min(320px, calc(100vw - 32px)); padding: 10px 12px; border-radius: 10px;
  background: rgba(16, 12, 10, 0.92); border: 1px solid var(--rh-line); color: #f3e9d6; }
.rh-voice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.rh-voice p { margin: 8px 0 0; }
@media (max-width: 720px) { .rh-voice { top: auto; bottom: 150px; right: 12px; } }
.rh-voice-state { font-size: 0.85rem; margin: 0 0 6px; }
.rh-voice[data-state="connected"] .rh-voice-state { color: #8fd19e; }
.rh-voice[data-state="reconnecting"] .rh-voice-state, .rh-voice[data-state="connecting"] .rh-voice-state { color: #f0c674; }
.rh-voice-meter { height: 6px; margin: 8px 0 0; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.rh-voice-meter i { display: block; height: 100%; width: 0; background: #8fd19e; transition: width 0.08s linear; }
.rh-voice-ptt { display: flex; gap: 6px; align-items: center; margin: 8px 0 0; font-size: 0.85rem; }
.rh-voice details { margin: 8px 0 0; font-size: 0.85rem; }
.rh-voice details a { color: #f0c674; }
/* An der Tür lauschen: kleine Schaltfläche neben jeder Tür und Hinweis mit Restzeit */
.rh-listen-btn { pointer-events: auto; flex: 0 0 auto; margin-left: -4px; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--rh-line); background: rgba(12, 9, 14, 0.82); cursor: pointer; font-size: 13px; line-height: 1; }
.rh-listen-btn:hover, .rh-listen-btn:focus-visible { border-color: var(--rh-brass); }
.rh-listen-btn.rh-on { border-color: var(--rh-brass); box-shadow: 0 0 0 2px rgba(201, 164, 106, 0.35); }
.rh-listen { position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 24px); padding: 8px 12px; border-radius: 12px; border: 1px solid var(--rh-brass); background: rgba(12, 9, 14, 0.9); font-size: 14px; pointer-events: auto; }

/* Endabnahme Oberfläche: Bedienfelder (Sprache, Haustelefon, Chat, Sprechanzeige) liegen nie über offenen Dialogen und Rätseln */
body.rh-modal-open .rh-voice, body.rh-modal-open .rh-phone-btn, body.rh-modal-open .rh-phone-toast, body.rh-modal-open .rh-phone-panel, body.rh-modal-open .pc,
body.rh-modal-open .rh-speech, body.rh-modal-open .rh-narr { z-index: 45; }
/* Sprachfeld am Bildschirm: unten rechts über Haustelefon und Chat statt über den Reitern der Seitenleiste */
@media (min-width: 961px) {
  .rh-voice { top: auto; bottom: 84px; right: 16px; max-width: min(330px, calc(100vw - 32px)); max-height: calc(100vh - 360px); overflow-y: auto; }
  /* die Seitenleiste endet über Haustelefon, Chat und Sprachfeld, damit diese nichts aus der Leiste verdecken */
  body:has(.rh-phone-btn) .rh-side, body:has(.pc) .rh-side { padding-bottom: 80px; }
  body:has(.rh-voice) .rh-side { padding-bottom: 300px; }
  body:has(.rh-voice) .rh-phone-toast { bottom: auto; top: 72px; }
  /* Verhör im Raum unter dem Raumtitel, mit eigener Scrollleiste */
  .rh-interview { top: 132px; max-height: calc(100% - 210px); overflow-y: auto; }
  /* Untertitel über der Sprechanzeige */
}
@media (min-width: 961px) and (max-width: 1280px) {
  .rh-voice { max-width: 298px; }
}
/* Smartphone: Sprachfeld kompakt, ohne Leertasten-Hinweis, Seite endet über den festen Bedienfeldern */
@media (max-width: 960px) {
  .rh-voice { top: auto; bottom: 80px; left: 12px; right: 76px; max-width: none; padding: 8px 10px; }
  .rh-game { padding-bottom: 96px; }
  body:has(.rh-voice) .rh-game { padding-bottom: 260px; }
}
@media (pointer: coarse) { .rh-voice-ptt, .rh-voice-ptt + p { display: none; } }
/* Smartphone: Sprachfeld ohne ausklappbare Hilfe (steht in der Lobby unter Technik), Sprachbefehl als runde Taste oben rechts in der Szene */
@media (max-width: 960px) {
  .rh-voice details { display: none; }
  .rh-hud .rvc-btn { top: 8px; bottom: auto; right: 8px; min-width: 44px; justify-content: center; padding: 8px 12px; }
  .rh-hud .rvc-btn .rvc-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rh-hud .rvc-note { top: 60px; bottom: auto; right: 8px; left: 8px; max-width: none; }
  .rh-interview .rh-iv-text { min-height: 44px; }
}
/* Abstimmung auf kleinen Bildschirmen: die Karte bleibt in der Szene und lässt sich scrollen, die Schaltflächen sind erreichbar */
@media (max-width: 960px) {
  .rh-votes { top: 64px; max-height: calc(100% - 72px); overflow-y: auto; overscroll-behavior: contain; }
  /* Sprechanzeige oben, wenn unten das Sprachfeld steht */
  body:has(.rh-voice) .rh-speech { bottom: auto; top: 12px; }
  .rh-vote { padding: 10px 12px; }
  .rh-vote p { margin: 4px 0 8px; }
}
/* Tippziele auf dem Smartphone mindestens 44 px */
@media (pointer: coarse) {
  .rh-modal-close { width: 44px; height: 44px; top: 6px; right: 6px; }
  .rh-vt-btn { min-height: 44px; }
  .rh-door { min-height: 44px; display: inline-flex; align-items: center; }
  .rh-listen-btn { min-width: 44px; min-height: 44px; }
  .rh-dial-btn { min-height: 44px; }
  .rh-top .nb-open { min-height: 44px; min-width: 44px; }
  .rh-side-tabs button { min-height: 44px; }
  a.rh-small { display: inline-flex; align-items: center; min-height: 44px; }
  .rh-history a { display: inline-block; padding: 10px 0; }
}
/* Kleine Angaben lesbar (mindestens 12 px) */
.rh-top small, .rh-room-title small, .rh-progress small, .rh-door.rh-new::after, .rh-slot .rh-slot-n, .rh-tut small, .pc-tag, .pc-ev-k, .pc-note, .rh-door-closed { font-size: 12px; }

/* Sprechsteuerung in der oberen Leiste statt schwebend über der Szene */
/* Sprechsteuerung schwebt mittig unter der oberen Leiste: sie verändert die Höhe der Leiste nie (sonst rutschen Knöpfe in eine
   neue Zeile und das Bild passt sich ruckelnd neu ein) */
.rh-top { position: relative; }
.rh-speech-slot { display: none; position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); z-index: 30; white-space: nowrap;
  align-items: center; gap: 6px; padding: 2px 6px 2px 12px; border-radius: 999px; background: rgba(18, 13, 20, .92); border: 1px solid rgba(233, 199, 132, .55); font-size: 13px; box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
.rh-speech-slot.rh-on { display: inline-flex; }
.rh-speech-slot .rh-btn { padding: 4px 10px; min-height: 32px; }
@media (pointer: coarse) { .rh-speech-slot .rh-btn { min-height: 44px; } }

/* Sprachfeld kompakt (voice.js): eine Zeile mit Mikrofonstatus und Stummschalter, Einzelheiten aufklappbar.
   Auf dem Smartphone steht es im Seitenfluss unter der Szene und verdeckt weder Raumtext noch Schaltflächen. */
.rh-voice-row { align-items: center; }
.rh-voice-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rh-line); font-size: 0.85rem; white-space: nowrap; }
.rh-voice-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #8fd19e; }
.rh-voice[data-mic="muted"] .rh-voice-pill::before { background: #d06060; }
.rh-voice[data-mic="ptt"] .rh-voice-pill::before { background: #f0c674; }
.rh-voice .rh-voice-me { margin: 6px 0 0; font-size: 0.85rem; }
.rh-voice-villa { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 6px 0 0; font-size: 0.85rem; }
.rh-voice-villa .rh-vs-note { flex-basis: 100%; margin: 0; }
.rh-voice-villa .rh-vs-busy { color: #f0c674; }
.rh-voice-villa .rh-vs-opts { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.rh-voice-details { margin: 6px 0 0; font-size: 0.85rem; }
.rh-voice-details a { color: #f0c674; }
@media (min-width: 961px) {
  body:has(.rh-voice) .rh-side { padding-bottom: 210px; }
}
@media (max-width: 960px) {
  .rh-voice.rh-voice-flow { position: static; order: 1; inset: auto; max-width: none; max-height: none; margin: 0; border-radius: 0; border-left: 0; border-right: 0; z-index: auto; }
  body:has(.rh-voice-flow) .rh-game { padding-bottom: 96px; }
}
.rh-vs-consent ul { padding-left: 1.2em; }

/* Geheimgang offen: dort, wo Ahnenbild oder Weinregal waren, öffnet sich ein dunkler Durchgang mit Rahmen */
.rh-hot.rh-swung { background: radial-gradient(ellipse at 50% 62%, #000 0%, #07050a 48%, rgba(26, 18, 12, .96) 100%);
  border: 3px solid rgba(118, 86, 46, .9); box-shadow: inset 0 0 40px 10px #000, inset -10px 0 18px rgba(0, 0, 0, .9), 0 0 0 2px rgba(0, 0, 0, .55); }
.rh-hot.rh-swung::after { content: ''; position: absolute; top: 4%; bottom: 4%; left: -14%; width: 16%; border-radius: 2px;
  background: linear-gradient(90deg, #3b2a18, #6b4c2a 40%, #2a1d10); transform: perspective(240px) rotateY(58deg); transform-origin: right center; box-shadow: -6px 0 14px rgba(0, 0, 0, .7); }

/* Gegenstände unter Ermittlern: Angebote und Bitten über der Szene, eigene Gegenstände im Inventar */
.rh-trades { position: absolute; right: 14px; top: 56px; z-index: 12; width: min(340px, calc(100% - 28px)); display: grid; gap: 8px; max-height: calc(100% - 120px); overflow-y: auto; overscroll-behavior: contain; }
.rh-trade { padding: 10px 14px; border-radius: 12px; background: rgba(15, 11, 17, 0.94); border: 1px solid var(--rh-brass); box-shadow: var(--rh-shadow); }
.rh-trade p { margin: 4px 0 8px; }
.rh-trade .rh-row { gap: 8px; }
.rh-trade-offer { border-color: #ffd36b; }
.rh-trade-asked { border-color: var(--rh-line); }
.rh-trade-left { display: block; margin-top: 6px; font-variant-numeric: tabular-nums; }
.rh-inv-objects { flex: 0 1 400px; min-width: 240px; max-height: 150px; overflow-y: auto; padding: 4px 6px; border-left: 1px solid var(--rh-line); }
.rh-obj-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 4px; }
.rh-obj-head b { font-family: var(--rh-serif); color: var(--rh-brass); font-weight: normal; }
.rh-obj-head .rh-select { padding: 2px 6px; min-height: 30px; }
.rh-obj-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rh-obj { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.rh-obj img { flex: 0 0 auto; }
.rh-obj-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-obj .rh-btn { padding: 3px 8px; min-height: 30px; font-size: 12px; }
.rh-obj .rh-btn:disabled { opacity: 0.45; cursor: default; }
.rh-obj-offer .rh-trade-left { display: inline; margin: 0; }
@media (max-width: 960px) {
  .rh-trades { position: static; width: auto; max-height: none; margin: 8px; }
  .rh-inv { flex-wrap: wrap; }
  .rh-inv-objects { flex: 1 1 100%; border-left: 0; border-top: 1px solid var(--rh-line); max-height: none; }
}

/* Ermittler-Editor 18.10.2026: Ermittlerbilder (Brustbild hochkant 44:52) in Listen, Chat und Übersicht nicht verzerren.
   Die Kameen der Raumleiste (.rh-mate-cameo) regelt die Anwesenheit selbst. */
img[src^="/avatar/"]:not(.rh-mate-cameo > img) { object-fit: cover; object-position: 50% 18%; }

/* Abstimmungen 18.10.2026: eigene laufende Abstimmung als gesperrter Dialog, Türen ruhen bis zum Ende, Rückfrage vor riskanten Versuchen */
.rh-door[disabled] { opacity: 0.45; cursor: not-allowed; border-style: dotted; }
.rh-vote-dialog .rh-vote-options, .rh-confirm .rh-row { gap: 10px; flex-wrap: wrap; margin: 10px 0 6px; }
.rh-vote-dialog .rh-vote-mine { color: var(--rh-brass); }
.rh-vote-end { margin-top: 8px; }

/* Bedienung 19.10.2026: Türen, Lauschen, Lauschhinweis, Benutzen-Hinweis und auf dem Telefon der Sprachbefehl stehen in
   einer Leiste unter der Szene (game.js stageBar, Klasse rh-band). scene.js zieht ihre Höhe beim Einpassen ab, deshalb
   verdeckt keine dieser Schaltflächen eine Klickfläche, die Leiche, einen Bewohner oder ein Fundstück. */
.rh-stage.rh-has-bar { grid-template-rows: auto auto; align-content: center; }
/* Spalte nie breiter als die Bühne: sonst schiebt eine breite Leiste (Türen, Sprechtaste) die Szene seitlich weg */
.rh-stage { grid-template-columns: minmax(0, 1fr); }
.rh-stage.rh-has-bar.rh-has-company { grid-template-rows: auto auto var(--rh-reserve); }
.rh-stage.rh-has-bar > .rh-scene { grid-row: 1; }
.rh-stage.rh-has-bar > .rh-company { grid-row: 3; }
.rh-stagebar { grid-row: 2; justify-self: stretch; align-self: stretch; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px;
  padding: 7px 12px; background: linear-gradient(180deg, #17110f 0%, #110c0b 100%); border-top: 1px solid rgba(201, 164, 106, 0.45); }
.rh-stagebar > .rh-doors { position: static; inset: auto; flex: 1 1 0; min-width: 0; flex-wrap: wrap; justify-content: center; z-index: auto; }
.rh-stagebar > .rh-listen { position: static; inset: auto; transform: none; order: -1; flex: 1 1 100%; max-width: none; justify-content: center; }
.rh-stagebar > .rh-armed-hint { position: static; inset: auto; transform: none; order: -1; flex: 0 1 auto; max-width: 100%; white-space: normal; pointer-events: auto; }
.rh-stagebar > .rvc-btn { position: static; inset: auto; flex: 0 0 auto; min-width: 44px; justify-content: center; }
@media (max-width: 960px) {
  .rh-stagebar > .rvc-btn { padding: 8px 12px; }
  .rh-stagebar > .rvc-btn .rvc-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rh-stagebar { flex-wrap: wrap; padding: 4px 6px; gap: 4px 6px; justify-content: flex-start; }
  .rh-stagebar > .rh-doors { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; }
}
/* Fundstücke in der Szene auf dem Telefon kleiner, Namen umbrechend: fx.js placeItems legt sie dann neben die Stelle,
   ohne die Leiche oder andere Klickflächen zuzudecken */
@media (max-width: 960px) {
  .rh-scene .fx-item img { width: 44px; height: 44px; }
  .rh-scene .fx-item span { white-space: normal; max-width: 96px; line-height: 1.2; padding: 1px 6px; }
}

/* Kleines Menü für einen Gegenstand im Inventar */
.rh-item-menu { position: fixed; z-index: 70; display: flex; flex-direction: column; gap: 6px; min-width: 180px; max-width: min(320px, calc(100vw - 16px)); padding: 10px;
  border-radius: 10px; background: rgba(16, 12, 10, 0.96); border: 1px solid var(--rh-brass-dim); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6); }
.rh-item-menu-head { color: var(--rh-brass); font-size: 14px; margin-bottom: 2px; }
.rh-item-menu .rh-btn { justify-content: flex-start; text-align: left; min-height: 40px; }

/* Bewohner hören mit: Befehle laufen über das offene Mikrofon, der Knopf „Sprachbefehl“ unter dem Bild entfällt (im Rätselfenster bleibt er) */
body.rh-villa-on .rh-stagebar > .rvc-btn:not(.rvc-inpz) { display: none; }

/* Verhör: Beweis vorlegen als Kachelleiste oben */
.rh-present { margin: 10px 0 14px; padding: 10px; border-radius: 10px; background: linear-gradient(180deg, rgba(201, 164, 106, 0.14), rgba(201, 164, 106, 0.05)); border: 1px solid var(--rh-brass-dim); }
.rh-present-head { margin-bottom: 8px; }
.rh-present-head b { color: var(--rh-brass); }
.rh-present-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; max-height: 214px; overflow-y: auto; }
.rh-present-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; padding: 6px 4px; border-radius: 8px; border: 1px solid rgba(201, 164, 106, 0.3);
  background: rgba(0, 0, 0, 0.25); color: inherit; font: inherit; font-size: 12px; line-height: 1.2; text-align: center; cursor: pointer; }
.rh-present-tile img { width: 40px; height: 40px; object-fit: contain; }
.rh-present-tile span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rh-present-tile:hover, .rh-present-tile:focus-visible { border-color: var(--rh-brass); background: rgba(201, 164, 106, 0.16); }
/* Verhör: Gesprächsprotokoll als eigener Block, Sprecher deutlich getrennt */
.rh-talklog { margin-top: 14px; padding: 10px; border-radius: 10px; background: #120e12; border: 1px solid var(--rh-line); display: flex; flex-direction: column; gap: 8px; }
.rh-talklog-head { color: var(--rh-brass); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.rh-tl-me, .rh-tl-npc { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; max-width: 92%; font-size: 15px; line-height: 1.45; }
.rh-tl-me { align-self: flex-end; background: rgba(110, 140, 190, 0.16); border: 1px solid rgba(110, 140, 190, 0.35); color: #d8e1f0; }
.rh-tl-npc { align-self: flex-start; background: rgba(201, 164, 106, 0.1); border: 1px solid rgba(201, 164, 106, 0.3); color: #f3e9d6; }
.rh-tl-who { font-size: 11.5px; letter-spacing: .04em; color: var(--rh-muted); }

/* Benutzen mit: Stellen im Raum leuchten; Kombinieren mit: Hinweise im Inventar leuchten */
@keyframes rh-target-pulse { from { box-shadow: 0 0 0 2px rgba(255, 214, 140, 0.55), inset 0 0 14px rgba(255, 214, 140, 0.25); } to { box-shadow: 0 0 0 3px rgba(255, 214, 140, 0.95), inset 0 0 22px rgba(255, 214, 140, 0.45); } }
.rh-stage.rh-arming .rh-hot { border-radius: 8px; animation: rh-target-pulse 0.9s ease-in-out infinite alternate; cursor: crosshair; }
.rh-inv.rh-combining .rh-slot[data-item^="ev:"] { animation: rh-target-pulse 0.9s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .rh-stage.rh-arming .rh-hot, .rh-inv.rh-combining .rh-slot[data-item^="ev:"] { animation: none; box-shadow: 0 0 0 3px rgba(255, 214, 140, 0.9); } }

/* Ermittlerausweis beim Klick auf einen Ermittler im Raum */
.rh-mate-card { width: min(380px, calc(100vw - 16px)); background: linear-gradient(180deg, #241c16, #15100d); }
.rh-mc-org { color: var(--rh-brass); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--rh-brass-dim); padding-bottom: 6px; }
.rh-mc-body { display: flex; gap: 12px; align-items: flex-end; }
.rh-mc-fig { width: 112px; height: 160px; object-fit: contain; object-position: bottom; flex: none; background: radial-gradient(ellipse at 50% 70%, rgba(201, 164, 106, 0.18), transparent 70%); border-radius: 8px; }
.rh-mc-data { margin: 0; display: grid; grid-template-columns: auto; gap: 1px; font-size: 14px; }
.rh-mc-data dt { color: var(--rh-muted); font-size: 11.5px; margin-top: 4px; }
.rh-mc-data dd { margin: 0; }
.rh-mc-name { font-size: 18px; color: #f3e9d6; }
.rh-mc-head { color: var(--rh-brass); font-size: 13px; margin-top: 4px; }
.rh-mc-item { display: flex; align-items: center; gap: 6px; }
.rh-mc-item span { flex: 1; min-width: 0; font-size: 14px; }

/* Meldung zu Gegenständen mitten über der Szene */
.rh-scene-note { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(0.96); z-index: 25; max-width: min(560px, calc(100% - 32px)); padding: 14px 20px;
  border-radius: 12px; background: rgba(16, 12, 10, 0.94); border: 1px solid var(--rh-brass); color: #f3e9d6; font-size: 18px; line-height: 1.45; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.3s, transform 0.3s; cursor: pointer; }
.rh-scene-note.rh-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.rh-scene-note.rh-fail { border-color: #a5584e; }
.rh-scene-note.rh-ok { border-color: #8fbf7a; }
@media (prefers-reduced-motion: reduce) { .rh-scene-note { transition: none; } }

/* Streamansicht (?stream=1): nur die Szene mit Untertiteln, Sprechblasen und Ermittlern, für die Fensteraufnahme in OBS */
.rh-streammode .rh-game { grid-template-rows: minmax(0, 1fr); grid-template-columns: 1fr; grid-template-areas: 'stage'; }
.rh-streammode .rh-top, .rh-streammode .rh-side, .rh-streammode .rh-inv, .rh-streammode .rh-stagebar, .rh-streammode .rh-voice, .rh-streammode .rh-phone-btn,
.rh-streammode .pc, .rh-streammode .rh-pz-dock, .rh-streammode .rh-narr-skip, .rh-streammode .rh-item-menu, .rh-streammode .rh-tut { display: none !important; }
.rh-streammode .rh-stage { pointer-events: none; }
.rh-streammode body { cursor: none; }

/* Mitspieler-Lautstärke im Tonmenü (voice.js volumePanel) */
.rh-pvol { margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--rh-line); }
.rh-pvol h3 { margin: 0 0 8px; font-size: 15px; }
.rh-pvol-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rh-pvol-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) 36px minmax(90px, 160px) 3.6em; align-items: center; gap: 8px; min-height: 44px; }
.rh-pvol-fig { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; background: rgba(255, 255, 255, 0.06);
  display: grid; place-items: center; font-size: 14px; color: var(--rh-muted); }
.rh-pvol-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rh-pvol-talk { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: transparent; vertical-align: middle; transition: background 0.15s; }
.rh-pvol-speaking .rh-pvol-talk { background: #7ec48a; box-shadow: 0 0 6px #7ec48a; }
.rh-pvol-mute { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--rh-line); background: none; color: inherit; cursor: pointer; }
.rh-pvol-mute svg { width: 18px; height: 18px; pointer-events: none; }
.rh-pvol-mute[aria-pressed="true"] { color: #e08a7a; border-color: #e08a7a; }
.rh-pvol-row input[type="range"] { width: 100%; min-height: 28px; accent-color: #c9a45c; }
.rh-pvol-muted input[type="range"] { opacity: 0.45; }
.rh-pvol-pct { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--rh-muted); text-align: right; }
.rh-pvol-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.rh-pvol-foot p { margin: 0; flex: 1 1 220px; }
@media (max-width: 520px) {
  .rh-pvol-row { grid-template-columns: 32px minmax(0, 1fr) 36px 3.4em; row-gap: 2px; }
  .rh-pvol-row input[type="range"] { grid-column: 1 / -1; order: 5; min-height: 32px; }
}
