@charset "UTF-8";
/*
 * Foro Madridista — sistema de diseño (Fase 2 Modernizado)
 * Paleta Oficial:
 * - Morado histórico: #654EA3 / RGB (101, 78, 163)
 * - Amarillo dorado:  #FEBE10 / RGB (254, 190, 16)
 * - Blanco madridista: #FFFFFF / RGB (255, 255, 255)
 *
 * Estructura visual moderna inspirada en ForoBeta y ForoCoches Beta:
 * - Tonos slate suaves y contrastados, fondo canvas limpio.
 * - Bordes generosamente redondeados (radios 8px, 12px, 16px y 9999px).
 * - Cabecera blanca y limpia con búsqueda y accesos en píldora.
 * - Tablas y tarjetas elevadas con sombras sutiles y cabeceras de sección elegantes.
 * - Elementos de navegación, etiquetas, botones y paginación en forma de píldora.
 * Sin dependencias externas ni compiladores; 100% CSS nativo moderno.
 */

@layer reset, base, layout, components, utilities;

/* ==========================================================================
   1. Tokens de diseño
   ========================================================================== */
:root {
  color-scheme: light;

  /* Nivel 1 — valores literales (Paleta neutra slate) */
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;

  /* Compatibilidad con tokens semánticos grises */
  --gray-50: var(--slate-50);
  --gray-100: var(--slate-100);
  --gray-200: var(--slate-200);
  --gray-300: var(--slate-300);
  --gray-600: var(--slate-600);
  --gray-800: var(--slate-800);

  /* Identidad Oficial Real Madrid: Blanco, Morado Histórico y Amarillo Dorado */
  --rm-white:  #ffffff;
  --rm-purple: #654EA3;         /* Morado histórico RGB(101, 78, 163) */
  --rm-gold:   #FEBE10;         /* Amarillo dorado RGB(254, 190, 16) */

  /* Escala tonal de Morado histórico */
  --purple-950: #190f33;        /* Fondo profundo noche */
  --purple-900: #2a1b52;        /* Morado noche para contraste máximo y pie */
  --purple-800: #3f2a74;        /* Morado texto de encabezados y marca */
  --purple-700: #51398f;        /* Morado saturado para interacción y hover */
  --purple-600: #654EA3;        /* Morado histórico oficial (#654EA3) */
  --purple-500: #7b63b8;        /* Morado medio */
  --purple-300: #b8a7db;
  --purple-200: #d6cced;        /* Borde pastel morado */
  --purple-100: #ede8f7;        /* Pestañas activas y tintes suaves */
  --purple-50:  #f8f6fc;        /* Canvas muy sutil para encabezados */

  /* Escala tonal de Amarillo dorado */
  --gold-800:   #8a6500;
  --gold-700:   #b38300;        /* Dorado accesible para texto */
  --gold-600:   #d99f05;
  --gold-500:   #FEBE10;        /* Amarillo dorado oficial (#FEBE10) */
  --gold-400:   #fecb38;
  --gold-300:   #fed863;
  --gold-200:   #ffe89c;
  --gold-100:   #fef6db;        /* Fondo suave para etiquetas fijadas */
  --gold-50:    #fffdf5;

  /* Compatibilidad retroactiva de tokens azules */
  --blue-950: var(--purple-950);
  --blue-900: var(--purple-900);
  --blue-800: var(--purple-800);
  --blue-700: var(--purple-700);
  --blue-600: var(--purple-600);
  --blue-500: var(--purple-500);
  --blue-200: var(--purple-200);
  --blue-100: var(--purple-100);
  --blue-50:  var(--purple-50);

  --green-800: #065f46;
  --green-700: #047857;
  --green-100: #d1fae5;
  --green-50:  #ecfdf5;

  --red-800:   #991b1b;
  --red-700:   #b91c1c;
  --red-100:   #fee2e2;
  --red-50:    #fef2f2;

  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-100: #fef3c7;
  --amber-50:  #fffbeb;

  /* Nivel 2 — semánticas */
  --color-bg: var(--slate-50);
  --color-surface: var(--rm-white);
  --color-surface-alt: #fafbfc;
  --color-text: var(--slate-800);
  --color-text-muted: var(--slate-500);
  --color-text-subtle: var(--slate-400);
  --color-border: var(--slate-200);
  --color-border-strong: var(--slate-300);
  --color-brand: var(--purple-800);
  --color-brand-royal: var(--purple-600);
  --color-brand-strong: var(--purple-900);
  --color-link: var(--purple-700);
  --color-link-hover: var(--purple-900);
  --color-action: var(--purple-600);
  --color-action-hover: var(--purple-700);
  --color-activity: var(--green-700);
  --color-accent: var(--gold-500);
  --color-focus: var(--purple-600);

  /* Tipografía */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.875rem;
  --fs-md: 0.9375rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.625rem;
  --lh-base: 1.5;

  /* Espaciado */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;

  /* Radios de borde modernos */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
  --radius: var(--radius-md);

  /* Sombras suaves modernas */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);

  --border: 1px solid var(--color-border);
  --max-width: 1520px;
  --container: var(--max-width);
  --aside-width: 320px;
  --tap: 2.75rem; /* 44px mínimo táctil */

  /* Transiciones */
  --t: 140ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root { --t: 0s; }
}

/* ==========================================================================
   2. Reset mínimo
   ========================================================================== */
@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
  }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  fieldset { padding: 0; border: 0; min-inline-size: 0; }
  img, svg { display: block; max-inline-size: 100%; }
  button, input, select, textarea { font: inherit; color: inherit; }
  table { border-collapse: collapse; border-spacing: 0; }
  th { font-weight: inherit; text-align: start; }
  summary { cursor: pointer; }
  [hidden] { display: none !important; }
}

/* ==========================================================================
   3. Base
   ========================================================================== */
@layer base {
  html {
    scroll-padding-block-start: var(--sp-6);
    overflow-x: clip;
    max-width: 100vw;
  }

  body {
    min-block-size: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    overflow-wrap: anywhere;
    overflow-x: clip;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--t);

    &:hover { color: var(--color-link-hover); text-decoration: underline; }
    &:active { color: var(--color-brand-strong); }
  }

  :focus-visible {
    outline: 2px solid var(--focus-ring, var(--color-focus));
    outline-offset: 2px;
  }

  h1 { font-size: var(--fs-2xl); line-height: 1.25; color: var(--color-brand); font-weight: 800; letter-spacing: -0.01em; }
  h2 { font-size: var(--fs-lg); line-height: 1.3; color: var(--color-brand); font-weight: 700; }
  h3 { font-size: var(--fs-md); line-height: 1.35; font-weight: 700; }

  ::selection { background: var(--purple-100); color: var(--purple-900); }

  time { white-space: nowrap; }
}

/* ==========================================================================
   4. Layout
   ========================================================================== */
@layer layout {
  .container {
    inline-size: 100%;
    max-inline-size: var(--max-width, var(--container, 1520px));
    max-width: var(--max-width, 1520px);
    margin-inline: auto;
    padding-inline: var(--sp-3);
  }

  main { flex: 1 0 auto; padding-block: var(--sp-5) var(--sp-8); }
  main:focus { outline: none; }

  .layout {
    display: grid;
    gap: var(--sp-5);
    align-items: start;
  }
  .layout__main { min-inline-size: 0; display: grid; gap: var(--sp-5); }
  .layout__aside { display: grid; gap: var(--sp-4); }

  /* Tablet */
  @media (min-width: 640px) and (max-width: 959px) {
    .layout__aside { grid-template-columns: 1fr 1fr; align-items: start; }
  }
  /* Móvil: apilado en columna fluida sin ocultar información de perfil ni preferencias */
  @media (max-width: 639px) {
    .layout--aside { display: flex; flex-direction: column; gap: var(--sp-4); }
    .layout__aside { display: grid; gap: var(--sp-4); width: 100%; }
  }
  /* Escritorio */
  @media (min-width: 960px) {
    .layout--aside { grid-template-columns: minmax(0, 1fr) var(--aside-width); }
  }

  @media (min-width: 720px) {
    .container { padding-inline: var(--sp-4); }
  }
}

/* ==========================================================================
   5. Componentes
   ========================================================================== */
