   dentro de .feed-live-create-shell, no es un .feed-live-story directo). Al tocar
   ese bubble el rail gana .stories-open y aparece el resto, liberando el UI.
   Apertura/cierre ANIMADO: en vez de ocultar en seco, cada historia colapsa su
   ancho y se encoge/desvanece hacia la izquierda. Se anima con transicion, no con
   display:none (que no se puede animar). El margen negativo (= -gap) absorbe el
   hueco del `gap:14px` para que plegadas NO dejen espacio tras "Tus aportes". Se
   encoge con scale+opacity (no overflow:hidden) para no recortar el halo/insignia
   de los aros cuando estan abiertos. */
#feedGuidedRail .feed-live-strip > .feed-live-story {
  max-width: 120px;
  transition: max-width 0.34s ease, opacity 0.26s ease,
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), margin-left 0.34s ease;
}
#feedGuidedRail:not(.stories-open) .feed-live-strip > .feed-live-story {
  max-width: 0;
  opacity: 0;
  transform: scale(0.5) translateX(-10px);
  transform-origin: left center;
  margin-left: -14px;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #feedGuidedRail .feed-live-strip > .feed-live-story {
    transition: none;
  }
}

/* En MOVIL, al desplegar las historias ocultamos busqueda y notificaciones
   (.topbar-quick es hermana del rail dentro de .topbar-main): se colapsan a la
   derecha para que las historias tengan todo el ancho. Al plegar, vuelven. */
@media (max-width: 760px) {
  #feedGuidedRail.stories-open ~ .topbar-quick {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, max-width 0.28s ease;
  }
}

/* Boton para VOLVER A PLEGAR: es la primera "historia" cuando estan desplegadas
   (antes que "Tus aportes"). Circulo neutro con una flecha ← , alineado con los
   aros. Como es un .feed-live-story directo, hereda la animacion de apertura y se
   oculta solo (max-width:0) cuando el rail esta plegado. */
.feed-live-story-collapse-ring {
  background: rgba(21, 21, 23, 0.92);
  border: 1px solid rgba(171, 178, 148, 0.45);
  box-shadow: 0 6px 16px rgba(8, 11, 1, 0.3);
  color: var(--text-soft, #e2e8cd);
  font-size: 22px;
}
.feed-live-story-collapse:hover .feed-live-story-collapse-ring {
  background: rgba(29, 29, 32, 0.96);
  color: #fff;
}

/* Afordancia "se puede abrir": flecha en el borde derecho del aro cuando las
   historias estan plegadas. Va centrada verticalmente para NO pisar la insignia
   "+" (que vive abajo-derecha) y late suave hacia la derecha para invitar. */
#feedGuidedRail:not(.stories-open) .feed-live-create-shell .feed-live-story-ring {
  position: relative;
}
#feedGuidedRail:not(.stories-open) .feed-live-create-shell .feed-live-story-ring::after {
  content: "\276F"; /* ❯ chevron derecho */
  position: absolute;
  top: 50%;
  right: -9px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--color-accent, #c6df74);
  color: #101404;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  animation: ttStoriesHint 1.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}
@keyframes ttStoriesHint {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  #feedGuidedRail:not(.stories-open) .feed-live-create-shell .feed-live-story-ring::after {
    animation: none;
  }
}

.feed-live-strip-skeleton {
  gap: 12px;
  padding-bottom: 6px;
}

.feed-live-story-skeleton {
  min-width: 82px;
  cursor: default;
}

.feed-live-story-ring-skeleton {
  display: inline-grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(117, 124, 93, 0.16);
  box-shadow: 0 6px 12px rgba(59, 71, 19, 0.18);
}

.feed-live-story-avatar-skeleton {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background:
    radial-gradient(circle at 22% 18%, rgba(239, 253, 192, 0.14), transparent 24%),
    linear-gradient(90deg, rgba(117, 124, 93, 0.18), rgba(148, 155, 123, 0.38), rgba(117, 124, 93, 0.18));
  background-size: auto, 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.feed-live-story-line-skeleton {
  width: 68%;
  height: 10px;
  margin: 0 auto;
}

.feed-live-story {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  width: 82px;
  height: auto;
  min-height: 0;
  display: grid;
  justify-items: center;
  gap: 0;
  cursor: pointer;
  color: inherit;
  flex: 0 0 82px;
  overflow: visible;
  align-content: start;
  transition: all 0.2s ease;
}

@media (max-width: 760px) {
  #authModal.modal {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  #authModal .auth-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding:
      max(10px, env(safe-area-inset-top, 0px))
      14px
      max(14px, env(safe-area-inset-bottom, 0px)) !important;
    display: grid;
    align-content: start;
    gap: 10px;
  }

  #authModal .auth-head {
    gap: 8px;
    margin-top: 50px;
  }

  #authModal .auth-head h3 {
    font-size: 18px;
  }

  #authModal .panel-sub {
    margin: 2px 0 0;
    font-size: 12px;
  }

  #authModal .auth-steps {
    justify-content: flex-start;
    gap: 0;
    margin-top: -2px;
  }

  #authModal .auth-step {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  #authModal .auth-step i {
    font-size: 13px;
  }

  #authModal .auth-section {
    gap: 10px;
  }

  #authModal .auth-section label {
    font-size: 12px;
  }

  #authModal .auth-section input,
  #authModal .auth-section button.primary,
  #authModal .auth-inline-actions button {
    min-height: 42px;
  }

  #authModal .auth-status {
    min-height: 0;
    font-size: 12px;
  }
}

