:root {
  --top-nav-offset: 0px;
  --glass-bg: rgba(255, 253, 248, 0.78);
  --glass-bg-strong: rgba(255, 253, 250, 0.90);
  --glass-border: rgba(255, 255, 255, 0.86);
  --glass-gold-rim: rgba(235, 185, 86, 0.52);
  --glass-shadow: 0 12px 32px rgba(24, 18, 12, 0.16), 0 2px 8px rgba(24, 18, 12, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --cream-card: #FFFDF9;
  --wood-dark: #2C1E14;
  --wood-mid: #6E5038;
  --wood-light: #C89666;
  --meadow-green: #3D8B40;
  --meadow-bright: #5AB552;
  --accent-amber: #F59E0B;
  --accent-coral: #F43F5E;
  --accent-teal: #0D9488;
  --text-main: #231810;
  --text-muted: #645142;
}

body.has-site-header {
  --top-nav-offset: 56px;
}

/* Standalone jaclynkonzelmann.com Site Header (shown when opened via direct URL) */
#site-top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  z-index: 60;
  display: none;
  flex-direction: column;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}
body.has-site-header #site-top-header {
  display: flex;
}
.site-top-rule {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #FF7235 0%, #FF5E7E 48%, #FF4D6D 100%);
  flex-shrink: 0;
}
.site-top-inner {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.25rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-top-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.site-brand-logo {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-brand-logo:hover {
  color: #FF5E7E;
}
.site-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  background: #FFF5F7;
  border: 1.5px solid #FF5E7E;
  color: #D92B52;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.16s ease;
}
.site-back-pill:hover {
  background: #FF5E7E;
  color: #FFFFFF;
  transform: translateY(-1px);
}
.site-top-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}
.site-top-link {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #6B7280;
  text-decoration: none;
  transition: color 0.18s ease;
}
.site-top-link:hover,
.site-top-link.active {
  color: #FF5E7E;
}
.site-share-btn {
  appearance: none;
  border: 1.5px solid #E5E7EB;
  background: #111827;
  color: #FFFFFF;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.site-share-btn:hover {
  background: #FF5E7E;
  border-color: #FF5E7E;
  transform: translateY(-1px);
}
@media (max-width: 760px) {
  .site-top-link.hide-sm {
    display: none;
  }
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Inter", "Nunito", "Quicksand", "Avenir Next", -apple-system, BlinkMacSystemFont, sans-serif;
  background: #87CEEB;
  color: var(--text-main);
}

#canvas-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  cursor: grab;
}
#canvas-container.hovering-animal {
  cursor: pointer;
}
#canvas-container:active {
  cursor: grabbing;
}

/* =========================================================================
   FLOATING 3D WORLD LABELS (WHISPER-LIGHT LUMINOUS PEARL PILLS)
   ========================================================================= */
#labels-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.animal-world-label {
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(255, 254, 250, 0.80);
  backdrop-filter: blur(12px) saturate(165%);
  -webkit-backdrop-filter: blur(12px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 6px 18px rgba(18, 24, 32, 0.14),
    0 1px 3px rgba(18, 24, 32, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 3px 10px 3px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1F2937;
  pointer-events: auto;
  cursor: pointer;
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.25s ease;
  white-space: nowrap;
}
.animal-world-label.distant-pill {
  opacity: 0.55;
  transform: translate(-50%, -100%) scale(0.88);
}
.animal-world-label .label-top-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.animal-world-label:hover,
.animal-world-label.nearby {
  opacity: 1 !important;
  transform: translate(-50%, -106%) scale(1.04);
  background: rgba(255, 253, 246, 0.96);
  border-radius: 18px;
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow:
    0 12px 28px rgba(24, 18, 12, 0.22),
    0 0 0 2px rgba(251, 191, 36, 0.28),
    inset 0 1px 0 #FFFFFF;
  padding: 5px 11px 6px 8px;
  z-index: 8;
}
.animal-world-label .badge-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  background: #F4E8D1;
}
.animal-world-label .visited-check {
  color: #10B981;
  font-size: 12px;
  font-weight: 900;
  margin-left: 1px;
}
.animal-world-label .parade-tag {
  font-size: 9.5px;
  background: linear-gradient(135deg, #F43F5E, #E11D48);
  color: #FFF;
  padding: 1.5px 6px;
  border-radius: 999px;
  font-weight: 800;
  display: none;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.3);
}
.animal-world-label.following .parade-tag {
  display: inline-block;
}

