/* ═══════════════════════════════════════════════════════════
   VALENTINA PRIME — PERSONAL HUB
   Design System: Cinematic Noir + Glassmorphism
   Author: Antigravity / LANDMRK
   ═══════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ─── */
:root {
  /* ── Brand Palette ── */
  --black:        #000000;  /* Pure Black */
  --black-mid:    #0a0a0a;  /* Neutral Dark */
  --black-soft:   #121212;  /* Neutral Soft */
  --glass-bg:     rgba(255,251,244,0.055); /* Floral White tint */
  --glass-border: rgba(255,251,244,0.10);
  --glass-hover:  rgba(255,251,244,0.085);

  --prune:        #7F6269;  /* Prune — main accent */
  --prune-light:  #a8848e;  /* lighter prune */
  --prune-dim:    rgba(127,98,105,0.18);
  --prune-glow:   rgba(127,98,105,0.40);

  --bone:         #D8CFBC;  /* Bone — secondary */
  --bone-mid:     #3d2b6b;  /* kept for ring gradient depth */
  --bone-dim:     rgba(216,207,188,0.12);

  --text-primary:   #FFFBF4;            /* Floral White */
  --text-secondary: rgba(216,207,188,0.70);  /* Bone */
  --text-muted:     rgba(216,207,188,0.40);

  --ff-serif:  'Playfair Display', Georgia, serif;
  --ff-sans:   'Inter', system-ui, sans-serif;
  --ff-body:   'DM Sans', 'Inter', system-ui, sans-serif;

  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);

  --max-w: 480px;
  --pad-x: 20px;
}

/* ─── RESET ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--black);
  color: var(--text-primary);
  font-family: var(--ff-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── BACKGROUND IMAGE & VIDEO ─── */
.bg-image-wrapper {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('valentina_bg.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.9;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0; /* Smooth fade-in when video starts playing */
  transition: opacity 0.8s ease;
}

.bg-video.is-loaded {
  opacity: 1;
}

.bg-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.85) 60%,
    var(--black) 100%
  );
  z-index: 1; /* Overlay on top of image and video */
}

/* ─── BACKGROUND CANVAS ─── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── GRAIN OVERLAY ─── */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grain-shift 8s steps(10) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-2%, -3%); }
  20%  { transform: translate(4%, -1%); }
  30%  { transform: translate(-1%, 3%); }
  40%  { transform: translate(2%, 2%); }
  50%  { transform: translate(-3%, 1%); }
  60%  { transform: translate(3%, -2%); }
  70%  { transform: translate(-2%, 3%); }
  80%  { transform: translate(1%, -3%); }
  90%  { transform: translate(-3%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ─── HUB WRAPPER ─── */
.hub-wrapper {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ══════════════════════════════════════
   HERO SECTION
══════════════════════════════════════ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(env(safe-area-inset-top), 32px) var(--pad-x) 12px;
  text-align: center;
  position: relative;
}

/* Portrait */
.hero__portrait-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 28px;
}

.hero__portrait-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--prune) 0%,
    var(--bone) 30%,
    transparent 50%,
    var(--prune) 75%,
    var(--prune-light) 100%
  );
  animation: ring-spin 6s linear infinite;
}

.hero__portrait-ring--outer {
  inset: -14px;
  background: conic-gradient(
    from 180deg,
    transparent 0%,
    var(--prune-dim) 40%,
    rgba(127,98,105,0.25) 60%,
    transparent 100%
  );
  animation-duration: 9s;
  animation-direction: reverse;
  opacity: 0.5;
}

@keyframes ring-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero__portrait {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  position: relative;
  z-index: 1;
  border: 3px solid var(--black);
}

.hero__portrait-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--prune-glow) 0%, transparent 70%);
  filter: blur(16px);
  z-index: 0;
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 0.9; transform: scale(1.08); }
}

/* Identity */
.hero__identity {
  margin-bottom: 0px;
}

.hero__label {
  font-family: var(--ff-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--prune-light);
  margin-bottom: 8px;
}

.hero__name {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 12px 0 16px;
}

.hero__logo {
  max-width: 290px;
  width: 90%;
  height: auto;
  filter: drop-shadow(0 2px 14px rgba(127, 98, 105, 0.22));
}

