/* ==================== Glimmer Multi-Theme: Realistic 3D Cat Street (Day/Night Auto) & 3D Botanical Conservatory + 3D Globe ==================== */

/* Original ✨ Glimmer mode stays 100% untouched. In 🐱 / 🌿 3D Scene modes, hide floating orb void & show 3D viewport */
/* Healing Scenic Street Backdrop for ✨ Glimmer mode (auto Day/Night) */
body[data-theme="cats"] #orb-field,
body[data-theme="botanical"] #orb-field {
  display: none;
}

body[data-theme="glimmer"] #orb-field {
  z-index: 4;
}

#scene-viewport {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background: #F4EFE7;
}

body[data-theme="glimmer"] #scene-viewport,
body[data-theme="cats"] #scene-viewport,
body[data-theme="botanical"] #scene-viewport {
  display: block;
}

body[data-theme="glimmer"] #scene-viewport {
  pointer-events: none;
}

body[data-theme="glimmer"][data-scene-time="night"] #scene-viewport,
body[data-theme="cats"][data-scene-time="night"] #scene-viewport {
  background: #1B1C22;
}

#scene-stage {
  position: absolute;
  will-change: transform, opacity;
  transition: opacity 0.42s ease;
}

#scene-stage.scene-glide {
  animation: sceneWalkGlide 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sceneWalkGlide {
  0% { opacity: 0.35; filter: blur(3px); }
  100% { opacity: 1; filter: blur(0px); }
}

#scene-bg,
#scene-bg-next {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: opacity, transform, filter;
}

#scene-bg {
  z-index: 1;
  opacity: 1;
  transform: scale(1);
  filter: blur(0px) brightness(1);
  transition: opacity 0.85s ease, transform 1.38s cubic-bezier(0.37, 0, 0.63, 1), filter 1.38s cubic-bezier(0.37, 0, 0.63, 1);
}

#scene-bg.is-initial-fade {
  opacity: 0;
  transform: scale(1.03);
}

#scene-bg.is-initial-fade.is-loaded {
  opacity: 1;
  transform: scale(1);
}

#scene-bg.is-exhaling {
  transform: scale(1.038);
  filter: blur(2.5px) brightness(0.95);
}

#scene-bg-next {
  z-index: 2;
  opacity: 0;
  transform: scale(1.052);
  filter: blur(5px) brightness(1.03);
  transition: opacity 1.35s cubic-bezier(0.28, 0.08, 0.25, 1), transform 1.4s cubic-bezier(0.22, 1, 0.36, 1), filter 1.35s cubic-bezier(0.28, 0.08, 0.25, 1);
}

#scene-bg-next.is-breathing-in {
  opacity: 1;
  transform: scale(1);
  filter: blur(0px) brightness(1);
}

/* Subtle slowly shimmering left/right edge arrows hinting horizontal swipe or tap */
.breeze-edge-arrow {
  position: fixed;
  top: 48%;
  z-index: 22;
  width: 44px;
  height: 58px;
  margin-top: -29px;
  padding: 0;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  color: rgba(88, 78, 66, 0.84);
  filter: drop-shadow(0 0 8px rgba(255, 252, 246, 0.92)) drop-shadow(0 1px 4px rgba(255, 248, 236, 0.85));
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.breeze-edge-arrow::before {
  content: '';
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 252, 246, 0.56) 0%, rgba(255, 252, 246, 0) 72%);
  pointer-events: none;
}