/* Floating Action Buttons ("💬 Talk", "🪢 Walk", "🏇 Ride", "🌊 Dive") */
.animal-world-label .label-action-row {
  display: none;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  padding-top: 4px;
  border-top: 1px solid rgba(180, 140, 95, 0.18);
}
.animal-world-label.nearby .label-action-row,
.animal-world-label:hover .label-action-row {
  display: flex;
}
.lbl-float-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 3.5px 10px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.16);
  line-height: 1.15;
}
.lbl-float-btn:hover {
  transform: translateY(-1.5px) scale(1.06);
  filter: brightness(1.07);
}
.lbl-float-btn:active {
  transform: translateY(0) scale(0.97);
}
.lbl-float-btn.talk-btn {
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: #FFFFFF;
}
.lbl-float-btn.ride-btn {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  color: #FFFFFF;
}
.lbl-float-btn.swim-btn {
  background: linear-gradient(135deg, #06B6D4, #2563EB);
  color: #FFFFFF;
}
.lbl-float-btn.walk-btn {
  background: linear-gradient(135deg, #F43F5E, #DB2777);
  color: #FFFFFF;
}
.lbl-float-btn.walk-btn.following {
  background: linear-gradient(135deg, #22C55E, #15803D);
  color: #FFFFFF;
}

/* =========================================================================
   TOP HUD BAR (SLEEK FROSTED-GLASS CAPSULES)
   ========================================================================= */
.hud-top {
  position: fixed;
  top: calc(var(--top-nav-offset, 0px) + 12px);
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  z-index: 10;
  pointer-events: none;
}

.hud-left-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.foraging-basket-bar {
  pointer-events: auto;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1.5px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px 6px 4px 10px;
  box-shadow: var(--glass-shadow);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  color: #2C1E14;
  letter-spacing: -0.01em;
  padding: 2px 4px;
}

/* Exploding Adventure Pack Trigger & Popover */
.adventure-pack-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FFFBEB 0%, #FDE68A 100%);
  border: 1px solid rgba(217, 119, 6, 0.42);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  color: #451A03;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.18), inset 0 1px 0 #FFFFFF;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease;
}
.adventure-pack-trigger:hover {
  transform: translateY(-1.5px) scale(1.03);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.28), inset 0 1px 0 #FFFFFF;
}
.adventure-pack-trigger.open {
  background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 100%);
  color: #290F02;
}
.pack-backpack-icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sticker-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 3px rgba(34, 24, 16, 0.22));
  flex-shrink: 0;
}
.sticker-inline {
  width: 19px;
  height: 19px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 1px 2px rgba(34, 24, 16, 0.18));
  flex-shrink: 0;
}
.sticker-btn {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.25));
  flex-shrink: 0;
}
.sticker-lg {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: inline-block;
  filter: drop-shadow(0 4px 8px rgba(34, 24, 16, 0.25));
}
.sticker-tile {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 3px 5px rgba(34, 24, 16, 0.20));
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pack-burst-item:hover .sticker-tile {
  transform: scale(1.12) rotate(-4deg);
}
.adventure-pack-trigger:hover .pack-backpack-icon,
.adventure-pack-trigger.open .pack-backpack-icon {
  transform: rotate(-10deg) scale(1.16);
}
.pack-total-badge {
  background: linear-gradient(135deg, #C94A3E, #A3352B);
  color: #FFF;
  font-size: 11px;
  font-weight: 800;
  padding: 1.5px 7px;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(163, 53, 43, 0.3);
}

.adventure-pack-popover {
  display: none;
  margin-top: 4px;
  background: rgba(250, 246, 236, 0.96);
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  border: 1.5px solid rgba(226, 201, 173, 0.85);
  border-radius: 24px;
  padding: 14px 16px 16px;
  box-shadow: 0 22px 48px rgba(24, 18, 12, 0.24), inset 0 1px 0 #FFFFFF;
  pointer-events: auto;
  max-width: 468px;
  transform-origin: top left;
  animation: packPopoverZoom 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.adventure-pack-popover.open {
  display: block;
}
@keyframes packPopoverZoom {
  0% { opacity: 0; transform: scale(0.45) translate(-20px, -20px); }
  100% { opacity: 1; transform: scale(1) translate(0, 0); }
}
.pack-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--wood-dark);
  margin-bottom: 11px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(158, 107, 67, 0.22);
}
.pack-popover-header small {
  font-weight: 600;
  color: var(--text-muted);
}
.pack-close-btn {
  appearance: none;
  border: 1px solid rgba(158, 107, 67, 0.35);
  background: rgba(255, 255, 255, 0.85);
  color: var(--wood-dark);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}
