/* ==========================================================================
   HOTEL NOCTURNE – Gestaltung (Version 2)
   Fast Schwarz #090A0C · Altes Holz #171411 · Dunkles Grün #1D2423 · Altes Messing #B69A6D
   ========================================================================== */

:root {
  --black: #090a0c;
  --wood: #171411;
  --green: #1d2423;
  --brass: #b69a6d;
  --brass-2: #d4bc90;
  --panel: #111312;
  --panel-2: #181b1a;
  --line: #2a2d2b;
  --line-2: #3d3a31;
  --text: #e6dfd3;
  --text-2: #bdb4a5;
  --muted: #858278;
  --red: #a3473c;
  --ok: #8aa184;
  --paper: #e9dfc8;
  --ink: #2a2119;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --topbar: 58px;
  --side: 290px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--black); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% -10%, #1d2423 0, transparent 55%), var(--black); color: var(--text); font-family: var(--sans); line-height: 1.5; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .35; }
:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 2px; }
.hidden { display: none !important; }
.eyebrow { font: 10px var(--mono); letter-spacing: .2em; color: var(--brass); margin: 0 0 8px; text-transform: uppercase; }
.muted { color: var(--muted); font-size: 14px; }
.muted.small { font-size: 12px; line-height: 1.6; }

.grain { pointer-events: none; position: fixed; inset: 0; z-index: 60; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body::after { content: ""; position: fixed; inset: 0; z-index: 59; pointer-events: none; background: #dfe9ff; opacity: 0; transition: opacity .06s; }
body.flash::after { opacity: .13; }

/* ---------- Kopfzeile ---------- */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 clamp(14px, 3vw, 36px); background: #090a0cf0; border-bottom: 1px solid #1e211f; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; font: 11px var(--mono); letter-spacing: .18em; }
.brand b { color: var(--brass); font-weight: 400; }
.brand-mark { width: 26px; height: 26px; border: 1px solid var(--brass); display: grid; place-items: center; transform: rotate(45deg); }
.brand-mark span { transform: rotate(-45deg); color: var(--brass); font: 16px var(--serif); }
.top-meta { font: 11px var(--mono); letter-spacing: .16em; color: var(--muted); display: flex; align-items: center; gap: 10px; }
#clock { color: var(--brass); }
.top-meta .sep { color: #4a463c; }
.live-dot { width: 6px; height: 6px; background: var(--red); border-radius: 50%; box-shadow: 0 0 10px var(--red); animation: pulse 2.4s infinite; }
.top-actions { display: flex; gap: 8px; }
.icon-button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: none; display: grid; place-items: center; color: var(--brass); }
.icon-button:hover { border-color: var(--brass); }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#soundToggle svg path:first-child { fill: currentColor; stroke: none; }
.icon-button .mute { display: none; }
.icon-button.off .mute { display: inline; }
.icon-button.off .wave { display: none; }

/* ---------- Buttons ---------- */
.primary-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--brass); background: var(--brass); color: #12100c; padding: 15px 22px; min-width: 230px; font-weight: 600; letter-spacing: .04em; transition: background .2s, transform .2s; }
.primary-button span { font-size: 18px; }
.primary-button:hover { background: var(--brass-2); transform: translateY(-1px); }
.primary-button.small { min-width: 0; padding: 11px 18px; font-size: 14px; }
.primary-button.block { width: 100%; justify-content: center; margin-top: 14px; }
.ghost-button, .danger-button { background: none; border: 1px solid var(--line-2); color: var(--text-2); padding: 10px 16px; font-size: 13px; }
.ghost-button:hover { border-color: var(--brass); color: var(--text); }
.danger-button { border-color: #5d2f2a; color: #d39a90; }
.link-button { background: none; border: 0; padding: 0; color: var(--brass); font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.text-link { display: inline-block; margin-top: 14px; color: var(--muted); font-size: 13px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- Titel ---------- */
.screen { min-height: calc(100vh - var(--topbar)); }
.intro-screen { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; max-width: 1400px; margin: 0 auto; padding: 6vh clamp(20px, 7vw, 110px) 8vh; }
.intro-copy h1, .ending-screen h1 { font: 500 clamp(60px, 8vw, 108px)/.92 var(--serif); letter-spacing: -.045em; margin: 0 0 28px; }
.intro-copy h1 em, .ending-screen h1 em { color: var(--brass); }
.lead { font-size: 17px; line-height: 1.8; color: var(--text-2); max-width: 450px; }
.intro-rule { width: 70px; height: 1px; background: var(--brass); margin: 34px 0 22px; }
.intro-note { font: 11px/2 var(--mono); letter-spacing: .1em; color: var(--muted); }
.intro-note strong { color: var(--text); font-weight: 400; }
.micro { font: 10px var(--mono); letter-spacing: .12em; color: #6d6a61; margin-top: 24px; }
.intro-visual { position: relative; }
.facade { display: block; width: 100%; max-height: 68vh; border: 1px solid #3a3226; box-shadow: 0 30px 80px #000c; background: #07080b; }
.facade .flicker { animation: flicker 7s infinite; }
.facade .rain { animation: rain .9s linear infinite; }
.image-caption { text-align: center; font: 10px var(--mono); letter-spacing: .22em; color: #b9a684; margin: 14px 0 0; }
.vertical-label { position: absolute; right: -26px; top: 10%; writing-mode: vertical-rl; font: 9px var(--mono); letter-spacing: .18em; color: var(--muted); margin: 0; }

/* ---------- Spiel-Layout ---------- */
.game-screen { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 0; max-width: 1700px; margin: 0 auto; }
.play { padding: 20px clamp(12px, 2.5vw, 36px) 30px; min-width: 0; }

/* Szene */
.scene { position: relative; width: 100%; max-width: calc((100vh - var(--topbar) - 48px) * 4 / 3); min-width: 280px; margin: 0 auto; background: #050505; border: 1px solid #2e2a22; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: pan-y; box-shadow: 0 30px 80px #000; }
.stage { position: relative; aspect-ratio: 4 / 3; width: 100%; }
.stage .scene-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .flicker { animation: flicker 9s infinite; }
.stage .rain-lines { animation: rain-down .7s linear infinite; }
.stage .lightning { opacity: 0; transition: opacity .05s; }
body.flash .stage .lightning { opacity: .55; }
.stage.turn-right { animation: turn-r .45s ease-out; }
.stage.turn-left { animation: turn-l .45s ease-out; }
.stage.arrive { animation: arrive 1s ease-out; }
.scene.leaving .stage { animation: leave .9s ease-in forwards; }
.scene.dropping .hotspot { border-color: #d4bc9066; }

.hotspot { position: absolute; transform: translate(-50%, -50%); min-width: 40px; min-height: 40px; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 0; transition: background .2s, border-color .2s, box-shadow .2s; z-index: 2; }
.hotspot:hover, .hotspot:focus-visible, .show-hotspots .hotspot { border-color: #d4bc9088; background: #d4bc9010; box-shadow: 0 0 26px #d4bc9026 inset; outline: none; }
.hotspot.exit:hover, .show-hotspots .hotspot.exit { border-color: #8aa184aa; background: #8aa18414; }
.hotspot.pickup { animation: glint 2.4s infinite; }
.hs-label { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; pointer-events: none; background: #0b0b0ae6; border: 1px solid #5a4a33; color: var(--brass-2); font: 10px var(--mono); letter-spacing: .1em; padding: 4px 8px; opacity: 0; transition: opacity .2s; }
.hotspot:hover .hs-label, .hotspot:focus-visible .hs-label, .show-hotspots .hs-label { opacity: 1; }

.darkness { position: absolute; z-index: 1; pointer-events: none; background: #030303; opacity: .97; filter: blur(16px); }
.scene.lit .darkness { opacity: 1; background: radial-gradient(circle at var(--lx, 50%) var(--ly, 70%), transparent 0, transparent 60px, #030303e0 120px, #030303 170px); }
.scene.lit .stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: #00000033; }

.view-label { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 10px; background: #090a0cc8; border: 1px solid #3a3226; padding: 5px 12px; font: 10px var(--mono); letter-spacing: .18em; color: var(--brass-2); pointer-events: none; }
.compass { display: flex; gap: 4px; }
.compass i { width: 5px; height: 5px; border-radius: 50%; border: 1px solid var(--brass); }
.compass i.on { background: var(--brass); }
.turn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; display: flex; align-items: center; gap: 6px; background: #090a0cb0; border: 1px solid #3a3226; color: var(--brass-2); padding: 14px 10px; transition: background .2s; }
.turn span { font: 28px/1 var(--serif); }
.turn small { display: none; font: 9px var(--mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.turn:hover { background: #090a0cee; }
.turn:hover small, .turn:focus-visible small { display: inline; }
.turn.left { left: 0; border-left: 0; }
.turn.right { right: 0; border-right: 0; }
.no-views .turn { display: none; }
.light-chip { position: absolute; top: 46px; left: 10px; z-index: 3; background: #e7c48ae6; color: #14100b; border: 0; padding: 7px 14px; font: 11px var(--mono); letter-spacing: .06em; border-radius: 20px; }

/* Vorläufige Räume */
.scene.draft .stage { display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #33392f 0%, #1a1e1b 45%, #070807 82%); }
.scene.draft .stage::before { content: ""; position: absolute; inset: 14px; border: 1px solid #b69a6d26; pointer-events: none; }
.draft-inner { position: relative; text-align: center; padding: 24px 24px 44px; width: 100%; }
.draft-title { font: 500 clamp(24px, 3vw, 40px) var(--serif); color: #d6c6a6; margin: 0 0 6px; }
.draft-sub { font: 9px var(--mono); letter-spacing: .18em; color: #8c8270; margin: 0; }
.draft-cards { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: clamp(16px, 4vh, 36px); }
.card-object { width: 96px; height: 104px; border: 1px solid #6e5c42; background: #0d0e0dbb; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #cdb48e; transition: transform .2s, background .2s; }
.card-object:hover { background: #2b2519; transform: translateY(-3px); }
.card-object .glyph { font: 28px var(--serif); }
.card-object small { font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.draft-tag { position: absolute; left: 0; right: 0; bottom: 4px; font: 9px var(--mono); letter-spacing: .12em; color: #6f6758; margin: 0; }

/* Ziel (nur auf Wunsch, in der Seitenleiste) */
.objective { margin: 0; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.obj-label { font: 9px var(--mono); letter-spacing: .16em; color: #0d0d0b; background: var(--brass); padding: 3px 7px; }
.obj-done { color: var(--ok); }
.obj-open { flex-basis: 100%; font-size: 12px; color: #b9a684; }
.obj-open::before { content: "◦ "; }

/* ---------- Seitenleiste rechts ---------- */
.side { border-left: 1px solid #1e211f; background: linear-gradient(#0d0f0e, #090a0c); padding: 22px 18px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto; }
.backpack { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.slot { aspect-ratio: 1; border: 1px solid #2c2a24; background: radial-gradient(circle at 50% 35%, #1a1a17, #0d0d0c); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; color: var(--text); touch-action: none; transition: border-color .2s, transform .2s; }
.slot span { font-size: 22px; color: var(--brass-2); line-height: 1; }
.slot small { font-size: 8.5px; overflow-wrap: anywhere; color: var(--text-2); text-align: center; line-height: 1.15; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.slot:not(.empty):hover { border-color: var(--brass); }
.slot.selected { border-color: var(--brass-2); box-shadow: 0 0 0 1px var(--brass-2), 0 0 18px #d4bc9044; transform: translateY(-2px); }
.slot.empty { border-style: dashed; border-color: #1f1f1c; background: none; }
.backpack.pulse { animation: bp-pulse .6s; }
.selected-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.selected-note b { color: var(--text); font-weight: 500; }
.side-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.big-tool { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; background: var(--panel-2); border: 1px solid #2c2a24; color: var(--text-2); font-size: 12px; letter-spacing: .04em; }
.big-tool:hover { border-color: var(--brass); color: var(--text); }
.big-tool svg { width: 28px; height: 28px; fill: none; stroke: var(--brass); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.big-tool .badge { position: absolute; top: 6px; right: 8px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font: normal 10px/18px var(--mono); text-align: center; padding: 0 4px; }
.big-tool .count { position: absolute; top: 6px; right: 8px; font: normal 10px var(--mono); color: var(--brass); }
.big-tool .count.fresh { background: var(--brass); color: #0d0d0b; border-radius: 9px; padding: 1px 6px; }
.big-tool.ring { animation: ring .5s 2; }
.side-progress { margin-top: auto; }
.side-progress p { font: 10px var(--mono); letter-spacing: .12em; color: var(--muted); margin: 8px 0 0; }
.progress-track { height: 2px; background: #2a2a25; }
.progress-track div { height: 100%; width: 0; background: var(--brass); transition: width .5s; }

.drag-ghost { position: fixed; z-index: 80; pointer-events: none; transform: translate(-50%, -50%); width: 54px; height: 54px; display: grid; place-items: center; font-size: 28px; color: var(--brass-2); background: #111210e6; border: 1px solid var(--brass); border-radius: 50%; box-shadow: 0 10px 30px #000a; }

/* ---------- Telefon ---------- */
.phone-wrap { position: fixed; inset: 0; z-index: 40; background: #000000aa; display: flex; align-items: center; justify-content: flex-end; padding: 20px calc(var(--side) + 20px) 20px 20px; animation: fade .2s; }
.phone { position: relative; width: 300px; height: min(600px, calc(100vh - 40px)); background: #050505; border: 10px solid #1b1b1a; border-radius: 38px; box-shadow: 0 0 0 1px #3a3a36, 0 40px 100px #000; display: flex; flex-direction: column; overflow: hidden; animation: phone-in .3s ease-out; }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 90px; height: 20px; background: #1b1b1a; border-radius: 0 0 12px 12px; z-index: 2; }
.phone-status { display: flex; justify-content: space-between; padding: 8px 18px 6px; font: 11px var(--mono); color: #c9c4b8; }
.phone-screen { flex: 1; overflow-y: auto; background: linear-gradient(170deg, #1d2423, #0a0c0c 70%); color: #e8e3d8; font-size: 14px; }
.phone-home { height: 26px; background: #050505; border: 0; position: relative; }
.phone-home::after { content: ""; position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: 100px; height: 4px; border-radius: 2px; background: #5a5852; }
.phone-home-screen { padding: 30px 20px; text-align: center; }
.phone-time { font: 300 52px/1 var(--sans); margin: 10px 0 4px; letter-spacing: -.02em; }
.phone-date { font-size: 13px; color: #a7a397; margin: 0 0 36px; }
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 10px; }
.app { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #ddd8cc; }
.app small { font-size: 11px; }
.app-icon { position: relative; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(145deg, #3a3f3c, #1b1f1e); border: 1px solid #ffffff14; color: var(--brass-2); }
.app-icon.on { background: linear-gradient(145deg, #f3d9a3, #b69a6d); color: #1b150c; box-shadow: 0 0 22px #f3d9a366; }
.app-icon i { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font: normal 10px/18px var(--mono); }
.app-view { display: flex; flex-direction: column; min-height: 100%; }
.app-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #ffffff12; position: sticky; top: 0; background: #151a19; }
.app-back { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--brass-2); padding: 0 6px; }
.app-body { padding: 14px; }
.app-empty, .app-hint { color: #99958a; font-size: 13px; }
.app-sub { font: 10px var(--mono); letter-spacing: .16em; color: var(--brass); margin: 16px 0 8px; }
.msgs { display: grid; gap: 12px; }
.msg-from { font-size: 11px; color: #99958a; margin: 0 0 4px; }
.bubble { margin: 0; background: #2a302e; border-radius: 4px 14px 14px 14px; padding: 10px 12px; line-height: 1.5; }
.note-area { width: 100%; min-height: 260px; background: #0b0d0c; color: var(--text); border: 1px solid var(--line); padding: 12px; font: 14px/1.6 var(--sans); resize: vertical; }
.mini-plan .paper { padding: 8px; box-shadow: none; }
.room-list { list-style: none; padding: 0; margin: 0; }
.room-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #ffffff10; font-size: 13px; }
.room-list li span { font: 10px var(--mono); color: #7f7b70; }
.room-list li b { font-weight: 500; flex: 1; }
.room-list li em { font-style: normal; font-size: 11px; color: var(--brass); }
.room-list li em.dim { color: #7f7b70; }
.room-list li i { font-style: normal; color: var(--ok); }
.room-list li.here b { color: var(--brass-2); }
.hint-goal { font: 500 16px var(--serif); margin: 0 0 6px; }
.hint-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.hint-list li { border: 1px solid #ffffff14; padding: 10px 12px; }
.hint-list li b { font: 10px var(--mono); letter-spacing: .14em; color: var(--brass); text-transform: uppercase; }
.hint-list li p { margin: 6px 0 0; font-size: 14px; }
.hint-list li.closed { opacity: .5; }
.hint-list li.closed p { font-size: 12px; color: #99958a; }
.hint-list li.open { background: #ffffff08; }

/* ---------- Akte ---------- */
.akte-wrap { position: fixed; inset: 0; z-index: 40; background: #000000b8; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.akte { position: relative; width: min(720px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: linear-gradient(#6b5434, #4f3d25); border-radius: 4px 14px 14px 14px; padding: 34px 18px 14px; box-shadow: 0 40px 120px #000, inset 0 0 0 1px #8a6e45; animation: rise .3s ease-out; }
.akte-tab { position: absolute; top: -18px; left: 22px; background: #6b5434; padding: 6px 16px 4px; border-radius: 8px 8px 0 0; font: 11px var(--mono); letter-spacing: .16em; color: #f0e2c4; box-shadow: inset 0 1px 0 #8a6e45; }
.akte-close { position: absolute; top: 6px; right: 10px; background: none; border: 0; font-size: 28px; line-height: 1; color: #f0e2c4; }
.akte-book { flex: 1; min-height: 0; overflow-y: auto; perspective: 1400px; background: #d8cdb3; padding: 6px; box-shadow: inset 0 0 0 1px #b8a780; touch-action: pan-y; }
.akte-page { background: var(--paper); color: var(--ink); min-height: 420px; padding: 26px 26px 30px; transform-origin: left center; box-shadow: 4px 0 10px #0002; }
.akte-page.out-next { animation: flip-out-next .22s ease-in forwards; }
.akte-page.in-next { animation: flip-in-next .3s ease-out; }
.akte-page.out-prev { animation: flip-out-prev .22s ease-in forwards; }
.akte-page.in-prev { animation: flip-in-prev .3s ease-out; }
.akte-page .paper { box-shadow: none; padding: 0; background: none; margin: 0; }
.akte-page .paper-log { background: #1d1a17; padding: 16px; }
.akte-page .paper-plan { background: none; }
.akte-title { font: 600 26px var(--serif); margin: 0; }
.akte-sub { font: 11px var(--mono); letter-spacing: .14em; color: #6c5a44; margin: 4px 0 20px; }
.akte-index { margin: 0; padding-left: 22px; }
.akte-index li { border-bottom: 1px dotted #a89272; }
.akte-index button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 0; color: var(--ink); font: 500 16px var(--serif); display: flex; align-items: center; gap: 8px; }
.akte-index button:hover { color: #7a2a24; }
.akte-index i { margin-left: auto; font: normal 9px var(--mono); letter-spacing: .12em; background: #7a2a24; color: #fff; padding: 2px 6px; }
.akte-doc-title { font: 600 19px var(--serif); margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid #b8a780; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.akte-doc-title small { font: 10px var(--mono); letter-spacing: .12em; color: #6c5a44; }
.akte-nav { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; color: #f0e2c4; font: 11px var(--mono); letter-spacing: .12em; }
.akte-nav button { width: 44px; height: 40px; background: #3a2c1b; border: 1px solid #8a6e45; color: #f0e2c4; font-size: 22px; line-height: 1; }

/* ---------- Dialog ---------- */
dialog { background: #121413; color: var(--text); border: 1px solid #4a4030; padding: 0; width: min(620px, calc(100% - 24px)); max-height: min(88vh, 900px); box-shadow: 0 25px 100px #000; }
dialog.wide { width: min(860px, calc(100% - 24px)); }
dialog[open] { display: flex; flex-direction: column; animation: rise .25s ease-out; }
dialog::backdrop { background: #000000c0; backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.dialog-head .eyebrow { margin-bottom: 6px; font-size: 9px; }
.dialog-head h3 { font: 500 24px/1.2 var(--serif); margin: 0; }
.close-button { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--muted); padding: 0 4px; }
.close-button:hover { color: var(--text); }
.dialog-body { padding: 18px 22px 24px; overflow-y: auto; }
.inspect-text { font: 500 16px/1.75 var(--serif); color: var(--text-2); margin: 0 0 16px; }
.found-note { font: 10px var(--mono); letter-spacing: .12em; color: var(--ok); margin: 14px 0 0; }
.page-label { font: 10px var(--mono); letter-spacing: .16em; color: var(--brass); margin: 18px 0 6px; text-transform: uppercase; }
.howto { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.howto b { display: inline-block; min-width: 92px; font: 10px var(--mono); letter-spacing: .1em; color: var(--brass); text-transform: uppercase; }

/* Papier-Dokumente */
.paper { background: var(--paper); color: var(--ink); padding: 22px 24px; margin: 6px 0 0; box-shadow: 0 10px 30px #000a, inset 0 0 60px #b8a07a55; font: 15px/1.7 var(--serif); }
.paper p { margin: 0 0 10px; }
.paper .doc-head { text-align: center; font: 600 17px/1.3 var(--serif); letter-spacing: .2em; margin-bottom: 16px; }
.paper .doc-head small { font: 10px var(--mono); letter-spacing: .2em; color: #6c5a44; }
.paper .handwriting { font-style: italic; font-size: 17px; color: #2c2a5a; }
.paper .handwriting.big { font-size: 22px; line-height: 1.5; text-align: center; margin: 10px 0; }
.paper .handwriting.sign { text-align: right; }
.paper .handwriting.other { color: #6b2420; font-family: var(--sans); font-style: normal; letter-spacing: .01em; }
.paper .handwriting.margin { font-size: 15px; border-left: 2px solid #8e3b3688; padding-left: 12px; margin-top: 16px; }
.paper .mono { font: 13px/1.7 var(--mono); }
.paper .doc-banner { border: 2px solid #2a2119; padding: 8px 12px; font: 600 15px/1.4 var(--sans); text-align: center; }
.paper .doc-banner span { font-weight: 400; font-size: 13px; }
.paper .cipher-text { font: 600 20px/1.6 var(--mono); letter-spacing: .14em; text-align: center; margin: 18px 0; }
.paper .stamp { display: inline-block; border: 2px solid #2f5d4a; color: #2f5d4a; font: 600 11px var(--mono); letter-spacing: .14em; padding: 4px 10px; transform: rotate(-4deg); margin: 10px 0 4px; opacity: .8; }
.paper .smudge { color: #8a7a62; filter: blur(1.2px); letter-spacing: .1em; }
.paper .dim { color: #7b6a54; }
.doc-table, .doc-kv { width: 100%; border-collapse: collapse; font: 13px var(--mono); }
.doc-table th { text-align: left; font-size: 10px; letter-spacing: .1em; color: #6c5a44; border-bottom: 1px solid #a89272; padding: 6px; }
.doc-table td { border-bottom: 1px solid #cdbb98; padding: 7px 6px; }
.doc-table tr.struck td { text-decoration: line-through; color: #8a7a62; }
.doc-kv th { text-align: left; font-weight: 400; color: #6c5a44; padding: 5px 0; width: 40%; }
.doc-kv td { padding: 5px 0; }
.paper-log { background: #1a1816; color: #d7cbb8; box-shadow: inset 0 0 0 1px #3d342b; }
.paper-log .dim { color: #8f8373; }
.paper-plan { background: #e8dec6; padding: 14px; }
.paper-photo { background: #f1ebdc; padding: 14px; }
.photo-svg { width: 100%; display: block; border: 6px solid #fff; box-shadow: 0 2px 8px #0003; }
.caption-line { font: italic 13px var(--serif); text-align: center; margin: 10px 0 0 !important; color: #5c4d3b; }
.paper-news { background: #e4dccb; }
.news-head { font: 10px var(--mono); letter-spacing: .14em; color: #6c5a44; border-bottom: 2px solid #2a2119; padding-bottom: 6px; }
.news-title { font: 700 22px/1.2 var(--serif); margin: 6px 0 4px; }
.news-sub { font-style: italic; color: #5c4d3b; }
.plan-svg { width: 100%; display: block; }
.plan-wall { fill: none; stroke: #2a2119; stroke-width: 3; }
.plan-room { fill: #f3ebd8; stroke: #2a2119; stroke-width: 1.5; }
.plan-room.dark { fill: #cbbd9f; }
.plan-tunnel { stroke: #6b4a3a; stroke-width: 1.5; }
.plan-title { font: 11px var(--mono); letter-spacing: .14em; fill: #6c5a44; }
.plan-label { font: 600 11px var(--sans); letter-spacing: .06em; fill: #2a2119; text-anchor: middle; }
.plan-small { font: 9px var(--mono); fill: #6c5a44; text-anchor: middle; }
.plan-small.warn { fill: #8e3b36; }

/* Schlösser & Rätsel */
.lock-prompt { font: 500 16px/1.7 var(--serif); color: var(--text-2); margin: 0 0 14px; }
.clue { background: #1a1c1b; border-left: 2px solid var(--brass); padding: 14px 16px; margin: 0 0 18px; color: #d8c9b3; font: 13px/1.8 var(--mono); white-space: pre-line; }
.code-slots { display: flex; justify-content: center; gap: 10px; margin: 8px 0 18px; }
.code-slots span { width: 52px; height: 64px; border: 1px solid var(--line-2); background: #070807; display: grid; place-items: center; font: 500 28px var(--mono); color: var(--brass-2); }
.code-slots span.filled { border-color: var(--brass); }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 8px; justify-content: center; }
.keypad button { height: 54px; background: linear-gradient(#24221d, #161512); border: 1px solid #4d4232; color: var(--brass-2); font: 500 20px var(--mono); border-radius: 4px; }
.keypad button:hover { border-color: var(--brass); }
.keypad button:active { transform: translateY(1px); }
.lock-feedback { min-height: 22px; text-align: center; color: #d9958a; font-size: 14px; margin: 14px 0 0; }
.text-row { display: flex; gap: 8px; }
.text-input { flex: 1; min-width: 0; width: 100%; background: #070807; border: 1px solid var(--line-2); color: var(--text); padding: 13px 14px; font: 15px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.text-input:focus { border-color: var(--brass); outline: none; }
.submit-button { background: var(--brass); color: #12100c; border: 0; padding: 0 18px; font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.submit-button.wide { width: 100%; padding: 14px; margin-top: 8px; }
.multi-field { display: block; margin-bottom: 14px; }
.multi-field span { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.use-items { display: flex; flex-wrap: wrap; gap: 8px; }
.use-item { background: var(--panel-2); border: 1px solid var(--line-2); padding: 12px 16px; color: var(--text); }
.use-item span { color: var(--brass); }
.use-item:hover { border-color: var(--brass); }
.shake { animation: shake .4s; }
.cipher-disc { display: block; width: min(300px, 100%); margin: 6px auto 4px; }
.disc-outer { fill: #6b5434; stroke: #d4bc90; stroke-width: 3; }
.disc-inner { fill: #8a6e45; stroke: #3a2c1b; stroke-width: 2; }
.disc-hub { fill: #3a2c1b; stroke: #d4bc90; stroke-width: 2; }
.inner-ring { transform-origin: 150px 150px; transition: transform .25s ease-out; }
.outer-l { font: 600 15px var(--mono); fill: #f3e6c8; text-anchor: middle; }
.inner-l { font: 600 13px var(--mono); fill: #1d150e; text-anchor: middle; }
.disc-mark { fill: #a3473c; }
.disc-center { font: 10px var(--mono); letter-spacing: .2em; fill: #d4bc90; text-anchor: middle; }
.cipher-readout { text-align: center; font: 13px var(--mono); color: var(--text-2); margin: 4px 0 0; }
.cipher-buttons { justify-content: center; margin-top: 10px; }
.cipher-buttons .ghost-button { font-size: 20px; padding: 6px 16px; }
.choice-step { border: 1px solid var(--line); padding: 10px 14px 12px; margin: 0 0 12px; }
.choice-step legend { font: 500 15px var(--serif); color: var(--text); padding: 0 6px; }
.choice-opt { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; color: var(--text-2); cursor: pointer; }
.choice-opt input { accent-color: var(--brass); width: 17px; height: 17px; }
.choice-step.done { border-color: #3d4a3a; background: #141a14; }
.choice-step.done legend::after { content: "  ✓"; color: var(--ok); }
.choice-step.done .choice-opt:not(:has(input:checked)) { display: none; }
.choice-step.done .choice-opt span { color: var(--ok); font-weight: 600; }
.choice-step { animation: rise .3s ease-out; }
.choice-next { font: italic 500 15px var(--serif); color: var(--brass-2); margin: -4px 0 12px; }
.akte-index em.proof { font: normal 9px var(--mono); letter-spacing: .12em; color: #fff; background: #2f5d4a; padding: 2px 6px; margin-left: auto; }
.akte-index em.proof + i { margin-left: 6px; }
.wheels.many { gap: 4px; }
.wheels.many .wheel-letter, .wheels.many .wheel button[data-wheel] { width: 40px; }
.strips { list-style: none; padding: 0; margin: 8px 0 6px; display: grid; gap: 2px; }
.strip { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 10px 10px 18px; background: #e6dcc3; color: #2c2a5a; font: italic 500 17px/1.3 var(--serif); cursor: grab; touch-action: none; user-select: none; transition: transform .15s, gap .2s; }
.strip:nth-child(odd) { background: #e9e0c8; }
.strip.dragging { cursor: grabbing; z-index: 2; box-shadow: 0 10px 24px #000a; transition: none; }
.strip-text { flex: 1; }
.strip-btns { display: flex; flex-direction: column; gap: 2px; }
.strip-btns button { width: 30px; height: 20px; padding: 0; border: 1px solid #a89272; background: #d8cdb3; color: #4f3c27; font-size: 10px; border-radius: 3px; }
.strips.done { gap: 0; }
.strips.done .strip { clip-path: none !important; background: #e9e0c8; }
.strips.done .strip-btns { visibility: hidden; }
.strips.plain { gap: 8px; }
.strips.plain .strip { background: #161816; color: var(--text); font: 500 14px/1.35 var(--sans); padding: 8px 10px; border: 1px solid #2f332f; }
.strips.plain .strip:nth-child(odd) { background: #191b19; }
.strips.plain .strip svg { width: 92px; height: 60px; flex: none; border: 1px solid #3a3f3a; }
.strips.plain .strip-btns button { background: #2a2d29; border-color: #4a4f48; color: var(--brass-2); }
.strips.plain.done .strip { border-color: #3d4a3a; }
.paper-screen { background: #070a08; color: #b6e0c4; font: 13px/1.6 var(--mono); box-shadow: inset 0 0 40px #000, 0 10px 30px #000a; position: relative; overflow: hidden; }
.paper-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, #ffffff08 0 1px, transparent 1px 3px); }
.paper-screen svg { width: 100%; display: block; border: 1px solid #1d2a22; }
.paper-screen .ts { color: #e6f5c9; letter-spacing: .1em; }
.paper-screen .sub { opacity: 0; animation: subline .6s ease-out forwards; }
.paper-screen .sub:nth-of-type(2) { animation-delay: 1.2s; } .paper-screen .sub:nth-of-type(3) { animation-delay: 3s; } .paper-screen .sub:nth-of-type(4) { animation-delay: 4.6s; } .paper-screen .sub:nth-of-type(5) { animation-delay: 6s; }
@keyframes subline { to { opacity: 1; } }
.walker { animation: walk 9s linear infinite; }
@keyframes walk { 0% { transform: translateX(0); opacity: 0; } 8% { opacity: 1; } 70% { opacity: 1; } 85%, 100% { transform: translateX(-330px); opacity: 0; } }
.scan-noise { animation: noise .25s steps(2) infinite; }
@keyframes noise { 50% { transform: translateY(-3px); } }
.wheels { display: flex; justify-content: center; gap: 8px; margin: 6px 0 16px; }
.wheel { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wheel button[data-wheel] { width: 48px; height: 34px; background: linear-gradient(#24221d, #161512); border: 1px solid #4d4232; color: var(--brass-2); font-size: 12px; border-radius: 4px; }
.wheel button[data-wheel]:hover { border-color: var(--brass); }
.wheel-letter { width: 48px; height: 60px; padding: 0; cursor: pointer; display: grid; place-items: center; background: linear-gradient(#0b0b0a, #1e1b16 50%, #0b0b0a); border: 1px solid var(--brass); font: 500 28px var(--serif); color: var(--brass-2); }
.wheel-letter.tick { animation: tick .18s; }
.wheel-letter.active { box-shadow: 0 0 0 2px var(--brass-2), 0 0 18px #d4bc9055; }
.wheel-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 0 auto 14px; max-width: 340px; }
.wheel-picker button { height: 38px; background: #181a19; border: 1px solid #4d4232; color: var(--brass-2); font: 500 16px var(--serif); border-radius: 3px; }
.wheel-picker button:hover { border-color: var(--brass); }
@keyframes tick { from { transform: translateY(-6px); opacity: .4; } }
.secret-note { font: 10px var(--mono); letter-spacing: .12em; color: #d4bc90; margin: 0 0 14px; }
.stage .lightning-only { opacity: 0; transition: opacity .05s; }
body.flash .stage .lightning-only { opacity: 1; }
.solved-box { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #3d4a3a; background: #141a14; padding: 14px 16px; margin-top: 12px; }
.solved-box span { color: var(--ok); font-size: 18px; }
.solved-box p { margin: 0; font-size: 14px; color: var(--text-2); }
.success-box { text-align: center; }
.success-mark { width: 56px; height: 56px; margin: 4px auto 14px; border: 1px solid var(--ok); border-radius: 50%; display: grid; place-items: center; color: var(--ok); font-size: 24px; animation: pop .5s ease-out; }
.success-box > p { font: 500 16px/1.75 var(--serif); color: var(--text-2); }
.gained { text-align: left; background: #181a19; border: 1px solid var(--line); padding: 14px 16px; margin-top: 16px; }
.gained ul { margin: 0; padding: 0; list-style: none; }
.gained li { padding: 4px 0; }
.unlock-note { font-size: 14px; color: var(--brass-2) !important; font-family: var(--sans) !important; margin-top: 16px; }
.success-box .button-row { justify-content: center; }
.menu-list { display: grid; gap: 14px; }
.switch { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.switch input { width: 18px; height: 18px; accent-color: var(--brass); }
.stats { display: flex; flex-wrap: wrap; gap: 8px 22px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; color: var(--muted); }
.stats b { color: var(--text); font-weight: 500; }

/* ---------- Ende ---------- */
.ending-screen { text-align: center; padding: 8vh 20px; max-width: 760px; margin: 0 auto; }
.ending-seal { width: 70px; height: 70px; border: 1px solid var(--brass); border-radius: 50%; display: grid; place-items: center; color: var(--brass); font: 34px var(--serif); margin: 28px auto; }
.ending-lead { font: 500 20px var(--serif); color: var(--text-2); }
.ending-letter { text-align: left; margin: 34px auto; max-width: 580px; }
.ending-letter .sign { text-align: right; font-style: italic; }
.ending-personal { font: italic 500 18px/1.8 var(--serif); color: var(--brass-2); white-space: pre-line; margin: 30px 0; }

/* ---------- Animationen ---------- */
@keyframes pulse { 50% { opacity: .35; } }
@keyframes flicker { 0%, 100%, 90% { opacity: 1; } 91% { opacity: .35; } 92% { opacity: .9; } 94% { opacity: .5; } 95% { opacity: 1; } }
@keyframes rain { from { transform: translateY(-40px); } to { transform: translateY(40px); } }
@keyframes rain-down { from { transform: translate(6px, -80px); } to { transform: translate(-6px, 80px); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes turn-r { from { transform: translateX(10%); opacity: 0; filter: blur(6px); } }
@keyframes turn-l { from { transform: translateX(-10%); opacity: 0; filter: blur(6px); } }
@keyframes leave { to { transform: scale(1.4); opacity: 0; filter: blur(4px); } }
@keyframes arrive { from { opacity: 0; transform: scale(.96); filter: brightness(0); } }
@keyframes glint { 0%, 100% { box-shadow: 0 0 0 #0000; } 50% { box-shadow: 0 0 18px #f3d9a355; } }
@keyframes bp-pulse { 40% { transform: scale(1.04); filter: brightness(1.4); } }
@keyframes ring { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes phone-in { from { transform: translateY(40px); opacity: 0; } }
@keyframes flip-out-next { to { transform: rotateY(-75deg); opacity: .2; } }
@keyframes flip-in-next { from { transform: rotateY(40deg); opacity: .4; } }
@keyframes flip-out-prev { to { transform: rotateY(75deg); opacity: .2; } }
@keyframes flip-in-prev { from { transform: rotateY(-40deg); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  :root { --side: 240px; }
  .intro-screen { grid-template-columns: 1fr; gap: 40px; }
  .intro-visual { max-width: 460px; }
  .vertical-label { display: none; }
}

/* ---------- Smartphone ---------- */
@media (max-width: 760px) {
  :root { --topbar: 52px; }
  .brand > span:last-child { display: none; }
  .intro-screen { padding: 36px 16px 40px; }
  .intro-copy h1 { font-size: 64px; }
  .primary-button { width: 100%; }
  .game-screen { display: block; }
  .scene { max-width: none; min-width: 0; border-left: 0; border-right: 0; }
  .turn { padding: 12px 6px; }
  .turn small, .turn:hover small, .turn:focus-visible small { display: none; }
  .view-label { white-space: nowrap; }
  .view-label { top: 8px; font-size: 9px; padding: 4px 9px; }
  .phone-wrap { justify-content: center; padding: 16px; }
  .phone { width: min(320px, 100%); height: min(620px, calc(100vh - 32px)); }
  .akte { padding: 30px 8px 10px; }
  .akte-page { padding: 18px 16px 22px; min-height: 360px; }
  .dialog-head { padding: 16px 16px 12px; }
  .dialog-body { padding: 16px 16px 22px; }
  .paper { padding: 16px; font-size: 14px; }
  .doc-table { font-size: 11px; }
  .doc-table th, .doc-table td { padding: 6px 3px; }
  .keypad { grid-template-columns: repeat(3, 1fr); }
  .code-slots span { width: 46px; height: 56px; }
  .wheels.many .wheel-letter, .wheels.many .wheel button[data-wheel] { width: 34px; }
  .wheels.many .wheel-letter { font-size: 22px; height: 52px; }
  .card-object { width: 70px; height: 78px; }
  .card-object .glyph { font-size: 22px; }
  .card-object small { font-size: 7.5px; }
  .draft-cards { gap: 8px; }
}

/* ========== Gemeinsam spielen (Plattform-Lobby im Hotel-Design) ========== */
.mp-root { --mp-accent: var(--brass); --mp-accent-2: var(--brass-2); --mp-text: var(--text); --mp-text-2: var(--text-2); --mp-muted: var(--muted); --mp-line: #302b22; --mp-ok: var(--ok); --mp-error: var(--red); --mp-serif: var(--serif); --mp-mono: var(--mono); --mp-sans: var(--sans); }
/* Während einer Sitzung startet man über die Lobby, nicht über den Einzelspieler-Knopf */
.mp-session #startButton, .mp-session #newGameLink, .mp-mode #startButton, .mp-mode #newGameLink { display: none; }
.mp-team-list { list-style: none; margin: 0; padding: 0; }
.mp-team-list li { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid #24231e; font-size: 12px; }
.mp-team-list b { color: var(--text-2); font-weight: 500; }
.mp-team-list span { color: var(--muted); font: 10px var(--mono); letter-spacing: .06em; }
.mp-menu { padding: 10px 12px; border: 1px solid var(--line-2); background: #0d0e0d; font-size: 13px; color: var(--text-2); }
.mp-menu p { margin: 0; } .mp-menu .eyebrow { margin-bottom: 4px; }
.mp-toast { position: fixed; left: 50%; bottom: 22px; z-index: 60; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; max-width: min(92vw, 560px); padding: 11px 16px; background: #0b0b0af2; border: 1px solid #5a4a33; color: var(--text-2); font-size: 13px; line-height: 1.5; box-shadow: 0 12px 30px #000a; transition: opacity .3s, transform .3s; }
.mp-toast.show { opacity: 1; transform: translate(-50%, 0); }
.mp-toast b { color: var(--brass-2); font-weight: 500; }
@media (max-width: 760px) {
  .mp-toast { bottom: auto; top: calc(var(--topbar) + 10px); }
}

/* ========== Rätseltyp „Folge“ (Bedienelemente nacheinander betätigen) ========== */
.seq-panel { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; margin: 12px 0 6px; padding: 14px; background: linear-gradient(#2a2d29, #1c1e1b); border: 2px solid #3a3f3a; border-radius: 6px; box-shadow: inset 0 2px 10px #0008; }
.seq-ctl { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 12px; background: #151714; border: 1px solid #3a3f3a; color: #cfd6c8; border-radius: 4px; cursor: pointer; min-width: 0; }
.seq-ctl:hover { border-color: var(--brass); }
.seq-ctl b { font: 500 12px var(--mono); letter-spacing: .06em; text-align: center; }
.seq-ctl small { font: 10px var(--mono); color: #8a8f88; }
.seq-art svg { width: 64px; height: 96px; display: block; overflow: visible; }
.seq-handle { transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); transform-box: fill-box; transform-origin: var(--origin, center); }
.seq-ctl.on .seq-handle { transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--rot, 0deg)); }
.seq-lamp { fill: #3a2a24; transition: fill .2s; }
.seq-ctl.on .seq-lamp { fill: #e8b25a; }
.seq-ctl.on { border-color: #8a7348; background: #1d1b15; }
.lock-seq.done .seq-lamp { fill: #9fe0b0; }
.lock-seq.done .seq-ctl { border-color: #5d7a64; }
.seq-trail { min-height: 1.5em; margin: 4px 0 0; font: 12px var(--mono); color: var(--brass-2); letter-spacing: .06em; text-align: center; }
@media (max-width: 760px) {
  .seq-panel { gap: 6px; padding: 10px; }
  .seq-art svg { width: 48px; height: 72px; }
  .seq-ctl b { font-size: 10px; }
}

/* Keller: Startanleitung und Wandplan */
.paper ol.steps { padding-left: 24px; line-height: 2; margin: 8px 0; }
.paper .stain { background: radial-gradient(ellipse at 40% 50%, #8a7a5870, transparent 75%); padding: 2px 6px; }
.paper .big-seq { font-size: 20px; text-align: center; letter-spacing: .12em; margin: 14px 0; }

/* ========== Szene im Mittelpunkt: Untertitel, Momente, Chips ========== */
.subtitle { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; margin: 0; padding: 34px clamp(16px, 6%, 70px) 14px; background: linear-gradient(transparent, #000000d9 42%); color: #e6dfd3; font: 500 16px/1.55 var(--serif); text-align: center; text-shadow: 0 1px 3px #000; pointer-events: none; opacity: 0; transform: translateY(8px); transition: opacity .45s, transform .45s; }
.subtitle.show { opacity: 1; transform: none; }
.subtitle b { color: var(--brass-2); font-weight: 500; }
.moment { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 8%; background: radial-gradient(ellipse at 50% 50%, #000000c8, #000000f0); opacity: 0; pointer-events: none; transition: opacity .6s; cursor: pointer; }
.moment.show { opacity: 1; pointer-events: auto; }
.moment p { margin: 0; max-width: 34em; color: #efe7d8; font: italic 400 clamp(17px, 2.2vw, 24px)/1.6 var(--serif); text-align: center; text-shadow: 0 2px 12px #000; transform: translateY(6px); transition: transform .8s; }
.moment.show p { transform: none; }
.moment p b { color: var(--brass-2); font-weight: 500; font-style: normal; }
.held-chip { position: absolute; top: 46px; right: 10px; z-index: 4; display: flex; align-items: center; gap: 6px; max-width: 60%; background: #0b0b0ae6; color: var(--brass-2); border: 1px solid #8a7348; padding: 6px 12px; font: 11px var(--mono); letter-spacing: .04em; border-radius: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.held-chip span { color: var(--muted); font-size: 14px; line-height: 1; }
.scene-action { position: absolute; right: 12px; bottom: 14px; z-index: 5; background: var(--brass); color: #0d0d0b; border: 0; padding: 10px 16px; font: 500 13px var(--sans); }
.goal-block .objective { font-size: 12px; line-height: 1.5; }
.gear-toggle, .side-close, .side-backdrop { display: none; }

/* ---------- Smartphone und Querformat: Raum füllt den Bildschirm, Ausrüstung ausklappbar ---------- */
@media (max-width: 760px), (max-height: 520px) and (orientation: landscape) {
  .game-screen { display: block; }
  .play { padding: 0; min-height: calc(100svh - var(--topbar)); display: flex; flex-direction: column; justify-content: center; }
  .scene { max-width: none; min-width: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .subtitle { font-size: 14px; padding: 28px 46px 10px; }
  .moment p { font-size: 17px; }
  .side { position: fixed; top: 0; right: 0; bottom: 0; left: auto; z-index: 45; width: min(320px, 86vw); height: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); flex-direction: column; flex-wrap: nowrap; gap: 18px; border-left: 1px solid #2c2a24; border-top: 0; background: #0b0c0bfa; overflow-y: auto; transform: translateX(105%); transition: transform .3s ease; box-shadow: -20px 0 50px #000a; }
  .drawer-open .side { transform: none; }
  .side-block { flex: none; }
  .side-block .eyebrow { display: block; }
  .backpack { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .slot small { display: -webkit-box; }
  .side-tools { display: grid; }
  .side-progress { display: block; margin-top: 0; }
  .side-close { display: block; position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; }
  .side-backdrop { display: block; position: fixed; inset: 0; z-index: 44; background: #000a; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .drawer-open .side-backdrop { opacity: 1; pointer-events: auto; }
  #game:not(.hidden) ~ .gear-toggle, .game-screen:not(.hidden) .gear-toggle { display: grid; }
  .gear-toggle { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 35; width: 56px; height: 56px; place-items: center; border-radius: 50%; background: #0d0e0de6; border: 1px solid #8a7348; box-shadow: 0 8px 24px #000c; }
  .gear-toggle svg { width: 26px; height: 26px; fill: none; stroke: var(--brass-2); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
  .gear-toggle .badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff; font: 10px/20px var(--mono); text-align: center; padding: 0 5px; }
  .gear-toggle .badge.dot { background: var(--brass); color: #0d0d0b; }
  .drawer-open .gear-toggle { opacity: 0; pointer-events: none; }
  .mp-toast { bottom: auto; top: calc(var(--topbar) + 10px); }
}
@media (max-height: 520px) and (orientation: landscape) {
  :root { --topbar: 42px; }
  .play { min-height: calc(100svh - var(--topbar)); }
  .scene { max-width: calc((100svh - var(--topbar)) * 4 / 3); }
  .turn small, .turn:hover small, .turn:focus-visible small { display: none; }
}

/* Hinweis: Smartphone quer halten */
.rotate-hint { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 24px; background: #000000d0; opacity: 0; pointer-events: none; transition: opacity .4s; }
.rotate-hint.show { opacity: 1; pointer-events: auto; }
.rotate-card { max-width: 300px; padding: 26px 24px 22px; text-align: center; background: linear-gradient(#141614, #0b0c0b); border: 1px solid #5a4a33; box-shadow: 0 20px 60px #000; }
.rotate-icon { width: 76px; height: 76px; fill: none; stroke: var(--brass-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: rotate-phone 2.6s ease-in-out infinite; }
.rotate-title { margin: 10px 0 6px; color: var(--text); font: 500 22px var(--serif); }
.rotate-text { margin: 0 0 18px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.rotate-card .primary-button { width: auto; }
@keyframes rotate-phone { 0%, 25% { transform: rotate(0); } 55%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }

/* Hinweise: Auswahl bei parallel offenen Aufgaben */
.hint-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.hint-tab { flex: 1; min-width: 0; padding: 8px 6px; background: none; border: 1px solid #3a3a32; color: var(--text-2); font: 11px var(--mono); letter-spacing: .04em; }
.hint-tab.on { border-color: var(--brass); color: var(--brass-2); background: #b69a6d14; }

/* ========== Raum 7: Brief, Tresor mit Akte, Torszene ========== */
.paper .smudge { color: transparent; text-shadow: 0 0 5px #2c2a5a99; }
.akte-peek { margin: 4px 0 10px; }
.akte-peek small { color: var(--muted); font-size: 11px; }
.lock-scene { display: block; margin: 0 0 12px; border: 1px solid #2e2a22; }
.lock-scene svg { display: block; width: 100%; height: auto; }

.ending-bonus { display: block; margin: 0 0 8px; color: var(--brass-2); font: italic 15px var(--serif); letter-spacing: 0; text-transform: none; }

/* ========== Prolog: Fallakte und Ankunft ========== */
.prolog { position: fixed; inset: 0; z-index: 72; display: none; background: #050605; }
.prolog.show { display: block; animation: pz-fade .8s ease; }
@keyframes pz-fade { from { opacity: 0; } }
.prolog.casefile { overflow-y: auto; padding: clamp(18px, 6vh, 70px) 16px; background: radial-gradient(ellipse at 50% 0, #1d2423 0, transparent 60%), #070807; }
.pz-file { max-width: 620px; margin: 0 auto; animation: pz-fade .6s ease; }
.pz-file h2 { margin: 6px 0 22px; font: 500 clamp(30px, 5vw, 46px)/1.1 var(--serif); color: var(--text); }
.pz-body p { font: 400 clamp(16px, 2vw, 19px)/1.75 var(--serif); color: var(--text-2); margin: 0 0 16px; }
.pz-body b { color: var(--brass-2); font-weight: 500; }
.pz-card { margin: 18px 0; padding: 18px 20px; background: linear-gradient(#efe6d0, #e2d6ba); color: #2a2119; box-shadow: 0 14px 40px #000a; transform: rotate(-.6deg); }
.pz-card .doc-head { text-align: center; font: 600 13px var(--mono); letter-spacing: .18em; margin: 0 0 10px; }
.pz-card .doc-kv { width: 100%; font: 13px var(--mono); }
.pz-card .doc-kv th { text-align: left; color: #6c5a44; font-weight: 400; padding: 3px 10px 3px 0; }
.pz-card .handwriting { font: italic 19px var(--serif); color: #2c2a5a; margin: 14px 0 0; }
.pz-card .handwriting.sign { text-align: right; margin-top: 4px; }
.pz-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.pz-nav .primary-button { width: auto; }
.pz-dots { display: flex; gap: 8px; }
.pz-dots i { width: 7px; height: 7px; border-radius: 50%; background: #3a3a32; }
.pz-dots i.on { background: var(--brass); }

/* ========== Filmische Sequenzen: Ankunft (Prolog) und Finale ========== */
.finale { position: fixed; inset: 0; z-index: 70; display: none; background: #050605; }
.finale.show { display: block; animation: pz-fade 1.2s ease; }
.cine { overflow: hidden; }
.cine-scene { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s; }
.cine-scene.in { opacity: 1; }
.cine-scene svg { width: 100%; height: 100%; display: block; }
.cine-scene .pz-rain, .cine-scene .fz-rain { animation: rain-down .7s linear infinite; transition: opacity 6s; }
.cine-scene .pz-door-l, .cine-scene .pz-door-r, .cine-scene .fz-gate-l, .cine-scene .fz-gate-r { transition: transform 4s cubic-bezier(.4, 0, .2, 1); transform-box: fill-box; }
.cine-scene .pz-door-l, .cine-scene .fz-gate-l { transform-origin: 0 50%; }
.cine-scene .pz-door-r, .cine-scene .fz-gate-r { transform-origin: 100% 50%; }
.cine-scene.open .pz-door-l, .cine-scene.open .pz-door-r, .cine-scene.open .fz-gate-l, .cine-scene.open .fz-gate-r { transform: scaleX(.12); }
.cine-scene .fz-yard { transition: opacity 3s; opacity: .5; }
.cine-scene.open .fz-yard { opacity: 1; }
.cine-scene.calm .fz-rain { opacity: .2; }
.cine-scene .ep-217 { transition: opacity 5s 2s; }
.cine-scene.dim217 .ep-217 { opacity: 0; }
.cine-scene.dim217 svg { animation: cine-push 9s ease-out forwards; }
@keyframes cine-push { from { transform: scale(1.08); } to { transform: scale(1); } }
.cine-text, .cine-msg { position: absolute; left: 50%; bottom: 96px; transform: translate(-50%, 10px); width: min(92vw, 660px); text-align: center; opacity: 0; transition: opacity 1.2s, transform 1.2s; pointer-events: none; }
.cine-text.show, .cine-msg.show { opacity: 1; transform: translate(-50%, 0); }
.cine-text p { margin: 0; padding: 14px 18px; background: #000000b8; color: #efe7d8; font: italic 400 clamp(17px, 2.3vw, 23px)/1.6 var(--serif); text-shadow: 0 2px 10px #000; }
.cine-text.big { bottom: 50%; transform: translate(-50%, 50%); }
.cine-text.big p { background: none; font-size: clamp(22px, 3.4vw, 34px); font-style: normal; }
.cine-msg { width: min(92vw, 440px); text-align: left; bottom: 90px; }
.cine-msg .bubble { margin: 0; padding: 14px 16px; background: #1d2421f2; border: 1px solid #3a4a3f; border-radius: 14px 14px 14px 4px; color: #e6dfd3; font: 15px/1.55 var(--sans); box-shadow: 0 10px 30px #000c; max-height: 56vh; overflow: auto; }
.cine-msg-from { margin: 0 0 6px 4px; color: var(--brass); font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.cine-letter { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px 16px 90px; background: radial-gradient(ellipse at 50% 40%, #1a1714, #050505); opacity: 0; transition: opacity 1.4s; pointer-events: none; }
.cine-letter.show { opacity: 1; }
.cine-letter-box { width: min(92vw, 600px); max-height: calc(100vh - 140px); overflow: hidden; }
.cine-letter-head { margin: 0 0 14px; text-align: center; color: var(--brass-2); font: italic 17px var(--serif); }
.cine-letter-roll .paper { margin: 0; box-shadow: 0 20px 60px #000c; transform: rotate(-.4deg); }
.cine-btn { position: absolute; right: 20px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 2; background: none; border: 1px solid #5a4a33; color: var(--brass-2); padding: 10px 16px; font: 12px var(--mono); letter-spacing: .08em; }
.cine-btn.final { background: var(--brass); color: #0d0d0b; border: 0; font: 500 15px var(--sans); padding: 13px 20px; }
.ending-letter-wrap { margin: 30px auto 0; max-width: 580px; text-align: left; }
.ending-letter-wrap summary { cursor: pointer; color: var(--brass-2); font: 12px var(--mono); letter-spacing: .1em; text-align: center; list-style: none; padding: 10px; border: 1px solid #3a3226; }
.ending-letter-wrap summary::-webkit-details-marker { display: none; }
.ending-letter-wrap[open] summary { margin-bottom: 14px; }
.ending-letter-wrap .ending-letter { margin: 0; }