@layer components {

  /* ---------- Accesibilidad: salto al contenido ---------- */
  .skip-link {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: var(--sp-3);
    z-index: 100;
    padding: var(--sp-2) var(--sp-4);
    background: var(--color-brand);
    color: #fff;
    font-weight: 700;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    text-decoration: none;

    &:focus { transform: none; color: #fff; }
  }

  /* ---------- Cabecera Sticky Morada Institucional ---------- */
  .site-header {
    --focus-ring: #febe10;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #3f2a74;
    background: linear-gradient(135deg, #2e1a5b 0%, #3f2a74 55%, #4b328a 100%);
    box-shadow: 0 4px 20px rgba(18, 10, 40, 0.28);
    border-block-end: 1px solid rgba(255, 255, 255, 0.12);
  }

  .site-header__top {
    background: transparent;
    color: #ffffff;
    border-block-end: none;
  }

  .header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-4);
    padding-block: 0.75rem;
    flex-wrap: nowrap;
  }

  .brand {
    grid-area: brand;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    color: #ffffff;
    text-decoration: none;
    min-inline-size: 0;
    flex-shrink: 0;

    &:hover { color: #ffffff; text-decoration: none; }
  }
  /* Contenedor del logotipo e identidad visual con 3D Flip */
  .brand__logo-container,
  .brand__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 44px;
    block-size: 44px;
    flex: none;
    position: relative;
    perspective: 900px;
    -webkit-perspective: 900px;
    filter: none !important;
  }
  .brand__flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .brand:hover .brand__logo-container--flip .brand__flipper,
  .brand:focus-visible .brand__logo-container--flip .brand__flipper,
  .site-footer__brand:hover .brand__logo-container--flip .brand__flipper,
  .brand__logo-container--flip:hover .brand__flipper,
  .brand__logo-container--flip:active .brand__flipper,
  .brand__logo-container--flip.is-flipped .brand__flipper,
  .brand__flipper.is-flipped {
    transform: rotateY(180deg);
  }
  .brand__face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
  .brand__face--front {
    z-index: 2;
  }
  .brand__face--back {
    transform: rotateY(180deg);
    z-index: 1;
  }
  .brand__logo-svg {
    display: block;
    filter: none !important;
    overflow: visible;
  }
  /* Escudo del Real Madrid un poco más pequeño y nítido */
  .brand__logo-svg--shield {
    width: 28px;
    height: 41px;
  }
  /* Logo de las 15 Champions más grande y protagonista al girar */
  .brand__logo-svg--champions {
    width: 44px;
    height: 44px;
  }
  .brand__logo-path {
    fill: #3f2a74;
    transition: fill 0.2s ease;
  }
  .brand__logo--white .brand__logo-path,
  .site-header .brand__logo-path,
  .site-footer .brand__logo-path,
  .mobile-drawer .brand__logo-path {
    fill: #ffffff;
  }
  .brand__text { display: grid; line-height: 1.15; }
  .brand__name {
    font-size: var(--fs-lg);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
  .brand__tagline {
    font-size: var(--fs-sm);
    color: #febe10;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  }

  .header-auth { grid-area: auth; display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }

  /* Botones de autenticación y usuario en cabecera morada */
  .btn--header-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.05rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 9999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    text-decoration: none;
    transition: all 0.15s ease;
  }
  .btn--header-login:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    text-decoration: none;
  }

  .btn--header-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 9999px;
    color: #1e1538;
    background: linear-gradient(135deg, #FEBE10 0%, #e5a704 100%);
    border: none;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(254, 190, 16, 0.38);
    transition: all 0.15s ease;
  }
  .btn--header-register:hover {
    background: #ffd03b;
    color: #140d27;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(254, 190, 16, 0.5);
    text-decoration: none;
  }

  .btn--header-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 9999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    text-decoration: none;
    transition: all 0.15s ease;
  }
  .btn--header-user:hover {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
    text-decoration: none;
  }

  .btn--header-admin {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: 9999px;
    color: #1e1538;
    background: linear-gradient(135deg, #FEBE10 0%, #d49b07 100%);
    border: 1px solid #d49b07;
    text-decoration: none;
    transition: all 0.15s ease;
  }
  .btn--header-admin:hover {
    background: #ffd03b;
    color: #140d27;
    text-decoration: none;
  }

  .btn--header-logout {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 9999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .btn--header-logout:hover {
    background: rgba(239, 68, 68, 0.85);
    border-color: rgba(239, 68, 68, 0.85);
    color: #ffffff;
  }

  .header-notification-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #3f2a74;
    position: relative;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    transition: all 0.15s ease;
  }
  .header-notification-btn:hover {
    background: #f8fafc;
    color: #2b1a54;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
  }
  .header-notification-icon {
    stroke: #3f2a74;
    color: #3f2a74;
    width: 20px;
    height: 20px;
  }
  .header-notification-btn:hover .header-notification-icon {
    stroke: #2b1a54;
  }

  /* ==========================================================================
     Buscador Predictivo en Cabecera (Desktop y Mobile)
     ========================================================================== */
  .header-search {
    position: relative;
  }

  .header-search--desktop {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0 1.5rem;
  }

  .header-search__form {
    margin: 0;
    width: 100%;
  }

  .header-search__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
  }

  .header-search__icon {
    position: absolute;
    left: 0.85rem;
    color: #3f2a74;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    transition: color 0.15s ease;
  }

  .header-search__input {
    width: 100%;
    height: 2.5rem;
    padding: 0.45rem 2.25rem 0.45rem 2.45rem;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #0f172a;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .header-search__input::placeholder {
    color: #64748b;
    font-size: 0.85rem;
  }

  .header-search__input:hover {
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
  }

  .header-search__input:focus {
    background: #ffffff;
    border-color: #febe10;
    box-shadow: 0 0 0 3px rgba(254, 190, 16, 0.35), 0 2px 10px rgba(0, 0, 0, 0.22);
  }

  .header-search__input:focus ~ .header-search__icon {
    color: #654EA3;
  }

  .header-search__clear-btn {
    position: absolute;
    right: 0.75rem;
    background: #cbd5e1;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s ease;
    z-index: 2;
  }

  .header-search__clear-btn:hover {
    background: #94a3b8;
    color: #0f172a;
  }

  /* Botón de lupa en móvil (arriba a la derecha) */
  .mobile-search-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: var(--radius-md, 8px);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    transition: all 0.15s ease;
  }

  .mobile-search-btn:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
  }

  /* Barra desplegable en móvil */
  .mobile-search-bar {
    background: #321f5e;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 2px solid #febe10;
    padding: 0.65rem 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

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

  .mobile-search-close-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }

  .mobile-search-close-btn:hover {
    color: #0f172a;
  }

  /* Dropdown predictivo de resultados */
  .header-search__dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    z-index: 1000;
    max-height: 480px;
    display: flex;
    flex-direction: column;
  }

  .header-search__dropdown[hidden],
  .header-search__dropdown:empty {
    display: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  .header-search__list {
    overflow-y: auto;
    max-height: 380px;
  }

  .header-search__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
  }

  .header-search__item:last-child {
    border-bottom: none;
  }

  .header-search__item:hover,
  .header-search__item.is-selected {
    background: #f8fafc;
    text-decoration: none;
  }

  .header-search__item--player {
    background: #faf8fc;
  }

  .header-search__item--player:hover,
  .header-search__item--player.is-selected {
    background: #f3eef9;
  }

  .header-search__item-thumb {
    flex-shrink: 0;
    width: 34px;
    height: 44px;
    border-radius: 4px;
    overflow: hidden;
    border: 1.5px solid #febe10;
    background: #ffffff;
  }

  .header-search__item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
  }

  .header-search__item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #ede8f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-brand, #654EA3);
  }

  .header-search__item-info {
    flex: 1;
    min-width: 0;
  }

  .header-search__item-badges {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.15rem;
  }

  .header-search__badge {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.05rem 0.35rem;
    border-radius: 9999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .header-search__badge--squad {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
  }

  .header-search__cat {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
  }

  .header-search__item-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e1538;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-search__item-title mark {
    background: #fef08a;
    color: #1e1538;
    padding: 0 0.15rem;
    border-radius: 2px;
  }

  .header-search__item-meta {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    line-height: 1.2;
  }

  .header-search__item-category {
    font-weight: 500;
  }

  /* Solo en móvil: ocultar respuestas y tiempo relativo, mostrando únicamente la ubicación (categoría) */
  .header-search--mobile .header-search__item-extra,
  .mobile-search-bar .header-search__item-extra {
    display: none !important;
  }

  .header-search--mobile .header-search__item-category,
  .mobile-search-bar .header-search__item-category {
    font-weight: 600;
    color: #5B21B6;
  }

  @media (max-width: 768px) {
    .header-search__item-extra {
      display: none !important;
    }

    .header-search__item-category {
      font-weight: 600;
      color: #5B21B6;
    }
  }

  .header-search__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    background: #ede8f7;
    color: var(--color-brand, #654EA3);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    border-top: 1px solid #ddd6fe;
    transition: background-color 0.15s ease;
  }

  .header-search__footer:hover,
  .header-search__footer.is-selected {
    background: #e4dbf3;
    text-decoration: none;
  }

  .header-search__no-results {
    padding: 1.25rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
  }

  .header-search__no-results svg {
    margin: 0 auto 0.5rem;
    color: #94a3b8;
  }

  .header-search__full-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 700;
    color: var(--color-brand, #654EA3);
    font-size: 0.8rem;
    text-decoration: underline;
  }

  /* Botones de autenticación en cabecera con degradado sutil */
  .btn--on-dark {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    color: var(--slate-700);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t), color var(--t);

    &:hover {
      background: linear-gradient(180deg, #fdfcff 0%, #f3effa 100%);
      border-color: var(--purple-200);
      color: var(--purple-800);
      box-shadow: 0 3px 8px -1px rgba(101, 78, 163, 0.12);
      transform: translateY(-1px);
      text-decoration: none;
    }
    &:active {
      background: #eee8f8;
      transform: translateY(0);
    }
  }
  .btn--on-dark-solid {
    background: linear-gradient(135deg, #745cb5 0%, #5d449b 100%);
    border: 1px solid #5d449b;
    border-radius: var(--radius-pill);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 5px -1px rgba(101, 78, 163, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t);

    &:hover {
      background: linear-gradient(135deg, #7e65c4 0%, #644ba3 100%);
      border-color: #644ba3;
      color: #ffffff;
      box-shadow: 0 5px 12px -2px rgba(101, 78, 163, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
      transform: translateY(-1px);
      text-decoration: none;
    }
    &:active {
      background: linear-gradient(135deg, #533b8b 0%, #463177 100%);
      transform: translateY(0);
      box-shadow: 0 1px 2px rgba(101, 78, 163, 0.3), inset 0 1px 2px rgba(0, 0, 0, 0.15);
    }
  }

  /* Navegación principal con pestañas en píldora */
  .site-nav {
    background: var(--rm-white);
    color: var(--color-text);
    border-block-end: 1px solid var(--color-border);
  }
  .nav-menu > summary {
    display: flex;
    align-items: center;
    min-block-size: var(--tap);
    padding-inline: var(--sp-3);
    font-weight: 700;
    color: var(--color-brand);
    list-style: none;

    &::-webkit-details-marker { display: none; }
    &::after { content: "\25be"; margin-inline-start: var(--sp-2); }
  }
  .nav-menu[open] > summary::after { content: "\25b4"; }
  .nav-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-1); padding: var(--sp-2) 0; }
  .nav-list a {
    display: flex;
    align-items: center;
    min-block-size: 2.25rem;
    padding-inline: var(--sp-3);
    color: var(--slate-600);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-sm);
    border-radius: var(--radius-pill);
    transition: background-color var(--t), color var(--t);

    &:hover { background: var(--purple-50); color: var(--purple-700); text-decoration: none; }
    &:active { background: var(--purple-100); }
    &[aria-current] {
      background: var(--purple-100);
      color: var(--purple-800);
      font-weight: 700;
    }
  }

  @media (min-width: 720px) {
    .nav-menu > summary { display: none; }
    .nav-list {
      display: flex;
      flex-wrap: wrap;
      gap: 0.25rem;
      padding: 0.375rem 0;
    }
    .nav-list a {
      min-block-size: 2.125rem;
      padding-inline: 0.875rem;
    }
  }

  /* ---------- Botones redondeados con degradados modernos ---------- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-block-size: 2.375rem;
    padding: 0.4rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: var(--fs-base);
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t), color var(--t);

    @media (pointer: coarse) { min-block-size: var(--tap); }

    &:disabled, &[aria-disabled="true"] {
      cursor: not-allowed;
      opacity: 0.65;
      background: var(--slate-100);
      border-color: var(--slate-200);
      color: var(--slate-400);
      box-shadow: none;
      transform: none;
    }
  }
  .btn--primary {
    background: linear-gradient(135deg, #745cb5 0%, #5d449b 100%);
    border-color: #5d449b;
    color: #ffffff;
    box-shadow: 0 2px 5px -1px rgba(101, 78, 163, 0.35), 0 1px 2px rgba(101, 78, 163, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);

    &:hover:not(:disabled) {
      background: linear-gradient(135deg, #7e65c4 0%, #644ba3 100%);
      border-color: #644ba3;
      color: #ffffff;
      box-shadow: 0 5px 12px -2px rgba(101, 78, 163, 0.45), 0 2px 4px rgba(101, 78, 163, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
      transform: translateY(-1px);
      text-decoration: none;
    }
    &:active:not(:disabled) {
      background: linear-gradient(135deg, #533b8b 0%, #463177 100%);
      transform: translateY(0);
      box-shadow: 0 1px 2px rgba(101, 78, 163, 0.3), inset 0 1px 2px rgba(0, 0, 0, 0.15);
    }
  }
  .btn--secondary {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border-color: var(--slate-300);
    color: var(--slate-700);
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05), inset 0 1px 0 #ffffff;

    &:hover:not(:disabled) {
      background: linear-gradient(180deg, #fdfcff 0%, #f4f0fa 100%);
      border-color: var(--purple-300);
      color: var(--purple-900);
      box-shadow: 0 3px 8px -1px rgba(101, 78, 163, 0.15);
      transform: translateY(-1px);
      text-decoration: none;
    }
    &:active:not(:disabled) {
      background: #f1edfa;
      transform: translateY(0);
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    }
  }
  .btn--sm {
    min-block-size: 1.875rem;
    padding-inline: var(--sp-3);
    font-size: var(--fs-sm);
  }

  /* ---------- Formularios ---------- */
  .field { display: grid; gap: var(--sp-1); margin-block-end: var(--sp-4); }
  .field__label { font-weight: 700; color: var(--color-text); font-size: var(--fs-sm); }
  .field__hint { color: var(--color-text-muted); font-size: var(--fs-xs); }
  .field__error {
    display: none;
    color: var(--red-700);
    font-size: var(--fs-xs);
    font-weight: 600;

    &::before { content: "Error: "; }
  }
  .field__error--shown { display: block; }

  .input, .textarea {
    inline-size: 100%;
    min-block-size: 2.5rem;
    padding: 0.55rem 0.875rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    transition: border-color var(--t), background-color var(--t), box-shadow var(--t);

    @media (pointer: coarse) { min-block-size: var(--tap); }

    &:hover { border-color: var(--purple-300); }
    &:focus-visible {
      outline: none;
      border-color: var(--color-focus);
      box-shadow: 0 0 0 3px rgba(101, 78, 163, 0.15);
    }
    &:disabled { background: var(--slate-100); color: var(--slate-400); cursor: not-allowed; }
    &:user-invalid, &[aria-invalid="true"] {
      border-color: var(--red-700);
      background: var(--red-50);
    }
    &:user-valid:required { border-color: var(--green-700); }
    &:user-invalid + .field__error { display: block; }
  }

  /* Select con flecha estilizada en morado madridista, nunca pegada al borde */
  .select {
    inline-size: 100%;
    min-block-size: 2.5rem;
    padding: 0.5rem 2.85rem 0.5rem 0.95rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--color-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23654EA3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem 1rem;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    cursor: pointer;
    transition: border-color var(--t), background-color var(--t), box-shadow var(--t);

    @media (pointer: coarse) { min-block-size: var(--tap); }

    &:hover {
      border-color: var(--purple-300);
      background-color: #faf9fd;
    }
    &:focus-visible {
      outline: none;
      border-color: var(--color-focus);
      box-shadow: 0 0 0 3px rgba(101, 78, 163, 0.15);
    }
    &:disabled { background: var(--slate-100); color: var(--slate-400); cursor: not-allowed; }
  }

  .textarea { min-block-size: 8rem; resize: vertical; padding: var(--sp-3); border-radius: var(--radius-md); }
  .check { display: flex; gap: var(--sp-2); align-items: flex-start; margin-block-end: var(--sp-3); }
  .check input { inline-size: 1.125rem; block-size: 1.125rem; margin-block-start: 0.15rem; accent-color: var(--color-action); }

  .search-form { display: flex; gap: var(--sp-2); inline-size: 100%; }
  .search-form .input { min-inline-size: 0; }

  /* Tarjeta de formularios de autenticación con margen interno amplio */
  .form-card {
    max-inline-size: 460px;
    margin-inline: auto;
    padding: 2.25rem 2rem;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-block-start: 4px solid var(--color-brand);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(101, 78, 163, 0.08), 0 4px 10px -3px rgba(15, 23, 42, 0.04);
  }
  .form-card h1 {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--color-brand);
    margin-block-end: var(--sp-4);
  }
  .form-card .btn--primary {
    min-block-size: 2.625rem;
    font-size: 0.9375rem;
  }
  .form-card__links {
    display: grid;
    gap: var(--sp-2);
    margin-block-start: var(--sp-5);
    padding-block-start: var(--sp-4);
    border-block-start: 1px solid var(--slate-100);
  }
  .form-card__links a {
    color: var(--color-brand);
    font-weight: 500;
    font-size: var(--fs-sm);
    text-decoration: none;

    &:hover {
      color: var(--color-action-hover);
      text-decoration: underline;
    }
  }
  .form-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: end; }
  .form-row .field { margin-block-end: 0; flex: 1 1 12rem; }

  @media (max-width: 640px) {
    .form-card {
      padding: 1.5rem 1.15rem;
    }
    .form-row .btn {
      inline-size: 100%;
      justify-content: center;
      min-block-size: 2.625rem;
    }
  }

  @media (max-width: 768px) {
    input, select, textarea, .input, .textarea, .select {
      font-size: 16px !important;
    }
  }

  /* ---------- Paneles / cajas redondeadas con sombra sutil ---------- */
  .box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    min-inline-size: 0;
    overflow: hidden;
  }
  .box__title {
    padding: 0.75rem var(--sp-4);
    background: var(--rm-white);
    color: var(--color-brand);
    font-size: var(--fs-sm);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-block-end: 1px solid var(--color-border);
    border-inline-start: 4px solid var(--color-accent);
  }
  .box__body { padding: var(--sp-3); }
  .box__body--flush { padding: 0; }

  .legal-content-box {
    padding: var(--sp-5);
  }
  @media (max-width: 640px) {
    .legal-content-box {
      padding: 1.15rem 1rem !important;
    }
  }

  .community-footer-header {
    padding: 1.75rem 2rem;
  }
  @media (max-width: 640px) {
    .community-footer-header {
      padding: 1rem 1rem !important;
    }
    .thread-create-actions {
      flex-direction: column-reverse;
      gap: 0.5rem !important;
    }
    .thread-create-actions button,
    .thread-create-actions a {
      width: 100% !important;
      text-align: center;
      justify-content: center;
    }
  }

  .mini-list > li {
    padding: var(--sp-2) var(--sp-3);
    transition: background-color var(--t);

    &:not(:last-child) { border-block-end: 1px solid var(--slate-100); }
    &:hover { background: var(--purple-50); }
  }
  .mini-list__title { display: block; font-weight: 600; color: var(--color-text); text-decoration: none; }
  .mini-list__title:hover { color: var(--color-link-hover); text-decoration: underline; }
  .mini-list__meta { display: block; font-size: var(--fs-xs); color: var(--color-text-muted); margin-block-start: 2px; }
  .link-list > li > a {
    display: block;
    padding: var(--sp-2) var(--sp-3);
    text-decoration: none;
    font-weight: 600;
    color: var(--color-text);
    transition: background-color var(--t), color var(--t);

    &:hover { background: var(--purple-50); color: var(--color-link-hover); text-decoration: none; }
  }
  .link-list > li:not(:last-child) { border-block-end: 1px solid var(--slate-100); }

  /* ---------- Tendencias de hoy (Trending) ---------- */
  .trending-panel-header {
    padding: 0.55rem 0.85rem !important;
    background: linear-gradient(135deg, #654EA3 0%, #51398f 100%) !important;
    border: none !important;
  }
  .trending-panel-title {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
  }
  .trending-sidebar-item:hover {
    background-color: var(--purple-50) !important;
  }
  .trending-sidebar-item:hover .trending-item-title {
    color: var(--color-link-hover) !important;
    text-decoration: underline;
  }
  .btn-trending-view-all:hover {
    background-color: var(--purple-50) !important;
    border-color: var(--purple-400) !important;
    color: var(--purple-900) !important;
  }
  .trending-row:hover {
    background-color: var(--purple-50) !important;
  }
  .trending-row:hover .thread-title {
    color: var(--color-link-hover) !important;
  }

  /* ---------- Cabecera de página y breadcrumb ---------- */
  .breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-1) var(--sp-2);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
  }
  .breadcrumb li:not(:last-child)::after {
    content: "\203a";
    margin-inline-start: var(--sp-2);
    color: var(--slate-400);
  }
  .breadcrumb [aria-current="page"] { color: var(--color-text); font-weight: 600; }
  .breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
  .breadcrumb a:hover { color: var(--color-brand); text-decoration: underline; }

  .page-header {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-inline-start: 4px solid var(--color-brand);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);

    @media (max-width: 640px) {
      padding: 1rem 1rem !important;
      gap: 0.65rem;
    }
  }
  .page-header__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-3);
  }
  .page-header__intro {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-inline-size: 100%;
    width: 100%;
    margin: 0;
  }
  .page-header__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
  .page-header__clock { font-size: var(--fs-xs); color: var(--color-text-muted); }

  @media (max-width: 640px) {
    .breadcrumb {
      font-size: 0.775rem;
      line-height: 1.4;
    }
    .page-header h1 {
      font-size: 1.3rem;
      line-height: 1.25;
    }
    .page-header__actions {
      width: 100%;
    }
  }

  .stats { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-5); }
  .stats > div { display: flex; gap: var(--sp-2); align-items: baseline; }
  .stats dt { color: var(--color-text-muted); font-size: var(--fs-sm); }
  .stats dd { font-weight: 800; color: var(--color-brand); font-variant-numeric: tabular-nums; }

  /* ---------- Tablas del foro modernas ---------- */
  .table-wrap {
    container-type: inline-size;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }
  .forum-table { inline-size: 100%; table-layout: fixed; }
  .forum-table caption { text-align: start; }
  .forum-table thead th {
    padding: 0.625rem var(--sp-4);
    background: var(--slate-50);
    color: var(--slate-500);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-block-end: 1px solid var(--color-border);
    white-space: nowrap !important;
    line-height: 1.2;
  }
  .forum-table td, .forum-table tbody th[scope="row"] {
    padding: 0.875rem var(--sp-4);
    vertical-align: middle;
    border-block-end: 1px solid var(--slate-100);
    transition: background-color var(--t);
  }
  .forum-table tbody tr:last-child > :is(td, th) { border-block-end: 0; }
  .forum-table tbody tr:hover > :is(td, th[scope="row"]) { background: var(--purple-50); }
  .forum-table tbody tr[data-href] { cursor: pointer; }
  .forum-table tbody tr[data-href] a { cursor: pointer; position: relative; z-index: 1; }

  .forum-table .col-title {
    inline-size: auto;
    width: auto;
  }
  .forum-table .col-num {
    inline-size: 6.5rem;
    width: 6.5rem;
    min-inline-size: 5.75rem;
    text-align: center;
    white-space: nowrap !important;
  }
  .forum-table .col-last,
  .forum-table .col-last--wide {
    inline-size: 13.5rem;
    width: 13.5rem;
    min-inline-size: 12.5rem;
    text-align: end;
    white-space: nowrap !important;
  }
  .forum-table td.num {
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap !important;
    color: var(--slate-700);
  }
  .forum-table td.cell-last {
    text-align: end;
    white-space: nowrap;
  }

  /* Encabezado de sección / categoría con toque morado y blanco */
  .forum-table .section-row th {
    padding: 0.75rem var(--sp-4);
    background: linear-gradient(90deg, #f8f6fc 0%, #ffffff 100%);
    color: var(--color-brand);
    font-weight: 800;
    font-size: var(--fs-sm);
    letter-spacing: 0.04em;
    border-block-end: 1px solid var(--color-border);
    border-block-start: 1px solid var(--color-border);
    border-inline-start: 4px solid var(--color-brand);

    a {
      color: var(--color-brand);
      text-decoration: none;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      font-weight: 800;
    }
    a:hover { text-decoration: underline; color: var(--color-action); }
    a:focus-visible { outline-color: var(--color-brand); }
  }
  .forum-table tbody:first-of-type .section-row th { border-block-start: 0; }

  .forum-name { font-size: var(--fs-md); font-weight: 700; }
  .forum-name a { color: var(--slate-900); text-decoration: none; }
  .forum-name a:hover { color: var(--color-brand); text-decoration: underline; }
  .forum-desc { color: var(--color-text-muted); font-size: var(--fs-sm); margin-block-start: 2px; }
  .last-title { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--slate-800); text-decoration: none; }
  .last-title:hover { color: var(--color-brand); text-decoration: underline; }
  .meta { color: var(--color-text-muted); font-size: var(--fs-xs); }
  .meta a { color: inherit; text-decoration: none; }
  .meta a:hover { color: var(--color-brand); text-decoration: underline; }
  .meta--block { display: block; margin-block-start: 2px; }
  .muted { color: var(--color-text-muted); }

  /* ---------- Tarjetas de secciones en página principal (estilo limpio Forocoches) ---------- */
  .forum-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .section-card {
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: var(--radius-lg, 14px);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
    overflow: hidden;
  }

  .section-card--primary {
    border-color: var(--color-border-strong, #cbd5e1);
  }

  .section-card--primary .section-card__header {
    border-inline-start: 4px solid var(--color-brand, #654EA3);
  }

  .section-card__header {
    padding: 1.25rem 1.5rem 0.875rem;
    background: var(--slate-50, #f8fafc);
    border-block-end: 1px solid var(--color-border, #e2e8f0);
  }

  .section-card__title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 850;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--color-text, #0f172a);

    a {
      color: inherit;
      text-decoration: none;
      transition: color var(--t-fast, 0.15s ease);
    }
    a:hover {
      color: var(--color-brand, #654EA3);
      text-decoration: none;
    }
  }

  .section-card__body {
    display: flex;
    flex-direction: column;
  }

  .forum-row {
    display: flex;
    align-items: flex-start;
    gap: 1.125rem;
    padding: 1.125rem 1.5rem;
    background: var(--color-surface, #ffffff);
    border-block-end: 1px solid var(--color-border, #f1f5f9);
    cursor: pointer;
    transition: background-color var(--t-fast, 0.15s ease);

    &:last-child {
      border-block-end: 0;
    }

    &:hover {
      background-color: var(--color-surface-alt, #f8fafc);
    }

    &:hover .category-icon {
      color: var(--color-brand, #654EA3);
      transform: scale(1.05);
    }

    &:hover .forum-row__title {
      color: var(--color-brand, #654EA3);
    }
  }

  .category-icon-wrap {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 2.25rem;
    block-size: 2.25rem;
    margin-block-start: 0.125rem;
  }

  .category-icon {
    color: #64748b;
    transition: color var(--t-fast, 0.15s ease), transform var(--t-fast, 0.15s ease);
  }

  .forum-row__content {
    flex: 1;
    min-inline-size: 0;
  }

  .forum-row__title {
    display: inline-block;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--slate-900, #0f172a);
    text-decoration: none;
    transition: color var(--t-fast, 0.15s ease);

    &:hover {
      color: var(--color-brand, #654EA3);
      text-decoration: none;
    }
  }

  .forum-row__desc {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #64748b;
  }

  .thread-title { font-weight: 700; font-size: var(--fs-md); color: var(--slate-900); text-decoration: none; }
  .thread-title:hover { color: var(--color-brand); text-decoration: underline; }
  .title-bold { font-weight: 800; color: inherit; }
  .thread-state { margin-inline-end: var(--sp-1); }

  .thread-mini-pagination {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-inline-start: 0.5rem;
    vertical-align: middle;
  }
  .thread-mini-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--slate-600);
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    border-radius: 3px;
    text-decoration: none;
    line-height: 1;
    transition: all 0.15s ease;
  }
  .thread-mini-page:hover {
    background: var(--purple-100);
    border-color: var(--purple-300);
    color: var(--purple-700);
    text-decoration: none;
  }
  .thread-mini-page-dots {
    font-size: 0.75rem;
    color: var(--slate-400);
    padding: 0 1px;
  }

  /* Filas de hilos de plantilla con foto vertical y distintivo sutil */
  .thread-row--squad td,
  .thread-row--squad th[scope="row"] {
    padding-block: 1.125rem;
    padding-inline: var(--sp-4);
  }
  .thread-row__cell-title {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .thread-avatar-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .thread-avatar-portrait {
    width: 52px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    object-position: top center;
    background-color: #f8fafc;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .thread-avatar-portrait:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  }
  .thread-avatar-portrait--first-team {
    border: 1.5px solid #febe10;
  }
  .thread-avatar-portrait--castilla {
    border: 1px solid #cbd5e1;
  }
  .thread-avatar-portrait--lg {
    width: 76px;
    height: 102px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  .thread-avatar-portrait--lg.thread-avatar-portrait--first-team {
    border: 2px solid #febe10;
  }
  .thread-avatar-portrait--lg.thread-avatar-portrait--castilla {
    border: 1.5px solid #cbd5e1;
  }
  .thread-avatar-portrait--lg.thread-avatar-portrait--femenino {
    border: 2px solid #c084fc;
  }

  /* Icono / Logo oficial de la competición para hilos de partidos */
  .thread-competition-container {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm, 8px);
    transition: transform 0.15s ease, filter 0.15s ease;
  }
  .thread-row:hover .thread-competition-container {
    transform: scale(1.08);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
  }
  .thread-competition-logo {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
  }

  /* Icono de sobre morado para hilos sin imagen de jugador (leído / no leído) */
  .thread-envelope-container {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm, 6px);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
  }
  .thread-row:hover .thread-envelope-container {
    background: #f5f3ff;
    border-color: #ddd6fe;
  }
  .thread-envelope {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }
  .thread-envelope--unread {
    color: var(--color-brand, #654EA3);
    filter: drop-shadow(0 1px 3px rgba(101, 78, 163, 0.25));
  }
  .thread-envelope--unread svg {
    display: block;
    animation: envelopePulse 2.8s infinite ease-in-out;
  }
  .thread-envelope--read {
    color: #8b5cf6;
    opacity: 0.85;
  }
  .thread-envelope--read svg {
    stroke: #8b5cf6;
  }

  @keyframes envelopePulse {
    0%, 100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.06);
    }
  }
  .thread-row--first-team {
    background: linear-gradient(90deg, rgba(254, 190, 16, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
  }
  .player-scope-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 0.2rem;
  }
  .player-scope-label--first-team {
    color: #4338ca;
  }
  .player-scope-label--castilla {
    color: #64748b;
  }
  .player-scope-label--juvenil {
    color: #0284c7;
  }
  .player-scope-label--femenino {
    color: #9333ea;
  }
  .player-scope-label--staff {
    color: #b45309;
  }
  .player-scope-label--legend {
    color: #b45309;
  }
  .thread-title--first-team {
    font-weight: 700;
    color: #0f172a;
  }

  /* Adaptación a móvil / contenedor estrecho */
  @container (width < 640px) {
    .forum-table, .forum-table tbody, .forum-table tr, .forum-table th, .forum-table td { display: block; }
    .forum-table thead { display: none; }
    .forum-table caption { display: block; }
    .forum-table tbody tr:not(.section-row) {
      display: grid;
      grid-template-columns: 1fr 1fr;
      padding: var(--sp-3) var(--sp-4);
      border-block-end: 1px solid var(--slate-100);
      column-gap: var(--sp-3);
    }
    .forum-table tbody tr:last-child { border-block-end: 0; }
    .forum-table td, .forum-table tbody th[scope="row"] { padding: 0; border: 0; }
    .forum-table tbody tr:hover > :is(td, th[scope="row"]) { background: transparent; }
    .forum-table tbody th[scope="row"] { grid-column: 1 / -1; }
    .forum-table td.cell-last { grid-column: 1 / -1; margin-block-start: var(--sp-1); }
    .forum-table td.num { text-align: start; font-size: var(--fs-sm); margin-block-start: var(--sp-1); }
    .forum-table td.num::before {
      content: attr(data-label) ": ";
      font-weight: 400;
      color: var(--color-text-muted);
    }
    .forum-table td.cell-last::before {
      content: attr(data-label) ": ";
      color: var(--color-text-muted);
      font-size: var(--fs-xs);
    }
    .last-title { white-space: normal; }
  }

  /* ---------- Etiquetas estilo píldora ---------- */
  .tag {
    display: inline-block;
    padding: 0.15rem 0.625rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
  }
  .tag--pinned {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 0.1rem 0.45rem;
    letter-spacing: 0.05em;
    line-height: 1.25;
  }
  .tag--locked {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 0.1rem 0.45rem;
    letter-spacing: 0.05em;
    line-height: 1.25;
  }
  .tag--activity { background: #d1fae5; border-color: #a7f3d0; color: #065f46; }
  .tag--staff { background: var(--purple-100); border-color: var(--purple-200); color: var(--purple-800); }

  /* IA: Oculta por completo para que los personajes se muestren como usuarios normales */
  .ai-badge {
    display: none !important;
  }

  /* ---------- Filtros / ordenación ---------- */
  .toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    align-items: end;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
  }
  .toolbar form { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: end; }
  .toolbar .field { margin-block-end: 0; }
  .toolbar .select {
    inline-size: auto;
    min-inline-size: 11.5rem;
    border-radius: var(--radius-pill);
    padding-inline-start: 1.15rem;
    padding-inline-end: 2.85rem;
    background-position: right 1.15rem center;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  /* ---------- Paginación en píldora / circular ---------- */
  .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-4);
    align-items: center;
    justify-content: space-between;
    font-size: var(--fs-sm);
    color: var(--slate-500);
  }
  .pagination__list { display: flex; flex-wrap: wrap; gap: var(--sp-1); align-items: center; }

  @media (max-width: 640px) {
    .pagination {
      justify-content: center !important;
      text-align: center;
      gap: 0.5rem;
    }
    .pagination p {
      width: 100%;
      font-size: 0.8rem;
      margin: 0;
    }
    .pagination__list {
      justify-content: center;
      gap: 0.35rem;
    }
    .pagination__item {
      min-inline-size: 2.5rem !important;
      min-block-size: 2.5rem !important;
      height: 2.5rem !important;
      padding-inline: 0.65rem !important;
      font-size: 0.875rem !important;
    }
  }
  .pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 2.25rem;
    min-block-size: 2.25rem;
    padding-inline: var(--sp-3);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    color: var(--slate-700);
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-xs);
    transition: all var(--t);

    @media (pointer: coarse) { min-inline-size: var(--tap); min-block-size: var(--tap); }
  }
  a.pagination__item:hover {
    background: var(--purple-50);
    border-color: var(--purple-200);
    color: var(--purple-700);
    text-decoration: none;
  }
  a.pagination__item:active { background: var(--purple-100); }
  .pagination__item[aria-current="page"] {
    background: var(--purple-600);
    border-color: var(--purple-600);
    color: #fff;
    box-shadow: 0 2px 4px rgba(101, 78, 163, 0.25);
  }
  .pagination__item[aria-disabled="true"] {
    color: var(--slate-400);
    background: var(--slate-50);
    border-color: var(--slate-200);
    box-shadow: none;
  }

  /* Salvaguarda para iconos SVG de paginación de Laravel */
  .pagination svg,
  nav[role="navigation"] svg {
    inline-size: 1.25rem !important;
    block-size: 1.25rem !important;
    max-inline-size: 1.25rem !important;
    max-block-size: 1.25rem !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    display: inline-block !important;
  }

  /* ---------- Mensajes de hilo y cabecera de hilo ---------- */
  .thread-head {
    padding: var(--sp-4) var(--sp-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-inline-start: 4px solid var(--color-brand);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
  }
  .thread-head h1 { font-size: var(--fs-xl); }
  .post-list { display: grid; gap: var(--sp-4); }

  .post {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: border-color var(--t), box-shadow var(--t);

    &:target { border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(101, 78, 163, 0.15); }
  }
  .post__author {
    padding: var(--sp-4);
    background: #fafbfc;
    border-inline-end: 1px solid var(--slate-100);
    display: grid;
    align-content: start;
    gap: var(--sp-2);
    font-size: var(--fs-sm);
  }
  .post__author-identity {
    display: contents;
  }
  .post__author-name-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
  }
  .post__rank-badge {
    margin: 0.15rem 0 0.25rem 0;
  }
  .rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--rank-color, #475569);
    background: var(--rank-bg, #f8fafc);
    border: 1px solid var(--rank-border, #e2e8f0);
    padding: 0.12rem 0.5rem;
    border-radius: var(--radius-pill, 9999px);
    line-height: 1.2;
  }
  .rank-badge__icon {
    font-size: 0.72rem;
    line-height: 1;
  }
  .rank-badge__name {
    letter-spacing: 0.2px;
  }
  .post__mobile-meta {
    display: none;
  }
  .post__avatar {
    display: grid;
    place-items: center;
    inline-size: 2.75rem;
    block-size: 2.75rem;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #702283 0%, #4a154b 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: var(--fs-base);
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(112, 34, 131, 0.3);
    border: 1.5px solid rgba(254, 190, 16, 0.45);
    text-transform: uppercase;
  }
  .post__username { font-weight: 700; font-size: var(--fs-md); color: var(--color-text); }
  .post__main { padding: var(--sp-4); min-inline-size: 0; display: grid; gap: var(--sp-3); align-content: start; }
  .post__head {
    display: flex;
    justify-content: space-between;
    gap: var(--sp-3);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    padding-block-end: var(--sp-2);
    border-block-end: 1px solid var(--slate-100);
  }
  .post__head a { color: inherit; text-decoration: none; }
  .post__head a:hover { color: var(--color-brand); text-decoration: underline; }
  .post__body {
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.65;
    max-inline-size: 85ch;
    color: #000000;
    letter-spacing: -0.01em;
  }
  .post__body strong,
  .post__body b {
    font-weight: 800;
    color: #000000;
  }
  .post__body p {
    margin-block-end: 0.85rem;
  }
  .quote {
    margin: var(--sp-2) 0 var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    background: var(--purple-50);
    border: 1px solid var(--purple-200);
    border-inline-start-width: 4px;
    border-inline-start-color: var(--purple-600);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    color: var(--slate-700);
  }
  .quote__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-block-end: var(--sp-1);
    flex-wrap: wrap;
  }
  .quote__author {
    display: inline-block;
    font-weight: 700;
    font-size: var(--fs-xs);
    color: var(--color-brand);
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }
  .quote__jump-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.14rem 0.5rem;
    border-radius: var(--radius-full, 9999px);
    background: #ffffff;
    border: 1px solid var(--purple-200);
    color: var(--purple-700, #5b21b6);
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  }
  .quote__jump-btn:hover {
    background: var(--purple-600, #654ea3);
    border-color: var(--purple-600, #654ea3);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
  }
  .quote__jump-btn svg {
    flex-shrink: 0;
  }
  .quote__body { font-style: italic; color: var(--slate-700); }
  @keyframes quoteTargetPulse {
    0% { box-shadow: 0 0 0 0 rgba(254, 190, 16, 0.7), 0 0 0 3px rgba(101, 78, 163, 0.45); background-color: #fefce8; }
    70% { box-shadow: 0 0 0 6px rgba(254, 190, 16, 0), 0 0 0 3px rgba(101, 78, 163, 0.25); background-color: #fefce8; }
    100% { box-shadow: none; }
  }
  .post--quote-target {
    animation: quoteTargetPulse 2.2s ease-out;
  }
  .post__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding-block-start: 0.35rem;
    margin-block-start: 0.4rem;
    border-block-start: 1px solid var(--slate-100);
  }
  .post__action {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-block-size: unset;
    height: auto;
    padding: 0.18rem 0.5rem;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--slate-600);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: background var(--t), border-color var(--t), color var(--t);

    svg {
      width: 11px;
      height: 11px;
      flex-shrink: 0;
    }

    &:hover:not(:disabled) {
      background: var(--purple-50);
      color: var(--purple-800);
      border-color: var(--purple-300);
      text-decoration: none !important;
    }
    &:active:not(:disabled) {
      background: var(--purple-100);
    }
    &:disabled { cursor: not-allowed; opacity: 0.6; }
  }
  summary.post__action {
    list-style: none;
    &::-webkit-details-marker { display: none; }
  }
  .post__action--danger {
    color: var(--red-600);

    &:hover:not(:disabled) {
      background: #fff5f5;
      color: var(--red-800);
      border-color: var(--red-300);
    }
  }

  @media (max-width: 768px) {
    .post__actions {
      gap: 0.25rem;
      padding-block-start: 0.3rem;
    }
    .post__action {
      padding: 0.15rem 0.4rem;
      font-size: 0.68rem;
      gap: 0.2rem;

      svg {
        width: 10px;
        height: 10px;
      }
    }
  }
  .post--opening { border-inline-start: 4px solid var(--color-brand); }
  .post--featured { border-inline-start: 4px solid var(--color-accent); }
  .post--moderated { background: var(--slate-50); border-style: dashed; }
  .post--moderated .post__body { font-style: italic; color: var(--color-text-muted); }

  @media (max-width: 768px) {
    .thread-head {
      background: transparent !important;
      border: none !important;
      border-inline-start: none !important;
      border-radius: 0 !important;
      box-shadow: none !important;
      padding: 0.25rem 0 0.5rem 0 !important;
      margin-block-end: 0.25rem !important;
    }
    .thread-head h1 {
      font-size: 1.3rem !important;
      line-height: 1.25 !important;
      font-weight: 800 !important;
      color: #1e1b4b !important;
      margin-bottom: 0.25rem !important;
    }
    .thread-head .meta {
      font-size: 0.8125rem !important;
      color: #64748b !important;
      line-height: 1.4 !important;
      margin-top: 0.25rem !important;
    }
    .thread-subscribe-btn {
      padding: 0.2rem 0.55rem !important;
      font-size: 0.72rem !important;
      border-radius: 9999px !important;
      font-weight: 600 !important;
      min-block-size: auto !important;
      height: auto !important;
      line-height: 1.3 !important;
      margin-top: 0.35rem !important;
    }

    .post {
      grid-template-columns: 1fr;
      max-width: 100%;
      overflow: hidden;
    }
    .post__author {
      display: flex !important;
      flex-wrap: wrap !important;
      justify-content: space-between !important;
      align-items: center !important;
      row-gap: 0.2rem !important;
      column-gap: 0.5rem !important;
      padding: 0.45rem 0.75rem !important;
      background: #fafbfc !important;
      border-inline-end: 0 !important;
      border-block-end: 1px solid var(--slate-100) !important;
      min-height: auto !important;
    }
    .post__author-identity {
      display: flex !important;
      align-items: center !important;
      gap: 0.5rem !important;
      min-width: 0 !important;
      flex: 1 1 auto !important;
    }
    .post__author-extra {
      display: contents !important;
    }
    .post__author-name-wrap {
      display: flex !important;
      align-items: center !important;
      gap: 0.35rem !important;
      min-width: 0 !important;
    }
    .post__author-meta {
      display: none !important;
    }
    .post__rank-badge {
      width: 100% !important;
      margin: 0 !important;
      padding-top: 0.05rem !important;
      display: flex !important;
      align-items: center !important;
      order: 3 !important;
    }
    .post__rank-badge .rank-badge {
      font-size: 0.65rem !important;
      font-weight: 500 !important;
      padding: 0.06rem 0.4rem !important;
      gap: 0.2rem !important;
      color: #64748b !important;
      background: #f1f5f9 !important;
      border: 1px solid #e2e8f0 !important;
      line-height: 1.2 !important;
      border-radius: 9999px !important;
    }
    .post__rank-badge .rank-badge__icon {
      font-size: 0.65rem !important;
      line-height: 1 !important;
    }
    .post__avatar {
      inline-size: 2rem !important;
      block-size: 2rem !important;
      min-width: 2rem !important;
      width: 2rem !important;
      height: 2rem !important;
      font-size: 0.75rem !important;
      border-width: 1px !important;
      flex-shrink: 0 !important;
    }
    .post__username {
      font-size: 0.875rem !important;
      font-weight: 700 !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
    }
    .post__mobile-meta {
      display: flex !important;
      align-items: center !important;
      gap: 0.35rem !important;
      font-size: 0.75rem !important;
      color: #64748b !important;
      white-space: nowrap !important;
      flex-shrink: 0 !important;
      margin-left: auto !important;
    }
    .post__mobile-meta a {
      color: inherit !important;
      text-decoration: none !important;
    }
    .post__mobile-meta a:hover {
      color: var(--color-brand) !important;
      text-decoration: underline !important;
    }
    .post__mobile-num {
      color: #94a3b8 !important;
      font-weight: 600 !important;
    }
    .post__mobile-edited {
      color: #94a3b8 !important;
      font-size: 0.7rem !important;
      font-style: italic !important;
    }
    .post__head {
      display: none !important;
    }
    .post__main {
      padding: 0.75rem 0.75rem !important;
      min-width: 0 !important;
      max-width: 100% !important;
      overflow: hidden !important;
    }
    .post__body {
      font-size: 0.95rem !important;
      line-height: 1.55 !important;
      max-width: 100% !important;
      min-width: 0 !important;
      max-inline-size: 100% !important;
      overflow-wrap: break-word;
    }
    .post__body p {
      margin-block-end: 0.65rem !important;
    }
  }

  /* ---------- Perfil ---------- */
  .profile-head {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
    align-items: center;
    padding: var(--sp-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-inline-start: 4px solid var(--color-brand);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
  }
  .profile-head .post__avatar { inline-size: 4.5rem; block-size: 4.5rem; font-size: var(--fs-xl); }
  .profile-head h1 { font-size: var(--fs-xl); }

  /* ---------- Avisos y estados ---------- */
  .alert {
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid var(--purple-200);
    border-inline-start-width: 4px;
    border-radius: var(--radius-md);
    background: var(--purple-50);
    color: var(--color-text);
    box-shadow: var(--shadow-xs);
  }
  .alert__label { font-weight: 800; margin-inline-end: var(--sp-1); }
  .alert--success { background: var(--green-50); border-color: #a7f3d0; border-inline-start-color: var(--green-700); }
  .alert--warning { background: var(--gold-50); border-color: #ffe89c; border-inline-start-color: var(--gold-700); }
  .alert--error { background: var(--red-50); border-color: #fecaca; border-inline-start-color: var(--red-700); }
  .alert--info { border-inline-start-color: var(--purple-600); }

  .demo-banner {
    padding: var(--sp-1) var(--sp-3);
    background: var(--gold-50);
    border-block-end: 1px solid var(--gold-200);
    color: var(--gold-800);
    font-size: var(--fs-sm);
    text-align: center;
    font-weight: 600;
  }

  .state-panel {
    padding: var(--sp-6) var(--sp-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
    display: grid;
    gap: var(--sp-2);
    justify-items: center;
  }
  .state-panel--compact { padding-block: var(--sp-4); }
  .state-panel__code { font-size: var(--fs-2xl); font-weight: 800; color: var(--purple-700); line-height: 1; }
  .state-panel p { color: var(--color-text-muted); max-inline-size: 55ch; }
  .spinner {
    inline-size: 1.5rem;
    block-size: 1.5rem;
    border: 3px solid var(--purple-200);
    border-block-start-color: var(--color-brand);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
  }
  @keyframes spin { to { rotate: 360deg; } }
  @media (prefers-reduced-motion: reduce) {
    .spinner { animation: none; border-color: var(--color-brand); }
  }
  .empty-cell { padding: var(--sp-5); text-align: center; color: var(--color-text-muted); }

  /* ---------- Pie de página Madridista Profesional ---------- */
  .site-footer {
    background: linear-gradient(180deg, #150f28 0%, #0a0614 100%);
    color: #94a3b8;
    font-size: var(--fs-sm);
    border-block-start: 3px solid #febe10;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.25);
    margin-block-start: var(--sp-6);
    --focus-ring: #febe10;

    a {
      color: #e2e8f0;
      text-decoration: none;
      transition: color var(--t), transform var(--t);
    }
    a:hover {
      color: #febe10;
      text-decoration: none;
    }
  }

  .site-footer__pre {
    background: rgba(0, 0, 0, 0.25);
    border-block-end: 1px solid rgba(255, 255, 255, 0.07);
    padding-block: 0.75rem;
    font-size: var(--fs-xs);
  }
  .site-footer__pre-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
  }
  .site-footer__status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #cbd5e1;
  }
  .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
  }
  .status-dot--online {
    background-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
    animation: pulse-dot 2s infinite ease-in-out;
  }
  @keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
  }

  .site-footer__back-top {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #cbd5e1 !important;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  .site-footer__back-top:hover {
    background: rgba(254, 190, 16, 0.15) !important;
    border-color: #febe10 !important;
    color: #febe10 !important;
  }

  .site-footer__main {
    padding-block: 3rem 2.25rem;
  }
  .site-footer__grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1.1fr 1.2fr;
    gap: var(--sp-6);
  }
  @media (max-width: 900px) {
    .site-footer__grid {
      grid-template-columns: 1fr 1fr;
      gap: var(--sp-5);
    }
  }
  @media (max-width: 580px) {
    .site-footer__grid {
      grid-template-columns: 1fr;
      gap: var(--sp-4);
    }
  }

  .site-footer__col--brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  .site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
  }
  .site-footer__brand:hover {
    text-decoration: none !important;
  }
  .site-footer .brand__logo-path {
    fill: #ffffff;
  }
  .site-footer__brand-title {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
    line-height: 1.1;
  }
  .site-footer__brand-sub {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #febe10;
    margin-top: 2px;
  }
  .site-footer__about {
    font-size: 0.85rem;
    line-height: 1.65;
    color: #94a3b8;
    margin: 0;
  }
  .site-footer__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
  }
  .footer-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: #cbd5e1;
  }

  .site-footer__heading {
    color: #febe10;
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem 0;
    padding-block-end: 0.35rem;
    border-block-end: 2px solid rgba(254, 190, 16, 0.25);
    display: inline-block;
  }
  .site-footer__nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }
  .site-footer__nav-list li a {
    font-size: 0.875rem;
    color: #cbd5e1;
    display: inline-block;
  }
  .site-footer__nav-list li a:hover {
    color: #febe10;
    transform: translateX(3px);
  }
  .site-footer__btn-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 0.875rem;
    color: #cbd5e1;
    cursor: pointer;
    text-align: start;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color var(--t), transform var(--t);
  }
  .site-footer__btn-link:hover {
    color: #febe10;
    transform: translateX(3px);
  }

  .site-footer__bottom {
    background: #06040c;
    border-block-start: 1px solid rgba(255, 255, 255, 0.07);
    padding-block: 1.75rem;
  }
  .site-footer__bottom-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  .site-footer__disclaimer {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.6;
    color: #64748b;
  }
  .site-footer__disclaimer strong {
    color: #94a3b8;
  }
  .site-footer__disclaimer code {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 4px;
    border-radius: 3px;
    color: #cbd5e1;
    font-size: 0.72rem;
  }

  .site-footer__copy-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-block-start: 0.75rem;
    border-block-start: 1px solid rgba(255, 255, 255, 0.05);
  }
  .site-footer__copy {
    margin: 0;
    font-size: 0.8125rem;
    color: #94a3b8;
    font-weight: 500;
  }
  .site-footer__bottom-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8125rem;
  }
  .site-footer__bottom-links a {
    color: #94a3b8;
  }
  .site-footer__bottom-links a:hover {
    color: #febe10;
  }
  .site-footer__bottom-links span {
    color: rgba(255, 255, 255, 0.2);
  }

  /* ---------- Banner Flotante de Consentimiento de Cookies (RGPD) ---------- */
  .cookie-banner {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    max-width: 460px;
    width: calc(100% - 3rem);
    z-index: 99999;
    background: rgba(14, 10, 26, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(254, 190, 16, 0.35);
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 1.25rem;
    color: #f1f5f9;
    animation: cookie-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes cookie-slide-up {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  @media (max-width: 640px) {
    .cookie-banner {
      bottom: 0.75rem;
      right: 0.75rem;
      left: 0.75rem;
      width: auto;
      max-width: none;
      padding: 1rem;
    }
  }
  .cookie-banner__inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .cookie-banner__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
  }
  .cookie-banner__icon {
    font-size: 1.25rem;
    line-height: 1;
  }
  .cookie-banner__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
  }
  .cookie-banner__desc {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #cbd5e1;
  }
  .cookie-banner__link {
    color: #febe10;
    text-decoration: underline;
    font-weight: 600;
  }
  .cookie-banner__link:hover {
    color: #ffffff;
  }
  .cookie-banner__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
  }
  @media (max-width: 480px) {
    .cookie-banner__actions {
      flex-direction: column-reverse;
      width: 100%;
      gap: 0.5rem;
    }
    .cookie-banner__actions .btn {
      width: 100% !important;
      min-height: 42px !important;
      justify-content: center !important;
      font-size: 0.875rem !important;
    }
  }
  .cookie-banner .btn--outline,
  #btn-accept-necessary-cookies {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 700 !important;
  }
  .cookie-banner .btn--outline:hover,
  #btn-accept-necessary-cookies:hover {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border-color: #94a3b8 !important;
  }

  /* ---------- Galería de componentes (entorno local) ---------- */
  .gallery { display: grid; gap: var(--sp-5); }
  .gallery section { display: grid; gap: var(--sp-3); }
  .swatches { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  .swatch { inline-size: 7rem; border: var(--border); border-radius: var(--radius-sm); overflow: hidden; font-size: var(--fs-xs); background: var(--color-surface); box-shadow: var(--shadow-xs); }
  .swatch i { display: block; block-size: 2.5rem; }
}

