/* ═══════════════════════════════════════════════════════════════════
   BUFATTY · feed.css (v6 · scroll-snap, posts 100vh)
   Layout del feed + post + acciones + comentarios + sidebar.
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   PAGE · layout del feed
   ═══════════════════════════════════════════════════════════ */
.feed-page {
  max-width: 100%;
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-3) 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}

.feed-main {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  width: 100%;
}

.feed-sidebar {
  display: none;
}

/* ── Scroll snap vertical (contenedor principal) ── */
.feed-stream {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.feed-stream::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ═══════════════════════════════════════════════════════════
   POST · cada uno ocupa la pantalla completa
   ═══════════════════════════════════════════════════════════ */
.feed-stream > .post-card {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 20px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.feed-stream > .post-card .post-card-head {
  flex-shrink: 0;
}

/* Mobile */
@media (max-width: 640px) {
  .feed-stream {
    height: calc(100dvh - 56px);
  }
  .feed-stream > .post-card {
    min-height: calc(100dvh - 56px);
    height: calc(100dvh - 56px);
    padding: 16px 0 80px;
    justify-content: flex-start;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1023px) {
  .feed-stream > .post-card {
    padding: 24px 16px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .feed-stream {
    height: 100vh;
  }
  .feed-stream > .post-card {
    min-height: 100vh;
    height: 100vh;
    padding: 24px 20px;
  }
}

/* ── Scroll infinito ── */
.feed-sentinel { height: 1px; width: 100%; }

.feed-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: var(--sp-5) 0;
}
.feed-loader[hidden] { display: none; }

.feed-loader-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--text-secondary, #8a8f98);
  animation: feed-dot-pulse 1.2s infinite ease-in-out both;
}
.feed-loader-dot:nth-child(2) { animation-delay: .15s; }
.feed-loader-dot:nth-child(3) { animation-delay: .3s; }

@keyframes feed-dot-pulse {
  0%, 80%, 100% { opacity: .25; transform: scale(.8); }
  40%           { opacity: 1;   transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════
   VARIABLES DE ESTADO · adaptativas por tema
   ═══════════════════════════════════════════════════════════ */
:root {
  --reaction-idle:    #B0ADA3;
  --reaction-hover:   #F5F3EE;
  --reaction-active:  #FF6BA8;
  --reaction-comment: #7C5CFF;
}
html[data-theme="light"] {
  --reaction-idle:    #5E5A52;
  --reaction-hover:   #141414;
  --reaction-active:  #E94D8A;
  --reaction-comment: #5A3CE6;
}

/* ═══════════════════════════════════════════════════════════
   POST CARD · contenedor base
   ═══════════════════════════════════════════════════════════ */
.post-card {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  margin-bottom: 0;
  padding: 0;
}
.post-card:hover {
  border: none;
  box-shadow: none;
  transform: none;
}

/* ── Header ── */
.post-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 18px;
  width: 100%;
}
@media (min-width: 768px) {
  .post-card-head { padding: 0 0 20px; }
}

.post-card-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gradient-brand, linear-gradient(135deg, #7c5cff, #ff6ba8));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s var(--ease);
}
.post-card-avatar:hover { transform: scale(1.04); }
.post-card-avatar img { width: 100%; height: 100%; object-fit: cover; }

.post-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.post-card-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.2;
  transition: color 0.15s ease;
}
.post-card-name:hover { color: var(--accent); }

.post-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
  line-height: 1.2;
  opacity: 0.85;
}

/* ── Badge sugerido ── */
.post-card-badge-suggested {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--accent-soft, rgba(124, 92, 255, 0.15));
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--accent);
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}
html[data-theme="light"] .post-card-badge-suggested {
  background: rgba(124, 92, 255, 0.1);
  border-color: rgba(124, 92, 255, 0.25);
  color: var(--accent);
}