.pack-close-btn:hover {
  background: #FFF;
  transform: scale(1.08);
}
.pack-burst-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.basket-pill {
  appearance: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 252, 245, 0.92);
  border: 1px solid rgba(226, 201, 173, 0.78);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--wood-dark);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.basket-pill.eat-pill {
  cursor: pointer;
}
.basket-pill.eat-pill:hover {
  background: #FFFDF8;
  border-color: rgba(229, 154, 56, 0.75);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 14px rgba(229, 154, 56, 0.18);
}
.basket-pill.eat-pill:active {
  transform: translateY(0) scale(0.96);
}
.basket-pill.quest-pill {
  background: linear-gradient(180deg, #FFFBEB, #FEF3C7);
  border-color: rgba(229, 154, 56, 0.52);
  color: #78350F;
  cursor: pointer;
}
.basket-pill.pop {
  transform: scale(1.22);
  background: #FDE68A;
}
.pack-burst-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px 7px !important;
  border-radius: 16px !important;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(226, 201, 173, 0.75);
  box-shadow: 0 4px 12px rgba(34, 24, 16, 0.07), inset 0 1px 0 #FFFFFF;
  opacity: 0;
  transform: scale(0.2) translateY(-18px);
  animation: packItemExplode 0.36s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--burst-i, 0) * 0.025s);
}
@keyframes packItemExplode {
  0% { opacity: 0; transform: scale(0.2) translate(-16px, -18px) rotate(-10deg); }
  70% { opacity: 1; transform: scale(1.06) translate(0, 0) rotate(1.5deg); }
  100% { opacity: 1; transform: scale(1) translate(0, 0) rotate(0deg); }
}
.pack-burst-item .burst-emoji {
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}
.pack-burst-item .burst-name {
  font-size: 10px;
  font-weight: 700;
  color: #5C4634;
}
.pack-burst-item strong {
  font-size: 11px;
  font-weight: 800;
  color: #451A03;
  background: rgba(229, 154, 56, 0.24);
  padding: 1px 7px;
  border-radius: 999px;
}

/* =========================================================================
   CELEBRATORY TOAST BANNER (SLEEK FLOATING GLASS PILL)
   ========================================================================= */
#easter-egg-toast {
  position: fixed;
  top: calc(var(--top-nav-offset, 0px) + 58px);
  left: 50%;
  transform: translateX(-50%) translateY(-18px) scale(0.95);
  background: rgba(255, 252, 240, 0.90);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1.5px solid rgba(251, 191, 36, 0.72);
  border-radius: 999px;
  padding: 7px 18px;
  box-shadow: 0 12px 32px rgba(24, 18, 12, 0.18), inset 0 1px 0 #FFFFFF;
  font-size: 12.5px;
  font-weight: 800;
  color: #451A03;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}
#easter-egg-toast.show,
#easter-egg-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* =========================================================================
   TOP RIGHT UNIFIED CAPSULE DOCK + DRAWERS
   ========================================================================= */
.hud-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}

body.has-site-header #btn-back-site,
body.has-site-header #btn-share-zoo {
  display: none;
}

.audio-controls-bar {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1.5px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px 6px;
  box-shadow: var(--glass-shadow);
}

.capsule-sep {
  width: 1px;
  height: 15px;
  background: rgba(120, 100, 80, 0.20);
  margin: 0 1px;
}