/* ==========================================================================
   6. Utilidades
   ========================================================================== */
@layer utilities {
  .sr-only {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .stack { display: grid; gap: var(--sp-3); }
  .text-end { text-align: end; }
}

/* ==========================================================================
   7. Panel de Administración y Moderación - Layout 100% Fullscreen
   ========================================================================== */
.admin-body {
  background: #f8fafc;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

.admin-wrapper-100 {
  display: flex;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.admin-sidebar-100 {
  width: 270px;
  min-width: 270px;
  max-width: 270px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: #ffffff;
  border-right: 1px solid var(--color-border);
  box-shadow: 1px 0 3px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 50;
  overflow-y: auto;
}

.admin-sidebar-100__top {
  padding: 1.25rem 1rem 1rem;
}

.admin-sidebar-100__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 1.25rem;
}

.admin-sidebar-100__footer {
  padding: 1rem;
  border-top: 1px solid #f1f5f9;
  background: #fcfdfe;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.admin-sidebar-user__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #654ea3 0%, #febe10 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.admin-sidebar-user__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-sidebar-user__name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--slate-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-sidebar-user__role {
  font-size: 0.6875rem;
  color: var(--slate-500);
  font-weight: 600;
}

.admin-sidebar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-content-100 {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f8fafc;
}

.admin-topbar-100 {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-topbar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-800);
  letter-spacing: -0.01em;
}

.admin-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-600);
  background: #f1f5f9;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot--online {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.admin-main-100 {
  flex: 1;
  padding: 2rem 2.5rem 3.5rem;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ai-movement-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.ai-movement-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.ai-movement-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ai-movement-card__agent {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-agent-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.25);
  flex-shrink: 0;
}

.ai-agent-avatar--match {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
}

.ai-movement-body-quote {
  background: #f8fafc;
  border-left: 3px solid #6366f1;
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.875rem;
  color: var(--slate-700);
  line-height: 1.55;
}

.ai-movement-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .admin-wrapper-100 {
    flex-direction: column;
  }
  .admin-sidebar-100 {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: auto;
    position: static;
  }
  .admin-main-100 {
    padding: 1.25rem 1rem 2.5rem;
  }
  .admin-topbar-100 {
    padding: 0 1rem;
  }
}

.admin-header {
  background: #ffffff;
  border-block-end: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  z-index: 40;
}
.admin-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
  gap: 1rem;
}
.admin-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-brand);
  text-decoration: none !important;
  font-size: 1.05rem;
}
.admin-header__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--fs-sm);
  color: var(--slate-600);
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  padding-block: 1.5rem 3rem;
  align-items: start;
}

.admin-sidebar {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 0.75rem;
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 4.5rem;
}

.admin-nav {
  display: grid;
  gap: 1.25rem;
}
.admin-nav__group {
  display: grid;
  gap: 0.25rem;
}
.admin-nav__title {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-400);
  padding-inline: 0.75rem;
  margin-block-end: 0.25rem;
}
.admin-nav__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-pill);
  color: var(--slate-700);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none !important;
  transition: all var(--t);

  &:hover {
    background: var(--purple-50);
    color: var(--purple-800);
  }

  &.is-active {
    background: linear-gradient(135deg, #745cb5 0%, #5d449b 100%);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(101, 78, 163, 0.25);
  }
}

.admin-main {
  min-inline-size: 0;
  display: grid;
  gap: 1.5rem;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.admin-stat-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem;
  box-shadow: var(--shadow-xs);
  display: grid;
  gap: 0.25rem;
}
.admin-stat-card__number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-brand);
  line-height: 1.1;
}
.admin-stat-card__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
}
.admin-stat-card--highlight {
  border-inline-start: 4px solid var(--color-accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}
.badge--purple { background: var(--purple-100); color: var(--purple-900); }
.badge--success { background: #dcfce7; color: #15803d; }
.badge--warning { background: #fef9c3; color: #854d0e; }
.badge--danger { background: #fee2e2; color: #b91c1c; }
.badge--neutral { background: var(--slate-100); color: var(--slate-700); }

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table--admin {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  text-align: start;

  th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    font-weight: 700;
    color: var(--slate-700);
    border-block-end: 1px solid var(--color-border);
    white-space: nowrap;
  }
  td {
    padding: 0.75rem 1rem;
    border-block-end: 1px solid var(--slate-100);
    vertical-align: middle;
    color: var(--slate-800);
  }
  tr:hover td {
    background: #fafbff;
  }
}

@media (max-width: 899px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
  }
  .admin-nav {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
}

/* ==========================================================================
   Espacios Publicitarios (Banners, Robas y Cintillos)
   ========================================================================== */
.ad-slot-wrapper {
  margin: 1rem 0;
  width: 100%;
  display: flex;
  justify-content: center;
  clear: both;
}

.ad-slot {
  position: relative;
  width: 100%;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.ad-slot:hover {
  border-color: #94a3b8;
}

.ad-slot__tag {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  background: rgba(241, 245, 249, 0.85);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  z-index: 5;
  pointer-events: none;
}

.ad-slot--cintillo,
.ad-slot--leaderboard,
.ad-slot--inline {
  min-height: 90px;
  max-width: 970px;
}

.ad-slot--roba {
  min-height: 250px;
  max-width: 336px;
}

.ad-slot--roba_doble {
  min-height: 380px;
  max-width: 336px;
}

.ad-slot__placeholder {
  width: 100%;
  height: 100%;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(101, 78, 163, 0.04) 0%, rgba(254, 190, 16, 0.06) 100%);
}

.ad-slot__placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.ad-slot__placeholder-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-brand);
}

.ad-slot__placeholder-desc {
  font-size: 0.75rem;
  color: var(--slate-500);
}

.ad-slot__placeholder-btn {
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #4338ca;
  background: #ffffff;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid #c7d2fe;
  text-decoration: none;
  transition: all 0.15s ease;
}

.ad-slot__placeholder-btn:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
}

.ad-slot__link {
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
}

.ad-slot__image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.ad-slot__code {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================================================
   8. Notificaciones y Suscripciones (Fase 6)
   ========================================================================== */
.header-notification-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.25rem;
  block-size: 2.25rem;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #3f2a74;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t);
  text-decoration: none;
  flex-shrink: 0;

  &:hover {
    background: #f8fafc;
    color: #2b1a54;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
    text-decoration: none;
  }

  &:active {
    transform: translateY(0);
  }
}

.header-notification-icon {
  inline-size: 1.15rem;
  block-size: 1.15rem;
  stroke: #3f2a74;
  color: #3f2a74;
}

.header-notification-btn:hover .header-notification-icon {
  stroke: #2b1a54;
}

.header-notification-badge {
  position: absolute;
  inset-block-start: -4px;
  inset-inline-end: -4px;
  min-inline-size: 1.15rem;
  block-size: 1.15rem;
  padding-inline: 0.3rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(190, 18, 60, 0.4), 0 0 0 2px #ffffff;
}

.notification-item {
  transition: background var(--t);
}
.notification-item:hover {
  background: #f7f5fc !important;
}

/* ==========================================================================
   Ficha técnica de jugador / Cuerpo técnico en mensaje inicial
   ========================================================================== */
.post--opening .post__body {
  max-inline-size: 100%;
}

.player-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  margin: 0;
  padding: 0;
}

.player-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  background: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  border-inline-start: 4px solid var(--rm-gold);
  color: var(--slate-800);
  margin-block-end: 1.15rem;
}

.player-card__header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.player-card__scope {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.player-card__scope--first {
  background: rgba(254, 190, 16, 0.18);
  color: var(--gold-800);
  border: 1px solid rgba(254, 190, 16, 0.45);
}

.player-card__scope--femenino {
  background: rgba(147, 51, 234, 0.12);
  color: #7e22ce;
  border: 1px solid rgba(147, 51, 234, 0.35);
}

.player-card__scope--castilla {
  background: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
}

.player-card__scope--staff {
  background: var(--purple-100);
  color: var(--purple-900);
  border: 1px solid var(--purple-200);
}

.player-card__scope--basket {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
  border: 1px solid rgba(234, 88, 12, 0.35);
}

.player-card__scope--legend {
  background: linear-gradient(135deg, rgba(254, 190, 16, 0.25), rgba(217, 119, 6, 0.16));
  color: #92400e;
  border: 1px solid rgba(217, 119, 6, 0.45);
}

.player-card__dorsal {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold-700);
  letter-spacing: -0.02em;
  line-height: 1;
}

.player-card__header-titles {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.player-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--purple-950);
  line-height: 1.2;
}

.player-card__subtitle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
  font-size: 0.8rem;
  color: var(--slate-600);
}

.player-card__pos {
  color: var(--purple-700);
  font-weight: 700;
}

.player-card__layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 175px;
  gap: 1.5rem;
  padding: 0;
  align-items: start;
}

/* Columna foto */
.player-card__photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.player-card__photo-frame {
  position: relative;
  inline-size: 100%;
  max-inline-size: 200px;
  border-radius: 0;
  overflow: visible;
  border: none;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.player-card__img {
  display: block;
  inline-size: 100%;
  max-inline-size: 200px;
  block-size: auto;
  max-block-size: 280px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.08));
}

.player-card__photo-placeholder {
  display: grid;
  place-items: center;
  inline-size: 100%;
  aspect-ratio: 4 / 5.2;
  font-size: 3rem;
  font-weight: 800;
  color: var(--purple-600);
}

.player-card__photo-number {
  position: absolute;
  inset-block-end: 6px;
  inset-inline-end: 8px;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--rm-gold);
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.player-card__photo-caption {
  text-align: center;
  margin-block-start: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.player-card__pos-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--purple-100);
  color: var(--purple-900);
  border: 1px solid var(--purple-200);
}

.player-card__pos-desc {
  font-size: 0.75rem;
  color: var(--slate-600);
  font-weight: 500;
}

/* Columna información */
.player-card__info-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-inline-size: 0;
}

.player-card__meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 1rem;
  margin: 0;
}

.player-card__meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.player-card__meta-item--wide {
  grid-column: 1 / -1;
}

.player-card__meta-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
}

.player-card__meta-val {
  margin: 0;
  font-size: 0.875rem;
  color: var(--slate-800);
  font-weight: 500;
}

.player-card__age {
  font-size: 0.8rem;
  color: var(--slate-500);
  font-weight: 400;
  margin-inline-start: 0.25rem;
}

.player-card__honours {
  background: #fdfbf4;
  border: 1px solid #fed863;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.player-card__honours-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold-800);
  margin-block-end: 0.45rem;
}

.player-card__honours-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.player-card__honour-pill {
  font-size: 0.74rem;
  font-weight: 600;
  background: #ffffff;
  color: var(--slate-800);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid #ffe89c;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.player-card__bio {
  font-size: 0.835rem;
  line-height: 1.5;
  color: var(--slate-600);
  border-inline-start: 3px solid var(--purple-300);
  padding-inline-start: 0.75rem;
  background: rgba(237, 232, 247, 0.25);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding-block: 0.35rem;
}

.player-card__bio p {
  margin: 0;
  font-style: italic;
}

/* Columna mini pitch táctico */
.player-card__pitch-col {
  display: flex;
  flex-direction: column;
}

.mini-pitch-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mini-pitch-card__head {
  inline-size: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--purple-900);
  margin-block-end: 0.45rem;
}

.mini-pitch-line-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