.feed-live-create-shell {
  position: relative;
  flex: 0 0 auto;
  overflow: visible;
}

.feed-live-create-menu {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  min-width: 200px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(221, 252, 119, 0.2);
  background:
    radial-gradient(circle at top right, rgba(221, 252, 119, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(10, 10, 11, 0.98), rgba(7, 7, 8, 0.99));
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.feed-live-create-menu-item {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #f2f2f1;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.feed-live-create-menu-item:hover,
.feed-live-create-menu-item:focus-visible {
  border-color: rgba(221, 252, 119, 0.28);
  background: rgba(221, 252, 119, 0.09);
}

.feed-live-create-menu-item i {
  width: 16px;
  text-align: center;
  color: rgba(207, 249, 70, 0.96);
}

.feed-live-story-ring {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Each story type sets --story-color; ring and badge share it so the whole
     bubble reads as a single coloured piece. Default is the brand green. */
  --story-color: #6eea8e;
  --story-color-strong: #33c96a;
  --story-ink: #1a2201;
  background: var(--story-color);
  padding: 3px;
  box-shadow:
    0 6px 16px rgba(8, 11, 1, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.320, 1), box-shadow 0.2s ease, filter 0.2s ease;
}

.feed-live-story-skeleton .feed-live-story-ring,
.feed-live-story-ring.feed-live-story-ring-skeleton {
  background: rgba(117, 124, 93, 0.16);
  box-shadow:
    0 8px 16px rgba(59, 71, 19, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.feed-live-story-create .feed-live-story-ring {
  background: rgba(177, 209, 71, 0.95);
  box-shadow:
    0 6px 12px rgba(59, 71, 19, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.feed-live-story:hover .feed-live-story-ring,
.feed-live-story:focus-visible .feed-live-story-ring {
  transform: translateY(-3px) scale(1.05);
  filter: saturate(1.2) brightness(1.08);
  /* Pause the FOMO pulse on hover so its box-shadow keyframes don't fight this one. */
  animation-play-state: paused;
  box-shadow:
    0 14px 26px rgba(10, 13, 1, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 22px color-mix(in srgb, var(--story-color) 45%, transparent);
}

.feed-live-story:hover,
.feed-live-story:focus-visible {
  transform: translateY(-2px);
}

.feed-live-story-avatar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 2px solid #090909;
  background: rgba(13, 13, 15, 0.96);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15);
}

.feed-live-story-avatar-fallback,
.feed-live-story-create-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f4f5f3;
  font-size: 24px;
}

.feed-live-story-create-icon {
  color: #ececea;
}

.feed-live-story-create-badge {
  position: absolute;
  right: -1px;
  bottom: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #090909;
  background: linear-gradient(180deg, rgba(207, 249, 70, 0.98), rgba(159, 190, 56, 0.98));
  color: #101012;
  box-shadow: 0 8px 18px rgba(59, 71, 19, 0.24);
  z-index: 2;
}

.feed-live-story-create-badge i {
  font-size: 11px;
  margin: 0px;
}

.feed-live-story-suggest {
  gap: 6px;
}

.feed-live-story-suggest .feed-live-story-name {
  color: rgba(220, 236, 255, 0.9);
}

.feed-live-story-follow-badge {
  position: absolute;
  right: -1px;
  bottom: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #090909;
  background: linear-gradient(180deg, rgba(126, 197, 255, 0.98), rgba(54, 124, 232, 0.96));
  color: #e8f3ff;
  box-shadow: 0 8px 18px rgba(20, 44, 92, 0.28);
  z-index: 2;
}

.feed-live-story-follow-badge i {
  font-size: 10px;
  margin: 0px;
}

.feed-live-story-cta {
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(188, 223, 255, 0.92);
}

.feed-live-story-suggest:disabled {
  cursor: wait;
}

.feed-live-story-suggest.is-loading .feed-live-story-cta {
  color: rgba(214, 232, 255, 0.84);
}

.feed-live-story-badge {
  /* Small side bubble on the ring's corner (same treatment as the create/follow
     badges) instead of a wide text pill, so it reads as a quiet status dot
     rather than a label competing with the avatar. */
  position: absolute;
  right: -1px;
  bottom: 4px;
  left: auto;
  transform: none;
  z-index: 2;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Badge inherits the same --story-color as its ring; the dark outline fuses it
     visually into the avatar/ring so the whole thing looks like one piece. */
  border: 2px solid #0a0a0b;
  background: linear-gradient(180deg, var(--story-color), var(--story-color-strong));
  color: var(--story-ink);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.4),
    0 0 0 1px color-mix(in srgb, var(--story-color) 55%, transparent);
}

.feed-live-story-badge i {
  font-size: 11px;
  margin: 0;
}

.feed-live-story-name {
  max-width: 82px;
  font-size: 11px;
  line-height: 1.3;
  color: rgba(241, 242, 240, 0.88);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-top: 10px;
}

/* FOMO pulse for time-sensitive stories (happening now / live). */
@keyframes story-fomo-glow {
  0% {
    box-shadow:
      0 6px 16px rgba(8, 11, 1, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 0 0 0 color-mix(in srgb, var(--story-color) 70%, transparent),
      0 0 14px 0 color-mix(in srgb, var(--story-color) 50%, transparent);
  }
  70% {
    box-shadow:
      0 6px 18px rgba(8, 11, 1, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 0 0 9px color-mix(in srgb, var(--story-color) 0%, transparent),
      0 0 20px 2px color-mix(in srgb, var(--story-color) 34%, transparent);
  }
  100% {
    box-shadow:
      0 6px 16px rgba(8, 11, 1, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 0 0 0 color-mix(in srgb, var(--story-color) 0%, transparent),
      0 0 14px 0 color-mix(in srgb, var(--story-color) 50%, transparent);
  }
}

@keyframes story-fomo-badge {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Rotating light sweep around the ring — the premium "something's live" cue. */
@keyframes story-fomo-sweep {
  to {
    transform: rotate(1turn);
  }
}

/* Per-type colors: each type only sets its --story-color trio, and both the
   ring and the badge pick it up automatically, so every bubble is one piece. */

/* User echo — turquoise */
.feed-live-story-actual .feed-live-story-ring {
  --story-color: #4fd6c9;
  --story-color-strong: #2fb6ac;
  --story-ink: #1a2201;
}

/* Happening now — red, with an attention-grabbing pulsing halo + light sweep.
   Excluded on the "Create" bubble, which shows your own avatar/icon, not a flyer. */
.feed-live-story-now-event .feed-live-story-ring {
  --story-color: #ff5f7a;
  --story-color-strong: #e23a5a;
  --story-ink: #2a0008;
}

.feed-live-story-now-event:not(#feedLiveStartBtn) .feed-live-story-ring,
.feed-live-story-soon-event:not(#feedLiveStartBtn) .feed-live-story-ring,
.feed-live-story-live-radio:not(#feedLiveStartBtn) .feed-live-story-ring {
  animation: story-fomo-glow 1.9s ease-in-out infinite;
}

.feed-live-story-now-event:not(#feedLiveStartBtn) .feed-live-story-ring::after,
.feed-live-story-soon-event:not(#feedLiveStartBtn) .feed-live-story-ring::after,
.feed-live-story-live-radio:not(#feedLiveStartBtn) .feed-live-story-ring::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 250deg,
    color-mix(in srgb, var(--story-color) 85%, #ffffff) 320deg,
    #ffffff 340deg,
    transparent 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: story-fomo-sweep 2.6s linear infinite;
  opacity: 0.9;
}

.feed-live-story-now-event:not(#feedLiveStartBtn) .feed-live-story-badge,
.feed-live-story-soon-event:not(#feedLiveStartBtn) .feed-live-story-badge,
.feed-live-story-live-radio:not(#feedLiveStartBtn) .feed-live-story-badge {
  animation: story-fomo-badge 1.9s ease-in-out infinite;
}

/* Coming soon — amber, same FOMO pulse/sweep as "happening now" (just above)
   so a countdown badge (e.g. "37m") reads as urgent too, not just AHORA. */
.feed-live-story-soon-event .feed-live-story-ring {
  --story-color: #ffb24d;
  --story-color-strong: #f0902d;
  --story-ink: #2a1602;
}

/* Live radio — its own violet identity, not the event-countdown red, even
   though it shares the same FOMO pulse/sweep since it's happening right now. */
.feed-live-story-live-radio .feed-live-story-ring {
  --story-color: #a78bfa;
  --story-color-strong: #7c5cf0;
  --story-ink: #180a33;
}

/* Suggestions / profile — blue */
.feed-live-story-suggest .feed-live-story-ring {
  --story-color: #5aa2ff;
  --story-color-strong: #2f78e6;
  --story-ink: #041428;
}

/* New event — orange */
.feed-live-story-new-event .feed-live-story-ring {
  --story-color: #ff9a4d;
  --story-color-strong: #f0742d;
  --story-ink: #2a1202;
}

.feed-live-story-own-story .feed-live-story-name {
  color: rgba(255, 241, 214, 0.95);
}

.story-compose-modal-panel,
.story-viewer-modal-panel {
  position: relative;
  width: min(100%, 430px);
  height: min(88vh, 820px);
  max-width: min(calc(100vw - 32px), 430px);
  max-height: min(88vh, 820px);
  padding: 0 !important;
  border-radius: 28px;
  gap: 0;
  background: #000;
  border: 1px solid rgba(210, 243, 101, 0.16);
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr;
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.42);
}
.story-compose-modal-panel {
  overflow: visible;
}

.story-compose-dropzone {
  position: relative;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 14px;
  background: #000;
  overflow: hidden;
}

.story-compose-camera {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.story-compose-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  z-index: 2;
}

.story-compose-no-camera-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.story-compose-no-camera-hint i {
  font-size: 36px;
}

.story-compose-camera-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 28px 36px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
}

.story-compose-camera-bar .story-compose-gallery-btn {
  justify-self: start;
}

.story-compose-camera-bar .story-compose-shutter-btn {
  justify-self: center;
}

.story-compose-camera-bar .story-compose-flip-btn {
  justify-self: end;
}

.story-compose-camera-bar .story-compose-flip-btn.hidden {
  visibility: hidden;
  pointer-events: none;
  display: inline-flex;
}

.story-compose-gallery-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(7, 7, 8, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(210, 243, 101, 0.22);
  color: #d2f365;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.story-compose-gallery-btn:hover {
  background: rgba(14, 14, 16, 0.86);
  border-color: rgba(210, 243, 101, 0.4);
}

.story-compose-shutter-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 3px solid rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3), 0 6px 24px rgba(0, 0, 0, 0.5);
}

.story-compose-shutter-btn:hover {
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12), 0 6px 24px rgba(0, 0, 0, 0.5);
}

.story-compose-shutter-btn:active {
  transform: scale(0.94);
}

.story-compose-shutter-btn:active::after {
  transform: scale(0.88);
}

.story-compose-bar-spacer {
  width: 48px;
  flex-shrink: 0;
}

.story-compose-flip-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(7, 7, 8, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(210, 243, 101, 0.22);
  color: #d2f365;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.story-compose-flip-btn:hover {
  background: rgba(14, 14, 16, 0.86);
  border-color: rgba(210, 243, 101, 0.4);
}

.story-compose-flip-btn.is-flipping {
  transform: rotate(180deg);
}

.story-compose-dropzone.has-image .story-compose-camera-bar,
.story-compose-dropzone.has-image .story-compose-camera,
.story-compose-dropzone.has-image .story-compose-no-camera-hint {
  display: none;
}

.story-compose-filter-strip {
  position: absolute;
  bottom: 120px;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 10px;
  padding: 20px 16px 35px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
  user-select: none;
}

.story-compose-filter-strip::-webkit-scrollbar {
  display: none;
}

.story-compose-filter-btn {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.story-compose-filter-thumb {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  border: 2.5px solid transparent;
  transition: border-color 0.18s, transform 0.18s;
  display: block;
}

.story-compose-filter-btn.active .story-compose-filter-thumb {
  border-color: #fff;
  transform: scale(1.06);
}

.story-compose-filter-name {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 0.18s, font-weight 0.18s;
  white-space: nowrap;
}

.story-compose-filter-btn.active .story-compose-filter-name {
  color: #fff;
  font-weight: 700;
}

.story-compose-text-layer {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  overflow: visible;
}
.story-compose-text-layer.is-active {
  pointer-events: none; /* items have their own pointer-events: auto */
}
.story-compose-text-layer.has-selection {
  pointer-events: auto; /* captures tap-outside when an item is being edited */
}

/* === Multi-text items === */
.story-text-item {
  position: absolute;
  touch-action: none;
  user-select: none;
  pointer-events: auto;
  transform-origin: center center;
  cursor: grab;
  padding: 8px;
}
.story-text-item.is-dragging { cursor: grabbing; }
.story-text-item.is-selected .story-text-item-box {
  outline: 1.5px dashed rgba(255, 255, 255, 0.5);
  outline-offset: 3px;
}
.story-text-item-box {
  outline: none;
  min-width: 40px;
  max-width: 260px;
  word-break: break-word;
  line-height: 1.3;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: pre-wrap;
  pointer-events: auto;
  cursor: text;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  caret-color: currentColor;
}
.story-text-item-box:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
.story-text-item-box.bg-dark {
  background: rgba(0, 0, 0, 0.62);
  text-shadow: none;
  border-radius: 8px;
  padding: 5px 12px;
}
.story-text-item-box.bg-light {
  background: rgba(255, 255, 255, 0.88);
  text-shadow: none;
  border-radius: 8px;
  padding: 5px 12px;
}
.story-text-item-box.bg-blur {
  background: rgba(8, 8, 8, 0.44);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-shadow: none;
  border-radius: 8px;
  padding: 5px 12px;
}

/* === Vertical color strip === */
.story-compose-color-strip {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 5px;
  background: rgba(8, 8, 8, 0.68);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1px solid rgba(210, 243, 101, 0.14);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
.story-compose-color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, border-color 0.15s;
  pointer-events: auto;
}
.story-compose-color-swatch.active,
.story-compose-color-swatch:hover {
  border-color: #fff;
  transform: scale(1.22);
}

/* === Trash drop zone (shown during text drag) === */
.story-compose-trash-zone {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(200, 40, 40, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  pointer-events: none;
  transition: transform 0.15s, background 0.15s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.story-compose-trash-zone.over {
  background: rgba(220, 50, 50, 1);
  transform: translateX(-50%) scale(1.25);
}

/* === Compact text controls bar === */
.story-compose-text-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
}
.story-compose-tcb {
  height: 38px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.story-compose-tcb:hover,
.story-compose-tcb:active {
  background: rgba(255, 255, 255, 0.2);
}
.story-compose-tcb-font {
  min-width: 56px;
  font-style: italic;
  font-weight: 700;
}

.story-compose-text-toggle-btn {
  grid-area: text;
  justify-self: start;
  align-self: start;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  pointer-events: auto;
  background: rgba(7, 7, 8, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(210, 243, 101, 0.34);
  color: #d2f365;
  font-size: 14px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.story-compose-text-toggle-btn:hover {
  background: rgba(14, 14, 16, 0.86);
  border-color: rgba(210, 243, 101, 0.5);
}

.story-compose-floating-actions {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  padding: 16px 16px 36px;
  grid-template-areas:
    "text  upload"
    ".     ."
    "bottom bottom";
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  z-index: 600;
}

.story-compose-bottom-actions {
  grid-area: bottom;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  pointer-events: none;
}

.story-compose-bottom-actions .story-compose-retake-btn {
  grid-column: 1;
  justify-self: end;
  margin-right: 24px;
}

.story-compose-bottom-actions .story-compose-submit-btn {
  grid-column: 2;
}

.story-compose-close-btn {
  grid-area: upload;
  justify-self: end;
  align-self: start;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  pointer-events: auto;
  background: rgba(210, 243, 101, 0.14);
  border: 1px solid rgba(210, 243, 101, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d2f365;
  font-size: 18px;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.story-compose-close-btn:hover {
  background: rgba(210, 243, 101, 0.22);
  border-color: rgba(210, 243, 101, 0.46);
}

.story-compose-close-btn i {
  margin: 0;
}

.story-compose-upload-btn {
  grid-area: upload;
  justify-self: end;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  pointer-events: auto;
  background: rgba(210, 243, 101, 0.14);
  border: 1px solid rgba(210, 243, 101, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d2f365;
  font-size: 18px;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.story-compose-upload-btn:hover {
  background: rgba(210, 243, 101, 0.22);
  border-color: rgba(210, 243, 101, 0.46);
}

.story-compose-upload-btn i {
  margin: 0;
}

.story-compose-submit-btn {
  position: relative;
  width: 76px;
  height: 76px;
  min-width: 76px;
  min-height: 76px;
  padding: 0;
  border-radius: 50%;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 3px solid rgba(255, 255, 255, 0.9);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3), 0 6px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s, box-shadow 0.15s;
}

.story-compose-submit-btn:hover {
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12), 0 6px 24px rgba(0, 0, 0, 0.5);
  transform: scale(1.04);
}

.story-compose-submit-btn:active {
  transform: scale(0.94);
}

.story-compose-submit-btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.story-compose-submit-btn i {
  margin: 0;
}

.story-compose-retake-btn {
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  padding: 0;
  border-radius: 50%;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.story-compose-retake-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.8);
}

.story-compose-retake-btn:active {
  transform: scale(0.9) rotate(-45deg);
}

.story-compose-retake-btn i {
  margin: 0;
}

.story-compose-head h3 {
  margin: 0;
}

.story-compose-head .panel-sub {
  margin: 6px 0 0;
}

.story-compose-dropzone.is-dragover {
  border-color: rgba(221, 252, 119, 0.46);
  background: rgba(221, 252, 119, 0.06);
}

.story-compose-dropzone.has-image {
}

.story-compose-file-meta,
.story-compose-location {
  margin: 0;
  font-size: 12px;
  color: rgba(208, 215, 186, 0.72);
}

.story-compose-fields {
  display: grid;
  gap: 10px;
}

.story-compose-fields label {
  font-size: 12px;
  color: rgba(228, 229, 226, 0.82);
}

.story-compose-fields textarea,
.story-compose-fields select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #f3f3f2;
  padding: 12px 14px;
}

.story-compose-fields textarea {
  min-height: 96px;
  resize: vertical;
}

.story-compose-fields select:disabled {
  opacity: 1;
  color: rgba(242, 242, 241, 0.88);
}

.story-compose-eligibility {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.story-compose-status {
  margin: 0;
  font-size: 13px;
  color: rgba(242, 242, 241, 0.92);
}

.story-compose-status.is-error {
  color: #f1a4a4;
}

.story-compose-status.is-ok {
  color: #e0f699;
}

.story-compose-event {
  display: grid;
  gap: 2px;
}

.story-compose-event strong {
  font-size: 14px;
}

.story-compose-event span {
  font-size: 12px;
  color: rgba(209, 216, 188, 0.8);
}

.story-compose-actions {
  display: flex;
  justify-content: flex-end;
}

.story-viewer-modal-panel {
  padding: 0;
  gap: 0;
  background: #000;
  padding: 0 !important;
}

.story-viewer-shell {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 100%;
}

.story-viewer-stage {
  display: grid;
  grid-template-rows: 1fr;
  gap: 0;
  width: 100%;
  height: 100%;
  position: relative;
  transition: opacity 0.16s ease, filter 0.18s ease, transform 0.18s ease;
  transform-origin: center center;
}

.story-viewer-stage.is-swapping {
  opacity: 0;
  filter: blur(2px);
  transform: scale(0.992);
}

.story-viewer-close-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: rgba(247, 247, 247, 0.85);
  cursor: pointer;
  transition: color 0.15s ease;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.story-viewer-close-btn:hover {
  color: #fff;
}

.story-viewer-progress {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 12;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  pointer-events: none;
}

.story-viewer-progress-segment {
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.22);
}

.story-viewer-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(229, 252, 151, 0.95), rgba(209, 244, 96, 0.98));
  box-shadow: 0 0 10px rgba(210, 243, 101, 0.28);
  transition: width 0.12s linear;
}

.story-viewer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent);
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 10;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.2s ease;
}

.story-viewer-head:hover {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent);
}

.story-viewer-progress,
.story-viewer-head,
.story-viewer-bottom,
.story-viewer-side-actions {
  transition: opacity 0.18s ease;
}

.story-viewer-stage.is-holding .story-viewer-progress,
.story-viewer-stage.is-holding .story-viewer-head,
.story-viewer-stage.is-holding .story-viewer-bottom,
.story-viewer-stage.is-holding .story-viewer-side-actions {
  opacity: 0;
  pointer-events: none;
}

.story-viewer-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.story-viewer-author-avatar {
  width: 45px;
  height: 45px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.story-viewer-author-copy {
  min-width: 0;
  display: grid;
}

.story-viewer-author-copy strong,
.story-viewer-author-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-viewer-author-copy strong {
  font-size: 14px;
  color: #f7f7f7;
}

.story-viewer-author-copy span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.story-viewer-head-actions {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.story-viewer-media {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 1);
  touch-action: pan-y;
  user-select: none;
  cursor: pointer;
  /* Long-pressing the image is used to pause the story, not to trigger the
     browser/OS "save image" callout menu. */
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.story-viewer-media img {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.story-viewer-image,
.story-viewer-image-fallback {
  width: 100%;
  height: 100%;
}

.story-viewer-image {
  object-fit: contain;
  display: block;
  background: #000;
}

.story-viewer-image-fallback {
  display: grid;
  place-items: center;
  color: rgba(229, 229, 227, 0.5);
  font-size: 48px;
}

.story-viewer-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.55) 80%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
  z-index: 5;
}

.story-viewer-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px max(60px, calc(env(safe-area-inset-bottom) + 8px));
  z-index: 8;
}

.story-viewer-add-btn {
  position: absolute;
  right: 14px;
  bottom: max(0px, calc(env(safe-area-inset-bottom) + 120px));
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 999px;
  color: #d2f365;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(210, 243, 101, 0.34);
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.story-viewer-add-btn:hover {
  background: rgba(210, 243, 101, 0.2);
  border-color: rgba(210, 243, 101, 0.5);
  transform: scale(1.06);
}

.story-viewer-add-btn .story-viewer-add-label {
  font-size: 0;
  line-height: 0;
}

.story-viewer-add-btn.is-ready {
  background: linear-gradient(180deg, rgba(221, 252, 119, 0.28), rgba(162, 190, 68, 0.22));
  border-color: rgba(221, 252, 119, 0.38);
  color: #ddfc77;
}

.story-viewer-add-btn.is-warning {
  background: rgba(17, 17, 19, 0.8);
  border-color: rgba(210, 243, 101, 0.24);
  color: rgba(231, 231, 229, 0.86);
}

.story-viewer-add-btn.is-blocked {
  opacity: 0.96;
}

.story-viewer-add-btn .story-viewer-add-icon-wrap {
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
}

.story-viewer-add-btn .story-viewer-add-icon-wrap > i {
  font-size: 17px;
  line-height: 1;
  display: block;
  padding: 0 !important;
  margin: 0 !important;
}

.story-viewer-add-btn .story-viewer-add-icon-slash {
  position: absolute;
  width: 2px;
  height: 22px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-44deg);
  opacity: 0.9;
}

.story-viewer-add-btn.is-warning span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-viewer-caption {
  width: fit-content;
  max-width: min(100%, calc(100% - 68px));
  padding: 7px 14px;
  border-radius: 10px;
  color: rgba(247, 247, 247, 0.92);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  word-wrap: break-word;
  background: rgba(7, 7, 8, 0.72);
  border: 1px solid rgba(226, 227, 224, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.story-viewer-caption.is-warning {
  color: rgba(240, 240, 239, 0.96);
  border-color: rgba(210, 243, 101, 0.18);
  background: rgba(21, 25, 8, 0.86);
}

.story-viewer-open-post {
  width: calc(100% - 68px);
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(7, 7, 8, 0.82);
  border: 1px solid rgba(210, 243, 101, 0.18);
  color: #f7f7f7;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: background 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.story-viewer-open-post:hover {
  background: rgba(14, 14, 16, 0.9);
  border-color: rgba(210, 243, 101, 0.32);
}

.story-viewer-open-post-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 9px;
  background: rgba(210, 243, 101, 0.14);
  display: flex;
  align-items: center;
  justify-content: left;
  color: #d2f365;
  font-size: 15px;
  flex-shrink: 0;
}

.story-viewer-open-post-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
  align-items: flex-start;
  text-align: left;
}

.story-viewer-open-post-copy small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(210, 243, 101, 0.7);
  font-weight: 700;
  line-height: 1;
}

.story-viewer-open-post-copy > span {
  font-size: 13px;
  font-weight: 700;
  color: #f7f7f7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.story-viewer-open-post-arrow {
  color: rgba(247, 247, 247, 0.4);
  font-size: 12px;
  flex-shrink: 0;
}

/* Chevron up indicator */
.story-viewer-chevron-up {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  display: none;
  place-items: center;
  color: rgba(247, 247, 247, 0.8);
  font-size: 22px;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.story-viewer-chevron-up.visible {
  display: grid;
  animation: story-chevron-bounce 2s ease-in-out infinite;
}

.story-viewer-chevron-up.hidden {
  display: none !important;
}

@keyframes story-chevron-bounce {
  0%, 100% {
    opacity: 0.6;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
  }
}

/* Slide-up menu */
.story-viewer-slide-menu {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  min-height: 180px;
  max-height: 78%;
  overflow: hidden;
  background: rgba(10, 10, 11, 0.97);
  backdrop-filter: blur(20px);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid rgba(247, 247, 247, 0.1);
  display: flex;
  flex-direction: column;
  padding: 10px 0 0;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  pointer-events: none;
}

.story-viewer-slide-menu.show {
  transform: translateY(0);
  pointer-events: auto;
}

.story-viewer-slide-menu.is-dragging {
  transition: none;
}

.story-viewer-slide-menu.is-dragging .story-viewer-slide-handle {
  cursor: grabbing;
}

.story-viewer-slide-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(247, 247, 247, 0.25);
  align-self: center;
  margin: 0 auto 14px;
  padding: 10px 32px;
  box-sizing: content-box;
  background-clip: content-box;
  cursor: grab;
  touch-action: none;
}

.story-viewer-slide-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
  padding-bottom: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.story-viewer-slide-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(247, 247, 247, 0.86);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.story-viewer-slide-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f7f7f7;
}

.story-viewer-slide-option i {
  font-size: 18px;
  flex: 0 0 auto;
  color: rgba(247, 247, 247, 0.7);
}

.story-viewer-slide-option:hover i {
  color: #f7f7f7;
}

.story-viewer-slide-delete {
  color: rgba(255, 100, 100, 0.86);
}

.story-viewer-slide-delete i {
  color: rgba(255, 100, 100, 0.7);
}

.story-viewer-slide-delete:hover {
  background: rgba(255, 100, 100, 0.12);
  color: #ff6464;
}

.story-viewer-slide-delete:hover i {
  color: #ff6464;
}

/* Story like button — alineado con el open post button */
.story-viewer-side-actions {
  position: absolute;
  right: 16px;
  bottom: max(60px, calc(env(safe-area-inset-bottom) + 8px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 9;
}
.story-viewer-like-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 48px;
  min-width: 48px;
  height: auto;
  padding: 10px 0 8px;
  border-radius: 16px;
  border: none;
  background: rgba(10, 10, 11, 0.55);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}
.story-viewer-like-btn i {
  font-size: 22px;
  line-height: 1;
}
.story-viewer-like-btn.is-liked i {
  color: #ff4d6d;
}
.story-viewer-like-btn:active {
  transform: scale(0.88);
}
.story-viewer-like-count {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

/* Story reaction overlay (hearts) */
.story-viewer-reaction-overlay {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 10;
}

/* Quick emoji reaction row (Instagram-style) */
.story-viewer-reactions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto 10px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(8, 8, 9, 0.5);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
  width: fit-content;
  max-width: 100%;
}

.story-viewer-reaction-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.16s ease;
  filter: saturate(1);
}

.story-viewer-reaction-btn:hover,
.story-viewer-reaction-btn:focus-visible {
  transform: translateY(-4px) scale(1.28);
  filter: saturate(1.2) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  outline: none;
}

.story-viewer-reaction-btn:active {
  transform: scale(1.05);
}

.story-viewer-reaction-btn.is-popping {
  animation: story-reaction-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes story-reaction-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.6) translateY(-6px); }
  100% { transform: scale(1); }
}

/* Floating emoji burst when a reaction is sent */
.story-viewer-reaction-emoji {
  position: absolute;
  left: var(--emoji-start-x, 50%);
  top: var(--emoji-start-y, 70%);
  font-size: calc(30px * var(--emoji-size, 1));
  line-height: 1;
  pointer-events: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  animation: story-reaction-float var(--emoji-duration, 2.6s) ease-out var(--emoji-delay, 0s) forwards;
}

.story-viewer-reaction-emoji img.dv-emoji {
  width: 1em;
  height: 1em;
  margin: 0;
  vertical-align: top;
}

@keyframes story-reaction-float {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.4) rotate(0deg);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -10px) scale(1) rotate(calc(var(--emoji-rotate, 0deg) * 0.3));
  }
  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--emoji-drift, 0px)), calc(-1 * var(--emoji-rise, 200px)))
      scale(1.1)
      rotate(var(--emoji-rotate, 0deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-viewer-reaction-emoji {
    animation-duration: 1.2s;
  }
  .story-viewer-reaction-btn.is-popping {
    animation: none;
  }
}

/* Story like bubbles (who liked) */
.story-viewer-like-bubbles {
  position: absolute;
  left: 12px;
  bottom: max(130px, calc(env(safe-area-inset-bottom) + 110px));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 200px;
  pointer-events: none;
  z-index: 9;
}
.story-viewer-like-bubble {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 5px;
  border-radius: 20px;
  background: rgba(9, 9, 10, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 77, 109, 0.2);
  font-size: 12px;
  color: rgba(245, 245, 244, 0.88);
  animation: story-like-bubble-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
}
.story-viewer-like-bubble img,
.story-viewer-like-bubble-avatar {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(27, 27, 30, 0.9);
  border: 1px solid rgba(255, 77, 109, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: rgba(255, 120, 140, 0.7);
}
.story-viewer-like-bubble i.fa-heart {
  font-size: 10px;
  color: #ff4d6d;
  flex-shrink: 0;
}
.story-viewer-like-bubble.is-leaving {
  animation: story-like-bubble-out 0.35s ease-in forwards;
}
@keyframes story-like-bubble-in {
  from { opacity: 0; transform: translateY(8px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes story-like-bubble-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-10px) scale(0.92); }
}

/* Story viewers section in slide menu */
.story-viewer-viewers-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 12px;
  margin-bottom: 4px;
}
.story-viewer-viewers-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 10px;
  font-size: 13px;
  color: rgba(224, 232, 198, 0.7);
  font-weight: 600;
}
.story-viewer-viewers-head i {
  font-size: 15px;
  color: rgba(203, 227, 123, 0.65);
}
.story-viewer-viewers-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: none;
}
.story-viewer-viewers-list::-webkit-scrollbar { display: none; }
.story-viewer-viewer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  border-radius: 8px;
}
.story-viewer-viewer-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(27, 27, 30, 0.8);
  border: 1px solid rgba(185, 206, 114, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(186, 205, 125, 0.6);
  overflow: hidden;
}
.story-viewer-viewer-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: rgba(231, 231, 229, 0.82);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-viewer-reaction-row-emoji {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.story-viewer-reaction-row-emoji img.dv-emoji {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

