/* ==========================================================================
   UNKNOWN — Production Design System & Visual Engine
   Aesthetic: Obsidian Night Void, Minimalist Monochromatic, Radiant Living Halos
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg-night: #04060a;
  --bg-surface: rgba(10, 14, 22, 0.88);
  --bg-surface-elevated: rgba(14, 20, 32, 0.96);
  --bg-input: rgba(6, 9, 15, 0.92);

  --border-dim: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(255, 255, 255, 0.24);
  --border-glow: rgba(255, 255, 255, 0.5);

  --text-white: #ffffff;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;

  --accent-cyan: #5ce1e6;
  --accent-gold: #ffcf70;
  --accent-warm: #ff8a65;
  --accent-red: #ff5252;

  --font-brand: 'Cinzel', serif;
  --font-mono: 'Space Mono', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Noto Sans Arabic', 'Inter', sans-serif;

  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --drawer-width: 460px;
  --focus-ring: #8ff8ff;
}

/* Reset & Global Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background-color: var(--bg-night);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  touch-action: manipulation;
}

input,
select,
textarea {
  max-width: 100%;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Global Hidden Utility */
.hidden {
  display: none !important;
}

.noscript-notice {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: #05070a;
  color: var(--text-white);
  text-align: center;
  font: 600 1rem/1.6 var(--font-sans);
}

/* ==========================================================================
   REAL LEAFLET EARTH MAP CONTAINER
   ========================================================================== */
.real-map-container {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at center, #081322 0%, #03060c 100%);
  user-select: none;
}

.leaflet-tile-pane {
  filter: brightness(0.85) contrast(1.15) hue-rotate(195deg) saturate(1.15);
}

.dashed-country-border {
  stroke: rgba(255, 255, 255, 0.62) !important;
  stroke-dasharray: 4, 3;
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.8));
  pointer-events: none;
}

.solar-terminator-shadow {
  pointer-events: none;
  mix-blend-mode: multiply;
  fill: #000000 !important;
  fill-opacity: 0.55 !important;
}

.night-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 75%, rgba(4, 6, 10, 0.45) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Leaflet Marker Layer Specifics - BULLETPROOF click-through */
.leaflet-marker-pane {
  z-index: 1000 !important;
  pointer-events: auto !important;
}

/* Disable pointer-events on ALL non-marker Leaflet panes */
.leaflet-tile-pane,
.leaflet-overlay-pane,
.leaflet-shadow-pane,
.leaflet-tooltip-pane,
.leaflet-popup-pane {
  pointer-events: none !important;
}

/* ==========================================================================
   DYNAMIC LIVING BEACONS (4 PROGRESSIVE TIERS)
   ========================================================================== */
.custom-lamp-icon-wrapper {
  background: transparent !important;
  border: none !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 1000 !important;
}

/* The Leaflet wrapper div around divIcons */
.leaflet-marker-icon {
  pointer-events: auto !important;
  cursor: pointer !important;
  will-change: transform;
  contain: layout style;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.lamp-beacon {
  position: relative;
  width: var(--halo-size, 14px);
  height: var(--halo-size, 14px);
  opacity: var(--beacon-opacity, 0.85);
  transition: opacity 0.8s ease, width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer !important;
  pointer-events: auto !important;
  z-index: 1000 !important;
  contain: layout style;
}

.lamp-beacon.rekindled {
  animation: beaconRekindleBurst 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes beaconRekindleBurst {
  0% { transform: scale(1.4); filter: brightness(1.8) drop-shadow(0 0 10px #ffffff); opacity: 1; }
  50% { transform: scale(1.15); filter: brightness(1.3) drop-shadow(0 0 6px currentColor); opacity: 1; }
  100% { transform: scale(1.0); filter: brightness(1.0); opacity: 1; }
}

/* All beacon children pass clicks through to the parent .lamp-beacon */
.lamp-beacon > * {
  pointer-events: none !important;
}

.lamp-aura {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: beaconBreath 3.2s infinite ease-in-out;
  filter: blur(0.5px);
  pointer-events: none;
}

.lamp-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.lamp-core-bulb {
  position: relative;
  z-index: 2;
  width: var(--core-size, 4px);
  height: var(--core-size, 4px);
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.25s ease, box-shadow 0.3s ease;
  pointer-events: none;
}

.lamp-beacon:hover .lamp-core-bulb {
  transform: scale(1.5);
}

/* TIER 1: Delicate Starlight Ember (Calm & Subtle) */
.tier-spark .lamp-aura {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.04) 55%, transparent 75%);
}
.tier-spark .lamp-core-bulb {
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.85);
}
.tier-spark .lamp-ring { display: none; }

/* TIER 2: Subtle Cyan Ember */
.tier-glowing-cyan .lamp-aura {
  background: radial-gradient(circle, rgba(92, 225, 230, 0.4) 0%, rgba(56, 189, 248, 0.06) 55%, transparent 75%);
}
.tier-glowing-cyan .lamp-ring {
  display: none;
}
.tier-glowing-cyan .lamp-core-bulb {
  background: #e2f8ff;
  box-shadow: 0 0 3px #ffffff, 0 0 5px rgba(92, 225, 230, 0.7);
}

/* TIER 3: Warm Golden Star */
.tier-radiant-gold .lamp-aura {
  background: radial-gradient(circle, rgba(255, 215, 90, 0.45) 0%, rgba(255, 170, 40, 0.08) 55%, transparent 75%);
}
.tier-radiant-gold .lamp-ring {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 215, 90, 0.35);
  animation: ringPulse 3.5s infinite ease-out;
}
.tier-radiant-gold .lamp-core-bulb {
  background: #fff8e8;
  box-shadow: 0 0 4px #ffffff, 0 0 6px rgba(255, 215, 90, 0.75);
}

