/* ── Fonts ───────────────────────────────────────────────────────── */
@font-face {
  font-family: 'BebasNeue';
  src: url('/fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BarlowCondensed';
  src: url('/fonts/BarlowCondensed-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* [CAMBIO] Peso 600 real: evita la negrita sintetizada del navegador */
@font-face {
  font-family: 'BarlowCondensed';
  src: url('/fonts/BarlowCondensed-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --light: #f0ede8;
  --neutral: #a8a49e;
  --bg-neutral: #a8a49e;
  --bg-dark: #c8c5bf;
  --bg-light: #888480;
  --dark: #666360;
  --dark2: #474645;
  /* Texto tenue (subtítulos, chevrons, contadores).
     [CAMBIO] Oscurecido de #888480 a #6b6762 para mejor contraste (~5:1 sobre blanco).
     Ojo: --bg-light (#888480) NO se toca porque también se usa como fondo/borde. */
  --text-muted: #6b6762;
  /* [CAMBIO] Nuevo: texto secundario con buen contraste */
  --text-secondary: #5a5753;
  /* Tokens semánticos de texto para vistas con estilos inline.
     Evitan usar --dark/--dark2 (colores fijos) como color de texto. */
  --text-strong: #474645;
  --text-body: #666360;
  --text-soft: #6b6762;

  --CTA: #ff0000;
  --highlight: #ffbb00;
  --success: #16a34a;

  --sidebar-w: 244px;
  --sidebar-col: 64px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.22s;

  --space: 48px;
  --title: 48px;

  /* Typography Base */
  --ff-heading: 'BebasNeue', sans-serif;
  --ff-body: 'BarlowCondensed', sans-serif;

  /* Standard Scale */
  --fs-h1: 64px;
  --fs-h2: 36px;
  --fs-h3: 28px;
  --fs-body: 22px;
  --fs-small: 20px;
  --fs-label: 18px;

  /* Hero Scale */
  --fs-hero-h1: 150px;
  --fs-hero-h2: 100px;
  --fs-hero-h3: 80px;
}

/* [CAMBIO] font-size se separa: html fija la base, body la hereda */
html {
  font-size: 22.5px; /* NO cambiar: Tailwind y Flux calculan su spacing sobre esta base */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  height: 100%;
  font-family: 'BarlowCondensed', sans-serif;
  background: var(--light);
  color: var(--dark);
}

body {
  font-size: 1rem; /* = 22.5px, mismo resultado que antes sin duplicar el valor */
}

body.mobile-nav-open,
body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.mobile-nav-open .main,
body.modal-open .main {
  overflow: hidden !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'BebasNeue', sans-serif;
  font-weight: normal;
  font-size: 1.5em;
}

/* Placeholder hereda la tipografía del sistema (BarlowCondensed).
   Solo familia: color/tamaño los gobierna cada contexto (.dash-input,
   flux:input, embeds) para no pisar estilos existentes. */
input::placeholder,
textarea::placeholder {
  font-family: var(--ff-body);
}

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--bg-dark);
  border-radius: 5px;
}

* {
  scrollbar-width: auto;
  scrollbar-color: var(--bg-dark) transparent;
}

.link {
  color: var(--light);
  transition: color ease-in-out .2s;
}

.link img {
  height: 30px;
  width: 30px;
  object-fit: contain;
}

.link:hover {
  color: var(--CTA);
}

.link:active {
  color: var(--CTA);
}

/* ── Shell ──────────────────────────────────────────────────────── */
.shell {
  display: flex;
  height: 100vh;
  height: 100dvh; /* [CAMBIO] Safari iOS: excluye la barra del navegador */
  overflow: hidden;
}

/* Sidebar Layout */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh; /* [CAMBIO] */
  background: var(--dark2);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  transition: width var(--t) var(--ease), min-width var(--t) var(--ease);
  overflow: hidden;
  position: relative;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar.collapsed {
  width: var(--sidebar-col);
  min-width: var(--sidebar-col);
}

/* ── Pre-paint: estado colapsado aplicado en <head> antes del primer render ── */
/* Evita el salto visual en PC cuando localStorage indica sidebar colapsado */
html.rcr-no-anim .sidebar,
html.rcr-no-anim .sidebar .toggle-arrow {
  transition: none !important;
}

html.rcr-sc .sidebar {
  width: var(--sidebar-col);
  min-width: var(--sidebar-col);
}

.sidebar-top {
  flex-shrink: 0;
  padding-top: 16px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 8px;
}

.sidebar-toggle {
  flex-shrink: 0;
  padding-bottom: 10px;
}


/* Items as rows with borders */
.nav-item,
.btn-auth,
.sidebar-toggle,
.identity-user,
.nav-sep-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 15px;
  text-decoration: none;
  color: var(--light);
  transition: all var(--t);
  white-space: nowrap;
  box-sizing: border-box;
}

.nav-divider {
  background: var(--bg-light);
  margin-top: 24px;
}

.nav-item:hover {
  background: transparent;
  color: var(--highlight);
  cursor: pointer;
}

.btn-auth:hover,
.sidebar-toggle:hover,
.identity-user:hover {
  background: var(--light);
  color: var(--CTA);
  cursor: pointer;
}

.nav-item.active {
  background: transparent;
  color: var(--highlight);
}

.nav-item.active .nav-label {
  color: var(--highlight);
}

/* Rol: el nombre sigue en highlight; active no pinta fondo */
.nav-item--role .nav-label--role {
  color: var(--highlight);
}

.nav-item--role.active {
  background: transparent;
  color: var(--highlight);
}

.nav-item--role.active .nav-label--role {
  color: var(--highlight);
}

/* Typography from design.md */
.nav-label,
.btn-auth span:not(.nav-icon),
.toggle-label {
  font-family: 'BarlowCondensed', sans-serif;
  font-size: var(--fs-body);
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-label,
.toggle-label {
  font-family: 'BebasNeue', sans-serif;
  font-weight: 400;
}

.nav-sep-label {
  color: var(--bg-dark);
  font-family: 'BebasNeue', sans-serif;
  font-size: var(--fs-small);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 8px;
}

/* Circular Icons */
.nav-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.nav-icon img {
  height: 80%;
  width: 80%;
  object-fit: contain;
}

/* User identity specific */
.sidebar-identity {
  display: flex;
  flex-direction: column;
}

.identity-guest {
  display: flex;
  flex-direction: column;
}

.identity-user {
  background: var(--dark2);
}

.identity-user.active {
  background: var(--light);
  color: var(--CTA);
}

.identity-user.active .u-name {
  color: var(--CTA);
}

.u-avatar {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.u-avatar img {
  height: 75%;
  width: 75%;
  object-fit: contain;
}

.u-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.u-name {
  font-family: 'BebasNeue', sans-serif;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.u-badge {
  font-family: 'BebasNeue', sans-serif;
  font-size: var(--fs-body);
  color: var(--bg-light);
  text-transform: uppercase;
}

/* Collapsed State */
.sidebar.collapsed .nav-label,
.sidebar.collapsed .btn-auth span:not(.nav-icon),
.sidebar.collapsed .toggle-label,
.sidebar.collapsed .u-info,
.sidebar.collapsed .nav-sep-label {
  display: none;
}

.sidebar.collapsed .nav-item,
.sidebar.collapsed .btn-auth,
.sidebar.collapsed .sidebar-toggle,
.sidebar.collapsed .identity-user {
  justify-content: center;
  padding: 8px 0;
}

.sidebar.collapsed .nav-icon,
.sidebar.collapsed .u-avatar {
  margin: 0 auto;
}

/* Espejo pre-paint del estado colapsado (mismas reglas que .sidebar.collapsed) */
html.rcr-sc .sidebar .nav-label,
html.rcr-sc .sidebar .btn-auth span:not(.nav-icon),
html.rcr-sc .sidebar .toggle-label,
html.rcr-sc .sidebar .u-info,
html.rcr-sc .sidebar .nav-sep-label {
  display: none;
}

html.rcr-sc .sidebar .nav-item,
html.rcr-sc .sidebar .btn-auth,
html.rcr-sc .sidebar .sidebar-toggle,
html.rcr-sc .sidebar .identity-user {
  justify-content: center;
  padding: 8px 0;
}

html.rcr-sc .sidebar .nav-icon,
html.rcr-sc .sidebar .u-avatar {
  margin: 0 auto;
}

html.rcr-sc .sidebar .toggle-arrow {
  transform: rotate(180deg);
}


/* Tooltip collapsed */
.sidebar.collapsed .nav-item[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-dark);
  border: 1px solid var(--dark);
  color: var(--dark);
  font-size: 17.25px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.toggle-arrow {
  transition: transform var(--t) var(--ease);
}

.sidebar.collapsed .toggle-arrow {
  transform: rotate(180deg);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.topbar {
  height: 52px;
  background: var(--light);
  border-bottom: 1px solid var(--bg-light);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 14px;
  flex-shrink: 0;
}

.topbar-crumb {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 22.5px;
  color: var(--dark);
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--bg-neutral);
  border: 1px solid var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--bg-light);
  font-size: 22.5px;
  transition: background var(--t), color var(--t);
  position: relative;
}

.topbar-btn:hover {
  background: var(--bg-dark);
  color: var(--dark);
}

.topbar-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  background: var(--CTA);
  border-radius: 50%;
  border: 1.5px solid var(--light);
}

.content {
  background: var(--light);
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── Tema oscuro (Claro / Oscuro / Sistema) ──────────────────────── */
html.dark {
  color-scheme: dark;
  --theme-canvas: #2e2d2b;
  --theme-surface: #383735;
  --theme-raised: #42413e;
  --theme-border: #57544f;
  --theme-text: #e2dfd9;
  --theme-secondary: #b8b2aa;

  /* Re-mapeo de tokens de texto usados por las vistas */
  --text-muted: var(--theme-secondary);
  --text-secondary: var(--theme-secondary);
  --text-strong: var(--theme-text);
  --text-body: var(--theme-text);
  --text-soft: var(--theme-secondary);
}

html.dark body,
html.dark .main,
html.dark .content {
  background: var(--theme-canvas);
  color: var(--theme-text);
}

html.dark .topbar {
  background: var(--theme-surface);
  border-bottom-color: var(--theme-border);
}

html.dark .topbar-crumb {
  color: var(--theme-text);
}

html.dark .topbar-btn {
  background: var(--theme-raised);
  border-color: var(--theme-border);
  color: var(--theme-secondary);
}

html.dark .topbar-btn:hover {
  background: var(--theme-border);
  color: var(--theme-text);
}

html.dark .btn-auth:hover,
html.dark .sidebar-toggle:hover,
html.dark .identity-user:hover,
html.dark .identity-user.active {
  background: var(--theme-raised);
  color: var(--theme-text);
}

html.dark .nav-item:hover,
html.dark .nav-item.active,
html.dark .nav-item.active .nav-label,
html.dark .nav-item--role.active,
html.dark .nav-item--role.active .nav-label--role {
  background: transparent;
  color: var(--highlight);
}

html.dark .identity-user.active .u-name {
  color: var(--theme-text);
}

html.dark .nav-divider {
  background-color: var(--theme-border);
}

html.dark .nav-sep-label {
  color: var(--theme-secondary);
}

html.dark .mobile-overlay {
  background: rgba(15, 14, 13, 0.52);
}

html.dark ::-webkit-scrollbar-thumb {
  background: var(--theme-border);
}

html.dark * {
  scrollbar-color: var(--theme-border) transparent;
}

/* ══════════════════════════════════════════════════════════════════
   MOBILE
══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --space: 8px;

    /* [CAMBIO] Escala de texto móvil: la fuente es condensada y se ve pequeña.
       Los títulos (--fs-h*) y el hero (--fs-hero-*) NO se tocan a propósito. */
    --fs-body: 23px;
    --fs-small: 21px;
    --fs-label: 20px;
  }

  .sidebar,
  .topbar {
    display: none !important;
  }

  .shell {
    width: 100%;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .main {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .main > .content {
    min-width: 0;
  }

  .mobile-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(80px + env(safe-area-inset-bottom, 0px)); /* [CAMBIO] */
    background: var(--dark2);
    align-items: center;
    padding: 16px 26px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); /* [CAMBIO] */
    z-index: 10002;
    gap: 10px;
  }

  .mobile-title {
    flex: 1;
    font-family: 'BarlowCondensed', sans-serif;
    font-weight: 600; /* [CAMBIO] antes 700 */
    font-size: var(--fs-body);
    color: var(--light);
  }

  .mobile-icon-btn {
    height: 100%;
    aspect-ratio: 1/1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--light);
    cursor: pointer;
    position: relative;
    transition: all var(--t);
  }

  .mobile-icon-btn.menu-open {
    background: var(--CTA);
    border-color: rgba(192, 132, 252, 0.4);
    color: var(--light);
  }

  .m-menu-icon {
    height: 100%;
    width: 100%;
    object-fit: contain;
    object-position: center;
  }

  .m-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 6px;
    height: 6px;
    background: var(--CTA);
    border-radius: 50%;
    border: 1.5px solid var(--light);
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    backdrop-filter: blur(3px);
  }

  .mobile-overlay.show {
    opacity: 1;
    pointer-events: all;
  }

  .mobile-drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px)); /* [CAMBIO] */
    height: auto;
    max-height: 72vh;
    background: var(--dark2);
    border-top: 1px solid var(--bg-light);
    border-radius: 18px 18px 0 0;
    z-index: 10001;
    transform: translateY(calc(100% + 80px + env(safe-area-inset-bottom, 0px))); /* [CAMBIO] */
    transition: transform 0.32s var(--ease);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
  }

  .mobile-drawer.open {
    transform: translateY(0);
  }

  .drawer-handle {
    display: flex;
    width: 100%;
    height: 44px;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex-shrink: 0;
    touch-action: pan-y;
  }

  .drawer-handle::before {
    content: "";
    width: 34px;
    height: 4px;
    background: var(--bg-light);
    border-radius: 2px;
  }

  .drawer-identity {
    padding: 8px 14px 12px;
    border-bottom: 1px solid var(--bg-light);
    flex-shrink: 0;
    background: var(--dark2);
    color: var(--light);
    font-family: 'BarlowCondensed', sans-serif;
  }

  /* guest in drawer */
  .drawer-guest {
    display: flex;
    gap: 8px;
  }

  .drawer-guest .btn-auth {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    font-family: 'BarlowCondensed', sans-serif;
    font-size: 22px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all var(--t);
  }

  .drawer-guest .btn-login {
    background: var(--bg-light);
    border: 1px solid var(--dark);
    color: var(--light);
  }

  .drawer-guest .btn-login:hover {
    background: var(--light);
    color: var(--CTA);
  }

  .drawer-guest .btn-register {
    background: var(--bg-light);
    border: 1px solid var(--dark);
    color: var(--light);
  }

  .drawer-guest .btn-register:hover {
    background: var(--light);
    color: var(--CTA);
  }

  /* user in drawer */
  .drawer-user {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .drawer-u-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19.5px;
    font-weight: 600; /* [CAMBIO] antes 700 */
    color: #fff;
    border: 2px solid var(--dark);
    flex-shrink: 0;
  }

  .drawer-u-name {
    font-family: 'BarlowCondensed', sans-serif;
    font-size: var(--fs-body);
    font-weight: 600;
    color: var(--light);
  }

  .drawer-u-badge {
    font-family: 'BarlowCondensed', sans-serif;
    font-size: var(--fs-body);
    color: var(--CTA);
    font-weight: 600; /* [CAMBIO] antes 700 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
  }

  .drawer-scroll {
    overflow-y: auto;
    padding: 6px 0 14px;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  .drawer-scroll .nav-item {
    padding: 10px 14px;
    margin: 1px 9px;
    font-size: 20.25px;
  }

  .drawer-scroll .nav-icon {
    font-size: 25.5px;
  }

  .drawer-scroll .nav-sep-label {
    padding: 9px 16px 3px;
  }

  .main > .content {
    flex: 1 0 auto;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  /* [CAMBIO] iOS hace zoom automático al enfocar inputs con menos de 16px */
  input,
  select,
  textarea {
    font-size: max(16px, 1em);
  }
}