/* ── Texto del post ── */
.post-card-text-wrap {
  position: relative;
  flex-shrink: 0;
  max-width: 100%;
  margin: 0 0 20px;
  padding-right: 46px;
  min-height: calc(1.5em * 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-card-text {
  font-size: 0.95em;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin: 0;
}

.post-card-text-more {
  display: inline-block;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
  margin: 0;
  padding: 0 0 0 8px;
  border: 0;
  background: var(--bg-page);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.95em;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
  white-space: nowrap;
}
.post-card-text-more:hover {
  color: var(--text-primary);
  text-decoration: underline;
}
.post-card-text-more[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════════
   BODY · media + acciones
   ═══════════════════════════════════════════════════════════ */
.post-card-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 100%;
  min-height: 0;
  gap: 0;
}
@media (min-width: 641px) {
  .post-card-body {
    padding-right: 0;
  }
}

.post-card-body-media {
  display: inline-block;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  line-height: 0;
  font-size: 0;
  vertical-align: top;
}
.post-card-body-media .post-card-media,
.post-card-body-media .post-carousel {
  margin: 0;
  border-radius: 0;
  max-width: 100%;
  min-height: 0;
}
.post-card-body-media img,
.post-card-body-media video {
  display: block;
  vertical-align: top;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════
   ACCIONES · columna vertical al costado derecho
   ═══════════════════════════════════════════════════════════ */
.post-card-actions-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 4px;
  width: 48px;
  flex-shrink: 0;
  z-index: 5;
  position: absolute;
  right: 5px;
  top: 70%;
  transform: translateY(-50%);
}

.post-card-actions-col .post-card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px;
  background: none;
  border: none;
  color: #141414;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  transition: color 0.18s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
html[data-theme="dark"] .post-card-actions-col .post-card-stat {
  color: #f5f3ee;
}
.post-card-actions-col .post-card-stat:hover {
  transform: scale(1.06);
  background: none;
}
.post-card-actions-col .post-card-stat:active {
  transform: scale(0.94);
}
.post-card-actions-col .post-card-stat svg {
  width: 24px;
  height: 24px;
  display: block;
  stroke-width: 1.8;
  transition: transform 0.15s ease;
}
.post-card-actions-col .post-card-stat span {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: currentColor;
  opacity: 0.9;
  letter-spacing: -0.01em;
  margin-top: 1px;
}
.post-card-actions-col .post-comment-btn,
.post-card-actions-col .post-comment-btn span {
  color: inherit;
}
.post-card-actions-col .post-like-btn.is-liked,
.post-card-actions-col .post-like-btn.is-liked span,
.post-card-actions-col .post-dislike-btn.is-disliked,
.post-card-actions-col .post-dislike-btn.is-disliked span {
  color: #FE2C55;
}
.post-card-actions-col .post-like-btn.is-liked svg,
.post-card-actions-col .post-dislike-btn.is-disliked svg {
  fill: currentColor;
  stroke: currentColor;
}

/* ── Mobile: acciones abajo, horizontales ── */
@media (max-width: 640px) {
  .post-card-body {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
  .post-card-body-media {
    max-height: 60vh;
    width: 100%;
  }
  .post-card-body-media img,
  .post-card-body-media video {
    max-height: 60vh;
  }
  .post-card-actions-col {
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    margin-left: 0;
    padding: 8px 0;
    width: 100%;
    border-top: 1px solid var(--border-color-soft);
    position: static;
    right: auto;
    top: auto;
    transform: none;
  }
  .post-card-actions-col .post-card-stat {
    flex-direction: row;
    gap: 6px;
    padding: 8px 16px;
    font-size: 12px;
  }
  .post-card-actions-col .post-card-stat svg {
    width: 24px;
    height: 24px;
  }
  .post-card-actions-col .post-card-stat span {
    font-size: 12px;
    font-weight: 700;
  }
  .post-card-actions-col .post-card-nav {
    display: none;
  }
}

/* ── Tablet: acciones al flujo ── */
@media (min-width: 641px) and (max-width: 1023px) {
  .post-card-actions-col {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    margin-left: 24px;
  }
  .post-card-body-media img,
  .post-card-body-media video {
    max-height: 68vh;
  }
}

/* ═══════════════════════════════════════════════════════════
   NAVEGACIÓN · flechas ↑↓
   ═══════════════════════════════════════════════════════════ */
.post-card-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color-soft);
}
@media (min-width: 1024px) {
  .post-card-nav { display: flex; }
}

.feed-snap-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease), opacity 0.22s var(--ease), border-color 0.18s var(--ease);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.08);
  opacity: 1;
  pointer-events: auto;
}
.feed-snap-btn:hover {
  background: var(--bg-hover);
  transform: scale(1.06);
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.16);
}
.feed-snap-btn:active { transform: scale(0.94); }
.feed-snap-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.feed-snap-btn:disabled,
.feed-snap-btn.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.88);
}
.feed-snap-btn svg { width: 18px; height: 18px; stroke-width: 2.5; }