.breeze-edge-arrow svg {
  position: relative;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.breeze-edge-arrow.is-left {
  left: 6px;
  animation: breezeArrowLeftShimmer 3.8s ease-in-out infinite;
}

.breeze-edge-arrow.is-right {
  right: 6px;
  animation: breezeArrowRightShimmer 3.8s ease-in-out infinite;
}

.breeze-edge-arrow:active {
  transform: scale(0.92);
}

body[data-scene-time="night"][data-theme="glimmer"] .breeze-edge-arrow {
  color: rgba(255, 248, 234, 0.92);
  filter: drop-shadow(0 0 10px rgba(255, 224, 162, 0.72)) drop-shadow(0 1px 6px rgba(10, 12, 22, 0.7));
}

body[data-scene-time="night"][data-theme="glimmer"] .breeze-edge-arrow::before {
  background: radial-gradient(circle, rgba(255, 236, 194, 0.26) 0%, rgba(255, 236, 194, 0) 72%);
}

@keyframes breezeArrowLeftShimmer {
  0%, 100% { opacity: 0.26; transform: translate3d(0, 0, 0); }
  50% { opacity: 0.84; transform: translate3d(-3px, 0, 0); }
}

@keyframes breezeArrowRightShimmer {
  0%, 100% { opacity: 0.26; transform: translate3d(0, 0, 0); }
  50% { opacity: 0.84; transform: translate3d(3px, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .breeze-edge-arrow.is-left,
  .breeze-edge-arrow.is-right {
    animation: none;
    opacity: 0.65;
  }
}

/* Moonlit serene night grade for the glass botanical conservatory after 18:00 */
/* Keep the 3D Warm-Ivory Glass Conservatory luminous and clear at all hours */

/* Soft top & bottom readability veil so header & footer chrome stay crisp in both Day & Night */
.scene-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(252, 249, 244, 0.72) 0%, rgba(252, 249, 244, 0.24) 17%, rgba(252, 249, 244, 0) 28%),
    linear-gradient(0deg, rgba(250, 246, 240, 0.78) 0%, rgba(250, 246, 240, 0.26) 18%, rgba(250, 246, 240, 0) 30%);
  transition: background 0.55s ease;
}

body[data-theme="glimmer"] .scene-vignette {
  background:
    linear-gradient(180deg, rgba(252, 249, 244, 0.88) 0%, rgba(252, 249, 244, 0.58) 15%, rgba(252, 249, 244, 0.20) 30%, rgba(252, 249, 244, 0.14) 55%, rgba(250, 246, 240, 0.30) 78%, rgba(250, 246, 240, 0.78) 100%);
}

body[data-theme="glimmer"][data-scene-time="night"] .scene-vignette,
body[data-theme="cats"][data-scene-time="night"] .scene-vignette {
  background:
    linear-gradient(180deg, rgba(14, 16, 24, 0.76) 0%, rgba(14, 16, 24, 0.42) 16%, rgba(14, 16, 24, 0) 32%),
    linear-gradient(0deg, rgba(14, 14, 18, 0.74) 0%, rgba(14, 14, 18, 0.28) 20%, rgba(14, 14, 18, 0) 34%);
}

/* Luminous soft-focus orb harmony over Day & Night healing scenic streets */
body[data-theme="glimmer"] .glimmer-orb {
  filter: saturate(1.16) drop-shadow(0 0 10px rgba(255, 252, 246, 0.36));
}

body[data-theme="glimmer"][data-scene-time="night"] .glimmer-orb {
  mix-blend-mode: screen;
  filter: brightness(1.22) saturate(1.28) drop-shadow(0 0 16px rgba(255, 244, 214, 0.42));
}

body[data-theme="glimmer"][data-scene-time="night"] .bokeh-mote.is-visible {
  mix-blend-mode: screen;
  opacity: 0.9;
}

/* Ambient floating sunlight / twilight golden dust motes */
#scene-dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 42;
}

.scene-dust-mote {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 212, 0.95) 0%, rgba(255, 224, 152, 0) 72%);
  opacity: 0;
  animation: sceneDustDrift var(--dust-dur, 8s) ease-in-out infinite;
  animation-delay: var(--dust-delay, 0s);
}

@keyframes sceneDustDrift {
  0% { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.7); }
  30% { opacity: 0.72; }
  70% { opacity: 0.55; }
  100% { opacity: 0; transform: translate3d(14px, -36px, 0) scale(0.4); }
}