.mini-pitch-line-badge--def {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.mini-pitch-line-badge--gk {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.mini-pitch-line-badge--mid {
  background: #ede8f7;
  color: #5b21b6;
  border: 1px solid #d6cced;
}

.mini-pitch-line-badge--att {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.mini-pitch-line-badge--staff {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.player-card__line-highlight--def { color: #0369a1; }
.player-card__line-highlight--gk { color: #92400e; }
.player-card__line-highlight--mid { color: #5b21b6; }
.player-card__line-highlight--att { color: #b91c1c; }
.player-card__line-highlight--staff { color: #334155; }

/* Sección de estadísticas oficiales en la ficha del jugador */
.player-card__stats-section {
  margin-block-start: 1.25rem;
  padding-block-start: 1.125rem;
  border-block-start: 1px solid var(--slate-200);
}

.player-card__stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-end: 0.875rem;
}

.player-card__stats-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-card__stats-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--purple-100);
  color: var(--purple-800);
}

.player-card__stats-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--slate-800);
  letter-spacing: -0.01em;
}

.player-card__stats-sync {
  font-size: 0.75rem;
  color: var(--slate-400);
}

.player-card__stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.625rem;
}

.player-card__stat-tile {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all var(--t-fast);

  &:hover {
    background: #ffffff;
    border-color: var(--purple-200);
    box-shadow: 0 2px 6px rgba(101, 78, 163, 0.08);
  }
}

.player-card__stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e1538;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.player-card__stat-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-block-start: 0.35rem;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .player-card__stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .player-card__stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Widget Próximo Partido en Sidebar
   ========================================================================== */
.next-match-widget {
  overflow: hidden;
  border: 1px solid var(--color-border, var(--purple-200));
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px -2px rgba(101, 78, 163, 0.09), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  background: var(--color-surface, #ffffff);
  margin-block-end: var(--sp-4);
}

.next-match-widget__head {
  background: linear-gradient(135deg, #654EA3 0%, #51398f 100%);
  padding: 0.65rem 0.85rem;
  border-block-end: 2.5px solid var(--rm-gold);
  color: #ffffff;
}

.next-match-widget__badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.next-match-widget__pill {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(254, 190, 16, 0.2);
  color: #fed863;
  border: 1px solid rgba(254, 190, 16, 0.45);
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.next-match-widget__pill--live {
  background: rgba(254, 190, 16, 0.22);
  color: #fed863;
  border: 1px solid rgba(254, 190, 16, 0.55);
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.next-match-widget__comp {
  font-size: 0.70rem;
  font-weight: 700;
  color: #e2e8f0;
  text-align: right;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.next-match-widget__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--color-surface, #ffffff);
}

.next-match-widget__matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
  padding-block: 0.25rem;
}

.next-match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.next-match-team__shield-wrapper {
  inline-size: 50px;
  block-size: 50px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-surface-alt, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  padding: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.next-match-team--madrid .next-match-team__shield-wrapper {
  border-color: var(--color-border, #d6cced);
  background: var(--color-surface-alt, #fdfcff);
}

.next-match-team__shield {
  inline-size: 38px;
  block-size: 38px;
  width: 100%;
  height: 100%;
  max-width: 38px;
  max-height: 38px;
  object-fit: contain;
  display: block;
}

.next-match-team__name {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-text, #0f172a);
  line-height: 1.2;
}

.next-match-team__role {
  font-size: 0.65rem;
  color: var(--color-text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.next-match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.next-match-vs {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--purple-700);
  background: var(--purple-100);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--purple-200);
  line-height: 1;
}

.next-match-time {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-text-muted, #64748b);
}

.next-match-score {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--purple-950);
  display: flex;
  gap: 0.35rem;
}

.next-match-info-list {
  background: var(--color-surface-alt, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--color-text-muted, #64748b);
}

.next-match-info-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.next-match-info-item svg {
  color: var(--purple-600);
  flex-shrink: 0;
}

.next-match-widget__action {
  margin-block-start: 0.25rem;
}

.next-match-btn {
  inline-size: 100%;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
}

.next-match-widget__pill--countdown {
  background: rgba(254, 190, 16, 0.25) !important;
  color: #fef08a !important;
  border: 1px solid rgba(254, 190, 16, 0.6) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

.next-match-widget__pill--finished {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #86efac !important;
  border: 1px solid rgba(34, 197, 94, 0.45) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

.pulse-dot--gold {
  background: #febe10 !important;
  box-shadow: 0 0 0 rgba(254, 190, 16, 0.7) !important;
}

.pulse-dot--red {
  background: #ef4444 !important;
  box-shadow: 0 0 0 rgba(239, 68, 68, 0.7) !important;
}

.next-match-score--live {
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  color: var(--slate-900) !important;
  letter-spacing: -0.02em;
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

.next-match-live-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  background: #f5f3ff;
  border: 1px solid rgba(101, 78, 163, 0.22);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.75rem;
  margin-top: 0.25rem;
  box-shadow: 0 1px 2px rgba(101, 78, 163, 0.06);
}

.next-match-live-phase {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #654EA3;
  line-height: 1.1;
}

.next-match-live-time {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.next-match-finished-subtag {
  font-size: 0.7rem;
  font-weight: 800;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

/* Panel de Cuenta Atrás (Faltan <= 2 horas) */
.next-match-countdown-panel {
  background: linear-gradient(135deg, #1e1538 0%, #2a1b4e 100%);
  border: 1px solid rgba(254, 190, 16, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.next-match-countdown-header {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fed863;
  text-transform: uppercase;
}

.next-match-countdown-timer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.countdown-digit-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  min-width: 48px;
}

.countdown-digit {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  line-height: 1;
}

.countdown-tag {
  font-size: 0.55rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}

.countdown-sep {
  font-size: 1.2rem;
  font-weight: 800;
  color: #febe10;
}

.next-match-countdown-venue {
  font-size: 0.7rem;
  color: #cbd5e1;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Panel EN DIRECTO */
.next-match-live-panel {
  background: linear-gradient(135deg, #1e1538 0%, #2a1b4e 100%);
  border: 1px solid rgba(254, 190, 16, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.next-match-live-progress {
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.next-match-live-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #654EA3 0%, #FEBE10 100%);
  border-radius: 999px;
  transition: width 1s linear;
}

.next-match-live-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: #cbd5e1;
}

.next-match-live-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.next-match-live-meta-item .pulse-dot--gold {
  flex-shrink: 0;
}

/* Panel PARTIDO FINALIZADO (5 Horas) */
.next-match-finished-panel {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.next-match-finished-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: #166534;
  font-weight: 800;
}

.next-match-finished-text {
  font-size: 0.74rem;
  color: #14532d;
  line-height: 1.35;
  margin: 0;
}

/* Botones según estado */
.next-match-btn--live {
  background: linear-gradient(135deg, #745cb5 0%, #5d449b 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(101, 78, 163, 0.35) !important;
  border: 1px solid #5d449b !important;
}

.next-match-btn--live:hover {
  background: linear-gradient(135deg, #7e65c4 0%, #644ba3 100%) !important;
}

.next-match-btn--finished {
  background: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25) !important;
  border: 1px solid #047857 !important;
}

.next-match-btn--finished:hover {
  background: #047857 !important;
}

.next-match-btn--countdown {
  background: linear-gradient(135deg, var(--purple-700) 0%, #1e1538 100%) !important;
  border: 1px solid var(--rm-gold) !important;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .next-match-widget__matchup {
    gap: 0.4rem;
  }
  .next-match-team__shield-wrapper {
    inline-size: 42px;
    block-size: 42px;
  }
  .next-match-team__shield {
    inline-size: 32px;
    block-size: 32px;
  }
  .next-match-team__name {
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   Hero Live Match Banner (En directo horizontal destacado en portada)
   ========================================================================== */
.live-match-hero-wrapper {
  margin-block-end: var(--sp-4);
  width: 100%;
}

.next-match-widget--hero {
  background: linear-gradient(135deg, #1b1333 0%, #251845 50%, #17102c 100%) !important;
  border: 1px solid rgba(254, 190, 16, 0.45) !important;
  box-shadow: 0 10px 28px -4px rgba(27, 19, 51, 0.45), 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  border-radius: var(--radius-lg, 16px) !important;
  overflow: hidden;
}

.next-match-widget--hero .next-match-widget__body {
  background: transparent !important;
}

.next-match-widget--hero .next-match-team__shield-wrapper {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.next-match-widget--hero .next-match-widget__head {
  background: rgba(15, 10, 30, 0.65);
  border-bottom: 1px solid rgba(254, 190, 16, 0.25);
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.next-match-hero__head-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.75rem;
  color: #cbd5e1;
}

/* En pantallas de escritorio: disposición horizontal espaciosa */
@media (min-width: 992px) {
  .next-match-widget--hero .next-match-widget__body {
    padding: 1.25rem 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }

  .next-match-widget--hero .next-match-widget__matchup {
    flex: 1;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2.5rem !important;
  }

  .next-match-widget--hero .next-match-team {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1.25rem !important;
    text-align: left !important;
    flex: 1 !important;
    max-width: 320px !important;
  }

  .next-match-widget--hero .next-match-team:last-of-type {
    flex-direction: row-reverse !important;
    text-align: right !important;
  }

  .next-match-team__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }

  .next-match-widget--hero .next-match-team:last-of-type .next-match-team__meta {
    text-align: right;
    align-items: flex-end;
  }

  .next-match-widget--hero .next-match-team__shield-wrapper {
    width: 76px !important;
    height: 76px !important;
  }

  .next-match-widget--hero .next-match-team__shield {
    width: 76px !important;
    height: 76px !important;
    max-width: 76px !important;
    max-height: 76px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5)) !important;
  }

  .next-match-widget--hero .next-match-team__name {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    max-width: none !important;
    line-height: 1.2;
  }

  .next-match-widget--hero .next-match-team__role {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
  }

  .next-match-widget--hero .next-match-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
  }

  .next-match-widget--hero .next-match-score,
  .next-match-widget--hero .next-match-score--live {
    font-size: 3rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    letter-spacing: -0.02em;
    gap: 0.75rem !important;
    line-height: 1 !important;
  }

  .next-match-widget--hero .next-match-score span,
  .next-match-widget--hero .next-match-score--live span {
    color: #ffffff !important;
  }

  .next-match-widget--hero .next-match-score .score-dash,
  .next-match-widget--hero .next-match-score--live .score-dash {
    color: #fed863 !important;
  }

  .next-match-widget--hero .next-match-live-indicator {
    background: rgba(254, 190, 16, 0.15) !important;
    border: 1px solid rgba(254, 190, 16, 0.45) !important;
    padding: 0.35rem 0.95rem !important;
    margin-top: 0.25rem !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  }

  .next-match-widget--hero .next-match-live-phase {
    color: #fed863 !important;
    font-size: 0.75rem !important;
  }

  .next-match-widget--hero .next-match-live-time {
    color: #ffffff !important;
    font-size: 1.2rem !important;
  }

  .next-match-widget--hero .next-match-live-panel {
    display: none !important;
  }

  .next-match-widget--hero .next-match-widget__action {
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  .next-match-widget--hero .next-match-btn {
    padding: 0.8rem 1.5rem !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    width: auto !important;
  }
}

/* En móviles y tablets */
@media (max-width: 991px) {
  .live-match-hero-wrapper {
    margin-block-end: var(--sp-3);
  }

  .next-match-widget--hero .next-match-widget__head {
    padding: 0.5rem 0.85rem;
  }

  .next-match-hero__head-meta {
    display: none;
  }

  .next-match-widget--hero .next-match-widget__body {
    padding: 0.85rem;
    gap: 0.65rem;
  }

  .next-match-widget--hero .next-match-team__shield-wrapper {
    width: 52px !important;
    height: 52px !important;
  }

  .next-match-widget--hero .next-match-team__shield {
    width: 52px !important;
    height: 52px !important;
    max-width: 52px !important;
    max-height: 52px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)) !important;
  }

  .next-match-widget--hero .next-match-team__name {
    color: #ffffff !important;
    font-weight: 800 !important;
  }

  .next-match-widget--hero .next-match-team__role {
    color: #cbd5e1 !important;
  }

  .next-match-widget--hero .next-match-score,
  .next-match-widget--hero .next-match-score--live {
    font-size: 2.25rem !important;
    color: #ffffff !important;
  }

  .next-match-widget--hero .next-match-score span,
  .next-match-widget--hero .next-match-score--live span {
    color: #ffffff !important;
  }

  .next-match-widget--hero .next-match-score .score-dash,
  .next-match-widget--hero .next-match-score--live .score-dash {
    color: #fed863 !important;
  }

  .next-match-widget--hero .next-match-live-indicator {
    background: rgba(254, 190, 16, 0.15) !important;
    border: 1px solid rgba(254, 190, 16, 0.45) !important;
  }

  .next-match-widget--hero .next-match-live-phase {
    color: #fed863 !important;
  }

  .next-match-widget--hero .next-match-live-time {
    color: #ffffff !important;
  }
}

.mini-pitch-container {
  inline-size: 100%;
  max-inline-size: 160px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
}

.mini-pitch-svg {
  display: block;
  inline-size: 100%;
  block-size: auto;
}

.mini-pitch-card__foot {
  inline-size: 100%;
  margin-block-start: 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mini-pitch-card__pos-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--purple-950);
  line-height: 1.25;
}

.mini-pitch-card__pos-code {
  font-size: 0.68rem;
  color: var(--slate-500);
}

@keyframes pitchPulse {
  0% {
    r: 6px;
    opacity: 0.6;
  }
  50% {
    r: 10.5px;
    opacity: 0.15;
  }
  100% {
    r: 6px;
    opacity: 0.6;
  }
}

.pitch-marker__pulse {
  animation: pitchPulse 2.2s infinite ease-in-out;
  transform-origin: center;
}

/* Responsividad de la ficha de jugador */
@media (max-width: 960px) {
  .player-card__layout {
    grid-template-columns: 140px minmax(0, 1fr);
  }
  .player-card__pitch-col {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
  }
  .mini-pitch-card {
    max-inline-size: 220px;
    inline-size: 100%;
  }
  .mini-pitch-container {
    max-inline-size: 160px;
  }
}

@media (max-width: 768px) {
  .player-card {
    margin-block-end: 0.75rem;
  }
  .player-card__header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    margin-block-end: 0.75rem;
  }
  .player-card__header-left {
    gap: 0.35rem;
  }
  .player-card__scope {
    font-size: 0.58rem;
    padding: 0.15rem 0.45rem;
  }
  .player-card__dorsal {
    font-size: 1rem;
  }
  .player-card__header-titles {
    text-align: right;
  }
  .player-card__title {
    font-size: 1.05rem;
  }
  .player-card__subtitle {
    font-size: 0.72rem;
    gap: 0.25rem;
  }
  .player-card__layout {
    grid-template-columns: 85px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0;
    align-items: center;
  }
  .player-card__photo-col {
    align-items: center;
    justify-content: center;
  }
  .player-card__photo-frame {
    max-inline-size: 85px;
  }
  .player-card__img {
    max-inline-size: 85px;
    max-block-size: 115px;
  }
  .player-card__info-col {
    gap: 0.4rem;
  }
  .player-card__meta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem 0.5rem;
  }
  .player-card__meta-label {
    font-size: 0.58rem;
    letter-spacing: 0.03em;
  }
  .player-card__meta-val {
    font-size: 0.75rem;
    line-height: 1.25;
  }
  .player-card__age {
    font-size: 0.7rem;
  }
  /* Ocultar el mini-campo de fútbol en móviles para ahorrar espacio vertical */
  .player-card__pitch-col {
    display: none !important;
  }
  /* Reducir estadísticas en móvil */
  .player-card__stats-section {
    margin-block-start: 0.75rem;
    padding-block-start: 0.65rem;
  }
  .player-card__stats-header {
    margin-block-end: 0.5rem;
    gap: 0.25rem;
  }
  .player-card__stats-title {
    font-size: 0.75rem;
  }
  .player-card__stats-badge {
    font-size: 0.55rem;
    padding: 0.1rem 0.35rem;
  }
  .player-card__stats-sync {
    display: none;
  }
  .player-card__stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.35rem !important;
  }
  .player-card__stat-tile {
    padding: 0.4rem 0.25rem;
  }
  .player-card__stat-val {
    font-size: 1.05rem;
  }
  .player-card__stat-label {
    font-size: 0.58rem;
    margin-block-start: 0.15rem;
  }
}

@media (max-width: 480px) {
  .player-card__layout {
    grid-template-columns: 75px minmax(0, 1fr);
    gap: 0.6rem;
  }
  .player-card__photo-frame,
  .player-card__img {
    max-inline-size: 75px;
    max-block-size: 100px;
  }
  .player-card__title {
    font-size: 0.95rem;
  }
  .player-card__meta-grid {
    gap: 0.25rem 0.4rem;
  }
  .player-card__meta-val {
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   Ficha Oficial de Partido (Match Card) integrada en el mensaje del foro
   ========================================================================== */
.match-card {
  margin-block-end: var(--sp-4);
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.match-card__hero {
  background: linear-gradient(135deg, #1b1233 0%, #0d081a 100%);
  color: #ffffff;
  border-block-start: 4px solid var(--rm-gold);
  border-radius: var(--radius-lg);
  padding: clamp(0.85rem, 2.5vw, 1.75rem);
  box-shadow: 0 4px 16px rgba(13, 8, 26, 0.12);
  margin-block-end: 1.25rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.match-card__badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  margin-block-end: clamp(0.75rem, 2vw, 1.25rem);
  width: 100%;
}

.match-card__comp-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  font-size: clamp(0.65rem, 1.2vw, 0.75rem);
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 100%;
}

.match-card__special-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  font-size: clamp(0.65rem, 1.2vw, 0.75rem);
  font-weight: 800;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  text-align: center;
}

.match-card__special-pill--clasico {
  background: linear-gradient(135deg, #FEBE10 0%, #f59e0b 100%);
  color: #1e1538;
}

.match-card__special-pill--derbi {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
}

.match-card__status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  font-size: clamp(0.62rem, 1.1vw, 0.6875rem);
  font-weight: 700;
  color: var(--rm-gold);
  background: rgba(254, 190, 16, 0.15);
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.match-card__status-pill--live {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.match-card__status-pill--finished {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.match-card__versus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: clamp(0.25rem, 2vw, 1.5rem);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.match-card__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.match-card__shield-box {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: clamp(48px, 9vw, 96px);
  block-size: clamp(48px, 9vw, 96px);
  width: clamp(48px, 9vw, 96px);
  height: clamp(48px, 9vw, 96px);
  min-width: 48px;
  min-height: 48px;
  background: #ffffff;
  border-radius: 50%;
  padding: clamp(4px, 1vw, 8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  box-sizing: border-box;
}

.match-card__shield-img {
  inline-size: 100%;
  block-size: 100%;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.match-card__team-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  max-width: 100%;
}

.match-card__team-name {
  font-size: clamp(0.8rem, 1.8vw, 1.125rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  text-align: center;
  word-break: break-word;
  max-width: 100%;
}

.match-card__team-role {
  font-size: clamp(0.55rem, 1.1vw, 0.6875rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  text-align: center;
}

.match-card__team--madrid .match-card__team-role {
  color: var(--rm-gold);
}

.match-card__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-inline-size: clamp(52px, 10vw, 100px);
  min-width: clamp(52px, 10vw, 100px);
  flex-shrink: 0;
  padding: 0 clamp(0.15rem, 1vw, 0.5rem);
}

.match-card__vs-badge {
  font-size: 0.8125rem;
  font-weight: 900;
  color: #1e1538;
  background: linear-gradient(135deg, #FEBE10 0%, #f59e0b 100%);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.08em;
  box-shadow: 0 2px 8px rgba(254, 190, 16, 0.35);
}

.match-card__vs-time {
  font-size: 1.625rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-block-start: 0.25rem;
}

.match-card__vs-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.match-card__score-board {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--rm-gold);
}

.match-card__score-sep {
  color: rgba(255, 255, 255, 0.5);
}

.match-card__details {
  padding: 0;
  border: none;
  background: transparent;
  margin-block-end: 1.5rem;
}

.match-card__section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-brand);
  margin-block-end: 0.875rem;
  padding-block-end: 0.375rem;
  border-block-end: 1px solid var(--slate-100);
}

.match-card__meta-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.match-card__meta-col {
  padding: 0.625rem 0.875rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  border-inline-end: 1px solid var(--slate-200);
  min-inline-size: 0;
}

.match-card__meta-col:last-child {
  border-inline-end: none;
}

.match-card__meta-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.match-card__meta-icon {
  inline-size: 14px;
  block-size: 14px;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--color-brand);
}

.match-card__meta-icon-img {
  inline-size: 14px;
  block-size: 14px;
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.match-card__meta-val {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--slate-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-card__h2h {
  padding: 0;
  border: none;
  background: transparent;
}

.match-card__h2h-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.match-card__h2h-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: var(--fs-xs);
  table-layout: auto;
}

.match-card__h2h-table th {
  font-size: 0.6875rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--slate-600);
  background: #f8fafc;
  padding: 0.625rem 1rem;
  border-block-end: 1px solid var(--slate-200);
  text-align: start;
  white-space: nowrap !important;
}

.match-card__th-date {
  white-space: nowrap !important;
  inline-size: 110px;
}

.match-card__th-comp {
  white-space: nowrap !important;
  min-inline-size: 140px;
}

.match-card__th-match {
  min-inline-size: 200px;
  white-space: nowrap;
}

.match-card__th-score {
  text-align: center !important;
  white-space: nowrap !important;
  inline-size: 110px;
}

.match-card__th-balance {
  text-align: center !important;
  white-space: nowrap !important;
  inline-size: 85px;
}

.match-card__h2h-table td {
  padding: 0.625rem 1rem;
  border-block-end: 1px solid var(--slate-100);
  vertical-align: middle;
  color: var(--slate-800);
}

.match-card__h2h-date {
  color: var(--color-text-muted);
  font-weight: 700;
  white-space: nowrap !important;
}

.match-card__h2h-comp {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.match-card__h2h-match {
  white-space: nowrap;
}

.match-card__h2h-score {
  text-align: center;
  white-space: nowrap !important;
}

.match-card__h2h-balance {
  text-align: center;
  white-space: nowrap !important;
}

.match-card__h2h-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.65rem;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-family: monospace;
  font-size: 0.8125rem;
  color: var(--slate-900);
  white-space: nowrap !important;
  min-inline-size: 56px;
}

.match-card__result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 24px;
  block-size: 24px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.6875rem;
  color: #ffffff;
  white-space: nowrap !important;
}

.match-card__result-pill--win {
  background: #16a34a;
}

.match-card__result-pill--draw {
  background: #d97706;
}

.match-card__result-pill--loss {
  background: #dc2626;
}

@media (max-width: 768px) {
  .match-card {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  .match-card__hero {
    padding: 0.75rem 0.5rem !important;
    margin-block-end: 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    border-radius: var(--radius-md) !important;
  }
  .match-card__badge-row {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.3rem !important;
    margin-block-end: 0.75rem !important;
    width: 100% !important;
  }
  .match-card__comp-pill,
  .match-card__special-pill,
  .match-card__status-pill {
    font-size: 0.62rem !important;
    padding: 0.2rem 0.55rem !important;
    letter-spacing: 0.02em !important;
    margin-inline-start: 0 !important;
    text-align: center !important;
    max-width: 100% !important;
    white-space: normal !important;
  }
  .match-card__versus-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .match-card__team {
    min-width: 0 !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.2rem !important;
    overflow: hidden !important;
  }
  .match-card__shield-box {
    inline-size: 46px !important;
    block-size: 46px !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    padding: 4px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    box-sizing: border-box !important;
  }
  .match-card__shield-img {
    inline-size: 34px !important;
    block-size: 34px !important;
    width: 34px !important;
    height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    object-fit: contain !important;
    display: block !important;
  }
  .match-card__team-info {
    min-width: 0 !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.1rem !important;
  }
  .match-card__team-name {
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: center !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    max-width: 100% !important;
  }
  .match-card__team-role {
    font-size: 0.55rem !important;
    letter-spacing: 0.02em !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: center !important;
    line-height: 1.1 !important;
  }
  .match-card__center {
    min-inline-size: 52px !important;
    min-width: 52px !important;
    max-width: 72px !important;
    flex-shrink: 0 !important;
    gap: 0.1rem !important;
    padding: 0 0.15rem !important;
  }
  .match-card__vs-badge {
    font-size: 0.58rem !important;
    padding: 0.1rem 0.35rem !important;
    letter-spacing: 0.04em !important;
  }
  .match-card__vs-time {
    font-size: 1.05rem !important;
    line-height: 1.1 !important;
    margin-block-start: 0.1rem !important;
  }
  .match-card__vs-sub {
    font-size: 0.58rem !important;
    white-space: nowrap !important;
  }
  .match-card__score-board {
    font-size: 1.35rem !important;
    gap: 0.25rem !important;
  }
  .match-card__details {
    margin-block-end: 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .match-card__section-title {
    font-size: 0.7rem !important;
    margin-block-end: 0.4rem !important;
    padding-block-end: 0.25rem !important;
  }
  .match-card__meta-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .match-card__meta-col {
    padding: 0.4rem 0.5rem !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .match-card__meta-col:nth-child(2) {
    border-inline-end: none !important;
  }
  .match-card__meta-col:nth-child(1),
  .match-card__meta-col:nth-child(2) {
    border-block-end: 1px solid var(--slate-200) !important;
  }
  .match-card__meta-label {
    font-size: 0.58rem !important;
    gap: 0.25rem !important;
  }
  .match-card__meta-icon {
    inline-size: 12px !important;
    block-size: 12px !important;
    width: 12px !important;
    height: 12px !important;
  }
  .match-card__meta-icon-img {
    inline-size: 12px !important;
    block-size: 12px !important;
    width: 12px !important;
    height: 12px !important;
  }
  .match-card__meta-val {
    font-size: 0.7rem !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.25 !important;
  }
  .match-card__h2h {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .match-card__h2h-table-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    box-sizing: border-box !important;
  }
  .match-card__h2h-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 0.68rem !important;
    table-layout: auto !important;
  }
  .match-card__h2h-table th,
  .match-card__h2h-table td {
    padding: 0.35rem 0.4rem !important;
    font-size: 0.68rem !important;
  }
  .match-card__th-date {
    inline-size: auto !important;
    white-space: nowrap !important;
  }
  .match-card__th-comp {
    min-inline-size: 0 !important;
    white-space: normal !important;
  }
  .match-card__th-match {
    min-inline-size: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  .match-card__th-score {
    inline-size: auto !important;
  }
  .match-card__th-balance {
    inline-size: auto !important;
  }
  .match-card__h2h-score-badge {
    font-size: 0.68rem !important;
    padding: 0.1rem 0.35rem !important;
    min-inline-size: 38px !important;
  }
  .match-card__result-pill {
    inline-size: 18px !important;
    block-size: 18px !important;
    font-size: 0.58rem !important;
  }
}


/* ==========================================================================
   BBCode Rich Editor & BBCode Rendered Content (Estilo ForoCoches/Moderno)
   ========================================================================== */

.bb-editor {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  margin-block-end: 1rem;
  position: relative;
  overflow: hidden;
}

.bb-editor__header {
  background: #2c2c2e;
  color: #ffffff;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bb-editor__header-title {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bb-editor__toolbar {
  background: #f8f9fa;
  border-block-end: 1px solid #e5e7eb;
  padding: 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.bb-editor__btn-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.bb-editor__right-group {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bb-editor__btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.25rem 0.45rem;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1;
  transition: all 0.15s ease;
  user-select: none;

  &:hover {
    background: #e5e7eb;
    color: #111827;
  }

  &:active {
    background: #d1d5db;
  }
}

.bb-editor__btn--social {
  color: #6b7280;

  &:hover {
    color: #1e1538;
  }
}

.bb-editor__btn-badge {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.35rem;
  background: #e2e8f0;
  color: #475569;
  border-radius: 3px;
}

.bb-editor__btn--color {
  flex-direction: column;
  gap: 1px;
  position: relative;
}

.bb-editor__icon-a {
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1;
}

.bb-editor__color-bar {
  width: 14px;
  height: 3px;
  border-radius: 1px;
}

.bb-editor__btn--lineup {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.25rem 0.65rem !important;
  height: 28px !important;
  background: #654EA3 !important;
  color: #ffffff !important;
  border: 1px solid #523e85 !important;
  border-radius: 5px !important;
  font-weight: 700 !important;
  font-size: 0.775rem !important;
  margin-inline-start: 0.4rem !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(101, 78, 163, 0.25);
  transition: all 0.15s ease !important;
}

.bb-editor__btn--lineup:hover {
  background: #785dc2 !important;
  color: #ffffff !important;
  border-color: #FEBE10 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(101, 78, 163, 0.35);
}

.bb-editor__btn--lineup.is-active {
  background: #FEBE10 !important;
  color: #0f172a !important;
  border-color: #d49b06 !important;
  box-shadow: 0 1px 3px rgba(254, 190, 16, 0.4);
}

.bb-editor__dropdown-container {
  position: relative;
}

.bb-editor__palette {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
  margin-block-start: 4px;
  min-width: 160px;
}

.bb-editor__palette-title {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  margin-block-end: 0.4rem;
}

.bb-editor__palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
}

.bb-editor__palette-color {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.12s ease;

  &:hover {
    transform: scale(1.15);
  }
}

/* ==========================================================================
   BBCode Emoji Popover (WhatsApp Style)
   ========================================================================== */
.bb-editor__btn--emoji {
  font-size: 1.05rem;
  line-height: 1;
}

.bb-editor__emoji-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.18), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
  width: 215px;
  max-width: min(230px, calc(100vw - 24px));
  margin-block-start: 4px;
  overflow: hidden;
}

.bb-editor__emoji-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.35rem 0.6rem;
}

.bb-editor__emoji-title {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bb-editor__emoji-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.3rem;
  padding: 0.5rem;
}

.bb-editor__emoji-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-size: 1.25rem;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease;
  user-select: none;
  padding: 0;
}

.bb-editor__emoji-item:hover {
  background: #ede9fe;
  border-color: #c4b5fd;
  transform: scale(1.18);
  z-index: 2;
}

.bb-editor__separator {
  width: 1px;
  height: 20px;
  background: #e5e7eb;
  margin: 0 0.25rem;
}

.bb-editor__select {
  height: 28px;
  font-size: 0.8125rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 0 0.5rem;
  background: #ffffff;
  color: #374151;
  cursor: pointer;

  &:focus {
    outline: none;
    border-color: #654ea3;
  }
}

.bb-editor__select--small {
  width: 85px;
}

.bb-editor__input-wrapper {
  position: relative;
}

.bb-editor__textarea {
  width: 100%;
  border: none;
  outline: none;
  padding: 0.875rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 180px;
  color: #1e293b;
  background: #ffffff;
  box-sizing: border-box;

  &:focus {
    outline: none;
  }
}

.bb-editor__preview {
  padding: 1.25rem 1rem;
  border-block-start: 1px dashed #cbd5e1;
  background: #fdfdfe;
  min-height: 120px;
  box-sizing: border-box;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.65;
  color: #000000;
  letter-spacing: -0.01em;
}

.bb-editor__preview strong,
.bb-editor__preview b {
  font-weight: 800;
  color: #000000;
}

.bb-editor__preview-empty {
  color: #94a3b8;
  font-style: italic;
  font-size: 0.875rem;
}

.bb-editor__footer {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block-start: 1px solid #f1f5f9;
  background: #ffffff;
  gap: 1rem;
  flex-wrap: wrap;
}

.bb-editor__preview-toggle {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ef4444;
  background: none;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0;

  &:hover {
    text-decoration: underline;
  }
}

.bb-editor__submit-btn {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.65rem 1.85rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
  transition: all 0.2s ease;

  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45);
  }

  &:active {
    transform: translateY(0);
  }
}

/* Desplegable animado para el constructor de alineación táctica */
@media (max-width: 640px) {
  .bb-editor__toolbar {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.45rem 0.5rem !important;
    gap: 0.35rem !important;
  }
  .bb-editor__toolbar::-webkit-scrollbar {
    display: none;
  }
  .bb-editor__btn {
    min-width: 34px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
  }
  .bb-editor__btn-group {
    flex-shrink: 0 !important;
  }
  .bb-editor__separator {
    flex-shrink: 0 !important;
  }
  .bb-editor__textarea {
    font-size: 16px !important;
    padding: 0.75rem 0.85rem !important;
    min-height: 140px !important;
  }
  .bb-editor__footer {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    padding: 0.75rem 0.85rem !important;
  }
  .bb-editor__submit-btn {
    width: 100% !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.875rem !important;
    text-align: center !important;
  }
  .bb-editor__preview-toggle {
    text-align: center !important;
    padding: 0.35rem !important;
  }
}

.bb-editor__lineup-collapse {
  display: none;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  transform: translateY(-8px);
  background: #f8fafc;
  border-block-end: 1px solid #e2e8f0;
  padding: 0 1.25rem;
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease,
              transform 0.35s ease,
              visibility 0.45s ease,
              padding 0.35s ease;
}

.bb-editor__lineup-collapse.is-open {
  display: block !important;
  max-height: 1200px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  padding: 1.15rem 1.25rem 1.25rem;
}

/* Modo compacto del campo táctico dentro del editor desplegable */
.bb-editor__lineup-collapse .tactical-builder-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  margin-block-end: 0;
}

.bb-editor__lineup-collapse .tactical-builder-card__header {
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
}

.bb-editor__lineup-collapse .tactical-builder-card__title {
  font-size: 1rem;
}

.bb-editor__lineup-collapse .tactical-builder-card__desc {
  font-size: 0.775rem;
  line-height: 1.35;
}

.bb-editor__lineup-collapse .tactical-toolbar {
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.75rem;
}

.bb-editor__lineup-collapse .tactical-workspace {
  grid-template-columns: 270px 1fr;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 860px) {
  .bb-editor__lineup-collapse .tactical-workspace {
    grid-template-columns: 1fr;
  }
}

.bb-editor__lineup-collapse .tactical-pitch {
  width: 270px;
  max-width: 100%;
  aspect-ratio: 4 / 4.9;
  max-height: 335px;
  border-width: 3px;
  border-radius: 10px;
  margin: 0 auto;
}

.bb-editor__lineup-collapse .tactical-token__avatar {
  width: 44px;
  height: 44px;
  border-width: 2px;
}

.bb-editor__lineup-collapse .tactical-token__empty-circle {
  width: 36px;
  height: 36px;
}

.bb-editor__lineup-collapse .tactical-token__pos-label {
  font-size: 0.6rem;
}

.bb-editor__lineup-collapse .tactical-token__initials {
  font-size: 0.75rem;
}

.bb-editor__lineup-collapse .tactical-token__dorsal {
  top: -3px;
  right: -4px;
  font-size: 0.55rem;
  padding: 1px 3px;
  min-width: 14px;
}

.bb-editor__lineup-collapse .tactical-token__name {
  font-size: 0.6rem;
  padding: 1px 5px;
  max-width: 65px;
}

.bb-editor__lineup-collapse .tactical-bench-panel {
  max-height: 335px;
  display: flex;
  flex-direction: column;
}

.bb-editor__lineup-collapse .tactical-bench-grid {
  max-height: 280px;
  overflow-y: auto;
  gap: 0.35rem;
  padding-right: 0.25rem;
}

.bb-editor__lineup-collapse .tactical-bench-card {
  padding: 0.35rem 0.5rem;
}

/* Aviso legal al pie del editor: 100% ancho, fondo gris suave y elegante */
.bb-editor__legal-hint {
  width: 100%;
  background: #f8fafc;
  border-block-start: 1px solid #e2e8f0;
  padding: 0.75rem 1.25rem;
  margin: 0;
  box-sizing: border-box;
}

.bb-editor__legal-hint-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.775rem;
  color: #64748b;
  line-height: 1.45;
}

.bb-editor__legal-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: #94a3b8;
}

.bb-editor__legal-hint a {
  color: var(--color-brand, #654EA3);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.bb-editor__legal-hint a:hover {
  color: #1e1b4b;
}

/* ==========================================================================
   Elementos renderizados con BBCode dentro de .post__body y vistas previas
   ========================================================================== */

.bb-center {
  text-align: center;
}

.bb-right {
  text-align: right;
}

.bb-left {
  text-align: left;
}

.bb-u {
  text-decoration: underline;
}

.bb-size--1 { font-size: 0.75rem; }
.bb-size--2 { font-size: 0.85rem; }
.bb-size--3 { font-size: 0.95rem; }
.bb-size--4 { font-size: 1.15rem; font-weight: 600; }
.bb-size--5 { font-size: 1.35rem; font-weight: 700; }
.bb-size--6 { font-size: 1.6rem; font-weight: 800; }
.bb-size--7 { font-size: 1.95rem; font-weight: 800; }

.bb-list {
  margin: 0.65rem 0;
  padding-inline-start: 1.5rem;

  li {
    margin-block-end: 0.25rem;
  }
}

.bb-link {
  color: #654ea3;
  text-decoration: underline;
  font-weight: 600;

  &:hover {
    color: #1e1538;
  }
}

.post-inline-mention {
  display: inline-block;
  color: #654ea3;
  font-weight: 600;
  background: rgba(101, 78, 163, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.post-inline-mention:hover {
  background: rgba(101, 78, 163, 0.18);
  color: #4e388c;
  text-decoration: underline;
}

html[data-theme="dark"] .post-inline-mention {
  color: #c4b5fd;
  background: rgba(196, 181, 253, 0.12);
}

html[data-theme="dark"] .post-inline-mention:hover {
  background: rgba(196, 181, 253, 0.22);
  color: #ede9fe;
}

.bb-editor__mentions-popover {
  position: absolute;
  top: 10px;
  left: 14px;
  z-index: 1000;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  max-height: 230px;
  width: 270px;
  overflow-y: auto;
  padding: 4px;
}

html[data-theme="dark"] .bb-editor__mentions-popover {
  background: #1e1538;
  border-color: #3b2d66;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.bb-editor__mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #1e293b;
  transition: background 0.12s ease;
}

html[data-theme="dark"] .bb-editor__mention-item {
  color: #f1f5f9;
}

.bb-editor__mention-item:hover,
.bb-editor__mention-item.is-selected {
  background: #f1f5f9;
  color: #654ea3;
}

html[data-theme="dark"] .bb-editor__mention-item:hover,
html[data-theme="dark"] .bb-editor__mention-item.is-selected {
  background: #2a1f4e;
  color: #c4b5fd;
}

.bb-editor__mention-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #654ea3;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  flex-shrink: 0;
}

.bb-editor__mention-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.2;
}

.bb-editor__mention-username {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bb-editor__mention-display {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-theme="dark"] .bb-editor__mention-display {
  color: #94a3b8;
}

.bb-spoiler {
  margin: 0.875rem 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  overflow: hidden;
}

.bb-spoiler__title {
  padding: 0.5rem 0.875rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.875rem;
  transition: background 0.15s ease;

  &:hover {
    background: #e2e8f0;
  }
}

.bb-spoiler__badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: #475569;
  color: #ffffff;
}

.bb-spoiler__body {
  padding: 0.875rem 1rem;
  border-block-start: 1px solid #e2e8f0;
  background: #ffffff;
}

.bb-image-wrap {
  margin: 0.875rem 0;
  text-align: center;
}

.bb-img {
  max-width: 100%;
  max-height: 600px;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.bb-embed--youtube {
  position: relative;
  width: 100%;
  max-width: 680px;
  aspect-ratio: 16 / 9;
  margin: 1rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  background: #000000;

  iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
  }
}

.bb-embed--tweet {
  margin: 1rem 0;
  max-width: 550px;
}

.bb-social-card {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1.125rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-decoration: none;
  color: #1e293b;
  margin: 0.5rem 0;
  transition: all 0.2s ease;

  &:hover {
    background: #ffffff;
    border-color: #654ea3;
    box-shadow: 0 4px 12px rgba(101, 78, 163, 0.12);
  }
}

.bb-social-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e1538;
}

.bb-social-card__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;

  strong {
    font-size: 0.875rem;
    color: #0f172a;
  }
}

.bb-social-card__url {
  font-size: 0.75rem;
  color: #64748b;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-embed--audio {
  margin: 0.75rem 0;

  audio {
    width: 100%;
    max-width: 450px;
  }
}

/* ==========================================================================
   CLASIFICACIONES EN TIEMPO REAL (LALIGA Y CHAMPIONS LEAGUE)
   ========================================================================== */

.standings-page {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-block-end: var(--sp-5);
}

.standings-nav {
  display: flex;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0.375rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.standings-nav__item {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.standings-nav__item:hover {
  color: var(--color-brand);
  background: var(--color-surface-alt);
  text-decoration: none;
}

.standings-nav__item--active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%) !important;
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.25);
  text-decoration: none !important;
}

.standings-nav__icon {
  inline-size: 22px;
  block-size: 22px;
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.standings-nav__item:hover .standings-nav__icon {
  transform: scale(1.08);
}

.standings-nav__item--active .standings-nav__icon--champions {
  filter: brightness(0) invert(1);
}

@media (max-width: 640px) {
  .standings-nav__item {
    padding: 0.625rem 0.5rem;
    font-size: 0.8125rem;
    gap: 0.375rem;
  }
  .standings-nav__icon {
    inline-size: 18px;
    block-size: 18px;
    width: 18px;
    height: 18px;
  }
}

/* Hero card de Real Madrid */
.standings-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  position: relative;
  overflow: hidden;
}

.standings-hero::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.standings-hero__shield-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.standings-hero__shield {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.standings-hero__main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.standings-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fde047;
}

.standings-hero__title {
  font-size: 1.375rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.standings-hero__zone {
  font-size: 0.8125rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.standings-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  max-width: 320px;
}

.standings-hero__stat-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.35rem;
  text-align: center;
  min-width: 0;
}

.standings-hero__stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.standings-hero__stat-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  white-space: nowrap;
}

.standings-hero__stat-val--highlight {
  color: #fde047;
}

/* Barra de control y estado en directo */
.standings-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: 0.85rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.standings-status-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.standings-status-headline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.standings-status-timestamp-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.standings-status-timestamp {
  font-size: 0.8rem;
  color: #64748b;
  white-space: nowrap;
}

.standings-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.2;
}

.standings-live-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  animation: standingsPulse 1.8s infinite;
}

@keyframes standingsPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.standings-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f8fafc;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.standings-refresh-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  text-decoration: none;
  color: var(--color-brand);
}

/* Tabla de clasificación */
.standings-table-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.standings-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}

.standings-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 0.65rem;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.standings-table td {
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.standings-table tbody tr:hover {
  background: #f8fafc;
}

/* Columna Posición */
.standings-col-pos {
  width: 50px;
  text-align: center;
  font-weight: 700;
  position: relative;
}

.standings-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.875rem;
  background: #f1f5f9;
  color: #334155;
}

/* Columna Equipo */
.standings-col-team {
  min-width: 220px;
}

.standings-team-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.standings-team-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.standings-team-name {
  font-weight: 600;
  color: #0f172a;
}

/* Columnas de estadísticas */
.standings-col-stat {
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
}

.standings-col-pts {
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  color: #0f172a;
  background: rgba(0,0,0,0.015);
  white-space: nowrap;
}

.standings-diff-pos {
  color: #16a34a;
  font-weight: 600;
}

.standings-diff-neg {
  color: #dc2626;
  font-weight: 600;
}

.standings-diff-zero {
  color: #64748b;
  font-weight: 500;
}

/* ==========================================================================
   DESTACADO DEL REAL MADRID EN LA TABLA
   ========================================================================== */
.standings-row--madrid {
  background: linear-gradient(90deg, rgba(238, 242, 255, 0.95) 0%, rgba(245, 243, 255, 0.8) 100%) !important;
  box-shadow: inset 4px 0 0 #1e3a8a, inset 0 1px 0 rgba(30, 58, 138, 0.15), inset 0 -1px 0 rgba(30, 58, 138, 0.15);
}

.standings-row--madrid:hover {
  background: linear-gradient(90deg, rgba(224, 231, 255, 0.98) 0%, rgba(237, 233, 254, 0.9) 100%) !important;
}

.standings-row--madrid .standings-team-name {
  color: #1e3a8a;
  font-weight: 800;
  font-size: 1rem;
}

.standings-row--madrid .standings-col-pts {
  color: #1e3a8a;
  font-weight: 900;
  font-size: 1.0625rem;
  background: rgba(30, 58, 138, 0.08);
}

.standings-rm-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #fde047;
  color: #854d0e;
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Cuadrados completos con el color correspondiente según la zona */
.standings-row[data-zone="champions"] .standings-rank-badge {
  background: #2563eb;
  color: #ffffff;
  border: none;
}

.standings-row[data-zone="europa"] .standings-rank-badge {
  background: #ea580c;
  color: #ffffff;
  border: none;
}

.standings-row[data-zone="conference"] .standings-rank-badge {
  background: #16a34a;
  color: #ffffff;
  border: none;
}

.standings-row[data-zone="relegation"] .standings-rank-badge {
  background: #dc2626;
  color: #ffffff;
  border: none;
}

.standings-row[data-zone="ucl-direct"] .standings-rank-badge {
  background: #16a34a;
  color: #ffffff;
  border: none;
}

.standings-row[data-zone="ucl-playoff-seeded"] .standings-rank-badge {
  background: #2563eb;
  color: #ffffff;
  border: none;
}

.standings-row[data-zone="ucl-playoff-unseeded"] .standings-rank-badge {
  background: #0284c7;
  color: #ffffff;
  border: none;
}

.standings-row[data-zone="ucl-eliminated"] .standings-rank-badge {
  background: #dc2626;
  color: #ffffff;
  border: none;
}

.standings-row[data-zone="normal"] .standings-rank-badge {
  background: #f1f5f9;
  color: #475569;
  border: none;
}

/* Leyenda de zonas */
.standings-legend {
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.8125rem;
}

.standings-legend__title {
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
}

.standings-legend__list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.standings-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #334155;
  font-weight: 500;
}

.standings-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .standings-hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.65rem;
    padding: 1rem 0.75rem;
  }

  .standings-hero__shield-wrap {
    margin: 0 auto;
    width: 52px;
    height: 52px;
    padding: 5px;
  }

  .standings-hero__title {
    font-size: 1.2rem;
  }

  .standings-hero__zone {
    justify-content: center;
    font-size: 0.75rem;
    gap: 0.35rem;
  }

  .standings-hero__stats {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.25rem auto 0 auto !important;
  }

  .standings-hero__stat-box {
    min-width: 0 !important;
    padding: 0.28rem 0.2rem !important;
    border-radius: 5px !important;
  }

  .standings-hero__stat-label {
    font-size: 0.58rem !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 0.15rem !important;
  }

  .standings-hero__stat-val {
    font-size: 0.95rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .standings-status-bar {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 0.75rem 0.75rem !important;
    gap: 0.5rem !important;
  }

  .standings-status-info {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.25rem !important;
    width: 100% !important;
  }

  .standings-status-headline {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    flex-wrap: wrap !important;
    font-size: 0.82rem !important;
  }

  .standings-status-dot-sep {
    display: none !important;
  }

  .standings-status-timestamp {
    font-size: 0.75rem !important;
    color: #64748b !important;
  }

  .standings-status-actions {
    width: 100% !important;
  }

  .standings-refresh-btn {
    width: 100% !important;
    max-width: 220px !important;
    margin: 0 auto !important;
    justify-content: center !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.78rem !important;
  }
}

/* Grid principal con panel lateral de líderes estilo Google */
.standings-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .standings-grid {
    grid-template-columns: 1fr;
  }
}

/* Bolitas de últimos 5 partidos (Form Guide) */
.standings-col-form {
  text-align: center;
  white-space: nowrap;
}

.standings-form-pills {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.standings-form-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.625rem;
  font-weight: 800;
  color: #ffffff;
}

.standings-form-dot--w {
  background: #22c55e;
}

.standings-form-dot--d {
  background: #94a3b8;
}

.standings-form-dot--l {
  background: #ef4444;
}

/* Badge de partido en directo en la fila del club */
.standings-live-match-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fef08a;
  color: #854d0e;
  border: 1px solid #fde047;
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  animation: liveBadgeGlow 2s infinite ease-in-out;
}

@keyframes liveBadgeGlow {
  0% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(234, 179, 8, 0); }
  100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
}