/* TIER 4: Pure Stellar Resonance */
.tier-supernova .lamp-aura {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 215, 90, 0.15) 50%, transparent 75%);
}
.tier-supernova .lamp-ring {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 4px rgba(255, 215, 90, 0.3);
  animation: ringPulse 2.8s infinite ease-out;
}
.tier-supernova .lamp-core-bulb {
  background: #ffffff;
  box-shadow: 0 0 4px #ffffff, 0 0 8px rgba(255, 215, 90, 0.6);
}

@keyframes ringPulse {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes beaconBreath {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.12); opacity: 0.45; }
}

/* Tooltips */
.leaflet-tooltip,
.leaflet-tooltip.dark-glass-tooltip,
.leaflet-tooltip-card {
  pointer-events: none !important;
  user-select: none !important;
  background: rgba(12, 16, 24, 0.94) !important;
  border: 1px solid var(--border-focus) !important;
  border-radius: 14px !important;
  padding: 0.75rem 1rem !important;
  color: var(--text-white) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9) !important;
  font-family: var(--font-sans) !important;
}

.leaflet-tooltip-left:before, .leaflet-tooltip-right:before,
.leaflet-tooltip-top:before, .leaflet-tooltip-bottom:before {
  border-top-color: rgba(12, 16, 24, 0.94) !important;
}

.leaflet-tooltip-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 240px;
}

.tt-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.tt-quote {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  font-style: italic;
}

.tt-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-dim);
  padding-top: 0.3rem;
}

/* Floating Dynamic Spatial Canvas Hover Tooltip */
.sim-hover-tooltip {
  position: fixed;
  z-index: 999999;
  pointer-events: none !important;
  user-select: none !important;
  background: rgba(10, 14, 22, 0.94) !important;
  border: 1px solid rgba(92, 225, 230, 0.45) !important;
  border-radius: 14px !important;
  padding: 0.75rem 1rem !important;
  color: var(--text-white) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(92, 225, 230, 0.2) !important;
  max-width: 270px;
  transform: translate(16px, -50%);
  transition: opacity 0.12s ease-out;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sim-hover-tooltip.hidden {
  opacity: 0;
  pointer-events: none !important;
  visibility: hidden;
}

.st-freq-badge {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-dim);
  margin-left: auto;
}

/* ==========================================================================
   SOLAR TERMINATOR (GOLDEN TWILIGHT HORIZON & NIGHT SHADOW)
   ========================================================================== */
.solar-terminator-shadow {
  pointer-events: none !important;
}

.daylight-hemisphere-wash {
  pointer-events: none !important;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 24px rgba(125, 211, 252, 0.15));
}

.terminator-golden-horizon {
  filter: drop-shadow(0 0 6px rgba(255, 170, 68, 0.95)) drop-shadow(0 0 14px rgba(255, 130, 30, 0.65));
  animation: twilightHorizonPulse 3.5s infinite ease-in-out;
  pointer-events: none !important;
}

@keyframes twilightHorizonPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.subsolar-sun-badge {
  position: relative;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto !important;
}

.sun-emoji {
  font-size: 1.25rem;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 8px #ffd700) drop-shadow(0 0 16px rgba(255, 170, 0, 0.8));
}

.sun-flare {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.65) 0%, rgba(255, 170, 0, 0.25) 55%, transparent 80%);
  animation: sunFlareSpin 6s infinite linear;
  pointer-events: none;
}

@keyframes sunFlareSpin {
  0% { transform: scale(1) rotate(0deg); opacity: 0.85; }
  50% { transform: scale(1.3) rotate(180deg); opacity: 1; }
  100% { transform: scale(1) rotate(360deg); opacity: 0.85; }
}

.sublunar-moon-badge {
  position: relative;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto !important;
}

.moon-emoji {
  font-size: 1.2rem;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 8px rgba(241, 245, 249, 0.95)) drop-shadow(0 0 18px rgba(186, 230, 253, 0.7));
}

.moon-aura {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 232, 240, 0.55) 0%, rgba(148, 163, 184, 0.2) 55%, transparent 80%);
  animation: moonGlowBreath 4.5s infinite ease-in-out;
  pointer-events: none;
}

@keyframes moonGlowBreath {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.25); opacity: 1; }
}

/* ==========================================================================
   COSMIC RESONANCE ARCS (SEMANTIC EMOTIONAL BRIDGES ACROSS EARTH)
   ========================================================================== */
.resonance-light-arc {
  stroke-dasharray: 6, 8 !important;
  animation: arcStarlightStream 18s linear infinite;
  transition: stroke-width 0.25s ease, stroke-opacity 0.25s ease, filter 0.25s ease;
  cursor: pointer !important;
  pointer-events: stroke !important;
}

.resonance-light-arc:hover {
  stroke-width: 3.2px !important;
  stroke-opacity: 1 !important;
  filter: drop-shadow(0 0 5px currentColor);
}

@keyframes arcStarlightStream {
  from { stroke-dashoffset: 200; }
  to { stroke-dashoffset: 0; }
}

.resonance-arc-tooltip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: inherit;
  min-width: 180px;
}