.hero__tagline {
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

/* Stats bar */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 14px 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.stats-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stats-bar__number {
  font-family: var(--ff-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--prune-light);
  line-height: 1;
  margin-bottom: 3px;
}

.stats-bar__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stats-bar__divider {
  width: 1px;
  height: 32px;
  background: var(--glass-border);
  flex-shrink: 0;
}



/* ══════════════════════════════════════
   LINKS SECTION
══════════════════════════════════════ */
.links-section {
  padding: 8px var(--pad-x) 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

/* ─── PRIMARY CTA ─── */
.cta-primary {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.cta-primary:active {
  transform: scale(0.97);
}

.cta-primary__glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--prune), var(--bone) 60%, var(--prune-light));
  animation: border-glow-rotate 4s linear infinite;
  z-index: 0;
}

@keyframes border-glow-rotate {
  from { filter: hue-rotate(0deg) brightness(1); }
  50%  { filter: hue-rotate(20deg) brightness(1.2); }
  to   { filter: hue-rotate(0deg) brightness(1); }
}

.cta-primary__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #1e1915 0%, #11120D 100%);
  border-radius: calc(var(--radius-lg) - 2px);
  margin: 2px;
}

.cta-primary__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--prune), #5a3d44);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--prune-glow);
}

.cta-primary__text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cta-primary__eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--prune-light);
  opacity: 0.7;
  line-height: 1;
  margin-bottom: 4px;
}

.cta-primary__title {
  font-family: var(--ff-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.cta-primary__badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  background: var(--prune);
  border-radius: 6px;
  padding: 3px 7px;
  align-self: flex-start;
  flex-shrink: 0;
}

.cta-primary__arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.cta-primary:hover .cta-primary__arrow {
  transform: translateX(4px);
  color: var(--prune-light);
}

/* ─── EXCLUSIVE PREVIEW CARD ─── */
.exclusive-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.exclusive-card__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--prune-light);
  padding: 14px 16px 10px;
}

.exclusive-card__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 0 3px;
}

.exclusive-card__thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
}

.exclusive-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.exclusive-card__blur {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 13, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exclusive-card__lock-icon {
  color: #ffffff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.exclusive-card__unlock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 14px 14px;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--prune-dim), rgba(127,98,105,0.10));
  border: 1px solid var(--prune-glow);
  border-radius: var(--radius-md);
  font-family: var(--ff-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--bone);
  letter-spacing: 0.04em;
  transition: background 0.25s ease, transform 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}

.exclusive-card__unlock:hover {
  background: linear-gradient(135deg, rgba(127,98,105,0.28), rgba(216,207,188,0.12));
}

.exclusive-card__unlock:active {
  transform: scale(0.97);
}

/* ─── SOCIALS GRID ─── */
.socials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px 16px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

.social-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--prune-dim), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: inherit;
}

.social-card:hover {
  background: var(--glass-hover);
  border-color: rgba(127,98,105,0.4);
}

.social-card:hover::before {
  opacity: 1;
}

.social-card:active {
  transform: scale(0.96);
}

.social-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  margin-bottom: 8px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.social-card:hover .social-card__icon {
  color: var(--prune-light);
  border-color: rgba(127,98,105,0.4);
}