/* Tarjeta de Líderes de Estadísticas (Pichichi / Asistencias) */
.standings-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.standings-leaders-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
}

.standings-leaders-header {
  padding: 0.875rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.standings-leaders-header h3 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.standings-leaders-body {
  padding: 0.5rem 0;
}

.standings-leader-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.standings-leader-row:last-child {
  border-bottom: none;
}

.standings-leader-row:hover {
  background: #f8fafc;
}

.standings-leader-row--madrid {
  background: #eff6ff !important;
}

.standings-leader-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.standings-leader-rank {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
  width: 14px;
}

.standings-leader-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.standings-leader-avatar--madrid {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #172554;
}

.standings-leader-info {
  display: flex;
  flex-direction: column;
}

.standings-leader-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}

.standings-leader-team {
  font-size: 0.75rem;
  color: #64748b;
}

.standings-leader-val {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

.standings-leader-val--highlight {
  color: #1e3a8a;
}

/* ==========================================================================
   Google Auth & One Tap Styles
   ========================================================================== */
.btn-google-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  color: #374151;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-md, 8px);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  margin-bottom: 1.25rem;
}

.btn-google-auth:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #111827;
  text-decoration: none;
}

.btn-google-auth svg {
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0 1.5rem;
  color: #9ca3af;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e5e7eb;
}

.auth-divider span {
  padding: 0 0.85rem;
}

/* ==========================================================================
   PIZARRA TÁCTICA Y ALINEACIÓN INTERACTIVA (SECCIÓN TÁCTICA Y ANÁLISIS)
   ========================================================================== */

.tactical-builder-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbf9fd 100%);
  border: 1px solid rgba(116, 92, 181, 0.25);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(101, 78, 163, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tactical-builder-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.tactical-builder-card__title-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  flex: 1;
  min-width: 260px;
}

.tactical-builder-card__icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.tactical-builder-card__title {
  margin: 0 0 0.25rem 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: #1e1b4b;
}

.tactical-builder-card__desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--slate-600);
  line-height: 1.45;
}

.tactical-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.tactical-counter-badge--pending {
  background: #f1f5f9;
  color: var(--slate-700);
  border: 1px solid #cbd5e1;
}

.tactical-counter-badge--complete {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* Toolbar de controles tácticos */
.tactical-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
}

.tactical-toolbar__group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tactical-toolbar__label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--slate-700);
}

.tactical-toolbar__select {
  font-size: 0.8125rem;
  padding: 0.35rem 0.75rem;
  min-width: 220px;
}

.tactical-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Workspace de 2 columnas */
.tactical-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 480px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .tactical-workspace {
    grid-template-columns: 1fr;
  }
}

/* El Campo de Fútbol Césped */
.tactical-pitch-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tactical-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5.2;
  background: radial-gradient(ellipse at center, #248838 0%, #155724 100%);
  border: 4px solid #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), inset 0 0 30px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.tactical-pitch__markings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent,
    transparent 36px,
    rgba(0, 0, 0, 0.04) 36px,
    rgba(0, 0, 0, 0.04) 72px
  );
}

.tactical-pitch__center-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-50%);
}

.tactical-pitch__center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24%;
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tactical-pitch__center-spot {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
}

.tactical-pitch__watermark {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

/* Áreas de penalti */
.tactical-pitch__box-penalty {
  position: absolute;
  left: 50%;
  width: 44%;
  height: 15%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  transform: translateX(-50%);
}
.tactical-pitch__box-penalty--top {
  top: 0;
  border-top: none;
}
.tactical-pitch__box-penalty--bottom {
  bottom: 0;
  border-bottom: none;
}

.tactical-pitch__box-goal {
  position: absolute;
  left: 50%;
  width: 22%;
  height: 6.5%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  transform: translateX(-50%);
}
.tactical-pitch__box-goal--top {
  top: 0;
  border-top: none;
}
.tactical-pitch__box-goal--bottom {
  bottom: 0;
  border-bottom: none;
}

.tactical-pitch__spot {
  position: absolute;
  left: 50%;
  width: 5px;
  height: 5px;
  background: #ffffff;
  border-radius: 50%;
  transform: translateX(-50%);
}
.tactical-pitch__spot--top {
  top: 72%;
}
.tactical-pitch__spot--bottom {
  bottom: 72%;
}

.tactical-pitch__corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.8);
}
.tactical-pitch__corner--tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 0 0 16px 0; }
.tactical-pitch__corner--tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 0 0 16px; }
.tactical-pitch__corner--bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 16px 0 0; }
.tactical-pitch__corner--br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 16px 0 0 0; }

.tactical-pitch-hint {
  font-size: 0.75rem;
  color: var(--slate-500);
  text-align: center;
  padding: 0 0.25rem;
}

/* Tokens de Jugadores en el Campo */
.tactical-token {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: grab;
  z-index: 10;
  transition: transform 0.15s ease, filter 0.15s ease;
  user-select: none;
  touch-action: none;
}

.tactical-token:hover {
  transform: translate(-50%, -50%) scale(1.08);
  z-index: 20;
}

