/* Weihnachtsstube (Startseite): Layout, Szene, Erzähler, Quest */
:root {
  --sheet-bottom: 12px;
}
.stube {
  max-width: 1450px;
  margin: 0 auto;
  padding: 0 16px 10px;
}
.title-card {
  text-align: center;
  padding: 2px 0 6px;
}
.title-card .kicker {
  margin: 0;
  color: var(--c-brass-hi);
  letter-spacing: 0.1em;
  font-size: 14px;
}
.title-card h1 {
  font: 700 clamp(36px, 4.6vw, 60px) / 1.05 var(--font-display);
  color: var(--c-gold);
  text-shadow: 3px 3px #823e3a;
  margin: 4px 0;
}
.title-card .tagline {
  margin: 4px 0 0;
  color: var(--c-text-2);
}
.hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin: 8px 0 14px;
  color: var(--c-text-2);
  font-size: 15px;
}
.hud span {
  white-space: nowrap;
}
.hud #score {
  display: inline-block;
  color: var(--c-gold);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.hud #score.bump {
  animation: scorebump 0.7s ease-out;
}
@keyframes scorebump {
  35% {
    transform: scale(1.25);
    color: #fff3c4;
    text-shadow: 0 0 10px #ffd970;
  }
}
/* Aufsteigende Punkte */
.points-pop {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  transform: translate(-50%, -50%);
  font: 800 clamp(20px, 2.6vw, 32px) / 1.1 var(--font-display);
  color: #ffe08a;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 0 2px #2a1d0b,
    0 2px 0 #823e3a,
    0 0 14px #ffd970;
  animation: pointspop 1.6s ease-out forwards;
}
.points-pop small {
  display: block;
  font-size: 0.55em;
  color: #fff3c4;
}
@keyframes pointspop {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.6);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -70%) scale(1.15);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -230%) scale(1);
  }
}

.game {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
  gap: 20px;
  align-items: start;
}
.game-main,
.game-side {
  min-width: 0;
}
.game-side {
  display: grid;
  gap: 14px;
}