.social-card__name {
  font-family: var(--ff-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.social-card__handle {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.social-card__arrow {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.social-card:hover .social-card__arrow {
  transform: translate(3px, -3px);
  color: var(--prune-light);
}

/* ─── MESSAGE CTA ─── */
.message-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}

.message-cta:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.18);
  background: var(--glass-hover);
}

.message-cta:active {
  transform: scale(0.97);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.hub-footer {
  padding: 20px var(--pad-x) max(env(safe-area-inset-bottom), 28px);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hub-footer__copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.hub-footer__dot {
  opacity: 0.4;
}

.hub-footer__age {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ══════════════════════════════════════
   REVEAL ANIMATIONS
══════════════════════════════════════ */
.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease-out-expo),
    transform 0.7s var(--ease-out-expo);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════ */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(127,98,105,0.30);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(127,98,105,0.55);
}

/* ══════════════════════════════════════
   RESPONSIVE TWEAKS
══════════════════════════════════════ */
@media (min-width: 420px) {
  .hero__portrait-wrap {
    width: 158px;
    height: 158px;
  }

  .hero__portrait {
    width: 158px;
    height: 158px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.1ms !important;
  }

  .grain-overlay {
    animation: none;
  }

  .hero__portrait-ring {
    animation: none;
  }

  .hero__portrait-glow {
    animation: none;
  }
}

/* ══════════════════════════════════════
   STATUS BADGE (Active Now)
══════════════════════════════════════ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(127, 98, 105, 0.16);
  border: 1px solid rgba(127, 98, 105, 0.28);
  border-radius: 20px;
  padding: 6px 14px;
  margin-top: 16px;
  font-family: var(--ff-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--prune-light);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: #55d082; /* Bright emerald green status */
  border-radius: 50%;
  box-shadow: 0 0 8px #55d082;
  animation: status-pulse 1.8s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50%       { opacity: 1; transform: scale(1.2); }
}

/* Offline state styling */
.status-badge.is-offline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.status-badge.is-offline .status-dot {
  background-color: rgba(216, 207, 188, 0.35);
  box-shadow: none;
  animation: none;
}

/* ══════════════════════════════════════
   STORIES CAROUSEL
══════════════════════════════════════ */
.stories-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  margin-bottom: 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.stories-carousel::-webkit-scrollbar {
  display: none; /* Hide standard bar for pure mobile feel */
}

.story-bubble {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s var(--ease-spring);
}

.story-bubble:active {
  transform: scale(0.92);
}

.story-bubble__ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, var(--prune), var(--bone), var(--prune-light));
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-bubble__img-wrap {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--black);
  overflow: hidden;
  background: var(--black-mid);
  position: relative;
}

.story-bubble__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.story-bubble__img--blurred {
  filter: blur(2.5px) brightness(0.72) contrast(0.95);
}

.story-bubble__star-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  filter: drop-shadow(0 1px 4px rgba(255, 255, 255, 0.45));
  z-index: 2;
  pointer-events: none;
}

.story-bubble__label {
  font-family: var(--ff-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════
   STORY VIEWER (Fullscreen Modal)
══════════════════════════════════════ */
.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.story-viewer[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.story-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 13, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.story-viewer__container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  height: 100%;
  max-height: 100dvh;
  background: #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: max(env(safe-area-inset-top), 16px);
  padding-bottom: max(env(safe-area-inset-bottom), 16px);
}

/* Progress bar indicators */
.story-viewer__progress-container {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  margin-bottom: 12px;
}

.story-viewer__progress-bar {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
}

.story-viewer__progress-fill {
  width: 0%;
  height: 100%;
  background: var(--text-primary);
}

/* Header style */
.story-viewer__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.story-viewer__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  object-fit: cover;
}

.story-viewer__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.story-viewer__username {
  font-family: var(--ff-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.story-viewer__time {
  font-size: 10px;
  color: var(--text-muted);
}

.story-viewer__close {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Story Content display */
.story-viewer__content {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin: 0 8px;
}

.story-viewer__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Navigation Tap Zones */
.story-viewer__nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  z-index: 2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.story-viewer__nav--left {
  left: 0;
}

.story-viewer__nav--right {
  right: 0;
}

/* Bottom Swipe CTA button */
.story-viewer__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 20px 8px;
  color: var(--text-primary);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  animation: cta-bounce 2s ease-in-out infinite;
}

.story-viewer__cta-chevron {
  font-size: 10px;
  color: var(--prune-light);
  line-height: 1;
}

.story-viewer__cta-text {
  font-family: var(--ff-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bone);
  border-bottom: 1px solid var(--prune-glow);
  padding-bottom: 2px;
}

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

/* ══════════════════════════════════════
   VALENTINA CHATBOT WIDGET
   ══════════════════════════════════════ */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  font-family: var(--ff-body);
}

/* Floating Action Button (FAB) */
.chat-fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #181415 0%, #0d0d0a 100%);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 12px var(--prune-dim);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease, border-color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.chat-fab:hover {
  transform: scale(1.06);
  border-color: rgba(127, 98, 105, 0.5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 18px var(--prune-glow);
}

.chat-fab:active {
  transform: scale(0.95);
}

.chat-fab__pulse {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid var(--prune-light);
  opacity: 0;
  pointer-events: none;
  animation: fab-pulse 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes fab-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.chat-fab__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.chat-fab:hover .chat-fab__icon {
  transform: rotate(-8deg) scale(1.05);
}

.chat-fab__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--prune);
  color: var(--text-primary);
  font-family: var(--ff-sans);
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--black);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  animation: badge-bounce 1s var(--ease-spring) 3;
}

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