.hud-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #1F2937;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.16s ease;
}
.hud-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.hud-btn.menu-pill-btn {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.92), rgba(253, 230, 138, 0.92));
  border-color: rgba(217, 119, 6, 0.35);
  color: #451A03;
  font-weight: 800;
}
.hud-btn.active {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.28);
}
.hud-btn.rain-on {
  background: linear-gradient(135deg, #38BDF8, #2563EB);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}
.hud-btn.disco-on {
  background: linear-gradient(135deg, #EC4899, #8B5CF6);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 3px 12px rgba(139, 92, 246, 0.35);
}
.hud-btn.exit-pill-btn {
  background: rgba(255, 241, 242, 0.9);
  border-color: rgba(244, 63, 94, 0.35);
  color: #BE123C;
}
.hud-btn.reset-pill-btn {
  background: rgba(254, 242, 242, 0.88);
  border-color: rgba(249, 115, 22, 0.35);
  color: #9A3412;
  font-weight: 800;
}
.hud-btn.reset-pill-btn:hover {
  background: rgba(255, 237, 213, 0.96);
  border-color: rgba(234, 88, 12, 0.65);
  color: #7C2D12;
}

.toybox-dock {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  border: 1.5px solid var(--glass-border);
  border-radius: 22px;
  padding: 10px 11px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18), inset 0 1px 0 #FFFFFF;
  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 360px;
  gap: 6px;
  animation: drawerFadeIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.toybox-dock .hud-btn {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.05);
}
.toybox-dock .hud-btn:hover {
  background: #FFFBEB;
  border-color: rgba(245, 158, 11, 0.5);
}
.toybox-dock .hud-btn.active {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.28);
}
.toybox-dock.open {
  display: flex;
}

@keyframes drawerFadeIn {
  0% { opacity: 0; transform: translateY(-6px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Collapsible Animal Passport Drawer */
.passport-dock {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  border: 1.5px solid var(--glass-border);
  border-radius: 22px;
  padding: 10px 12px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18), inset 0 1px 0 #FFFFFF;
  display: none;
  align-items: center;
  gap: 8px;
  animation: drawerFadeIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.passport-dock.open {
  display: flex;
}
.passport-label {
  display: none;
}
.passport-avatars {
  display: flex;
  flex-wrap: wrap;
  max-width: 288px;
  justify-content: flex-end;
  gap: 5px;
}
.passport-chip {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  cursor: pointer;
  background: #F4E8D1;
  padding: 0;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.passport-chip:hover {
  transform: translateY(-3px) scale(1.08);
  border-color: var(--accent-amber);
  box-shadow: 0 6px 12px rgba(245, 158, 11, 0.25);
}
.passport-chip.visited {
  border-color: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}
.passport-chip.fav-fed {
  border-color: #F59E0B;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.45);
}
.passport-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.passport-chip .check-dot {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10B981;
  color: #FFF;
  font-size: 8.5px;
  display: none;
  place-items: center;
  font-weight: 900;
}
.passport-chip.visited .check-dot {
  display: grid;
}
.passport-chip .star-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #F59E0B;
  color: #FFF;
  font-size: 8.5px;
  display: none;
  place-items: center;
  font-weight: 900;
}
.passport-chip.fav-fed .star-dot {
  display: grid;
}

/* =========================================================================
   BOTTOM CONTROLS & ZELDA MINIMAP RADAR
   ========================================================================= */
.hud-bottom {
  position: fixed;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 10;
  pointer-events: none;
}

.controls-dock-wrap {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.controls-toggle-btn {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1.5px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow);
}

.controls-legend {
  pointer-events: auto;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1.5px solid var(--glass-border);
  border-radius: 18px;
  padding: 8px 14px;
  box-shadow: var(--glass-shadow);
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #1F2937;
}
.controls-legend.open {
  display: flex;
}

.key-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

kbd {
  display: inline-block;
  background: #FFFFFF;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-bottom-width: 2.5px;
  border-radius: 6px;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  color: #1F2937;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Zelda-Style Circular Radar / Minimap in Lower-Right Corner */
.zelda-minimap-wrap {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.minimap-header-row {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 2.5px 4px 2.5px 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.minimap-zone-pill {
  color: #FEF08A;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.minimap-zoom-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  color: #FFFFFF;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.minimap-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.zelda-minimap-circle {
  position: relative;
  width: 154px;
  height: 154px;
  border-radius: 50%;
  border: 2.5px solid rgba(253, 224, 71, 0.85);
  outline: 4px solid rgba(255, 255, 255, 0.28);
  background: #1B3B2B;
  box-shadow:
    0 14px 34px rgba(15, 23, 42, 0.36),
    inset 0 0 14px rgba(10, 22, 14, 0.55);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.zelda-minimap-circle:hover {
  transform: scale(1.03);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.45),
    inset 0 0 14px rgba(10, 22, 14, 0.55);
}

#zelda-minimap-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.compass-dir {
  position: absolute;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(6px);
  color: #FEF08A;
  border: 1px solid rgba(253, 224, 71, 0.65);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  padding: 1.5px 5.5px;
  line-height: 1.2;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}
.compass-n {
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 83, 45, 0.92);
  color: #D9F99D;
}
.compass-s {
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 116, 144, 0.92);
  color: #A5F3FC;
}
.compass-w {
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
}
.compass-e {
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
}

#proximity-prompt {
  display: none !important;
}

/* =========================================================================
   STORYBOOK ANIMAL CARD (WILD BOTANICAL GOUACHE & 3-WAVE ORGANIC DIVIDER)
   ========================================================================= */
#fact-panel {
  --card-accent: #C94A3E;
  --card-bg-tint: #FAF6EC;
  --card-dark: #2C1E14;
  position: fixed;
  top: calc(var(--top-nav-offset, 0px) + 58px);
  right: 14px;
  width: min(322px, calc(100vw - 28px));
  max-height: calc(100vh - var(--top-nav-offset, 0px) - 118px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #FAF6EC;
  border: 2px solid rgba(255, 252, 244, 0.96);
  border-radius: 26px;
  box-shadow:
    0 24px 54px rgba(24, 18, 12, 0.30),
    0 0 0 1px rgba(158, 107, 67, 0.32),
    inset 0 1px 0 #FFFFFF;
  padding: 0;
  z-index: 25;
  transform: translateX(360px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.30s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease;
}
#fact-panel.open {
  transform: translateX(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.card-top-foil,
.card-temperament-sub,
.nano-badge,
.size-compare-pill,
.trait-meters,
.personality-badges,
.bio-row-origin {
  display: none !important;
}

/* Full-Bleed Wild Naturalist Illustration Hero Banner */
.card-hero-banner {
  position: relative;
  width: 100%;
  height: 196px;
  overflow: hidden;
  background: #3D6B78;
}
.card-hero-banner .nano-img-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
}
.card-hero-banner #card-nano-img,
.card-hero-banner .nano-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
}
.card-fav-treat-float {
  position: absolute;
  bottom: 24px;
  right: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(250, 246, 236, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 201, 173, 0.9);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  color: #2C1E14;
  box-shadow: 0 4px 12px rgba(24, 18, 12, 0.22);
}
.card-fav-treat-float img#card-treat-sticker {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
}
.card-fav-treat-float strong {
  color: #8C583A;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 3px;
}
.card-wave-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 28px;
  display: block;
  z-index: 3;
  pointer-events: none;
}

.close-panel-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(34, 24, 16, 0.52);
  backdrop-filter: blur(8px);
  color: #FAF6EC;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.14s ease, background 0.14s ease;
}
.close-panel-btn:hover {
  background: rgba(34, 24, 16, 0.78);
  transform: scale(1.08);
}