/* Schauplatz-Reiter, hängen wie Karteireiter am Bilderrahmen */
.places {
  display: flex;
  gap: 6px;
  padding: 0 12px;
}
.places button {
  position: relative;
  top: 1px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid #8fa197;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #274c54;
  color: var(--c-text-2);
}
.places button:hover {
  background: #2f5a63;
  color: var(--c-text);
}
.places button[aria-pressed="true"] {
  background: linear-gradient(#f2d39a, #c99b5c);
  border-color: #f2d39a;
  color: #22343a;
  font-weight: 700;
}
.places .ico {
  font-size: 18px;
}

/* Szene */
.scene {
  position: relative;
  overflow: hidden;
  border: 7px ridge #b68751;
  border-radius: 8px;
  background: #41626b;
  box-shadow: 0 18px 50px var(--c-shadow);
  scroll-margin-top: 10px;
}
.scene svg {
  display: block;
  width: 100%;
  height: auto;
}
.object,
.spot {
  cursor: pointer;
  transition: filter 0.15s;
}
.object:hover,
.spot:hover,
.object:focus-visible,
.spot:focus-visible {
  filter: brightness(1.18) drop-shadow(0 0 7px #f6e2a8);
  outline: none;
}
.object:focus-visible .hit,
.spot:focus-visible .hit {
  stroke: #ffe9a8;
  stroke-width: 5;
  stroke-dasharray: 12 7;
}
.story {
  animation: storyglow 1.6s ease-in-out infinite alternate;
}
@keyframes storyglow {
  to {
    filter: drop-shadow(0 0 10px #ffd970) brightness(1.15);
  }
}
.flames {
  animation: flicker 0.6s alternate infinite;
  transform-box: fill-box;
  transform-origin: bottom;
}
@keyframes flicker {
  to {
    transform: scale(0.88);
  }
}
.twinkle {
  animation: twinkle 0.8s alternate infinite;
}
@keyframes twinkle {
  to {
    opacity: 0.2;
  }
}
.snowflake {
  animation: snow 5s linear infinite;
}
@keyframes snow {
  to {
    transform: translateY(370px);
  }
}
.location-art {
  display: none;
  aspect-ratio: 800 / 450;
}
.location-art svg {
  display: block;
  width: 100%;
}
.house-details,
.actor-layer,
.hints {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.room-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s;
  background: radial-gradient(circle at 58% 40%, #ffd97932, transparent 38%);
}
.room-sparkles.on {
  opacity: 1;
}
.house-prop,
.actor {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  line-height: 1;
}
.house-prop {
  transition:
    transform 0.4s,
    filter 0.3s;
}
.house-prop:hover,
.house-prop:focus-visible {
  transform: scale(1.12);
  filter: drop-shadow(0 0 8px #fae3a1);
}
.dog-corner {
  left: 1%;
  bottom: 1%;
  font-size: clamp(22px, 3vw, 38px);
}
.room-garland {
  left: 29%;
  top: 6%;
  font-size: clamp(18px, 2.6vw, 34px);
  display: none;
  animation: garlandGlow 2s infinite alternate;
}
.room-garland.on {
  display: grid;
}
@keyframes garlandGlow {
  to {
    filter: drop-shadow(0 0 15px #ffd064);
  }
}
.room-cocoa {
  left: 23%;
  bottom: 42%;
  align-items: end;
  font-size: clamp(20px, 2.8vw, 36px);
}
.advent-deco {
  font-size: clamp(18px, 2.6vw, 32px);
}
.advent-deco.banner {
  white-space: nowrap;
  font: 700 clamp(13px, 2.1vw, 26px) var(--font-display);
  color: #ffe08a;
  text-shadow:
    0 0 2px #2a1d0b,
    0 2px 0 #823e3a,
    0 0 12px #ffd970;
}
.hud #days a {
  color: var(--c-brass-hi);
  font-weight: 600;
}
.actor {
  bottom: 2%;
  left: 7%;
  font-size: clamp(26px, 5vw, 52px);
  filter: drop-shadow(2px 4px 2px #172a2b);
  transition:
    left 1.4s ease-in-out,
    transform 0.5s;
  animation: actorbob 2s ease-in-out infinite;
}
.actor.friend {
  left: 80%;
  animation-delay: 0.6s;
}
.actor.pet {
  left: 48%;
  bottom: 0;
  font-size: clamp(22px, 4vw, 42px);
  animation-delay: 0.3s;
}
.actor:hover,
.actor:focus-visible {
  transform: scale(1.14);
}
@keyframes actorbob {
  50% {
    translate: 0 -5px;
  }
}

/* Funkel-Hinweise: zeigen, was man noch entdecken kann */
.hints {
  z-index: 4;
}
.hint {
  position: absolute;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  color: #fff3c4;
  font-size: 20px;
  line-height: 1;
  text-shadow:
    0 0 2px #2a1d0b,
    0 0 3px #2a1d0b,
    0 0 8px #ffd970,
    0 0 14px #ffb84d;
  animation: hinttwinkle 1.8s ease-in-out infinite;
}
.hint-story {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffd970;
  color: #3a2a12;
  font: 800 19px/1 var(--font-body);
  text-shadow: none;
  box-shadow:
    0 0 0 3px #fff3c4aa,
    0 0 18px #ffd970;
  animation: hintpulse 1.4s ease-in-out infinite;
}
.hint-story.spotlight {
  animation: hintspot 0.5s ease-in-out 6 alternate;
}
@keyframes hinttwinkle {
  0%,
  100% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1) rotate(20deg);
  }
}
@keyframes hintpulse {
  50% {
    transform: translate(-50%, -50%) scale(1.15);
  }
}
@keyframes hintspot {
  to {
    transform: translate(-50%, -50%) scale(1.7);
    box-shadow:
      0 0 0 6px #fff3c4,
      0 0 30px #ffd970;
  }
}

/* Leiste unter der Szene */
.scene-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 10px 0 0;
}
.scene-bar .progress {
  margin-right: auto;
  color: var(--c-brass-hi);
  font-weight: 600;
}
.btn-small {
  min-height: 40px;
  padding: 7px 12px;
  font-size: 14px;
}
.options {
  position: relative;
}
.options summary {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--c-brass);
  border-radius: var(--radius-sm);
  font-size: 14px;
  list-style: none;
  cursor: pointer;
}
.options summary::-webkit-details-marker {
  display: none;
}
.options[open] summary,
.options summary:hover {
  background: #ffffff12;
}
.options-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: grid;
  gap: 8px;
  width: min(290px, 88vw);
  padding: 14px;
  border: 1px solid var(--c-brass);
  border-radius: var(--radius);
  background: var(--c-surface-2);
  box-shadow: 0 12px 30px #0009;
}
.options-panel label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  cursor: pointer;
}
.options-panel input {
  width: 20px;
  height: 20px;
  accent-color: #c99b5c;
}