.arc-tt-title {
  font-size: 0.85rem;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.arc-tt-sub {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.arc-tt-dist {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-dim);
  padding-top: 0.25rem;
  margin-top: 0.15rem;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(1.1rem + env(safe-area-inset-top)) calc(2rem + env(safe-area-inset-right)) 1.1rem calc(2rem + env(safe-area-inset-left));
  background: rgba(5, 7, 10, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.1);
  pointer-events: auto;
  gap: 1rem;
  user-select: none;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  min-width: 0;
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-brand);
  font-size: 1.55rem;
  letter-spacing: 0.22em;
  color: #ffffff;
  font-weight: 700;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.global-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dim);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  min-width: 0;
}

.beacon-glow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: beaconPulse 2s infinite ease-in-out;
}

@keyframes beaconPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.7); opacity: 0.4; }
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  margin-left: auto;
}

.action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dim);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  transition: all 0.25s var(--ease-smooth);
  min-height: 36px;
  white-space: nowrap;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
  color: var(--text-white);
  transform: translateY(-1px);
}

.sim-btn {
  background: rgba(92, 225, 230, 0.08);
  border: 1px solid rgba(92, 225, 230, 0.35);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.sim-btn:hover {
  background: rgba(92, 225, 230, 0.18);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(92, 225, 230, 0.3);
}

.sim-btn.active {
  background: linear-gradient(135deg, rgba(92, 225, 230, 0.25), rgba(255, 207, 112, 0.2));
  border-color: #5ce1e6;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(92, 225, 230, 0.4);
}

#constellationCanvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 500;
}

.post-btn {
  background: #ffffff;
  color: #05070a;
  font-weight: 600;
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  position: relative;
}

.post-btn:hover {
  background: #ffffff;
  color: #05070a;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.35);
}

.post-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-color: var(--border-dim);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.cooldown-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--accent-red);
  color: #ffffff;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  margin-right: 0.25rem;
}

/* Honest local-prototype disclosure */
.prototype-notice {
  position: fixed;
  top: calc(5.25rem + env(safe-area-inset-top));
  left: 50%;
  z-index: 99998;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: max-content;
  max-width: min(920px, calc(100vw - 2rem));
  padding: 0.5rem 0.85rem;
  transform: translateX(-50%);
  border: 1px solid rgba(92, 225, 230, 0.28);
  border-radius: 12px;
  background: rgba(5, 10, 16, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
  user-select: text;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.prototype-notice-badge {
  flex-shrink: 0;
  color: var(--accent-cyan);
  font: 700 0.65rem/1 var(--font-mono);
  letter-spacing: 0.08em;
}

/* Bottom Hint Bar */
.bottom-hint-bar {
  position: fixed;
  bottom: calc(2rem + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(12, 16, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-dim);
  padding: 0.55rem 1.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Guardian Protection Toast */
.guardian-toast {
  position: fixed;
  top: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 24, 38, 0.95);
  border: 1px solid var(--accent-gold);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.75rem 1.4rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 200002;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 207, 112, 0.2);
  animation: slideDownToast 0.35s ease;
}

@keyframes slideDownToast {
  from { opacity: 0; transform: translate(-50%, -15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.toast-msg {
  font-size: 0.85rem;
  color: var(--text-primary);
}

/* ==========================================================================
   DRAWER: POST DETAILS & COMMENTS (Positioned on the LEFT with Top Clearance)
   ========================================================================== */
.post-drawer {
  position: fixed;
  top: calc(74px + env(safe-area-inset-top));
  bottom: 0;
  left: 0;
  right: auto;
  width: var(--drawer-width);
  max-width: 90vw;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-left: none;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(255, 255, 255, 0.05);
  transition: transform 0.4s var(--ease-smooth), opacity 0.3s ease;
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.post-drawer.hidden {
  transform: translateX(-105%);
  opacity: 0;
  pointer-events: none;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(255, 255, 255, 0.015);
  flex-shrink: 0;
  gap: 0.75rem;
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.author-flag {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.author-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.author-name-row {
  display: flex;
  align-items: center;
}

.author-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-sub-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 0;
  flex-wrap: wrap;
}

.author-loc {
  color: var(--text-secondary);
}

.dot-sep {
  color: var(--text-tertiary);
  font-size: 0.7rem;
}

.author-meta-item {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
}

.lifespan-accent {
  color: var(--accent-gold) !important;
}

.drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.capture-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-dim);
  color: var(--text-primary);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.capture-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--border-focus);
  color: #ffffff;
}

.close-drawer-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
}

.close-drawer-btn:hover {
  color: #ffffff;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-focus) transparent;
}

/* Feeling Box */
.feeling-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dim);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.translation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 0.65rem;
}

.original-lang-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}

.translate-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-dim);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.translate-btn:hover {
  background: rgba(92, 225, 230, 0.15);
  border-color: var(--accent-cyan);
}

.post-text-body {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-white);
  font-weight: 300;
  word-break: break-word;
  white-space: pre-wrap;
  user-select: text;
}

/* Resonance Section */
.resonance-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0;
}

.hearyou-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border-glow);
  border-radius: 9999px;
  padding: 1rem 1.5rem;
  color: var(--text-white);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: inherit;
  transition: all 0.3s var(--ease-smooth);
  box-shadow: 0 4px 25px rgba(255, 255, 255, 0.05);
}

.hearyou-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.hearyou-btn.pulse-active {
  animation: heartShock 0.45s ease-out;
  border-color: var(--accent-gold);
}

@keyframes heartShock {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.hearyou-counter {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
}

.hearyou-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Comments Section */
.comments-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 0.5rem;
}

.comments-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.comments-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-focus) transparent;
}

.comment-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-dim);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  animation: fadeIn 0.3s ease;
  user-select: text;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
}

.comment-time {
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  font-size: 0.7rem;
}

