/* ── VARIABLES ───────────────────────────────────────────────────────────── */
:root {
  --green: #52B043;
  --green-dark: #3a8a2e;
  --green-light: #e8f5e4;
  --green-mid: #c6e8be;
  --black: #1d1d1f;
  --gray-dark: #3a3a3c;
  --gray: #6e6e73;
  --gray-light: #86868b;
  --border: #d2d2d7;
  --border-light: #e8e8ed;
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-2: #f0f0f0;
  --white: #ffffff;
  /* La escala de las bandas: smooth, playable y struggles. Los tres tienen que leerse
     como una sola escala, con el mismo peso visual, y pasar 4.5:1 sobre blanco porque
     van en texto de 11px. Contraste: success 5.30, warning 5.70, danger 6.83.
     success es un verde apagado a propósito, no --green ni --green-dark (enlaces,
     Universal, valores In-Game). warning es el ámbar de la antigua letra B (#b07800)
     oscurecido sin cambiar el tono: aquel daba 3.80:1. danger es el de la letra C. */
  --success: #2d7a3e;
  --warning: #8a5e00;
  --danger: #b02020;
}

/* ── RESET & BASE ─────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--black);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400; line-height: 1.5;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}

/* ── NAV ──────────────────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 24px; height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(245,245,247,0.9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-family: 'Instrument Serif', serif; font-size: 18px; letter-spacing: -0.02em; color: var(--black); text-decoration: none; }
.nav-right { display: flex; gap: 20px; align-items: center; }
.nav-link { color: var(--gray); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.nav-link:hover { color: var(--black); }
@media(max-width:500px){ .nav-link.hide-sm { display:none; } }
.nav-cta { background: var(--green); color: white !important; padding: 7px 18px; border-radius: 20px; font-size: 13px; font-weight: 500; text-decoration: none; transition: background 0.2s; }
.nav-cta:hover { background: var(--green-dark); }

/* ── BREADCRUMB ───────────────────────────────────────────────────────────── */
.breadcrumb-hero {
  position: relative; z-index: 2;
  padding: 28px clamp(24px, 8vw, 80px) 0;
  max-width: 1100px; margin: 0 auto;
}
.breadcrumb-hero .breadcrumb-inner {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,0.55); flex-wrap: wrap;
}
.breadcrumb-hero .breadcrumb-inner a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
.breadcrumb-hero .breadcrumb-inner a:hover { color: rgba(255,255,255,0.9); }
.breadcrumb-hero .breadcrumb-inner .sep { color: rgba(255,255,255,0.25); }

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--green); color: white;
  padding: 13px 26px; border-radius: 980px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  transition: all 0.2s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: var(--green-dark); transform: scale(1.02); }
