/* ==========================================================================
   BAD HABIT RABBIT - CSS STYLESHEET (VIBRANT CARTOON SPRING DESIGN)
   ========================================================================== */

:root {
  --font-main: 'Fredoka', 'Outfit', system-ui, -apple-system, sans-serif;
  
  /* Forårs- & Tegneserie Farvepalet */
  --bg-sky: linear-gradient(180deg, #A2D2FF 0%, #BDE0FE 40%, #CDEAC0 100%);
  --primary: #FFB703;
  --primary-hover: #FFA200;
  --primary-shadow: #D48B00;
  --secondary: #4CC9F0;
  --accent-pink: #FF85A1;
  --accent-green: #52B788;
  --accent-orange: #FB8500;
  --accent-red: #E63946;
  --wood-dark: #7F4F24;
  --wood-light: #DDA15E;
  
  --text-dark: #2B2D42;
  --text-light: #FFFFFF;
  
  --card-bg: rgba(255, 255, 255, 0.94);
  --card-border: rgba(255, 255, 255, 0.7);
  --shadow-main: 0 12px 32px rgba(43, 45, 66, 0.15);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-main);
  background: var(--bg-sky);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

#app-container {
  width: 100%;
  max-width: 1050px;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #FAFAFA;
  box-shadow: 0 0 40px rgba(0,0,0,0.15);
  overflow: hidden;
}

@media (min-width: 1120px) and (min-height: 830px) and (hover: hover) {
  #app-container {
    height: 94vh;
    height: 94dvh;
    max-height: 900px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: auto;
    border: 4px solid #FFFFFF;
  }
}

body.is-fullscreen {
  overflow: hidden;
}

body.is-fullscreen #app-container,
:fullscreen #app-container,
:-webkit-full-screen #app-container,
#app-container:fullscreen,
#app-container:-webkit-full-screen {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(0,0,0,0.06);
  z-index: 50;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 10px;
  margin-left: -10px;
  border-radius: var(--radius-md);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.logo-group:hover {
  background: rgba(255, 183, 3, 0.14);
  transform: scale(1.03);
}

.logo-group:active {
  transform: scale(0.97);
}

.logo-bounce {
  width: 40px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: bunny-wiggle 3s infinite ease-in-out;
}

.logo-bounce svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.app-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon-label {
  background: #FFF;
  border: 2px solid #E5E5E5;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: 0 3px 0 #D4D4D4;
  transition: all 0.15s ease;
}

.btn-icon-label:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #D4D4D4;
}

.btn-fullscreen-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.btn-fullscreen-toggle .fullscreen-icon {
  flex-shrink: 0;
}

.btn-fullscreen-toggle .icon-exit-fs {
  display: none;
}

body.is-fullscreen .btn-fullscreen-toggle {
  background: #FFF8E7;
  border-color: #FFB703;
  box-shadow: 0 3px 0 #D48B00;
}

body.is-fullscreen .btn-fullscreen-toggle .icon-enter-fs {
  display: none;
}

body.is-fullscreen .btn-fullscreen-toggle .icon-exit-fs {
  display: block;
}

@media (max-width: 520px) {
  .btn-fullscreen-toggle .fullscreen-label {
    display: none;
  }
  .btn-fullscreen-toggle {
    padding: 8px 10px;
  }
}

.btn-icon {
  background: #FFF;
  border: 2px solid #E5E5E5;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 0 #D4D4D4;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  transform: scale(1.08);
}

/* ==========================================================================
   SCREENS BASE
   ========================================================================== */

.screen {
  display: none;
  flex: 1;
  width: 100%;
  position: relative;
  overflow-y: auto;
  background: var(--bg-sky);
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   1. HISTORIE / INTRO SKÆRM (3D STORYBOOK HERO FORSIDE)
   ========================================================================== */

#story-screen {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.story-scene-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.story-bg-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.story-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  position: relative;
  z-index: 2;
}

.story-card {
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.96) 0%, rgba(255, 248, 232, 0.95) 100%);
  backdrop-filter: blur(8px);
  border: 4px solid #8D5B2D;
  border-radius: 28px;
  padding: 28px 32px;
  max-width: 900px;
  width: 100%;
  box-shadow:
    0 10px 0 #5C3818,
    0 24px 48px rgba(30, 20, 10, 0.32),
    inset 0 2px 0 #FFFFFF;
  display: grid;
  grid-template-columns: 295px 1fr;
  gap: 28px;
  align-items: stretch;
  text-align: left;
}

/* Venstre Kolonne: Kanin-Diorama & Statistik */
.story-hero-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.story-illustration {
  position: relative;
  flex: 1;
  min-height: 245px;
  background: radial-gradient(circle at 50% 42%, #FFF9DB 0%, #FFE8A3 62%, #F3C677 100%);
  border: 3px solid #D4A359;
  border-radius: 22px;
  padding: 18px 14px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    inset 0 4px 12px rgba(255, 255, 255, 0.8),
    0 6px 0 #C08B3E,
    0 10px 20px rgba(92, 56, 24, 0.14);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
}

.story-illustration:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    inset 0 4px 12px rgba(255, 255, 255, 0.9),
    0 9px 0 #C08B3E,
    0 16px 28px rgba(92, 56, 24, 0.24);
}

.story-diorama-glow {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 70%);
  top: 24px;
  pointer-events: none;
}

.story-speech-pill {
  position: relative;
  z-index: 3;
  background: #FFFFFF;
  color: #5C3818;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 14px;
  border: 2px solid #D4A359;
  box-shadow: 0 3px 0 rgba(92, 56, 24, 0.15);
  margin-bottom: 6px;
  white-space: nowrap;
}

.story-bunny-hero {
  position: relative;
  z-index: 2;
  width: 155px;
  height: 165px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 10px rgba(60, 35, 10, 0.22));
}

/* ==========================================================================
   VARIERENDE KANIN-BEVÆGELSER (THUMBS UP, DANS, KIG OP, HOP, LØB PÅ STEDET)
   ========================================================================== */

/* 1. THUMBS UP: Løfter tommelfingeren, blinker og vipper med ørerne */
.choreo-thumbsup .bunny-arm-thumbsup {
  transform-box: fill-box;
  transform-origin: 15% 20%;
  animation: choreo-thumb-wave 0.55s ease-in-out infinite alternate;
}

.choreo-thumbsup .thumbs-up-sparkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: choreo-sparkle-pop 0.6s ease-in-out infinite alternate;
}

.choreo-thumbsup .bunny-head {
  transform-box: fill-box;
  transform-origin: 50% 85%;
  animation: choreo-head-nod 0.65s ease-in-out infinite alternate;
}

.choreo-thumbsup .bunny-ears {
  transform-box: fill-box;
  transform-origin: 50% 90%;
  animation: story-ears-sway 0.7s ease-in-out infinite alternate;
}

/* 2. DANSE: Vrikker fra side til side, svinger armene højt og tripper med fødderne */
.choreo-dance .bunny-upper-body {
  transform-box: fill-box;
  transform-origin: 50% 90%;
  animation: choreo-dance-sway 0.42s ease-in-out infinite alternate;
}

.choreo-dance .bunny-arm-left {
  transform-box: fill-box;
  transform-origin: 85% 25%;
  animation: choreo-dance-arm-l 0.42s ease-in-out infinite alternate;
}

.choreo-dance .bunny-arm-right {
  transform-box: fill-box;
  transform-origin: 15% 25%;
  animation: choreo-dance-arm-r 0.42s ease-in-out infinite alternate;
}

.choreo-dance .bunny-leg-left {
  transform-box: fill-box;
  transform-origin: 50% 15%;
  animation: choreo-dance-foot-l 0.42s ease-in-out infinite alternate;
}

.choreo-dance .bunny-leg-right {
  transform-box: fill-box;
  transform-origin: 50% 15%;
  animation: choreo-dance-foot-r 0.42s ease-in-out infinite alternate;
}

.choreo-dance .bunny-ears {
  transform-box: fill-box;
  transform-origin: 50% 90%;
  animation: choreo-dance-ears 0.42s ease-in-out infinite alternate;
}

/* 3. KIGGE OP: Lægger hovedet lidt tilbage, kigger op og spejder fra side til side */
.choreo-lookup .bunny-head {
  transform-box: fill-box;
  transform-origin: 50% 88%;
  animation: choreo-lookup-head 1.15s ease-in-out infinite alternate;
}

.choreo-lookup .bunny-eye-gaze {
  animation: choreo-lookup-eyes 1.15s ease-in-out infinite alternate;
}

.choreo-lookup .bunny-ear-left {
  transform-box: fill-box;
  transform-origin: 70% 95%;
  animation: choreo-ear-perk-l 0.55s ease-in-out infinite alternate;
}

.choreo-lookup .bunny-ear-right {
  transform-box: fill-box;
  transform-origin: 30% 95%;
  animation: choreo-ear-perk-r 0.55s ease-in-out infinite alternate;
}

/* 4. HOPPE: Sætter af fra jorden (mens gulvskyggen bliver mindre) og spræller i luften */
.choreo-jump .bunny-root {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: choreo-jump-body 0.68s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
}

.choreo-jump .bunny-ground-shadow {
  transform-box: fill-box;
  transform-origin: center;
  animation: choreo-jump-shadow 0.68s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
}

.choreo-jump .bunny-arm-left {
  transform-box: fill-box;
  transform-origin: 85% 25%;
  animation: choreo-jump-arm-l 0.68s ease-in-out infinite;
}

.choreo-jump .bunny-arm-right {
  transform-box: fill-box;
  transform-origin: 15% 25%;
  animation: choreo-jump-arm-r 0.68s ease-in-out infinite;
}

/* 5. LØBE PÅ STEDET: Hurtige skiftende benløft og pumpende arme */
.choreo-run-place .bunny-upper-body {
  transform-box: fill-box;
  transform-origin: 50% 90%;
  animation: choreo-run-torso 0.22s ease-in-out infinite alternate;
}

.choreo-run-place .bunny-leg-left {
  transform-box: fill-box;
  transform-origin: 50% 15%;
  animation: choreo-run-leg-a 0.22s ease-in-out infinite alternate;
}

.choreo-run-place .bunny-leg-right {
  transform-box: fill-box;
  transform-origin: 50% 15%;
  animation: choreo-run-leg-b 0.22s ease-in-out infinite alternate;
}

.choreo-run-place .bunny-arm-left {
  transform-box: fill-box;
  transform-origin: 85% 25%;
  animation: choreo-run-arm-a 0.22s ease-in-out infinite alternate;
}

.choreo-run-place .bunny-arm-right {
  transform-box: fill-box;
  transform-origin: 15% 25%;
  animation: choreo-run-arm-b 0.22s ease-in-out infinite alternate;
}

@keyframes choreo-thumb-wave {
  0% { transform: rotate(-18deg); }
  100% { transform: rotate(-36deg); }
}

@keyframes choreo-sparkle-pop {
  0% { transform: scale(0.75) rotate(-15deg); opacity: 0.7; }
  100% { transform: scale(1.25) rotate(20deg); opacity: 1; }
}

@keyframes choreo-head-nod {
  0% { transform: rotate(-3deg) translateY(0); }
  100% { transform: rotate(4deg) translateY(-2px); }
}

@keyframes choreo-dance-sway {
  0% { transform: translateX(-4px) rotate(-6.5deg) translateY(0); }
  50% { transform: translateX(0) rotate(0deg) translateY(-4px); }
  100% { transform: translateX(4px) rotate(6.5deg) translateY(0); }
}

@keyframes choreo-dance-arm-l {
  0% { transform: rotate(34deg) translateY(-4px); }
  100% { transform: rotate(-18deg) translateY(2px); }
}

@keyframes choreo-dance-arm-r {
  0% { transform: rotate(18deg) translateY(2px); }
  100% { transform: rotate(-34deg) translateY(-4px); }
}

@keyframes choreo-dance-foot-l {
  0% { transform: translateY(-7px) rotate(-10deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes choreo-dance-foot-r {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-7px) rotate(10deg); }
}

@keyframes choreo-dance-ears {
  0% { transform: rotate(-8deg); }
  100% { transform: rotate(8deg); }
}

@keyframes choreo-lookup-head {
  0% { transform: translateY(-3px) rotate(-4deg); }
  100% { transform: translateY(-4px) rotate(4deg); }
}

@keyframes choreo-lookup-eyes {
  0% { transform: translate(-2.4px, -3.6px); }
  50% { transform: translate(0px, -4.4px); }
  100% { transform: translate(2.4px, -3.6px); }
}

@keyframes choreo-ear-perk-l {
  0% { transform: rotate(-2deg); }
  100% { transform: rotate(-10deg) scaleY(1.04); }
}

@keyframes choreo-ear-perk-r {
  0% { transform: rotate(2deg); }
  100% { transform: rotate(10deg) scaleY(1.04); }
}

@keyframes choreo-jump-body {
  0%, 100% { transform: translateY(3px) scale(1.05, 0.93); }
  45% { transform: translateY(-16px) scale(0.96, 1.05); }
  55% { transform: translateY(-17px) scale(0.96, 1.05); }
}

@keyframes choreo-jump-shadow {
  0%, 100% { transform: scale(1.08); opacity: 0.95; }
  50% { transform: scale(0.64); opacity: 0.45; }
}

@keyframes choreo-jump-arm-l {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(32deg); }
}

@keyframes choreo-jump-arm-r {
  0%, 100% { transform: rotate(6deg); }
  50% { transform: rotate(-32deg); }
}

@keyframes choreo-run-torso {
  0% { transform: translateY(0px) rotate(-2deg); }
  100% { transform: translateY(-3.5px) rotate(2deg); }
}

@keyframes choreo-run-leg-a {
  0% { transform: translateY(-8px) rotate(-12deg); }
  100% { transform: translateY(1px) rotate(6deg); }
}

@keyframes choreo-run-leg-b {
  0% { transform: translateY(1px) rotate(-6deg); }
  100% { transform: translateY(-8px) rotate(12deg); }
}

@keyframes choreo-run-arm-a {
  0% { transform: rotate(-24deg) translateY(2px); }
  100% { transform: rotate(26deg) translateY(-4px); }
}

@keyframes choreo-run-arm-b {
  0% { transform: rotate(-26deg) translateY(-4px); }
  100% { transform: rotate(24deg) translateY(2px); }
}

@keyframes story-ears-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(4deg); }
}

.chocolate-wrappers {
  position: relative;
  z-index: 3;
  width: 96%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -10px;
}

.basket-empty-tag {
  background: rgba(255, 255, 255, 0.78);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 1.15rem;
  border: 1.5px dashed #B07D3A;
}

.story-play-hint {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  background: rgba(92, 56, 24, 0.85);
  color: #FFF9DB;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  padding: 4px 8px;
  border-radius: 10px;
  letter-spacing: 0.2px;
}

/* Statistik-boks under kanin-diorama */
.story-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.story-stat-pill {
  background: #FFFFFF;
  border: 2.5px solid #E2C799;
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 0 #D4B483;
}

.story-stat-pill .stat-icon {
  font-size: 1.45rem;
}

.story-stat-pill .stat-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.story-stat-pill .stat-text strong {
  font-size: 0.95rem;
  color: #3E2723;
  font-weight: 900;
}

.story-stat-pill .stat-text span {
  font-size: 0.74rem;
  color: #795548;
  font-weight: 700;
}

/* Højre Kolonne: Historie & 3 Missions-trin */
.story-dialogue-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.story-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.story-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FFE5D9, #FFD166);
  color: #9B2226;
  font-weight: 900;
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid rgba(155, 34, 38, 0.2);
  letter-spacing: 0.3px;
}

.story-season-tag {
  display: inline-block;
  background: #E8F5E9;
  color: #2E7D32;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid #A5D6A7;
}

.story-dialogue-content h2 {
  font-size: 1.65rem;
  line-height: 1.2;
  color: #2B2D42;
  margin-bottom: 10px;
  text-shadow: 0 1px 0 #FFFFFF;
}

.story-dialogue-content .story-lead {
  font-size: 0.98rem;
  line-height: 1.48;
  color: #4A5568;
  margin-bottom: 14px;
}

/* De 3 Trin-for-Trin Missions-Kort */
.story-mission-steps {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 18px;
}

.mission-step-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFDF8 100%);
  border: 2px solid #E2C799;
  border-radius: 15px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 3px 0 #D4B483;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.mission-step-card:hover {
  transform: translateX(3px);
  border-color: #F4A261;
}

.step-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(180deg, #FFE082 0%, #FFB703 100%);
  border: 2px solid #C87D20;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.75), 0 2px 0 rgba(140, 88, 28, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading, 'Fredoka', sans-serif);
  font-size: 1.15rem;
  font-weight: 900;
  color: #3E2723;
  flex-shrink: 0;
}

.step-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.22;
  flex: 1;
  min-width: 0;
}

.step-info strong {
  font-family: var(--font-heading, 'Fredoka', sans-serif);
  font-size: 1.02rem;
  color: #2B2D42;
  font-weight: 800;
}

.step-info span {
  font-size: 0.88rem;
  color: #4A5568;
  font-weight: 700;
}

.step-visual-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #FFF8E7;
  border: 1.5px solid #EAD5B0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Handlingsknapper på forsiden */
.story-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.story-actions #btn-start-story {
  width: 100%;
}

@media (max-width: 780px) {
  .story-card {
    grid-template-columns: 1fr;
    padding: 22px 18px;
    gap: 18px;
  }
  .story-actions {
    grid-template-columns: 1fr;
  }
}

.btn-cinema {
  background: linear-gradient(135deg, #FF0055 0%, #D90429 45%, #9B2226 100%);
  color: #FFF;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  padding: 15px 24px;
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 0 #6A040F, 0 12px 24px rgba(217, 4, 41, 0.35);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.btn-cinema::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-25deg);
  animation: shine-sweep 3.5s infinite;
}

.btn-cinema:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 9px 0 #6A040F, 0 16px 28px rgba(217, 4, 41, 0.45);
}

.btn-cinema:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #6A040F;
}

.pulse-gold {
  animation: pulse-gold-glow 2.4s infinite ease-in-out;
}

@keyframes pulse-gold-glow {
  0%, 100% {
    box-shadow: 0 6px 0 #6A040F, 0 10px 20px rgba(217, 4, 41, 0.3);
  }
  50% {
    box-shadow: 0 6px 0 #6A040F, 0 0 28px rgba(255, 183, 3, 0.7), 0 14px 28px rgba(217, 4, 41, 0.5);
  }
}

@keyframes shine-sweep {
  0%, 60% { left: -100%; }
  100% { left: 200%; }
}

/* ==========================================================================
   KNAPPER & TILE SYSTEM
   ========================================================================== */

.btn-primary {
  background: var(--primary);
  color: #593500;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--primary-shadow), 0 10px 20px rgba(255, 183, 3, 0.4);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--primary-shadow), 0 12px 24px rgba(255, 183, 3, 0.45);
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--primary-shadow);
}

.btn-secondary {
  background: #FFF;
  color: var(--text-dark);
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 #CBD5E1;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #CBD5E1;
}

.btn-large {
  font-size: 1.25rem;
  padding: 16px 32px;
}

/* Den store 3D "Gå til næste bane" knap */
.btn-next-scene {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #FFE066 0%, #FFB703 52%, #F48C06 100%);
  color: #3B1F06;
  border: 3px solid #5C3411;
  border-radius: 20px;
  padding: 14px 20px 14px 24px;
  font-family: var(--font-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 460px;
  box-shadow:
    inset 0 2.5px 0 rgba(255, 255, 255, 0.82),
    inset 0 -3px 0 rgba(168, 78, 0, 0.25),
    0 6px 0 #7A420C,
    0 12px 24px rgba(122, 66, 12, 0.25);
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-next-scene::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-24deg);
  animation: shine-sweep 3.8s infinite;
  pointer-events: none;
}

.btn-next-scene:hover {
  transform: translateY(-3px) scale(1.015);
  filter: brightness(1.03);
  box-shadow:
    inset 0 2.5px 0 rgba(255, 255, 255, 0.9),
    inset 0 -3px 0 rgba(168, 78, 0, 0.25),
    0 9px 0 #7A420C,
    0 16px 30px rgba(122, 66, 12, 0.34);
}

.btn-next-scene:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    0 2px 0 #7A420C,
    0 6px 12px rgba(122, 66, 12, 0.2);
}

.btn-next-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
  min-width: 0;
  flex: 1;
}

.next-label {
  display: inline-block;
  background: rgba(255, 253, 245, 0.72);
  border: 1.5px solid rgba(92, 52, 17, 0.28);
  color: #6E3806;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 2px 10px;
  border-radius: 999px;
}

.next-title {
  font-size: 1.22rem;
  font-weight: 900;
  color: #2D1604;
  line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.next-arrow-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFFDF7 0%, #FFE8A3 100%);
  border: 2.5px solid #5C3411;
  color: #4A2508;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 2px 0 #FFFFFF,
    0 3px 0 #7A420C;
  animation: arrow-bounce 1.6s infinite ease-in-out;
}

.pulse-arrow {
  animation: pulse-glow 2.4s infinite ease-in-out;
}

/* ==========================================================================
   2. GAMEPLAY: STEALTH SCENE
   ========================================================================== */

.gameplay-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.stealth-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* PROPORTIONEL BANESKALERING (Faste proportioner på Chromebook, PC, iPad & Mobil) */
.stage-viewport-shell {
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #2C5E3B;
}