.card-body-sandstone {
  padding: 6px 14px 14px;
  background: #FAF6EC;
}

.fact-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.fact-title-wrap .species-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2.5px 9px;
  border-radius: 999px;
  background: #386B52;
  color: #FAF6EC;
  margin-bottom: 3px;
}
.fact-title-wrap h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #2C1E14;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.tts-fact-box {
  background: rgba(242, 227, 206, 0.55);
  border: 1px solid rgba(158, 107, 67, 0.28);
  border-radius: 16px;
  padding: 10px 12px 13px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.tts-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.tts-model-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  color: #386B52;
  background: rgba(56, 107, 82, 0.14);
  padding: 2.5px 8px;
  border-radius: 999px;
}
.voice-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 13px;
}
.voice-bars span {
  width: 3px;
  height: 4px;
  background: #386B52;
  border-radius: 2px;
  transition: height 0.1s ease;
}
.voice-bars.speaking span:nth-child(1) { animation: vbar 0.45s infinite ease-in-out 0.0s; }
.voice-bars.speaking span:nth-child(2) { animation: vbar 0.45s infinite ease-in-out 0.12s; }
.voice-bars.speaking span:nth-child(3) { animation: vbar 0.45s infinite ease-in-out 0.24s; }
.voice-bars.speaking span:nth-child(4) { animation: vbar 0.45s infinite ease-in-out 0.08s; }

@keyframes vbar {
  0%, 100% { height: 4px; }
  50% { height: 13px; }
}

.fact-counter-dots {
  display: flex;
  gap: 4px;
}
.fact-dot {
  padding: 0 7px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(56, 107, 82, 0.35);
  background: #FAF6EC;
  color: #386B52;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}
.fact-dot.active {
  background: #386B52;
  color: #FAF6EC;
}

#fact-text {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
  color: #2C1E14;
  min-height: 44px;
}
.k-word {
  transition: color 0.12s ease, background-color 0.12s ease;
  border-radius: 4px;
  padding: 0 1px;
}
.k-word.spoken {
  color: #386B52;
}
.k-word.current {
  background: #F0C265;
  color: #2C1E14;
}

.tts-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(56, 107, 82, 0.14);
}
.tts-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #386B52, #689B6D);
  transition: width 0.1s linear;
}