html[data-theme="dark"] .feed-snap-btn {
  background: rgba(30, 30, 36, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 8px 32px rgba(0, 0, 0, 0.3);
}
html[data-theme="dark"] .feed-snap-btn:hover {
  background: rgba(45, 45, 55, 0.95);
  border-color: rgba(124, 92, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 8px 32px rgba(124, 92, 255, 0.15);
}
html[data-theme="light"] .feed-snap-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
  color: #141414;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .feed-snap-btn:hover {
  background: #ffffff;
  border-color: rgba(124, 92, 255, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(124, 92, 255, 0.15);
}

@media (prefers-reduced-motion: reduce) {
  .feed-snap-btn { transition: none; }
  .feed-snap-btn:hover { transform: none; }
  .feed-snap-btn:active { transform: none; }
}

/* ═══════════════════════════════════════════════════════════
   BOTONES DE ACCIÓN · horizontal (posts de solo texto)
   ═══════════════════════════════════════════════════════════ */
.post-like-btn,
.post-dislike-btn,
.post-comment-btn {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--reaction-idle);
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  transition: color var(--dur) var(--ease);
}
.post-like-btn svg,
.post-dislike-btn svg,
.post-comment-btn svg {
  width: 22px;
  height: 22px;
  transition: transform var(--dur) var(--ease);
  display: block;
}
.post-like-btn:active svg,
.post-dislike-btn:active svg,
.post-comment-btn:active svg {
  transform: scale(.92);
}
.post-like-btn:hover,
.post-dislike-btn:hover {
  color: var(--reaction-active);
}
.post-like-btn:hover svg,
.post-dislike-btn:hover svg {
  transform: scale(1.08);
}
.post-comment-btn:hover { color: var(--reaction-comment); }
.post-comment-btn:hover svg { transform: scale(1.08); }

.post-like-btn.is-liked,
.post-dislike-btn.is-disliked {
  color: var(--reaction-active);
}
.post-like-btn.is-liked svg {
  fill: currentColor;
  animation: like-pop .28s var(--ease);
}
.post-dislike-btn.is-disliked svg {
  animation: dislike-pop .28s var(--ease);
}

@keyframes like-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}
@keyframes dislike-pop {
  0%   { transform: scale(1) rotate(0deg); }
  45%  { transform: scale(1.18) rotate(-6deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ── Footer (posts solo texto) ── */
.post-card-foot {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  border-top: none;
  background: transparent;
}
@media (min-width: 768px) {
  .post-card-foot {
    padding: 10px 0 14px;
    border-top: none;
  }
}

.post-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
  font-family: inherit;
  line-height: 1;
  min-height: 36px;
  transition: color 0.18s ease, transform 0.15s ease;
}
.post-card-stat:hover {
  background: transparent;
  color: var(--text-primary);
  transform: scale(1.08);
}
.post-card-stat svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
  transition: transform 0.18s ease;
}
.post-card-stat:active svg { transform: scale(0.9); }

/* ── Lock (subscription) ── */
.post-card-locked {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  padding: 6px 12px 6px 10px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #F5F3EE;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
html[data-theme="light"] .post-card-locked {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(20, 20, 20, 0.1);
  color: #141414;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.post-card-locked svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: 0.9;
}

/* ═══════════════════════════════════════════════════════════
   PANEL DE COMENTARIOS
   ═══════════════════════════════════════════════════════════ */
.post-comments {
  padding: 16px 0;
  border-top: 1px solid var(--border-color-soft);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  animation: comments-slide-in .22s var(--ease);
  cursor: default;
}
.post-comments[hidden] { display: none; }

@keyframes comments-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.post-comments-title {
  font-size: .82em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.post-comments-count-num {
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.post-comments-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.post-comments-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: var(--sp-4) 0;
}
.post-comments-empty {
  color: var(--text-muted);
  font-size: .92em;
  text-align: center;
  padding: var(--sp-4) 0;
  font-style: italic;
}

.comment {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-2);
  border-radius: var(--r-md);
  transition: background var(--dur) var(--ease);
  animation: comment-fade-in .26s var(--ease);
}
.comment:hover {
  background: color-mix(in oklab, var(--bg-elevated) 55%, transparent);
}
@keyframes comment-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.comment-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
  font-size: .9em;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(128, 128, 128, .18);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comment-avatar:hover {
  box-shadow: 0 0 0 2px var(--accent);
  transform: translateY(-1px);
}

.comment-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.comment-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.3;
}
.comment-author {
  font-weight: 600;
  font-size: .93em;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.comment-author:hover { color: var(--accent); }
.comment-handle { font-size: .84em; color: var(--text-secondary, #8a8f98); }
.comment-sep { color: var(--text-secondary, #8a8f98); opacity: .6; }
.comment-time { font-size: .8em; color: var(--text-secondary, #8a8f98); }
.comment-text {
  margin: 0;
  font-size: .93em;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.post-comment-form {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1);
  background: var(--bg-elevated);
  border-radius: var(--r-full);
  border: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.post-comment-form:focus-within {
  border-color: color-mix(in oklab, var(--accent) 55%, transparent);
  background: var(--bg-card);
}
.post-comment-form-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  font-size: .82em;
  text-decoration: none;
}
.post-comment-form-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-comment-input {
  flex: 1;
  min-width: 0;
  padding: var(--sp-2);
  background: transparent;
  border: 0;
  color: var(--text-primary);
  font: inherit;
  font-size: .93em;
}
.post-comment-input::placeholder { color: var(--text-secondary, #8a8f98); }
.post-comment-input:focus { outline: none; }

.post-comment-send {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  border: 0;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), background var(--dur) var(--ease);
}
.post-comment-send svg { width: 15px; height: 15px; transform: translate(-1px, 1px); }
.post-comment-send:hover:not(:disabled) { transform: scale(1.06); }
.post-comment-send:active:not(:disabled) { transform: scale(.96); }
.post-comment-send:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.post-comment-login {
  color: var(--text-secondary, #8a8f98);
  font-size: .9em;
  text-align: center;
  padding: var(--sp-3) 0;
}
.post-comment-login a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.post-comment-login a:hover { text-decoration: underline; }

/* ── Dropdown ⋯ ── */
.post-card-actions {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}
.post-card-action-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.post-card-action-trigger:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.post-card-action-trigger svg { width: 18px; height: 18px; }
.post-card-action-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  padding: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: postActionFadeIn 140ms var(--ease);
}
.post-card-action-panel[hidden] { display: none; }
@keyframes postActionFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.post-card-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.post-card-action-item:hover { background: var(--bg-hover); }
.post-card-action-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.post-card-action-item-danger { color: var(--danger); }
.post-card-action-item-danger:hover { background: var(--danger-soft); }
.post-card-action-item-warning { color: var(--warning); }
.post-card-action-item-warning:hover {
  background: color-mix(in srgb, var(--warning) 12%, transparent);
}

/* ── Estados async ── */
.post-card.is-busy { opacity: 0.55; pointer-events: none; }
.post-card.is-removing { animation: postCardRemove 280ms var(--ease) forwards; }
@keyframes postCardRemove {
  to { opacity: 0; transform: scale(0.97); }
}

/* ── Botón Seguir (header) ── */
.post-follow-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--dur) var(--ease);
  margin-left: auto;
  margin-right: 4px;
}
.post-follow-btn:hover {
  color: var(--accent-hover);
  transform: translateY(-1px);
}
.post-follow-btn:active { transform: translateY(0); }
.post-follow-btn.is-loading,
.post-follow-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.post-follow-btn[data-following="true"],
.post-follow-btn.is-following { color: var(--text-muted); }
.post-follow-btn[data-following="true"]:hover,
.post-follow-btn.is-following:hover { color: var(--danger); }
@media (max-width: 640px) {
  .post-follow-btn { padding: 4px 10px; font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   POST CARRUSEL
   ═══════════════════════════════════════════════════════════ */
.post-carousel {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  background: transparent;
  overflow: hidden;
  border-radius: 0;
  touch-action: pan-y;
}
.post-carousel-track {
  display: flex;
  width: auto;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.post-carousel-slide {
  flex: 0 0 auto;
  width: auto;
  min-width: 100%;
  position: relative;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}
.post-carousel-slide img,
.post-carousel-slide video {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   POST CARRUSEL · flechas cristal (v7 · Bufatty-style)
   ═══════════════════════════════════════════════════════════ */
 .post-carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
  padding: 9px 16px;
  border-radius: 100px;
  
}
.post-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  transition: all 0.22s ease;
}
.post-carousel-dot.is-active {
  background: #fff;
  transform: scale(1.55);
  box-shadow:
    0 0 0 2.5px rgba(124, 92, 255, 0.75),
    0 0 16px rgba(255, 255, 255, 0.9);
}
.post-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 15, 20, 0.5);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.18s ease,
    box-shadow 0.22s ease;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 0, 0, 0.15);
}
.post-carousel-arrow svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.post-carousel-arrow.prev { left: 12px; }
.post-carousel-arrow.next { right: 12px; }
@media (min-width: 641px) {
  .post-carousel-arrow.prev { left: 16px; }
  .post-carousel-arrow.next { right: 16px; }
}

.post-carousel:hover .post-carousel-arrow {
  opacity: 1;
  pointer-events: auto;
}

.post-carousel-arrow:hover {
  background: rgba(124, 92, 255, 0.55);
  border-color: rgba(124, 92, 255, 0.85);
  transform: translateY(-50%) scale(1.1);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(124, 92, 255, 0.55);
}
.post-carousel-arrow:active {
  transform: translateY(-50%) scale(0.94);
}
.post-carousel-arrow:disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}

/* Light theme · cristal claro */
html[data-theme="light"] .post-carousel-arrow {
  background: rgba(20, 20, 26, 0.75);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.1);
}
html[data-theme="light"] .post-carousel-arrow svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
html[data-theme="light"] .post-carousel-arrow:hover {
  background: rgba(124, 92, 255, 0.85);
  border-color: rgba(124, 92, 255, 1);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(124, 92, 255, 0.6);
}
html[data-theme="light"] .post-carousel-arrow svg {
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.5));
}
html[data-theme="light"] .post-carousel-arrow:hover {
  background: rgba(124, 92, 255, 0.22);
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.18),
    0 0 24px rgba(124, 92, 255, 0.28);
}

/* Touch: siempre visibles */
@media (hover: none) {
  .post-carousel-arrow {
    opacity: 1;
    pointer-events: auto;
    width: 36px;
    height: 36px;
  }
  .post-carousel-arrow svg { width: 16px; height: 16px; }
}

/* ═══════════════════════════════════════════════════════════
   VIDEO PLAYER · controles
   ═══════════════════════════════════════════════════════════ */
.post-card-media,
.post-carousel-slide {
  position: relative;
}
.post-card-body-media > .post-card-media {
  width: auto;
  max-width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.post-card-body-media > .post-card-media > video {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
}
.post-card-media video,
.post-carousel-slide video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
}
.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.video-overlay > * { pointer-events: auto; }
.post-card-media:hover .video-overlay,
.post-carousel-slide:hover .video-overlay { opacity: 1; }

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}
.post-card-media.is-paused .video-play-btn,
.post-carousel-slide.is-paused .video-play-btn { opacity: 1; }
.post-card-media:hover .video-play-btn,
.post-carousel-slide:hover .video-play-btn { opacity: 1; }
.video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(0, 0, 0, 0.75);
}
.video-play-btn svg { width: 28px; height: 28px; display: block; }
.post-card-media:not(.is-paused) .video-icon-play,
.post-carousel-slide:not(.is-paused) .video-icon-play { display: none; }
.post-card-media:not(.is-paused) .video-icon-pause,
.post-carousel-slide:not(.is-paused) .video-icon-pause { display: block; }
.post-card-media.is-paused .video-icon-play,
.post-carousel-slide.is-paused .video-icon-play { display: block; margin-left: 4px; }
.post-card-media.is-paused .video-icon-pause,
.post-carousel-slide.is-paused .video-icon-pause { display: none; }