.btn-primary svg { width: 17px; height: 17px; }
.btn-secondary {
  background: var(--bg-card-2); color: var(--black);
  padding: 11px 22px; border-radius: 980px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: all 0.2s; border: 1px solid var(--border);
  font-family: inherit; cursor: pointer; /* tambien se usa en <button> */
}
.btn-secondary:hover { border-color: var(--green); color: var(--green-dark); }
.btn-ghost { color: rgba(255,255,255,0.5); font-size: 14px; text-decoration: none; transition: color 0.2s; white-space: nowrap; }
.btn-ghost:hover { color: rgba(255,255,255,0.85); }
.btn-white { color: rgba(255,255,255,0.9); font-size: 14px; text-decoration: none; transition: color 0.2s; white-space: nowrap; }
.btn-white:hover { color: rgba(255,255,255,0.5); }
.btn-black { color: var(--black); font-size: 14px; text-decoration: none;opacity: 1; transition: color 0.2s; white-space: nowrap; }
.btn-black:hover { color: var(--black);opacity: 0.5;  }
.link-secondary {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.link-secondary:hover {
  color: var(--black);
}

/* ── BADGES & CHIPS ───────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }

.meta-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 980px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  font-size: 12px; color: rgba(255,255,255,0.8);
}
.meta-chip svg { width: 13px; height: 13px; opacity: 0.7; }

.meta-chip-dark {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 980px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  font-size: 12px; color: rgba(255,255,255,0.75);
}

.platform-badge { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }
.platform-steam   { background: #1b2838; color: #c6d4df; }
.platform-xbox    { background: #107c10; color: #fff; }
.platform-gamepass { background: #107c10; color: #fff; }
.platform-ea      { background: #ff4747; color: #fff; }
.platform-epic    { background: #2d2d2d; color: #fff; }
.platform-gog     { background: #4a1a7a; color: #fff; }
.platform-ubisoft { background: #0070ff; color: #fff; }
.platform-itch    { background: #fa5c5c; color: #fff; }
.platform-amazon  { background: #ff9900; color: #111; }
.platform-battlenet { background: #148eff; color: #fff; }

/* Neutro: lleva la banda y el 1% low sobre el fondo oscuro del hero, donde --warning
   y --danger no se leen. Un verde fijo aquí diría "bien" también de un Struggles. */
.rating-chip {
  padding: 5px 13px; border-radius: 980px;
  font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #ffffff;
}

/* Profile tier + intent badges */
.badge-tier, .badge-intent {
  font-size: 11px; font-weight: 500; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 6px;
}
.badge-tier.universal { background: var(--green-light); color: var(--green-dark); }
.badge-tier.extended  { background: #ede9fe; color: #5b21b6; }
/* Modelo fuera del catalogo. Neutro a proposito: no es un error ni un tier, es
   una ausencia. Sin tab propio: uno casi siempre vacio invita a hacer clic a la
   nada, y lo que habia que arreglar era la etiqueta falsa, no la navegacion. */
.badge-tier.unclassified { background: var(--bg-card-2); color: var(--gray-light); }
.badge-intent { background: var(--bg-card-2); color: var(--gray); }

/* Badges secundarios de la card: powergpu, power_target y lossless. Contorno sin
   relleno, un escalon por debajo de tier e intent, que van en solido tintado.
   Fila propia para no aplanar esa jerarquia. */
.profile-meta-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -6px; }
.badge-meta {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 400; letter-spacing: 0.01em;
  padding: 3px 9px 3px 7px; border-radius: 6px;
  border: 1px solid var(--border-light); background: transparent; color: var(--gray);
}
/* El icono hereda los 16px de .sp-icon; aqui solo se atenua. */
.badge-meta .sp-icon { color: var(--gray-light); }
/* Unico con acento propio: determina si el perfil va a funcionar. */
.badge-meta.lossless { border-color: var(--green-mid); background: var(--green-light); color: var(--green-dark); font-weight: 500; }
.other-profile-lossless { margin-top: 5px; }

/* ── ANIMATIONS ───────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
/* El contenido nace VISIBLE y el JS agrega la animacion. Al reves de como estaba.
 *
 * Antes .reveal era opacity:0 y solo el observer lo revelaba, asi que cada card de
 * estas paginas dependia de que un script corriera para existir en pantalla: si
 * fallaba, se bloqueaba o simplemente tardaba, la pagina quedaba en blanco con el
 * contenido presente en el DOM. En unas paginas cuyo punto es que las lea alguien
 * que llega frio desde un buscador, eso es la falla mas cara posible.
 *
 * Ahora lo opcional es la animacion, no la visibilidad. La clase js-anim la pone un
 * script inline en el <head> de las tres vistas que usan .reveal, y solo si el
 * navegador soporta IntersectionObserver — es decir, solo si el mecanismo que
 * revela puede existir. Sin js-anim no hay nada que ocultar y se ve todo.
 *
 * Consecuencia buscada: olvidar el script en una vista nueva degrada a "sin
 * animacion", no a "sin contenido".
 */
.reveal { opacity:1; transform:none; }
.js-anim .reveal { opacity:0; transform:translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js-anim .reveal.visible { opacity:1; transform:translateY(0); }

/* Quien pidio menos movimiento tampoco deberia pagar el riesgo de la animacion. */
@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal, .js-anim .reveal.visible { opacity:1; transform:none; transition:none; }
}
.d1 { transition-delay:0.06s; }
.d2 { transition-delay:0.12s; }
.d3 { transition-delay:0.18s; }

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  background: var(--black);
  padding: 32px clamp(24px, 6vw, 48px);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.footer-logo { font-family: 'Instrument Serif', serif; font-size: 16px; color: rgba(255,255,255,0.4); }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: rgba(255,255,255,0.7); }