.fact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.action-btn {
  appearance: none;
  border: 1px solid rgba(255, 252, 244, 0.55);
  border-radius: 12px;
  padding: 8px 6px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 0.14s ease, filter 0.14s ease;
  text-align: center;
  line-height: 1.15;
  box-shadow: 0 3px 10px rgba(34, 24, 16, 0.15);
}
.action-btn:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.06);
}
.action-btn:active {
  transform: translateY(0);
}
.action-btn.primary-tts {
  background: linear-gradient(135deg, #386B52, #2A5440);
  color: #FAF6EC;
}
.action-btn.treat-btn {
  background: linear-gradient(135deg, #E59A38, #C87D20);
  color: #2C1E14;
}
.action-btn.ride-btn {
  background: linear-gradient(135deg, #9E6B43, #7D5130);
  color: #FAF6EC;
}
.action-btn.ride-btn.riding {
  background: linear-gradient(135deg, #E59A38, #B46B14);
  color: #2C1E14;
}
.action-btn.follow-btn {
  background: linear-gradient(135deg, #C94A3E, #A3352B);
  color: #FAF6EC;
}
.action-btn.follow-btn.following {
  background: linear-gradient(135deg, #22C55E, #15803D);
}

/* =========================================================================
   5-MINUTE COIN DASH MINI-GAME HUD BANNER
   ========================================================================= */
.coin-dash-hud {
  position: fixed;
  top: calc(var(--top-nav-offset, 0px) + 58px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  background: rgba(255, 251, 235, 0.90);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1.5px solid rgba(245, 158, 11, 0.65);
  border-radius: 999px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 30px rgba(180, 83, 9, 0.24), inset 0 1px 0 #FFFFFF;
  font-weight: 800;
  color: #78350F;
  pointer-events: auto;
}
.coin-dash-hud[hidden] {
  display: none !important;
}
.coin-dash-badge {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFF;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.coin-dash-timer {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: #92400E;
}
.coin-dash-score {
  font-size: 14px;
  background: #FFFFFF;
  padding: 2.5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 119, 6, 0.45);
}
.coin-dash-cancel-btn {
  appearance: none;
  border: 1px solid rgba(146, 64, 14, 0.35);
  background: #FFF;
  color: #92400E;
  border-radius: 999px;
  padding: 3px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

/* =========================================================================
   SPOKEN FAIRY POD MODAL (SLEEK AUTO-DISMISSING FROSTED STORYBOOK BANNER)
   ========================================================================= */
.fairy-pod-modal {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 36;
  background: rgba(255, 253, 252, 0.88);
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  border: 1.5px solid rgba(255, 255, 255, 0.94);
  border-radius: 24px;
  padding: 13px 16px 14px;
  width: min(410px, calc(100vw - 28px));
  box-shadow:
    0 20px 48px rgba(88, 28, 135, 0.22),
    0 0 0 1px rgba(192, 132, 252, 0.45),
    inset 0 1px 0 #FFFFFF;
  pointer-events: auto;
  animation: fairyPodPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fairy-pod-modal[hidden] {
  display: none !important;
}
@keyframes fairyPodPop {
  0% { opacity: 0; transform: translateX(-50%) scale(0.86) translateY(18px); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}
.fairy-pod-header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 8px;
}
.fairy-pod-icon {
  font-size: 26px;
  line-height: 1;
  background: linear-gradient(135deg, #FAF5FF, #FCE7F3);
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(192, 132, 252, 0.55);
  box-shadow: 0 4px 10px rgba(147, 51, 234, 0.12), inset 0 1px 0 #FFFFFF;
}
.fairy-pod-title-wrap {
  flex: 1;
  min-width: 0;
}
.fairy-pod-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7E22CE;
  background: rgba(168, 85, 247, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}
.fairy-pod-title-wrap h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: #3B0764;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fairy-pod-close {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.85);
  color: #581C87;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}
.fairy-pod-close:hover {
  background: #FFFFFF;
  transform: scale(1.08);
}
.fairy-pod-desc {
  font-size: 13px;
  line-height: 1.44;
  font-weight: 600;
  color: #3B0764;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px 11px;
  border-radius: 13px;
  border: 1px solid rgba(192, 132, 252, 0.25);
  margin-bottom: 9px;
}
.fairy-pod-actions {
  display: flex;
  gap: 8px;
}
.fairy-pod-btn {
  flex: 1;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.fairy-pod-btn:hover {
  transform: translateY(-1.5px);
}
.fairy-pod-btn.replay-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(192, 132, 252, 0.45);
  color: #6B21A8;
  flex: 0.65;
}
.fairy-pod-btn.play-btn {
  background: linear-gradient(135deg, #EC4899, #8B5CF6);
  color: #FFF;
  box-shadow: 0 5px 14px rgba(139, 92, 246, 0.32);
}

/* Floating 3D Fairy Pod World Marker ("🧚‍♀️❓") */
.fairy-pod-world-label {
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(253, 244, 255, 0.86);
  backdrop-filter: blur(12px) saturate(165%);
  -webkit-backdrop-filter: blur(12px) saturate(165%);
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 3.5px 11px;
  font-size: 11.5px;
  font-weight: 800;
  color: #581C87;
  box-shadow: 0 6px 18px rgba(147, 51, 234, 0.22), inset 0 1px 0 #FFFFFF;
  pointer-events: auto;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.25s ease;
}
.fairy-pod-world-label:hover,
.fairy-pod-world-label.nearby {
  transform: translate(-50%, -108%) scale(1.08);
  background: rgba(252, 231, 243, 0.96);
  border-color: rgba(236, 72, 153, 0.75);
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.35);
  z-index: 9;
}

/* =========================================================================
   WONDER GIRLS OPENING CINEMATIC SEQUENCE & WELCOME DIALOG
   ========================================================================= */
dialog#welcome-dialog.wonder-girls-cinematic-dialog {
  margin: auto auto 28px auto;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  background: rgba(255, 253, 250, 0.88);
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  color: var(--text-main);
  max-width: 610px;
  width: calc(100vw - 32px);
  padding: 20px 24px;
  box-shadow:
    0 28px 72px rgba(15, 23, 42, 0.42),
    0 0 0 1px rgba(245, 158, 11, 0.35),
    inset 0 1px 0 #FFFFFF;
  text-align: center;
}
dialog#welcome-dialog::backdrop {
  background: linear-gradient(180deg, rgba(16, 24, 38, 0.08) 0%, rgba(16, 24, 38, 0.32) 100%);
  backdrop-filter: none;
}
.cinematic-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.cinematic-sparkle-pill {
  background: linear-gradient(135deg, #EC4899, #8B5CF6);
  color: #FFF;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(236, 72, 153, 0.3);
}
.cinematic-camera-pill {
  background: rgba(31, 41, 55, 0.82);
  color: #FEF08A;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
}
.wonder-girls-hero-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 35px;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin: 2px 0 4px;
  background: linear-gradient(135deg, #B45309 0%, #EC4899 50%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wonder-girls-subtitle {
  font-size: 14.5px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 6px;
}
.wonder-girls-desc {
  font-size: 13px;
  line-height: 1.48;
  color: #4B5563;
  margin-bottom: 10px;
}
.welcome-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 10px 0 14px;
}
.welcome-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #FFFFFF;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}
.cinematic-action-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.cinematic-voice-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFF;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 800;
  padding: 13px 18px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.28);
  transition: transform 0.15s ease;
}
.cinematic-voice-btn:hover {
  transform: translateY(-2px);
}
.start-zoo-btn {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: #FFF;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 800;
  padding: 13px 20px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.3);
  transition: transform 0.15s ease;
}
.start-zoo-btn:hover {
  transform: translateY(-2px);
}

@media (max-width: 820px) {
  #fact-panel {
    top: auto;
    bottom: 68px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: 52vh;
  }
  .brand-tags { display: none; }
  .pack-burst-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Ophelia's In-Game Voice, Screenshot & 10s Video Feedback Studio
   ========================================================================== */
.bottom-left-btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.ophelia-feedback-fab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FAF6EC 0%, #F2E3CE 100%);
  color: #3E2718;
  border: 2.5px solid #C94A3E;
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(62, 39, 24, 0.25), 0 0 0 3px rgba(250, 246, 236, 0.78);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.ophelia-feedback-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 24px rgba(201, 74, 62, 0.35), 0 0 0 3px #FAF6EC;
}
.feedback-q-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C94A3E 0%, #E59A38 100%);
  color: #FAF6EC;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(201, 74, 62, 0.38);
}
.feedback-saved-pill {
  background: #386B52;
  color: #FAF6EC;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.ophelia-feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(34, 24, 16, 0.48);
  backdrop-filter: blur(4px);
}
.ophelia-feedback-modal[hidden] {
  display: none !important;
}
.feedback-studio-card {
  position: relative;
  width: min(640px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #FAF6EC;
  border: 3px solid #D8C3A5;
  border-radius: 26px;
  padding: 20px 22px;
  box-shadow: 0 24px 56px rgba(34, 24, 16, 0.38);
  color: #3E2718;
}
.feedback-studio-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.feedback-studio-q-crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C94A3E 0%, #E59A38 100%);
  color: #FAF6EC;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 26px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(201, 74, 62, 0.35);
}
.feedback-studio-title-wrap h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 2px;
  color: #3E2718;
}
.feedback-studio-title-wrap p {
  font-size: 13px;
  color: #6E5039;
  margin: 0;
  font-weight: 600;
}

.feedback-mic-stage {
  background: linear-gradient(180deg, #F3E7D3 0%, #EAD7BC 100%);
  border: 2px solid #D8C3A5;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 12px;
  text-align: center;
}
.feedback-mic-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.mic-pulse-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #C94A3E;
  box-shadow: 0 0 0 4px rgba(201, 74, 62, 0.28);
  animation: micPulseGlow 1.1s infinite ease-in-out;
}
.mic-pulse-dot.saved {
  background: #386B52;
  box-shadow: 0 0 0 4px rgba(56, 107, 82, 0.25);
  animation: none;
}
@keyframes micPulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.28); opacity: 0.75; }
}
.mic-status-label {
  font-size: 15px;
  font-weight: 800;
  color: #3E2718;
}
.mic-timer-pill {
  background: #3E2718;
  color: #FAF6EC;
  font-size: 12.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.mic-wave-bars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
}
.mic-wave-bars span {
  width: 4px;
  height: 12px;
  border-radius: 99px;
  background: #C94A3E;
  animation: micBarBounce 0.65s infinite ease-in-out alternate;
}
.mic-wave-bars span:nth-child(2) { animation-delay: 0.12s; height: 16px; }
.mic-wave-bars span:nth-child(3) { animation-delay: 0.24s; height: 10px; }
.mic-wave-bars span:nth-child(4) { animation-delay: 0.36s; height: 18px; }
.mic-wave-bars span:nth-child(5) { animation-delay: 0.18s; height: 14px; }
.mic-wave-bars span:nth-child(6) { animation-delay: 0.30s; height: 9px; }
.mic-wave-bars.stopped span {
  animation: none;
  height: 5px;
  background: #8C735B;
}
@keyframes micBarBounce {
  0% { transform: scaleY(0.45); }
  100% { transform: scaleY(1.25); }
}