.tactical-token--dragover {
  transform: translate(-50%, -50%) scale(1.18);
  filter: drop-shadow(0 0 8px #febe10);
}

.tactical-token--moving {
  cursor: grabbing;
  z-index: 50 !important;
  opacity: 0.92;
  transform: translate(-50%, -50%) scale(1.15) !important;
}

/* Slot vacío */
.tactical-token__empty-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.tactical-token:hover .tactical-token__empty-circle {
  border-color: #febe10;
  background: rgba(254, 190, 16, 0.2);
}

.tactical-token__pos-label {
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Jugador ocupado */
.tactical-token__avatar {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2.5px solid #febe10;
  background: linear-gradient(135deg, #702283 0%, #4a154b 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tactical-token__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.tactical-token__initials {
  color: #ffffff;
  font-weight: 800;
  font-size: 0.875rem;
}

.tactical-token__dorsal {
  position: absolute;
  top: -4px;
  right: -5px;
  background: #1e1b4b;
  color: #ffffff;
  border: 1.5px solid #febe10;
  font-size: 0.625rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0 4px;
  line-height: 1.3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tactical-token__remove {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
  padding: 0;
}

.tactical-token__remove:hover {
  background: #dc2626;
  transform: scale(1.15);
}

.tactical-token__name {
  display: inline-block;
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  margin-top: 3px;
  max-width: 82px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

/* Panel del Banquillo */
.tactical-bench-panel {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tactical-bench-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.tactical-bench-panel__title {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #1e1b4b;
}

.tactical-bench-panel__subtitle {
  font-size: 0.75rem;
  color: var(--slate-500);
}

/* Filtros de posición */
.tactical-filter-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.tactical-filter-tab {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tactical-filter-tab:hover {
  background: #e2e8f0;
  color: var(--slate-900);
}

.tactical-filter-tab.active {
  background: #745cb5;
  color: #ffffff;
  border-color: #5d449b;
}

/* Lista de jugadores */
.tactical-bench-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 0.45rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.tactical-bench-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tactical-bench-card:hover {
  border-color: #745cb5;
  background: #faf5ff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(101, 78, 163, 0.12);
}

.tactical-bench-card--dragging {
  opacity: 0.4;
}

.tactical-bench-card--active {
  opacity: 0.5;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.tactical-bench-card__avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: visible;
}

.tactical-bench-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
}

.tactical-bench-card__initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #702283 0%, #4a154b 100%);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 50%;
}

.tactical-bench-card__dorsal {
  position: absolute;
  bottom: -2px;
  right: -3px;
  background: #1e1b4b;
  color: #febe10;
  font-size: 0.5625rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0 3px;
  line-height: 1.2;
  border: 1px solid #ffffff;
}

.tactical-bench-card__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tactical-bench-card__name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tactical-bench-card__pos {
  font-size: 0.6875rem;
  color: var(--slate-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tactical-bench-card__status-check {
  display: none;
  color: #16a34a;
  font-weight: 900;
  font-size: 0.875rem;
  margin-left: auto;
}

.tactical-bench-card--active .tactical-bench-card__status-check {
  display: inline-block;
}

/* ==========================================================================
   VISTA DE PIZARRA TÁCTICA EN EL HILO (THREAD SHOW)
   ========================================================================== */

.tactical-board-display {
  inline-size: 100%;
  max-inline-size: 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: linear-gradient(180deg, #ffffff 0%, #faf8fc 100%);
  border: 1px solid rgba(116, 92, 181, 0.22);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  margin: 0.5rem 0 1rem 0;
  box-shadow: 0 4px 14px rgba(101, 78, 163, 0.06);
}

.tactical-board-display__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e2e8f0;
}

.tactical-board-display__title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tactical-board-display__icon {
  font-size: 1.25rem;
  line-height: 1;
}

.tactical-board-display__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 800;
  color: #1e1b4b;
}

.tactical-board-display__meta {
  margin: 0.1rem 0 0 0;
  font-size: 0.75rem;
  color: var(--slate-500);
}

.tactical-board-display__formation-badge {
  display: inline-block;
  background: linear-gradient(135deg, #745cb5 0%, #5d449b 100%);
  color: #ffffff;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(101, 78, 163, 0.25);
}

.tactical-board-display__visual {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0;
  inline-size: 100%;
  width: 100%;
}

.tactical-board-display__img {
  max-width: 440px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}

.tactical-board-display__zoom-trigger {
  position: relative;
  display: inline-block;
  max-width: 440px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
}

.tactical-board-display__hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  border-radius: 10px;
}

.tactical-board-display__hover-overlay span {
  background: rgba(15, 23, 42, 0.92);
  color: #febe10;
  padding: 0.4rem 0.95rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1.5px solid rgba(254, 190, 16, 0.6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tactical-board-display__zoom-trigger:hover .tactical-board-display__hover-overlay {
  opacity: 1;
}

.tactical-board-display__zoom-trigger:hover .tactical-board-display__img {
  transform: scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.tactical-board-display__visual-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 440px;
  width: 100%;
  gap: 0.75rem;
  box-sizing: border-box;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.tactical-board-display__zoom-hint {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-600, #475569);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.tactical-board-display__zoom-hint:hover {
  color: var(--color-brand, #745cb5);
}

/* Modal Lightbox de Pizarra Táctica */
.tactical-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.tactical-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 24, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeInModal 0.2s ease-out;
}

.tactical-modal-container {
  position: relative;
  z-index: 2;
  background: #0f172a;
  border: 1px solid rgba(254, 190, 16, 0.35);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(116, 92, 181, 0.25);
  max-width: 92vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  animation: scaleUpModal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.tactical-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.15rem;
  background: #1e1b4b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  gap: 1rem;
}

.tactical-modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.tactical-modal-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tactical-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.tactical-modal-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.tactical-modal-close-btn:hover {
  background: #ef4444;
  transform: scale(1.08);
}

.tactical-modal-body {
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: #090e17;
}

.tactical-modal-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  display: block;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUpModal {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Desglose del Once Titular */
.tactical-board-display__roster {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.tactical-board-display__roster-title {
  margin: 0 0 0.65rem 0;
  font-size: 0.875rem;
  font-weight: 800;
  color: #1e1b4b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tactical-board-display__roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}

.tactical-roster-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
}

.tactical-roster-pill__avatar {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
}

.tactical-roster-pill__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1.5px solid #febe10;
}

.tactical-roster-pill__initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #702283;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 50%;
}

.tactical-roster-pill__dorsal {
  position: absolute;
  top: -3px;
  right: -4px;
  background: #1e1b4b;
  color: #febe10;
  font-size: 0.5625rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0 3px;
  line-height: 1.2;
}

.tactical-roster-pill__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tactical-roster-pill__name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tactical-roster-pill__pos {
  font-size: 0.625rem;
  font-weight: 600;
  color: #745cb5;
}

/* ==========================================================================
   PESTAÑAS Y LISTADOS DEL PERFIL DE USUARIO
   ========================================================================== */

.profile-nav-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-block: 1.5rem 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.profile-nav-tab {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.profile-nav-tab:hover {
  color: #1e1b4b;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.profile-nav-tab.active {
  background: linear-gradient(135deg, #745cb5 0%, #5d449b 100%);
  color: #ffffff;
  border-color: #5d449b;
  box-shadow: 0 2px 8px rgba(101, 78, 163, 0.35);
}

.profile-tab-panel {
  animation: fadeIn 0.2s ease-in-out;
}

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

.profile-thread-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.profile-thread-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color var(--t);
}

.profile-thread-item:last-child {
  border-bottom: none;
}

.profile-thread-item:hover {
  background: var(--purple-50);
}

.profile-thread-item__main {
  min-width: 0;
  flex: 1;
}

.profile-thread-item__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.35;
}

.profile-thread-item__title:hover {
  color: #5d449b;
  text-decoration: underline;
}

.profile-thread-item__meta {
  display: block;
  font-size: 0.775rem;
  color: var(--slate-500);
  margin-top: 0.25rem;
}

.profile-thread-item__cat {
  font-weight: 600;
  color: #745cb5;
  text-decoration: none;
}

.profile-thread-item__cat:hover {
  text-decoration: underline;
}

.profile-thread-item__stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.profile-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: #f1f5f9;
  color: var(--slate-700);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

.profile-stat-badge--user {
  background: #fdf4ff;
  color: #86198f;
  border-color: #f5d0fe;
  font-weight: 700;
}

@media (max-width: 768px) {
  .profile-thread-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
  .profile-thread-item__stats {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ==========================================================================
   MENÚ LATERAL DESLIZABLE (DRAWER) - Desktop y Móvil
   ========================================================================== */

/* 1. Contenedor de Marca y Botón de Menú */
.header-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Botón hamburguesa en cabecera (Desktop y Móvil) */
.site-menu-btn,
.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  margin-inline-end: 0.25rem;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  position: relative;
  flex-shrink: 0;
}

.site-menu-btn:hover,
.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  color: #FEBE10;
  transform: translateY(-1px);
}

.site-menu-btn:active,
.mobile-menu-btn:active {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(0) scale(0.96);
}

.site-menu-btn:focus-visible,
.mobile-menu-btn:focus-visible {
  outline: 2px solid #FEBE10;
  outline-offset: 2px;
}

/* En Desktop: menú limpio con solo las 3 rayitas (sin recuadro ni fondo) y logo pegado a la izquierda */
@media (min-width: 769px) {
  .header-brand-wrap {
    gap: 0.35rem;
  }

  .site-menu-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 0.35rem 0.25rem;
    margin-inline-end: 0;
    border-radius: var(--radius-sm, 6px);
  }

  .site-menu-btn:hover {
    background: transparent !important;
    border-color: transparent !important;
    color: #FEBE10;
    transform: scale(1.08);
  }

  .site-menu-btn:active {
    background: transparent !important;
    transform: scale(0.95);
  }

  .site-menu-btn:focus-visible {
    outline: 2px solid #FEBE10;
    outline-offset: 2px;
  }
}

/* 2. Menú Lateral Deslizable (Drawer) */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.3s ease;
}
.mobile-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}
.mobile-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 13, 27, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-drawer.is-open .mobile-drawer__overlay {
  opacity: 1;
}
.mobile-drawer__panel {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  inline-size: min(92vw, 375px);
  background: #ffffff;
  box-shadow: 10px 0 40px rgba(11, 13, 27, 0.32);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  z-index: 2;
}
.mobile-drawer.is-open .mobile-drawer__panel {
  transform: translateX(0);
}

@media (min-width: 769px) {
  .mobile-drawer__panel {
    inline-size: 405px;
    box-shadow: 14px 0 50px rgba(11, 13, 27, 0.4);
  }
}

body.drawer-open {
  overflow: hidden !important;
  touch-action: none;
}

.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(135deg, #120e29 0%, #2e1d52 100%);
  color: #ffffff;
  border-block-end: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}
.mobile-drawer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  text-decoration: none;
}
.mobile-drawer__brand:hover {
  text-decoration: none;
}
.mobile-drawer__brand svg {
  width: 32px;
  height: 38px;
  flex: none;
}
.mobile-drawer__brand-text {
  display: flex;
  flex-direction: column;
}
.mobile-drawer__brand-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #FEBE10;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.mobile-drawer__brand-sub {
  font-size: 0.7rem;
  color: #cbd5e1;
}
.mobile-drawer__close {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.mobile-drawer__close:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #FEBE10;
  transform: rotate(90deg);
}

.mobile-drawer__scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.05rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.mobile-drawer__scroll::-webkit-scrollbar {
  width: 6px;
}
.mobile-drawer__scroll::-webkit-scrollbar-track {
  background: transparent;
}
.mobile-drawer__scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
.mobile-drawer__scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.mobile-drawer__user-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg, 12px);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mobile-drawer__user-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.mobile-drawer__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.mobile-drawer__avatar--initials {
  background: var(--color-brand, #5b21b6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}
.mobile-drawer__user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mobile-drawer__user-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-drawer__user-handle {
  font-size: 0.8rem;
  color: #64748b;
}

.mobile-drawer__notify-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md, 8px);
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.mobile-drawer__notify-pill:hover {
  background: var(--purple-50, #f5f3ff);
  border-color: var(--purple-300, #c4b5fd);
  color: var(--purple-900, #3c1659);
  text-decoration: none;
}

.mobile-drawer__guest-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg, 12px);
  padding: 1rem;
  text-align: center;
}
.mobile-drawer__guest-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}
.mobile-drawer__guest-text {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

.mobile-drawer__section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin: 0.85rem 0 0.35rem 0.25rem;
}
.mobile-drawer__section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #f1f5f9;
}

.mobile-drawer__nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mobile-drawer__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
  border-radius: var(--radius-md, 8px);
  color: #334155;
  font-size: 0.845rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.mobile-drawer__link svg {
  flex: none;
  color: #64748b;
  transition: color 0.15s ease;
}
.mobile-drawer__link:hover {
  background: #f5f3ff;
  color: #5b21b6;
  text-decoration: none;
  transform: translateX(3px);
}
.mobile-drawer__link:hover svg {
  color: #5b21b6;
}
.mobile-drawer__link.is-active {
  background: #ede9fe;
  color: #4c1d95;
  font-weight: 700;
}
.mobile-drawer__link.is-active svg {
  color: #5b21b6;
}
.mobile-drawer__link--admin {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}
.mobile-drawer__link--admin svg {
  color: #ca8a04;
}
.mobile-drawer__link--admin:hover {
  background: #fef9c3;
  color: #713f12;
}

.mobile-drawer__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.18rem 0.52rem;
  border-radius: var(--radius-full, 9999px);
  background: #f1f5f9;
  color: #475569;
  margin-inline-start: auto;
  border: 1px solid #e2e8f0;
}
.mobile-drawer__badge--gold {
  background: rgba(254, 190, 16, 0.15);
  color: #b45309;
  border-color: rgba(254, 190, 16, 0.4);
}
.mobile-drawer__badge--ucl {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.3);
}

.mobile-drawer__logout-area {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}
.mobile-drawer__logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md, 8px);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mobile-drawer__logout-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* 3. Media queries para móvil (<= 768px) */
.thread-row__mobile-meta {
  display: none;
}

@media (max-width: 768px) {
  /* Cabecera móvil */
  .header-brand-wrap {
    gap: 0.35rem;
    min-width: 0;
    flex: 1;
  }
  .mobile-menu-btn,
  .site-menu-btn {
    display: inline-flex;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }
  .header-auth--desktop {
    display: none !important;
  }
  .header-search--desktop {
    display: none !important;
  }
  .mobile-search-btn {
    display: inline-flex !important;
  }
  .site-nav {
    display: none !important;
  }
  .site-header__top .header-row {
    padding-block: 0.55rem;
    gap: 0.4rem;
    justify-content: flex-start;
  }
  .brand {
    gap: 0.35rem;
  }
  .brand__logo-container,
  .brand__logo {
    inline-size: 38px;
    block-size: 38px;
  }
  .brand__logo-svg--shield {
    width: 24px;
    height: 35px;
  }
  .brand__logo-svg--champions {
    width: 38px;
    height: 38px;
  }
  .brand__name {
    font-size: 0.95rem;
    font-weight: 900 !important;
    letter-spacing: 0.015em;
  }
  .brand__tagline {
    font-size: 0.72rem;
  }
  .category-official-notice {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.65rem !important;
  }

  /* Portada: filas de categorías más ligeras y compactas */
  .section-card {
    margin-bottom: 0.75rem;
  }
  .section-card__header {
    padding: 0.65rem 0.85rem !important;
    background: var(--slate-100) !important;
    border-block-end: 1px solid var(--color-border) !important;
  }
  .section-card__title {
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    color: var(--color-text) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
  }
  .section-card__title a {
    color: var(--color-text) !important;
    font-weight: 900 !important;
  }
  .forum-row {
    padding: 0.7rem 0.85rem !important;
    gap: 0.5rem !important;
    align-items: flex-start !important;
    background: var(--color-surface) !important;
    border-block-end: 1px solid var(--color-border) !important;
  }
  .category-icon-wrap {
    inline-size: 1.35rem !important;
    block-size: 1.35rem !important;
    min-width: 1.35rem !important;
    margin-top: 0.12rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  .category-icon-wrap svg {
    width: 17px !important;
    height: 17px !important;
  }
  .forum-row__content {
    flex: 1;
    min-width: 0;
  }
  .forum-row__title {
    font-size: 0.975rem !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
    color: var(--color-text) !important;
  }
  .forum-row__desc {
    font-size: 0.775rem !important;
    line-height: 1.35 !important;
    margin-top: 0.15rem !important;
    color: var(--color-text-muted) !important;
  }

  /* Listado de temas dentro de una categoría */
  .toolbar--desktop {
    display: none !important;
  }

  .forum-table thead {
    display: none !important;
  }
  .forum-table td.num,
  .forum-table td.cell-last {
    display: none !important;
  }
  .forum-table tbody tr {
    display: block !important;
    padding: 0.65rem 0.85rem !important;
    border-block-end: 1px solid var(--color-border, #e2e8f0) !important;
  }
  .forum-table tbody th[scope="row"] {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .thread-row__cell-title {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
  }

  .thread-avatar-container {
    width: 38px !important;
    height: 52px !important;
  }
  .thread-avatar-portrait {
    width: 38px !important;
    height: 52px !important;
  }
  .thread-envelope-container {
    width: 32px !important;
    height: 32px !important;
  }
  .thread-envelope svg {
    width: 19px !important;
    height: 19px !important;
  }
  .thread-competition-container {
    width: 36px !important;
    height: 36px !important;
  }
  .thread-competition-logo {
    width: 34px !important;
    height: 34px !important;
  }

  .thread-title {
    font-size: 0.925rem !important;
    line-height: 1.3 !important;
  }

  /* Ocultar metadatos y paginación de escritorio */
  .thread-row__desktop-meta,
  .thread-mini-pagination {
    display: none !important;
  }

  /* Mostrar metadatos exclusivos de móvil: Icono mensajes + @usuario + hora */
  .thread-row__mobile-meta {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
    font-size: 0.75rem !important;
    color: #64748b !important;
    margin-top: 0.25rem !important;
    line-height: 1.3 !important;
  }
  .thread-mobile-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
  }
  .thread-mobile-meta__count {
    font-weight: 600;
    color: #475569;
  }
  .thread-mobile-meta__icon {
    flex: none;
    color: var(--color-brand, #654EA3);
  }
  .thread-mobile-meta__sep {
    color: #cbd5e1;
    font-weight: 700;
  }
  .thread-mobile-meta__user a {
    color: var(--color-brand, #654EA3);
    font-weight: 600;
    text-decoration: none;
  }
  .thread-mobile-meta__user a:hover {
    text-decoration: underline;
  }
  .thread-mobile-meta__time {
    color: #64748b;
  }

  /* Insignias más sutiles en móvil */
  .player-scope-label {
    font-size: 0.55rem !important;
    padding: 0.05rem 0.35rem !important;
  }

  .thread-avatar-portrait--lg {
    width: 48px !important;
    height: 64px !important;
  }
}

.category-official-notice {
  background: rgba(63, 42, 116, 0.06);
  border-left: 3px solid var(--color-brand, #3f2a74);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-3);
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--color-text-secondary, #334155);
}

/* ==========================================================================
   Accesos directos a Clasificaciones (Desktop Sidebar & Mobile Drawer)
   ========================================================================== */
.sidebar-standings-bar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2, 0.5rem);
  margin-block-end: var(--sp-3, 0.75rem);
}

.sidebar-standings-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e9d5ff);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 2px 8px -2px rgba(101, 78, 163, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  transition: all 0.18s ease;
}

.sidebar-standings-btn:hover {
  background: var(--color-surface-alt, #f5f3ff);
  border-color: var(--color-brand, #c084fc);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px -2px rgba(101, 78, 163, 0.16);
  text-decoration: none;
}

.sidebar-standings-btn__icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.sidebar-standings-btn:hover .sidebar-standings-btn__icon {
  transform: scale(1.08);
}

.sidebar-standings-btn__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.sidebar-standings-btn__sub {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-standings-btn__title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-text, #1e1b4b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-drawer__link img {
  flex: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ==========================================================================
   RECORTADOR CIRCULAR DE AVATAR (AVATAR CROPPER)
   ========================================================================== */
.cropper-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cropper-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cropper-modal__dialog {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(116, 92, 181, 0.25);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: cropperModalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cropperModalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.cropper-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.cropper-modal__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e1b4b;
}

.cropper-modal__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}

.cropper-modal__close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.cropper-modal__close:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.cropper-modal__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cropper-stage-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.cropper-stage {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.cropper-stage:active {
  cursor: grabbing;
}

.cropper-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cropper-circle-mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cropper-circle-ring {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 2.5px solid #febe10;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.65), 0 0 16px rgba(0, 0, 0, 0.4);
}

.cropper-controls {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  max-width: 280px;
}

.cropper-controls__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.cropper-btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 1.15rem;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
  transition: all 0.15s ease;
}

.cropper-btn-icon:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.cropper-range {
  flex: 1;
  min-width: 60px;
  accent-color: #702283;
  cursor: pointer;
}

.cropper-btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.cropper-btn-reset:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}

.cropper-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: 280px;
  background: #f8fafc;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.cropper-preview-row__title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.cropper-preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.cropper-preview-circle {
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid #febe10;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.cropper-preview-circle--lg {
  width: 44px;
  height: 44px;
}

.cropper-preview-item__caption {
  font-size: 0.625rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cropper-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem 1.15rem;
  border-top: 1px solid #f1f5f9;
  background: #faf8fc;
}

.avatar-crop-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.avatar-crop-status__badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
}

/* ==========================================================================
   Cintillo Superior Sutil de La Porra en Home (~50px de alto)
   ========================================================================== */
.porra-desktop-only {
  display: flex !important;
}

.porra-mobile-only {
  display: none !important;
}

.porra-home-banner {
  background: linear-gradient(90deg, #160e29 0%, #291b4d 50%, #1e1538 100%);
  border: 1px solid rgba(254, 190, 16, 0.45);
  border-radius: 8px;
  min-height: 48px;
  max-height: 52px;
  height: 50px;
  padding: 0 1rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(22, 14, 41, 0.25);
  margin-block-end: var(--sp-3, 0.75rem);
  display: flex;
  align-items: center;
}

.porra-home-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.porra-home-banner__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  overflow: hidden;
}

.porra-home-banner__rewards-duo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.porra-banner-thumb {
  width: 44px;
  height: 32px;
  background: #ffffff;
  border: 1px solid #febe10;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.porra-banner-thumb--monthly {
  background: #000000;
  border-color: #a78bfa;
}

.porra-home-banner__shirt-wrap {
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 1px solid #febe10;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.porra-home-banner__shirt-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.porra-home-banner__monthly-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.porra-home-banner__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(254, 190, 16, 0.18);
  border: 1px solid rgba(254, 190, 16, 0.45);
  color: #febe10;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.porra-home-banner__text {
  font-size: 0.86rem;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.2;
}

.porra-home-banner__text strong {
  color: #febe10;
  font-weight: 800;
}

.porra-home-banner__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.porra-home-banner__btn {
  background: linear-gradient(135deg, #febe10 0%, #f59e0b 100%);
  color: #1e1538 !important;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 1px 6px rgba(254, 190, 16, 0.3);
  transition: transform 0.15s ease;
  white-space: nowrap;
}

.porra-home-banner__btn:hover {
  transform: translateY(-1px);
  color: #0f0a1c !important;
}

.porra-coming-soon__content-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.porra-coming-soon__content-link:hover .porra-coming-soon__text strong {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .porra-desktop-only {
    display: none !important;
  }

  .porra-mobile-only {
    display: flex !important;
  }

  .porra-coming-soon__content-link {
    gap: 0.45rem;
  }

  .porra-home-banner {
    min-height: 48px;
    max-height: 50px;
    height: 48px;
    padding: 0 0.55rem;
  }

  .porra-home-banner__inner {
    gap: 0.45rem;
  }

  .porra-home-banner__left {
    gap: 0.45rem;
  }

  .porra-home-banner__mobile-shields {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
  }

  .porra-mobile-shield-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
  }

  .porra-mobile-vs {
    font-size: 0.62rem;
    color: #febe10;
    font-weight: 900;
    line-height: 1;
    margin: 0 1px;
    text-transform: uppercase;
  }

  .porra-home-banner__mobile-text {
    font-size: 0.8rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.2;
  }

  .porra-home-banner__btn {
    font-size: 0.78rem;
    font-weight: 900;
    padding: 0.32rem 0.65rem;
    letter-spacing: 0.02em;
  }

  /* Cintillo "Próximamente": texto en dos líneas en mobile */
  .porra-coming-soon {
    height: auto;
    max-height: none;
    min-height: 48px;
    padding: 0.4rem 0.6rem;
  }
  .porra-coming-soon .porra-home-banner__tag {
    display: none;
  }
  .porra-coming-soon__text {
    white-space: normal;
    font-size: 0.76rem;
    line-height: 1.3;
  }
}

/* ==========================================================================
   Arena Principal de Pronóstico de La Porra (Escudos e Inputs Grandes)
   ========================================================================== */
.porra-match-arena {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2.5vw, 2.25rem);
  padding: 1.25rem 0;
  flex-wrap: nowrap;
}

.porra-team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: clamp(140px, 18vw, 195px);
  flex-shrink: 0;
}

.porra-shield-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

.porra-shield-img {
  width: clamp(135px, 16vw, 175px);
  height: clamp(135px, 16vw, 175px);
  max-width: 185px;
  max-height: 185px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s ease;
}

.porra-team-block:hover .porra-shield-img {
  transform: scale(1.05);
}

.porra-team-name {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.25;
  word-break: break-word;
  max-width: 100%;
}

.porra-team-badge {
  font-size: 0.62rem;
  color: #febe10 !important;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-top: 0.35rem;
}

.porra-score-input-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.porra-score-box {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.porra-stepper-btn {
  width: clamp(42px, 5.2vw, 52px);
  height: clamp(42px, 5.2vw, 52px);
  border-radius: 12px;
  border: 2px solid #febe10;
  background: linear-gradient(135deg, #febe10 0%, #e0a300 100%);
  color: #1e1538 !important;
  font-weight: 900;
  cursor: pointer;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  box-shadow: 0 4px 14px rgba(254, 190, 16, 0.4);
}

.porra-stepper-btn:hover {
  background: linear-gradient(135deg, #e0a300 0%, #c28800 100%);
  color: #1e1538 !important;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(254, 190, 16, 0.6);
}

.porra-stepper-btn:active {
  transform: scale(0.92);
}

.porra-score-input {
  width: clamp(80px, 9.5vw, 98px);
  height: clamp(70px, 8.5vw, 86px);
  text-align: center;
  font-size: clamp(2.9rem, 4.2vw, 3.7rem);
  font-weight: 900;
  border-radius: 14px;
  border: 3.5px solid #febe10;
  background: #ffffff;
  color: #1e1538;
  padding: 0;
  margin: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  outline: none;
  -moz-appearance: textfield;
}

.porra-score-input::-webkit-outer-spin-button,
.porra-score-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.porra-score-input:focus {
  border-color: #e0a300;
  box-shadow: 0 0 0 4px rgba(254, 190, 16, 0.4);
}

.porra-score-placeholder {
  width: clamp(80px, 9.5vw, 98px);
  height: clamp(70px, 8.5vw, 86px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.9rem, 4.2vw, 3.7rem);
  font-weight: 900;
  border-radius: 14px;
  border: 3.5px solid #febe10;
  background: #ffffff;
  color: #1e1538;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.porra-vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(0.3rem, 1.2vw, 0.85rem);
  flex-shrink: 0;
}

.porra-vs-text {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 900;
  color: #febe10;
  letter-spacing: 0.05em;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.porra-vs-sub {
  font-size: 0.65rem;
  color: #cbd5e1;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.porra-submit-btn {
  background: linear-gradient(135deg, #febe10 0%, #e0a300 100%) !important;
  color: #1e1538 !important;
  font-weight: 900 !important;
  font-size: clamp(1.15rem, 2vw, 1.35rem) !important;
  padding: 1.15rem clamp(2.5rem, 6vw, 4rem) !important;
  border-radius: 14px !important;
  border: 2px solid #febe10 !important;
  cursor: pointer !important;
  box-shadow: 0 8px 28px rgba(254, 190, 16, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.75rem !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

.porra-submit-btn:hover {
  background: linear-gradient(135deg, #e0a300 0%, #c28800 100%) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 10px 34px rgba(254, 190, 16, 0.65) !important;
  color: #1e1538 !important;
}

.porra-submit-btn:active {
  transform: translateY(0) scale(0.99) !important;
}

@media (max-width: 580px) {
  /* Tarjeta del pronóstico más compacta */
  .prediction-card-main {
    padding: 1.1rem 0.85rem !important;
    border-radius: 14px !important;
  }

  /* Arena en cuadrícula: escudos + VS arriba, marcadores debajo */
  .porra-match-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "home vs away"
      "hscore . ascore";
    align-items: center;
    justify-items: center;
    column-gap: 0.5rem;
    row-gap: 1rem;
    padding: 0.5rem 0;
  }
  .porra-match-arena > :nth-child(1) { grid-area: home; }
  .porra-match-arena > :nth-child(2) { grid-area: hscore; }
  .porra-match-arena > :nth-child(3) { grid-area: vs; }
  .porra-match-arena > :nth-child(4) { grid-area: ascore; }
  .porra-match-arena > :nth-child(5) { grid-area: away; }

  .porra-team-block {
    width: 100%;
    max-width: 150px;
  }
  .porra-shield-wrapper {
    margin-bottom: 0.5rem;
  }
  .porra-shield-img {
    width: 92px;
    height: 92px;
  }
  .porra-team-name {
    font-size: 0.95rem;
  }
  .porra-vs-text {
    font-size: 1.5rem;
  }

  /* Marcador vertical: + arriba, número, − abajo */
  .porra-score-box {
    flex-direction: column-reverse;
    gap: 0.45rem;
  }
  .porra-stepper-btn {
    width: 56px;
    height: 40px;
    font-size: 1.6rem;
    border-radius: 10px;
  }
  .porra-score-input,
  .porra-score-placeholder {
    width: 76px;
    height: 70px;
    font-size: 2.8rem;
  }

  .porra-submit-btn {
    width: 100%;
    font-size: 1.05rem !important;
    padding: 1rem 1.1rem !important;
    letter-spacing: 0.01em !important;
  }

  /* Cabecera y bloques de la página de la porra */
  .porra-hero {
    padding: 1.35rem 1.1rem !important;
  }
  .porra-hero h1 {
    font-size: 1.4rem !important;
  }
  .porra-hero p {
    font-size: 0.88rem !important;
  }
  .porra-ranking-cta {
    padding: 1.15rem !important;
  }
  .porra-ranking-cta > div {
    min-width: 0 !important;
    width: 100%;
  }
  .porra-ranking-cta .btn {
    width: 100%;
    justify-content: center;
    white-space: normal !important;
  }
}

/* ==========================================================================
   Sección: Otros debates relacionados en tema (Desktop & Mobile)
   ========================================================================== */
.related-debates {
  margin-top: clamp(2rem, 4vw, 3rem);
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}

/* Franja superior decorativa Madridista con sutil degradado morado/oro */
.related-debates::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #654EA3 0%, #7b63b8 60%, #FEBE10 100%);
}

.related-debates__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--slate-100);
}

.related-debates__headline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.related-debates__icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(101, 78, 163, 0.1) 0%, rgba(254, 190, 16, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rm-purple);
  flex-shrink: 0;
  border: 1px solid rgba(101, 78, 163, 0.15);
}

.related-debates__icon {
  width: 22px;
  height: 22px;
}

.related-debates__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.3;
}

.related-debates__category-highlight {
  color: var(--rm-purple);
}

.related-debates__subtitle {
  margin: 0.2rem 0 0 0;
  font-size: 0.82rem;
  color: var(--slate-500);
  line-height: 1.35;
}

.related-debates__view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rm-purple);
  background: rgba(101, 78, 163, 0.06);
  border: 1px solid rgba(101, 78, 163, 0.18);
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.related-debates__view-all:hover {
  background: var(--rm-purple);
  color: #ffffff;
  border-color: var(--rm-purple);
  transform: translateX(2px);
  box-shadow: 0 4px 10px rgba(101, 78, 163, 0.25);
}

.related-debates__arrow-icon {
  transition: transform 0.2s ease;
}

.related-debates__view-all:hover .related-debates__arrow-icon {
  transform: translateX(2px);
}

/* Grid de tarjetas */
.related-debates__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* Tarjeta individual */
.related-debate-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem 1.15rem;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: all 0.2s ease;
  overflow: hidden;
}