.video-mute-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  z-index: 3;
  opacity: 0;
}
.post-card-media:hover .video-mute-btn,
.post-carousel-slide:hover .video-mute-btn { opacity: 1; }
@media (hover: none) {
  .video-mute-btn { opacity: 1; }
}
.video-mute-btn:hover { transform: scale(1.08); background: rgba(0, 0, 0, 0.75); }
.video-mute-btn svg { width: 20px; height: 20px; }
.video-icon-sound { display: block; }
.video-icon-muted { display: none; }
.is-muted .video-icon-sound { display: none; }
.is-muted .video-icon-muted { display: block; }

.video-progress {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  pointer-events: auto;
  transition: height 0.15s ease, opacity 0.2s ease;
  z-index: 3;
  border-radius: 100px;
  overflow: hidden;
  opacity: 0 !important;
  visibility: hidden;
}
.post-card-media:hover .video-progress,
.post-carousel-slide:hover .video-progress {
  opacity: 1 !important;
  visibility: visible;
}
.video-progress:hover { height: 5px; }
.video-progress-fill {
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 100px;
  transition: width 0.1s linear;
}
@media (hover: none) {
  .video-progress {
    opacity: 1 !important;
    visibility: visible;
  }
}
@media (max-width: 640px) {
  .video-play-btn { width: 52px; height: 52px; }
  .video-play-btn svg { width: 22px; height: 22px; }
  .video-mute-btn { width: 32px; height: 32px; bottom: 12px; right: 12px; }
  .video-mute-btn svg { width: 16px; height: 16px; }
}