/* Chat Panel Window (Mesh Gradient Inspired by ChatGPT layout) */
.chat-panel {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 380px;
  height: 560px;
  border-radius: 28px;
  background: radial-gradient(circle at 10% 20%, rgba(127, 98, 105, 0.20) 0%, transparent 45%),
              radial-gradient(circle at 90% 80%, rgba(61, 43, 107, 0.18) 0%, transparent 50%),
              linear-gradient(135deg, #0d0c10 0%, #050507 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
  transform-origin: bottom right;
}

.chat-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header style */
.chat-header {
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header__info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header__avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
}

.chat-header__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.chat-header__status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background-color: #55d082;
  border-radius: 50%;
  border: 1.5px solid #0c0c11;
  box-shadow: 0 0 6px #55d082;
}

.chat-header__text {
  display: flex;
  flex-direction: column;
}

.chat-header__name {
  font-family: var(--ff-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.chat-header__status-text {
  font-family: var(--ff-sans);
  font-size: 10px;
  color: var(--prune-light);
  letter-spacing: 0.03em;
  opacity: 0.8;
}

.chat-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-header__btn {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.chat-header__btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

/* Developer Key Modal styling */
.chat-dev-modal {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.chat-dev-modal__content {
  background: #0f0f15;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 20px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-dev-modal__content h4 {
  font-family: var(--ff-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-dev-modal__content p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.chat-dev-modal__content input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: monospace;
  font-size: 13px;
  width: 100%;
  outline: none;
}

.chat-dev-modal__content input:focus {
  border-color: var(--prune-light);
}

.chat-dev-modal__actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.chat-dev-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-family: var(--ff-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: background 0.2s;
}

.chat-dev-btn--save {
  background: var(--prune);
  color: var(--text-primary);
}

.chat-dev-btn--save:hover {
  background: var(--prune-light);
}

.chat-dev-btn--cancel {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.chat-dev-btn--cancel:hover {
  background: rgba(255, 255, 255, 0.14);
}

.chat-dev-modal__status {
  font-size: 10px !important;
  color: var(--text-muted) !important;
  text-align: center;
  margin-top: 4px;
}

/* Chat Body (Message area wrapper) */
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  scrollbar-width: thin;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Chat Intro Profile Card (Avatar + Name + Status Dot) */
.chat-intro-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 16px 10px; /* Reduced top padding to close the gap */
  margin-bottom: 8px;
  animation: msg-slide 0.45s var(--ease-out-expo) forwards;
}

.chat-intro-card__avatar-wrap {
  position: relative;
  width: 64px; /* A tiny bit larger, perfectly aesthetic */
  height: 64px;
  margin-bottom: 10px;
}

.chat-intro-card__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.chat-intro-card__status-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 12px; /* Balanced proportionally */
  height: 12px;
  background-color: #55d082;
  border-radius: 50%;
  border: 1.8px solid #0a0a0f;
  box-shadow: 0 0 6px #55d082;
}

.chat-intro-card__name {
  font-family: var(--ff-serif);
  font-size: 18px; /* Refined slightly smaller size */
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.chat-intro-card__status {
  font-family: var(--ff-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--prune-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Message Bubble formatting (ChatGPT floating pill aesthetic) */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  animation: msg-slide 0.35s var(--ease-out-expo) forwards;
}

@keyframes msg-slide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg--received {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-msg--sent {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg__bubble {
  padding: 12px 18px;
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 450;
  line-height: 1.45;
  border-radius: 20px;
  word-break: break-word;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.chat-msg--received .chat-msg__bubble {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-bottom-left-radius: 6px;
}

.chat-msg--sent .chat-msg__bubble {
  background: rgba(255, 255, 255, 0.96);
  color: #0c0c0e;
  border-bottom-right-radius: 6px;
}

.chat-msg__time {
  font-family: var(--ff-sans);
  font-size: 9.5px;
  color: var(--text-muted);
  margin-top: 6px;
  padding: 0 6px;
  opacity: 0.8;
}

/* Typing Indicator styling */
.chat-typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 4px;
  animation: msg-slide 0.25s var(--ease-out-expo) forwards;
}

.chat-typing-dots {
  display: flex;
  gap: 4px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  border-bottom-left-radius: 6px;
}

.chat-typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  opacity: 0.4;
  animation: dot-bounce 1.4s infinite ease-in-out both;
}

.chat-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.chat-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.15); opacity: 0.95; }
}

.chat-typing-text {
  font-family: var(--ff-sans);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Chat Footer (Unified floating capsule layout) */
.chat-footer {
  padding: 14px 16px 22px;
  background: transparent;
  border-top: none;
  display: flex;
  flex-direction: column; /* Vertical flex to center the disclaimer underneath */
  align-items: center;
  gap: 8px;
}

.chat-footer__wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 4px 6px;
  transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
}

.chat-footer__wrapper:focus-within {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(127, 98, 105, 0.45);
  box-shadow: 0 0 14px rgba(127, 98, 105, 0.15);
}

.chat-footer input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: var(--ff-sans);
  font-size: 13.5px;
  outline: none;
  -webkit-appearance: none;
}

.chat-footer input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.chat-footer__btn {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.chat-footer__btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.chat-send-btn {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease-spring);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.chat-send-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  transform: scale(1.05);
}

.chat-send-btn:active {
  transform: scale(0.92);
}

/* Desktop defaults for screenshot components */
.chat-header__logo-wrap {
  display: none;
}

.chat-header__logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.chat-header__dots {
  display: none;
  align-items: center;
  gap: 5px;
}

.chat-header__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.chat-header__dot--active {
  width: 15px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.85);
}

/* ══════════════════════════════════════
   MOBILE & TABLET RESPONSIVE OVERLAY
   ══════════════════════════════════════ */
@media (max-width: 480px) {
  .chat-widget {
    bottom: 16px;
    right: 16px;
  }

  .chat-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    background: radial-gradient(circle at 10% 20%, rgba(127, 98, 105, 0.22) 0%, transparent 45%),
                radial-gradient(circle at 90% 80%, rgba(61, 43, 107, 0.20) 0%, transparent 50%),
                linear-gradient(135deg, #09080b 0%, #020203 100%) !important;
    border: none;
    transform: translateY(100%);
    transform-origin: bottom center;
    z-index: 1000;
  }

  .chat-panel.is-open {
    transform: translateY(0);
  }

  /* Morph Header Layout to screenshot style */
  .chat-header__info {
    display: none; /* Hide structured info */
  }

  .chat-header__logo-wrap {
    display: block; /* Show V logo in top left */
  }

  .chat-header__dots {
    display: flex; /* Show center dots indicators */
  }

  .chat-header {
    background: transparent;
    border-bottom: none;
    padding: max(env(safe-area-inset-top), 20px) 24px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .chat-header__actions {
    display: flex;
    align-items: center;
  }

  /* Floating round black translucent close button (screenshot inspired) */
  .chat-header__btn#chat-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, transform 0.2s;
  }

  .chat-header__btn#chat-close:hover {
    background: rgba(255, 255, 255, 0.15);
  }

  .chat-header__btn#chat-close:active {
    transform: scale(0.92);
  }

  .chat-footer {
    padding: 12px 10px max(env(safe-area-inset-bottom), 16px); /* 10px padding for full-width input on mobile */
  }
}

.chat-disclaimer {
  font-family: var(--ff-sans);
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  margin-top: 8px;
  opacity: 0.6;
  letter-spacing: 0.01em;
  pointer-events: none;
}

/* Floating Image Message Bubble (Supabase / Markdown inspired) */
.chat-msg__bubble--image {
  padding: 4px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 20px !important;
  max-width: 280px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.chat-msg__image {
  width: 100%;
  height: auto;
  max-height: 220px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}