/* ==================== Physically Grounded 3D Scene Actors (Cats V4 & Porcelain Plants V3) ==================== */
#scene-actors {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-actor {
  position: absolute;
  width: 96px;
  height: 96px;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform-origin: 50% 92%;
  transform: translate3d(calc(-50% + var(--px, 0px)), calc(-92% + var(--py, 0px)), 0) scale(var(--actor-scale, 1));
  transition: filter 0.32s ease;
  -webkit-tap-highlight-color: transparent;
}

.scene-actor.is-far {
  filter: blur(0.35px) saturate(0.95);
}

/* Realistic contact shadow anchored directly beneath paws / porcelain base */
.actor-shadow {
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 78%;
  height: 20%;
  transform: translateX(calc(-50% + var(--shadow-shift, 0px)));
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(24, 19, 14, 0.56) 0%, rgba(24, 19, 14, 0.28) 46%, rgba(24, 19, 14, 0) 76%);
  filter: blur(4px);
  opacity: calc(0.62 + var(--actor-shade, 0.72) * 0.45);
  pointer-events: none;
}

body[data-theme="cats"][data-scene-time="night"] .actor-shadow {
  background: radial-gradient(ellipse at center, rgba(6, 7, 12, 0.74) 0%, rgba(6, 7, 12, 0.36) 50%, rgba(6, 7, 12, 0) 78%);
  opacity: calc(0.75 + var(--actor-shade, 0.78) * 0.30);
}

/* Realistic warm pastel light spill cast onto cobblestones, wood bench, or stone shelf below */
.actor-spill {
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 124%;
  height: 38%;
  transform: translateX(calc(-50% + var(--shadow-shift, 0px) * 0.4));
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(var(--mood-rgb, 244, 201, 122), 0.52) 0%, rgba(var(--mood-rgb, 244, 201, 122), 0.18) 50%, rgba(var(--mood-rgb, 244, 201, 122), 0) 76%);
  filter: blur(7px);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: calc(0.55 + var(--actor-shade, 0.72) * 0.38);
  animation: spillPulse var(--dur, 4.4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

body[data-scene-time="night"] .actor-spill {
  opacity: 1;
  width: 135%;
  height: 44%;
}

.scene-actor.is-zero .actor-spill {
  opacity: 0.44;
}

@keyframes spillPulse {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(0.95); }
  50% { opacity: 0.96; transform: translateX(-50%) scale(1.08); }
}

/* Soft halo aura behind cat/plant silhouette */
.actor-aura {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--mood-rgb, 244, 201, 122), 0.42) 0%, rgba(var(--mood-rgb, 244, 201, 122), 0.12) 48%, rgba(var(--mood-rgb, 244, 201, 122), 0) 72%);
  filter: blur(10px);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: innerLampPulse var(--dur, 4.4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

body[data-scene-time="night"] .actor-aura {
  inset: -6px;
  background: radial-gradient(circle, rgba(var(--mood-rgb, 244, 201, 122), 0.62) 0%, rgba(var(--mood-rgb, 244, 201, 122), 0.22) 50%, rgba(var(--mood-rgb, 244, 201, 122), 0) 74%);
}

.actor-sprite-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: 50% 90%;
  pointer-events: none;
  will-change: transform;
}

.actor-sprite {
  width: 92%;
  height: 92%;
  object-fit: contain;
  object-position: bottom center;
  transform: scaleX(var(--actor-flip, 1));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: filter 0.3s ease, transform 0.28s cubic-bezier(0.22, 1.25, 0.36, 1);
  filter:
    brightness(calc(1.04 - var(--actor-shade, 0.72) * 0.18))
    contrast(1.03)
    saturate(0.96)
    drop-shadow(0 0 10px rgba(var(--mood-rgb, 244, 201, 122), 0.42))
    drop-shadow(calc(var(--shadow-shift, 0px) * 0.5) 5px 8px rgba(20, 15, 10, 0.34));
}

body[data-theme="cats"][data-scene-time="night"] .actor-sprite {
  filter:
    brightness(calc(1.05 - var(--actor-shade, 0.78) * 0.16))
    contrast(1.05)
    saturate(1.06)
    drop-shadow(0 0 15px rgba(var(--mood-rgb, 244, 201, 122), 0.68))
    drop-shadow(calc(var(--shadow-shift, 0px) * 0.6) 5px 10px rgba(4, 6, 12, 0.56));
}