/* ═══════════════════════════════════════════════════════════
   TOOLTIP
   ═══════════════════════════════════════════════════════════ */
[data-tooltip] { position: relative; }
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 6px 10px;
  background: var(--bg-elevated, #1f2126);
  color: var(--text-primary, #f5f3ee);
  font-family: var(--font-sans, inherit);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 100;
}
[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}
@media (hover: none) {
  [data-tooltip]::before,
  [data-tooltip]:hover::before { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE · BREAKPOINTS
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .feed-page {
    padding: var(--sp-2) 0 80px;
    gap: var(--sp-4);
  }
  .post-toast-stack {
    left: 12px;
    right: 12px;
    transform: none;
  }
  .post-modal-box { padding: 20px; }
}

@media (min-width: 1024px) {
  .feed-page {
    grid-template-columns: minmax(0, 1fr) 320px;
    justify-content: center;
    gap: 32px;
    padding: var(--sp-4) var(--sp-4) 80px;
    max-width: 100%;
  }
  .feed-main { margin: 0; max-width: 100%; }
  .feed-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: calc(var(--header-h, 64px) + 20px);
    align-self: start;
    max-height: calc(100vh - var(--header-h, 64px) - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0;
    border: none;
    scrollbar-width: none;
    animation: sidebar-fade-in 320ms var(--ease) backwards;
  }
  .feed-sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  @keyframes sidebar-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

@media (min-width: 1280px) {
  .feed-page {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    max-width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════
   WIDGETS · sidebar derecho
   ═══════════════════════════════════════════════════════════ */
.sidebar-widget {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.sidebar-widget + .sidebar-widget {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color-soft);
}
.sidebar-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}
.sidebar-widget-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.015em;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.2;
}
.sidebar-widget-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.sidebar-widget-link:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

/* ─── DESTACADOS DE LA SEMANA ─── */
.sidebar-featured-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-featured-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px;
  border-radius: 12px;
  position: relative;
  transition: background var(--dur) var(--ease);
}
.sidebar-featured-item:hover {
  background: color-mix(in oklab, var(--accent) 8%, transparent);
}
.sidebar-featured-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--border-color);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.sidebar-featured-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sidebar-featured-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px var(--accent);
}
.sidebar-featured-thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  color: var(--text-muted);
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--border-color);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.sidebar-featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sidebar-featured-thumb svg { width: 20px; height: 20px; opacity: 0.6; }
.sidebar-featured-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px var(--accent);
}
.sidebar-featured-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-featured-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: color var(--dur) var(--ease);
}
a.sidebar-featured-name:hover { color: var(--accent); }
.sidebar-featured-name--text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.3;
}
.sidebar-featured-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.sidebar-featured-icon {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in oklab, currentColor 12%, transparent);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.sidebar-featured-icon svg { width: 16px; height: 16px; }
.sidebar-featured-icon--crown { color: #fbbf24; filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.35)); }
.sidebar-featured-icon--fire { color: #ff6ba8; filter: drop-shadow(0 0 6px rgba(255, 107, 168, 0.35)); }
.sidebar-featured-icon--gem { color: #7c5cff; filter: drop-shadow(0 0 6px rgba(124, 92, 255, 0.35)); }
.sidebar-featured-item:hover .sidebar-featured-icon {
  transform: scale(1.1);
  background: color-mix(in oklab, currentColor 20%, transparent);
}

/* ─── SUGERENCIAS ─── */
.sidebar-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 6px;
  border-radius: 12px;
  transition: background var(--dur) var(--ease);
}
.sidebar-user:hover {
  background: color-mix(in oklab, var(--accent) 8%, transparent);
}
.sidebar-user .sidebar-follow-btn {
  margin-left: auto;
  padding-left: 12px;
  padding-right: 0;
}
.sidebar-user-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--border-color);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sidebar-user-avatar:hover {
  box-shadow: 0 0 0 2px var(--accent);
  transform: translateY(-1px);
}
.sidebar-user-initial { font-family: var(--font-display, inherit); }
.sidebar-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}
.sidebar-user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  transition: color var(--dur) var(--ease);
}
.sidebar-user-name:hover { color: var(--accent); }
.sidebar-user-handle {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-follow-btn {
  flex-shrink: 0;
  padding: 6px 0;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
  line-height: 1;
  letter-spacing: -0.01em;
}
.sidebar-follow-btn:hover { color: var(--accent-hover); }
.sidebar-follow-btn:active { opacity: 0.7; }
.sidebar-follow-btn[data-following="true"],
.sidebar-follow-btn.is-following { color: var(--text-muted); }
.sidebar-follow-btn[data-following="true"]:hover,
.sidebar-follow-btn.is-following:hover { color: var(--danger); }
.sidebar-follow-btn:disabled,
.sidebar-follow-btn.is-loading { opacity: 0.5; cursor: wait; }

/* ─── FOOTER sidebar ─── */
.sidebar-footer {
  margin-top: 24px;
  padding: 20px 4px 24px;
  border-top: 1px solid var(--border-color-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.sidebar-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.sidebar-footer-links a:hover { color: var(--accent); }
.sidebar-footer-links span { opacity: 0.5; }
.sidebar-footer-copy {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
  opacity: 0.75;
}

/* ═══════════════════════════════════════════════════════════
   FEED END · mensaje "Estás al día"
   ═══════════════════════════════════════════════════════════ */
.feed-end {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 40px 20px 20px;
  text-align: center;
  animation: feed-end-in 320ms ease both;
}
.feed-end[hidden] { display: none !important; }
@keyframes feed-end-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.feed-end-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 4px;
}
.feed-end-icon svg { width: 22px; height: 22px; }
.feed-end-text {
  margin: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: inherit;
  line-height: 1.2;
}
.feed-end-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════
   STORIES BAR · se oculta al scrollear
   ═══════════════════════════════════════════════════════════ */
.stories-bar {
  transition: transform 0.3s ease, opacity 0.3s ease, max-height 0.3s ease;
  transform-origin: top;
}
.stories-bar.is-hidden {
  transform: translateY(-20px);
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   POST TEXT LIGHTBOX · texto completo
   ═══════════════════════════════════════════════════════════ */
.post-text-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: postTextLightboxIn 200ms var(--ease);
}
.post-text-lightbox.is-closing {
  animation: postTextLightboxOut 180ms var(--ease) forwards;
}
@keyframes postTextLightboxIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes postTextLightboxOut { to { opacity: 0; } }
.post-text-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.post-text-lightbox-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: postTextPanelIn 220ms var(--ease-spring);
}
@keyframes postTextPanelIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.post-text-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color-soft);
}
.post-text-lightbox-title {
  font-size: 0.82em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.post-text-lightbox-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.post-text-lightbox-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.post-text-lightbox-close svg { width: 18px; height: 18px; }
.post-text-lightbox-body {
  padding: 20px 22px 24px;
  overflow-y: auto;
  font-size: 0.98em;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
}

/* ═══════════════════════════════════════════════════════════
   MODALES · editar / eliminar / reportar / apelar
   ═══════════════════════════════════════════════════════════ */
.post-modal {
  position: fixed;
  inset: 0;
  z-index: 10500;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: postModalIn 0.2s var(--ease, ease);
}
@keyframes postModalIn { from { opacity: 0; } to { opacity: 1; } }
.post-modal-box {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: postModalBoxIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
}
.post-modal-box::-webkit-scrollbar { width: 6px; }
.post-modal-box::-webkit-scrollbar-track { background: transparent; }
.post-modal-box::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.3);
  border-radius: 100px;
}
@keyframes postModalBoxIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.post-modal-title {
  font-family: var(--font-display, inherit);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.post-modal-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.4;
}
.post-modal-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}
.post-modal-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-card);
}
.post-modal-textarea::placeholder { color: var(--text-muted); }
.post-modal-counter {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  margin: 6px 0 20px;
  font-variant-numeric: tabular-nums;
}
.post-modal-counter.is-warning { color: #fbbf24; }
.post-modal-counter.is-danger { color: #ef4444; }
.post-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.post-modal-btn {
  padding: 11px 22px;
  border-radius: 100px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.post-modal-btn:disabled { opacity: 0.5; cursor: wait; }
.post-modal-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.post-modal-btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.post-modal-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
}
.post-modal-btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.5);
}
.post-modal-btn-danger {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.post-modal-btn-danger:hover:not(:disabled) {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* ── Reportar ── */
.report-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.report-reasons { display: flex; flex-direction: column; gap: 6px; }
.report-reason {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 14px;
  color: var(--text-primary);
}
.report-reason:hover { background: var(--bg-hover); }
.report-reason input[type="radio"] {
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.report-reason span { line-height: 1.3; }
.report-notes-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.report-notes { min-height: 80px; }

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */
.post-toast-stack {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  align-items: center;
  max-width: 90vw;
}
.post-toast {
  padding: 12px 20px;
  border-radius: 100px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  animation: postToastIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-toast.is-out { animation: postToastOut 0.22s ease forwards; }
.post-toast-success { border-color: rgba(34, 197, 94, 0.35); color: #86efac; }
.post-toast-error { border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; }
.post-toast-info { border-color: rgba(124, 92, 255, 0.35); color: #a78bfa; }
@keyframes postToastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes postToastOut {
  to { opacity: 0; transform: translateY(8px) scale(0.96); }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE · modales
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .post-modal {
    padding: 12px;
    align-items: flex-end;
  }
  .post-modal-box {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 22px 20px;
    max-height: 90vh;
    animation: postModalBoxInMobile 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  @keyframes postModalBoxInMobile {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .post-modal-title { font-size: 19px; }
  .post-modal-actions { flex-direction: column-reverse; }
  .post-modal-btn { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   REDUCE MOTION
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .post-card-action-panel,
  .post-modal,
  .post-modal-box,
  .post-toast,
  [data-tooltip]::before,
  .feed-sidebar,
  .sidebar-follow-btn,
  .sidebar-featured-avatar,
  .sidebar-featured-thumb {
    animation: none;
    transition: none;
  }
  .post-card.is-removing { animation-duration: 0.01ms; }
}
/* ═══════════════════════════════════════════════════════════
   POST HEADER · v7 (firma Bufatty)
   ═══════════════════════════════════════════════════════════ */
.post-card-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.post-card-handle {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.7;
  text-decoration: none;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.post-card-handle:hover {
  color: var(--accent);
  opacity: 1;
}

.post-card-live-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #7c5cff);
  box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.55);
  animation: post-live-pulse 2s infinite ease-out;
}
@keyframes post-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(124, 92, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0); }
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
  line-height: 1;
  opacity: 0.85;
}
.post-card-meta time {
  line-height: 1;
  display: inline-block;
}
.post-card-meta-clock {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.7;
  margin-top: -1px;
  transform: translateY(0.5px);
}

@media (max-width: 640px) {
  .post-card-handle { font-size: 12px; }
  .post-card-meta { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .post-card-live-dot { animation: none; }
}
/* ═══════════════════════════════════════════════════════════
   VERIFIED BADGE · check verde Bufatty
   ═══════════════════════════════════════════════════════════ */
.verified-badge {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  color: #8bc34a;
  filter: drop-shadow(0 0 7px rgba(139, 195, 74, 0.45));
  transition: transform 0.18s var(--ease), filter 0.18s var(--ease);
}
.verified-badge:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 12px rgba(139, 195, 74, 0.7));
}

.verified-badge--sm { width: 16px; height: 16px; }
.verified-badge--md { width: 20px; height: 20px; }
.verified-badge--lg { width: 26px; height: 26px; }

/* Variantes de color */
.verified-badge--violet { color: var(--accent, #7c5cff); }
.verified-badge--violet:hover {
  filter: drop-shadow(0 0 10px rgba(124, 92, 255, 0.55));
}

@media (prefers-reduced-motion: reduce) {
  .verified-badge { transition: none; }
  .verified-badge:hover { transform: none; }
}
/* ═══════════════════════════════════════════════════════════
   FEED EMPTY · estado vacío (sin posts)
   ═══════════════════════════════════════════════════════════ */
.feed-stream .profile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 80px 24px;
  min-height: 60vh;
  margin: 0 auto;
  max-width: 420px;
}

.feed-stream .profile-empty-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  margin-bottom: 8px;
}

.feed-stream .profile-empty-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.6;
  display: block;
}

.feed-stream .profile-empty-title {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0;
}

.feed-stream .profile-empty-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  max-width: 340px;
}

.feed-stream .profile-empty .btn,
.feed-stream .profile-empty .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 11px 24px;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.1px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  color: #ffffff;
  box-shadow:
    0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}

.feed-stream .profile-empty .btn:hover,
.feed-stream .profile-empty .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px color-mix(in srgb, var(--accent) 45%, transparent);
}