.related-debate-card:hover {
  border-color: rgba(101, 78, 163, 0.35);
  box-shadow: 0 8px 18px -4px rgba(101, 78, 163, 0.12), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  transform: translateY(-2px);
  background: #ffffff;
}

/* Cabecera de tarjeta: autor y tiempo */
.related-debate-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.76rem;
}

.related-debate-card__author {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.related-debate-card__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.related-debate-card__avatar--fallback {
  background: var(--slate-100);
  color: var(--slate-600);
  font-weight: 700;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--slate-200);
}

.related-debate-card__author-name {
  font-weight: 600;
  color: var(--slate-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.related-debate-card__time {
  color: var(--slate-400);
  white-space: nowrap;
  font-size: 0.72rem;
  flex-shrink: 0;
}

/* Título */
.related-debate-card__title {
  margin: 0 0 0.85rem 0;
  font-size: 0.96rem;
  font-weight: 750;
  color: #0f172a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.related-debate-card:hover .related-debate-card__title {
  color: var(--rm-purple);
}

/* Pie de tarjeta: estadísticas y CTA */
.related-debate-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--slate-100);
}

.related-debate-card__stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.related-debate-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--slate-500);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  line-height: 1.2;
}

.related-debate-card__stat svg {
  color: var(--slate-400);
}

.related-debate-card__stat--replies svg {
  color: var(--rm-purple);
}

.related-debate-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--rm-purple);
  opacity: 0.85;
  transition: all 0.2s ease;
}

.related-debate-card:hover .related-debate-card__cta {
  opacity: 1;
  transform: translateX(3px);
  color: var(--purple-700);
}

/* Responsive: Mobile (< 768px) */
@media (max-width: 768px) {
  .related-debates {
    padding: 1.1rem 0.9rem;
    margin-top: 1.75rem;
    border-radius: 14px;
  }

  .related-debates__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
  }

  .related-debates__headline {
    width: 100%;
    gap: 0.65rem;
  }

  .related-debates__icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .related-debates__icon {
    width: 18px;
    height: 18px;
  }

  .related-debates__title {
    font-size: 1.02rem;
  }

  .related-debates__subtitle {
    font-size: 0.75rem;
  }

  .related-debates__view-all {
    width: 100%;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }

  .related-debates__grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .related-debate-card {
    padding: 0.9rem 0.95rem;
  }

  .related-debate-card__title {
    font-size: 0.98rem;
    font-weight: 800;
    color: #090d16;
    line-height: 1.38;
    margin-bottom: 0.65rem;
    letter-spacing: -0.01em;
  }

  .related-debate-card__author-name {
    max-width: 120px;
  }

  .related-debate-card__stat {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
  }

  .related-debate-card__cta {
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   Botones de Modo Oscuro (Sol / Luna) y Compartir
   ========================================================================== */
.header-mobile-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.header-theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.header-theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: rotate(15deg);
  border-color: rgba(255, 255, 255, 0.4);
}

.header-theme-toggle-btn .theme-icon-sun {
  display: none;
  color: #fde047;
}

.header-theme-toggle-btn .theme-icon-moon {
  display: block;
}

html[data-theme="dark"] .header-theme-toggle-btn .theme-icon-sun {
  display: block;
}

html[data-theme="dark"] .header-theme-toggle-btn .theme-icon-moon {
  display: none;
}

/* En el drawer móvil */
.mobile-drawer__theme-toggle .theme-icon-sun {
  display: none;
  color: #fde047;
}
.mobile-drawer__theme-toggle .theme-icon-moon {
  display: block;
}
html[data-theme="dark"] .mobile-drawer__theme-toggle .theme-icon-sun {
  display: block;
}
html[data-theme="dark"] .mobile-drawer__theme-toggle .theme-icon-moon {
  display: none;
}

.header-theme-toggle-btn--mobile {
  display: none !important;
}
@media (max-width: 991px) {
  .header-theme-toggle-btn--desktop {
    display: none !important;
  }
}

/* Botón de compartir en WhatsApp */
.btn--share-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  font-weight: 600;
  transition: all 0.2s ease;
  border-radius: var(--radius-md);
}