.chase-viewport-shell {
  background: linear-gradient(180deg, #72B6FF 0%, #BDE0FE 48%, #74C69D 48%, #40916C 100%);
}

.stage-aspect-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1050px;
  height: 550px;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  overflow: hidden;
}

.chase-aspect-canvas {
  height: 460px;
}

.stage-aspect-canvas .thematic-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  height: 123.636%;
  z-index: 1;
}

.stage-aspect-canvas .stage-playfield {
  position: absolute;
  top: 20%;
  left: 0;
  right: 0;
  height: 80%;
  margin: 0;
  z-index: 10;
}

.chase-aspect-canvas .chase-sky {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 90px;
}

.chase-aspect-canvas .chase-track {
  position: absolute;
  top: 74px;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
}

/* THEMATIC BACKGROUNDS */
.thematic-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.scene-3d-bg-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 1. Hønsehus Bagrund (Barn Interior - 3D Perspektiv) */
.bg-barn {
  width: 100%;
  height: 100%;
  background: #D99B58;
  display: block;
  position: relative;
}

.barn-wood-wall {
  height: 28%;
  background: repeating-linear-gradient(90deg, #D4A373, #D4A373 60px, #C58A48 60px, #C58A48 64px);
  border-bottom: 8px solid #7F4F24;
  position: relative;
}

.barn-beam {
  position: absolute;
  background: #936639;
  border-bottom: 3px solid #582F0E;
}

.beam-top {
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
}

.barn-window {
  position: absolute;
  top: 25px;
  left: 15%;
  width: 75px;
  height: 75px;
  background: #A2D2FF;
  border: 5px solid #7F4F24;
  border-radius: 8px;
  overflow: hidden;
}

.window-sunbeam {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 300px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 243, 176, 0) 70%);
  pointer-events: none;
}

.spider-web {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2rem;
  opacity: 0.6;
}

.hay-loft-beam {
  position: absolute;
  height: 16px;
  background: #7F4F24;
  border-top: 4px solid #DDA15E;
}

.barn-wood-floor {
  flex: 1;
  background: repeating-linear-gradient(0deg, #E5BA88, #E5BA88 40px, #D49D6A 40px, #D49D6A 43px);
  position: relative;
}

.straw-pile {
  position: absolute;
  font-size: 2.2rem;
}
.pile-1 { top: 15px; left: 25%; }
.pile-2 { bottom: 20px; right: 20%; }
.corn-bowl {
  position: absolute;
  bottom: 25px;
  left: 10%;
  font-size: 1.1rem;
  font-weight: 800;
  background: #FFF;
  padding: 4px 10px;
  border-radius: 12px;
  border: 2px solid #BC6C25;
}

/* 2. Have Baggrund (Garden - 3D Perspektiv) */
.bg-garden {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
}

/* 3. Slot Baggrund (Castle - 3D Perspektiv) */
.bg-castle {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
}

/* 4. Mølle Baggrund (Mill - 3D Perspektiv) */
.bg-mill {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
}

/* 5. Drivhus Baggrund (Greenhouse - 3D Perspektiv) */
.bg-greenhouse {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
}

/* 6. Andedam Baggrund (Pond - 3D Perspektiv) */
.bg-pond {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
}

/* FORBUNDET STI (PATH LAYER) */
.stage-path-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.scene-path-svg {
  width: 100%;
  height: 100%;
}

/* UI OVERLAYS (Kompakt 3D Topbar uden overlap med Opgave-boblen!) */
.alert-meter-container {
  position: absolute;
  top: 8px;
  left: 16px;
  right: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 249, 250, 0.95) 100%);
  border: 2.5px solid #2B2D42;
  border-radius: 16px;
  padding: 6px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 4px 0 rgba(43, 45, 66, 0.25), 0 6px 14px rgba(0, 0, 0, 0.18);
  z-index: 28;
}

.alert-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.alert-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.9rem;
  color: #2B2D42;
}

.alert-meter-bar {
  width: 100%;
  height: 10px;
  background: #E2E8F0;
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid rgba(43, 45, 66, 0.25);
}

.alert-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  transition: width 0.1s linear, background 0.3s ease;
}

.quest-bubble {
  position: absolute;
  top: 66px;
  left: 16px;
  right: 16px;
  background: linear-gradient(180deg, #FFFDF7 0%, #FFE8C2 100%);
  border: 2.5px solid #8C561E;
  border-radius: 16px;
  padding: 5px 14px;
  font-size: 0.86rem;
  font-weight: 800;
  color: #2B2D42;
  z-index: 26;
  box-shadow: 0 3px 0 rgba(88, 47, 14, 0.3), 0 4px 10px rgba(0, 0, 0, 0.14);
}

.stage-playfield {
  flex: 1;
  position: relative;
  margin-top: 110px;
  margin-bottom: 140px;
  z-index: 10;
  cursor: default;
}

/* Frys alle figurers animationer i selve banen, mens opgavesiden (#mini-puzzle-overlay) er åben */
.stage-playfield.stage-frozen > :not(#mini-puzzle-overlay),
.stage-playfield.stage-frozen > :not(#mini-puzzle-overlay) * {
  animation-play-state: paused !important;
}

/* Karakterer i scenen */
.bunny-actor {
  position: absolute;
  width: 112px;
  height: 134px;
  z-index: 20;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}

/* Animation når kaninen går ind i døråbningen og ud gennem døren / havelågen */
.bunny-actor.bunny-exiting-door {
  transition: left 0.72s ease-in-out, top 0.45s ease-out, transform 0.78s ease-in, opacity 0.65s ease-in 0.15s;
  transform: translate(-18px, -8px) scale(0.54);
  opacity: 0;
}

.bunny-actor svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* === KANINENS ANATOMISKE LED & BEVÆGELSES-ANIMATIONER === */
.bunny-svg .bunny-leg {
  transform-box: fill-box;
  transform-origin: 50% 8%;
  transition: transform 0.15s ease;
}

.bunny-svg .bunny-arm-left {
  transform-box: fill-box;
  transform-origin: 85% 20%;
}

.bunny-svg .bunny-arm-right {
  transform-box: fill-box;
  transform-origin: 15% 20%;
}

.bunny-svg.pose-paint .bunny-arm-right {
  transform: rotate(-30deg);
}

.bunny-svg .bunny-ears {
  transform-box: fill-box;
  transform-origin: 50% 90%;
}

.bunny-svg.pose-jump .bunny-ears {
  transform: rotate(-6deg);
}

.bunny-svg.pose-run .bunny-ears {
  transform: rotate(-12deg);
}

.bunny-svg.pose-duck .bunny-ears {
  transform: rotate(-8deg);
}

.bunny-svg .bunny-ear-left {
  transform-box: fill-box;
  transform-origin: 60% 88%;
  transform: rotate(-8deg);
}

.bunny-svg .bunny-ear-right {
  transform-box: fill-box;
  transform-origin: 40% 88%;
  transform: rotate(8deg);
}

.bunny-svg .bunny-upper-body {
  transform-box: fill-box;
  transform-origin: 50% 85%;
}

/* Rolig vejrtrækning når kaninen står stille */
.bunny-svg.pose-idle .bunny-upper-body {
  animation: bunny-idle-breathe 2.6s ease-in-out infinite;
}

.bunny-svg.pose-idle .bunny-ear-left {
  animation: bunny-ear-idle-l 3.4s ease-in-out infinite;
}

.bunny-svg.pose-idle .bunny-ear-right {
  animation: bunny-ear-idle-r 3.4s ease-in-out infinite;
}

/* GANG- & LØBE-ANIMATION (Benene går skiftevis, armene svinger, overkroppen fjedrer) */
.bunny-walking .bunny-svg .bunny-leg-left,
.bunny-svg.pose-sneak .bunny-leg-left,
.bunny-svg.pose-run .bunny-leg-left {
  animation: bunny-leg-step-l 0.34s ease-in-out infinite alternate;
}

.bunny-walking .bunny-svg .bunny-leg-right,
.bunny-svg.pose-sneak .bunny-leg-right,
.bunny-svg.pose-run .bunny-leg-right {
  animation: bunny-leg-step-r 0.34s ease-in-out infinite alternate;
}

.bunny-walking .bunny-svg .bunny-arm-left,
.bunny-svg.pose-sneak .bunny-arm-left,
.bunny-svg.pose-run .bunny-arm-left {
  animation: bunny-arm-swing-l 0.34s ease-in-out infinite alternate;
}

.bunny-walking .bunny-svg .bunny-arm-right,
.bunny-svg.pose-sneak .bunny-arm-right,
.bunny-svg.pose-run .bunny-arm-right {
  animation: bunny-arm-swing-r 0.34s ease-in-out infinite alternate;
}

.bunny-walking .bunny-svg .bunny-upper-body,
.bunny-svg.pose-sneak .bunny-upper-body,
.bunny-svg.pose-run .bunny-upper-body {
  animation: bunny-walk-bob 0.17s ease-in-out infinite alternate;
}

.bunny-walking .bunny-svg .bunny-ear-left,
.bunny-svg.pose-sneak .bunny-ear-left,
.bunny-svg.pose-run .bunny-ear-left {
  animation: bunny-ear-walk-l 0.34s ease-in-out infinite alternate;
}

.bunny-walking .bunny-svg .bunny-ear-right,
.bunny-svg.pose-sneak .bunny-ear-right,
.bunny-svg.pose-run .bunny-ear-right {
  animation: bunny-ear-walk-r 0.34s ease-in-out infinite alternate;
}

/* HOP-ANIMATION (Bagbenene sætter af og strækker sig i luften, armene løftes) */
.bunny-jumping .bunny-svg .bunny-leg-left,
.bunny-svg.pose-jump .bunny-leg-left {
  animation: bunny-leg-jump-l 0.28s ease-out forwards;
}

.bunny-jumping .bunny-svg .bunny-leg-right,
.bunny-svg.pose-jump .bunny-leg-right {
  animation: bunny-leg-jump-r 0.28s ease-out forwards;
}

.bunny-jumping .bunny-svg .bunny-arm-left,
.bunny-svg.pose-jump .bunny-arm-left {
  transform: rotate(28deg) translateY(-3px);
}

.bunny-jumping .bunny-svg .bunny-arm-right,
.bunny-svg.pose-jump .bunny-arm-right {
  transform: rotate(-28deg) translateY(-3px);
}

@keyframes bunny-idle-breathe {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-2.5px) scale(1.015, 0.99); }
}

@keyframes bunny-ear-idle-l {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(-11deg); }
}

@keyframes bunny-ear-idle-r {
  0%, 100% { transform: rotate(7deg); }
  50% { transform: rotate(11deg); }
}

@keyframes bunny-leg-step-l {
  0% { transform: translateY(-7px) rotate(18deg); }
  100% { transform: translateY(2px) rotate(-14deg); }
}

@keyframes bunny-leg-step-r {
  0% { transform: translateY(2px) rotate(-14deg); }
  100% { transform: translateY(-7px) rotate(18deg); }
}

@keyframes bunny-arm-swing-l {
  0% { transform: rotate(-16deg) translateY(1px); }
  100% { transform: rotate(18deg) translateY(-3px); }
}

@keyframes bunny-arm-swing-r {
  0% { transform: rotate(18deg) translateY(-3px); }
  100% { transform: rotate(-16deg) translateY(1px); }
}

@keyframes bunny-walk-bob {
  0% { transform: translateY(0px) rotate(-1.5deg); }
  100% { transform: translateY(-3.5px) rotate(2deg); }
}

@keyframes bunny-ear-walk-l {
  0% { transform: rotate(-6deg); }
  100% { transform: rotate(-12deg); }
}

@keyframes bunny-ear-walk-r {
  0% { transform: rotate(12deg); }
  100% { transform: rotate(6deg); }
}

@keyframes bunny-leg-jump-l {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(24deg); }
  100% { transform: translateY(-4px) rotate(16deg); }
}

@keyframes bunny-leg-jump-r {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-24deg); }
  100% { transform: translateY(-4px) rotate(-16deg); }
}

/* GLAD GULERODSDANS & GUMLEN (Når kaninen spiser en gulerod!) */
.bunny-carrot-dancing .bunny-svg,
.bunny-svg.pose-eatCarrot {
  animation: bunny-carrot-dance-hop 0.32s ease-in-out infinite alternate;
}

.bunny-svg.pose-eatCarrot .bunny-upper-body {
  animation: bunny-carrot-dance-sway 0.24s ease-in-out infinite alternate;
}

.bunny-svg.pose-eatCarrot .bunny-leg-left {
  animation: bunny-carrot-tap-l 0.24s ease-in-out infinite alternate;
}

.bunny-svg.pose-eatCarrot .bunny-leg-right {
  animation: bunny-carrot-tap-r 0.24s ease-in-out infinite alternate;
}

.bunny-svg.pose-eatCarrot .bunny-ear-left {
  animation: bunny-ear-dance-l 0.24s ease-in-out infinite alternate;
}

.bunny-svg.pose-eatCarrot .bunny-ear-right {
  animation: bunny-ear-dance-r 0.24s ease-in-out infinite alternate;
}

.bunny-svg.pose-eatCarrot .bunny-carrot-feast {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: bunny-carrot-chomp 0.16s ease-in-out infinite alternate;
}

.bunny-svg.pose-eatCarrot .carrot-crumbs {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: carrot-crumbs-pop 0.28s ease-out infinite;
}

@keyframes bunny-carrot-dance-hop {
  0% { transform: translateY(0px) scale(1, 1); }
  100% { transform: translateY(-7px) scale(1.04, 0.97); }
}

@keyframes bunny-carrot-dance-sway {
  0% { transform: rotate(-7deg) translateY(0px); }
  100% { transform: rotate(7deg) translateY(-3px); }
}

@keyframes bunny-carrot-tap-l {
  0% { transform: translateY(-8px) rotate(20deg); }
  100% { transform: translateY(1px) rotate(-10deg); }
}

@keyframes bunny-carrot-tap-r {
  0% { transform: translateY(1px) rotate(10deg); }
  100% { transform: translateY(-8px) rotate(-20deg); }
}

@keyframes bunny-ear-dance-l {
  0% { transform: rotate(-18deg); }
  100% { transform: rotate(2deg); }
}

@keyframes bunny-ear-dance-r {
  0% { transform: rotate(-2deg); }
  100% { transform: rotate(18deg); }
}

@keyframes bunny-carrot-chomp {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(-3.5px) scale(1.07); }
}

@keyframes carrot-crumbs-pop {
  0% { transform: scale(0.75); opacity: 0.95; }
  100% { transform: scale(1.22) translateY(-3px); opacity: 0.35; }
}

/* ISPYT-BALANCE: Nissen vakler voldsomt, fægter med armene og glider med benene for ikke at falde på isen */
.bunny-actor.bunny-ice-wobble .bunny-svg {
  transform-origin: 50% 92%;
  animation: bunny-ice-balance 0.36s ease-in-out infinite alternate;
}

.bunny-actor.bunny-ice-wobble .bunny-svg .bunny-upper-body {
  animation: bunny-ice-torso 0.24s ease-in-out infinite alternate;
}

.bunny-actor.bunny-ice-wobble .bunny-svg .bunny-arm-left {
  animation: bunny-ice-arm-l 0.22s ease-in-out infinite alternate;
}

.bunny-actor.bunny-ice-wobble .bunny-svg .bunny-arm-right {
  animation: bunny-ice-arm-r 0.22s ease-in-out infinite alternate;
}

.bunny-actor.bunny-ice-wobble .bunny-svg .bunny-leg-left {
  animation: bunny-ice-leg-l 0.26s ease-in-out infinite alternate;
}

.bunny-actor.bunny-ice-wobble .bunny-svg .bunny-leg-right {
  animation: bunny-ice-leg-r 0.26s ease-in-out infinite alternate;
}

@keyframes bunny-ice-balance {
  0%   { transform: rotate(-18deg) translateX(-4.5px) translateY(1px); }
  50%  { transform: rotate(4deg) translateX(0px) translateY(-3px); }
  100% { transform: rotate(18deg) translateX(4.5px) translateY(1px); }
}

@keyframes bunny-ice-torso {
  0%   { transform: rotate(7deg) translateY(0px); }
  100% { transform: rotate(-7deg) translateY(-2px); }
}

@keyframes bunny-ice-arm-l {
  0%   { transform: rotate(68deg) translateY(-2px); }
  100% { transform: rotate(-18deg) translateY(2px); }
}

@keyframes bunny-ice-arm-r {
  0%   { transform: rotate(18deg) translateY(2px); }
  100% { transform: rotate(-68deg) translateY(-2px); }
}

@keyframes bunny-ice-leg-l {
  0%   { transform: rotate(22deg) translateX(-3px) translateY(-2px); }
  100% { transform: rotate(-14deg) translateX(2px) translateY(0px); }
}

@keyframes bunny-ice-leg-r {
  0%   { transform: rotate(-14deg) translateX(-2px) translateY(0px); }
  100% { transform: rotate(22deg) translateX(3px) translateY(-2px); }
}