/* ── CTA BANNER ───────────────────────────────────────────────────────────── */
.cta-banner {
  margin: 0 clamp(24px, 8vw, 80px) clamp(72px, 10vw, 112px);
  background: var(--black); border-radius: 24px;
  padding: clamp(40px, 6vw, 64px) clamp(32px, 6vw, 64px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 100% 50%, rgba(82,176,67,0.12) 0%, transparent 60%);
}
.cta-banner-text { position: relative; z-index: 1; }
.cta-banner-text p { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); margin-bottom: 10px; }
.cta-banner-text h2 { font-family: 'DM Sans', sans-serif; font-size: clamp(22px, 3.5vw, 36px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: white; }
.cta-banner-text h2 em { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; color: var(--green); }
.cta-banner-actions { position: relative; z-index: 1; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ─────────────────────────────────────────────────────────────────────────── */
/* GAME PAGE (smart-profiles-game.php)                                         */
/* ─────────────────────────────────────────────────────────────────────────── */

.game-hero-wrapper {
  position: relative; overflow: hidden;
  background: var(--black);
  padding-top: 52px;
}
.game-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 20%; background-repeat: no-repeat;
  transform: scale(1.05); filter: blur(2px); opacity: 0; transition: opacity 1s ease;
}
.game-hero-bg.loaded { opacity: 0.35; }
.game-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(29,29,31,0.3) 0%, rgba(29,29,31,0.15) 50%, rgba(245,245,247,0.0) 75%, rgba(245,245,247,1.0) 100%);
}
.game-hero {
  position: relative; z-index: 2;
  padding: clamp(28px, 4vw, 48px) clamp(24px, 8vw, 80px) clamp(64px, 9vw, 104px);
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: flex-end; gap: clamp(24px, 4vw, 40px);
}
.game-cover {
  flex-shrink: 0;
  width: clamp(90px, 12vw, 130px); aspect-ratio: 3 / 4;
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  background: var(--bg-card-2);
  display: flex; align-items: center; justify-content: center;
}
.game-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-cover-placeholder { font-size: 36px; }
.game-hero-meta { flex: 1; padding-bottom: 4px; }
.game-hero-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); margin-bottom: 10px; display: block; }
.game-hero-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.0; color: white;
  margin-bottom: 14px; text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.game-hero-sub { font-size: 15px; font-weight: 300; color: rgba(255,255,255,0.65); margin-bottom: 20px; line-height: 1.6; }
.game-meta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

@media(max-width: 600px) {
  .game-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .game-cover { width: 80px; border-radius: 12px; }
}

/* Profiles section */
.profiles-section {
  padding: clamp(40px, 5vw, 64px) clamp(24px, 8vw, 80px) clamp(72px, 10vw, 112px);
  max-width: 1100px; margin: 0 auto;
}
.profiles-section-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.profiles-section-header h2 { font-family: 'DM Sans', sans-serif; font-size: clamp(20px, 3vw, 28px); font-weight: 700; letter-spacing: -0.025em; }
.profiles-count { font-size: 13px; color: var(--gray-light); font-weight: 300; }