.btn--share-whatsapp:hover {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.btn-share-post {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-share-post:hover {
  color: #16a34a !important;
}

/* Toast de compartir */
.forum-share-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.forum-share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Modo Oscuro Oficial: Bernabéu Night
   ========================================================================== */
html[data-theme="dark"],
html.theme-dark {
  color-scheme: dark;

  /* Fondo Bernabéu Night y superficies oscuras de alta legibilidad */
  --color-bg: #0b0f19;
  --color-surface: #121929;
  --color-surface-alt: #182238;
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-subtle: #64748b;
  --color-border: #1e293b;
  --color-border-strong: #334155;

  --slate-950: #ffffff;
  --slate-900: #f8fafc;
  --slate-800: #f1f5f9;
  --slate-700: #e2e8f0;
  --slate-600: #cbd5e1;
  --slate-500: #94a3b8;
  --slate-400: #64748b;
  --slate-300: #334155;
  --slate-200: #1e293b;
  --slate-100: #182238;
  --slate-50:  #0b0f19;

  --rm-white: #121929;

  /* Marca en modo noche con alto contraste */
  --color-brand: #c4b5fd;
  --color-brand-royal: #a78bfa;
  --color-brand-strong: #ddd6fe;
  --color-link: #a78bfa;
  --color-link-hover: #c4b5fd;
  --color-action: #a78bfa;
  --color-action-hover: #c4b5fd;
  --color-accent: #fde047;

  --purple-950: #0a0614;
  --purple-900: #130c24;
  --purple-800: #1d1338;
  --purple-700: #a78bfa;
  --purple-200: #3f2a74;
  --purple-100: #26194a;
  --purple-50:  #150e2a;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.45);
  --shadow-card: 0 2px 8px 0 rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 10px 24px -3px rgba(0, 0, 0, 0.65);
}

/* Reglas específicas de componentes en Modo Oscuro */
html[data-theme="dark"] body {
  background: #0b0f19;
  color: #f1f5f9;
}

html[data-theme="dark"] .site-header {
  background: linear-gradient(135deg, #130a28 0%, #1e133e 55%, #2a1854 100%);
  border-block-end-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .main-nav {
  background: #111728;
  border-block-end-color: #1e293b;
}

html[data-theme="dark"] .main-nav__link {
  color: #cbd5e1;
}

html[data-theme="dark"] .main-nav__link:hover,
html[data-theme="dark"] .main-nav__link.is-active {
  color: #fde047;
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .box,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .post,
html[data-theme="dark"] .thread-head,
html[data-theme="dark"] .tactical-builder-card,
html[data-theme="dark"] .modal-dialog,
html[data-theme="dark"] .form-card {
  background: #121929;
  border-color: #1e293b;
  color: #f1f5f9;
}

html[data-theme="dark"] .post__author {
  background: #0f1626;
  border-inline-end-color: #1e293b;
  border-block-end-color: #1e293b;
}

html[data-theme="dark"] .post__body {
  color: #e2e8f0;
}

html[data-theme="dark"] .post__actions {
  background: #0f1626;
  border-block-start-color: #1e293b;
}

html[data-theme="dark"] .post__action {
  color: #94a3b8;
}

html[data-theme="dark"] .post__action:hover {
  background: #1e293b;
  color: #f1f5f9;
}

html[data-theme="dark"] .quote {
  background: #172136;
  border-inline-start-color: #a78bfa;
}

html[data-theme="dark"] .quote__header {
  color: #cbd5e1;
  border-block-end-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .quote__body {
  color: #cbd5e1;
}

html[data-theme="dark"] .quote__jump-btn {
  background: #1e293b;
  border-color: #334155;
  color: #c4b5fd;
}

html[data-theme="dark"] .quote__jump-btn:hover {
  background: #654EA3;
  color: #ffffff;
}

html[data-theme="dark"] .forum-table th {
  background: #172136;
  color: #f1f5f9;
  border-color: #1e293b;
}

html[data-theme="dark"] .forum-table td {
  border-color: #1e293b;
}

html[data-theme="dark"] .forum-table tr:hover td {
  background: #151f33;
}

html[data-theme="dark"] .forum-table .section-row th {
  background: #1a1532;
  border-color: #2e2055;
  color: #e2e8f0;
}

html[data-theme="dark"] .header-search__input {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
}

html[data-theme="dark"] .header-search__input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

html[data-theme="dark"] .header-search__dropdown {
  background: #121929;
  border-color: #1e293b;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .header-search__item:hover {
  background: #182238;
}

html[data-theme="dark"] .header-search__item-title {
  color: #f1f5f9;
}

html[data-theme="dark"] input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: #0f1626;
  border-color: #1e293b;
  color: #f1f5f9;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

/* Sección Otros Debates en modo oscuro */
html[data-theme="dark"] .related-debates {
  background: #121929;
  border-color: #1e293b;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .related-debates__header {
  border-bottom-color: #1e293b;
}

html[data-theme="dark"] .related-debates__title {
  color: #f8fafc;
}

html[data-theme="dark"] .related-debates__subtitle {
  color: #94a3b8;
}

html[data-theme="dark"] .related-debates__category-highlight {
  color: #c4b5fd;
}

html[data-theme="dark"] .related-debates__view-all {
  background: rgba(196, 181, 253, 0.1);
  border-color: rgba(196, 181, 253, 0.25);
  color: #c4b5fd;
}

html[data-theme="dark"] .related-debates__view-all:hover {
  background: #654EA3;
  color: #ffffff;
}

html[data-theme="dark"] .related-debate-card {
  background: #0f1626;
  border-color: #1e293b;
  color: #f1f5f9;
}

html[data-theme="dark"] .related-debate-card:hover {
  background: #141d30;
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .related-debate-card__title {
  color: #f8fafc;
}

html[data-theme="dark"] .related-debate-card:hover .related-debate-card__title {
  color: #c4b5fd;
}

html[data-theme="dark"] .related-debate-card__author-name {
  color: #cbd5e1;
}

html[data-theme="dark"] .related-debate-card__footer {
  border-top-color: #1e293b;
}

html[data-theme="dark"] .related-debate-card__stat {
  background: #172136;
  border-color: #25334d;
  color: #cbd5e1;
}

html[data-theme="dark"] .related-debate-card__cta {
  color: #c4b5fd;
}

/* Botón compartir en modo oscuro */
html[data-theme="dark"] .btn--share-whatsapp {
  background: #0f1626;
  border-color: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .btn--share-whatsapp:hover {
  background: #064e3b;
  border-color: #059669;
  color: #6ee7b7;
}

/* Drawer móvil en modo oscuro */
html[data-theme="dark"] .mobile-drawer__panel {
  background: #0f1626;
  color: #f1f5f9;
}

html[data-theme="dark"] .mobile-drawer__header {
  background: #170d30;
}

html[data-theme="dark"] .mobile-drawer__user-box {
  background: #141c2e;
  border-color: #1e293b;
}

html[data-theme="dark"] .mobile-drawer__user-name {
  color: #f1f5f9;
}

html[data-theme="dark"] .mobile-drawer__user-handle {
  color: #94a3b8;
}

html[data-theme="dark"] .mobile-drawer__notify-pill {
  background: #182238;
  border-color: #25334d;
  color: #e2e8f0;
}

html[data-theme="dark"] .mobile-drawer__link {
  color: #cbd5e1;
}

html[data-theme="dark"] .mobile-drawer__link:hover {
  background: #172136;
  color: #fde047;
}

html[data-theme="dark"] .mobile-drawer__section-title {
  color: #64748b;
}

html[data-theme="dark"] .mobile-drawer__section-title::after {
  background: #1e293b;
}

html[data-theme="dark"] .mobile-drawer__logout-btn {
  background: #172136;
  border-color: #1e293b;
  color: #f87171;
}

/* Pie de página en modo oscuro */
html[data-theme="dark"] .site-footer {
  background: #080b12;
  border-top-color: #1e293b;
  color: #94a3b8;
}

html[data-theme="dark"] .site-footer a {
  color: #cbd5e1;
}

html[data-theme="dark"] .site-footer a:hover {
  color: #fde047;
}

/* Paginación en modo oscuro */
html[data-theme="dark"] .pagination a,
html[data-theme="dark"] .pagination span {
  background: #121929;
  border-color: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .pagination .active span,
html[data-theme="dark"] .pagination a:hover {
  background: #654EA3;
  border-color: #654EA3;
  color: #ffffff;
}

/* Insignias y etiquetas en modo oscuro */
html[data-theme="dark"] .badge--neutral {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

html[data-theme="dark"] .btn--secondary {
  background: #182238;
  border-color: #25334d;
  color: #f1f5f9;
}

html[data-theme="dark"] .btn--secondary:hover {
  background: #1e293b;
  border-color: #334155;
}

html[data-theme="dark"] .btn--outline {
  border-color: #334155;
  color: #cbd5e1;
}

html[data-theme="dark"] .btn--outline:hover {
  background: #182238;
  color: #ffffff;
}

/* Redes / Social Cards embebidas en modo oscuro */
html[data-theme="dark"] .bb-social-card {
  background: #141d30;
  border-color: #25334d;
  color: #f1f5f9;
}

html[data-theme="dark"] .bb-social-card:hover {
  border-color: #a78bfa;
}

html[data-theme="dark"] .bb-social-card__url {
  color: #94a3b8;
}

/* ==========================================================================
   Modo Oscuro: Blindaje completo de tarjetas, secciones, widgets y divs
   ========================================================================== */

/* Portada y Secciones de Categorías */
html[data-theme="dark"] .section-card,
html.theme-dark .section-card,
html[data-theme="dark"] .section-card__body,
html.theme-dark .section-card__body,
html[data-theme="dark"] .forum-row,
html.theme-dark .forum-row {
  background: #121929 !important;
  border-color: #1e293b !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .section-card__header,
html.theme-dark .section-card__header {
  background: #182238 !important;
  border-block-end-color: #1e293b !important;
}

html[data-theme="dark"] .section-card--primary,
html.theme-dark .section-card--primary {
  border-color: #334155 !important;
}

html[data-theme="dark"] .section-card--primary .section-card__header,
html.theme-dark .section-card--primary .section-card__header {
  border-inline-start-color: #a78bfa !important;
}

html[data-theme="dark"] .section-card__title,
html.theme-dark .section-card__title,
html[data-theme="dark"] .section-card__title a,
html.theme-dark .section-card__title a,
html[data-theme="dark"] .forum-row__title,
html.theme-dark .forum-row__title {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .forum-row:hover,
html.theme-dark .forum-row:hover {
  background: #182238 !important;
}

html[data-theme="dark"] .forum-row__desc,
html.theme-dark .forum-row__desc {
  color: #94a3b8 !important;
}

/* Accesos directos / Botones de Clasificaciones en Sidebar */
html[data-theme="dark"] .sidebar-standings-btn,
html.theme-dark .sidebar-standings-btn {
  background: #121929 !important;
  border-color: #1e293b !important;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .sidebar-standings-btn:hover,
html.theme-dark .sidebar-standings-btn:hover {
  background: #182238 !important;
  border-color: #a78bfa !important;
}

html[data-theme="dark"] .sidebar-standings-btn__title,
html.theme-dark .sidebar-standings-btn__title {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .sidebar-standings-btn__sub,
html.theme-dark .sidebar-standings-btn__sub {
  color: #94a3b8 !important;
}

/* Icono oficial de la UEFA Champions League en blanco puro durante Modo Oscuro */
html[data-theme="dark"] img[src*="champions-league.svg"],
html.theme-dark img[src*="champions-league.svg"],
html[data-theme="dark"] .sidebar-standings-btn__icon[src*="champions"],
html.theme-dark .sidebar-standings-btn__icon[src*="champions"],
html[data-theme="dark"] .standings-nav__icon--champions,
html.theme-dark .standings-nav__icon--champions,
html[data-theme="dark"] .thread-competition-logo--champions,
html.theme-dark .thread-competition-logo--champions {
  filter: brightness(0) invert(1) !important;
  opacity: 0.95;
}

/* Widget Próximo Partido (Sidebar y Hero) */
html[data-theme="dark"] .next-match-widget,
html.theme-dark .next-match-widget,
html[data-theme="dark"] .next-match-widget__body,
html.theme-dark .next-match-widget__body {
  background: #121929 !important;
  border-color: #1e293b !important;
}

html[data-theme="dark"] .next-match-team__shield-wrapper,
html.theme-dark .next-match-team__shield-wrapper,
html[data-theme="dark"] .next-match-info-list,
html.theme-dark .next-match-info-list {
  background: #182238 !important;
  border-color: #1e293b !important;
}

html[data-theme="dark"] .next-match-team--madrid .next-match-team__shield-wrapper,
html.theme-dark .next-match-team--madrid .next-match-team__shield-wrapper {
  background: #1f2b45 !important;
  border-color: #3b2a68 !important;
}

html[data-theme="dark"] .next-match-team__name,
html.theme-dark .next-match-team__name {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .next-match-team__role,
html.theme-dark .next-match-team__role,
html[data-theme="dark"] .next-match-time,
html.theme-dark .next-match-time,
html[data-theme="dark"] .next-match-info-item,
html.theme-dark .next-match-info-item {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .next-match-finished-panel,
html.theme-dark .next-match-finished-panel,
html[data-theme="dark"] .next-match-countdown-panel,
html.theme-dark .next-match-countdown-panel {
  background: #182238 !important;
  border-color: #1e293b !important;
}

/* Panel de Tendencias */
html[data-theme="dark"] .box--trending,
html.theme-dark .box--trending,
html[data-theme="dark"] .trending-sidebar-list,
html.theme-dark .trending-sidebar-list {
  background: #121929 !important;
  border-color: #1e293b !important;
}

html[data-theme="dark"] .trending-sidebar-item,
html.theme-dark .trending-sidebar-item {
  border-block-end-color: #1e293b !important;
}

html[data-theme="dark"] .trending-sidebar-item:hover,
html.theme-dark .trending-sidebar-item:hover {
  background: #182238 !important;
}

html[data-theme="dark"] .trending-panel-footer,
html.theme-dark .trending-panel-footer {
  background: #182238 !important;
  border-top-color: #1e293b !important;
}

html[data-theme="dark"] .btn-trending-view-all,
html.theme-dark .btn-trending-view-all {
  background: #121929 !important;
  border-color: #1e293b !important;
  color: #c4b5fd !important;
}

html[data-theme="dark"] .btn-trending-view-all:hover,
html.theme-dark .btn-trending-view-all:hover {
  background: #1e293b !important;
  color: #ffffff !important;
}

/* Banner de Premio y Porra */
html[data-theme="dark"] .porra-prize-banner,
html.theme-dark .porra-prize-banner {
  background: linear-gradient(135deg, #182238 0%, #121929 100%) !important;
  border-color: #febe10 !important;
}

/* Ficha de Partido y H2H (.match-card) */
html[data-theme="dark"] .match-card__meta-bar,
html.theme-dark .match-card__meta-bar,
html[data-theme="dark"] .match-card__h2h-table-wrapper,
html.theme-dark .match-card__h2h-table-wrapper {
  background: #121929 !important;
  border-color: #1e293b !important;
}

html[data-theme="dark"] .match-card__meta-col,
html.theme-dark .match-card__meta-col {
  border-color: #1e293b !important;
}

html[data-theme="dark"] .match-card__meta-val,
html.theme-dark .match-card__meta-val {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .match-card__h2h-table th,
html.theme-dark .match-card__h2h-table th {
  background: #182238 !important;
  color: #94a3b8 !important;
  border-color: #1e293b !important;
}

html[data-theme="dark"] .match-card__h2h-table td,
html.theme-dark .match-card__h2h-table td {
  border-color: #1e293b !important;
  color: #f1f5f9 !important;
}

/* Editor BBCode, Encuestas y Táctica */
html[data-theme="dark"] .bb-editor,
html.theme-dark .bb-editor,
html[data-theme="dark"] .bb-editor__header,
html.theme-dark .bb-editor__header,
html[data-theme="dark"] .bb-editor__footer,
html.theme-dark .bb-editor__footer,
html[data-theme="dark"] .bb-editor__textarea,
html.theme-dark .bb-editor__textarea,
html[data-theme="dark"] .bb-editor__palette,
html.theme-dark .bb-editor__palette,
html[data-theme="dark"] .bb-editor__emoji-popover,
html.theme-dark .bb-editor__emoji-popover,
html[data-theme="dark"] .bb-editor__select,
html.theme-dark .bb-editor__select,
html[data-theme="dark"] .bb-editor__video-preview-box,
html.theme-dark .bb-editor__video-preview-box,
html[data-theme="dark"] .bb-spoiler__body,
html.theme-dark .bb-spoiler__body {
  background: #121929 !important;
  border-color: #1e293b !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .poll-card,
html.theme-dark .poll-card,
html[data-theme="dark"] .thread-create-poll-box,
html.theme-dark .thread-create-poll-box {
  background: #121929 !important;
  border-color: #1e293b !important;
}

html[data-theme="dark"] .mini-pitch-card,
html.theme-dark .mini-pitch-card,
html[data-theme="dark"] .player-card__honour-pill,
html.theme-dark .player-card__honour-pill {
  background: #121929 !important;
  border-color: #1e293b !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .standings-nav,
html.theme-dark .standings-nav,
html[data-theme="dark"] .standings-status-bar,
html.theme-dark .standings-status-bar,
html[data-theme="dark"] .standings-table-card,
html.theme-dark .standings-table-card,
html[data-theme="dark"] .standings-leaders-card,
html.theme-dark .standings-leaders-card {
  background: #121929 !important;
  border-color: #1e293b !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .tactical-toolbar,
html.theme-dark .tactical-toolbar,
html[data-theme="dark"] .tactical-bench-panel,
html.theme-dark .tactical-bench-panel,
html[data-theme="dark"] .tactical-bench-card,
html.theme-dark .tactical-bench-card,
html[data-theme="dark"] .tactical-board-display,
html.theme-dark .tactical-board-display,
html[data-theme="dark"] .tactical-board-display__roster,
html.theme-dark .tactical-board-display__roster {
  background: #121929 !important;
  border-color: #1e293b !important;
}

/* Regla estricta contra fondos blancos en modo oscuro para cualquier div o caja */
html[data-theme="dark"] div[style*="background: #ffffff"],
html[data-theme="dark"] div[style*="background:#ffffff"],
html[data-theme="dark"] div[style*="background: white"],
html[data-theme="dark"] div[style*="background:white"],
html[data-theme="dark"] div[style*="background-color: #ffffff"],
html[data-theme="dark"] div[style*="background-color:#ffffff"],
html[data-theme="dark"] div[style*="background-color: white"],
html[data-theme="dark"] div[style*="background-color:white"],
html[data-theme="dark"] section[style*="background: #ffffff"],
html[data-theme="dark"] section[style*="background:#ffffff"],
html[data-theme="dark"] section[style*="background: white"],
html[data-theme="dark"] section[style*="background:white"],
html[data-theme="dark"] a[style*="background: #ffffff"],
html[data-theme="dark"] a[style*="background:#ffffff"],
html[data-theme="dark"] a[style*="background: white"],
html[data-theme="dark"] a[style*="background:white"],
html.theme-dark div[style*="background: #ffffff"],
html.theme-dark div[style*="background:#ffffff"],
html.theme-dark div[style*="background: white"],
html.theme-dark div[style*="background:white"],
html.theme-dark div[style*="background-color: #ffffff"],
html.theme-dark div[style*="background-color:#ffffff"],
html.theme-dark div[style*="background-color: white"],
html.theme-dark div[style*="background-color:white"],
html.theme-dark section[style*="background: #ffffff"],
html.theme-dark section[style*="background:#ffffff"],
html.theme-dark section[style*="background: white"],
html.theme-dark section[style*="background:white"],
html.theme-dark a[style*="background: #ffffff"],
html.theme-dark a[style*="background:#ffffff"],
html.theme-dark a[style*="background: white"],
html.theme-dark a[style*="background:white"] {
  background: #121929 !important;
  color: #f1f5f9 !important;
  border-color: #1e293b !important;
}

/* Botones de interacción dentro de un tema en Modo Oscuro (Me gusta, Citar, Editar, etc.) */
html[data-theme="dark"] .post__action,
html.theme-dark .post__action {
  background: #182238 !important;
  border-color: #25334d !important;
  color: #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .post__action:hover:not(:disabled),
html.theme-dark .post__action:hover:not(:disabled) {
  background: #22304e !important;
  border-color: #a78bfa !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .post__action:active:not(:disabled),
html.theme-dark .post__action:active:not(:disabled) {
  background: #2a3b60 !important;
}

html[data-theme="dark"] .post__action--liked,
html.theme-dark .post__action--liked {
  background: rgba(225, 29, 72, 0.15) !important;
  border-color: rgba(225, 29, 72, 0.4) !important;
  color: #fb7185 !important;
}

html[data-theme="dark"] .post__action--danger,
html.theme-dark .post__action--danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
}

html[data-theme="dark"] .post__action .badge--neutral,
html.theme-dark .post__action .badge--neutral {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

/* Insignias y rangos madridistas en Modo Oscuro */
html[data-theme="dark"] .rank-badge,
html.theme-dark .rank-badge {
  background: #182238 !important;
  border-color: #25334d !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .rank-badge__name,
html.theme-dark .rank-badge__name {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .tag--staff,
html.theme-dark .tag--staff {
  background: #251648 !important;
  border-color: #4c3288 !important;
  color: #c4b5fd !important;
}

/* Barra de "Me gusta" y nombres de usuarios en Modo Oscuro */
html[data-theme="dark"] .post__likes-bar,
html.theme-dark .post__likes-bar {
  color: #94a3b8 !important;
  border-block-start: 1px dashed rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .post__likes-bar strong,
html.theme-dark .post__likes-bar strong,
html[data-theme="dark"] .post-liker-name,
html.theme-dark .post-liker-name,
html[data-theme="dark"] .post-liker-count,
html.theme-dark .post-liker-count {
  color: #f1f5f9 !important;
  font-weight: 700 !important;
}

/* Separador de temas en categorías (Mobile y Desktop) con baja opacidad (8-10%) en Modo Oscuro */
html[data-theme="dark"] .forum-table tbody tr,
html.theme-dark .forum-table tbody tr,
html[data-theme="dark"] .thread-row,
html.theme-dark .thread-row,
html[data-theme="dark"] .forum-table td,
html.theme-dark .forum-table td,
html[data-theme="dark"] .forum-table tbody th[scope="row"],
html.theme-dark .forum-table tbody th[scope="row"] {
  border-block-end: 1px solid rgba(255, 255, 255, 0.08) !important;
}











/* Evitar CUALQUIER div con fondo blanco en la barra lateral o botones en modo oscuro */
html[data-theme="dark"] .btn-trending-view-all,
html.theme-dark .btn-trending-view-all {
  background: #182238 !important;
  color: #c4b5fd !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .btn-trending-view-all:hover,
html.theme-dark .btn-trending-view-all:hover {
  background: #1e293b !important;
  color: #ffffff !important;
  border-color: #a78bfa !important;
}
html[data-theme="dark"] .trending-sidebar-list,
html.theme-dark .trending-sidebar-list,
html[data-theme="dark"] .trending-panel-footer,
html.theme-dark .trending-panel-footer {
  background: #121929 !important;
  border-color: #1e293b !important;
}
html[data-theme="dark"] .trending-sidebar-item {
  border-block-end-color: #1e293b !important;
}

/* ==========================================================================
   Modo Partido en Vivo (Matchday Live Feed)
   ========================================================================== */
.match-live-feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  margin-block-end: 1rem;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all var(--t-fast, 0.15s ease);
}

.match-live-feed-toolbar--active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.04);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.match-live-feed-toolbar__info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.match-live-feed-toolbar--active .live-pulse-dot {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: liveDotPulse 1.8s infinite;
}

@keyframes liveDotPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.match-live-feed-toolbar__title {
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--color-text, #0f172a);
}

.match-live-feed-toolbar__chip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--color-surface-alt, #f1f5f9);
  color: var(--color-text-muted, #64748b);
  transition: all 0.2s ease;
}

.match-live-feed-toolbar__chip--live {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.live-feed-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.live-feed-switch__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.live-feed-switch__track {
  position: relative;
  width: 38px;
  height: 22px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.live-feed-switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}

.live-feed-switch__input:checked + .live-feed-switch__track {
  background: #22c55e;
}

.live-feed-switch__input:checked + .live-feed-switch__track::after {
  transform: translateX(16px);
}

.live-feed-switch__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text, #0f172a);
}

@keyframes livePostHighlight {
  0% { background-color: rgba(34, 197, 94, 0.18); transform: translateY(-3px); }
  100% { background-color: transparent; transform: translateY(0); }
}

.post--live-new {
  animation: livePostHighlight 2.5s ease-out;
}

/* Modo Oscuro Bernabéu Night para Modo en Vivo */
html[data-theme="dark"] .match-live-feed-toolbar,
html.theme-dark .match-live-feed-toolbar {
  background: #121929 !important;
  border-color: #1e293b !important;
}

html[data-theme="dark"] .match-live-feed-toolbar--active,
html.theme-dark .match-live-feed-toolbar--active {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.08) !important;
}

html[data-theme="dark"] .match-live-feed-toolbar__title,
html.theme-dark .match-live-feed-toolbar__title,
html[data-theme="dark"] .live-feed-switch__label,
html.theme-dark .live-feed-switch__label {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .match-live-feed-toolbar__chip,
html.theme-dark .match-live-feed-toolbar__chip {
  background: #182238 !important;
  color: #94a3b8 !important;
}

html[data-theme="dark"] .match-live-feed-toolbar__chip--live,
html.theme-dark .match-live-feed-toolbar__chip--live {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
}

html[data-theme="dark"] .live-feed-switch__track,
html.theme-dark .live-feed-switch__track {
  background: #334155;
}

/* ==========================================================================
   Página Explicativa Oficial de La Porra y Premios (/porra/como-funciona)
   ========================================================================== */
.porra-info-page {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding-bottom: 3rem;
  box-sizing: border-box;
}

.porra-info-hero {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.5rem 0 0.5rem 0;
  color: var(--color-text, #0f172a);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: none;
  margin-bottom: 0.5rem;
  position: relative;
}

.porra-info-hero::before {
  display: none;
}

.porra-info-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(254, 190, 16, 0.15);
  border: 1px solid rgba(254, 190, 16, 0.5);
  color: #febe10;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.porra-info-hero__badge-star {
  font-size: 0.95rem;
  line-height: 1;
}

.porra-info-hero__title {
  font-size: clamp(1.65rem, 3.8vw, 2.45rem);
  font-weight: 950;
  line-height: 1.15;
  color: #1e1538;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.025em;
}

.porra-info-hero__subtitle {
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  color: #475569;
  line-height: 1.5;
  max-width: 740px;
  margin: 0 0 0.85rem 0;
}

.porra-info-hero__event-chip {
  display: inline-block;
  background: transparent;
  border: none;
  backdrop-filter: none;
  color: #475569;
  font-size: 0.9rem;
  font-style: italic;
  padding: 0;
  border-radius: 0;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.porra-info-hero__event-chip strong {
  color: #1e1538;
  font-weight: 750;
  font-style: italic;
}

/* Caja de Captación de Emails / Lista de Espera */
.porra-notify-lead-box {
  background: linear-gradient(135deg, #150d26 0%, #261647 45%, #4b307d 100%);
  border: 1.5px solid rgba(254, 190, 16, 0.45);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: clamp(1.25rem, 3vw, 1.85rem) clamp(1rem, 3vw, 2rem);
  margin: 0.5rem 0 2rem 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: 0 12px 32px rgba(21, 13, 38, 0.35);
  text-align: center;
  position: relative;
  z-index: 2;
}

.porra-notify-lead-box__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(254, 190, 16, 0.15);
  border: 1px solid rgba(254, 190, 16, 0.4);
  color: #febe10;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.porra-notify-lead-box__title {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 0.4rem 0;
  line-height: 1.25;
}

.porra-notify-lead-box__desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  margin: 0 auto 1.15rem;
  line-height: 1.5;
  max-width: 640px;
}

.porra-notify-lead-box__desc strong {
  color: #fef08a;
}

.porra-notify-lead-form__row {
  display: flex;
  gap: 0.5rem;
  max-width: 520px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.porra-notify-lead-form__input-wrap {
  flex: 1 1 240px;
  position: relative;
  display: flex;
  align-items: center;
}

.porra-notify-lead-form__icon {
  position: absolute;
  left: 0.75rem;
  font-size: 0.9rem;
  color: #94a3b8;
  pointer-events: none;
}

.porra-notify-lead-form__input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.25rem;
  font-size: 0.86rem;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.porra-notify-lead-form__input:focus {
  border-color: #febe10;
  box-shadow: 0 0 0 3px rgba(254, 190, 16, 0.3);
}

.porra-notify-lead-form__btn {
  background: linear-gradient(135deg, #febe10 0%, #f59e0b 100%);
  color: #1e1538 !important;
  font-weight: 850;
  font-size: 0.86rem;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: 0 4px 12px rgba(254, 190, 16, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.porra-notify-lead-form__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(254, 190, 16, 0.55);
}

.porra-notify-lead-box__success,
.porra-notify-lead-form__ajax-msg.is-success {
  background: rgba(34, 197, 94, 0.2);
  border: 1.5px solid #22c55e;
  color: #86efac;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  line-height: 1.4;
  margin-top: 0.5rem;
}

.porra-notify-lead-form__error,
.porra-notify-lead-form__ajax-msg.is-error {
  color: #fca5a5;
  font-size: 0.82rem;
  margin: 0.5rem 0 0 0;
  font-weight: 600;
}

.porra-info-hero__actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn--porra-primary {
  background: linear-gradient(135deg, #febe10 0%, #f59e0b 100%);
  color: #1e1538 !important;
  font-weight: 900;
  font-size: 0.92rem;
  padding: 0.75rem 1.45rem;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(254, 190, 16, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn--porra-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 190, 16, 0.5);
  color: #120924 !important;
}

.btn--porra-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 750;
  font-size: 0.92rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s ease;
}

.btn--porra-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn--porra-outline {
  background: transparent;
  color: var(--color-brand, #654EA3) !important;
  border: 1.5px solid var(--color-brand, #654EA3);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}

.btn--porra-outline:hover {
  background: var(--color-brand, #654EA3);
  color: #ffffff !important;
}

.porra-info-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.88rem;
}

.porra-info-user-pill__check {
  background: #22c55e;
  color: #ffffff;
  font-weight: 900;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
}

/* Secciones Generales */
.porra-section {
  margin-bottom: 2rem;
}

.porra-section__header {
  text-align: center;
  margin-bottom: 1rem;
}

.porra-section__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand, #654EA3);
  margin-bottom: 0.35rem;
}

.porra-section__title {
  margin: 0 0 0.45rem 0;
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 900;
  color: var(--color-text, #0f172a);
  letter-spacing: -0.015em;
}

.porra-section__desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted, #64748b);
  max-width: 650px;
  margin: 0 auto;
}

/* Grid de Premios */
.porra-prizes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.porra-prize-card {
  background: var(--color-surface, #ffffff);
  border-radius: 18px;
  border: 2px solid var(--color-border, #e2e8f0);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.porra-prize-card:hover {
  transform: translateY(-3px);
}

.porra-prize-card--gold {
  border-color: #febe10;
  box-shadow: 0 8px 30px rgba(254, 190, 16, 0.15);
}

.porra-prize-card--silver {
  border-color: #a78bfa;
  box-shadow: 0 8px 30px rgba(101, 78, 163, 0.15);
}

.porra-prize-card__badge {
  padding: 0.65rem 1.15rem;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.porra-prize-card--gold .porra-prize-card__badge {
  background: linear-gradient(135deg, #febe10 0%, #e0a300 100%);
  color: #1e1538;
}

.porra-prize-card--silver .porra-prize-card__badge {
  background: linear-gradient(135deg, #654EA3 0%, #51398f 100%);
  color: #ffffff;
}

.porra-prize-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 1.25rem;
  background: linear-gradient(180deg, rgba(254, 190, 16, 0.06) 0%, transparent 100%);
  min-height: 180px;
}

.porra-prize-card__media--accessories {
  background: linear-gradient(180deg, rgba(101, 78, 163, 0.06) 0%, transparent 100%);
}

.porra-prize-card__media--shirts {
  flex-direction: column;
  padding: 1.5rem 1.25rem 1.25rem;
  background: radial-gradient(circle at center, rgba(254, 190, 16, 0.12) 0%, rgba(254, 190, 16, 0.02) 70%, transparent 100%);
}

.porra-prize-card__media--monthly {
  flex-direction: column;
  padding: 1.25rem;
  background: radial-gradient(circle at center, rgba(101, 78, 163, 0.12) 0%, rgba(101, 78, 163, 0.02) 70%, transparent 100%);
}

@keyframes floatShirt {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.porra-prize-card__shirt-img {
  width: 145px;
  height: 145px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.18));
  animation: floatShirt 4s ease-in-out infinite;
}

.porra-prize-card__shirt-img--duo {
  width: 100%;
  max-width: 330px;
  height: auto;
  max-height: 195px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.16));
}

.porra-shirts-choice-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.porra-shirt-choice-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.porra-shirt-choice-tag--first {
  background: #ffffff;
  color: #1e1538;
  border: 1.5px solid #e2e8f0;
}

.porra-shirt-choice-tag--second {
  background: #0f382c;
  color: #d1fae5;
  border: 1.5px solid #064e3b;
}

.porra-shirt-choice-divider {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-text-muted, #94a3b8);
  text-transform: uppercase;
}

/* Banner Hero Premios Mensuales */
.porra-monthly-hero-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(101, 78, 163, 0.25);
  background: #000000;
}

.porra-monthly-hero-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.porra-monthly-hero-wrap:hover .porra-monthly-hero-img {
  transform: scale(1.02);
}

.porra-monthly-hero-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #fde047;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(254, 190, 16, 0.35);
  letter-spacing: 0.03em;
}

/* Grid Catálogo Mensual (8 productos visuales) */
.porra-monthly-catalog-lead {
  margin: 0.35rem 0 0.75rem 0;
}

.porra-monthly-catalog-lead__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-brand, #654EA3);
}

.porra-monthly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.porra-product-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: var(--color-surface, #ffffff);
  border: 1.5px solid var(--color-border, #e2e8f0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.porra-product-card:hover {
  transform: translateY(-2px);
  border-color: #a78bfa;
  box-shadow: 0 4px 10px rgba(101, 78, 163, 0.12);
}

.porra-product-card__thumb {
  width: 52px;
  height: 50px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 2px;
}

.porra-product-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.porra-product-card__info {
  flex: 1;
  min-width: 0;
}

.porra-product-card__title {
  display: block;
  font-size: 0.82rem;
  font-weight: 850;
  color: var(--color-text, #0f172a);
  line-height: 1.25;
  margin-bottom: 0.15rem;
}

.porra-product-card__desc {
  margin: 0;
  font-size: 0.72rem;
  color: var(--color-text-muted, #64748b);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.porra-accessories-showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.porra-accessory-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.porra-accessory-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.porra-accessory-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-text, #0f172a);
  text-transform: uppercase;
}

.porra-prize-card__content {
  padding: 1.15rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.porra-prize-card__tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-brand, #654EA3);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.porra-prize-card__name {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-text, #0f172a);
  line-height: 1.25;
}

.porra-prize-card__text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-muted, #64748b);
  line-height: 1.55;
}

.porra-prize-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.porra-prize-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--color-text, #0f172a);
}

.porra-feature-icon {
  font-size: 1.15rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.porra-prize-card__features strong {
  display: block;
  font-weight: 800;
  color: var(--color-text, #0f172a);
}

.porra-prize-card__features span {
  color: var(--color-text-muted, #64748b);
  font-size: 0.84rem;
}

/* 3 Pasos */
.porra-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.porra-step-card {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 14px;
  padding: 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.porra-step-card__num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #654EA3 0%, #4b3480 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 0.85rem;
}

.porra-step-card__title {
  margin: 0 0 0.45rem 0;
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--color-text, #0f172a);
}

.porra-step-card__desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text-muted, #64748b);
  line-height: 1.5;
}

/* Sistema de Puntuación */
.porra-points-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.porra-point-card {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.porra-point-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.porra-point-card__icon {
  font-size: 1.75rem;
  line-height: 1;
}

.porra-point-card__badge {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgba(101, 78, 163, 0.12);
  color: var(--color-brand, #654EA3);
}

.porra-point-card--exact .porra-point-card__badge {
  background: rgba(254, 190, 16, 0.2);
  color: #b45309;
}

.porra-point-card--combo .porra-point-card__badge {
  background: linear-gradient(135deg, #febe10 0%, #f59e0b 100%);
  color: #1e1538;
}

.porra-point-card__title {
  margin: 0 0 0.45rem 0;
  font-size: 0.98rem;
  font-weight: 850;
  color: var(--color-text, #0f172a);
}

.porra-point-card__desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--color-text-muted, #64748b);
  line-height: 1.45;
}

/* Caja Gran Estreno */
.porra-launch-box {
  background: linear-gradient(135deg, #1b1233 0%, #0d081a 100%);
  border: 2px solid #febe10;
  border-radius: 18px;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(13, 8, 26, 0.25);
  margin-bottom: 2.75rem;
}

.porra-launch-box__inner {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2rem;
  align-items: center;
}

.porra-launch-box__tag {
  display: inline-block;
  background: rgba(254, 190, 16, 0.18);
  border: 1px solid rgba(254, 190, 16, 0.45);
  color: #febe10;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.porra-launch-box__title {
  margin: 0 0 0.65rem 0;
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.25;
}

.porra-launch-box__desc {
  margin: 0;
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.porra-launch-match-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 0.75rem;
}

.porra-launch-match-card__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
}

.porra-launch-match-card__team img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.porra-launch-match-card__team strong {
  font-size: 0.88rem;
  color: #ffffff;
}

.porra-launch-match-card__vs {
  font-size: 1.1rem;
  font-weight: 950;
  color: #febe10;
}

.porra-launch-match-meta {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: #cbd5e1;
  font-weight: 600;
  flex-wrap: wrap;
}

/* FAQ */
.porra-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 800px;
  margin: 0 auto;
}

.porra-faq-item {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.porra-faq-item[open] {
  border-color: var(--color-brand, #654EA3);
}

.porra-faq-item__q {
  padding: 1rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--color-text, #0f172a);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.porra-faq-item__toggle {
  font-size: 1.25rem;
  color: var(--color-brand, #654EA3);
  font-weight: 700;
  line-height: 1;
}

.porra-faq-item[open] .porra-faq-item__toggle {
  transform: rotate(45deg);
}

.porra-faq-item__a {
  padding: 0 1.25rem 1.15rem;
  font-size: 0.9rem;
  color: var(--color-text-muted, #64748b);
  line-height: 1.6;
}

.porra-faq-item__a p {
  margin: 0;
}

/* CTA Final */
.porra-bottom-cta {
  background: linear-gradient(135deg, #1b1233 0%, #291b4d 100%);
  border-radius: 18px;
  padding: 2.25rem 1.5rem;
  text-align: center;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 30px rgba(27, 18, 51, 0.3);
}

.porra-bottom-cta__title {
  margin: 0 0 0.5rem 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 900;
  color: #ffffff;
}

.porra-bottom-cta__desc {
  margin: 0 0 1.5rem 0;
  font-size: 0.95rem;
  color: #cbd5e1;
  max-width: 600px;
  line-height: 1.5;
}

.porra-bottom-cta__buttons {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Adaptación responsive */
@media (max-width: 840px) {
  .porra-prizes-grid {
    grid-template-columns: 1fr;
  }

  .porra-points-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .porra-launch-box__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .porra-info-page {
    padding-bottom: 1.5rem;
  }

  .porra-info-hero {
    padding: 0.15rem 0 0.25rem 0;
    margin-bottom: 0.25rem;
  }

  .porra-info-hero__title {
    font-size: 1.25rem;
    line-height: 1.2;
    margin-bottom: 0.2rem;
  }

  .porra-info-hero__subtitle {
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    color: #64748b;
  }

  .porra-info-hero__event-chip {
    font-size: 0.74rem;
    line-height: 1.3;
    margin-bottom: 0.45rem;
  }

  .porra-notify-lead-box {
    padding: 0.65rem 0.75rem;
    margin: 0 0 0.75rem 0;
    border-radius: 12px;
  }

  .porra-notify-lead-box__title {
    font-size: 0.95rem;
    line-height: 1.25;
    margin-bottom: 0.2rem;
  }

  .porra-notify-lead-box__desc {
    font-size: 0.74rem;
    line-height: 1.35;
    margin-bottom: 0.45rem;
  }

  .porra-notify-lead-form__row {
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
    max-width: 100%;
  }

  .porra-notify-lead-form__input-wrap {
    width: 100%;
    flex: 1 1 100%;
  }

  .porra-notify-lead-form__input {
    padding: 0.45rem 0.75rem 0.45rem 2rem;
    font-size: 0.82rem;
  }

  .porra-notify-lead-form__icon {
    left: 0.65rem;
    font-size: 0.82rem;
  }

  .porra-notify-lead-form__btn {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0.48rem 1rem;
    font-size: 0.82rem;
  }

  .porra-section {
    margin-bottom: 1.5rem;
  }

  .porra-section__header {
    margin-bottom: 0.5rem;
  }

  .porra-section__title {
    font-size: 1.15rem;
  }

  .porra-steps-grid {
    grid-template-columns: 1fr;
  }

  .porra-points-grid {
    grid-template-columns: 1fr;
  }

  .porra-monthly-grid {
    grid-template-columns: 1fr;
  }
}

/* Modo Oscuro Bernabéu Night */
html[data-theme="dark"] .porra-prize-card,
html.theme-dark .porra-prize-card,
html[data-theme="dark"] .porra-step-card,
html.theme-dark .porra-step-card,
html[data-theme="dark"] .porra-point-card,
html.theme-dark .porra-point-card,
html[data-theme="dark"] .porra-faq-item,
html.theme-dark .porra-faq-item {
  background: #121929 !important;
  border-color: #1e293b !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .porra-prize-card--gold,
html.theme-dark .porra-prize-card--gold {
  border-color: #febe10 !important;
}

html[data-theme="dark"] .porra-prize-card--silver,
html.theme-dark .porra-prize-card--silver {
  border-color: #a78bfa !important;
}

html[data-theme="dark"] .porra-prize-card__name,
html.theme-dark .porra-prize-card__name,
html[data-theme="dark"] .porra-step-card__title,
html.theme-dark .porra-step-card__title,
html[data-theme="dark"] .porra-point-card__title,
html.theme-dark .porra-point-card__title,
html[data-theme="dark"] .porra-faq-item__q,
html.theme-dark .porra-faq-item__q,
html[data-theme="dark"] .porra-section__title,
html.theme-dark .porra-section__title,
html[data-theme="dark"] .porra-prize-card__features li,
html.theme-dark .porra-prize-card__features li,
html[data-theme="dark"] .porra-prize-card__features strong,
html.theme-dark .porra-prize-card__features strong,
html[data-theme="dark"] .porra-accessory-label,
html.theme-dark .porra-accessory-label {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .porra-accessory-item,
html.theme-dark .porra-accessory-item {
  background: #182238 !important;
  border-color: #1e293b !important;
}

html[data-theme="dark"] .porra-prize-card__text,
html.theme-dark .porra-prize-card__text,
html[data-theme="dark"] .porra-step-card__desc,
html.theme-dark .porra-step-card__desc,
html[data-theme="dark"] .porra-point-card__desc,
html.theme-dark .porra-point-card__desc,
html[data-theme="dark"] .porra-faq-item__a,
html.theme-dark .porra-faq-item__a,
html[data-theme="dark"] .porra-section__desc,
html.theme-dark .porra-section__desc,
html[data-theme="dark"] .porra-prize-card__features span,
html.theme-dark .porra-prize-card__features span {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .btn--porra-outline,
html.theme-dark .btn--porra-outline {
  border-color: #a78bfa !important;
  color: #c4b5fd !important;
}

html[data-theme="dark"] .btn--porra-outline:hover,
html.theme-dark .btn--porra-outline:hover {
  background: #a78bfa !important;
  color: #0f172a !important;
}

html[data-theme="dark"] .porra-product-card,
html.theme-dark .porra-product-card {
  background: #182238 !important;
  border-color: #1e293b !important;
}

html[data-theme="dark"] .porra-product-card__thumb,
html.theme-dark .porra-product-card__thumb {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

html[data-theme="dark"] .porra-product-card__title,
html.theme-dark .porra-product-card__title {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .porra-product-card__desc,
html.theme-dark .porra-product-card__desc {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .porra-shirt-choice-tag--first,
html.theme-dark .porra-shirt-choice-tag--first {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}


/* ==========================================================================
   Prefijos de Tema (Flairs) y Etiquetas (#Tags)
   ========================================================================== */
.thread-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
}

.thread-prefix--oficial {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde047;
}

.thread-prefix--rumor {
    background: #ffedd5;
    color: #c2410c;
    border-color: #fed7aa;
}

.thread-prefix--analisis {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.thread-prefix--debate {
    background: #f5edfa;
    color: #702283;
    border-color: #d8b4e2;
}

.thread-prefix--opinion {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.thread-prefix--noticia {
    background: #d1fae5;
    color: #047857;
    border-color: #a7f3d0;
}

/* Modo oscuro para prefijos */
html[data-theme="dark"] .thread-prefix--oficial, html.theme-dark .thread-prefix--oficial {
    background: rgba(254, 240, 138, 0.15) !important;
    color: #fef08a !important;
    border-color: rgba(254, 240, 138, 0.3) !important;
}
html[data-theme="dark"] .thread-prefix--rumor, html.theme-dark .thread-prefix--rumor {
    background: rgba(254, 215, 170, 0.15) !important;
    color: #fdba74 !important;
    border-color: rgba(254, 215, 170, 0.3) !important;
}
html[data-theme="dark"] .thread-prefix--analisis, html.theme-dark .thread-prefix--analisis {
    background: rgba(191, 219, 254, 0.15) !important;
    color: #93c5fd !important;
    border-color: rgba(191, 219, 254, 0.3) !important;
}
html[data-theme="dark"] .thread-prefix--debate, html.theme-dark .thread-prefix--debate {
    background: rgba(216, 180, 226, 0.15) !important;
    color: #e9d5ff !important;
    border-color: rgba(216, 180, 226, 0.3) !important;
}
html[data-theme="dark"] .thread-prefix--opinion, html.theme-dark .thread-prefix--opinion {
    background: rgba(203, 213, 225, 0.15) !important;
    color: #cbd5e1 !important;
    border-color: rgba(203, 213, 225, 0.3) !important;
}
html[data-theme="dark"] .thread-prefix--noticia, html.theme-dark .thread-prefix--noticia {
    background: rgba(167, 243, 208, 0.15) !important;
    color: #6ee7b7 !important;
    border-color: rgba(167, 243, 208, 0.3) !important;
}

/* Píldoras de Etiquetas (#tags) */
.thread-tags-list {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-left: 0.35rem;
}

.thread-tag-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(203, 213, 225, 0.6);
    padding: 0.12rem 0.45rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.thread-tag-pill:hover {
    color: #1e1538;
    background: #e2e8f0;
    border-color: #94a3b8;
    text-decoration: none;
}

.thread-tag-pill--active {
    color: #ffffff !important;
    background: #654ea3 !important;
    border-color: #654ea3 !important;
}

html[data-theme="dark"] .thread-tag-pill, html.theme-dark .thread-tag-pill {
    color: #94a3b8 !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .thread-tag-pill:hover, html.theme-dark .thread-tag-pill:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Selector interactivo al crear tema */
.prefix-pill-option {
    cursor: pointer;
    user-select: none;
}

.prefix-pill {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    transition: all 0.15s ease;
}

.prefix-pill-option input[type="radio"]:checked + .prefix-pill {
    outline: 2px solid #702283;
    outline-offset: 1px;
    box-shadow: 0 2px 6px rgba(112, 34, 131, 0.2);
}

.prefix-pill-option input[type="radio"]:checked + .prefix-pill--none {
    background: #1e1538;
    color: #ffffff;
    border-color: #1e1538;
    outline: none;
}

.btn-quick-tag {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-quick-tag:hover {
    border-color: #702283;
    color: #702283;
    background: #f5edfa;
}

/* ==========================================================================
   Reproductor de Vídeos de Publicaciones (Primer Frame + Botón Play Central)
   ========================================================================== */
.post-video-container {
  display: block;
}

.post-video-container--vertical {
  margin-right: auto;
}

.post-video-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-video-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  margin: 0 auto;
  background: #000000;
  cursor: pointer;
}

.post-video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 4;
  padding: 0;
  outline: none;
}

.post-video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(112, 34, 131, 0.92);
  border-color: #FEBE10;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(112, 34, 131, 0.5);
}

.post-video-play-btn:active {
  transform: translate(-50%, -50%) scale(0.96);
}

.post-video-play-btn:focus-visible {
  outline: 3px solid #FEBE10;
  outline-offset: 3px;
}

.post-video-play-btn.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.75);
  visibility: hidden;
}