/* ── dash-modal overlay (global) ───────────────────────────────────
   Regla base espejo de dashboard.css `.dash-modal` — keep in sync.
   Existe aquí porque las vistas de perfil público (appPublic) no cargan
   dashboard.css: sin esto, los modales .dash-modal (post de perfil,
   postear, estado) se renderizan en flujo dentro de la card en vez de
   como overlay por encima del sidebar. */
.dash-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

/* ── Mobile elements hidden by default on desktop ──────────────── */
.mobile-bar,
.mobile-overlay,
.mobile-drawer {
  display: none;
}

@media (min-width:769px) {

  .mobile-bar,
  .mobile-overlay,
  .mobile-drawer {
    display: none !important;
  }
}

/* ── Voting Light Theme ────────────────────────────────────────── */
.voting-container {
  max-width: 700px;
  margin: 0 auto;
  font-family: sans-serif;
  padding: 20px;
  background-color: var(--light);
}

.voting-theme-light {
  background: var(--light) !important;
  color: #1f2937 !important;
  /* Dark text */
  border-radius: 12px;
  padding: 40px 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.voting-theme-light h2,
.voting-theme-light h3 {
  color: #111827 !important;
}

.voting-theme-light p,
.voting-theme-light span {
  color: #4b5563 !important;
}

.voting-theme-light input::placeholder {
  color: #9ca3af !important;
}

.voting-theme-light .vote-option {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  color: #374151 !important;
}

.voting-theme-light .vote-option:hover {
  background: #f9fafb !important;
}

/* ══════════════════════════════════════════════════════════════════
   [CAMBIO] FEED — card de publicación
   Reemplaza los style="" inline de _feed_item y _feed_profile_post.
   Escritorio = tamaños equivalentes a los anteriores (usa las variables
   de la escala); en móvil las variables suben solas (ver bloque MOBILE).
══════════════════════════════════════════════════════════════════ */
.profile-card.feed-item,
.feed-item--flush {
  margin-bottom: 8px;
}

.feed-item--flush {
  width: 100%;
  max-width: 624px;
  margin-left: auto;
  margin-right: auto;
}

.feed-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.feed-item-author {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.feed-item-avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 50%;
}

.feed-item-name {
  font-family: var(--ff-body);
  font-size: var(--fs-label);
  line-height: 1.1;
  font-weight: 600;
  color: var(--dark2);
}

.feed-item-time {
  margin: 0;
  text-align: right;
  font-family: var(--ff-body);
  font-size: var(--fs-label);
  color: var(--text-secondary);
}

.feed-post-title {
  margin: 0 0 12px;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: 1.15;
  font-weight: 600;
  color: var(--dark2);
}

.feed-post-image {
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
}

/* El selector doble (0,2,0) gana a .text-body (0,1,0) sin usar !important */
.feed-post-text,
.feed-post-text .feed-post-text-inner {
  margin: 0;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: 1.35;
  color: var(--dark2);
}

/* ── Feed: títulos y textos de tarjetas ─────────────────────────── */
.feed-card-title {
  margin: 0;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: 1.15;
  font-weight: 600;
  color: var(--dark2);
  overflow-wrap: anywhere;
}

.feed-card-title--spaced {
  margin: 0 0 12px;
}

.feed-card-text {
  color: var(--dark2);
}

.feed-card-text--spaced {
  margin: 10px 0 0;
}

.feed-embed {
  display: flex;
  justify-content: center;
}

.feed-embed--top {
  margin-top: 12px;
}

.feed-embed--fan {
  margin-top: 20px;
}

.feed-external-link {
  color: var(--CTA);
  text-decoration: underline;
}

/* ── Feed: canción de Top Rainbow ───────────────────────────────── */
.feed-song-badge {
  display: block;
  margin: 0 0 4px;
  font-family: var(--ff-heading);
  color: var(--CTA);
  text-decoration: none;
}

.feed-song-features {
  font-size: var(--fs-label);
  font-weight: 400;
  color: var(--text-secondary);
}

.feed-song-feature-link {
  color: var(--CTA);
  font-weight: 600;
  text-decoration: none;
}

.feed-song-feature-name {
  font-weight: 600;
}

.feed-song-genre {
  margin: 0 0 8px;
  font-size: var(--fs-label);
  color: var(--text-secondary);
}

.feed-song-audio-note {
  padding: 1rem;
  font-size: var(--fs-label);
  text-align: center;
  opacity: 0.6;
}

/* ── Feed: tarjetas de actividad (skin change / pura vida fan) ──── */
.feed-item-header--wrap {
  flex-wrap: wrap;
}

.feed-item-author--tight {
  gap: 8px;
}

.feed-activity-text {
  font-size: var(--fs-label);
  color: var(--text-secondary);
}

.feed-activity-name {
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--dark2);
  text-decoration: none;
}