/* Device class tabs */
.device-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.device-tab { padding: 7px 16px; border-radius: 980px; border: 1.5px solid var(--border); background: var(--white); font-size: 13px; font-weight: 400; color: var(--gray); cursor: pointer; transition: all 0.2s; white-space: nowrap; user-select: none; }
.device-tab:hover { border-color: var(--green); color: var(--green-dark); }
.device-tab.active { border-color: var(--green); background: var(--green-light); color: var(--green-dark); font-weight: 500; }
.tier-hint { font-size: 12px; font-weight: 300; color: var(--gray-light); margin-bottom: 20px; margin-top: -16px; }

/* Profiles grid */
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

/* Profile card */
.profile-card {
  background: var(--white); border: 1px solid var(--border-light); border-radius: 16px;
  padding: 24px; display: flex; flex-direction: column; gap: 18px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  text-decoration: none; color: inherit;
}
.profile-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.08); border-color: var(--border); transform: translateY(-2px); }
.profile-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.profile-card-title-group { display: flex; flex-direction: column; gap: 4px; }
.profile-card-name { font-size: 15px; font-weight: 600; color: var(--black); letter-spacing: -0.01em; }
.profile-card-device { font-size: 12px; color: var(--gray-light); font-weight: 300; }
.profile-badges { display: flex; gap: 6px; flex-wrap: wrap; }


/* Profile params grid */
.profile-params { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-param { display: flex; flex-direction: column; gap: 2px; }
.param-label { font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-light); }
.param-value { font-size: 13px; font-weight: 500; color: var(--black); }
.param-value.positive { color: var(--green-dark); }
.param-value.negative { color: var(--gray-light); font-weight: 300; }

/* Profile performance row on card */
.profile-perf { padding-top: 14px; border-top: 1px solid var(--border-light); display: flex; gap: 16px; }
.perf-stat { display: flex; flex-direction: column; gap: 2px; }
.perf-label { font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-light); }
.perf-value { font-size: 16px; font-weight: 700; color: var(--black); letter-spacing: -0.02em; }
.profile-perf-meta { font-size: 11px; color: var(--gray-light); font-weight: 300; margin: -8px 0 0; }
.perf-meta { font-size: 11px; color: var(--gray-light); font-weight: 300; padding: 0 24px 20px; margin: 0; }

/* Banda (la calcula api.bands.php). Es un veredicto sobre el perfil, no una unidad del
   número, así que va en su propia píldora junto al 1% low, que es el número que
   describe. Misma forma que .badge-meta (contorno, radio 6px, letra chica), con el
   borde y el texto en el color de la banda vía currentColor. El número no lleva
   color: con la palabra aparte, pintarlo también repetía lo mismo.
   smooth lleva su propio verde (--success): en el color del texto se confundía con
   los chips neutros de arriba (25W, Any power source) en vez de leerse como el mejor
   de los tres veredictos. Sin banda no hay píldora, y así "smooth" y "sin datos
   suficientes" siguen viéndose distintos. */
.band-pill {
  display: inline-block; vertical-align: middle; margin-left: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.4;
  padding: 1px 8px; border-radius: 6px; border: 1px solid currentColor;
}
/* En el detalle el número mide 28px: la píldora sube un escalón para no perderse. */
.perf-stat-cell .band-pill { font-size: 12px; padding: 2px 10px; margin-left: 6px; }
.band-smooth    { color: var(--success); }
.band-playable  { color: var(--warning); }
.band-struggles { color: var(--danger); }

/* Card footer */
/* margin-top:auto ancla el pie abajo. En un grid con align-items:stretch las cards
   de una misma fila comparten altura, y sin esto el pie de una card sin bloque de
   rendimiento queda flotando a media tarjeta. */
.profile-card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border-light); }
.profile-author { font-size: 12px; color: var(--gray-light); font-weight: 300; }
.profile-cta { font-size: 12px; font-weight: 500; color: var(--green-dark); display: flex; align-items: center; gap: 4px; transition: gap 0.2s; }
.profile-card:hover .profile-cta { gap: 8px; }