.comment-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary);
  word-break: break-word;
  user-select: text;
}

.add-comment-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-dim);
  border-radius: 16px;
  padding: 0.85rem;
}

.comment-textarea {
  background: transparent;
  border: none;
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: none;
  outline: none;
  user-select: text;
  width: 100%;
}

.comment-textarea::placeholder {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.comment-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-dim);
  padding-top: 0.5rem;
}

.comment-char-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.primary-btn-sm {
  background: #ffffff;
  color: #05070a;
  border: none;
  border-radius: 9999px;
  padding: 0.4rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.primary-btn-sm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.primary-btn-sm:not(:disabled):hover {
  background: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   MODALS: STORY CARD, NEW POST & AUTH
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1.5rem + env(safe-area-inset-top)) calc(1.5rem + env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom)) calc(1.5rem + env(safe-area-inset-left));
  user-select: text;
  pointer-events: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  position: relative;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-focus);
  border-radius: 24px;
  padding: 2.25rem;
  max-width: 540px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95);
  animation: modalPop 0.35s var(--ease-smooth);
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.auth-card {
  max-width: 440px;
}

.story-modal-card {
  max-width: 520px;
}

.close-modal-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
}

.close-modal-btn:hover {
  color: #ffffff;
}

.modal-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-title {
  font-family: var(--font-brand);
  font-size: 1.35rem;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.city-selector-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.city-selector-row label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.city-select {
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  width: 100%;
}

.city-select:focus {
  border-color: var(--border-focus);
}

.sanctuary-ethics-pill {
  background: rgba(255, 170, 68, 0.08);
  border: 1px solid rgba(255, 170, 68, 0.3);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #fed7aa;
}

.post-textarea-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-modal-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  border-radius: 16px;
  padding: 1rem;
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  min-height: 130px;
  width: 100%;
  user-select: text;
}

.post-modal-textarea:focus {
  border-color: var(--border-focus);
}

.post-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.char-badge {
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}

.cooldown-notice {
  color: var(--accent-gold);
  font-size: 0.75rem;
}

.primary-btn-lg {
  background: #ffffff;
  color: #05070a;
  border: none;
  border-radius: 9999px;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  transition: all 0.25s var(--ease-smooth);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.primary-btn-lg:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.primary-btn-lg:not(:disabled):hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 255, 255, 0.35);
}

/* Story Card Visual */
.story-card-visual {
  background: radial-gradient(circle at top left, #121927 0%, #06090e 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 15px 45px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: hidden;
}

.story-card-visual::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(92, 225, 230, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.sc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 0.85rem;
}

.sc-brand {
  font-family: var(--font-brand);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

.sc-lifespan {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-gold);
}

.sc-quote {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text-white);
  font-weight: 300;
  font-style: italic;
}

.sc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-dim);
  padding-top: 1rem;
  font-size: 0.85rem;
}

.sc-author-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-primary);
  font-weight: 600;
}

.sc-stats {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
}

.modal-actions-row {
  display: flex;
  justify-content: center;
  margin-top: 1.2rem;
}

.story-actions-flex {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.story-btn-download {
  width: 100%;
  background: #ffffff;
  color: #05070a;
}

.story-btn-link {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glow);
  color: var(--text-white);
  font-size: 0.9rem;
}

.story-btn-link:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #ffffff;
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-alias-row {
  display: flex;
  gap: 0.5rem;
}

.auth-alias-row input {
  flex: 1;
  min-width: 0;
}

.auth-alias-row .action-btn {
  flex: 0 0 auto;
  justify-content: center;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.form-group input {
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

.form-group input:focus {
  border-color: var(--border-focus);
}

/* ==========================================================================
   EARTH EMOTION BAROMETER & SOCIOLOGICAL ANALYTICS STYLES
   ========================================================================== */
.analytics-nav-btn {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(74, 222, 128, 0.12));
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #ffd700;
  font-weight: 600;
}

.analytics-nav-btn:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(74, 222, 128, 0.22));
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  color: #ffffff;
}

.analytics-modal-card {
  max-width: 820px;
  width: 95vw;
  max-height: 88vh;
  overflow-y: auto;
}

.analytics-badge-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.live-pulse-badge {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #ef4444;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  animation: pulseDot 2s infinite ease-in-out;
}

.analytics-sub-brand {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.vital-gauges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gauge-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dim);
  border-radius: 16px;
  padding: 1.1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gauge-card:hover {
  transform: translateY(-2px);
}

.gauge-happiness {
  border-color: rgba(255, 215, 0, 0.3);
  background: radial-gradient(circle at top, rgba(255, 215, 0, 0.08), transparent 70%);
}

.gauge-peace {
  border-color: rgba(74, 222, 128, 0.3);
  background: radial-gradient(circle at top, rgba(74, 222, 128, 0.08), transparent 70%);
}

.gauge-resilience {
  border-color: rgba(255, 170, 68, 0.3);
  background: radial-gradient(circle at top, rgba(255, 170, 68, 0.08), transparent 70%);
}

.gauge-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.3rem;
}

.gauge-val {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
}

.gauge-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.3rem;
}

.gauge-sub {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.analytics-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-dim);
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 1.25rem;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
}

.section-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.spectrum-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spectrum-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.spectrum-bar-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.spectrum-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.spectrum-item-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.spectrum-item-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.spectrum-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.spectrum-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.country-search-input {
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  color: var(--text-white);
  font-size: 0.8rem;
  outline: none;
  font-family: inherit;
  width: 220px;
}

.country-table-wrapper {
  max-height: 240px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overscroll-behavior: contain;
}