.hen-actor {
  position: absolute;
  width: 130px;
  height: 130px;
  z-index: 12;
  overflow: visible;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.hen-svg-container,
.hen-svg {
  overflow: visible;
}

.hen-speech-bubble {
  position: absolute;
  top: -30px;
  right: 16px;
  left: auto;
  width: max-content;
  max-width: min(340px, 68vw);
  background: #FFF;
  border: 3px solid #2B2D42;
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 3px 0 #2B2D42;
  z-index: 30;
  pointer-events: none;
}

@media (max-width: 680px) {
  .hen-speech-bubble {
    right: 26px;
    font-size: 0.78rem;
    padding: 3px 8px;
    white-space: normal;
  }
}

/* === STRIKKENDE NISSEMOR ANIMATIONER (Gyngestol, strikkepinde, arme, julesok og garnnøgle) === */
.hen-svg.type-knitting .hen-rocking-chair {
  transform-box: view-box;
  transform-origin: 49.7% 88.75%;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  animation: hen-rock-chair 1.65s ease-in-out infinite alternate;
}

.hen-svg.type-knitting .hen-knit-arm-left {
  transform-box: fill-box;
  transform-origin: 24% 28%;
  animation: hen-knit-left 0.52s ease-in-out infinite alternate;
}

.hen-svg.type-knitting .hen-knit-arm-right {
  transform-box: fill-box;
  transform-origin: 76% 28%;
  animation: hen-knit-right 0.52s ease-in-out infinite alternate;
}

.hen-svg.type-knitting .hen-knit-fabric {
  transform-box: fill-box;
  transform-origin: 50% 10%;
  animation: hen-knit-fabric-sway 0.52s ease-in-out infinite alternate;
}

.hen-svg.type-knitting .hen-yarn-ball {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: hen-yarn-wobble 1.04s ease-in-out infinite alternate;
}

.hen-svg.type-knitting .hen-knit-head {
  transform-box: fill-box;
  transform-origin: 50% 88%;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  animation: hen-knit-nod 1.4s ease-in-out infinite alternate;
}

.hen-svg.type-knitting .hen-knit-brows,
.hen-svg.type-knitting .hen-knit-pupils {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hen-actor.hen-alert-up .hen-svg.type-knitting .hen-rocking-chair {
  animation: none;
  transform: rotate(0deg);
}

.hen-actor.hen-alert-up .hen-svg.type-knitting .hen-knit-arm-left,
.hen-actor.hen-alert-up .hen-svg.type-knitting .hen-knit-arm-right,
.hen-actor.hen-alert-up .hen-svg.type-knitting .hen-knit-fabric,
.hen-actor.hen-alert-up .hen-svg.type-knitting .hen-yarn-ball {
  animation-play-state: paused;
}

.hen-actor.hen-alert-up .hen-svg.type-knitting .hen-knit-head {
  animation: none;
  transform: translateY(-4px) rotate(-1.5deg);
}

.hen-actor.hen-alert-up .hen-svg.type-knitting .hen-knit-brows {
  transform: translateY(-2.5px);
}

.hen-actor.hen-alert-up .hen-svg.type-knitting .hen-knit-pupils {
  transform: translateY(-3.2px);
}

.hen-svg.type-guard .guard-flashlight-arm {
  transform-box: view-box;
  transform-origin: 0 0;
}

@keyframes hen-rock-chair {
  0%   { transform: rotate(-4.5deg) translateX(-1.5px); }
  100% { transform: rotate(4.5deg) translateX(1.5px); }
}

@keyframes hen-knit-left {
  0%   { transform: rotate(-4deg) translate(0px, -1px); }
  50%  { transform: rotate(3deg) translate(2px, 1.5px); }
  100% { transform: rotate(7deg) translate(0.5px, 2.2px); }
}

@keyframes hen-knit-right {
  0%   { transform: rotate(7deg) translate(-1px, 2px); }
  50%  { transform: rotate(-2deg) translate(-2.5px, -0.5px); }
  100% { transform: rotate(-6deg) translate(1px, -2px); }
}

@keyframes hen-knit-fabric-sway {
  0%   { transform: rotate(-2deg) translateY(0px); }
  100% { transform: rotate(2deg) translateY(-2px); }
}

@keyframes hen-yarn-wobble {
  0%   { transform: translateX(0px) rotate(0deg); }
  100% { transform: translateX(2.5px) rotate(10deg); }
}

@keyframes hen-knit-nod {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(-2.5deg) translateY(1px); }
}

/* === HAVEHØNE ANIMATIONER (Hakker hovedet op og ned i korn ved grøn alert, kigger op ved orange/rød alert) === */
.hen-svg.type-gardening .hen-garden-body-pivot {
  transform-origin: 0px 0px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  animation: hen-garden-body-peck 1.25s ease-in-out infinite;
}

.hen-svg.type-gardening .hen-garden-head-pivot {
  transform-origin: 0px 0px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  animation: hen-garden-head-peck 1.25s ease-in-out infinite;
}

.hen-svg.type-gardening .hen-corn-crumbs {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: hen-corn-crumb-hop 1.25s ease-out infinite;
}

.hen-svg.type-gardening .hen-garden-brow-calm {
  opacity: 1;
  transition: opacity 0.18s ease;
}

.hen-svg.type-gardening .hen-garden-brow-alert {
  opacity: 0;
  transition: opacity 0.18s ease;
}

/* Når hønen kommer i orange eller rød alert (.hen-alert-up), stopper den med at hakke og kigger op! */
.hen-actor.hen-alert-up .hen-svg.type-gardening .hen-garden-body-pivot {
  animation: none;
  transform: rotate(3deg);
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .hen-garden-head-pivot {
  animation: none;
  transform: rotate(8deg) translateY(-4px);
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .hen-corn-crumbs {
  animation: none;
  transform: none;
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .hen-garden-brow-calm {
  opacity: 0;
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .hen-garden-brow-alert {
  opacity: 1;
}

/* === NISSEPIGE MED HONNINGHJERTE (spisebevægelser når rolig, kigger op & til begge sider i orange/rød felt) === */
.hen-svg.type-gardening .girl-eyes-closed {
  opacity: 1;
  transition: opacity 0.14s ease;
}

.hen-svg.type-gardening .girl-eyes-open {
  opacity: 0;
  transition: opacity 0.14s ease;
}

.hen-svg.type-gardening .girl-brows {
  transition: transform 0.18s ease;
}

.hen-svg.type-gardening .girl-mouth-eating {
  opacity: 1;
  transition: opacity 0.14s ease;
}

.hen-svg.type-gardening .girl-mouth-alert {
  opacity: 0;
  transition: opacity 0.14s ease;
}

.hen-svg.type-gardening .girl-chew-bite {
  transform-box: fill-box;
  transform-origin: 50% 45%;
  animation: girl-chew 0.56s ease-in-out infinite;
}

.hen-svg.type-gardening .girl-heart-crumbs {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: girl-crumb-hop 1.12s ease-out infinite;
}

.hen-svg.type-gardening .girl-lick-tongue {
  opacity: 1;
  transform-box: fill-box;
  transform-origin: 50% 0%;
  animation: girl-lick 0.65s ease-in-out infinite alternate;
}

.hen-svg.type-gardening .girl-candy-arm {
  transform-origin: 98px 76px;
  transition: transform 0.22s ease;
  animation: girl-candy-bob 1.12s ease-in-out infinite;
}

.hen-svg.type-gardening .girl-head-group {
  transform-origin: 82px 68px;
  transition: transform 0.22s ease;
  animation: girl-eat-head 1.12s ease-in-out infinite;
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-eyes-closed {
  opacity: 0;
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-eyes-open {
  opacity: 1;
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-brows {
  transform: translateY(-2.2px);
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-mouth-eating {
  opacity: 0;
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-mouth-alert {
  opacity: 1;
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-chew-bite,
.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-heart-crumbs {
  animation: none;
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-lick-tongue {
  opacity: 0;
  animation: none;
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-candy-arm {
  animation: none;
  transform: rotate(28deg) translate(5px, 6px);
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-head-group {
  animation: girl-look-both-sides 1.05s ease-in-out infinite alternate;
}

.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-pupil-l,
.hen-actor.hen-alert-up .hen-svg.type-gardening .girl-pupil-r {
  animation: girl-eyes-dart 1.05s ease-in-out infinite alternate;
}

@keyframes girl-lick {
  0%   { transform: scaleY(0.75) translateY(-1px); }
  100% { transform: scaleY(1.15) translateY(1px); }
}

@keyframes girl-candy-bob {
  0%, 100% { transform: rotate(9deg) translate(2px, 3px); }
  38%      { transform: rotate(-7deg) translate(-1px, -3.5px); }
  58%      { transform: rotate(-2deg) translate(0px, -1px); }
}

@keyframes girl-eat-head {
  0%, 100% { transform: rotate(0deg) translateY(0px); }
  38%      { transform: rotate(4.5deg) translateY(2.5px); }
  58%      { transform: rotate(1.5deg) translateY(1px); }
}

@keyframes girl-chew {
  0%, 100% { transform: scaleY(0.15) scaleX(0.95); opacity: 0.25; }
  45%      { transform: scaleY(1.05) scaleX(1.05); opacity: 1; }
}

@keyframes girl-crumb-hop {
  0%, 32%, 100% { transform: translateY(0px); opacity: 0.7; }
  45%           { transform: translate(-1.5px, -3.5px) rotate(-10deg); opacity: 1; }
  65%           { transform: translate(1px, -1px) rotate(6deg); opacity: 0.85; }
}

@keyframes girl-look-both-sides {
  0%   { transform: translateY(-4px) rotate(-10deg) translateX(-2.5px); }
  50%  { transform: translateY(-4.5px) rotate(0deg) translateX(0px); }
  100% { transform: translateY(-4px) rotate(10deg) translateX(2.5px); }
}

@keyframes girl-eyes-dart {
  0%   { transform: translate(-1.4px, -1.5px); }
  100% { transform: translate(1.4px, -1.5px); }
}

@keyframes hen-garden-body-peck {
  0%, 100% { transform: rotate(-22deg); }
  22% { transform: rotate(-39deg); }
  38% { transform: rotate(-26deg); }
  58% { transform: rotate(-41deg); }
  78% { transform: rotate(-20deg); }
}

@keyframes hen-garden-head-peck {
  0%, 100% { transform: rotate(-8deg); }
  22% { transform: rotate(-24deg); }
  38% { transform: rotate(-10deg); }
  58% { transform: rotate(-26deg); }
  78% { transform: rotate(-6deg); }
}

@keyframes hen-corn-crumb-hop {
  0%, 18%, 34%, 54%, 72%, 100% { transform: translateY(0px); }
  23% { transform: translate(-2px, -4.5px) rotate(-12deg); }
  59% { transform: translate(2px, -5px) rotate(14deg); }
}

.guard-corn-feast,
.guard-eating-face {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.guard-normal-face {
  opacity: 1;
  transition: opacity 0.22s ease;
}

.hen-actor.hen-eating-corn-feast .guard-corn-feast,
.hen-actor.hen-eating-corn-feast .guard-eating-face {
  opacity: 1;
}

.hen-actor.hen-eating-corn-feast .guard-normal-face,
.hen-actor.hen-eating-corn-feast .guard-flashlight-arm {
  opacity: 0;
}

.hen-actor.hen-eating-corn-feast .guard-corn-feast .hen-corn-crumbs {
  animation: hen-corn-crumb-hop 0.65s ease-in-out infinite;
}

/* === SYNGENDE NISSEDRENG MED SANGBOG (type-singing) === */
.hen-svg.type-singing .hen-singing-body-sway {
  transform-box: view-box;
  transform-origin: 49.7% 72%;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  animation: hen-singing-body-rock 1.15s ease-in-out infinite alternate;
}

.hen-svg.type-singing .hen-singing-head-pivot {
  transform-box: fill-box;
  transform-origin: 50% 85%;
  animation: hen-singing-sway 1.15s ease-in-out infinite alternate;
}

.hen-actor.hen-alert-up .hen-svg.type-singing .hen-singing-body-sway {
  animation: none;
  transform: rotate(0deg);
}

.hen-svg.type-singing .hen-grain-stalk {
  transform-box: fill-box;
  transform-origin: 85% 75%;
  animation: hen-grain-bob 0.68s ease-in-out infinite alternate;
}

.hen-svg.type-singing .hen-note-1 {
  animation: hen-note-float 1.8s ease-in-out infinite;
}

.hen-svg.type-singing .hen-note-2 {
  animation: hen-note-float 1.8s ease-in-out 0.6s infinite;
}

.hen-svg.type-singing .hen-note-3 {
  animation: hen-note-float 1.8s ease-in-out 1.2s infinite;
}

.hen-svg.type-singing .hen-sing-brow-calm {
  opacity: 1;
  transition: opacity 0.18s ease;
}

.hen-svg.type-singing .hen-sing-brow-alert {
  opacity: 0;
  transition: opacity 0.18s ease;
}

.hen-actor.hen-alert-up .hen-svg.type-singing .hen-singing-head-pivot {
  animation: none;
  transform: rotate(5deg) translateY(-3px);
}

.hen-actor.hen-alert-up .hen-svg.type-singing .hen-sing-brow-calm {
  opacity: 0;
}

.hen-actor.hen-alert-up .hen-svg.type-singing .hen-sing-brow-alert {
  opacity: 1;
}

@keyframes hen-singing-body-rock {
  0% { transform: rotate(-3.8deg) translateY(0px); }
  100% { transform: rotate(3.8deg) translateY(-1.5px); }
}

@keyframes hen-singing-sway {
  0% { transform: rotate(-4deg) translateY(0px); }
  100% { transform: rotate(4.5deg) translateY(-2.5px); }
}

@keyframes hen-grain-bob {
  0% { transform: rotate(-5deg); }
  100% { transform: rotate(7deg); }
}

@keyframes hen-note-float {
  0% { transform: translate(0px, 3px) scale(0.85); opacity: 0.25; }
  50% { transform: translate(-4px, -4px) scale(1.08); opacity: 1; }
  100% { transform: translate(-8px, -10px) scale(0.9); opacity: 0; }
}

.prop-actor {
  position: absolute;
  z-index: 11;
  cursor: pointer;
}

.tool-item {
  width: 60px;
  height: 90px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.tool-item.tool-ladder {
  width: 58px;
  height: 98px;
  transform: perspective(220px) rotateX(8deg) rotate(-4deg);
  transform-origin: 50% 94%;
  filter: drop-shadow(-4px 6px 5px rgba(25, 12, 3, 0.36));
}

.tool-item.tool-rake {
  width: 6.0%;
  height: 18.0%;
  transform: none;
  filter: drop-shadow(-2px 3px 3px rgba(15, 32, 18, 0.34));
}

.tool-item.near-bunny {
  filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.92)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
}

.rake-tree-prop {
  position: absolute;
  left: 12.0%;
  top: 1.0%;
  width: 16.5%;
  height: 30.0%;
  z-index: 7;
  pointer-events: none;
}

.raked-leaf-anim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  animation: leaf-rake-away 0.52s cubic-bezier(0.22, 0.8, 0.32, 1) forwards;
}

@keyframes leaf-rake-away {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-52px, -24px) rotate(-38deg) scale(0.82);
    opacity: 0;
  }
}

.tool-hint {
  position: absolute;
  top: -24px;
  left: -20px;
  background: #FFD166;
  color: #3D2619;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  border: 1.5px solid #3D2619;
}

.hide-spot {
  position: absolute;
  width: 90px;
  height: 70px;
  z-index: 13;
}

.egg-target {
  position: absolute;
  width: 55px;
  height: 70px;
  z-index: 11;
  transition: all 0.5s ease;
}

.plain-egg-badge {
  font-size: 3.2rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.placed-ladder-container {
  position: absolute;
  width: 62px;
  height: 168px;
  z-index: 9;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.3));
}

.placed-ladder-container.hidden {
  display: none;
}

/* VÆGHYLDE TIL ÆGGET */
.loft-wall-shelf {
  position: absolute;
  width: 122px;
  height: 40px;
  z-index: 8;
}

.loft-wall-shelf.right-wall-shelf {
  width: 126px;
  height: 42px;
  z-index: 11;
}

.loft-wall-shelf.apple-tree-branch-shelf {
  width: 148px;
  height: 54px;
  z-index: 8;
  filter: drop-shadow(0 5px 8px rgba(20, 35, 15, 0.32));
}

.shelf-plank {
  width: 100%;
  height: 14px;
  background: #BC6C25;
  border: 3px solid #2B2D42;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

.shelf-bracket {
  position: absolute;
  width: 7px;
  height: 16px;
  background: #7F4F24;
  border: 2px solid #2B2D42;
}

.bracket-left {
  top: 12px;
  left: 16px;
}

.bracket-right {
  top: 12px;
  right: 16px;
}

/* 3D-PERSPEKTIV UDGANGSDØR / HAVELÅGE VED VENSTRE SIDE */
.stage-exit {
  position: absolute;
  width: 96px;
  height: 144px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 14;
  opacity: 1;
  cursor: pointer;
  transform-origin: left center;
  transform: translate(0%, -26%);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.stage-exit.active {
  opacity: 1;
  transform: translate(0%, -26%) scale(1.04);
  filter: drop-shadow(4px 0 16px rgba(255, 225, 105, 0.75));
}

.stealth-stage[data-theme="castle"] .stage-exit.active {
  filter: drop-shadow(4px 0 14px rgba(162, 210, 255, 0.52));
}

.exit-door-wrapper {
  width: 100%;
  height: 100%;
  filter: drop-shadow(4px 6px 10px rgba(25, 12, 3, 0.32));
}

.door-svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.door-open {
  animation: door-magic-glow 1.2s infinite alternate ease-in-out;
}

@keyframes door-magic-glow {
  0% { filter: drop-shadow(2px 0 5px rgba(82, 183, 136, 0.65)); }
  100% { filter: drop-shadow(4px 0 14px rgba(255, 209, 102, 0.9)); }
}

/* FORHINDRINGER I BANEN */
.stage-obstacle {
  position: absolute;
  z-index: 10;
  pointer-events: none;
}

.obs-creakyBoard {
  width: 86px;
  height: 38px;
  transition: transform 0.1s ease;
}

.crack-soundwaves {
  opacity: 0.2;
  transition: opacity 0.2s ease;
}

.stage-obstacle.creaking-active {
  animation: creak-vibrate 0.35s ease-in-out infinite;
}

.stage-obstacle.creaking-active .crack-soundwaves {
  opacity: 1;
  animation: soundwave-pulse 0.3s infinite alternate;
}

@keyframes creak-vibrate {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-2.5deg) scale(1.06); }
  75% { transform: rotate(2.5deg) scale(1.06); }
}

@keyframes soundwave-pulse {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-4px) scale(1.2); opacity: 1; filter: drop-shadow(0 0 6px #E63946); }
}

.obs-puddle {
  width: 96px;
  height: 45px;
}

.obs-puddle .puddle-surface-ripple {
  transform-box: fill-box;
  transform-origin: center;
  animation: puddle-gentle-shimmer 3.2s ease-in-out infinite alternate;
}

@keyframes puddle-gentle-shimmer {
  0% { transform: scale(0.94); opacity: 0.32; }
  100% { transform: scale(1.06); opacity: 0.58; }
}

/* === NATURTRO 3D KATTE: STØRRELSER & ANIMATIONER === */

.obs-sleepingCat {
  width: 102px;
  height: 66px;
}

/* Blid, livagtig sovende vejrtrækning i brystkassen */
.obs-sleepingCat .cat-breathe {
  animation: cat-breathe 3s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 85%;
}

/* Blødt vuggende halespids i søvne */
.obs-sleepingCat .cat-tail-curl {
  animation: cat-tail-sleep 4.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 15% 80%;
}

/* Øre der vipper let i søvne og under gang */
.obs-sleepingCat .cat-ear-twitch,
.stage-obstacle.cat-stalking .cat-ear-twitch {
  animation: cat-ear-flick 3.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 30% 85%;
}

/* Svævende snorke-Z'er */
.obs-sleepingCat .cat-snore {
  animation: cat-snore-float 2.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

/* === KAT: FORSKRÆKKET === */
.stage-obstacle.cat-startled {
  animation: cat-scare 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate;
}

.stage-obstacle.cat-startled .cat-snore {
  display: none;
}

/* === KAT: LUSKER / GÅR LIVAGTIGT === */
.stage-obstacle.cat-stalking {
  width: 108px;
  height: 72px;
  z-index: 13;
  transition: none;
  transform-origin: 50% 55%;
}

/* Smidig ryg- og skulderbevægelse mens katten går */
.stage-obstacle.cat-stalking .cat-body-prowl {
  animation: cat-body-bob 0.48s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

/* Hovedet spejder fremad i takt med skridtene */
.stage-obstacle.cat-stalking .cat-stalking-head {
  animation: cat-head-prowl 0.48s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 75% 55%;
}

/* S-buet svajende jagthale */
.stage-obstacle.cat-stalking .cat-tail-swish {
  animation: cat-tail-swish 0.65s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 10% 85%;
}

.stage-obstacle.cat-stalking.walking-up .cat-tail-swish {
  transform-origin: 50% 88%;
}

/* 4-takts anatomisk gangcyklus med 3D-ben (Hofte/Skulder som omdrejningspunkt, hvert ben løftes og sættes i naturlig rækkefølge) */
.stage-obstacle.cat-stalking .cat-limb {
  transform-box: fill-box;
  transform-origin: 50% 14%;
}

.stage-obstacle.cat-stalking .cat-leg-walk-3 {
  animation: cat-leg-step-cycle 0.56s linear infinite;
  animation-delay: 0s;
}
.stage-obstacle.cat-stalking .cat-leg-walk-4 {
  animation: cat-leg-step-cycle 0.56s linear infinite;
  animation-delay: -0.14s;
}
.stage-obstacle.cat-stalking .cat-leg-walk-1 {
  animation: cat-leg-step-cycle 0.56s linear infinite;
  animation-delay: -0.28s;
}
.stage-obstacle.cat-stalking .cat-leg-walk-2 {
  animation: cat-leg-step-cycle 0.56s linear infinite;
  animation-delay: -0.42s;
}

.stage-obstacle.cat-stalking.walking-up .cat-leg-walk-3,
.stage-obstacle.cat-stalking.walking-up .cat-leg-walk-4,
.stage-obstacle.cat-stalking.walking-up .cat-leg-walk-1,
.stage-obstacle.cat-stalking.walking-up .cat-leg-walk-2 {
  animation-name: cat-leg-step-up-cycle;
}

/* Rovdyr-øjne glimter under jagt */
.stage-obstacle.cat-stalking .cat-predator-eyes {
  animation: cat-eyes-pulse 1.2s ease-in-out infinite;
}

/* === KAT KEYFRAMES === */

@keyframes cat-breathe {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  50% { transform: scaleY(1.045) scaleX(0.985); }
}

@keyframes cat-tail-sleep {
  0%, 100% { transform: rotate(0deg); }
  35% { transform: rotate(6deg); }
  75% { transform: rotate(-5deg); }
}

@keyframes cat-ear-flick {
  0%, 78%, 100% { transform: rotate(0deg); }
  83% { transform: rotate(11deg); }
  88% { transform: rotate(-6deg); }
  93% { transform: rotate(8deg); }
}

@keyframes cat-snore-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.85; }
  50% { transform: translateY(-5px) scale(1.1); opacity: 1; }
}

@keyframes cat-scare {
  0% { transform: translateY(0) scale(1) rotate(-4deg); }
  100% { transform: translateY(-16px) scale(1.22) rotate(5deg); filter: drop-shadow(0 0 14px #E63946); }
}

@keyframes cat-body-bob {
  0% { transform: translateY(0px) rotate(-0.6deg); }
  100% { transform: translateY(-1.8px) rotate(0.6deg); }
}

@keyframes cat-head-prowl {
  0% { transform: translateY(0.6px) rotate(-1.5deg); }
  100% { transform: translateY(-1.2px) rotate(1.8deg); }
}

@keyframes cat-tail-swish {
  0% { transform: rotate(-10deg); }
  100% { transform: rotate(10deg); }
}

@keyframes cat-leg-step-cycle {
  0%   { transform: rotate(13deg) translateY(0px); }
  25%  { transform: rotate(0deg) translateY(0.5px); }
  50%  { transform: rotate(-13deg) translateY(0px); }
  75%  { transform: rotate(1.5deg) translateY(-2.8px); }
  100% { transform: rotate(13deg) translateY(0px); }
}

@keyframes cat-leg-step-up-cycle {
  0%   { transform: translateY(1.5px) scaleY(1.03); }
  25%  { transform: translateY(0px) scaleY(1); }
  50%  { transform: translateY(-4.5px) scaleY(0.88); }
  75%  { transform: translateY(-2.0px) scaleY(0.94); }
  100% { transform: translateY(1.5px) scaleY(1.03); }
}

@keyframes cat-eyes-pulse {
  0%, 100% { filter: drop-shadow(0 0 0px transparent); }
  50% { filter: drop-shadow(0 0 5px rgba(255, 210, 100, 0.7)); }
}

/* === DYKFUGL (NATURLIG SVÆVEFLUGT & VINGESLAG) === */
.obs-divingBird {
  width: 78px;
  height: 58px;
  position: absolute;
  z-index: 95;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(10, 26, 46, 0.25));
  transition: opacity 0.18s ease;
  transform-origin: center;
}

.obs-divingBird .bird-wing-front {
  transform-box: fill-box;
  transform-origin: 18% 88%;
  animation: bird-flap-front 0.22s ease-in-out infinite alternate;
}

.obs-divingBird .bird-wing-back {
  transform-box: fill-box;
  transform-origin: 22% 90%;
  animation: bird-flap-back 0.22s ease-in-out infinite alternate;
}

.obs-divingBird .bird-tail {
  transform-box: fill-box;
  transform-origin: 5% 50%;
  animation: bird-tail-balance 0.44s ease-in-out infinite alternate;
}

@keyframes bird-flap-front {
  0% { transform: rotate(-8deg) scaleY(1); }
  100% { transform: rotate(28deg) scaleY(0.55); }
}

@keyframes bird-flap-back {
  0% { transform: rotate(18deg) scaleY(0.68); }
  100% { transform: rotate(-10deg) scaleY(1); }
}

@keyframes bird-tail-balance {
  0% { transform: rotate(-4deg); }
  100% { transform: rotate(5deg); }
}

.obs-hayBale {
  width: 108px;
  height: 80px;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.28));
}

.obs-bush {
  width: 96px;
  height: 77px;
  filter: drop-shadow(0 4px 7px rgba(18, 12, 5, 0.22));
}

/* REDE OG ÆG */
.nest-egg-wrapper {
  position: relative;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.straw-nest-base {
  position: absolute;
  bottom: 0;
  font-size: 2.8rem;
  z-index: 1;
}

.plain-egg-badge {
  position: relative;
  font-size: 2.8rem;
  z-index: 2;
  top: -8px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35));
}

.egg-target.collected {
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
}

/* ==========================================================================
   KONTROLPANEL I BUNDEN (D-PAD TIL ALLE RETNINGER + HOP)
   ========================================================================== */

.stealth-controls {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 8px 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-around;
  border-top: 3px solid rgba(43, 45, 66, 0.14);
  z-index: 30;
}

.dpad-cluster-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* D-PAD (Kompakt 2-rækkers piletast-layout som på tastaturet) */
.dpad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.dpad-horizontal {
  display: flex;
  align-items: center;
  gap: 3px;
}

.dpad-center {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.btn-dpad {
  width: 36px;
  height: 36px;
  background: #4CC9F0;
  color: #FFF;
  border: 2px solid #0077B6;
  border-radius: 9px;
  font-size: 1.05rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2.5px 0 #0077B6;
  transition: all 0.1s ease;
}

.btn-dpad:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 #0077B6;
  background: #0096C7;
}

/* ACTION BUTTONS (HOP + GEM DIG + VÆLG OPGAVE + REDSKAB) */
.action-buttons-group {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 660px;
  align-items: stretch;
}

.btn-action {
  flex: 1;
  min-height: 54px;
  padding: 9px 14px;
  border-radius: 18px;
  border: 2.8px solid #2B2D42;
  font-family: var(--font-heading, 'Fredoka', sans-serif);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 9px;
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  user-select: none;
}

.btn-action:hover:not(.disabled) {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.btn-action-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
  border: 1.8px solid rgba(43, 45, 66, 0.25);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-action .btn-text {
  text-align: left;
  white-space: nowrap;
  font-size: 1.02rem;
  font-weight: 800;
}

.btn-label-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
}

.btn-keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: #FFFDF7;
  color: #1F2438;
  border: 1.8px solid #2B2D42;
  box-shadow: 0 2px 0 #2B2D42;
  font-family: var(--font-body, 'Outfit', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: none;
  line-height: 1.2;
  white-space: nowrap;
}

.dpad-key-hint {
  margin-top: 0;
  padding: 3px 8px;
  border-radius: 7px;
  background: #FFFDF7;
  color: #1F2438;
  border: 1.6px solid #2B2D42;
  box-shadow: 0 1.5px 0 #2B2D42;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.btn-jump {
  background: linear-gradient(180deg, #FFA928 0%, #FB8500 58%, #DC6800 100%);
  color: #FFFFFF;
  text-shadow: 0 1.5px 0 rgba(120, 48, 0, 0.65);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.42), 0 5px 0 #9E4700, 0 7px 14px rgba(251, 133, 0, 0.28);
}

.btn-jump:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 2px 0 #9E4700;
}

.btn-hide {
  background: linear-gradient(180deg, #6FD09C 0%, #40916C 58%, #2D6A4F 100%);
  color: #FFFFFF;
  text-shadow: 0 1.5px 0 rgba(20, 56, 38, 0.65);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.38), 0 5px 0 #1B4332, 0 7px 14px rgba(45, 106, 79, 0.25);
}

.btn-hide:active,
.btn-hide.active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 2px 0 #1B4332, 0 0 0 3px rgba(116, 198, 157, 0.55);
}

.btn-task {
  background: linear-gradient(180deg, #5AA9E6 0%, #3A86FF 58%, #1D4ED8 100%);
  color: #FFFFFF;
  text-shadow: 0 1.5px 0 rgba(16, 38, 112, 0.65);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.42), 0 5px 0 #1E3A8A, 0 7px 14px rgba(58, 134, 255, 0.28);
}

.btn-task:active,
.btn-task.active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 3px 0 #1E3A8A, 0 0 0 3px rgba(255, 209, 102, 0.75);
}

.btn-tool {
  background: linear-gradient(180deg, #FFE169 0%, #FFB703 58%, #E09100 100%);
  color: #2B2D42;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.55), 0 5px 0 #A86400, 0 7px 14px rgba(255, 183, 3, 0.28);
}

.btn-tool:active:not(.disabled) {
  transform: translateY(3px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 2px 0 #A86400;
}

.btn-tool.disabled {
  opacity: 0.5;
  filter: grayscale(0.25);
  cursor: not-allowed;
}

.btn-duck {
  background: linear-gradient(180deg, #48CAE4 0%, #0096C7 58%, #0077B6 100%);
  color: #FFFFFF;
  text-shadow: 0 1.5px 0 rgba(0, 62, 110, 0.65);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.42), 0 5px 0 #023E8A, 0 7px 14px rgba(0, 150, 199, 0.28);
}

.btn-duck:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 2px 0 #023E8A;
}

/* ==========================================================================
   3. GAMEPLAY: CHASE SCENE (HØNSE-FLUGTEN / 30 SEKUNDERS LANDEVEJS-JAGT)
   ========================================================================== */

.chase-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #72B6FF 0%, #BDE0FE 48%, #74C69D 48%, #40916C 100%);
}

.chase-sky {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 90px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.chase-clouds {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 70px;
  background-image:
    radial-gradient(ellipse 55px 22px at 120px 35px, rgba(255, 255, 255, 0.85) 98%, transparent 100%),
    radial-gradient(ellipse 70px 26px at 420px 28px, rgba(255, 255, 255, 0.8) 98%, transparent 100%),
    radial-gradient(ellipse 60px 24px at 780px 38px, rgba(255, 255, 255, 0.85) 98%, transparent 100%),
    radial-gradient(ellipse 65px 25px at 1060px 26px, rgba(255, 255, 255, 0.82) 98%, transparent 100%);
  background-size: 1200px 70px;
  background-repeat: repeat-x;
}

.chase-progress-panel {
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 249, 250, 0.95) 100%);
  border: 2.5px solid #2B2D42;
  border-radius: 16px;
  padding: 8px 16px 15px;
  box-shadow: 0 4px 0 rgba(43, 45, 66, 0.24), 0 6px 14px rgba(0, 0, 0, 0.16);
  z-index: 25;
}

.progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.chase-title-label {
  color: #2B2D42;
  font-weight: 900;
}

.chase-timer-badge {
  background: linear-gradient(135deg, #2D6A4F, #1B4332);
  color: #FFFFFF;
  border: 2px solid #2B2D42;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.82rem;
  font-weight: 900;
}

.chase-progress-track {
  position: relative;
  width: 100%;
  height: 14px;
  background: #E2E8F0;
  border: 2px solid #2B2D42;
  border-radius: 999px;
  overflow: visible;
}

.chase-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #52B788 0%, #FFD166 100%);
  border-radius: 999px;
  transition: width 0.1s linear;
}

.track-hen-marker,
.track-rabbit-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 2.2px solid #2B2D42;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left 0.08s linear;
  box-shadow: 0 2px 0 #2B2D42, 0 3px 6px rgba(0, 0, 0, 0.22);
  overflow: visible;
}

.track-hen-marker {
  background: radial-gradient(circle at 35% 30%, #FF8FA3 0%, #E63946 70%, #B81D2A 100%);
  color: #FFFFFF;
  z-index: 3;
}

.track-rabbit-marker {
  background: radial-gradient(circle at 35% 30%, #FFF8D6 0%, #FFD166 72%, #F4A261 100%);
  color: #2B2D42;
  z-index: 4;
}

.track-marker-svg {
  width: 28px;
  height: 28px;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

.track-gate {
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 900;
  background: #2D6A4F;
  color: #FFFFFF;
  border: 2px solid #2B2D42;
  padding: 2px 9px;
  border-radius: 999px;
  z-index: 2;
}

.chase-track {
  flex: 1;
  position: relative;
  margin-top: 74px;
  margin-bottom: 84px;
  z-index: 10;
}

/* Rullende snesti ved Nordpolen med snedækket kant */
.chase-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  z-index: 2;
  border-top: 3px solid #BAE6FD;
  background:
    /* Blød snedrivekant øverst langs stien */
    repeating-linear-gradient(90deg, #FFFFFF 0px, #FFFFFF 34px, #E0F2FE 34px, #E0F2FE 68px) 0 0 / 1200px 14px no-repeat,
    /* Kælkespor og sneglimt på stien */
    radial-gradient(circle 4px at 40px 42px, rgba(148, 163, 184, 0.28) 95%, transparent 100%),
    radial-gradient(circle 5px at 145px 68px, rgba(186, 230, 253, 0.45) 95%, transparent 100%),
    radial-gradient(circle 3.5px at 230px 36px, rgba(255, 255, 255, 0.85) 95%, transparent 100%),
    radial-gradient(circle 4.5px at 310px 58px, rgba(148, 163, 184, 0.25) 95%, transparent 100%),
    linear-gradient(180deg, #FFFFFF 0px, #E0F2FE 14px, #F8FAFC 18px, #E2E8F0 64px, #CBD5E1 100%);
  background-size: 1200px 14px, 360px 92px, 360px 92px, 360px 92px, 360px 92px, 100% 100%;
  pointer-events: none;
}

.chase-hen {
  position: absolute;
  bottom: 44px;
  width: 146px;
  height: 138px;
  z-index: 10;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.28));
}

/* Rudolfs rensdyr-galop: hvert ben drejer om sit eget hofte- eller skulderled */
.rooster-running .hen-svg.type-chasing .deer-leg {
  transform-box: fill-box;
  transform-origin: 50% 8%;
}

.rooster-running .hen-svg.type-chasing .deer-front-front {
  transform-origin: 28% 8%;
  animation: deer-front-gallop 0.34s ease-in-out infinite;
}

.rooster-running .hen-svg.type-chasing .deer-front-back {
  transform-origin: 28% 8%;
  animation: deer-front-gallop 0.34s ease-in-out -0.09s infinite;
}

.rooster-running .hen-svg.type-chasing .deer-hind-front {
  transform-origin: 55% 8%;
  animation: deer-hind-gallop 0.34s ease-in-out infinite;
}

.rooster-running .hen-svg.type-chasing .deer-hind-back {
  transform-origin: 55% 8%;
  animation: deer-hind-gallop 0.34s ease-in-out -0.09s infinite;
}

.rooster-running .hen-svg.type-chasing .rooster-body {
  transform-box: fill-box;
  transform-origin: 50% 65%;
  animation: deer-body-bound 0.34s ease-in-out infinite;
}

@keyframes deer-front-gallop {
  0%   { transform: rotate(-28deg) translateY(-3px); }
  45%  { transform: rotate(22deg) translateY(2px); }
  100% { transform: rotate(-28deg) translateY(-3px); }
}

@keyframes deer-hind-gallop {
  0%   { transform: rotate(26deg) translateY(-2px); }
  45%  { transform: rotate(-28deg) translateY(2px); }
  100% { transform: rotate(26deg) translateY(-2px); }
}

@keyframes deer-body-bound {
  0%   { transform: translateY(-5px) rotate(-3deg); }
  45%  { transform: translateY(1px) rotate(2.5deg); }
  100% { transform: translateY(-5px) rotate(-3deg); }
}

.chase-speech {
  position: absolute;
  top: -18px;
  left: 6px;
  background: #D90429;
  color: #FFF;
  border: 2px solid #2B2D42;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 3px 0 #2B2D42;
}

.chase-bunny {
  position: absolute;
  width: 88px;
  height: 104px;
  z-index: 12;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.26));
  transition: transform 0.12s ease;
}

.chase-bunny-sprite {
  width: 100%;
  height: 100%;
  transform-origin: center bottom;
  transition: transform 0.12s ease;
}

/* Når kaninen dukker sig, kryber den lavt sammen langs jorden, så den glider frit under vasketøjet! */
.chase-bunny.bunny-ducking .chase-bunny-sprite {
  transform: translateY(14px) scaleY(0.68) scaleX(1.08);
}

.obstacles-layer {
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
}

.chase-obstacle {
  position: absolute;
  bottom: 44px;
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Lille tydeligt skilt på forhindringerne ("Hop!" / "Duk dig!") */
.obs-action-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  color: #FFFFFF;
  border: 2px solid #2B2D42;
  box-shadow: 0 2px 0 #2B2D42;
  margin-bottom: 3px;
  white-space: nowrap;
}

.obs-action-pill.pill-jump {
  background: linear-gradient(135deg, #FF9E00, #E85D04);
}

.obs-action-pill.pill-duck {
  background: linear-gradient(135deg, #0096C7, #023E8A);
}

.prop-hay {
  width: 82px;
  height: 62px;
}

.prop-barrel {
  width: 62px;
  height: 74px;
}

.prop-clothes {
  position: relative;
  width: 134px;
  height: 162px;
  bottom: 0;
}

.prop-lowbranch {
  position: relative;
  width: 172px;
  height: 184px;
  bottom: 0;
  overflow: visible;
}

.prop-lowbranch svg {
  overflow: visible;
}

.prop-finish-gate {
  width: 214px;
  height: 190px;
}

.prop-finish-gate .fg-door-left {
  transform-box: view-box;
  transform-origin: 55px 136px;
  transform: translateY(-2px) scaleX(0.42) skewY(-12deg);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.prop-finish-gate .fg-door-right {
  transform-box: view-box;
  transform-origin: 165px 136px;
  transform: translateY(-2px) scaleX(0.42) skewY(12deg);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.prop-finish-gate .fg-latch-bar {
  opacity: 0;
  transition: opacity 0.14s ease 0.18s;
}

.finishGate.gate-closed .prop-finish-gate .fg-door-left,
.finishGate.gate-closed .prop-finish-gate .fg-door-right {
  transform: translateY(0px) scaleX(1) skewY(0deg);
}

.finishGate.gate-closed .prop-finish-gate .fg-latch-bar {
  opacity: 1;
}

.chase-controls {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border-top: 3px solid rgba(43, 45, 66, 0.16);
  padding: 8px 18px;
  display: flex;
  gap: 16px;
  justify-content: center;
  z-index: 30;
}

/* ==========================================================================
   4. MALE-VÆRKSTEDET (PÅSKEHARENS 3D KREA-VÆRKSTED)
   ========================================================================== */

.paint-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.paint-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 26px;
  position: relative;
  overflow: hidden;
  background: #C88A4B;
}

/* Fuldskærms 3D Kanin-Krea-Værksted Baggrund */
.krea-workshop-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.krea-workshop-bg-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.paint-header {
  position: relative;
  z-index: 5;
  text-align: center;
  margin-bottom: 18px;
}

.paint-title-box {
  display: inline-block;
  background: linear-gradient(180deg, #FFFDF7 0%, #FFE8C2 100%);
  border: 3.5px solid #5C3412;
  border-radius: 22px;
  padding: 10px 28px;
  box-shadow: 0 5px 0 #3B200C, 0 12px 24px rgba(30, 14, 4, 0.32);
}

.paint-header h2 {
  font-size: 1.55rem;
  color: #2B2D42;
  margin-bottom: 2px;
}

.paint-header p {
  font-size: 0.92rem;
  font-weight: 700;
  color: #6E3F18;
  margin: 0;
}

.paint-workspace {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

@media (min-width: 768px) {
  .paint-workspace {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 32px;
  }
}

@media (min-width: 960px) {
  .paint-workspace {
    padding-left: clamp(130px, 14vw, 210px);
  }
}

.artist-bunny-box {
  width: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 10px 16px rgba(30, 14, 4, 0.35));
}

.artist-speech {
  background: linear-gradient(180deg, #FFFDF7 0%, #FFE5D9 100%);
  color: #7F1D1D;
  border: 2.5px solid #5C3412;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 14px;
  margin-top: 8px;
  text-align: center;
  box-shadow: 0 4px 0 #3B200C, 0 6px 12px rgba(0, 0, 0, 0.2);
}

.easel-container {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 24px 36px;
}

.easel-back-svg {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 350px;
  height: 475px;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 10px 18px rgba(30, 14, 4, 0.35));
}

.easel-ledge-svg {
  position: relative;
  width: 345px;
  height: 66px;
  margin-top: -22px;
  pointer-events: none;
  z-index: 4;
}

.egg-canvas-wrapper {
  position: relative;
  z-index: 2;
  width: 280px;
  height: 380px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  overflow: hidden;
  box-shadow:
    0 18px 36px rgba(30, 14, 4, 0.38),
    inset -12px -14px 26px rgba(138, 90, 44, 0.16),
    inset 10px 12px 22px rgba(255, 255, 255, 0.65);
  background: #FFF;
  cursor: crosshair;
  touch-action: none;
}

.egg-canvas-wrapper.golden-egg {
  background: linear-gradient(135deg, #FFE97D 0%, #FFD166 45%, #F48C06 82%, #C86400 100%);
  box-shadow:
    0 18px 36px rgba(30, 14, 4, 0.38),
    inset -12px -14px 26px rgba(146, 64, 14, 0.32),
    inset 10px 12px 22px rgba(255, 233, 125, 0.72);
}

#egg-paint-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.stickers-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.egg-sticker {
  position: absolute;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  pointer-events: auto;
  cursor: grab;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.egg-sticker svg {
  width: 100%;
  height: 100%;
  display: block;
}

.egg-sticker:active {
  cursor: grabbing;
  transform: scale(1.15);
}

/* 3D Træ-Værktøjskasse (Krea-Palet & Penselkasse) */
.paint-toolbox {
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.96) 0%, rgba(255, 243, 219, 0.96) 100%);
  border: 4px solid #6E3F18;
  border-radius: 24px;
  padding: 20px;
  width: 100%;
  max-width: 425px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 0 #3B200C, 0 18px 36px rgba(30, 14, 4, 0.36);
}

.toolbox-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: #5C3412;
  display: block;
  margin-bottom: 8px;
}

.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid #FFF;
  box-shadow: 0 4px 0 rgba(59, 32, 12, 0.28), inset 0 3px 5px rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-btn.active {
  transform: scale(1.22) translateY(-2px);
  border-color: #2B2D42;
  box-shadow: 0 5px 0 #2B2D42, inset 0 3px 5px rgba(255, 255, 255, 0.65);
}

.pattern-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tool-btn {
  background: #FFFDF9;
  border: 2px solid #D4A373;
  border-radius: var(--radius-sm);
  padding: 8px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 800;
  color: #3B200C;
  box-shadow: 0 3px 0 rgba(110, 63, 24, 0.22);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool-btn:hover {
  background: #FFF3B0;
}

.tool-btn.active {
  background: #FFE5D9;
  border-color: #FB8500;
  color: #D90429;
  box-shadow: 0 3px 0 #BC6C25;
}

.sticker-palette {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.sticker-btn {
  background: #FFFDF9;
  border: 2px solid #D4A373;
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 rgba(110, 63, 24, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.sticker-btn svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sticker-btn:hover {
  transform: scale(1.15) translateY(-2px);
  background: #FFF3B0;
}

.toolbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

/* ==========================================================================
   5. ÅBEN 30-ÆGS PÅSKEKURV & SEJRSSCENE
   ========================================================================== */

.victory-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.victory-card {
  background: var(--card-bg);
  border: 3px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 780px;
  width: 100%;
  box-shadow: var(--shadow-main);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.victory-stars {
  font-size: 2.2rem;
  margin-bottom: 6px;
  animation: bounce 1.2s infinite ease-in-out;
}

.victory-card h2 {
  font-size: 1.6rem;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.victory-subtitle {
  font-size: 1rem;
  color: #64748B;
  margin-bottom: 16px;
}

.victory-basket-wrapper {
  width: 100%;
  margin-bottom: 20px;
}

/* DEN STORE ÅBNE PÅSKEKURV (30 PLADSER) */
.open-basket-container {
  background: linear-gradient(135deg, #8B5A2B 0%, #6E3F14 100%);
  border: 6px solid #4A2506;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 12px 32px rgba(45, 24, 8, 0.45), inset 0 3px 8px rgba(255, 235, 200, 0.2);
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.basket-top-handle {
  display: none;
}

.basket-ribbon-bow {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}

/* Mørkegrønt velour i bunden af julekugle-kassen */
.basket-interior-bed {
  background: radial-gradient(circle at 50% 35%, #166534 0%, #0D4424 52%, #052E16 100%);
  border: 4px solid #042210;
  border-radius: 14px;
  padding: 20px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 10px 26px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.grass-bed-lining {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  font-size: 1.3rem;
  opacity: 0.7;
  pointer-events: none;
}

/* GRID MED 30 ÆG (6 kolonner x 5 rækker) */
.basket-slots-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  position: relative;
  z-index: 2;
}

@media (max-width: 640px) {
  .basket-slots-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
}

.basket-slot {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.basket-slot.empty {
  background: rgba(0, 0, 0, 0.28);
  border: 2px dashed rgba(253, 224, 71, 0.38);
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.45);
}

.basket-slot.filled {
  background: #FFF8F0;
  border: 2.5px solid #FFD166;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.basket-slot.filled::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 7px;
  background: linear-gradient(90deg, #B45309, #FDE047, #92400E);
  border: 1.5px solid #78350F;
  border-radius: 3px;
  z-index: 3;
}

.basket-slot.filled.golden-slot {
  background: linear-gradient(135deg, #FFE97D 0%, #FFD166 48%, #F48C06 100%);
}

.basket-slot.filled:hover {
  transform: scale(1.18) translateY(-4px);
  z-index: 10;
  border-color: #FB8500;
  box-shadow: 0 8px 20px rgba(251, 133, 0, 0.5);
}

.basket-slot.new-dropped-egg {
  animation: egg-drop-bounce 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  border-color: #FFB703;
  box-shadow: 0 0 20px #FFD166;
}

.slot-straw-nest {
  position: absolute;
  bottom: -4px;
  font-size: 1.1rem;
  opacity: 0.8;
  z-index: 1;
}

.empty-egg-shadow {
  font-size: 1.3rem;
  opacity: 0.3;
}

.slot-num {
  position: absolute;
  bottom: 2px;
  font-size: 0.65rem;
  font-weight: 800;
  color: rgba(255,255,255,0.7);
}

.slot-num-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #D90429;
  color: #FFF;
  font-size: 0.6rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 6px;
  border: 1px solid #FFF;
}

.basket-egg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  position: relative;
  z-index: 2;
}

.basket-wicker-rim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.9rem;
  color: #7F4F24;
}

.basket-rim-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-celebrate-basket {
  background: linear-gradient(180deg, #FFD166 0%, #FFB703 100%);
  color: #3B200C;
  border: 2px solid #8C561E;
  border-radius: 999px;
  padding: 4px 14px;
  font-family: inherit;
  font-weight: 900;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 2px 0 #8C561E;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn-celebrate-basket:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-empty-basket {
  background: linear-gradient(180deg, #EF476F 0%, #D90429 100%);
  color: #FFFFFF;
  border: 2px solid #800F2F;
  border-radius: 999px;
  padding: 4px 14px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 2px 0 #800F2F;
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.15s ease;
}

.btn-empty-basket:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-empty-basket:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #800F2F;
}

.btn-empty-basket:disabled {
  opacity: 0.45;
  cursor: default;
  background: #ADB5BD;
  border-color: #6C757D;
  box-shadow: none;
}

/* === POPUP: STORT FORSTØRRET PÅSKEÆG FRA KURVEN === */
.modal-card.egg-preview-card {
  position: relative;
  max-width: 420px;
  width: 90vw;
  padding: 24px 26px 28px;
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF6E3 100%);
  border: 4px solid #8C561E;
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 24px 55px rgba(20, 10, 4, 0.5);
}

.egg-preview-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid #800F2F;
  background: linear-gradient(180deg, #EF476F 0%, #D90429 100%);
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 0 #800F2F;
  transition: transform 0.12s ease, filter 0.12s ease;
  z-index: 5;
}

.egg-preview-close-btn:hover {
  filter: brightness(1.08);
  transform: scale(1.06);
}

.egg-preview-close-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #800F2F;
}

.egg-preview-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 0 32px;
}

.egg-preview-slot-badge {
  display: inline-block;
  background: #D90429;
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 2px 12px;
  border-radius: 999px;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.egg-preview-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: #3B200C;
  margin: 0;
}

.egg-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 45%, #3B7A57 0%, #26533B 100%);
  border: 3px solid #1B3B2B;
  border-radius: 22px;
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.3);
}

.egg-preview-egg-shell {
  width: min(240px, 62vw);
  aspect-ratio: 3 / 4;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: #FFF8F0;
  border: 4px solid #FFD166;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.egg-preview-egg-shell.golden-slot {
  background: linear-gradient(135deg, #FFE97D 0%, #FFD166 48%, #F48C06 100%);
  border-color: #FB8500;
}

.egg-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.egg-preview-footer {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.btn-egg-edit-workshop {
  background: linear-gradient(180deg, #FFD166 0%, #F4A261 100%);
  color: #3B200C;
  border: 2.5px solid #6E3F16;
  border-radius: 999px;
  padding: 8px 20px;
  font-family: var(--font-heading, 'Fredoka', sans-serif);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 #6E3F16;
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
}

.btn-egg-edit-workshop:hover {
  filter: brightness(1.06);
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 0 #6E3F16;
}

.btn-egg-edit-workshop:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #6E3F16;
}

/* === POPUP: 30 MALEDE ÆG I KURVEN - KANINEN HOPPER AFSTED MED KURVEN === */
.modal-card.modal-full-basket {
  max-width: 720px;
  width: 94vw;
  padding: 20px 24px 22px;
  background: linear-gradient(180deg, #FFFDF7 0%, #FFF8E7 100%);
  border: 4px solid #8C561E;
  border-radius: 26px;
  text-align: center;
  box-shadow: 0 22px 50px rgba(25, 14, 4, 0.45);
}

.full-basket-badge {
  display: inline-block;
  background: linear-gradient(90deg, #FFD166, #FFB703);
  color: #3B200C;
  border: 2px solid #8C561E;
  border-radius: 999px;
  padding: 4px 16px;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.modal-full-basket h3 {
  font-size: 1.55rem;
  color: #2D6A4F;
  margin: 4px 0;
}

.full-basket-subtitle {
  font-size: 0.96rem;
  color: #5C3A1B;
  margin: 0 0 12px;
  font-weight: 700;
}

.full-basket-hop-stage {
  position: relative;
  width: 100%;
  height: 268px;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid #7F4F24;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.14);
  background: #ADE8F4;
  margin-bottom: 16px;
}

.hop-stage-bg-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Vandret vandring hen over påske-engen */
.hopping-bunny-actor {
  position: absolute;
  bottom: 18px;
  left: 0;
  width: 175px;
  height: 205px;
  z-index: 5;
  animation: bunny-hop-across-meadow 5.2s ease-in-out infinite;
}

/* Høje glade kanin-hop op og ned med fremad-hældning i afsættet */
.hopping-bunny-bounce {
  position: relative;
  width: 100%;
  height: 100%;
  animation: bunny-joy-hop-arc 0.65s cubic-bezier(0.32, 0.04, 0.62, 0.98) infinite;
  transform-origin: 50% 90%;
}

.hopping-bunny-figure {
  position: relative;
  width: 155px;
  height: 195px;
  margin: 0 auto;
}

/* Skjul kaninens egen gulv-skygge og løft armene om kurven */
.hopping-bunny-figure .bunny-ground-shadow,
.hopping-bunny-figure .bunny-arm-left,
.hopping-bunny-figure .bunny-arm-right {
  display: none;
}

/* Ører og bagben vipper i takt med hvert hop */
.hopping-bunny-figure .bunny-ear-left {
  transform-box: fill-box;
  transform-origin: 50% 92%;
  animation: hop-ear-flop-left 0.65s ease-in-out infinite;
}

.hopping-bunny-figure .bunny-ear-right {
  transform-box: fill-box;
  transform-origin: 50% 92%;
  animation: hop-ear-flop-right 0.65s ease-in-out infinite;
}

.hopping-bunny-figure .bunny-leg-left,
.hopping-bunny-figure .bunny-leg-right {
  transform-box: fill-box;
  transform-origin: 50% 15%;
  animation: hop-legs-kick 0.65s ease-in-out infinite;
}

/* Den flettede påskekurv i kaninens favn fyldt med de 30 malede æg */
.bunny-carried-basket {
  position: absolute;
  left: 50%;
  top: 78px;
  transform: translateX(-50%);
  width: 138px;
  height: 82px;
  z-index: 6;
  animation: carried-basket-jiggle 0.65s ease-in-out infinite;
}

.carried-basket-handle {
  position: absolute;
  left: 16px;
  right: 16px;
  top: -22px;
  height: 44px;
  border: 6px solid #A46731;
  border-bottom: none;
  border-radius: 60px 60px 0 0;
  box-shadow: inset 0 2px 0 #F2C288, 0 -1px 0 #3B200C;
  z-index: 1;
}

/* De 30 malede påskeæg stablet i 3 rækker i kurven */
.carried-basket-eggs-pile {
  position: absolute;
  left: 6px;
  right: 6px;
  top: -6px;
  height: 48px;
  z-index: 3;
  pointer-events: none;
}

.carried-egg-row {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.carried-egg-row.row-back {
  top: -8px;
  z-index: 1;
}

.carried-egg-row.row-mid {
  top: 1px;
  z-index: 2;
}

.carried-egg-row.row-front {
  top: 10px;
  z-index: 3;
}

.carried-basket-egg {
  width: 21px;
  height: 27px;
  object-fit: contain;
  margin: 0 -4.2px;
  transform: translateY(var(--egg-y, 0px)) rotate(var(--egg-tilt, 0deg));
  filter: drop-shadow(0 1px 1.5px rgba(30, 14, 4, 0.45));
}

.carried-basket-grass-trim {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 29px;
  height: 10px;
  background: repeating-linear-gradient(
    -35deg,
    #52B788 0px,
    #52B788 5px,
    #2D6A4F 5px,
    #2D6A4F 10px
  );
  border-radius: 8px;
  z-index: 4;
}

.carried-basket-wicker-body {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 34px;
  height: 40px;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(127, 79, 36, 0.28) 0px,
      rgba(127, 79, 36, 0.28) 5px,
      transparent 5px,
      transparent 10px
    ),
    linear-gradient(180deg, #DDA15E 0%, #BC6C25 65%, #7F4F24 100%);
  border: 2.6px solid #3B200C;
  border-radius: 8px 8px 26px 26px;
  box-shadow: inset 0 -4px 8px rgba(45, 22, 6, 0.35), 0 4px 8px rgba(25, 12, 4, 0.3);
  z-index: 5;
}

.carried-basket-wicker-rim {
  position: absolute;
  left: -5px;
  right: -5px;
  top: -4px;
  height: 10px;
  background: linear-gradient(180deg, #F4C47C 0%, #C88A4B 100%);
  border: 2.4px solid #3B200C;
  border-radius: 999px;
}

/* Kaninens to vamsede 3D forpoter der holder om kurvens sider */
.carried-basket-paw {
  position: absolute;
  top: 38px;
  width: 24px;
  height: 19px;
  background: radial-gradient(circle at 40% 35%, #FFFFFF 0%, #F4EAE0 65%, #C9B29B 100%);
  border: 2.5px solid #2B2D42;
  border-radius: 50%;
  z-index: 7;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.carried-basket-paw::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 5px;
  background: #FF85A1;
  border-radius: 50%;
  top: 6px;
  left: 6px;
}

.carried-basket-paw.paw-left {
  left: -3px;
  transform: rotate(16deg);
}

.carried-basket-paw.paw-right {
  right: -3px;
  transform: rotate(-16deg);
}

/* Skygge på markstien der følger kaninen og skrumper i luften */
.hop-bunny-shadow {
  position: absolute;
  bottom: 18px;
  left: 0;
  width: 96px;
  height: 16px;
  background: radial-gradient(ellipse at center, rgba(25, 16, 8, 0.38) 0%, rgba(25, 16, 8, 0) 72%);
  border-radius: 50%;
  z-index: 3;
  animation:
    bunny-shadow-across-meadow 5.2s ease-in-out infinite,
    bunny-shadow-pulse 0.65s ease-in-out infinite;
}

.hop-joy-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hop-sparkle {
  position: absolute;
  font-size: 1.25rem;
  animation: hop-sparkle-float 1.1s ease-in-out infinite alternate;
}

.hop-sparkle.s1 { top: 8px; left: 6px; animation-delay: 0s; }
.hop-sparkle.s2 { top: 2px; right: 4px; animation-delay: 0.35s; }
.hop-sparkle.s3 { top: 44px; left: -8px; animation-delay: 0.7s; }

.full-basket-modal-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

@keyframes bunny-hop-across-meadow {
  0%   { transform: translateX(18px); }
  48%  { transform: translateX(485px); }
  52%  { transform: translateX(485px) scaleX(-1); }
  96%  { transform: translateX(18px) scaleX(-1); }
  100% { transform: translateX(18px) scaleX(1); }
}

@keyframes bunny-shadow-across-meadow {
  0%   { left: 56px; }
  48%  { left: 523px; }
  52%  { left: 523px; }
  96%  { left: 56px; }
  100% { left: 56px; }
}

@keyframes bunny-joy-hop-arc {
  0%   { transform: translateY(0px) scale(1.04, 0.93) rotate(-4deg); }
  18%  { transform: translateY(-22px) scale(0.97, 1.05) rotate(6deg); }
  48%  { transform: translateY(-42px) scale(1, 1.03) rotate(2deg); }
  78%  { transform: translateY(-16px) scale(1.01, 0.99) rotate(-5deg); }
  100% { transform: translateY(0px) scale(1.04, 0.93) rotate(-4deg); }
}

@keyframes bunny-shadow-pulse {
  0%, 100% { transform: scale(1.08); opacity: 0.45; }
  48%      { transform: scale(0.62); opacity: 0.22; }
}

@keyframes hop-ear-flop-left {
  0%, 100% { transform: rotate(-10deg); }
  48%      { transform: rotate(8deg); }
}

@keyframes hop-ear-flop-right {
  0%, 100% { transform: rotate(10deg); }
  48%      { transform: rotate(-8deg); }
}

@keyframes hop-legs-kick {
  0%, 100% { transform: translateY(-3px) rotate(6deg); }
  48%      { transform: translateY(7px) rotate(-14deg); }
}

@keyframes carried-basket-jiggle {
  0%, 100% { transform: translateX(-50%) translateY(2px) rotate(-1.5deg); }
  48%      { transform: translateX(-50%) translateY(-4px) rotate(1.5deg); }
}

@keyframes hop-sparkle-float {
  0%   { transform: translateY(4px) scale(0.85); opacity: 0.7; }
  100% { transform: translateY(-8px) scale(1.15); opacity: 1; }
}

.bunny-celebration {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.bunny-celebration svg {
  width: 80px;
  height: 95px;
}

.celebrate-speech {
  background: #E8F5E9;
  border: 2px solid #C8E6C9;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #2E7D32;
  text-align: left;
}

.next-scene-action-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.grand-finale-box {
  background: #FFF9DB;
  border: 2px solid #FFE066;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 10px;
}

.grand-finale-box h3 {
  color: #F08C00;
  font-size: 1.3rem;
  margin-bottom: 6px;
}

/* ==========================================================================
   6. BANEKORT & SAMLING (MAP SCREEN)
   ========================================================================== */

.map-layout {
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.map-header-box {
  text-align: center;
  margin-bottom: 20px;
}

.map-header-box h2 {
  font-size: 1.6rem;
  color: var(--text-dark);
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.map-level-card {
  background: #FFF;
  border: 3px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-level-card.unlocked:hover {
  transform: translateY(-4px);
  border-color: #FFB703;
  box-shadow: 0 8px 20px rgba(255, 183, 3, 0.25);
}

.map-level-card.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.level-card-top {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
}

.level-num {
  color: #64748B;
}

.level-preview-art {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F8F9FA;
  border-radius: var(--radius-sm);
}

.map-egg-thumbnail {
  height: 75px;
  object-fit: contain;
}

.map-hen-icon {
  font-size: 2.2rem;
}

.map-nest-preview {
  width: 78px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level-card-info {
  flex: 1;
}

.level-card-info h4 {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.level-card-info p {
  font-size: 0.8rem;
  color: #64748B;
}

.basket-gallery-section {
  background: #FFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-main);
}

.basket-section-header {
  text-align: center;
  margin-bottom: 16px;
}

.basket-section-header h3 {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.basket-section-header p {
  font-size: 0.9rem;
  color: #64748B;
}

@keyframes egg-drop-bounce {
  0% { transform: translateY(-80px) scale(0.4); opacity: 0; }
  60% { transform: translateY(8px) scale(1.15); opacity: 1; }
  80% { transform: translateY(-4px) scale(0.95); }
  100% { transform: translateY(0) scale(1); }
}

/* ==========================================================================
   MODALER & POPUPS
   ========================================================================== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #FFF;
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-main);
  text-align: center;
}

.modal-bunny-header svg {
  width: 100px;
  height: 120px;
}

.modal-dialogue h3 {
  font-size: 1.4rem;
  margin: 10px 0;
}

.dialogue-speech {
  font-size: 1rem;
  color: #4A5568;
  margin-bottom: 14px;
}

.briefing-objective {
  background: #FFE5D9;
  border-radius: 12px;
  padding: 10px;
  font-weight: 800;
  color: #9D0208;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.briefing-checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0 18px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.briefing-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFF9EC;
  border: 2px solid #E9D8A6;
  border-radius: 14px;
  padding: 7px 14px;
  box-shadow: 0 3px 0 rgba(188, 108, 37, 0.16);
}

.briefing-check-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1.8px solid #DDA15E;
  border-radius: 10px;
  padding: 3px;
}

.briefing-check-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.briefing-check-text {
  font-size: 1.02rem;
  font-weight: 700;
  color: #2B2D42;
  line-height: 1.25;
}

.briefing-check-text strong {
  font-weight: 900;
  color: #9D0208;
}

.briefing-check-text em {
  font-style: normal;
  background: #FFD166;
  color: #1F2438;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1.5px solid #2B2D42;
  font-weight: 900;
  font-size: 0.9rem;
}

.modal-busted {
  border: 4px solid #E63946;
}

.busted-icon-header {
  font-size: 3rem;
  margin-bottom: 8px;
}

.busted-bunny-sad svg {
  width: 100px;
  height: 100px;
  margin: 12px 0;
}

/* ==========================================================================
   ANIMATIONER & EFFEKTER
   ========================================================================== */

@keyframes pulse-glow {
  0%, 100% {
    transform: translateY(0);
    box-shadow:
      inset 0 2.5px 0 rgba(255, 255, 255, 0.82),
      inset 0 -3px 0 rgba(168, 78, 0, 0.25),
      0 6px 0 #7A420C,
      0 12px 24px rgba(122, 66, 12, 0.25);
  }
  50% {
    transform: translateY(-2px);
    box-shadow:
      inset 0 2.5px 0 rgba(255, 255, 255, 0.92),
      inset 0 -3px 0 rgba(168, 78, 0, 0.25),
      0 8px 0 #7A420C,
      0 16px 28px rgba(244, 140, 6, 0.42);
  }
}

@keyframes arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

@keyframes bunny-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes egg-drop {
  0% { transform: translateY(-120px) rotate(-20deg) scale(0.6); opacity: 0; }
  60% { transform: translateY(10px) rotate(10deg) scale(1.1); opacity: 1; }
  80% { transform: translateY(-5px) rotate(-5deg) scale(0.95); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes pop-in {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.pop-in {
  animation: pop-in 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  animation: confetti-fall 3.5s linear forwards;
  z-index: 90;
}

@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(800px) rotate(720deg); opacity: 0; }
}

/* ==========================================================================
   🎬 20-SEKUNDERS TEGNEFILM BIOGRAF & TEATER-LÆRRED
   ========================================================================== */

.movie-modal-overlay {
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

.movie-modal-overlay.active {
  display: flex;
}

.cinema-modal-card {
  background: #141722;
  border: 3px solid #D4A359;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  max-height: 94vh;
}

/* Biograf Top Bar */
.cinema-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: #141722;
  border-bottom: 1.5px solid rgba(212, 163, 89, 0.22);
}

.cinema-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cinema-clapper-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.cinema-titles {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.cinema-titles h3 {
  font-size: 1.04rem;
  font-weight: 800;
  color: #F8FAFC;
  margin: 0;
  letter-spacing: -0.1px;
}

.cinema-title-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
  font-weight: 700;
}

.scene-title-badge {
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFD166;
}

.cinema-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cinema-voice-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #FFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 5px 12px;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cinema-voice-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cinema-voice-btn.muted-voice {
  opacity: 0.6;
  border-color: rgba(255, 255, 255, 0.12);
}

.cinema-scene-selector {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  background: #151822;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.cinema-scene-pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  color: #ADB5BD;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px 10px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.cinema-scene-pill:hover {
  background: rgba(255, 209, 102, 0.14);
  color: #FFF;
}

.cinema-scene-pill.active {
  background: rgba(255, 209, 102, 0.22);
  color: #FFD166;
  border-color: #FFD166;
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.25);
}

.scene-status-badge {
  background: rgba(255, 209, 102, 0.15);
  color: #FFD166;
  border: 1px solid rgba(255, 209, 102, 0.4);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
}

.cinema-close-btn {
  background: #1E2333;
  border: 1.5px solid rgba(212, 163, 89, 0.32);
  color: #F8FAFC;
  font-size: 1.05rem;
  font-weight: 800;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.cinema-close-btn:hover {
  background: #2B3248;
  border-color: #FFD166;
  color: #FFD166;
}

/* Biograf Teater-Lærred (Viewport) */
.cinema-viewport {
  position: relative;
  width: 100%;
  height: 440px;
  background: #0B0E14;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .cinema-viewport {
    height: 360px;
  }
}

@media (max-width: 480px) {
  .cinema-viewport {
    height: 310px;
  }
}

.cinema-stage {
  width: 100%;
  height: 100%;
  position: relative;
  contain: layout paint style;
}

#cinema-master-svg {
  width: 100%;
  height: 100%;
  display: block;
  shape-rendering: geometricPrecision;
}

#cinema-camera-rig,
#rig-bunny-root {
  will-change: transform;
}

.cinema-particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  will-change: contents;
}

/* Tegnefilm Scener Base */
.cartoon-scene {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.scene-sky-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* --- SCENE 1: CHOKOLADE-GILDE --- */
.sky-pantry {
  background: radial-gradient(circle at center, #854D0E 0%, #451A03 65%, #1C0A00 100%);
}

.pantry-shelves {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.shelf {
  position: absolute;
  left: 5%;
  width: 90%;
  height: 12px;
  background: #78350F;
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

.shelf-top { top: 22%; }
.shelf-mid { top: 78%; }

.flying-choc-wrappers {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.foil {
  position: absolute;
  font-size: 1.8rem;
  animation: foil-float 3s infinite ease-in-out;
}

.foil-1 { top: 18%; left: 12%; animation-delay: 0s; }
.foil-2 { top: 28%; right: 14%; animation-delay: 0.8s; }
.foil-3 { bottom: 25%; left: 15%; animation-delay: 1.4s; }
.foil-4 { top: 40%; right: 22%; animation-delay: 0.4s; }
.foil-5 { bottom: 32%; right: 12%; animation-delay: 1.9s; }

@keyframes foil-float {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-16px) rotate(18deg) scale(1.15); }
}

.bunny-eating-center {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chomping-bunny {
  width: 170px;
  height: 190px;
  position: relative;
  animation: chew-bounce 0.5s infinite ease-in-out;
}

@keyframes chew-bounce {
  0%, 100% { transform: scale(1, 1) translateY(0); }
  50% { transform: scale(1.06, 0.94) translateY(4px); }
}

.giant-choc-egg {
  position: absolute;
  bottom: 12px;
  right: -25px;
  z-index: 15;
  animation: egg-wobble 1.2s infinite ease-in-out;
}

@keyframes egg-wobble {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(10deg); }
}

.comic-sound-bubble {
  position: absolute;
  top: -15px;
  right: -50px;
  background: #FFD166;
  color: #2B2D42;
  border: 3px solid #2B2D42;
  border-radius: 18px;
  padding: 6px 14px;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 25;
  animation: pop-bounce 0.6s infinite alternate ease-in-out;
}

@keyframes pop-bounce {
  0% { transform: scale(0.95) rotate(-4deg); }
  100% { transform: scale(1.1) rotate(4deg); }
}

.empty-chocolate-boxes {
  position: absolute;
  bottom: 15px;
  left: 8%;
  z-index: 8;
  display: flex;
  gap: 15px;
}

.box-pile {
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 8px;
  color: #FF85A1;
  font-weight: 800;
  font-size: 0.9rem;
  border: 1px dashed #FF85A1;
}

/* --- SCENE 2: DET STORE CHOK --- */
.sky-dramatic {
  background: radial-gradient(circle at center, #3A0CA3 0%, #10002B 70%, #000000 100%);
}

.dramatic-lightning-rays {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: repeating-conic-gradient(from 0deg, transparent 0deg 15deg, rgba(255, 0, 85, 0.12) 15deg 30deg);
  animation: rotate-rays 12s linear infinite;
}

@keyframes rotate-rays {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.shock-split-layout {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 90%;
  max-width: 650px;
}

.basket-spotlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.big-empty-basket {
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
  animation: basket-shake 1.5s infinite ease-in-out;
}

@keyframes basket-shake {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.calendar-sheet {
  background: #FFF;
  border: 3px solid #2B2D42;
  border-radius: 10px;
  padding: 8px 12px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  margin-top: 10px;
  animation: cal-tremble 0.3s infinite;
}

@keyframes cal-tremble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}

.cal-header {
  font-size: 0.7rem;
  font-weight: 800;
  background: #E63946;
  color: #FFF;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.cal-day {
  font-size: 0.85rem;
  font-weight: 900;
  color: #2B2D42;
}

.cal-alert {
  font-size: 0.8rem;
  font-weight: 900;
  color: #D90429;
}

.bunny-panic-box {
  position: relative;
}

.panic-bunny {
  width: 170px;
  height: 190px;
  animation: panic-quake 0.15s infinite;
}

@keyframes panic-quake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 2px); }
  75% { transform: translate(3px, -2px); }
}

.panic-sweat {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.6rem;
  animation: sweat-pop 0.6s infinite alternate;
}

.sweat-2 {
  top: 25px;
  left: 10px;
  animation-delay: 0.3s;
}

@keyframes sweat-pop {
  0% { transform: translateY(0) scale(0.8); opacity: 0.6; }
  100% { transform: translateY(-12px) scale(1.2); opacity: 1; }
}

.bubble-gasp {
  top: -20px;
  right: -30px;
  background: #FF0055;
  color: #FFF;
  border-color: #FFF;
}

/* --- SCENE 3: DEN GENIALE PLAN --- */
.sky-blueprint {
  background: radial-gradient(circle at center, #0F4C81 0%, #001E3D 80%, #000F1F 100%);
  background-size: 20px 20px;
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
}

.idea-blueprint-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 680px;
}

.lightbulb-burst {
  position: relative;
  margin-bottom: 8px;
  text-align: center;
}

.bulb-icon {
  font-size: 2.8rem;
  animation: bulb-pulse 0.8s infinite alternate ease-in-out;
  display: inline-block;
}

@keyframes bulb-pulse {
  0% { transform: scale(0.9); filter: drop-shadow(0 0 5px #FFD166); }
  100% { transform: scale(1.2); filter: drop-shadow(0 0 25px #FFE066); }
}

.bulb-ding {
  font-weight: 900;
  font-size: 1.1rem;
  color: #FFD166;
  text-shadow: 0 0 10px rgba(255, 209, 102, 0.8);
  animation: pop-in 0.4s ease-out;
}

.blueprint-scroll {
  background: rgba(15, 76, 129, 0.95);
  border: 3px solid #64DFDF;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5), inset 0 0 15px rgba(100, 223, 223, 0.2);
  width: 100%;
}

.blueprint-header {
  font-size: 0.95rem;
  font-weight: 900;
  color: #64DFDF;
  text-align: center;
  border-bottom: 2px dashed rgba(100, 223, 223, 0.4);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.blueprint-steps {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 8px;
}

.plan-step {
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(100, 223, 223, 0.5);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-num {
  background: #FFD166;
  color: #000;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.step-icon {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.plan-step p {
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFF;
  line-height: 1.2;
  margin: 0;
}

.plan-arrow {
  font-size: 1.2rem;
  color: #64DFDF;
}

.blueprint-stamp {
  margin-top: 8px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 900;
  color: #06D6A0;
  letter-spacing: 1px;
}

.sneaky-hero-bunny {
  position: absolute;
  bottom: -45px;
  right: -20px;
  width: 120px;
  height: 130px;
  z-index: 20;
}

.comic-speech-cloud {
  position: absolute;
  top: -30px;
  right: 60px;
  background: #FFF;
  color: #2B2D42;
  border: 2px solid #2B2D42;
  border-radius: 14px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* --- SCENE 4: MALE-VÆRKSTEDET --- */
.sky-workshop {
  background: radial-gradient(circle at center, #2A9D8F 0%, #264653 75%, #102027 100%);
}

.confetti-rain {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

.c-dot {
  position: absolute;
  font-size: 1.6rem;
  animation: confetti-fall 2.5s infinite linear;
}

.c-1 { left: 10%; top: -20px; animation-delay: 0s; }
.c-2 { left: 30%; top: -20px; animation-delay: 0.8s; }
.c-3 { left: 55%; top: -20px; animation-delay: 0.3s; }
.c-4 { left: 75%; top: -20px; animation-delay: 1.2s; }
.c-5 { left: 90%; top: -20px; animation-delay: 0.5s; }

.workshop-transformation-stage {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 90%;
  max-width: 660px;
}

.egg-transformation-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.egg-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.egg-shape {
  font-size: 3rem;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
}

.bounce-egg {
  animation: egg-magical-bounce 0.8s infinite alternate ease-in-out;
}

@keyframes egg-magical-bounce {
  0% { transform: scale(0.9) rotate(-6deg); }
  100% { transform: scale(1.15) rotate(6deg); }
}

.egg-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #CED4DA;
}

.painted-glow {
  color: #FFD166;
  text-shadow: 0 0 10px rgba(255, 209, 102, 0.8);
}

.magic-brush-arrow {
  font-size: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: brush-swirl 1s infinite alternate;
}

@keyframes brush-swirl {
  0% { transform: rotate(-15deg) scale(0.9); }
  100% { transform: rotate(15deg) scale(1.1); }
}

.color-splashes {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.splash {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.sp-red { background: #EF476F; }
.sp-gold { background: #FFD166; }
.sp-cyan { background: #06D6A0; }

.artist-bunny-triumph {
  position: relative;
}

.victory-pose {
  width: 170px;
  height: 190px;
  animation: triumph-jump 0.8s infinite alternate ease-in-out;
}

@keyframes triumph-jump {
  0% { transform: translateY(0); }
  100% { transform: translateY(-16px) scale(1.04); }
}

.bubble-triumph {
  top: -25px;
  right: -40px;
  background: #06D6A0;
  color: #002B1F;
  border-color: #FFF;
  font-size: 1.1rem;
}

.full-basket-hero {
  position: absolute;
  bottom: 10px;
  left: 20px;
  z-index: 12;
  font-size: 1.8rem;
  animation: basket-pulse-glow 1.5s infinite alternate;
}

@keyframes basket-pulse-glow {
  0% { transform: scale(0.95); filter: drop-shadow(0 0 6px #FFD166); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 20px #FFE066); }
}

/* --- DYNAMISK UNDERTEKST BJÆLKE --- */
.cinema-subtitles-bar {
  position: absolute;
  bottom: 14px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
  padding: 0 18px;
  transition: opacity 0.2s ease;
}

.cinema-modal-card.movie-ended .cinema-subtitles-bar,
.cinema-modal-card.movie-ended #s4-win-bubble {
  opacity: 0 !important;
  pointer-events: none;
}

.sub-bubble {
  background: rgba(20, 23, 34, 0.96);
  border: 1.5px solid rgba(212, 163, 89, 0.55);
  border-radius: 14px;
  padding: 9px 20px;
  max-width: 700px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

#movie-subtitle-text {
  font-size: 0.96rem;
  font-weight: 700;
  color: #F8FAFC;
  letter-spacing: 0.1px;
  line-height: 1.38;
}

/* --- SLUT-SKÆRM OVERLAY (FINALE) --- */
.movie-finished-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 15, 24, 0.88);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.movie-finished-overlay.active {
  display: flex;
}

.finished-content {
  text-align: center;
  width: 100%;
  max-width: 500px;
  color: #F8FAFC;
  background: #181C2A;
  border: 2px solid #D4A359;
  border-radius: 18px;
  padding: 26px 28px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.finished-header-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 163, 89, 0.14);
  color: #FFD166;
  border: 1.5px solid rgba(212, 163, 89, 0.45);
  border-radius: 999px;
  padding: 4px 14px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.finished-content h2 {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFD166;
  margin: 0 0 8px 0;
  line-height: 1.22;
}

.finished-content p {
  font-family: var(--font-main);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.45;
  color: #CBD5E1;
  margin: 0 0 22px 0;
  max-width: 410px;
}

.finished-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.finished-btn-replay,
.finished-btn-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, background-color 0.14s ease;
  width: 100%;
}

.finished-btn-replay {
  background: #23293D;
  color: #F8FAFC;
  border: 1.5px solid #3B4461;
  box-shadow: 0 3px 0 #0F131F;
}

.finished-btn-replay:hover {
  background: #2D354E;
  border-color: #525E82;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #0F131F;
}

.finished-btn-replay:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0F131F;
}

.finished-btn-start {
  background: linear-gradient(180deg, #FFD166 0%, #F59E0B 100%);
  color: #1E1304;
  border: 1.5px solid #FDE68A;
  box-shadow: 0 3px 0 #B45309;
}

.finished-btn-start:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #B45309;
}

.finished-btn-start:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #B45309;
}

@media (max-width: 520px) {
  .finished-actions {
    grid-template-columns: 1fr;
  }
}

/* --- BIOGRAF KONTROL-BJÆLKE --- */
.cinema-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #141722;
  border-top: 1.5px solid rgba(212, 163, 89, 0.22);
  gap: 14px;
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cinema-ctrl-btn {
  background: #23293D;
  border: 1.5px solid #3B4461;
  color: #F8FAFC;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.84rem;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 2px 0 #0F131F;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cinema-ctrl-btn:hover {
  background: #2D354E;
  border-color: #525E82;
  transform: translateY(-1px);
}

.ctrl-play {
  background: #2D354E;
  border-color: rgba(212, 163, 89, 0.55);
  color: #FFD166;
}

.ctrl-play:hover {
  background: #37415F;
  border-color: #FFD166;
}

.cinema-time-text {
  font-size: 0.82rem;
  font-weight: 800;
  color: #CBD5E1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: 4px;
}

/* Tidslinje / Scrubber Track */
.cinema-progress-track {
  flex: 1;
  height: 8px;
  background: #23293D;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  touch-action: none;
}

.cinema-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #F59E0B 0%, #FFD166 100%);
  border-radius: 999px;
}

.cinema-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  background: #FFFDF7;
  border: 2.5px solid #F59E0B;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  transition: transform 0.1s ease;
}

.cinema-progress-track:hover .cinema-progress-thumb {
  transform: translate(-50%, -50%) scale(1.2);
}

.scene-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: rgba(15, 19, 31, 0.55);
  pointer-events: none;
}

.tick-25 { left: 25%; }
.tick-50 { left: 50%; }
.tick-75 { left: 75%; }

.controls-right {
  display: flex;
  align-items: center;
}

.cinema-ctrl-btn.btn-cta {
  background: linear-gradient(180deg, #FFD166 0%, #F59E0B 100%);
  color: #1E1304;
  border-color: #FDE68A;
  box-shadow: 0 2px 0 #B45309;
}

.cinema-ctrl-btn.btn-cta:hover {
  filter: brightness(1.05);
}

/* Små mobil-tilpasninger */
@media (max-width: 600px) {
  .cinema-controls-bar {
    flex-wrap: wrap;
  }
  .cinema-progress-track {
    order: 1;
    width: 100%;
    flex-basis: 100%;
  }
  .controls-left {
    order: 2;
  }
  .controls-right {
    order: 3;
  }
}

/* ==========================================================================
   🧩 SMÅ OPGAVER PÅ VEJEN (MINI-PUZZLES), SYNSKEGLE, LYDBØLGER & CHASE-OPGRADERING
   ========================================================================== */

/* HUD-pills i topbaren */
.stealth-hud-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.92);
  color: #2B2D42;
  border: 2px solid #2B2D42;
  box-shadow: 0 2px 0 rgba(43, 45, 66, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hud-pill.pop-scale {
  transform: scale(1.22);
  background: #FFD166;
}

.hud-pill.clue-pill.found,
.hud-pill.puzzle-pill.solved {
  background: #D8F3DC;
  border-color: #2D6A4F;
  color: #1B4332;
}

/* Hønens synskegle / spotlight på gulvet */
.hen-vision-cone {
  position: absolute;
  width: 58%;
  height: 56%;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transform-origin: right center;
  clip-path: polygon(100% 38%, 0% 0%, 0% 100%, 100% 62%);
  transition: opacity 0.25s ease, background 0.25s ease;
}

.hen-vision-cone.warning,
.hen-vision-cone.looking {
  opacity: 0;
  display: none;
}

/* Vagthønens bevægelige lommelygte-lysstråle / vandstråle (op og ned) */
.hen-vision-cone.flashlight-beam {
  width: 130px;
  height: 130px;
  overflow: visible;
  clip-path: none;
  background: none;
  transform-origin: center;
  z-index: 8;
  transition: opacity 0.25s ease, filter 0.18s ease;
}

.hen-vision-cone.flashlight-beam.flashlight-active {
  opacity: 0.96;
  background: none;
  filter: drop-shadow(0 0 12px rgba(255, 225, 105, 0.45));
}

.flashlight-beam-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.flashlight-beam-svg .beam-layer-normal {
  opacity: 1;
  transition: opacity 0.18s ease;
}

.flashlight-beam-svg .beam-layer-hit {
  opacity: 0;
  transition: opacity 0.18s ease;
}

.hen-vision-cone.flashlight-beam.water-hose-beam,
.hen-vision-cone.flashlight-beam.water-hose-beam.flashlight-active {
  opacity: 0.96;
  clip-path: none;
  background: none;
  filter: drop-shadow(0 4px 12px rgba(186, 230, 253, 0.55));
}

.hen-vision-cone.flashlight-beam.water-hose-beam.flashlight-hit {
  opacity: 1;
  clip-path: none;
  background: none;
  filter: drop-shadow(0 0 14px rgba(230, 57, 70, 0.78));
}

.water-spray-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.water-spray-svg .water-stream-line.stream-fast {
  stroke-dasharray: 34 22;
  animation: water-stream-flow-fast 0.34s linear infinite;
}

.water-spray-svg .water-stream-line.stream-med {
  stroke-dasharray: 44 26;
  animation: water-stream-flow-med 0.46s linear infinite;
}

.water-spray-svg .water-stream-line.stream-slow {
  stroke-dasharray: 26 20;
  animation: water-stream-flow-slow 0.58s linear infinite;
}

.water-spray-svg .water-foam-group {
  transform-box: fill-box;
  transform-origin: center;
  animation: water-foam-pulse 0.42s ease-in-out infinite alternate;
}

.water-spray-svg .water-spray-drops {
  animation: water-drops-shimmer 0.38s ease-in-out infinite alternate;
}

@keyframes water-stream-flow-fast {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -56; }
}

@keyframes water-stream-flow-med {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -70; }
}

@keyframes water-stream-flow-slow {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -46; }
}

@keyframes water-foam-pulse {
  0% { transform: scale(0.95) translateX(2px); opacity: 0.78; }
  100% { transform: scale(1.05) translateX(-3px); opacity: 0.96; }
}

@keyframes water-drops-shimmer {
  0% { transform: translateX(2px) scale(0.96); opacity: 0.82; }
  100% { transform: translateX(-4px) scale(1.04); opacity: 1; }
}

.hen-vision-cone.flashlight-beam:not(.water-hose-beam).flashlight-hit {
  opacity: 0.98;
  background: none;
  filter: drop-shadow(0 0 16px rgba(230, 57, 70, 0.65));
}

.hen-vision-cone.flashlight-beam:not(.water-hose-beam).flashlight-hit .beam-layer-normal {
  opacity: 0;
}

.hen-vision-cone.flashlight-beam:not(.water-hose-beam).flashlight-hit .beam-layer-hit {
  opacity: 1;
}

@keyframes cone-sweep {
  0% { transform: rotate(-4deg); }
  100% { transform: rotate(4deg); }
}

/* Lydbølge-ringe på gulvet */
.sound-ripples-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.sound-ripple {
  position: absolute;
  width: 24px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  animation: sound-ripple-expand 1.05s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sound-ripple.ripple-wood {
  border: 3px solid #E63946;
  box-shadow: 0 0 0 6px rgba(255, 183, 3, 0.45);
}

.sound-ripple.ripple-water {
  border: 3px solid #00B4D8;
  box-shadow: 0 0 0 6px rgba(144, 224, 239, 0.55);
}

@keyframes sound-ripple-expand {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(4.8); opacity: 0; }
}

/* 3 Opgave-sedler sat fast på objekter i rummet (Tønden, Hylden, Høballen) */
.clue-station-actor {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.clue-mount-prop {
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.28));
}

.clue-mount-prop.prop-barrel-mount {
  width: 68px;
  height: 78px;
}

.clue-mount-prop.prop-shelf-mount {
  width: 118px;
  height: 44px;
}

.clue-mount-prop.prop-hay-mount {
  width: 98px;
  height: 74px;
}

.clue-note-pinned {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 4;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.clue-station-actor.mount-shelf .clue-note-pinned {
  top: 56%;
}

.clue-note-pinned:hover,
.clue-note-pinned.near-bunny {
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.85));
}

.clue-paper {
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35));
}

.clue-select-btn {
  margin-top: -3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(180deg, #FFF8D6 0%, #FFD166 100%);
  color: #1F2438;
  border: 2px solid #2B2D42;
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--font-heading, 'Fredoka', sans-serif);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2.5px 0 #2B2D42;
  cursor: pointer;
}

.clue-select-btn .clue-btn-cta {
  background: #3A86FF;
  color: #FFFFFF;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 0.62rem;
  font-weight: 900;
}

.clue-note-pinned.near-bunny .clue-select-btn {
  background: linear-gradient(180deg, #FFE169 0%, #FB8500 100%);
  color: #FFFFFF;
}

.bonus-carrot-actor {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  z-index: 24;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.25s ease, filter 0.18s ease;
}

.bonus-carrot-actor:hover {
  transform: translate(-50%, -50%) scale(1.14);
  filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.95));
}

.bonus-carrot-actor.carrot-picked {
  transform: translate(-50%, -110%) scale(1.4);
  opacity: 0;
}

/* Opgraderet Æggerede og opgave-badge */
.egg-svg-holder {
  width: 74px;
  height: 70px;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.28));
}

.egg-puzzle-badge {
  margin-top: -6px;
  background: linear-gradient(135deg, #FFD166, #F4A261);
  color: #2B2D42;
  border: 2px solid #2B2D42;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 3px 0 #2B2D42;
  cursor: pointer;
}

.egg-puzzle-badge.unlocked {
  background: linear-gradient(135deg, #74C69D, #52B788);
  color: #FFF;
}

/* Kaninens dække-indikator ("Skjult!") */
.bunny-sprite-inner {
  width: 100%;
  height: 100%;
}

.bunny-cover-pill {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: #2D6A4F;
  color: #FFFFFF;
  border: 2px solid #D8F3DC;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.bunny-cover-pill.hidden {
  display: none;
}

.bunny-dance-pill {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #FB8500, #FFB703);
  color: #FFFFFF;
  border: 2px solid #2B2D42;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 3px 0 #2B2D42, 0 4px 8px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 30;
  animation: dance-pill-bounce 0.28s ease-in-out infinite alternate;
}

.bunny-dance-pill.hidden {
  display: none;
}

@keyframes dance-pill-bounce {
  0% { transform: translateX(-50%) translateY(0px) scale(1); }
  100% { transform: translateX(-50%) translateY(-4px) scale(1.06); }
}

.hud-pill.carrot-pill.found {
  background: linear-gradient(135deg, #74C69D, #40916C);
  color: #FFFFFF;
  border-color: #1B4332;
}

/* Interaktiv Mini-Opgave Overlay i StealthScene */
.mini-puzzle-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 38, 0.68);
  backdrop-filter: blur(4px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.mini-puzzle-overlay.hidden {
  display: none;
}

.puzzle-modal-card {
  background: linear-gradient(180deg, #FFFDF9 0%, #FEF7F0 100%);
  border: 4px solid #991B1B;
  border-radius: 22px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.48), inset 0 0 0 3px #FDE68A;
  max-width: 470px;
  width: 100%;
  padding: 18px 20px;
  color: #1E293B;
}

.puzzle-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.puzzle-badge-icon {
  font-size: 2rem;
  background: #FEE2E2;
  border: 2.5px solid #991B1B;
  border-radius: 14px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.puzzle-card-header h4 {
  font-size: 1.15rem;
  color: #991B1B;
  margin: 0 0 3px 0;
}

.puzzle-card-header p {
  font-size: 0.84rem;
  color: #166534;
  margin: 0;
}

.puzzle-close-btn {
  margin-left: auto;
  background: #FEE2E2;
  color: #7F1D1D;
  border: 2px solid #991B1B;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-weight: 900;
  cursor: pointer;
}

.puzzle-clue-banner {
  background: #FFF3B0;
  border: 2.5px dashed #BC6C25;
  border-radius: 14px;
  padding: 9px 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  text-align: left;
}

.puzzle-clue-banner.clue-highlighted {
  background: #D8F3DC;
  border-color: #2D6A4F;
}

.clue-target-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.clue-chip {
  background: #FFFFFF;
  border: 2px solid #2B2D42;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 1.15rem;
}

.clue-riddle-item {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 6px;
  padding: 2px 6px;
  font-weight: 700;
  font-size: 0.78rem;
}

/* Opgave 1: Træ-drejehjul */
.symbol-dials-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 10px 0 14px;
}

.wood-dial-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dial-step-btn {
  background: #E9C46A;
  border: 2px solid #2B2D42;
  border-radius: 8px;
  width: 54px;
  height: 26px;
  font-weight: 900;
  cursor: pointer;
}

.wood-dial-wheel {
  width: 68px;
  height: 68px;
  background: linear-gradient(180deg, #DDA15E, #BC6C25);
  border: 3.5px solid #2B2D42;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), 0 4px 0 #2B2D42;
  transition: transform 0.15s ease, background 0.2s ease;
}

.wood-dial-wheel.matched {
  background: linear-gradient(180deg, #95D5B2, #52B788);
  border-color: #1B4332;
}

/* Opgave 2: Befri ægget fra kviste */
.untangle-nest-stage {
  position: relative;
  height: 155px;
  background: radial-gradient(circle, #FFF3B0 20%, #DDA15E 95%);
  border: 3px solid #2B2D42;
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.untangle-egg-center {
  font-size: 3.2rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.nest-branch-item {
  position: absolute;
  width: 68%;
  padding: 7px 12px;
  border: 3px solid #2B2D42;
  border-radius: 999px;
  color: #FFF;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.32);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nest-branch-item.top-branch {
  border-color: #FFD166;
  box-shadow: 0 0 0 3px #FFD166, 0 6px 12px rgba(0, 0, 0, 0.35);
}

.nest-branch-item.branch-removed {
  transform: translateY(-70px) rotate(25deg) scale(0.7) !important;
  opacity: 0;
  pointer-events: none;
}

.nest-branch-item.branch-shake {
  animation: shake 0.35s ease;
}

.branch-order-badge {
  background: #FFD166;
  color: #2B2D42;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.75rem;
  font-weight: 900;
}

/* Opgave 3: Vægt-balance */
.scale-balance-visual {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #F8F9FA;
  border: 2.5px solid #2B2D42;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

.scale-pan {
  text-align: center;
}

.pan-item {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.scale-beam-center {
  font-size: 1.6rem;
  font-weight: 900;
  color: #BC6C25;
}

.weight-buttons-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-add-weight,
.btn-reset-weight {
  background: #FFD166;
  border: 2.5px solid #2B2D42;
  border-radius: 10px;
  padding: 7px 11px;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #2B2D42;
}

.btn-reset-weight {
  background: #E5E5E5;
}

/* Opgave 4: Foder-opskrift */
.recipe-target-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  background: #FFF3B0;
  border: 2px solid #2B2D42;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 12px;
  font-weight: 800;
}

.recipe-step-slot {
  background: #FFF;
  border: 2px solid #2B2D42;
  border-radius: 8px;
  padding: 3px 8px;
}

.recipe-step-slot.current {
  border-color: #E63946;
  box-shadow: 0 0 0 2px #FFD166;
}

.recipe-step-slot.done {
  background: #95D5B2;
}

.feed-ingredients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.btn-feed-ingredient {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 2.5px solid #2B2D42;
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 #2B2D42;
}

.btn-feed-ingredient:hover {
  background: #FFF3B0;
}

.ing-emoji {
  font-size: 1.4rem;
}

/* Interaktive Børne-Opgaver & Spørgsmål (6-10 år) */
.quiz-modal-card {
  max-width: 500px;
}

.quiz-category-pill {
  display: none;
}

.quiz-question-box {
  background: linear-gradient(180deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 3px solid #15803D;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.75), 0 4px 0 rgba(21, 128, 61, 0.2);
  text-align: center;
}

.quiz-question-text {
  font-size: 1.45rem;
  font-weight: 900;
  color: #064E3B;
  line-height: 1.3;
  letter-spacing: 0.5px;
  margin: 0;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #FFFFFF;
  border: 3px solid #166534;
  border-radius: 14px;
  padding: 11px 16px;
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 900;
  color: #1E293B;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 0 #166534;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.12s ease;
}

.quiz-option-btn:hover {
  background: #FEF2F2;
  border-color: #991B1B;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #991B1B;
}

.quiz-option-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #991B1B;
}

.quiz-option-letter {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #DC2626;
  color: #FFFFFF;
  border: 2.5px solid #7F1D1D;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.quiz-option-label {
  flex: 1;
}

.quiz-option-key {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748B;
  background: #F1F5F9;
  border: 1.5px solid #CBD5E1;
  border-radius: 6px;
  padding: 2px 6px;
}

.quiz-option-btn.option-correct {
  background: #95D5B2;
  border-color: #1B4332;
  color: #1B4332;
}

.quiz-option-btn.option-correct .quiz-option-letter {
  background: #2D6A4F;
  color: #FFFFFF;
}

.quiz-option-btn.option-wrong {
  background: #FFCCD5;
  border-color: #D90429;
  color: #800F2F;
  animation: shake 0.35s ease;
}

.puzzle-status-msg {
  font-size: 0.86rem;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 10px;
  background: #F1FAEE;
  border: 2px solid #2B2D42;
  text-align: center;
}

.puzzle-status-msg.success {
  background: #95D5B2;
  color: #1B4332;
}

/* Chase Scene Parallax-bakker, hegn, hjerter & turbo-toast */
.chase-parallax-hills {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.chase-wooden-fence {
  position: absolute;
  bottom: 92px;
  left: 0;
  right: 0;
  height: 38px;
  z-index: 3;
  background-image:
    repeating-linear-gradient(90deg, #F8FAFC 0px, #E2E8F0 12px, transparent 12px, transparent 54px),
    repeating-linear-gradient(90deg, #8B5E3C 0px, #8B5E3C 12px, transparent 12px, transparent 54px),
    linear-gradient(180deg, transparent 7px, #F1F5F9 7px, #F1F5F9 9px, #7C4D2B 9px, #7C4D2B 15px, transparent 15px, transparent 23px, #F1F5F9 23px, #F1F5F9 25px, #7C4D2B 25px, #7C4D2B 31px, transparent 31px);
  background-size: 1200px 5px, 1200px 38px, 1200px 38px;
  background-repeat: repeat-x;
  background-position: 0 0, 0 0, 0 0;
  opacity: 0.92;
  pointer-events: none;
}

.chase-hearts {
  background: #FFE5EC;
  color: #C9184A;
  border: 2px solid #2B2D42;
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 0.82rem;
  font-weight: 900;
}

.chase-carrot-badge {
  background: #FFD166;
  border: 2px solid #2B2D42;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.82rem;
  font-weight: 900;
}

.chase-prop.prop-sunflower {
  width: 72px;
  height: 76px;
}

.chase-prop.prop-wheelbarrow {
  width: 102px;
  height: 74px;
}

.chase-prop.prop-clothes {
  width: 134px;
  height: 162px;
}

.chase-prop.prop-lowbranch {
  width: 172px;
  height: 184px;
}

.chase-prop.prop-bonus {
  width: 54px;
  height: 54px;
}

.obs-action-pill,
.chase-speech,
.chase-boost-toast {
  display: none !important;
}

/* ==========================================================================
   KATTE-LOKKEMIDLER & ANIMATIONER (MÆLKESKÅL & MUS + MUSEHUL)
   ========================================================================== */

.cat-lure-actor,
.cat-lure-target {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.cat-lure-actor.hidden,
.cat-lure-target.hidden {
  display: none !important;
}

.cat-lure-actor:hover,
.cat-lure-actor.near-bunny,
.cat-lure-target.lure-ready-pulse {
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 12px rgba(255, 209, 102, 0.95));
}

.bunny-carried-item {
  position: absolute;
  bottom: 18%;
  left: 55%;
  width: 48px;
  height: 34px;
  transform: translate(-50%, 0);
  pointer-events: none;
  z-index: 4;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35));
}

.bunny-carried-item.hidden {
  display: none !important;
}

.cat-lure-target.lure-ready-pulse {
  filter: drop-shadow(0 0 12px rgba(255, 209, 102, 0.95));
}

.cat-lure-target.lure-mouse-hole,
.cat-lure-target.lure-mouse-hole:hover,
.cat-lure-target.lure-mouse-hole.lure-ready-pulse {
  transform: translate(-50%, -93%);
}

.lure-milk-jug .lure-svg-wrap {
  width: 52px;
  height: 60px;
}

.lure-milk-bowl .lure-svg-wrap {
  width: 68px;
  height: 44px;
}

.lure-corn-bowl .lure-svg-wrap {
  width: 72px;
  height: 48px;
}

.lure-mouse-cheese .lure-svg-wrap {
  width: 66px;
  height: 50px;
}

.lure-mouse-hole .lure-svg-wrap {
  width: 44px;
  height: 39px;
}

.lure-badge {
  margin-top: -4px;
  background: #FFF8D6;
  color: #1F2438;
  border: 1.8px solid #2B2D42;
  border-radius: 999px;
  padding: 1px 7px;
  font-family: var(--font-heading, 'Fredoka', sans-serif);
  font-size: 0.65rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 0 #2B2D42;
}

/* Løbende mus på vej mod musehullet */
.running-mouse-actor {
  position: absolute;
  width: 58px;
  height: 36px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.3));
  transition: opacity 0.2s ease;
}

.running-mouse-actor.hidden {
  display: none;
}

.running-mouse-actor.mouse-diving-hole {
  transform: translate(-50%, -70%) scale(0.35) !important;
  opacity: 0;
}

.peeking-mouse {
  transform-origin: center bottom;
}

.mouse-legs-front {
  animation: mouse-scurry-legs 0.11s linear infinite alternate;
  transform-origin: 28px 34px;
}

.mouse-legs-back {
  animation: mouse-scurry-legs 0.11s linear infinite alternate-reverse;
  transform-origin: 48px 34px;
}

@keyframes mouse-scurry-legs {
  0% { transform: translateX(-3px) translateY(-1.5px) rotate(-14deg); }
  100% { transform: translateX(3px) translateY(1px) rotate(14deg); }
}

.mouse-tail-scurry {
  animation: mouse-tail-wiggle 0.16s ease-in-out infinite alternate;
  transform-origin: 54px 26px;
}

@keyframes mouse-tail-wiggle {
  0% { transform: rotate(-12deg); }
  100% { transform: rotate(14deg); }
}

.mouse-in-hole-eyes {
  animation: mouse-hole-blink 2.8s ease-in-out infinite;
  transform-origin: 34px 40px;
}

@keyframes mouse-hole-blink {
  0%, 44%, 50%, 100% { transform: scaleY(1); }
  47% { transform: scaleY(0.1); }
}

/* Kvik 4-takts katte-gang når katten følger efter musen */
.cat-sprinting .cat-leg-walk-3 {
  animation-duration: 0.36s !important;
  animation-delay: 0s !important;
}
.cat-sprinting .cat-leg-walk-4 {
  animation-duration: 0.36s !important;
  animation-delay: -0.09s !important;
}
.cat-sprinting .cat-leg-walk-1 {
  animation-duration: 0.36s !important;
  animation-delay: -0.18s !important;
}
.cat-sprinting .cat-leg-walk-2 {
  animation-duration: 0.36s !important;
  animation-delay: -0.27s !important;
}

/* Katten drikker mælk fra skålen */
.cat-drinking-head {
  animation: cat-lap-head 0.46s ease-in-out infinite alternate;
  transform-origin: 32px 42px;
}

@keyframes cat-lap-head {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(3.5px) rotate(-6deg); }
}

.cat-drinking-tongue {
  animation: cat-lap-tongue 0.23s ease-in-out infinite alternate;
  transform-origin: 16px 55px;
}

@keyframes cat-lap-tongue {
  0% { transform: scaleY(0.35) translateY(-2px); opacity: 0.4; }
  100% { transform: scaleY(1.15) translateY(2px); opacity: 1; }
}

.milk-ripple-ring {
  animation: milk-ring-pulse 0.9s ease-out infinite;
  transform-origin: 44px 24.5px;
}

@keyframes milk-ring-pulse {
  0% { transform: scale(0.4); opacity: 0.95; }
  100% { transform: scale(1.55); opacity: 0; }
}

.milk-splash-drop {
  animation: milk-drop-hop 0.65s ease-in-out infinite alternate;
}

.milk-splash-drop.delay {
  animation-delay: 0.32s;
}

@keyframes milk-drop-hop {
  0% { transform: translateY(4px) scale(0.7); opacity: 0.3; }
  100% { transform: translateY(-3px) scale(1.1); opacity: 0.95; }
}

.cat-purr-hearts {
  animation: cat-purr-float 1.4s ease-in-out infinite alternate;
}

@keyframes cat-purr-float {
  0% { transform: translateY(2px); opacity: 0.75; }
  100% { transform: translateY(-4px); opacity: 1; }
}

/* Katten sidder på lur og venter spændt uden for musehullet */
.cat-waiting-tail {
  animation: cat-wait-tail-swish 0.85s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 12% 72%;
}

@keyframes cat-wait-tail-swish {
  0% { transform: rotate(-9deg); }
  100% { transform: rotate(11deg); }
}

.cat-waiting-paw {
  animation: cat-wait-paw-tap 0.72s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 80% 45%;
}

@keyframes cat-wait-paw-tap {
  0% { transform: rotate(0deg) translateY(0px); }
  100% { transform: rotate(10deg) translateY(-2.5px); }
}

/* ==========================================================================
   VAGTHØNS PÅ PATRULJE & SPISER MAJS (obs-patrolHen)
   ========================================================================== */

.obs-patrolHen {
  width: 84px;
  height: 72px;
  z-index: 13;
  transition: none;
  transform-origin: 50% 55%;
}

.obs-patrolHen.hen-patrolling .patrol-hen-body {
  animation: patrol-hen-bob 0.36s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.obs-patrolHen.hen-patrolling .patrol-hen-head {
  animation: patrol-hen-head-bob 0.36s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 65% 75%;
}

.obs-patrolHen.hen-patrolling .patrol-hen-leg-l {
  animation: patrol-hen-step-l 0.36s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 50% 15%;
}

.obs-patrolHen.hen-patrolling .patrol-hen-leg-r {
  animation: patrol-hen-step-r 0.36s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 50% 15%;
}

.obs-patrolHen.hen-eating-corn .patrol-hen-eating-head {
  animation: patrol-hen-peck-corn 0.34s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 68% 35%;
}

.obs-patrolHen.hen-eating-corn .patrol-corn-crumbs {
  animation: hen-corn-crumb-hop 0.68s ease-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

@keyframes patrol-hen-bob {
  0% { transform: translateY(0px) rotate(-1.5deg); }
  100% { transform: translateY(-3px) rotate(1.5deg); }
}

@keyframes patrol-hen-head-bob {
  0% { transform: translateX(0px) rotate(0deg); }
  100% { transform: translateX(-2.5px) rotate(-5deg); }
}

@keyframes patrol-hen-step-l {
  0% { transform: rotate(-16deg) translateY(-2px); }
  100% { transform: rotate(16deg) translateY(1px); }
}

@keyframes patrol-hen-step-r {
  0% { transform: rotate(16deg) translateY(1px); }
  100% { transform: rotate(-16deg) translateY(-2px); }
}

@keyframes patrol-hen-peck-corn {
  0% { transform: rotate(0deg) translateY(0px); }
  100% { transform: rotate(-16deg) translateY(5px); }
}

/* ==========================================================================
   BANE 30: DEN STORE BLOMSTERLABYRINT & HORISONT-AFSLUTNING SET BAGFRA
   ========================================================================== */

.obs-flowerBush {
  width: 108px;
  height: 84px;
  filter: drop-shadow(0 5px 9px rgba(18, 28, 12, 0.28));
}

.stage-exit.exit-right-side {
  align-items: flex-end;
  transform-origin: right center;
  transform: translate(0%, -26%);
}

.stage-exit.exit-right-side.active {
  transform: translate(0%, -26%) scale(1.05);
  filter: drop-shadow(-4px 0 16px rgba(255, 225, 105, 0.85));
}

/* Hane der holder øje (type-roosterWatch) */
.hen-svg.type-roosterWatch .rooster-watch-head {
  transform-box: fill-box;
  transform-origin: 55% 75%;
  animation: rooster-watch-scan 1.6s ease-in-out infinite alternate;
}

.hen-svg.type-roosterWatch .rooster-tail-feathers {
  transform-box: fill-box;
  transform-origin: 15% 80%;
  animation: rooster-tail-breeze 2.2s ease-in-out infinite alternate;
}

.hen-actor.hen-alert-up .hen-svg.type-roosterWatch .rooster-watch-head {
  animation: rooster-watch-alert 0.36s ease-in-out infinite alternate;
}

.rudolf-nose-glow-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: rudolf-nose-pulse 1.8s ease-in-out infinite alternate;
}

@keyframes rudolf-nose-pulse {
  0%   { opacity: 0.55; transform: scale(0.92); }
  100% { opacity: 0.95; transform: scale(1.14); }
}

@keyframes rooster-watch-scan {
  0% { transform: rotate(-4deg) translateY(0px); }
  100% { transform: rotate(5deg) translateY(-2px); }
}

@keyframes rooster-watch-alert {
  0% { transform: rotate(-8deg) translateY(-3px) scale(1.04); }
  100% { transform: rotate(6deg) translateY(-5px) scale(1.04); }
}

@keyframes rooster-tail-breeze {
  0% { transform: rotate(-2.5deg); }
  100% { transform: rotate(3.5deg); }
}

/* FINALE HORISONT-CUTSCENE: Kaninen løber ned ad vejen og væk i horisonten (set bagfra) */
.finale-horizon-cutscene {
  position: absolute;
  inset: 0;
  z-index: 220;
  overflow: hidden;
  border-radius: inherit;
  background: #030712;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: size;
  animation: finale-cutscene-fade-in 0.45s ease-out forwards;
}

@keyframes finale-cutscene-fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.finale-horizon-scene-wrap {
  position: relative;
  width: min(100cqw, calc(100cqh * 1000 / 600));
  height: min(100cqh, calc(100cqw * 600 / 1000));
  overflow: hidden;
}

.finale-horizon-bg-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.fin-aurora-wave {
  animation: fin-aurora-drift 7s ease-in-out infinite alternate;
}

.fin-aurora-wave-2 {
  animation: fin-aurora-drift 9.5s ease-in-out infinite alternate-reverse;
}

@keyframes fin-aurora-drift {
  0% { transform: translateX(-12px) scaleY(0.96); opacity: 0.78; }
  100% { transform: translateX(14px) scaleY(1.06); opacity: 1; }
}

.fin-star {
  animation: fin-star-twinkle 2.4s ease-in-out infinite alternate;
}

@keyframes fin-star-twinkle {
  0% { opacity: 0.35; }
  100% { opacity: 0.98; }
}

.fin-smoke-puff {
  animation: fin-smoke-rise 3.6s ease-out infinite;
}

.fin-smoke-2 { animation-delay: 1.1s; }
.fin-smoke-3 { animation-delay: 2.2s; }

@keyframes fin-smoke-rise {
  0% { transform: translate(0, 4px) scale(0.75); opacity: 0.8; }
  100% { transform: translate(8px, -18px) scale(1.28); opacity: 0; }
}

.fin-snow-layer {
  animation: fin-snow-fall 5.5s linear infinite;
}

@keyframes fin-snow-fall {
  0% { transform: translateY(-10px); opacity: 0.9; }
  100% { transform: translateY(18px); opacity: 0.65; }
}

.finale-horizon-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
  text-align: center;
  width: 92%;
  max-width: 680px;
}

.finale-horizon-title {
  display: inline-block;
  background: rgba(255, 253, 244, 0.94);
  color: #2B2D42;
  border: 3px solid #2B2D42;
  border-radius: 999px;
  padding: 8px 22px;
  font-family: var(--font-heading, 'Fredoka', sans-serif);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 800;
  box-shadow: 0 5px 0 #2B2D42, 0 10px 24px rgba(0, 0, 0, 0.22);
}

/* Kaninen set bagfra der løber ad vejen mod horisonten */
.finale-horizon-bunny {
  position: absolute;
  width: 15%;
  aspect-ratio: 150 / 175;
  height: auto;
  left: 48%;
  top: 84%;
  z-index: 4;
  pointer-events: none;
  transform-origin: center center;
  filter: drop-shadow(0 8px 12px rgba(42, 24, 10, 0.32));
  animation: finale-bunny-horizon-run 5.8s cubic-bezier(0.32, 0.08, 0.24, 0.98) forwards;
}

.finale-horizon-bunny .bunny-back-run-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Rytmisk hop i kroppen mens kaninen løber væk bagfra */
.finale-horizon-bunny .back-bunny-body-bounce {
  transform-box: fill-box;
  transform-origin: 50% 80%;
  animation: back-body-hop 0.24s ease-in-out infinite alternate;
}

.finale-horizon-bunny .back-bunny-head-ears {
  transform-box: fill-box;
  transform-origin: 50% 90%;
  animation: back-ears-bob 0.24s ease-in-out infinite alternate;
}

.finale-horizon-bunny .back-bunny-ear-left {
  transform-box: fill-box;
  transform-origin: 70% 95%;
  animation: back-ear-left-flop 0.24s ease-in-out infinite alternate;
}

.finale-horizon-bunny .back-bunny-ear-right {
  transform-box: fill-box;
  transform-origin: 30% 95%;
  animation: back-ear-right-flop 0.24s ease-in-out infinite alternate;
}

.finale-horizon-bunny .back-bunny-tail {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: back-tail-wiggle 0.18s ease-in-out infinite alternate;
}

/* Skiftende bagben med synlige lyserøde trædepuder der sætter af mod vejen */
.finale-horizon-bunny .back-bunny-leg-left {
  transform-box: fill-box;
  transform-origin: 50% 25%;
  animation: back-leg-kick-left 0.24s ease-in-out infinite alternate;
}

.finale-horizon-bunny .back-bunny-leg-right {
  transform-box: fill-box;
  transform-origin: 50% 25%;
  animation: back-leg-kick-right 0.24s ease-in-out infinite alternate;
}

.finale-horizon-bunny .back-bunny-shadow {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: back-shadow-pulse 0.24s ease-in-out infinite alternate;
}

.finale-horizon-bunny .back-bunny-dust {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: back-dust-puff 0.36s ease-out infinite;
}

@keyframes finale-bunny-horizon-run {
  0% {
    left: 48%;
    top: 85%;
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 1;
  }
  22% {
    left: 47.2%;
    top: 73%;
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 1;
  }
  45% {
    left: 49.2%;
    top: 61%;
    transform: translate(-50%, -50%) scale(0.64);
    opacity: 1;
  }
  68% {
    left: 51%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.45);
    opacity: 1;
  }
  88% {
    left: 50.2%;
    top: 41.5%;
    transform: translate(-50%, -50%) scale(0.32);
    opacity: 1;
  }
  100% {
    left: 50%;
    top: 38.5%;
    transform: translate(-50%, -50%) scale(0.28);
    opacity: 1;
  }
}

@keyframes back-body-hop {
  0% { transform: translateY(2px) scale(1.03, 0.96); }
  100% { transform: translateY(-9px) scale(0.97, 1.04); }
}

@keyframes back-ears-bob {
  0% { transform: translateY(1px) rotate(-1.5deg); }
  100% { transform: translateY(-4px) rotate(1.5deg); }
}

@keyframes back-ear-left-flop {
  0% { transform: rotate(-4deg); }
  100% { transform: rotate(-14deg); }
}

@keyframes back-ear-right-flop {
  0% { transform: rotate(14deg); }
  100% { transform: rotate(4deg); }
}

@keyframes back-tail-wiggle {
  0% { transform: translateX(-3.5px) scale(1.05); }
  100% { transform: translateX(3.5px) scale(0.95); }
}

@keyframes back-leg-kick-left {
  0% { transform: translateY(-10px) rotate(16deg) scale(1.08); }
  100% { transform: translateY(5px) rotate(-12deg) scale(0.9); }
}

@keyframes back-leg-kick-right {
  0% { transform: translateY(5px) rotate(12deg) scale(0.9); }
  100% { transform: translateY(-10px) rotate(-16deg) scale(1.08); }
}

@keyframes back-shadow-pulse {
  0% { transform: scale(1.06); opacity: 0.36; }
  100% { transform: scale(0.82); opacity: 0.2; }
}

@keyframes back-dust-puff {
  0% { transform: translateY(0px) scale(0.65); opacity: 0.85; }
  100% { transform: translateY(10px) scale(1.35); opacity: 0; }
}

.finale-horizon-actions {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
}

.finale-horizon-btn {
  background: linear-gradient(180deg, #FFD166 0%, #F4A261 100%);
  color: #2B2D42;
  border: 3px solid #2B2D42;
  border-radius: 999px;
  padding: 12px 28px;
  font-family: var(--font-heading, 'Fredoka', sans-serif);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 0 #2B2D42, 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.finale-horizon-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 7px 0 #2B2D42, 0 14px 28px rgba(0, 0, 0, 0.32);
}

.finale-horizon-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2B2D42;
}

/* === MØLLEHJUL ROTATION I KORNMØLLEN === */
.mill-wheel-large-spin {
  transform-box: view-box;
  transform-origin: 0px 0px;
  animation: mill-wheel-cw 24s linear infinite;
}

.mill-wheel-small-spin {
  transform-box: view-box;
  transform-origin: 0px 0px;
  animation: mill-wheel-ccw 18s linear infinite;
}

@keyframes mill-wheel-cw {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes mill-wheel-ccw {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

/* ==========================================================================
   RESPONSIV UNDERSTØTTELSE: COMPUTER, IPAD / TABLET OG MOBIL
   ========================================================================== */

/* Sørg for at skærme kan rulle blødt på iPad/mobil og aldrig klipper indhold */
.screen {
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

#gameplay-screen {
  overflow: hidden;
}

.paint-stage {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Touch-optimering til D-pad, handlingsknapper og interaktive elementer */
.dpad-container,
.btn-dpad,
.btn-action,
.chase-controls,
.stealth-controls {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.btn-dpad.pressed {
  transform: translateY(3px);
  box-shadow: 0 0 0 #0077B6;
  background: #0096C7;
}

/* Modaler tilpasses altid skærmhøjden på både computer, iPad og mobil */
.modal-overlay,
.mini-puzzle-overlay {
  overflow-y: auto;
  max-height: 100vh;
  max-height: 100dvh;
}

.modal-card,
.puzzle-modal-card {
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Skjul tastatur-genveje på touch-skærme (iPad og mobil) og mindre skærme */
@media (hover: none) and (pointer: coarse), (max-width: 860px) {
  .btn-keycap,
  .dpad-key-hint,
  .quiz-option-key {
    display: none !important;
  }

  .btn-label-stack {
    align-items: center;
  }

  .btn-action .btn-text {
    text-align: center;
  }
}

/* Safe-area understøttelse til iPhone og iPad med home-bar / notch */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .app-header {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .stealth-controls,
  .chase-controls {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
}

/* === IPAD / TABLET (768px – 1024px) === */
@media (min-width: 681px) and (max-width: 1024px) {
  .app-header {
    padding: 8px 16px;
  }

  .story-wrapper {
    padding: 16px;
  }

  .story-card {
    padding: 20px;
    gap: 20px;
  }

  .btn-dpad {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
  }

  .dpad-center {
    width: 36px;
    height: 36px;
  }

  .paint-workspace {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .artist-bunny-box {
    display: none;
  }

  .easel-container {
    padding: 12px 16px 24px;
  }

  .paint-toolbox {
    max-width: 360px;
    padding: 16px;
  }
}

/* === CHROMEBOOK & BÆRBARE SKÆRME (max-height: 820px) === */
@media (max-height: 820px) {
  .app-header {
    padding: 6px 16px;
  }

  .logo-bounce {
    font-size: 1.6rem;
  }

  .app-title {
    font-size: 1.2rem;
  }

  .btn-icon-label {
    padding: 6px 12px;
    font-size: 0.88rem;
  }

  .btn-icon {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
  }

  .level-top-bar {
    padding: 4px 16px;
  }

  .level-indicator-badge {
    font-size: 0.82rem;
    padding: 3px 12px;
  }

  .stealth-controls,
  .chase-controls {
    padding: 6px 16px;
    gap: 14px;
  }

  .btn-dpad {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .btn-action {
    min-height: 46px;
    padding: 6px 12px;
  }

  .btn-action-icon {
    width: 30px;
    height: 30px;
  }

  .story-wrapper {
    padding: 10px 18px;
  }

  .story-card {
    padding: 16px 20px;
    gap: 16px;
  }

  .story-illustration {
    min-height: 220px;
    padding: 10px 10px 26px;
  }

  .story-dialogue-content h2 {
    font-size: 1.4rem;
    margin-bottom: 6px;
  }

  .story-dialogue-content .story-lead {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }

  .story-mission-steps {
    gap: 6px;
    margin-bottom: 10px;
  }

  .mission-step-card {
    padding: 6px 12px;
  }

  .paint-stage {
    padding: 8px 16px 14px;
  }

  .paint-header {
    margin-bottom: 6px;
  }

  .paint-title-box {
    padding: 5px 16px;
  }

  .paint-workspace {
    gap: 20px;
  }

  .easel-container {
    padding: 10px 14px 18px;
  }
}

/* === MOBIL PORTRÆT & SMALLE SKÆRME (<= 680px) === */
@media (max-width: 680px) {
  .app-header {
    padding: 6px 12px;
  }

  .logo-bounce {
    font-size: 1.5rem;
  }

  .app-title {
    font-size: 1.1rem;
  }

  .btn-icon-label {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .level-top-bar {
    padding: 4px 10px;
  }

  .level-indicator-badge {
    font-size: 0.8rem;
    padding: 3px 10px;
  }

  /* Forside (Story Screen) på mobil */
  .story-wrapper {
    padding: 10px;
    align-items: flex-start;
  }

  .story-card {
    padding: 14px;
    gap: 14px;
  }

  .story-illustration {
    min-height: 210px;
    padding: 10px 8px 26px;
  }

  .story-bunny-hero {
    width: 120px;
    height: 130px;
  }

  .story-dialogue-content h2 {
    font-size: 1.35rem;
    margin-bottom: 6px;
  }

  .story-dialogue-content .story-lead {
    font-size: 0.88rem;
    margin-bottom: 10px;
  }

  .story-mission-steps {
    gap: 6px;
    margin-bottom: 12px;
  }

  .mission-step-card {
    padding: 7px 10px;
    gap: 9px;
  }

  /* Kompakt og touch-venligt kontrolpanel i bunden på mobil */
  .stealth-controls {
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    justify-content: space-between;
  }

  .dpad-container {
    gap: 2px;
    flex-shrink: 0;
  }

  .dpad-horizontal {
    gap: 2px;
  }

  .btn-dpad {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .dpad-center {
    width: 26px;
    height: 26px;
    font-size: 0.95rem;
  }

  .action-buttons-group {
    gap: 5px;
    flex: 1;
    min-width: 0;
  }

  .btn-action {
    flex-direction: column;
    min-height: 50px;
    padding: 5px 4px;
    gap: 3px;
    border-radius: 14px;
    border-width: 2.2px;
    min-width: 0;
  }

  .btn-action-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
  }

  .btn-action-icon svg {
    width: 15px;
    height: 15px;
  }

  .btn-action .btn-text {
    font-size: 0.74rem;
    text-align: center;
    line-height: 1.1;
  }

  .chase-controls {
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }

  .chase-controls .btn-action {
    flex-direction: row;
    min-height: 44px;
    padding: 6px 12px;
    gap: 8px;
  }

  .chase-controls .btn-action .btn-text {
    font-size: 0.92rem;
  }

  /* Male-værksted (Paint Studio) på mobil */
  .paint-stage {
    padding: 10px 10px 20px;
  }

  .paint-header {
    margin-bottom: 8px;
  }

  .paint-title-box {
    padding: 6px 16px;
    border-radius: 16px;
  }

  .paint-header h2 {
    font-size: 1.15rem;
  }

  .paint-header p {
    font-size: 0.78rem;
  }

  .paint-workspace {
    gap: 10px;
  }

  .artist-bunny-box {
    display: none;
  }

  .easel-container {
    padding: 8px 10px 16px;
  }

  .easel-back-svg {
    width: 245px;
    height: 332px;
  }

  .egg-canvas-wrapper {
    width: 200px;
    height: 272px;
  }

  .easel-ledge-svg {
    width: 242px;
    height: 48px;
    margin-top: -16px;
  }

  .paint-toolbox {
    padding: 12px;
    gap: 10px;
    border-radius: 18px;
  }

  .color-btn {
    width: 32px;
    height: 32px;
  }

  .sticker-btn {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }

  /* Sejrsskærm, Kurv & Modaler på mobil */
  .victory-container {
    padding: 10px;
    align-items: flex-start;
  }

  .victory-card {
    padding: 14px;
  }

  .victory-card h2 {
    font-size: 1.25rem;
  }

  .open-basket-container {
    padding: 10px;
    border-radius: 24px;
  }

  .basket-interior-bed {
    padding: 12px 8px;
    border-radius: 18px;
  }

  .modal-card {
    padding: 18px 14px;
  }

  .puzzle-modal-card {
    padding: 14px;
  }

  .quiz-question-text {
    font-size: 1.15rem;
  }

  .quiz-option-btn {
    padding: 9px 12px;
    font-size: 1rem;
  }

  /* 30-ægs fejrings-animation tilpasset mobilbredde */
  .full-basket-hop-stage:not(.christmas-tree-finale-stage) {
    height: 210px;
  }

  .hopping-bunny-actor {
    transform-origin: bottom center;
  }

  @keyframes bunny-hop-across-meadow {
    0%   { transform: translateX(4px) scale(0.78); }
    48%  { transform: translateX(calc(88vw - 175px)) scale(0.78); }
    52%  { transform: translateX(calc(88vw - 175px)) scale(-0.78, 0.78); }
    96%  { transform: translateX(4px) scale(-0.78, 0.78); }
    100% { transform: translateX(4px) scale(0.78); }
  }
}

/* === MOBIL LANDSKAB & LAVE SKÆRME (max-height: 560px) === */
@media (max-height: 560px) {
  .app-header {
    padding: 4px 12px;
  }

  .logo-bounce {
    font-size: 1.35rem;
  }

  .app-title {
    font-size: 1.05rem;
  }

  .btn-icon-label {
    padding: 4px 10px;
    font-size: 0.8rem;
  }

  .level-top-bar {
    padding: 2px 10px;
  }

  .level-indicator-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
  }

  .stealth-controls {
    padding: 4px 12px calc(4px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }

  .btn-dpad {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  .dpad-center {
    width: 22px;
    height: 22px;
    font-size: 0.85rem;
  }

  .btn-action {
    flex-direction: row;
    min-height: 36px;
    padding: 4px 8px;
    gap: 6px;
    border-radius: 12px;
  }

  .btn-action-icon {
    width: 22px;
    height: 22px;
  }

  .btn-action .btn-text {
    font-size: 0.8rem;
  }

  .chase-controls {
    padding: 4px 12px calc(4px + env(safe-area-inset-bottom, 0px));
  }

  .chase-controls .btn-action {
    min-height: 36px;
  }

  .cinema-viewport {
    height: 56vh;
    height: 56dvh;
  }
}







/* =========================================================
   NISSENS NØDSITUATION - JULEKUGLE & JULETRÆS-FINALE STYLES
   ========================================================= */

.bauble-canvas-wrapper {
  width: 300px !important;
  height: 300px !important;
  border-radius: 50% !important;
  overflow: visible !important;
  position: relative;
  margin-top: 34px;
}

.bauble-base-shape {
  border-radius: 50% !important;
}

.bauble-canvas-wrapper #egg-paint-canvas,
.bauble-canvas-wrapper .stickers-layer,
.bauble-canvas-wrapper .glitter-layer {
  border-radius: 50% !important;
  overflow: hidden;
}

.bauble-canvas-wrapper #egg-paint-canvas {
  width: 300px;
  height: 300px;
}

.bauble-cap-top {
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  width: 68px;
  height: 44px;
  z-index: 6;
  pointer-events: none;
}

/* Slutscene: Nissen pynter juletræet, og træet tænder og lyser op */
.christmas-tree-finale-stage {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 760 / 280;
  overflow: hidden;
  border-radius: 18px;
  border: 3px solid #1E293B;
}

.tree-baubles-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.tree-hung-bauble {
  position: absolute;
  width: 2.7%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 50%;
  border: 2px solid #1E293B;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  animation: baubleHangPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.christmas-tree-finale-stage.tree-lit-up .tree-hung-bauble {
  box-shadow:
    0 0 10px 3px rgba(254, 240, 138, 0.92),
    0 0 22px 7px rgba(251, 191, 36, 0.55);
  filter: brightness(1.18);
  transition: box-shadow 0.8s ease, filter 0.8s ease;
}

@keyframes baubleHangPop {
  0% {
    transform: translate(-50%, -80%) scale(0.2);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.tree-lights-layer {
  opacity: 0;
  transition: opacity 1s ease;
}

.christmas-tree-finale-stage.tree-lit-up .tree-lights-layer {
  opacity: 1;
}

.christmas-tree-finale-stage.tree-lit-up .tree-top-star {
  filter: drop-shadow(0 0 14px #FDE047);
}

.tree-decorating-elf {
  position: absolute;
  left: 14%;
  bottom: 3.5%;
  width: 15%;
  aspect-ratio: 112 / 142;
  height: auto;
  z-index: 6;
  pointer-events: none;
  transition: left 0.6s ease;
}

.christmas-tree-finale-stage.tree-lit-up .tree-decorating-elf {
  animation: elfHappyTreeDance 7.5s ease-in-out infinite;
}

.christmas-tree-finale-stage.tree-lit-up .tree-decorating-elf .bunny-svg {
  animation: elfHappyHop 0.56s ease-in-out infinite alternate;
}

.christmas-tree-finale-stage.tree-lit-up .tree-decorating-elf .bunny-leg-left {
  animation: elfClogStepL 0.56s ease-in-out infinite;
}

.christmas-tree-finale-stage.tree-lit-up .tree-decorating-elf .bunny-leg-right {
  animation: elfClogStepR 0.56s ease-in-out infinite;
}

.christmas-tree-finale-stage.tree-lit-up .tree-decorating-elf .bunny-arm-left {
  animation: elfClogArmL 0.56s ease-in-out infinite;
}

.christmas-tree-finale-stage.tree-lit-up .tree-decorating-elf .bunny-arm-right {
  animation: elfClogArmR 0.56s ease-in-out infinite;
}

@keyframes elfHappyTreeDance {
  0%   { left: 10%; transform: scaleX(1) rotate(-1.5deg); }
  22%  { left: 36%; transform: scaleX(1) rotate(1.5deg); }
  46%  { left: 68%; transform: scaleX(1) rotate(-1.5deg); }
  50%  { left: 68%; transform: scaleX(-1) rotate(-1.5deg); }
  74%  { left: 36%; transform: scaleX(-1) rotate(1.5deg); }
  96%  { left: 10%; transform: scaleX(-1) rotate(-1.5deg); }
  100% { left: 10%; transform: scaleX(1) rotate(-1.5deg); }
}

@keyframes elfHappyHop {
  0%   { transform: translateY(1px) rotate(-1.5deg); }
  100% { transform: translateY(-5px) rotate(1.5deg); }
}

/* Nisse-træskodans: skiftevis løft og stamp i benene, mens armene svinger lavt ved hoften */
@keyframes elfClogStepL {
  0%, 100% { transform: translateY(1px) rotate(-3deg); }
  35%      { transform: translateY(-8px) rotate(16deg); }
  65%      { transform: translateY(2px) rotate(-5deg); }
}

@keyframes elfClogStepR {
  0%, 100% { transform: translateY(-8px) rotate(-16deg); }
  35%      { transform: translateY(2px) rotate(5deg); }
  65%      { transform: translateY(1px) rotate(3deg); }
}

@keyframes elfClogArmL {
  0%, 100% { transform: rotate(-14deg) translateY(0px); }
  50%      { transform: rotate(12deg) translateY(2px); }
}

@keyframes elfClogArmR {
  0%, 100% { transform: rotate(-12deg) translateY(2px); }
  50%      { transform: rotate(14deg) translateY(0px); }
}

.tree-finale-caption {
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: #1E293B;
  margin: 12px 0 6px;
  text-align: center;
}