/* ─────────────────────────────────────────────────────────────────────────── */
/* PROFILE PAGE (profile.php)                                                  */
/* ─────────────────────────────────────────────────────────────────────────── */

.profile-hero-wrapper {
  position: relative; overflow: hidden;
  background: var(--black); padding-top: 52px;
}
.profile-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 25%; background-repeat: no-repeat;
  transform: scale(1.05); filter: blur(3px); opacity: 0; transition: opacity 1s ease;
}
.profile-hero-bg.loaded { opacity: 0.28; }
.profile-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(29,29,31,0.4) 0%, rgba(29,29,31,0.2) 40%, rgba(245,245,247,0.0) 72%, rgba(245,245,247,1.0) 100%);
}
.profile-hero {
  position: relative; z-index: 2;
  padding: clamp(24px, 3.5vw, 40px) clamp(24px, 8vw, 80px) clamp(56px, 8vw, 88px);
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: flex-end; gap: clamp(20px, 3vw, 36px);
}
.profile-cover {
  flex-shrink: 0;
  width: clamp(72px, 9vw, 100px); aspect-ratio: 3 / 4;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 10px 32px rgba(0,0,0,0.5);
  background: var(--bg-card-2);
  display: flex; align-items: center; justify-content: center;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-hero-meta { flex: 1; padding-bottom: 2px; }
.profile-hero-eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green); margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.profile-hero-eyebrow a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
.profile-hero-eyebrow a:hover { opacity: 0.7; }
.profile-hero-eyebrow .sep { opacity: 0.5; }
.profile-hero-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; color: white;
  margin-bottom: 16px; text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.profile-hero-title em { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; color: rgba(255,255,255,0.6); }
.profile-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 24px; }
.apply-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.apply-hint { font-size: 13px; font-weight: 300; color: rgba(255,255,255,0.45); }
/* Picker de tienda de Apply. En el flujo bajo el boton: el wrapper del hero recorta. */
.store-picker {
  margin-top: 12px; max-width: 320px; padding: 14px;
  background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 14px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.35);
}
.store-picker[hidden] { display: none; }
.store-picker-title { font-size: 13px; font-weight: 500; color: var(--black); margin-bottom: 10px; }
.store-picker-options { display: flex; flex-direction: column; gap: 6px; }
.store-picker-option {
  font: inherit; font-size: 14px; text-align: left; cursor: pointer;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--white); color: var(--black);
  transition: border-color 0.2s, color 0.2s;
}
.store-picker-option:hover { border-color: var(--green); color: var(--green-dark); }
.store-picker-option:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
/* Solo para lectores de pantalla (el aviso de Copy link). */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Copy link sin portapapeles: el enlace a la vista, ya seleccionado. */
.share-fallback { margin-top: 12px; max-width: 420px; display: flex; flex-direction: column; gap: 6px; }
.share-fallback[hidden] { display: none; }
.share-fallback-hint { font-size: 13px; color: rgba(255,255,255,0.7); }
.share-fallback-input {
  font: inherit; font-size: 14px; width: 100%;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--white); color: var(--black);
}

@media(max-width: 600px) {
  .profile-hero { flex-direction: column; align-items: flex-start; gap: 14px; }
  .profile-cover { width: 68px; border-radius: 10px; }
}

/* Iconos inline de Smart Profiles. El SVG no trae width/height: se dimensiona
   aqui, para no tener que pisar atributos inline en cada sitio de uso.
   flex-shrink:0 porque las filas de parametros son flex y el icono no debe
   comprimirse cuando la etiqueta es larga. */