/* Quest-Karte */
.quest {
  border: 2px solid #e2b77c;
  border-radius: 11px;
  background: linear-gradient(115deg, #463a3b, #25424b);
  padding: 18px 20px;
}
.quest .chapter {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #efcfa0;
}
.quest h2 {
  font: 25px var(--font-display);
  margin: 4px 0 8px;
  color: #ffe0a1;
}
.quest p {
  line-height: 1.5;
  margin: 0 0 12px;
}
.quest .tip {
  color: var(--c-brass-hi);
}
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.steps li {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #213940;
  border: 1px solid #617778;
}
.steps li.current {
  background: #a2514d;
  border-color: #f1b77f;
  color: var(--c-red-ink);
}
.steps li.complete {
  background: #365d4d;
}
.questactions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

/* Erzähler: am Desktop feste Box in der Seitenspalte, am Handy ein Blatt vom unteren Rand */
.narrator {
  position: relative;
  padding: 16px 20px;
  border: 2px solid #e0b679;
  border-radius: 11px;
  background: #182b33;
  box-shadow: 6px 6px #0d161d;
}
.narrator h2 {
  font: 22px var(--font-display);
  color: #ffe2aa;
  margin: 0 40px 8px 0;
}
.narrator h2:focus {
  outline: none;
}
.narrator p {
  margin: 0 0 12px;
  line-height: 1.55;
}
.narrator[data-open="false"] .narrator-close {
  display: none;
}
.narrator-close {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dfb888;
  border-radius: 8px;
  background: #945149;
  color: #fff;
  font-size: 22px;
  line-height: 1;
}
.narrator-close:hover {
  background: var(--c-red-dark);
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choices button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #e8c18b;
  border-radius: var(--radius-sm);
  background: #2b4a51;
  color: var(--c-text);
  text-align: left;
}
.choices button:hover {
  background: #3a5f67;
}

.inventory {
  border: 1px solid #a9916c;
  border-radius: 10px;
  background: #263b40;
  padding: 14px 16px;
}
.inventory h2 {
  font: 21px var(--font-display);
  margin: 0 0 8px;
  color: #ffe2aa;
}
.inventory-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inventory-items button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cfb08a;
  border-radius: 9px;
  background: #3e5655;
  color: #fff1dc;
}
.inventory-items button:hover {
  background: #657359;
}

/* Extras unter dem Spiel */
.extras {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid #577079;
}
.extras > h2 {
  font: 25px var(--font-display);
  margin: 0;
  color: #f4dda6;
}
.extras > p {
  color: var(--c-text-2);
  margin: 6px 0 16px;
}
.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.panel {
  border: 1px solid #607e7e;
  border-radius: 9px;
  background: var(--c-surface);
  padding: 18px;
}
.panel h3 {
  font: 23px var(--font-display);
  color: #f7dcad;
  margin: 0 0 6px;
}
.panel p {
  font-size: 15px;
  color: #cad9d3;
}
.add {
  display: flex;
  gap: 8px;
}
.add input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  background: #fff8ec;
  color: #1d2b30;
}
.add .btn {
  width: 48px;
  font-size: 22px;
}
.list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 2px 0;
  border-bottom: 1px solid #ffffff18;
}
.list label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
}
.list input {
  flex: none;
  width: 20px;
  height: 20px;
  accent-color: #b56a54;
}
.list .done {
  text-decoration: line-through;
  color: var(--c-text-3);
}
.list .del {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f1b29b;
  font-size: 22px;
}
.list .del:hover {
  background: #ffffff10;
}

/* Einspaltig: Erzähler wird zum Blatt am unteren Rand */
@media (max-width: 999px) {
  .game,
  .game-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .narrator {
    position: fixed;
    z-index: 45;
    left: 10px;
    right: 10px;
    bottom: var(--sheet-bottom);
    max-width: 640px;
    max-height: min(48vh, 420px);
    margin: 0 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow:
      0 -3px 0 #0d161d,
      0 14px 40px #000c;
    transition:
      transform 0.25s ease,
      visibility 0.25s;
  }
  .narrator::before {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    margin: -6px auto 10px;
    border-radius: 4px;
    background: #e0b67966;
  }
  .narrator[data-open="false"] {
    transform: translateY(calc(100% + 140px));
    visibility: hidden;
  }
}
@media (max-width: 760px) {
  :root {
    --sheet-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
  }
  .stube {
    padding: 0 10px 10px;
  }
  .title-card {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .hud {
    gap: 2px 14px;
    margin: 0 0 10px;
    font-size: 14px;
  }
  .places {
    gap: 4px;
    padding: 0 4px;
  }
  .places button {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-height: 52px;
    padding: 6px 2px 5px;
    font-size: 13px;
  }
  .places .ico {
    font-size: 19px;
  }
  .scene {
    border-width: 4px;
  }
  .hint {
    width: 22px;
    height: 22px;
    font-size: 17px;
  }
  .hint-story {
    width: 24px;
    height: 24px;
    font-size: 15px;
  }
  .quest {
    padding: 14px 14px 16px;
  }
  .quest h2 {
    font-size: 22px;
  }
  .narrator {
    padding: 14px 16px;
  }
  .narrator h2 {
    font-size: 20px;
  }
  .choices button {
    flex: 1 1 100%;
  }
  .panels {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .actor,
  .hint,
  .story,
  .flames,
  .twinkle,
  .snowflake,
  .room-garland {
    animation: none;
  }
  .actor,
  .narrator,
  .room-sparkles {
    transition: none;
  }
  .points-pop {
    animation: pointsfade 1.6s ease-out forwards;
  }
  .hud #score.bump {
    animation: none;
  }
}
@keyframes pointsfade {
  0%,
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
