/* ============================================================
   chapters.css – Räume und Rätselansichten der Kapitel 2–4
   Baut auf style.css auf (gleiche Farben, Knöpfe, Fokus).
   ============================================================ */

/* ---------- Kopfzeile, Kapitelanzeige, Archiv ---------- */
.title-wrap { display: flex; flex-direction: column; gap: 2px; }
.chapter-label { margin: 0; font-weight: 800; color: var(--ink-soft); font-size: .95rem; }
.room-wrap:focus { outline: none; }
.room-wrap:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.scene { display: block; width: 100%; height: auto; border-radius: 12px; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }

.inventory-archive { margin-top: 10px; border-top: 2px dashed #eadfd8; padding-top: 8px; }
.inventory-archive summary { cursor: pointer; font-weight: 800; color: var(--ink-soft); font-size: .9rem; padding: 4px 0; border-radius: 8px; }
.inventory-archive summary:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.archive-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.archive-item { display: flex; flex-direction: column; align-items: center; font-size: .72rem; font-weight: 700; color: var(--ink-soft); background: #faf4f0; border-radius: 10px; padding: 4px; opacity: .85; }
.archive-item svg { width: 34px; height: 34px; }

.btn-small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.chapter-badge { display: inline-block; background: var(--mint); border-radius: 999px; padding: 4px 14px; font-weight: 800; margin: 0 0 10px; }

/* Kapitelauswahl */
.chapter-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chapter-btn {
  width: 100%; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px;
  font: inherit; text-align: left; color: var(--ink); background: #fff; border: 3px solid #eadfd8; border-radius: 16px;
  padding: 10px 14px; cursor: pointer; min-height: 64px;
}
.chapter-btn:hover:not([disabled]) { border-color: var(--sun); }
.chapter-btn:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.chapter-btn.here { border-color: var(--rose-deep); background: #fff2f5; }
.chapter-btn.done .chapter-state { color: #4f8a4a; }
.chapter-btn[disabled] { opacity: .55; cursor: default; }
.chapter-nr { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.3rem; background: var(--sun); }
.chapter-name { font-weight: 800; }
.chapter-state { font-weight: 700; font-size: .9rem; color: var(--ink-soft); }

/* Hinweisbuch nach Kapiteln */
.clue-section + .clue-section { margin-top: 16px; }
.clue-section h3 { margin: 0 0 8px; font-size: 1.02rem; }
.clue-section h3 small { color: var(--ink-soft); font-weight: 700; }

/* Bäri freut sich */
.baeri.cheer > * { animation: cheer 1.1s ease; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes cheer { 0%, 100% { transform: none; } 25% { transform: translateY(-14px) rotate(-4deg); } 50% { transform: translateY(0) rotate(0); } 70% { transform: translateY(-8px) rotate(4deg); } }

/* Tatzenabdrücke glitzern */
.paw ellipse, .paw circle { animation: pawShine 3s ease-in-out infinite; animation-delay: inherit; }
.paw { animation: pawShine 3s ease-in-out infinite; }
@keyframes pawShine { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.twinkle { animation: twinkle 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* ---------- Kapitel 2: Flur (Szene) ---------- */
.scene-hall .flap { transform-box: fill-box; transform-origin: 50% 0; transition: transform .8s cubic-bezier(.34, 1.4, .64, 1); }
.scene-hall.is-pics-solved .flap { transform: scaleY(.08); }
.scene-hall .flap-symbol { opacity: 0; transition: opacity .4s ease .4s; }
.scene-hall.is-pics-solved .flap-symbol { opacity: 1; }
.scene-hall .secret-drawer { transform: translateY(-40px); transition: transform 1s ease; }
.scene-hall.is-drawer-open .secret-drawer { transform: translateY(0); }
.scene-hall.is-note-solved .secret-drawer rect:not(:first-child) { opacity: 0; }
.scene-hall .key-glint { display: none; }
.scene-hall.is-note-solved:not(.is-key-found) .key-glint { display: block; }
.scene-hall.is-note-solved:not(.is-key-found) .key-glint circle { animation: twinkle 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.scene .door-light { opacity: 0; transition: opacity 1.2s ease .3s; }
.scene .door-panel { transform-box: fill-box; transform-origin: 0% 50%; transition: transform 1.6s cubic-bezier(.4, 0, .2, 1); }
.scene.is-door-open .door-panel { transform: scaleX(.14) skewY(8deg); }
.scene.is-door-open .door-light { opacity: 1; }
.scene.no-anim * { transition: none !important; }

/* ---------- Kapitel 2: Ansichten ---------- */
.frame-hint { text-align: center; font-style: italic; font-weight: 700; color: #7b3c52; margin: 0 0 10px; }
.pic-large { display: flex; flex-direction: column; align-items: center; margin-bottom: 10px; }
.pic-large .pic-thumb.big { width: min(360px, 100%); height: auto; border-radius: 10px; border: 6px solid #c58a5a; }
.pic-large p { margin: 6px 0 0; }
.pic-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pic-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pic-btn { padding: 0; border: 5px solid #c58a5a; border-radius: 10px; background: #fff; cursor: pointer; width: 100%; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease; }
.pic-btn .pic-thumb { display: block; width: 100%; height: auto; border-radius: 4px; }
.pic-btn:hover { transform: translateY(-3px); }
.pic-btn:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.pic-slot.selected .pic-btn { border-color: var(--sun-deep); box-shadow: 0 0 0 5px #ffe9a8; transform: translateY(-6px) rotate(-1.5deg); }
.pic-row.settle .pic-btn { animation: settle .6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes settle { 0% { transform: scale(.96); } 60% { transform: scale(1.03); } 100% { transform: none; } }
.pic-flap { width: 64px; height: 44px; border-radius: 8px; background: #c58a5a; display: grid; place-items: center; overflow: hidden; position: relative; }
.pic-flap svg { width: 34px; height: 34px; opacity: 0; transition: opacity .4s ease .4s; }
.pic-flap.open { background: #5a4b57; }
.pic-flap.open svg { opacity: 1; }
.pic-flap::after { content: ""; position: absolute; inset: 0; background: #c58a5a; border-radius: 8px; transform-origin: 50% 0; transition: transform .7s ease; }
.pic-flap.open::after { transform: scaleY(0); }

.portrait-view { text-align: center; }
.portrait-big { width: 200px; height: auto; }

.seq-display { display: flex; justify-content: center; gap: 10px; margin-bottom: 16px; }
.seq-display .slot { width: 60px; height: 60px; border-radius: 14px; background: #fff; border: 3px dashed #c58a5a; display: grid; place-items: center; }
.seq-display .slot svg { width: 44px; height: 44px; }
.seq-display .slot.filled { border-style: solid; animation: pop .25s ease; }
.seq-5 .slot { width: 54px; height: 54px; }

.dresser-view { display: flex; flex-direction: column; align-items: center; }
.drawer-grid { display: grid; grid-template-columns: repeat(2, minmax(130px, 200px)); gap: 10px; background: #b57a4c; padding: 12px; border-radius: 14px; }
.drawer-btn {
  font: inherit; font-weight: 800; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 74px; background: #f1dfcf; border: 3px solid #9c6740; border-radius: 10px; cursor: pointer; box-shadow: inset 0 -5px 0 #e0c6b5;
  transition: transform .15s ease;
}
.drawer-btn svg { width: 44px; height: 44px; }
.drawer-btn:hover:not([disabled]) { transform: translateY(-2px); }
.drawer-btn:active:not([disabled]) { transform: translateY(4px); }
.drawer-btn:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.drawer-btn[disabled] { opacity: .7; cursor: default; }
.secret-view { margin-top: 14px; width: min(420px, 100%); height: 70px; background: #5a4b57; border-radius: 10px; overflow: hidden; animation: slideOpen .9s ease; display: grid; place-items: center; }
@keyframes slideOpen { from { height: 0; } to { height: 70px; } }
.secret-paper { display: flex; gap: 10px; }
.paper-bit { width: 52px; height: 34px; background: #fff8e6; border: 2px solid #e0c6b5; border-radius: 3px; display: block; }

.note-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 6px; justify-content: center; transition: gap .5s ease; }
.note-grid.solved { gap: 0; }
.note-cell { padding: 0; background: transparent; border: 3px solid transparent; border-radius: 10px; cursor: pointer; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.note-cell:focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; }
.note-cell.selected { border-color: var(--sun-deep); background: #fff6d6; transform: scale(1.04); }
.note-cell[disabled] { cursor: default; }
.note-piece-svg { display: block; width: 100%; height: auto; }

.shoe-art svg { width: 180px; height: 150px; }

/* ---------- Kapitel 3: Wohnzimmer (Szene) ---------- */
.scene-living .hidden-flute, .scene-living .hidden-violin, .scene-living .hidden-glock { opacity: .9; }
.scene-living.found-flute .hidden-flute, .scene-living.found-violin .hidden-violin, .scene-living.found-glock .hidden-glock { display: none; }
.scene-living.found-flute .pillow { transform: rotate(-14deg) translate(-10px, -8px); transform-box: fill-box; transform-origin: center; }
.scene-living .stage-notes { opacity: 0; }
.scene-living.is-playing .stage-notes { opacity: 1; }
.scene-living.is-playing .stage-notes text { animation: floatNote 2s ease-in-out infinite; }
.scene-living.is-playing .stage-fig { animation: bob .5s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.scene-living .spotlight { opacity: 0; transition: opacity .8s ease; }
.scene-living.is-lineup-solved .spotlight { opacity: 1; }
.scene-living .chest-lid-living { transform-box: fill-box; transform-origin: 0% 100%; transition: transform .7s cubic-bezier(.34, 1.56, .64, 1); }
.scene-living.is-chest-open .chest-lid-living { transform: rotate(-30deg); }
.scene-living .chest-glow { display: none; }
.scene-living.is-chest-open:not(.is-door-open) .chest-glow { display: block; animation: twinkle 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.scene-living .moon-handle { opacity: 0; transition: opacity .5s ease; }
.scene-living.is-door-open .moon-handle { opacity: 1; }

/* ---------- Kapitel 3: Ansichten ---------- */
.note-paper { background: #fff8e6; }
.book-text.small { font-size: 1.15rem; margin: 6px 0; }
.lineup-hints { margin: 0 0 12px; padding: 12px 16px 12px 34px; background: #fffdf5; border: 2px solid #f0dcc3; border-radius: 14px; font-weight: 700; }
.lineup-hints li + li { margin-top: 4px; }
.stage-board {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 14px 10px 10px;
  background: linear-gradient(#f1dfcf 0 78%, #c58a5a 78%); border: 6px solid #5a4b57; border-radius: 14px; position: relative;
}
.stage-board.solved { background: radial-gradient(circle at 50% 0, #fff6d6 0, transparent 70%), linear-gradient(#f1dfcf 0 78%, #c58a5a 78%); }
.stage-place { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.place-btn {
  width: 100%; aspect-ratio: 3 / 4; padding: 4px; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .55); border: 3px dashed #c58a5a; border-radius: 12px; font: inherit;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease;
}
.place-btn:focus-visible, .pool-btn:focus-visible, .inst-btn:focus-visible, .pipe-btn:focus-visible, .pult-slot-btn:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.place-btn .fig-thumb { width: 100%; height: 100%; }
.place-empty { color: var(--ink-soft); font-weight: 700; }
.stage-place.selected .place-btn, .pool-btn.selected, .pult-slot.selected .pult-slot-btn { border-color: var(--sun-deep); border-style: solid; box-shadow: 0 0 0 5px #ffe9a8; transform: translateY(-4px); }
.place-btn[disabled] { cursor: default; border-style: solid; }
.place-btn.playing { background: #fff3b0; border-color: var(--sun-deep); border-style: solid; box-shadow: 0 0 0 6px #ffe08a, 0 0 30px #ffd166; transform: translateY(-8px) scale(1.06); }
.place-btn.playing .fig-thumb { animation: bob .25s ease-in-out infinite alternate; }
.place-nr { font-weight: 900; color: #fff; background: #8c5a3a; border-radius: 999px; padding: 0 10px; }
.stage-pool { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; min-height: 40px; }
.pool-label { font-weight: 800; color: var(--ink-soft); }
.pool-empty { color: var(--ink-soft); font-style: italic; }
.pool-btn {
  font: inherit; font-weight: 800; color: var(--ink); background: #fff; border: 3px solid #eadfd8; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; padding: 4px 8px; cursor: pointer;
}
.pool-btn .fig-thumb { width: 60px; height: 80px; }
.stage-actions { display: flex; justify-content: center; margin-top: 12px; }
.fig-thumb { display: block; }

.chest-living-view { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.inst-buttons { display: grid; grid-template-columns: repeat(4, minmax(70px, 110px)); gap: 10px; background: #b57a4c; padding: 12px; border-radius: 14px; }
.inst-btn {
  font: inherit; font-weight: 800; color: var(--ink); background: #fff3e6; border: 3px solid #9c6740; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; padding: 8px 4px; cursor: pointer; box-shadow: 0 4px 0 #8c5a3a; font-size: .9rem;
}
.inst-btn svg { width: 50px; height: 56px; }
.inst-btn:active:not([disabled]) { transform: translateY(3px); box-shadow: 0 1px 0 #8c5a3a; }
.inst-btn[disabled] { opacity: .55; cursor: default; }
.chest-reveal { width: 0; height: 0; overflow: hidden; transition: all .6s ease; }
.chest-living-view.open .chest-reveal { width: 90px; height: 90px; animation: sparkleIn .8s ease; }
.chest-reveal svg { width: 90px; height: 90px; filter: drop-shadow(0 0 8px #ffd166); }

/* ---------- Kapitel 4: Dachboden (Szene) ---------- */
.scene-attic .dust-mote { animation: drift 7s ease-in-out infinite alternate, twinkle 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.scene-attic .glow-mote { animation: twinkle 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.scene-attic .moonlight { animation: moonPulse 3.5s ease-in-out infinite; }
@keyframes moonPulse { 0%, 100% { opacity: .8; } 50% { opacity: 1; } }
.scene-attic .sky-moon { opacity: 0; transition: opacity 2s ease 1.5s; }
.scene-attic.is-finale .sky-moon { opacity: 1; }
.scene-attic .moon-ribbon { opacity: 0; stroke-dasharray: 900; stroke-dashoffset: 900; }
.scene-attic.is-finale .moon-ribbon { animation: ribbon 3s ease-out forwards; }
@keyframes ribbon { 0% { opacity: 0; stroke-dashoffset: 900; } 20% { opacity: 1; } 70% { opacity: 1; stroke-dashoffset: 0; } 100% { opacity: .25; stroke-dashoffset: 0; } }
.scene-attic.is-finale .moonlight { animation: none; opacity: 0; transition: opacity 2.5s ease; }
.scene-attic .machine-lid { transform-box: fill-box; transform-origin: 0% 100%; transition: transform 1s cubic-bezier(.34, 1.56, .64, 1); }
.scene-attic.is-finale .machine-lid { transform: rotate(-35deg) translateY(-10px); }
.scene-attic .gear { transform-box: fill-box; transform-origin: center; }
.scene-attic.is-pipes-solved .gear { animation: spin 6s linear infinite; }
.scene-attic.is-pipes-solved .gear-rev { animation-direction: reverse; animation-duration: 4s; }
.scene-attic.is-finale .gear { animation-duration: 2s; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
/* Schrittlampen: Anleitung → Schritt 1 → Schritt 2 → Schritt 3 */
.scene-attic.is-cards-solved .step-1 { fill: #ffd166; }
.scene-attic.is-pipes-solved .step-2 { fill: #ffd166; }
.scene-attic.is-light-solved .step-3 { fill: #ffd166; }
.scene-attic.is-cards-solved .pult-lamp { fill: #8fbf8a; }
.scene-attic .panel { opacity: .6; transition: opacity .6s ease; }
.scene-attic.is-cards-solved .panel-pipes, .scene-attic.is-pipes-solved .panel-mirrors { opacity: 1; }
.scene-attic.is-pipes-solved .mini-pipe { fill: #ffd166; animation: moonPulse 1.4s ease-in-out infinite; }
.scene-attic .mini-beam { opacity: 0; }
.scene-attic.is-light-solved .mini-beam { opacity: 1; }
.scene-attic.is-light-solved .lever-lamp { fill: #8fbf8a; }
.scene-attic .lever-arm { transition: transform .8s cubic-bezier(.34, 1.56, .64, 1); }
.scene-attic.is-baeri-holds .lever-b .lever-arm { transform: translate(1440px, 570px) rotate(40deg); }
.scene-attic.is-finale .lever-a .lever-arm { transform: translate(160px, 570px) rotate(-40deg); }
.scene-attic.is-finale .lever-b .lever-arm { transform: translate(1440px, 570px) rotate(40deg); }
.scene-attic .card-spot { transition: opacity .4s ease; }
.scene-attic.card-table-found .card-spot-table,
.scene-attic.card-box-found .card-spot-box,
.scene-attic.card-machine-found .card-spot-machine { opacity: 0; }
.scene-attic .fox-lantern { display: none; }
.scene-attic.is-finale .fox-lantern, .fox.has-lantern .fox-lantern { display: block; }
.scene-attic .fox-tail { transform-box: fill-box; transform-origin: 0% 100%; animation: wag 2.6s ease-in-out infinite; }
@keyframes wag { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(8deg); } }
.scene-attic .baeri { transition: transform 1.2s ease; }

/* ---------- Kapitel 4: Ansichten ---------- */
.fox-view { text-align: center; }
.fox-big { width: 180px; height: 180px; }
.instr-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  background: #fff8e6; border: 3px solid #b58a3a; border-radius: 10px; padding: 10px; min-width: 150px; max-width: 220px; margin: 0 auto;
}
.instr-card svg { width: 56px; height: 56px; }
.instr-card strong { font-size: 1rem; }
.instr-card span { font-size: .85rem; color: var(--ink-soft); }
.instr-card.big { max-width: 280px; }
.instr-card.big svg { width: 80px; height: 80px; }
.pult-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; background: #c58a5a; padding: 12px; border-radius: 14px; }
.pult-slots.solved { box-shadow: 0 0 0 5px #c7e8b0; }
.pult-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.slot-nr { font-weight: 900; color: #fff; font-size: 1.2rem; }
.pult-slot-btn { width: 100%; min-height: 150px; padding: 4px; background: rgba(255, 255, 255, .35); border: 3px dashed #fff8e6; border-radius: 12px; cursor: pointer; font: inherit; display: grid; place-items: center; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.pult-slot-btn[disabled] { cursor: default; border-style: solid; }
.pult-slot-btn .instr-card { min-width: 0; width: 100%; }
.pult-pool { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pult-pool .pool-btn { padding: 4px; }
.pult-pool .instr-card { min-width: 120px; }

.pipes-view { display: flex; flex-direction: column; align-items: center; }
.pipes-wrap { display: flex; align-items: flex-start; gap: 6px; }
.pipes-grid { display: grid; grid-template-columns: repeat(3, 84px); grid-template-rows: repeat(3, 84px); gap: 4px; background: #4a3b45; padding: 6px; border-radius: 14px; }
.pipes-grid.solved { box-shadow: 0 0 0 5px #ffd166, 0 0 24px #ffd166; }
.pipe-btn { padding: 0; border: 0; background: transparent; border-radius: 10px; cursor: pointer; }
.pipe-btn[disabled] { cursor: default; }
.pipe-svg { display: block; width: 84px; height: 84px; transition: transform .2s ease; }
.pipe-svg g { transition: transform .2s ease; }
.pipe-svg.lit .pipe-core { animation: energy 1.2s ease-in-out infinite; }
@keyframes energy { 0%, 100% { stroke: #ffd166; } 50% { stroke: #fff3b0; } }
.pipe-port { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 12px; font-size: .75rem; font-weight: 900; text-align: center; }
.pipe-start { background: #4a3b45; margin-top: 21px; }
.pipe-start svg { width: 40px; height: 40px; }
.pipe-exit { background: #6b5b7a; color: #fff; align-self: flex-end; margin-bottom: 21px; border: 3px dashed #ffd166; }
.pipe-exit.lit { background: #ffd166; color: #4a3b45; border-style: solid; }

.mirror-grid-wrap { width: min(480px, 100%); margin: 0 auto; }
.mirror-svg { width: 100%; height: auto; display: block; border-radius: 12px; background: #6b5b7a; }
.mirror-svg .mirror { cursor: pointer; }
.mirror-svg .mirror.hit circle { opacity: .8; fill: #fffbe6; }
.mirror-svg .beam-core { animation: energy 1.2s ease-in-out infinite; }
.moon-target.lit circle { fill: #fffbe6; }
.moon-target.lit { animation: moonPulse 1.2s ease-in-out infinite; }
.mirror-buttons { display: flex; justify-content: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

.levers-view { text-align: center; }
.lever-stage { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 10px; background: linear-gradient(#e9d2c0 0 75%, #cf9a6a 75%); border-radius: 16px; padding: 14px; min-height: 220px; }
.lever-figure { display: flex; flex-direction: column; align-items: center; font-weight: 800; }
.lever-figure .figure { height: 160px; }
.lever-figure.baeri .figure { height: 140px; }
.lever-gap { border-bottom: 6px dashed #8c5a3a; align-self: center; }
.lever-pair { display: flex; align-items: flex-end; gap: 4px; min-height: 160px; }
.lever-svg { width: 60px; height: 110px; }
.lever-svg-arm { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .8s cubic-bezier(.34, 1.56, .64, 1); }
.lever-svg.down .lever-svg-arm { transform: rotate(35deg); }
.speaker-carla { color: #7b3c52; }

/* Finale */
.finale { text-align: center; }
.finale-art { position: relative; height: 280px; border-radius: 18px; overflow: hidden; background: linear-gradient(#232647, #4a4f7d 60%, #cf9a6a 60%); margin-bottom: 12px; }
.finale-sky { position: absolute; inset: 0 0 40% 0; }
.finale-sky i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; animation: twinkle 2s ease-in-out infinite; }
.finale-moon { position: absolute; right: 14%; top: 12%; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fffbe6, #f0e6b8); box-shadow: 0 0 40px #fffbe6; animation: moonRise 2.4s ease-out both; }
@keyframes moonRise { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.finale-ribbon { position: absolute; left: 30%; right: 18%; top: 18%; height: 60%; border-radius: 50%; border-top: 14px solid rgba(255, 251, 230, .8); transform: rotate(-12deg); filter: blur(2px); animation: ribbonIn 2.4s ease-out both; }
@keyframes ribbonIn { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
.finale-figures { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; align-items: flex-end; gap: 14px; }
.finale-figures .figure { height: 170px; }
.finale-figures .figure-baeri { height: 150px; animation: cheer 1.6s ease-in-out infinite; }
.finale-figures .figure-fox { height: 110px; width: 110px; }

/* ---------- Responsiv ---------- */
@media (max-width: 700px) {
  .pic-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inst-buttons { grid-template-columns: repeat(2, minmax(90px, 1fr)); }
  .pipes-grid { grid-template-columns: repeat(3, 70px); grid-template-rows: repeat(3, 70px); }
  .pipe-svg { width: 70px; height: 70px; }
  .pipe-port { width: 42px; height: 42px; }
  .pipe-start { margin-top: 14px; } .pipe-exit { margin-bottom: 14px; }
  .pult-slots { grid-template-columns: 1fr; }
  .pult-slot-btn { min-height: 110px; }
  .finale-figures .figure { height: 130px; } .finale-figures .figure-baeri { height: 115px; }
  .lever-figure .figure { height: 120px; }
}

/* ---------- Reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .paw, .paw ellipse, .paw circle, .twinkle, .dust-mote, .glow-mote, .moonlight, .fox-tail, .gear,
  .finale-sky i, .finale-figures .figure-baeri, .pipe-svg.lit .pipe-core, .beam-core, .moon-target.lit,
  .scene-living.is-playing .stage-fig, .place-btn.playing .fig-thumb, .baeri.cheer > * { animation: none !important; }
  .scene-attic.is-finale .moon-ribbon { animation: none !important; opacity: .8; stroke-dashoffset: 0; }
}