.sp-icon { width: 16px; height: 16px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
/* .content-grid existe solo en la pagina de detalle: ahi el icono va a 20px. */
.content-grid .sp-icon { width: 20px; height: 20px; }

/* Content grid */
.content-grid {
  padding: 0 clamp(24px, 8vw, 80px) clamp(72px, 10vw, 112px);
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 272px;
  gap: 20px; align-items: start;
}
@media(max-width: 768px) { .content-grid { grid-template-columns: 1fr; } }

/* Settings card */
.card { background: var(--white); border: 1px solid var(--border-light); border-radius: 20px; overflow: hidden; }
.card-header { padding: 18px 24px 14px; border-bottom: 1px solid var(--border-light); }
.card-header h3 { font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--gray-light); }
/* Subtitulo de card. Mas grande y en caja normal que el h3 de arriba a proposito:
   el h3 es un rotulo y este es una frase que hay que poder leer. */
.card-sub { margin-top: 5px; font-size: 12.5px; font-weight: 400; line-height: 1.45; color: var(--gray-light); }
.params-list { padding: 4px 0; }
.param-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 24px; border-bottom: 1px solid var(--border-light); }
.param-row:last-child { border-bottom: none; }
.param-key { font-size: 14px; color: var(--gray); }
.param-val { font-size: 14px; font-weight: 600; color: var(--black); }
.param-val.on { color: var(--green-dark); }
.param-val.off { color: var(--gray-light); font-weight: 400; }

/* Rotulo de seccion dentro de params-list. Un punto mas chico que el h3 de
   .card-header para que se lea como subnivel, no como otra tarjeta. */
.param-section-label { padding: 16px 24px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--gray-light); }

/* Fila de parametro con icono y descripcion. El slot va a ancho fijo aunque el
   icono sea NULL: sin el, la fila sin icono desalinea su etiqueta respecto a la
   de arriba. */
.param-row-icon { align-items: flex-start; justify-content: flex-start; gap: 12px; }
.param-icon-slot { width: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--gray); padding-top: 1px; }
.param-icon-body { display: flex; flex-direction: column; gap: 3px; }
.param-icon-label { font-size: 14px; font-weight: 600; color: var(--black); }
.param-icon-desc { font-size: 12.5px; font-weight: 300; color: var(--gray); line-height: 1.5; }
/* Valor de la fila con icono (hoy solo el TDP de Creator's settings). margin-left
   auto lo manda a la derecha, sobre el mismo eje donde el resto de .param-row
   pone sus valores, para que el ojo lo encuentre donde ya los busca. */
.param-icon-value { margin-left: auto; padding-left: 12px; font-size: 14px; font-weight: 600; color: var(--black); white-space: nowrap; }

/* Requisito, no error: acento verde de la marca sobre el gris del sitio. */
.lossless-notice {
  margin: 14px 24px 2px; padding: 12px 14px;
  background: var(--bg); border-left: 3px solid var(--green);
  border-radius: 0 10px 10px 0;
  font-size: 13px; font-weight: 300; line-height: 1.55; color: var(--gray-dark);
}
.lossless-notice strong { font-weight: 600; color: var(--black); }

/* Performance card */
.perf-card { background: var(--white); border: 1px solid var(--border-light); border-radius: 20px; overflow: hidden; }
.perf-card-header { padding: 18px 24px 14px; border-bottom: 1px solid var(--border-light); display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.perf-card-header h3 { font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--gray-light); }
.perf-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border-light); }
.perf-stat-cell { background: var(--white); padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; }
.perf-stat-label { font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-light); }
.perf-stat-value { font-size: 28px; font-weight: 700; color: var(--black); letter-spacing: -0.03em; line-height: 1; }
.perf-no-data { padding: 28px 24px; text-align: center; }
.perf-no-data p { font-size: 13px; color: var(--gray-light); font-style: italic; line-height: 1.6; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 14px; }
.sidebar-card { background: var(--white); border: 1px solid var(--border-light); border-radius: 20px; padding: 18px 20px; }
.sidebar-card h4 { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-light); margin-bottom: 12px; }
.sidebar-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.sidebar-row:last-child { border-bottom: none; }
.sidebar-row-key { color: var(--gray); font-weight: 300; }
.sidebar-row-val { color: var(--black); font-weight: 500; }
.sidebar-row-val a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Other profiles in sidebar */
.other-profiles { display: flex; flex-direction: column; }
.other-profile-link { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border-light); text-decoration: none; transition: opacity 0.2s; }
.other-profile-link:last-child { border-bottom: none; }
.other-profile-link:hover { opacity: 0.7; }
.other-profile-name { font-size: 13px; font-weight: 500; color: var(--black); }
.other-profile-sub { font-size: 11px; color: var(--gray-light); font-weight: 300; margin-top: 2px; }
.other-profile-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; flex-shrink: 0; }