.feed-activity-link {
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--CTA);
}

.feed-activity-time {
  margin: 8px 0 0;
  font-size: var(--fs-label);
  color: var(--text-secondary);
  text-align: right;
}

.feed-activity-time--tight {
  margin: 0;
}

.rank-skin-wrap.feed-skin-wrap {
  width: 100%;
  max-width: none;
}

.rank-skin-name.feed-skin-name {
  left: 12px;
  right: auto;
  text-align: left;
  max-width: calc(100% - 24px);
  min-width: 0;
}

/* ── Feed: tarjeta Pura Vida fan ────────────────────────────────── */
.feed-media-link {
  display: block;
  width: 100%;
  text-decoration: none;
}

.feed-cover-media {
  position: relative;
  overflow: hidden;
}

.feed-cover-img {
  filter: saturate(0.8);
}

.feed-cover-media .feed-cover-avatar,
.feed-cover-media .feed-cover-role-icon {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.feed-cover-media .feed-cover-avatar {
  top: 12px;
  left: 12px;
  object-fit: cover;
}

.feed-cover-media .feed-cover-role-icon {
  right: 10px;
  bottom: 10px;
}

/* ── Feed: embed de streamer (16:9) ─────────────────────────────── */
.feed-streamer-media {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
}

.feed-streamer-brand {
  color: var(--CTA);
}

/* ── Feed: comentario aprobado ──────────────────────────────────── */
.feed-comment-link {
  font-weight: 600;
}

@media (max-width: 768px) {
  .feed-item-avatar {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 767px) {
  .feed-item--flush {
    max-width: none;
  }

  .feed-item--flush .profile-card,
  .feed-item--flush .comment-module {
    border-radius: 0;
  }
}

html.dark .feed-item-name,
html.dark .feed-post-title,
html.dark .feed-post-text,
html.dark .feed-post-text .feed-post-text-inner,
html.dark .feed-card-title,
html.dark .feed-card-text,
html.dark .feed-activity-name {
  color: var(--theme-text);
}

html.dark .feed-item-time,
html.dark .feed-song-features,
html.dark .feed-song-genre,
html.dark .feed-activity-text,
html.dark .feed-activity-time {
  color: var(--theme-secondary);
}

/* Mantiene los elementos de interfaz destacados en el peso semibold real. */
:root body :is(
  .feed-item-name,
  .feed-post-title,
  .feed-card-title,
  .feed-song-feature-link,
  .feed-song-feature-name,
  .feed-activity-name,
  .feed-activity-link,
  .feed-comment-link,
  .mobile-title,
  .drawer-u-avatar,
  .drawer-u-name,
  .drawer-u-badge,
  .catalog-item-title,
  .catalog-item-price,
  .shop-card-price,
  .dash-promo-item-status,
  .dash-track-title,
  .dash-track-status,
  .dash-corner-msg,
  .dash-corner-count,
  .dash-header-count,
  .dash-badge,
  .dash-pill,
  .dash-alert-title,
  .dash-role-name,
  .dash-review-bar-text strong,
  .dash-tabs .dash-tab-active,
  .dash-follower-country,
  .dash-monthly-count,
  .dash-monthly-summary .highlight,
  .dash-table th,
  .dash-table-cell-label,
  .dash-vote-number,
  .dash-toast,
  .stat-role-panel-title,
  .promo-ticket-brand,
  .promo-ticket-code-label,
  .promo-ticket-facts dt,
  .btn-highlight,
  nav[role="navigation"] span[aria-current="page"],
  nav[role="navigation"] span[aria-current="page"] *,
  nav[role="navigation"] .active,
  nav[role="navigation"] .active *
) {
  font-weight: 600 !important;
}
