/* ============================================================
   Carla und der verschwundene Sternenschlüssel – Stylesheet
   ============================================================ */

:root {
  --bg: #f4e9e4;
  --bg-deep: #e9d8d3;
  --paper: #fffaf6;
  --ink: #4a3b45;
  --ink-soft: #7a6a74;
  --rose: #f6a8b8;
  --rose-deep: #e07a92;
  --sun: #ffd166;
  --sun-deep: #e0a53a;
  --sky: #a9d9e8;
  --mint: #c7e8b0;
  --lilac: #d7b5e8;
  --wood: #c58a5a;
  --focus: #3b7dd8;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(74, 59, 69, .14);
  --font: "Nunito", "Segoe UI", "Trebuchet MS", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #fff3ea 0, transparent 60%),
    radial-gradient(900px 500px at 110% 110%, #f1dff0 0, transparent 60%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.modal-open { overflow: hidden; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Kopfzeile ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 20px;
}
.title {
  margin: 0; font-size: clamp(1.1rem, 2.2vw, 1.6rem); font-weight: 800; letter-spacing: .2px;
}
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  font: inherit; font-weight: 700; font-size: 1rem;
  color: var(--ink); background: var(--paper);
  border: 2px solid #e8d5cd; border-radius: 999px;
  padding: 10px 18px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 3px 0 #e8d5cd;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  min-height: 44px;
}
.btn:hover { transform: translateY(-1px); background: #fff; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #e8d5cd; }
.btn:focus-visible, .inventory-item:focus-visible, .animal-btn:focus-visible, .wheel-btn:focus-visible,
.treasure-map:focus-visible, .mb-key:focus-visible {
  outline: 4px solid var(--focus); outline-offset: 3px;
}
.btn-hint { background: var(--sun); border-color: var(--sun-deep); box-shadow: 0 3px 0 var(--sun-deep); }
.btn-hint:hover { background: #ffe08a; }
.btn-primary { background: var(--rose); border-color: var(--rose-deep); box-shadow: 0 3px 0 var(--rose-deep); color: #3c1f29; }
.btn-primary:hover { background: #fbb9c6; }
.btn-danger { background: #f3c1b4; border-color: #d98b76; box-shadow: 0 3px 0 #d98b76; }
.btn-quiet { background: transparent; box-shadow: none; }
.btn-big { font-size: 1.2rem; padding: 14px 28px; }
.btn-close { border-radius: 50%; width: 44px; height: 44px; padding: 0; justify-content: center; font-size: 1.1rem; }
.btn-icon { font-size: 1.1em; }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }

/* ---------- Spielfläche ---------- */
.game {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  padding: 0 20px 20px;
  align-items: start;
  align-content: start;
}

.room-wrap {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  overflow: hidden;
}
.room-svg-host { width: 100%; }
.room {
  display: block; width: 100%; height: auto;
  border-radius: 12px;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Seitenleiste ---------- */
.sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.dialog {
  display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: start;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; min-height: 130px;
}
.dialog-portrait {
  width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
  background: #f1e3f3; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.dialog-portrait.portrait-carla { background: #dceff5; }
.dialog-portrait svg { width: 100%; height: 100%; display: block; }
.dialog-speaker { font-weight: 800; font-size: .95rem; color: var(--ink-soft); }
.dialog-text { margin: 4px 0 0; font-size: 1.1rem; font-weight: 600; }
.dialog-text.pop { animation: pop .3s ease; }
@keyframes pop { from { transform: translateY(4px); opacity: .4; } to { transform: none; opacity: 1; } }

.inventory {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px;
}
.inventory-title { margin: 0 0 10px; font-size: 1rem; color: var(--ink-soft); font-weight: 800; }
.inventory-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px;
}
.inventory-empty { color: var(--ink-soft); font-style: italic; grid-column: 1 / -1; }
.inventory-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; border-radius: 14px; cursor: pointer;
  background: #fff; border: 3px solid #eadfd8;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  animation: sparkleIn .5s ease;
}
.inventory-item svg { width: 48px; height: 48px; }
.inventory-item:hover { transform: translateY(-2px); border-color: var(--sun); }
.inventory-item.selected { border-color: var(--sun-deep); background: #fff6d6; box-shadow: 0 0 0 4px #ffe9a8; }
.inventory-name { font-size: .85rem; font-weight: 800; text-align: center; }
.inventory-hint { margin: 10px 0 0; font-size: .9rem; color: var(--ink-soft); min-height: 2.6em; }

/* ---------- Zimmer: Klickflächen ---------- */
.hotspot { cursor: pointer; outline: none; }
.hs-ring {
  fill: transparent; stroke: var(--sun); stroke-width: 0; stroke-linejoin: round;
  transition: stroke-width .15s ease;
  pointer-events: all; /* die ganze Ringfläche ist klickbar */
}
.hotspot:hover .hs-ring, .hotspot:focus-visible .hs-ring { stroke-width: 6; stroke-dasharray: 14 10; }
.hotspot:focus-visible .hs-ring { stroke: var(--focus); }
.hotspot .hs-shape { transition: filter .15s ease; }
.hotspot:hover .hs-shape { filter: brightness(1.06); }
.is-searchable .hs-ring { stroke-width: 5; stroke-dasharray: 14 10; animation: ringPulse 1.6s ease-in-out infinite; }
@keyframes ringPulse { 0%, 100% { stroke-opacity: .35; } 50% { stroke-opacity: 1; } }

.tile-peek { display: none; }
.is-searchable .tile-peek { display: block; animation: twinkle 1.6s ease-in-out infinite; }
.found-curtain .tile-peek-curtain, .found-rug .tile-peek-rug, .found-pot .tile-peek-pot { display: none !important; }

/* ---------- Zimmer: Animationen ---------- */
.wall-star { fill: #fff; opacity: .5; }
.raindrop { stroke: #e8eefc; stroke-width: 2.5; stroke-linecap: round; opacity: .8; animation: rain 1.4s linear infinite; }
@keyframes rain { from { transform: translateY(-40px); opacity: 0; } 15% { opacity: .9; } to { transform: translateY(300px); opacity: .2; } }
.cloud { animation: drift 14s ease-in-out infinite alternate; }
.cloud-2 { animation-duration: 18s; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translateX(-12px); } to { transform: translateX(12px); } }

.baeri-breath { transform-box: fill-box; transform-origin: 50% 90%; animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, 1.03); } }
.baeri-eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }

.sparkle-hint circle { animation: twinkle 1.8s ease-in-out infinite; }
.sparkle-hint circle:nth-child(2) { animation-delay: .9s; }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
.sparkle-hint circle, .musicbox-key-sparkle circle { transform-box: fill-box; transform-origin: center; }

.chest-lid { transform-box: fill-box; transform-origin: 0% 100%; transition: transform .7s cubic-bezier(.34, 1.56, .64, 1); }
.is-chest-open .chest-lid { transform: rotate(-75deg); }

.dollhouse-door { transition: transform .8s ease; }
.is-dollhouse-open .dollhouse-door { transform: translateY(-74px); }

.musicbox-crank { opacity: 0; transition: opacity .3s ease; }
.is-crank .musicbox-crank { opacity: 1; }
.musicbox-figure { transition: transform 1s ease; }
.is-music-played .musicbox-figure { transform: translateY(-14px); }
.musicbox-key-sparkle { display: none; }
.is-music-played .musicbox-key-sparkle { display: block; }
.is-music-played .musicbox-key-sparkle circle { animation: twinkle 1.4s ease-in-out infinite; }
.has-key .musicbox-key-sparkle, .is-door-open .musicbox-key-sparkle { display: none; }

.door-light { opacity: 0; transition: opacity 1.2s ease .3s; }
.door-panel { transform-box: fill-box; transform-origin: 0% 50%; transition: transform 1.6s cubic-bezier(.4, 0, .2, 1); }
.is-door-open .door-panel { transform: scaleX(.14) skewY(8deg); }
.is-door-open .door-light { opacity: 1; }
.is-door-open .door-lock { opacity: 0; }
.door-lock { transition: opacity .4s ease; }
.room.no-anim * { transition: none !important; }

/* ---------- Modale Fenster ---------- */
.modal-root { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(74, 59, 69, .45); backdrop-filter: blur(2px); }
.modal {
  position: relative; width: min(680px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--paper); border-radius: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.25);
  animation: modalIn .3s cubic-bezier(.34, 1.3, .64, 1);
}
@keyframes modalIn { from { transform: translateY(20px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.modal-title { margin: 0; font-size: 1.4rem; font-weight: 800; }
.modal-content { padding: 14px 18px 22px; }
.view-status { margin: 14px 0 0; font-weight: 700; text-align: center; min-height: 2.6em; }
.hint-note { color: var(--ink-soft); font-size: .95rem; text-align: center; margin: 12px 0 0; }
.shake { animation: shake .6s ease; }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }

/* Intro & Abschluss */
.intro p, .finish p { font-size: 1.1rem; }
.intro em, .finish em, .finish-quote { font-style: normal; color: #7b3c52; font-weight: 700; }
.intro-art, .finish-art {
  display: flex; justify-content: center; align-items: flex-end; gap: 24px; margin-bottom: 12px;
  padding: 16px 16px 0; border-radius: 18px;
  background: linear-gradient(#fbeadf 0, #f3d7cf 72%, #e2b589 72%, #d3a070 100%);
}
.figure { height: 210px; width: auto; display: block; filter: drop-shadow(0 6px 6px rgba(74, 59, 69, .15)); }
.figure-baeri { height: 190px; }
.dialog-portrait.portrait-baeri { background: #f1e3f3; }
.intro .btn, .finish .btn { display: flex; margin: 18px auto 0; }
.finish { text-align: center; }
.finish-quote { font-size: 1.35rem !important; }
.finish-small { color: var(--ink-soft); }

/* Bilderbuch */
.book-page {
  background: #fffdf5; border: 3px solid #f0dcc3; border-radius: 16px; padding: 20px;
  box-shadow: inset 0 0 0 10px #fff6e2;
}
.book-animals { display: flex; justify-content: space-around; gap: 10px; margin-bottom: 14px; }
.book-animal { display: flex; flex-direction: column; align-items: center; font-weight: 800; color: var(--ink-soft); }
.book-animal svg { width: 96px; height: 96px; }
.book-text { font-size: 1.35rem; font-weight: 800; text-align: center; margin: 0; line-height: 1.5; }

/* Spielzeugkiste */
.chest-view { display: flex; flex-direction: column; align-items: center; }
.chest-box { position: relative; width: min(100%, 420px); padding-top: 60px; }
.chest-view-lid {
  position: absolute; left: 0; right: 0; top: 40px; height: 44px;
  background: #9fcf98; border: 4px solid #6f9e6a; border-radius: 16px 16px 6px 6px;
  transform-origin: 50% 100%; transition: transform .7s cubic-bezier(.34, 1.56, .64, 1);
  z-index: 2;
}
.chest-view-lid::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 36px; height: 14px; margin-left: -18px; background: var(--sun); border-radius: 4px; }
.chest-view.open .chest-view-lid { transform: perspective(600px) rotateX(70deg) translateY(-10px); }
.chest-view-body {
  position: relative; background: #8fbf8a; border: 4px solid #6f9e6a; border-radius: 10px 10px 18px 18px; padding: 18px 16px 16px; z-index: 1;
}
.chest-view-inside {
  position: absolute; left: 50%; top: 54px; transform: translate(-50%, 10px) scale(.6); opacity: 0;
  width: 90px; height: 90px; transition: all .6s ease .3s; z-index: 3; pointer-events: none;
}
.chest-view.open .chest-view-inside { opacity: 1; transform: translate(-50%, -30px) scale(1); animation: sparkleIn .8s ease .3s both; }
.chest-slots { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; }
.slot {
  width: 64px; height: 64px; border-radius: 14px; background: #fff; border: 3px dashed #6f9e6a;
  display: grid; place-items: center;
}
.slot.filled { border-style: solid; }
.slot svg { width: 52px; height: 52px; }
.chest-buttons { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.animal-btn {
  font: inherit; font-weight: 800; color: var(--ink);
  background: #fff; border: 3px solid #e8d5cd; border-radius: 18px; padding: 8px 10px 6px;
  display: flex; flex-direction: column; align-items: center; cursor: pointer;
  box-shadow: 0 4px 0 #cfbfb6; transition: transform .1s ease, box-shadow .1s ease; min-width: 96px;
}
.animal-btn svg { width: 72px; height: 72px; }
.animal-btn:hover { transform: translateY(-2px); }
.animal-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #cfbfb6; }
.animal-btn[disabled] { opacity: .5; cursor: default; }

/* Unter dem Bett */
.underbed-scene {
  position: relative; width: 100%; aspect-ratio: 16 / 7; min-height: 200px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(#3a2f3d, #2a2230); cursor: crosshair; touch-action: none;
}
.dust { position: absolute; width: 30px; height: 10px; border-radius: 50%; background: #6a5c6c; opacity: .6; }
.d1 { left: 12%; top: 70%; } .d2 { left: 40%; top: 30%; width: 44px; } .d3 { left: 82%; top: 60%; }
.lost-sock { position: absolute; left: 20%; top: 25%; width: 70px; height: 30px; background: #f6a8b8; border-radius: 16px 6px 6px 16px; transform: rotate(-20deg); }
.lost-sock::after { content: ""; position: absolute; right: -10px; bottom: -14px; width: 34px; height: 30px; background: #f6a8b8; border-radius: 10px; }
.lost-ball { position: absolute; left: 75%; top: 20%; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d7e9ff, #a9d9e8 60%, #7fb7cc); }
.treasure-map {
  position: absolute; left: 56%; top: 42%; width: 110px; height: 90px; padding: 0;
  background: transparent; border: 0; cursor: pointer; transform: rotate(8deg);
  transition: transform .4s ease, opacity .4s ease;
}
.treasure-map svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); }
.treasure-map:hover { transform: rotate(0) scale(1.06); }
.treasure-map.taken { transform: translateY(-40px) scale(.5); opacity: 0; }
.darkness {
  --x: 25%; --y: 50%;
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--x) var(--y),
    rgba(255, 240, 190, .18) 0, rgba(255, 240, 190, .1) 60px, rgba(12, 8, 16, .35) 95px, rgba(12, 8, 16, .97) 140px);
}
.underbed.found .darkness { background: radial-gradient(circle at var(--x) var(--y), rgba(255, 240, 190, .12) 0, rgba(12, 8, 16, .6) 160px); }

/* Karte */
.map-svg { width: 100%; height: auto; display: block; }

/* Fund */
.found-view { text-align: center; }
.found-item { width: 130px; height: 130px; margin: 0 auto 8px; }
.found-item svg { width: 100%; height: 100%; }
.found-desc { color: var(--ink-soft); }
.sparkle-in { animation: sparkleIn .8s cubic-bezier(.34, 1.56, .64, 1); position: relative; }
.sparkle-in::before, .sparkle-in::after {
  content: "✦"; position: absolute; color: var(--sun); font-size: 28px; animation: twinkle 1.2s ease-in-out 2;
}
.sparkle-in::before { left: -10px; top: 6px; } .sparkle-in::after { right: -10px; bottom: 10px; animation-delay: .4s; }
@keyframes sparkleIn { from { transform: scale(.3) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* Puppenhaus */
.dollhouse-view { display: flex; flex-direction: column; align-items: center; position: relative; }
.dh-shapes {
  display: flex; align-items: center; gap: 10px; background: #fff3e6; border: 3px solid #e7cdb8; border-radius: 16px; padding: 10px 18px; margin-bottom: 16px;
}
.dh-shape { display: flex; flex-direction: column; align-items: center; font-weight: 800; color: var(--ink-soft); font-size: .9rem; }
.dh-shape svg { width: 56px; height: 56px; }
.dh-shape em { font-style: normal; }
.dh-arrow { font-size: 1.6rem; font-weight: 800; color: var(--ink-soft); }
.dh-lock { display: flex; gap: 16px; background: #5a4b57; border-radius: 18px; padding: 14px 18px; margin-bottom: 16px; }
.dh-wheel { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wheel-btn {
  font: inherit; font-size: 1.1rem; font-weight: 800; width: 56px; height: 44px; border-radius: 12px;
  border: 0; background: #ffd166; color: #4a3b45; cursor: pointer; box-shadow: 0 3px 0 #e0a53a;
}
.wheel-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #e0a53a; }
.wheel-btn[disabled] { opacity: .5; cursor: default; }
.wheel-digit { display: grid; place-items: center; width: 56px; height: 64px; background: #fffaf0; border-radius: 10px; font-size: 2rem; font-weight: 900; }
.dh-secret { position: relative; width: 150px; height: 110px; margin-top: 16px; overflow: hidden; border-radius: 12px; background: #3e3340; }
.dh-door { position: absolute; inset: 0; background: #e8818f; border: 3px solid #c96677; border-radius: 12px; transition: transform .9s ease; }
.dh-door::after { content: ""; position: absolute; right: 14px; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); }
.dollhouse-view.open .dh-door { transform: translateY(-105%); }
.dh-content { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .5s ease .5s; }
.dh-content svg { width: 80px; height: 80px; }
.dollhouse-view.open .dh-content { opacity: 1; }

/* Spieluhr */
.mb-view { display: flex; flex-direction: column; align-items: center; }
.mb-stage { position: relative; width: 260px; height: 260px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.mb-figure { position: absolute; left: 50%; top: 92px; width: 60px; height: 70px; margin-left: -30px; transition: transform 1.5s ease; z-index: 2; }
.mb-figure-inner {
  width: 100%; height: 100%;
  background:
    radial-gradient(circle at 50% 18%, #fde2d0 0 12px, transparent 13px),
    radial-gradient(ellipse at 50% 10%, #8c5a3a 0 10px, transparent 11px),
    linear-gradient(to bottom, transparent 28px, #f6a8b8 28px);
  clip-path: polygon(50% 0, 70% 0, 100% 100%, 0 100%, 30% 0);
  border-radius: 30px 30px 6px 6px;
  transform-style: preserve-3d;
}
.mb-view.playing .mb-figure { transform: translateY(-40px); }
.mb-view.playing .mb-figure-inner { animation: spinY 1.2s linear infinite; }
.mb-view.played .mb-figure { transform: translateY(-40px); }
@keyframes spinY { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
.mb-box {
  position: relative; width: 200px; height: 110px; background: #d7b5e8; border: 4px solid #a984c7; border-radius: 14px;
  box-shadow: inset 0 10px 0 #a984c7;
}
.mb-crank { position: absolute; right: -36px; top: 48px; width: 32px; height: 6px; background: #5a4b57; opacity: 0; transition: opacity .3s ease; transform-origin: 0 50%; }
.mb-crank::after { content: ""; position: absolute; right: -2px; top: -22px; width: 6px; height: 26px; background: #5a4b57; border-radius: 3px; }
.mb-crank::before { content: ""; position: absolute; right: -8px; top: -30px; width: 16px; height: 16px; border-radius: 50%; background: var(--sun); }
.mb-view.has-crank .mb-crank { opacity: 1; }
.mb-view.playing .mb-crank { animation: crankTurn 1s linear infinite; }
@keyframes crankTurn { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.mb-compartment {
  position: absolute; left: 50%; bottom: 6px; width: 110px; height: 0; margin-left: -55px; overflow: hidden;
  background: #3e3340; border-radius: 8px; transition: height .8s ease; display: grid; place-items: center;
}
.mb-view.played .mb-compartment { height: 68px; }
.mb-key { background: transparent; border: 0; width: 60px; height: 60px; padding: 4px; cursor: pointer; border-radius: 12px; animation: sparkleIn .8s ease; transition: transform .4s ease, opacity .4s ease; }
.mb-key svg { width: 100%; height: 100%; filter: drop-shadow(0 0 6px #ffd166); }
.mb-key:hover { transform: scale(1.1); }
.mb-key.taken { transform: translateY(-30px) scale(.4); opacity: 0; }
.mb-notes { position: absolute; left: 50%; top: 40px; opacity: 0; pointer-events: none; }
.mb-notes span { position: absolute; font-size: 28px; color: #a984c7; font-weight: 800; }
.mb-view.playing .mb-notes { opacity: 1; }
.mb-view.playing .mb-notes span { animation: floatNote 2s ease-in-out infinite; }
.mb-notes span:nth-child(1) { left: -60px; } .mb-notes span:nth-child(2) { left: 30px; animation-delay: .7s !important; } .mb-notes span:nth-child(3) { left: -10px; top: 30px; animation-delay: 1.3s !important; }
@keyframes floatNote { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-70px); opacity: 0; } }
.mb-view .btn { margin-top: 10px; }

/* Hinweisbuch */
.clue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.clue { background: #fffdf5; border: 2px solid #f0dcc3; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.clue strong { font-size: 1.05rem; }
.clue-tiles { display: flex; gap: 12px; }
.clue-tile { display: flex; align-items: center; gap: 4px; font-size: 1.2rem; }
.clue-tile svg { width: 44px; height: 44px; }
.clues-empty { color: var(--ink-soft); font-style: italic; text-align: center; }

/* Rückfrage */
.confirm-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Toast & Konfetti ---------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.confetti-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 70; }
.confetti-layer i { position: absolute; top: -20px; display: block; border-radius: 3px; animation: fall 3s linear forwards; }
@keyframes fall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: .8; }
}

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .game { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 900px) {
  .game { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .dialog { flex: 1 1 320px; }
  .inventory { flex: 1 1 320px; }
  .topbar { padding: 10px 12px; }
  .game { padding: 0 12px 12px; }
  .btn { padding: 8px 14px; font-size: .95rem; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .title { width: 100%; }
  .btn .btn-icon + span, .btn-hint span:not(.btn-icon) { display: inline; }
  .book-animal svg { width: 70px; height: 70px; }
  .animal-btn { min-width: 84px; } .animal-btn svg { width: 60px; height: 60px; }
  .dh-lock { gap: 8px; padding: 10px; }
  .wheel-btn, .wheel-digit { width: 48px; }
  .dialog { grid-template-columns: 60px 1fr; } .dialog-portrait { width: 60px; height: 60px; }
}

/* ---------- Reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
  .raindrop, .cloud, .baeri-breath, .baeri-eyes, .sparkle-hint circle, .is-searchable .hs-ring, .tile-peek { animation: none !important; }
  .raindrop { opacity: .5; }
  .mb-view.playing .mb-figure-inner, .mb-view.playing .mb-crank { animation: none !important; }
  .confetti-layer i { animation: none !important; top: auto; bottom: 10vh; }
}