.feedback-stop-giant-btn {
  appearance: none;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 16px;
  border: 2px solid #FAF6EC;
  background: linear-gradient(135deg, #C94A3E 0%, #A9352B 100%);
  color: #FAF6EC;
  font-family: inherit;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(201, 74, 62, 0.38);
  transition: transform 0.14s ease, background 0.14s ease;
}
.feedback-stop-giant-btn:hover {
  transform: translateY(-2px);
}
.feedback-stop-giant-btn.done-state {
  background: linear-gradient(135deg, #386B52 0%, #2B5440 100%);
  box-shadow: 0 8px 20px rgba(56, 107, 82, 0.32);
}
.stop-square-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(250, 246, 236, 0.22);
  font-size: 14px;
}

.feedback-transcript-wrap {
  margin-bottom: 12px;
}
.feedback-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: #5C4028;
  margin-bottom: 5px;
}
.feedback-transcript-box {
  width: 100%;
  border: 2px solid #D8C3A5;
  border-radius: 12px;
  background: #FFFDF8;
  color: #3E2718;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  resize: vertical;
}

.feedback-context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.feedback-media-box {
  background: #F3E7D3;
  border: 1.5px solid #D8C3A5;
  border-radius: 14px;
  padding: 8px;
  text-align: center;
}
.feedback-media-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #5C4028;
  margin-bottom: 5px;
}
.feedback-media-preview {
  width: 100%;
  height: 122px;
  object-fit: cover;
  border-radius: 10px;
  background: #2A1E14;
  border: 1px solid #C8B092;
  display: block;
}
.feedback-context-caption {
  font-size: 11px;
  font-weight: 700;
  color: #6E5039;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feedback-history-section {
  border-top: 1.5px solid #DFCBB0;
  padding-top: 10px;
}
.feedback-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 800;
  color: #5C4028;
  margin-bottom: 8px;
  gap: 8px;
  flex-wrap: wrap;
}
.feedback-history-actions {
  display: flex;
  gap: 6px;
}
.feedback-mini-btn {
  appearance: none;
  border: 1.5px solid #C8B092;
  background: #F3E7D3;
  color: #3E2718;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.feedback-mini-btn:hover {
  background: #E59A38;
  color: #FFF;
  border-color: #C97D1E;
}
.feedback-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 135px;
  overflow-y: auto;
}
.feedback-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #FFFDF8;
  border: 1.5px solid #DFCBB0;
  border-radius: 11px;
  padding: 6px 10px;
  font-size: 12px;
}
.feedback-history-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.feedback-history-thumb {
  width: 42px;
  height: 30px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #C8B092;
  flex-shrink: 0;
}
.feedback-history-text {
  min-width: 0;
  flex: 1;
}
.feedback-history-quote {
  font-weight: 800;
  color: #3E2718;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feedback-history-meta {
  font-size: 10.5px;
  color: #7C5D41;
}
.feedback-history-item-btns {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