.country-analytics-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.country-analytics-table th,
.country-analytics-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.country-analytics-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

.country-analytics-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.export-actions-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(255, 215, 0, 0.06));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.export-text {
  font-size: 0.82rem;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.export-buttons-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.export-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  color: var(--text-white);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.export-action-btn:hover {
  background: #ffffff;
  color: #05070a;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET EXCELLENCE)
   ========================================================================== */
@media (max-width: 1500px) {
  .global-indicator {
    display: none;
  }
}

@media (max-width: 1100px) {
  #analyticsBtnText,
  #simBtnText,
  #authBtnText {
    display: none;
  }

  .analytics-nav-btn,
  .sim-btn,
  .auth-btn,
  .sound-btn {
    justify-content: center;
    min-width: 40px;
    padding-inline: 0.7rem;
  }
}

@media (max-width: 900px) {
  .brand-sub {
    display: none;
  }
}

@media (max-width: 768px) {
  .vital-gauges-grid {
    grid-template-columns: 1fr;
  }

  .navbar {
    gap: 0.6rem;
    padding: calc(0.7rem + env(safe-area-inset-top)) calc(0.75rem + env(safe-area-inset-right)) 0.7rem calc(0.75rem + env(safe-area-inset-left));
  }

  .brand-title {
    font-size: 1.2rem;
  }

  .brand-sub {
    display: none;
  }

  .global-indicator {
    display: none;
  }

  .nav-controls {
    gap: 0.4rem;
  }

  .action-btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
    min-height: 40px;
  }

  .post-drawer {
    width: 100vw;
    max-width: 100vw;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80vh;
    height: 80dvh;
    max-height: calc(100dvh - 64px - env(safe-area-inset-top));
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px 24px 0 0;
    transform: translateY(0);
    z-index: 99999;
  }

  .post-drawer.hidden {
    transform: translateY(105%) !important;
  }

  .bottom-hint-bar {
    display: none;
  }

  .modal-card {
    padding: 1.5rem;
    max-height: calc(100dvh - 1.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .modal-header {
    padding-right: 2.5rem;
  }

  .prototype-notice {
    top: calc(4.25rem + env(safe-area-inset-top));
    max-width: calc(100vw - 1rem);
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem;
    flex-direction: column;
    text-align: left;
  }

  .drawer-header {
    padding: 0.9rem 1rem;
  }

  .drawer-content {
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  }

  .feeling-box {
    padding: 1rem;
  }

  .author-sub-row {
    white-space: normal;
  }

  .modal-backdrop {
    align-items: flex-start;
    padding: calc(0.75rem + env(safe-area-inset-top)) calc(0.75rem + env(safe-area-inset-right)) calc(0.75rem + env(safe-area-inset-bottom)) calc(0.75rem + env(safe-area-inset-left));
  }

  .city-select,
  .post-modal-textarea,
  .comment-textarea,
  .form-group input,
  .country-search-input {
    font-size: 1rem;
  }

  .country-search-input {
    width: 100%;
  }

  .export-buttons-group {
    width: 100%;
  }

  .export-action-btn {
    flex: 1 1 180px;
  }

  .story-card-visual {
    padding: 1.25rem;
  }

  .sc-footer,
  .post-meta-row {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
}

@media (max-width: 560px) {
  .navbar {
    gap: 0.35rem;
    padding-right: calc(0.45rem + env(safe-area-inset-right));
    padding-left: calc(0.45rem + env(safe-area-inset-left));
  }

  .brand-title {
    font-size: 1rem;
    letter-spacing: 0.12em;
  }

  .nav-controls {
    gap: 0.25rem;
  }

  #postBtnText {
    display: none;
  }

  .nav-controls .action-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    justify-content: center;
  }

  .cooldown-pill {
    position: absolute;
    top: -5px;
    right: -5px;
    margin: 0;
    padding: 0.1rem 0.3rem;
    font-size: 0.55rem;
  }

  .prototype-notice {
    font-size: 0.66rem;
  }

  .drawer-header {
    align-items: flex-start;
  }

  .capture-btn {
    width: 44px;
    min-height: 44px;
    overflow: hidden;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .capture-btn::first-letter {
    font-size: 1rem;
  }

  .modal-card {
    padding: 1.15rem;
    border-radius: 18px;
  }

  .modal-title {
    font-size: 1.15rem;
  }

  .story-card-visual {
    padding: 1rem;
  }

  .sc-quote {
    font-size: 1.05rem;
  }

  .auth-alias-row {
    align-items: stretch;
  }

  .auth-alias-row .action-btn {
    width: 44px;
    min-width: 44px;
  }
}

@media (max-width: 340px) {
  .brand-title {
    font-size: 0.84rem;
    letter-spacing: 0.08em;
  }

  .nav-controls .action-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }
}

/* ==========================================================================
   HUMAN RESONANCE ENCOUNTER MODAL (THE GOLDEN MOMENT)
   ========================================================================== */
.match-modal-card {
  max-width: 660px;
  background: radial-gradient(circle at 50% 0%, rgba(18, 30, 48, 0.96) 0%, rgba(8, 12, 20, 0.98) 100%);
  border: 1px solid rgba(92, 225, 230, 0.35);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(92, 225, 230, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.2rem 2rem;
  position: relative;
  overflow: hidden;
}

.match-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(92, 225, 230, 0.12);
  border: 1px solid rgba(92, 225, 230, 0.35);
  border-radius: 9999px;
  margin-bottom: 0.8rem;
}

.match-hero-icon {
  font-size: 1.1rem;
}

.match-hero-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
}