/* ─────────────────────────────────────────────────────────────────────────── */
/* INDEX PAGE (smart-profiles-index.php)                                        */
/* ─────────────────────────────────────────────────────────────────────────── */

.index-hero {
  position: relative; overflow: hidden;
  background: var(--black); padding-top: 52px;
}
.index-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(29,29,31,0.0) 0%, rgba(245,245,247,1.0) 100%);
}
.index-hero-content {
  position: relative; z-index: 2;
  padding: clamp(48px, 7vw, 88px) clamp(24px, 8vw, 80px) clamp(24px, 3vw, 40px);
  max-width: 1100px; margin: 0 auto;
}
.index-hero-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); margin-bottom: 14px; display: block; }
.index-hero-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1.0; color: white;
  margin-bottom: 16px;
}
.index-hero-title em { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; color: var(--green); }
.index-hero-sub { font-size: 16px; font-weight: 300; color: rgba(0,0,0,0.95); max-width: 500px; line-height: 1.6; }

/* Games listing section */
.games-section {
  padding: clamp(12px, 1vw, 12px) clamp(24px, 8vw, 80px) clamp(80px, 10vw, 120px);
  max-width: 1100px; margin: 0 auto;
}
.games-section-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.games-section-header h2 { font-family: 'DM Sans', sans-serif; font-size: clamp(18px, 2.5vw, 24px); font-weight: 700; letter-spacing: -0.025em; }
.games-count { font-size: 13px; color: var(--gray-light); font-weight: 300; }

.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.game-card {
  background: var(--white); border: 1px solid var(--border-light); border-radius: 16px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  display: flex; flex-direction: column;
}
.game-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.08); border-color: var(--border); transform: translateY(-2px); }
.game-card-cover {
  width: 100%; aspect-ratio: 3 / 4; overflow: hidden;
  background: var(--bg-card-2);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.game-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-card-cover-placeholder { font-size: 40px; }
.game-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-card-name { font-size: 14px; font-weight: 600; color: var(--black); letter-spacing: -0.01em; line-height: 1.3; }
.game-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.game-card-count { font-size: 12px; color: var(--gray-light); font-weight: 300; }
.game-card-cta { font-size: 11px; font-weight: 500; color: var(--green-dark); }

/* Supported games without profiles: compact list under the grid */
.games-more { margin-top: 56px; }
/* Sigue siendo h2 por estructura; se ve como subseccion de "All Games", no como par.
   --gray y no --gray-light: pasa 4.5:1 sobre --bg. */
.games-more .games-section-header h2 { font-size: 16px; font-weight: 600; color: var(--gray); }
.games-more-sub { font-size: 14px; color: var(--gray-light); font-weight: 300; line-height: 1.6; margin: -16px 0 20px; max-width: 640px; }
.games-more-list { list-style: none; columns: 220px 3; column-gap: 24px; }
.games-more-list li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.games-more-list a { color: var(--black); text-decoration: none; font-weight: 500; }
.games-more-list a:hover { color: var(--green-dark); }

/* 404 page */
.error-page {
  min-height: calc(100vh - 52px - 80px);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(48px, 8vw, 96px) clamp(24px, 8vw, 80px);
  text-align: center;
}
.error-page h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 700; letter-spacing: -0.035em; margin-bottom: 12px; }
.error-page p { font-size: 16px; color: var(--gray); margin-bottom: 28px; }