.scene-actor.is-zero .actor-sprite {
  filter:
    brightness(calc(0.98 - var(--actor-shade, 0.72) * 0.18))
    contrast(1.02)
    saturate(0.88)
    drop-shadow(0 0 7px rgba(var(--mood-rgb, 244, 201, 122), 0.28))
    drop-shadow(calc(var(--shadow-shift, 0px) * 0.5) 5px 8px rgba(20, 15, 10, 0.32));
}

.scene-actor:hover .actor-sprite,
.scene-actor.is-tapped .actor-sprite,
.scene-actor.is-highlighted .actor-sprite {
  transform: scaleX(var(--actor-flip, 1)) scale(1.10);
  filter: brightness(1.12) saturate(1.15) drop-shadow(0 0 20px rgba(var(--mood-rgb, 244, 201, 122), 0.90));
}

.actor-inner-glow {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--mood-inner, rgba(255, 228, 166, 0.46)) 0%, rgba(255, 255, 255, 0) 68%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: innerLampPulse var(--dur, 4.4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* Rising micro sparkle motes */
.glimmer-sprite-mote {
  position: absolute;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: var(--mood-mote, rgba(255, 232, 168, 0.95));
  box-shadow: 0 0 7px var(--mood-glow, rgba(244, 201, 122, 0.9));
  pointer-events: none;
  opacity: 0;
  animation: spriteMoteRise var(--mote-dur, 4.4s) ease-in-out infinite;
  animation-delay: var(--mote-delay, 0s);
}
.glimmer-sprite-mote.m1 { left: 26%; top: 52%; }
.glimmer-sprite-mote.m2 { left: 72%; top: 46%; width: 4.5px; height: 4.5px; --mote-delay: -1.9s; --mote-dur: 5.2s; }

/* 6-Emotion Organic Living Micro-Animations on 3D Scene Actors */
.scene-actor.mood-exhausted .actor-sprite-wrap { animation: emoExhausted 4.2s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.scene-actor.mood-worry .actor-sprite-wrap { animation: emoWorry 3.8s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.scene-actor.mood-sad .actor-sprite-wrap { animation: emoSad 4.8s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.scene-actor.mood-anxious.is-zero .actor-sprite-wrap { animation: emoAnxiousFast 2.5s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.scene-actor.mood-anxious:not(.is-zero) .actor-sprite-wrap { animation: emoAnxiousCalm 4.4s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.scene-actor.mood-lost .actor-sprite-wrap { animation: emoLost 4.4s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.scene-actor.mood-longing .actor-sprite-wrap { animation: emoLonging 4.6s ease-in-out infinite; animation-delay: var(--delay, 0s); }

@keyframes emoExhausted {
  0%, 100% { transform: scaleX(1.018) scaleY(0.982); }
  50% { transform: scaleX(0.985) scaleY(1.032); }
}
@keyframes emoWorry {
  0%, 100% { transform: rotate(-2.4deg); }
  50% { transform: rotate(2.4deg) scaleY(1.016); }
}
@keyframes emoSad {
  0%, 100% { transform: scale(0.992) rotate(-0.8deg); }
  50% { transform: scale(1.014) rotate(1.0deg); }
}
@keyframes emoAnxiousFast {
  0%, 100% { transform: scale(0.985); }
  30% { transform: scale(1.028) translateY(-1.5px); }
  60% { transform: scale(0.995); }
}
@keyframes emoAnxiousCalm {
  0%, 100% { transform: scale(0.99); }
  50% { transform: scale(1.02); }
}
@keyframes emoLost {
  0%, 100% { transform: rotate(-1.8deg) scale(1); }
  50% { transform: rotate(2.0deg) scale(1.018); }
}
@keyframes emoLonging {
  0%, 100% { transform: rotate(-2.0deg) scale(1); }
  50% { transform: rotate(2.2deg) scale(1.024); }
}
@keyframes innerLampPulse {
  0%, 100% { opacity: 0.38; transform: scale(0.92); }
  50% { opacity: 0.86; transform: scale(1.1); }
}
@keyframes spriteMoteRise {
  0% { opacity: 0; transform: translate(0, 6px) scale(0.6); }
  25% { opacity: 0.88; }
  75% { opacity: 0.55; }
  100% { opacity: 0; transform: translate(4px, -26px) scale(0.35); }
}

/* ==================== Day/Night Adaptive Header, Footer & Top-Left Time Toggle Pill ==================== */
#btn-time-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 30;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(234, 228, 220, 0.9);
  color: #5C554E;
  font-size: 11px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(58, 50, 42, 0.08);
  transition: all 0.22s ease;
}

body[data-theme="glimmer"] #btn-time-toggle,
body[data-theme="cats"] #btn-time-toggle {
  display: inline-flex;
}

body[data-theme="glimmer"] #ui-home-guide,
body[data-theme="cats"] #ui-home-guide,
body[data-theme="botanical"] #ui-home-guide {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(252, 249, 244, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #544D46;
  box-shadow: 0 2px 10px rgba(42, 34, 24, 0.06);
}

body[data-scene-time="night"][data-theme="glimmer"] #ui-home-guide,
body[data-scene-time="night"][data-theme="cats"] #ui-home-guide {
  background: rgba(20, 20, 26, 0.54);
  color: rgba(248, 242, 232, 0.92);
  text-shadow: 0 1px 8px rgba(10, 12, 20, 0.55);
}

/* Crisp, serene title & subtitle legibility across all 28 Day & Night street scenes */
#ui-title {
  color: #2B2622;
  text-shadow: 0 1px 16px rgba(255, 252, 246, 0.92), 0 0 3px rgba(255, 252, 246, 0.82);
  transition: color 0.45s ease, text-shadow 0.45s ease;
}

#ui-subtitle {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  color: #3E3832;
  font-weight: 500;
  line-height: 1.45;
  background: rgba(252, 249, 244, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(42, 34, 24, 0.06);
  text-shadow: 0 1px 8px rgba(255, 252, 246, 0.85);
  transition: color 0.45s ease, background 0.45s ease, border-color 0.45s ease, text-shadow 0.45s ease;
}

#kindness-badge {
  color: #5E5449;
  text-shadow: 0 1px 10px rgba(255, 252, 246, 0.9);
}

body[data-scene-time="night"][data-theme="glimmer"] #ui-title,
body[data-scene-time="night"][data-theme="cats"] #ui-title {
  color: #FFFDF8;
  text-shadow: 0 2px 18px rgba(8, 10, 18, 0.72), 0 1px 4px rgba(8, 10, 18, 0.5);
}