.match-header {
  margin-bottom: 1.4rem;
}

.match-title {
  font-family: var(--font-sans);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.match-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.highlight-dist {
  color: var(--accent-gold);
  font-weight: 600;
  font-family: var(--font-mono);
}

.match-cards-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
  position: relative;
}

.match-beacon-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.1rem 1.3rem;
  text-align: left;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.match-beacon-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.your-beacon-card {
  border-left: 3px solid var(--accent-cyan);
}

.matched-soul-card {
  border-left: 3px solid var(--accent-gold);
  background: rgba(255, 207, 112, 0.035);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.mbc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.mbc-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mbc-tag.matched-tag {
  color: var(--accent-gold);
  font-weight: 600;
}

.mbc-loc {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
}

.mbc-quote {
  font-size: 0.95rem;
  color: #ffffff;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.mbc-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.4rem;
  margin-top: 0.4rem;
}

.mbc-stats {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}

.match-bridge-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: -0.2rem 0;
}

.bridge-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(92, 225, 230, 0.4), transparent);
}

.bridge-core-icon {
  font-size: 1rem;
  animation: matchBridgePulse 2s infinite ease-in-out;
}

@keyframes matchBridgePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px #ffd700); }
  50% { transform: scale(1.3); filter: drop-shadow(0 0 12px #ffd700); }
}

.match-actions-flex {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.match-btn-resonate {
  width: 100%;
  justify-content: center;
  background: linear-gradient(135deg, #ffd700 0%, #ff9900 100%);
  color: #050811;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.35);
}

.match-btn-resonate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255, 215, 0, 0.5);
}

.match-btn-comment,
.match-btn-explore {
  width: 100%;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  font-size: 0.88rem;
}

.match-btn-comment:hover,
.match-btn-explore:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   NOTIFICATIONS HUB & EMPATHY SIGNALS DROPDOWN
   ========================================================================== */
.notif-wrapper {
  position: relative;
  display: inline-flex;
}

.notif-nav-btn {
  position: relative;
  padding: 0.5rem 0.75rem;
}

.notif-bell-icon {
  font-size: 1rem;
  transition: transform 0.25s ease;
}

.notif-nav-btn:hover .notif-bell-icon {
  transform: rotate(12deg) scale(1.1);
}

.notif-badge,
.nav-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-red);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.4);
  animation: notifPulse 2.4s infinite ease-in-out;
}

.nav-count-badge {
  position: static;
  background: rgba(92, 225, 230, 0.2);
  color: var(--accent-cyan);
  border-color: rgba(92, 225, 230, 0.4);
  box-shadow: none;
  animation: none;
  margin-left: 0.35rem;
}

@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); box-shadow: 0 0 14px rgba(248, 113, 113, 0.85); }
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-width: 90vw;
  background: rgba(10, 14, 23, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 20px rgba(92, 225, 230, 0.15);
  z-index: 2000;
  overflow: hidden;
  animation: dropdownFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(255, 255, 255, 0.02);
}

.notif-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-white);
}

.notif-clear-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.notif-clear-btn:hover {
  color: var(--accent-cyan);
  background: rgba(92, 225, 230, 0.08);
}

.notif-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.4rem;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.35rem;
  background: rgba(255, 255, 255, 0.02);
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(92, 225, 230, 0.3);
  transform: translateX(2px);
}

.notif-item.notif-unread {
  background: rgba(92, 225, 230, 0.07);
  border-color: rgba(92, 225, 230, 0.22);
}

.notif-icon-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--border-dim);
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.notif-title strong {
  color: var(--text-white);
}

.notif-snippet {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.notif-time {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.notif-empty-state {
  padding: 2.2rem 1.5rem;
  text-align: center;
  color: var(--text-tertiary);
}

.notif-empty-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.6rem;
  opacity: 0.5;
}

.notif-empty-state p {
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ==========================================================================
   MY BEACONS JOURNAL (سجل ومضاتي واستجابات العالم)
   ========================================================================== */
.my-beacons-card {
  max-width: 720px;
}

.journal-stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0.9rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-dim);
}

.j-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
}

.j-stat-icon {
  font-size: 1.2rem;
  margin-bottom: 0.15rem;
}

.j-stat-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-white);
}

.j-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.my-beacons-modal-body {
  max-height: 480px;
  overflow-y: auto;
  padding: 1.2rem 1.5rem;
}

.my-beacons-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.my-beacon-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dim);
  border-radius: 14px;
  padding: 1.2rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.my-beacon-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(92, 225, 230, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.my-beacon-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.my-beacon-loc {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

.my-beacon-quote {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-white);
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border-left: 3px solid var(--accent-cyan);
}

.my-beacon-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
}

.my-beacon-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.my-beacon-stats span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.my-beacon-fly-btn {
  background: rgba(92, 225, 230, 0.08);
  border: 1px solid rgba(92, 225, 230, 0.3);
  color: var(--accent-cyan);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.my-beacon-fly-btn:hover {
  background: rgba(92, 225, 230, 0.2);
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-1px);
}

.my-beacon-comments-drawer {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.mb-comment-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}

.mb-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.mb-comment-text {
  color: var(--text-primary);
  line-height: 1.4;
}

/* ==========================================================================
   GLOBAL PULSE & HOURLY TRENDS SYSTEM
   ========================================================================== */

/* Navbar Trends Button & Pulse Dot */
.trends-nav-btn {
  background: rgba(255, 94, 98, 0.12);
  border: 1px solid rgba(255, 94, 98, 0.35);
  color: #ff9a9e;
  position: relative;
}

.trends-nav-btn:hover {
  background: rgba(255, 94, 98, 0.22);
  border-color: #ff5e62;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 94, 98, 0.35);
}

.trends-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5e62;
  box-shadow: 0 0 8px #ff5e62;
  animation: pulseSpark 1.6s infinite ease-in-out;
  margin-left: 0.2rem;
}

/* Floating Bottom Pulse Ribbon */
.global-pulse-ribbon {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 2.5rem);
  max-width: 980px;
  background: rgba(8, 12, 20, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 15px rgba(92, 225, 230, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.global-pulse-ribbon:hover {
  border-color: rgba(92, 225, 230, 0.3);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(92, 225, 230, 0.18);
}

.pulse-ribbon-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.4rem 0.85rem 0.4rem 1.1rem;
}

.pulse-brand-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.pulse-flame-icon {
  font-size: 1.1rem;
  animation: pulseSpark 1.8s infinite alternate ease-in-out;
}

.pulse-brand-text {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
}

.pulse-live-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 94, 98, 0.2);
  color: #ff9a9e;
  border: 1px solid rgba(255, 94, 98, 0.4);
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
  letter-spacing: 0.06em;
}

.pulse-ticker-track {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  mask-image: linear-gradient(to right, transparent, black 12px, black 95%, transparent);
}

.pulse-ticker-track::-webkit-scrollbar {
  display: none;
}

.ticker-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.ticker-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-1px);
}

.ticker-chip .chip-label {
  font-weight: 600;
  color: var(--accent-cyan);
}

.ticker-chip .chip-val {
  color: var(--text-primary);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pulse-timer-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-gold);
  background: rgba(255, 215, 90, 0.1);
  border: 1px solid rgba(255, 215, 90, 0.25);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
}

.pulse-explore-action-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, rgba(92, 225, 230, 0.2), rgba(56, 189, 248, 0.35));
  border: 1px solid rgba(92, 225, 230, 0.4);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pulse-explore-action-btn:hover {
  background: linear-gradient(135deg, rgba(92, 225, 230, 0.35), rgba(56, 189, 248, 0.5));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(92, 225, 230, 0.3);
  transform: translateY(-1px);
}

.pulse-btn-arrow {
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.pulse-explore-action-btn:hover .pulse-btn-arrow {
  transform: translate(2px, -2px);
}

/* Trends Modal Custom Layout & Ultra-Realistic Glassmorphism */
#globalTrendsModal.modal-backdrop {
  background: radial-gradient(circle at 50% 40%, rgba(8, 14, 24, 0.3) 0%, rgba(2, 5, 10, 0.55) 100%) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

.trends-modal-card {
  max-width: 1020px;
  width: 94vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: rgba(6, 12, 22, 0.72) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid rgba(92, 225, 230, 0.25) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 35px rgba(92, 225, 230, 0.1) !important;
  border-radius: 24px;
  padding: 1.75rem 2rem;
}

.trends-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.trends-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.trends-live-pulse-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(255, 94, 98, 0.15);
  color: #ff9a9e;
  border: 1px solid rgba(255, 94, 98, 0.4);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.trends-cycle-indicator {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-gold);
  background: rgba(255, 215, 90, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 215, 90, 0.2);
}

.trends-refresh-pill-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(92, 225, 230, 0.1);
  border: 1px solid rgba(92, 225, 230, 0.3);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.trends-refresh-pill-btn:hover {
  background: rgba(92, 225, 230, 0.2);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.trends-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.1rem;
  transition: border-color 0.2s ease;
}

.trends-section:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.sec-title-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sec-title-icon {
  font-size: 1.15rem;
}

/* Top Trending Beacons Grid */
.top-trending-beacons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.trending-beacon-card {
  background: rgba(12, 18, 30, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.trending-beacon-card:hover {
  background: rgba(16, 24, 42, 0.75);
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(92, 225, 230, 0.2);
}

.tb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tb-rank-pill {
  font-weight: 800;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 215, 90, 0.18);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 215, 90, 0.4);
}

.trending-beacon-card:nth-child(1) .tb-rank-pill {
  background: linear-gradient(135deg, rgba(255, 215, 90, 0.3), rgba(255, 170, 40, 0.4));
  color: #ffe066;
  box-shadow: 0 0 10px rgba(255, 215, 90, 0.3);
}