body[data-scene-time="night"][data-theme="glimmer"] #ui-subtitle,
body[data-scene-time="night"][data-theme="cats"] #ui-subtitle {
  color: rgba(252, 247, 238, 0.95);
  background: rgba(16, 18, 26, 0.44);
  border-color: rgba(255, 244, 224, 0.16);
  box-shadow: 0 2px 14px rgba(8, 10, 18, 0.28);
  text-shadow: 0 1px 10px rgba(8, 10, 18, 0.75);
}

body[data-scene-time="night"][data-theme="glimmer"] #kindness-badge,
body[data-scene-time="night"][data-theme="cats"] #kindness-badge {
  color: rgba(244, 214, 158, 0.92);
  text-shadow: 0 1px 8px rgba(10, 12, 20, 0.6);
}

body[data-scene-time="night"][data-theme="glimmer"] #btn-time-toggle,
body[data-scene-time="night"][data-theme="glimmer"] #lang-trigger,
body[data-scene-time="night"][data-theme="cats"] #btn-time-toggle,
body[data-scene-time="night"][data-theme="cats"] #lang-trigger {
  background: rgba(24, 24, 30, 0.58);
  border-color: rgba(255, 244, 224, 0.22);
  color: #F6F0E6;
}

body[data-scene-time="night"][data-theme="glimmer"] footer button:not(.theme-dock-btn):not(#btn-admin-subtle),
body[data-scene-time="night"][data-theme="cats"] footer button:not(.theme-dock-btn):not(#btn-admin-subtle) {
  background: rgba(26, 24, 26, 0.58);
  border-color: rgba(255, 242, 222, 0.22);
  color: #F6EFE5;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body[data-scene-time="night"][data-theme="glimmer"] #btn-drop,
body[data-scene-time="night"][data-theme="cats"] #btn-drop {
  background: rgba(252, 247, 238, 0.92);
  color: #2F2B27;
  border-color: rgba(255, 248, 235, 0.95);
}

body[data-scene-time="night"][data-theme="glimmer"] .theme-dock,
body[data-scene-time="night"][data-theme="cats"] .theme-dock {
  background: rgba(26, 24, 28, 0.64);
  border-color: rgba(255, 244, 224, 0.22);
}

body[data-scene-time="night"][data-theme="glimmer"] .theme-dock-btn.is-active,
body[data-scene-time="night"][data-theme="cats"] .theme-dock-btn.is-active {
  background: #FAF5EC;
  border-color: #FAF5EC;
}

body[data-scene-time="night"][data-theme="glimmer"] .theme-dock-divider,
body[data-scene-time="night"][data-theme="cats"] .theme-dock-divider {
  background: rgba(255, 244, 224, 0.24);
}

/* ==================== Bottom Floating Emoji Theme & Globe Capsule Switcher ==================== */
.theme-dock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(235, 229, 220, 0.92);
  box-shadow: 0 6px 22px rgba(72, 60, 48, 0.08);
  margin-top: 2px;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.theme-dock-btn {
  width: 34px;
  height: 30px;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.22s cubic-bezier(0.22, 1.3, 0.36, 1), background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  position: relative;
}

.theme-dock-btn:hover {
  background: rgba(245, 240, 232, 0.55);
  transform: translateY(-1px);
}

.theme-dock-btn.is-active {
  background: #3A3632;
  border-color: #3A3632;
  box-shadow: 0 3px 10px rgba(58, 54, 50, 0.22);
  transform: scale(1.06);
}

.theme-dock-divider {
  width: 1px;
  height: 16px;
  background: rgba(218, 210, 198, 0.85);
  margin: 0 3px;
}

/* ==================== Optional Anonymous City Location Picker inside Drop Modal ==================== */
.loc-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #FAF8F5;
  border: 1px solid #ECE6DD;
}
.loc-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid #E8E1D8;
  background: #FFFFFF;
  color: #6F6860;
  cursor: pointer;
  transition: all 0.18s ease;
}
.loc-chip:hover {
  border-color: #CFC3B2;
  color: #3A3632;
}
.loc-chip.active {
  background: #3A3632;
  border-color: #3A3632;
  color: #FFFFFF;
}

/* ==================== 3D Warm-Ivory Porcelain Glimmer Globe Overlay ==================== */
#globe-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: radial-gradient(circle at 50% 42%, #FFFFFF 0%, #FAF7F2 65%, #F3EDE4 100%);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  touch-action: none;
}
#globe-overlay.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}
#globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
#globe-canvas:active {
  cursor: grabbing;
}
.globe-header {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  padding: 44px 20px 8px;
  text-align: center;
  pointer-events: none;
}
.globe-close-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #EAE4DC;
  color: #5C554E;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(70, 60, 48, 0.08);
  transition: all 0.2s ease;
}
.globe-close-btn:hover {
  color: #2E2925;
  border-color: #D5C9B8;
}
#globe-story-card {
  display: none;
  position: relative;
  z-index: 3;
  width: calc(100% - 36px);
  max-width: 360px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(235, 229, 220, 0.95);
  border-radius: 22px;
  padding: 14px 16px;
  box-shadow: 0 14px 36px rgba(70, 58, 44, 0.12);
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
#globe-story-card.visible {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.globe-footer-bar {
  position: relative;
  z-index: 2;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.globe-footer-bar > * {
  pointer-events: auto;
}