.tb-location {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.tb-quote {
  font-size: 0.84rem;
  color: var(--text-primary);
  line-height: 1.45;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.3rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tb-stats {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.tb-fly-btn {
  background: rgba(92, 225, 230, 0.12);
  border: 1px solid rgba(92, 225, 230, 0.3);
  color: var(--accent-cyan);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tb-fly-btn:hover {
  background: rgba(92, 225, 230, 0.25);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

/* Top Hotspots Grid */
.top-hotspots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.hotspot-city-card {
  background: rgba(12, 18, 30, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.9rem;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.hotspot-city-card:hover {
  background: rgba(16, 24, 42, 0.8);
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(92, 225, 230, 0.25);
}

.hs-flag {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.25rem;
}

.hs-city-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
}

.hs-country-name {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.hs-beacons-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  background: rgba(92, 225, 230, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  display: inline-block;
  margin-bottom: 0.4rem;
}

.hs-top-emotion {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Trending Themes Tag Cloud */
.trending-themes-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.theme-tag-chip {
  background: rgba(12, 18, 30, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-tag-chip:hover {
  background: rgba(92, 225, 230, 0.18);
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(92, 225, 230, 0.25);
}

.theme-count-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-gold);
  background: rgba(255, 215, 90, 0.15);
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
}

/* Table Glass Styling */
.country-table-wrapper {
  background: rgba(12, 18, 30, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
}

.country-analytics-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.country-analytics-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1rem;
  color: var(--accent-cyan);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.country-analytics-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.country-analytics-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 768px) {
  .global-pulse-ribbon {
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    width: calc(100% - 1.2rem);
    border-radius: 14px;
  }
  .pulse-ribbon-content {
    padding: 0.35rem 0.6rem;
    gap: 0.5rem;
  }
  .pulse-timer-badge {
    display: none;
  }
  .pulse-brand-text {
    font-size: 0.78rem;
  }
  .top-trending-beacons-grid {
    grid-template-columns: 1fr;
  }
  .top-hotspots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   ALL-DAY RETENTION & SANCTUARY IMMERSION FEATURES
   ========================================================================== */

/* 1. Wanderer & Soundscapes Navbar Buttons */
.wanderer-nav-btn {
  background: rgba(147, 51, 234, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.wanderer-nav-btn:hover,
.wanderer-nav-btn.active {
  background: rgba(147, 51, 234, 0.3);
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}

.wanderer-orbit-icon {
  display: inline-block;
  animation: orbitSpin 12s linear infinite;
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.soundscapes-nav-btn {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.soundscapes-nav-btn:hover,
.soundscapes-nav-btn.active {
  background: rgba(34, 197, 94, 0.25);
  border-color: #4ade80;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
}

/* 2. Floating Soul Wanderer HUD */
.wanderer-hud {
  position: fixed;
  top: 5.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  background: rgba(8, 14, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(168, 85, 247, 0.25);
  animation: slideDownToast 0.35s ease;
}

.wanderer-hud-content {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.wanderer-hud-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wanderer-pulse-orb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c084fc;
  box-shadow: 0 0 12px #c084fc;
  animation: pulseSpark 1.5s infinite ease-in-out;
}

.wh-title {
  font-size: 0.82rem;
  color: #ffffff;
  display: block;
}

.wanderer-target-text {
  font-size: 0.74rem;
  color: var(--accent-cyan);
  display: block;
}

.wanderer-hud-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.wh-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wh-action-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.wh-exit-btn {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.wh-exit-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
}

/* 3. Live Global Whispers Stream Ticker */
.live-whispers-stream {
  position: fixed;
  top: 5.25rem;
  right: 1.5rem;
  z-index: 100;
  width: 280px;
  max-width: calc(100vw - 3rem);
  background: rgba(6, 12, 22, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.whispers-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.whispers-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseSpark 1.6s infinite ease-in-out;
}

.whispers-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 140px;
  overflow-y: hidden;
}

.whisper-item {
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.35;
  padding: 0.25rem 0.4rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  animation: fadeInWhisper 0.4s ease;
}

.whisper-item strong {
  color: #ffffff;
}

@keyframes fadeInWhisper {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 4. Sanctuary Soundscapes Mixer Modal */
.soundscapes-card {
  max-width: 520px;
}

.soundscapes-badge-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.soundscapes-freq-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.soundscapes-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.soundscape-track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: all 0.2s ease;
}

.soundscape-track-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(74, 222, 128, 0.3);
}

.st-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.st-icon {
  font-size: 1.5rem;
}

.st-info strong {
  font-size: 0.88rem;
  color: #ffffff;
  display: block;
}

.st-info p {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin: 0;
}

.st-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.st-toggle-btn.active {
  background: rgba(34, 197, 94, 0.25);
  border-color: #4ade80;
  color: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.soundscape-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sc-preset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.sc-preset-off {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

/* 5. Quick Solace Whisper Bar in Drawer */
.quick-whisper-bar {
  margin-bottom: 0.6rem;
}

.quick-whisper-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 0.35rem;
}

.quick-whisper-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.qw-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.76rem;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qw-chip:hover {
  background: rgba(92, 225, 230, 0.18);
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Product Hunt Official Launch Badge & Banner */
.ph-nav-badge {
  background: rgba(218, 85, 47, 0.15) !important;
  border: 1px solid rgba(218, 85, 47, 0.4) !important;
  color: #ff8a65 !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  transition: all 0.25s ease !important;
}

.ph-nav-badge:hover {
  background: rgba(218, 85, 47, 0.3) !important;
  border-color: #ff6f43 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(218, 85, 47, 0.45);
}

.ph-cat-icon {
  font-size: 1rem;
}

.ph-badge-text {
  font-weight: 700;
  font-size: 0.82rem;
}

.ph-vote-pill {
  background: #da552f;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  box-shadow: 0 0 8px rgba(218, 85, 47, 0.5);
}

.ph-community-banner {
  background: linear-gradient(135deg, rgba(218, 85, 47, 0.15), rgba(12, 18, 30, 0.6));
  border: 1px solid rgba(218, 85, 47, 0.35);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ph-banner-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ph-banner-cat {
  font-size: 1.8rem;
}

.ph-banner-left strong {
  color: #ffffff;
  font-size: 0.92rem;
  display: block;
}

.ph-banner-left p {
  color: var(--text-secondary);
  font-size: 0.78rem;
  margin: 0;
}

.ph-vote-button {
  background: #da552f;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(218, 85, 47, 0.4);
}

.ph-vote-button:hover {
  background: #ff6f43;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(218, 85, 47, 0.6);
}

@media (max-width: 768px) {
  .live-whispers-stream {
    display: none;
  }
  .wanderer-hud {
    top: 4.5rem;
    width: calc(100% - 2rem);
    border-radius: 12px;
  }
  .ph-badge-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

