/* Área de jugador rediseñada: panel de cuenta, clasificatoria (ELO), ranking, perfil público y staff en línea.
   Paleta del sitio (navy, amarillo #ffd34c, cian) con superficies en capas, rejilla sutil y colores de rango semánticos.
   Las animaciones corren siempre (decisión del propietario): no hay guardas de prefers-reduced-motion. */

:root {
  --pp-navy: #101b32;
  --pp-deep: #0a1326;
  --pp-ink: #192740;
  --pp-muted: #5b6b82;
  --pp-yellow: #ffd34c;
  --pp-cyan: #67dbea;
  --pp-line: #dce3ee;
  --pp-ease: cubic-bezier(.23, 1, .32, 1);
  --pp-bronze: #c17f45;
  --pp-silver: #b8c2d1;
  --pp-gold: #ffd34c;
  --pp-platinum: #7fdcc9;
  --pp-diamond: #7fb0ff;
  --pp-star: #f3a6ff;
  --pp-unranked: #8b97ab;
  --pp-card: #17233d;
  --pp-card-dim: #131e35;
  --pp-card-line: rgba(255, 255, 255, .1);
  --pp-text: #eef3fb;
  --pp-muted-dark: #9fb3cf;
}

.staff-online[hidden],
.staff-pop[hidden],
.staff-card[hidden],
.staff-strip[hidden] { display: none !important; }

/* ---- Cuenta: cabecera del jugador -------------------------------------------------------------- */
.account-pro .pro-hero { margin-bottom: 26px; }
.pro-hero-inner {
  --accent: var(--pp-yellow);
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
  background-color: var(--pp-navy);
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 34px 34px;
  color: #fff;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
  animation: pp-rise .4s var(--pp-ease) both;
}
.pro-hero-inner:before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--accent); }
.pro-hero-inner[data-accent=gold] { --accent: #ffd34c; }
.pro-hero-inner[data-accent=cyan] { --accent: #67dbea; }
.pro-hero-inner[data-accent=crimson] { --accent: #ff5f6d; }
.pro-hero-inner[data-accent=lime] { --accent: #b8f35c; }
.pro-hero-inner[data-accent=violet] { --accent: #a797f1; }
.pro-hero-inner.is-loading .skeleton-line { background: rgba(255, 255, 255, .12); }
.pro-emblem {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  background: var(--accent);
  color: var(--pp-navy);
  font-size: 42px;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  animation: pp-pop .35s var(--pp-ease) both;
}
.pro-hero-main { min-width: 0; }
.pro-hero-main .eyebrow { color: var(--pp-cyan); }
.pro-hero-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: .98;
  letter-spacing: .5px;
  margin: 6px 0 6px;
  overflow-wrap: anywhere;
}
.pro-hero-handle { margin: 0; color: #9fb3cf; font-size: 14px; }
.pro-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pro-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 12px;
  font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.pro-chip.is-muted { color: #9fb3cf; }
.pro-chip.is-tier { padding-left: 6px; }
.pro-hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 14px 22px;
  margin: 20px 0 0;
}
.pro-hero-meta dt { font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: #9fb3cf; }
.pro-hero-meta dd { margin: 4px 0 0; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pro-hero-actions .button { white-space: nowrap; }
.pro-bio { max-width: 64ch; margin: 14px 0 0; color: #d3deee; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }

/* ---- Insignia de rango (SVG) ------------------------------------------------------------------- */
.tier-bronze { --tier: var(--pp-bronze); }
.tier-silver { --tier: var(--pp-silver); }
.tier-gold { --tier: var(--pp-gold); }
.tier-platinum { --tier: var(--pp-platinum); }
.tier-diamond { --tier: var(--pp-diamond); }
.tier-star { --tier: var(--pp-star); }
.tier-unranked { --tier: var(--pp-unranked); }
.tier-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 52px;
  flex-shrink: 0;
  color: var(--pp-navy);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18));
}
.tier-badge.is-lg { width: 78px; height: 88px; }
.tier-badge.is-sm { width: 30px; height: 34px; filter: none; }
.tier-badge-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tier-badge-body { fill: var(--tier, var(--pp-unranked)); stroke: rgba(10, 19, 38, .55); stroke-width: 1.5; stroke-linejoin: round; }
.tier-badge-gloss { fill: #fff; opacity: .28; }
.tier-badge-mark { position: relative; font-family: var(--display); font-size: 21px; line-height: 1; color: var(--pp-navy); }
.tier-badge.is-lg .tier-badge-mark { font-size: 36px; }
.tier-badge.is-sm .tier-badge-mark { font-size: 14px; }
.tier-badge-mark .cd-icon { font-size: .8em; }
.tier-badge-numeral { letter-spacing: .5px; }

/* ---- Tarjetas de rango ---------------------------------------------------------------------- */
.pro-ranked-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.rank-card {
  position: relative;
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
  padding: 24px 22px 22px;
  background: var(--pp-card);
  color: var(--pp-text);
  border: 1px solid var(--pp-card-line);
  box-shadow: 0 16px 36px rgba(10, 19, 38, .24);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
  animation: pp-rise .35s var(--pp-ease) both;
  transition: transform .25s var(--pp-ease), box-shadow .25s var(--pp-ease);
}
.rank-card:before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--tier); }
.rank-card:hover { transform: translateY(-3px); box-shadow: 0 22px 46px rgba(10, 19, 38, .16); }
.rank-card.is-unranked { background: var(--pp-card-dim); }
.rank-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rank-card-heading { min-width: 0; }
.rank-card-queue { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: var(--pp-muted-dark); }
.rank-card-rank { margin: 4px 0 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.04; color: #fff; overflow-wrap: anywhere; }
.rank-card-elo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rank-elo { font-family: var(--display); font-size: 52px; line-height: .95; color: #fff; font-variant-numeric: tabular-nums; }
.rank-elo-unit { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; color: var(--pp-muted-dark); }
.rank-peak { font-size: 12px; color: var(--pp-muted-dark); }
.rank-placement-count { font-family: var(--display); font-size: 44px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.rank-progress { display: grid; gap: 4px; }
.rank-progress-text { margin: 4px 0 0; font-size: 12px; color: var(--pp-muted-dark); }
.meter { position: relative; height: 10px; overflow: hidden; background: rgba(255, 255, 255, .12); clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.meter-fill {
  position: absolute;
  inset: 0;
  background: var(--tier, var(--pp-navy));
  transform-origin: left center;
  transform: scaleX(var(--fill, 0));
  animation: pp-meter .4s var(--pp-ease) both;
}
.rank-card-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.rank-card-stats dt { font-size: 9.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--pp-muted-dark); }
.rank-card-stats dd { margin: 3px 0 0; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.rank-trend { display: grid; gap: 6px; }
.rank-trend-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--pp-muted-dark); }
.sparkline { display: block; width: 100%; height: 56px; overflow: visible; }
.spark-line { fill: none; stroke: var(--tier, var(--pp-navy)); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: pp-draw .4s var(--pp-ease) forwards; }
.spark-dot { fill: var(--tier, var(--pp-navy)); stroke: #fff; stroke-width: 2; }
.sparkline.is-mini { width: 92px; height: 26px; display: inline-block; vertical-align: middle; margin-left: 10px; }
.sparkline.is-mini .spark-line { animation-delay: 0s; }
.trend-empty { font-size: 12px; color: var(--pp-muted-dark); }
.rank-card-foot { margin: 0; font-size: 12px; color: var(--pp-muted-dark); }
.delta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, .1);
  color: #e6edf8;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 80% 100%, 0 100%);
}
.delta-chip.is-up { background: rgba(61, 220, 132, .18); color: #8ff0b5; }
.delta-chip.is-down { background: rgba(255, 95, 109, .18); color: #ff9aa3; }
.delta-chip.is-flat { background: rgba(255, 255, 255, .08); color: #c9d6ea; }
.delta-chip.is-none { background: transparent; color: var(--pp-muted-dark); min-width: 0; padding: 3px 2px; }

.rank-mini-list { display: grid; gap: 10px; }
.rank-mini {
  --tier: var(--pp-unranked);
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--pp-card);
  color: var(--pp-text);
  border: 1px solid var(--pp-card-line);
  border-left: 5px solid var(--tier);
}
.rank-mini-queue { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--pp-muted-dark); min-width: 56px; }
.rank-mini-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-mini-value { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- Cuenta: estadísticas y pestañas ---------------------------------------------------------- */
.account-pro .stat-grid,
.pro-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 0 0 26px; }
.account-pro .stat-tile,
.pro-stat { min-width: 0; }
.overview-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.tab-list {
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin: 0 0 26px;
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 1px solid #cdd7e5;
}
.tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 12px 18px;
  background: transparent;
  border: 0;
  color: var(--pp-muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s var(--pp-ease), background-color .2s var(--pp-ease), transform .2s var(--pp-ease);
}
.tab-button:hover { color: var(--pp-navy); background: #e9eef6; }
.tab-button:active { transform: translateY(1px); }
.tab-button[aria-selected=true] { color: var(--pp-navy); }
.tab-button[aria-selected=true]:after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 4px; background: var(--pp-yellow); animation: pp-fill .3s var(--pp-ease) both; transform-origin: left; }
.tab-button:focus-visible { outline: 3px solid var(--pp-cyan); outline-offset: -3px; }
.tab-button i { font-size: 14px; }
.account-pro .tab-list { flex-wrap: wrap; overflow: visible; border-bottom-color: rgba(255, 255, 255, .14); }
.account-pro .tab-button { color: #9fb3cf; }
.account-pro .tab-button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.account-pro .tab-button[aria-selected=true] { color: #fff; }
.account-panel { animation: pp-rise .4s var(--pp-ease) both; }
.account-pro .panel { box-shadow: 0 12px 30px rgba(10, 19, 38, .07); }

/* ---- Preferencias públicas ------------------------------------------------------------------- */
.prefs-form { display: grid; gap: 22px; max-width: 700px; color: #f2f6fc; }
.switch-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
}
.switch-row input {
  position: relative;
  appearance: none;
  width: 48px;
  height: 26px;
  margin: 2px 0 0;
  background: #3a4a68;
  cursor: pointer;
  transition: background-color .25s var(--pp-ease);
}
.switch-row input:before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; transition: transform .3s var(--pp-ease); }
.switch-row input:checked { background: var(--pp-yellow); }
.switch-row input:checked:before { transform: translateX(22px); background: var(--pp-navy); }
.switch-row input:focus-visible { outline: 3px solid var(--pp-cyan); outline-offset: 3px; }
.switch-copy strong { display: block; font-size: 15px; }
.switch-copy small { display: block; margin-top: 4px; color: var(--pp-muted-dark); line-height: 1.5; }
.prefs-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.prefs-fieldset legend { margin: 0 0 12px; padding: 0; font-size: 13px; font-weight: 800; letter-spacing: .3px; color: #fff; }
.pick-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.pick { position: relative; display: grid; justify-items: center; gap: 8px; min-width: 84px; cursor: pointer; }
.pick input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.pick-face {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 22px;
  border: 2px solid transparent;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  transition: transform .2s var(--pp-ease), border-color .2s var(--pp-ease), background-color .2s var(--pp-ease);
}
.pick:hover .pick-face { transform: translateY(-3px); }
.pick:active .pick-face { transform: scale(.96); }
.pick input:checked + .pick-face { border-color: #fff; background: var(--pp-yellow); color: var(--pp-navy); }
.pick input:focus-visible + .pick-face { outline: 3px solid var(--pp-cyan); outline-offset: 3px; }
.pick-name { font-size: 12px; font-weight: 700; color: #d6e0ef; text-align: center; }
.pick-accents .pick-face { width: 52px; height: 52px; clip-path: none; border-radius: 50%; }
.pick-face[data-accent=gold] { background: #ffd34c; }
.pick-face[data-accent=cyan] { background: #67dbea; }
.pick-face[data-accent=crimson] { background: #ff5f6d; }
.pick-face[data-accent=lime] { background: #b8f35c; }
.pick-face[data-accent=violet] { background: #a797f1; }
.pick-accents input:checked + .pick-face { border-color: var(--pp-navy); background-clip: padding-box; box-shadow: inset 0 0 0 4px #fff; }
.prefs-count { margin-top: 6px; text-align: right; font-variant-numeric: tabular-nums; color: var(--pp-muted-dark); }
.share-link { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); }
.share-link > label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 800; color: #fff; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.share-row input { flex: 1 1 260px; min-width: 0; }
.share-row .button { min-height: 48px; }
.prefs-form select,
.prefs-form textarea,
.share-row input { width: 100%; min-height: 48px; padding: 12px 14px; background: #fff; color: var(--pp-ink); border: 1px solid #afbdd0; font: inherit; font-size: 15px; }
.prefs-form textarea { min-height: 96px; resize: vertical; }
.prefs-form .field > label { color: #fff; font-size: 13px; font-weight: 800; }
.prefs-form .field-hint { color: var(--pp-muted-dark); }

/* ---- Historial de partidas -------------------------------------------------------------------- */
.pro-table { color: var(--pp-ink); }
.pro-table td small { display: block; margin-top: 2px; color: var(--pp-muted); font-size: 12px; }
.match-queue { font-weight: 800; }
.tag { display: inline-block; margin: 0 6px 0 8px; padding: 3px 7px; background: #e8edf5; color: var(--pp-ink); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.tag.is-ranked { background: var(--pp-navy); color: var(--pp-yellow); }
.match-scroll .match-table tr.is-win td:first-child { box-shadow: inset 4px 0 0 #13703c; }

/* ---- Clasificatoria: pestañas de cola, podio y tabla ------------------------------------------ */
.rank-tabs-row { margin-bottom: 18px; }
.ranking-pro .tab-list { margin: 0; padding: 5px; border: 1px solid rgba(255, 255, 255, .14); border-bottom: 1px solid rgba(255, 255, 255, .14); background: rgba(8, 15, 30, .62); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; overflow: visible; }
.ranking-pro .tab-button { min-height: 42px; padding: 8px 16px; background: transparent; color: #c9d6ea; border: 1px solid transparent; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); transition: background-color .2s var(--pp-ease), color .2s var(--pp-ease); }
.ranking-pro .tab-button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ranking-pro .tab-button:focus-visible { outline: 3px solid var(--pp-cyan); outline-offset: 2px; }
.ranking-pro .tab-button[aria-selected=true] { background: var(--pp-yellow); border-color: var(--pp-yellow); color: var(--pp-navy); box-shadow: 0 8px 22px rgba(255, 211, 76, .22); }
.ranking-pro .tab-button[aria-selected=true]:after { display: none; }
.rank-tabs-group { padding: 0 8px 0 4px; font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: #9fb3cf; }
.rank-tabs-divider { width: 1px; height: 28px; margin: 0 8px; background: rgba(255, 255, 255, .18); }
.ranking-season { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 24px; color: #fff; letter-spacing: .3px; }
.ranking-pro .rank-badge:not(.rank-1):not(.rank-2):not(.rank-3) { color: #fff; }
.podium-block { margin: 6px 0 26px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; margin: 0; padding: 0; list-style: none; }
.podium-slot { min-width: 0; }
.podium-1 { order: 2; }
.podium-2 { order: 1; }
.podium-3 { order: 3; }
.podium-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  height: 100%;
  padding: 22px 12px 20px;
  background: var(--pp-navy);
  color: #fff;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
  transition: transform .25s var(--pp-ease), background-color .25s var(--pp-ease);
  animation: pp-rise .35s var(--pp-ease) both;
}
.podium-1 .podium-card { padding-top: 40px; background: #17284a; }
.podium-1 .podium-card:before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--pp-yellow); }
.podium-2 .podium-card:before,
.podium-3 .podium-card:before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: #9fb3cf; }
.podium-3 .podium-card:before { background: #d9a071; }
.podium-card:hover { transform: translateY(-4px); }
.podium-card:focus-visible { outline: 3px solid var(--pp-cyan); outline-offset: 3px; }
.podium-rank { font-family: var(--display); font-size: 50px; line-height: 1; color: var(--pp-yellow); }
.podium-2 .podium-rank { color: #e4ebf5; }
.podium-3 .podium-rank { color: #e0a878; }
.podium-avatar { display: grid; place-items: center; width: 40px; height: 40px; background: var(--pp-yellow); color: var(--pp-navy); font-family: var(--display); font-size: 20px; clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%); }
.podium-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; text-align: center; }
.podium-value { font-family: var(--display); font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.podium-value small { font-family: var(--body); font-size: 10px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; color: #9fb3cf; }
.podium .tier-badge.is-md { width: 38px; height: 44px; }
.tier-distribution { margin: 0 0 24px; padding: 20px 22px; background: var(--pp-card); color: var(--pp-text); border: 1px solid var(--pp-card-line); }
.tier-dist-title { margin: 0 0 14px; font-family: var(--display); font-weight: 400; font-size: 24px; color: #fff; }
.tier-dist-queue { margin-left: 8px; font-family: var(--body); font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--pp-muted-dark); }
.dist-bar { display: flex; gap: 2px; height: 16px; margin-bottom: 14px; overflow: hidden; background: rgba(255, 255, 255, .12); }
.dist-seg { display: block; flex: 0 0 auto; width: calc(var(--share, 0) * 100%); min-width: 4px; background: var(--tier, var(--pp-navy)); animation: pp-fill .4s var(--pp-ease) both; transform-origin: left; }
.dist-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.dist-legend li { display: flex; align-items: center; gap: 8px; }
.dist-dot { width: 12px; height: 12px; background: var(--tier, var(--pp-navy)); }
.dist-legend strong { font-variant-numeric: tabular-nums; }
.dist-legend small { color: var(--pp-muted-dark); }
.pro-ranking-table table { min-width: 940px; }
.pro-ranking-table td.num { font-variant-numeric: tabular-nums; }
.rank-player { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.rank-player:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.rank-player:focus-visible { outline: 3px solid var(--pp-cyan); outline-offset: 3px; }
.rank-inline { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.rank-name { font-weight: 700; }
.trend-cell { white-space: nowrap; }
.pro-ranking-table tr.is-own-player td { background: #fffbe6; }

/* ---- ELO explicado ---------------------------------------------------------------------------- */
.elo-explainer { margin-top: 34px; background: var(--pp-card); color: var(--pp-text); border: 1px solid var(--pp-card-line); }
.elo-explainer summary { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 14px 20px; cursor: pointer; list-style: none; font-family: var(--display); font-size: 22px; color: #fff; }
.elo-explainer summary::-webkit-details-marker { display: none; }
.elo-explainer summary:hover { background: rgba(255, 255, 255, .05); }
.elo-explainer summary:focus-visible { outline: 3px solid var(--pp-cyan); outline-offset: -3px; }
.elo-explainer-title { flex: 1; min-width: 0; }
.elo-explainer-icon { color: var(--pp-yellow); }
.elo-explainer-caret { transition: transform .3s var(--pp-ease); }
.elo-explainer[open] .elo-explainer-caret { transform: rotate(180deg); }
.elo-rules { display: grid; gap: 12px; margin: 0; padding: 4px 22px 24px 54px; font-size: 14px; line-height: 1.6; color: #d6e0ef; }
.elo-rules li::marker { color: var(--pp-yellow); font-weight: 800; }
.elo-explainer[open] .elo-rules { animation: pp-rise .35s var(--pp-ease) both; }

/* ---- Perfil público ---------------------------------------------------------------------------- */
.pro-profile { display: grid; gap: 30px; }
.pro-profile-inner { display: grid; gap: 34px; }
.pro-section-title { margin: 0 0 16px; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3vw, 34px); letter-spacing: .3px; color: #fff; }
.pro-empty {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: clamp(34px, 6vw, 68px) 22px;
  background: var(--pp-card);
  color: var(--pp-text);
  border: 1px solid var(--pp-card-line);
  text-align: center;
  animation: pp-rise .35s var(--pp-ease) both;
}
.pro-empty-icon { display: grid; place-items: center; width: 84px; height: 84px; background: var(--pp-navy); color: var(--pp-yellow); font-size: 34px; clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%); }
.pro-empty h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 4vw, 38px); line-height: 1.1; color: #fff; }

/* ---- Staff en línea ---------------------------------------------------------------------------- */
.staff-pill-wrap { position: relative; display: inline-flex; align-items: center; padding-right: 16px; border-right: 1px solid rgba(255, 255, 255, .14); }
/* Indicador de estado, no un botón de acción: sin caja, punto verde y número en verde (el amarillo queda para "Jugar"). */
.staff-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 2px;
  background: none;
  border: 0;
  color: #cbd3e4;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s var(--pp-ease);
}
.staff-pill:hover, .staff-pill[aria-expanded=true] { color: #fff; }
.staff-pill:hover .staff-pill-text, .staff-pill[aria-expanded=true] .staff-pill-text { text-decoration: underline; text-decoration-color: #3ddc84; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.staff-pill:active { transform: translateY(1px); }
.staff-pill:focus-visible { outline: 3px solid var(--pp-cyan); outline-offset: 4px; }
.staff-pill .staff-pill-count { min-width: 0; height: auto; padding: 0; background: none; color: #3ddc84; font-size: 14px; font-weight: 800; }
@media (max-width: 1150px) { .staff-pill-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .staff-pill-wrap { padding-right: 12px; } }
@media (max-width: 540px) { .staff-pill-wrap { padding-right: 8px; } }
/* En móviles estrechos la cabecera no tiene sitio: el staff sigue visible en la portada y en /estado. */
@media (max-width: 419px) { .staff-pill-wrap { display: none; } }
.staff-live { position: relative; display: inline-block; flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; }
.staff-live:after { content: ""; position: absolute; inset: -5px; border: 2px solid #3ddc84; border-radius: 50%; opacity: 0; animation: pp-ping 1.9s var(--pp-ease) infinite; }
.is-empty .staff-live { background: #7d8aa0; }
.is-empty .staff-live:after { display: none; }
.staff-pill-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; background: var(--pp-yellow); color: var(--pp-navy); font-size: 12px; font-variant-numeric: tabular-nums; }
.staff-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 40;
  width: min(300px, calc(100vw - 32px));
  padding: 18px 18px 16px;
  background: #fff;
  color: var(--pp-ink);
  border-top: 4px solid var(--pp-yellow);
  box-shadow: 0 24px 60px rgba(10, 19, 38, .35);
}
.staff-pop-title { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--pp-navy); }
.staff-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.staff-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.staff-avatar { display: grid; place-items: center; width: 30px; height: 30px; background: var(--pp-navy); color: var(--pp-yellow); font-family: var(--display); font-size: 15px; clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%); }
.staff-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.staff-role { padding: 4px 8px; background: #e8edf5; color: var(--pp-navy); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap; }
.staff-role.role-owner { background: var(--pp-yellow); }
.staff-role.role-gm { background: var(--pp-navy); color: #fff; }
.staff-role.role-moderator { background: var(--pp-cyan); }
.staff-empty { margin: 4px 0 0; font-size: 13px; color: var(--pp-muted); }
.staff-card {
  position: relative;
  margin-top: 40px;
  padding: 28px clamp(20px, 3vw, 34px);
  background: var(--pp-navy);
  color: #fff;
  border-top: 4px solid var(--pp-yellow);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 34px 34px;
  animation: pp-rise .35s var(--pp-ease) both;
}
.staff-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.staff-card-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; }
.staff-card-text { margin: 0 0 18px; color: #b8c8de; font-size: 14px; }
.staff-card .staff-list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.staff-card .staff-item { padding: 12px 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.staff-card .staff-name { color: #fff; }
.staff-card .staff-empty { color: #9fb3cf; font-size: 14px; }
.staff-strip { padding: 26px 0 28px; background: #0d1830; color: #fff; border-top: 1px solid rgba(255, 255, 255, .08); }
.staff-strip-title { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3vw, 32px); }
.staff-strip .staff-pill-count { font-size: 13px; }
.staff-list-inline { display: flex; flex-wrap: wrap; gap: 10px; }
.staff-list-inline .staff-item { padding: 8px 14px 8px 8px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.staff-list-inline .staff-name { color: #fff; max-width: 180px; }
.staff-strip .staff-empty { color: #9fb3cf; }

/* ---- Animaciones (siempre activas) ----------------------------------------------------------- */
@keyframes pp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pp-pop { from { opacity: 0; transform: scale(.6) rotate(-10deg); } to { opacity: 1; transform: none; } }
@keyframes pp-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pp-meter { from { transform: scaleX(0); } to { transform: scaleX(var(--fill, 0)); } }
@keyframes pp-draw { to { stroke-dashoffset: 0; } }
@keyframes pp-ping { 0% { transform: scale(.6); opacity: .85; } 100% { transform: scale(1.9); opacity: 0; } }

/* ---- Responsive: 1150 px (cabecera compacta), 900 px, 700 px y 540 px -------------------------- */
@media (max-width: 1150px) {
  .staff-pill-text { display: none; }
  .staff-pill { padding: 0 8px; }
}
@media (max-width: 900px) {
  .overview-split { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .pro-hero-inner { grid-template-columns: auto minmax(0, 1fr); }
  .pro-hero-actions { grid-column: 1 / -1; }
  .pro-emblem { width: 76px; height: 76px; font-size: 30px; }
  .pro-hero-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .podium-rank { font-size: 40px; }
  .podium-value { font-size: 21px; }
  .elo-rules { padding-left: 22px; }
}
@media (max-width: 540px) {
  .pro-hero-inner { padding: 22px 18px 24px; gap: 14px; }
  .pro-emblem { width: 60px; height: 60px; font-size: 24px; }
  .pro-hero-name { font-size: 38px; }
  .rank-elo { font-size: 44px; }
  .podium { gap: 8px; }
  .podium-card { padding: 16px 8px 14px; }
  .podium-1 .podium-card { padding-top: 26px; }
  .podium-avatar { width: 32px; height: 32px; font-size: 16px; }
  .podium-name { font-size: 13px; }
  .podium-rank { font-size: 34px; }
  .podium-value { font-size: 18px; }
  .podium-value small { display: none; }
  .tab-button { padding: 10px 13px; font-size: 13px; }
  .switch-row { padding: 14px; }
  .pick-face { width: 52px; height: 52px; }
  .pick { min-width: 74px; }
  .staff-pop { position: fixed; top: 74px; left: 16px; right: 16px; width: auto; }
  .staff-card { margin-top: 28px; }
  .staff-card .staff-list { grid-template-columns: 1fr; }
  .staff-list-inline .staff-item { max-width: 100%; }
}

/* ---- Estados vacíos y jugadores sin perfil público --------------------------------------------- */
.rank-card-note { margin: 0; padding: 10px 12px; font-size: 12px; line-height: 1.5; color: #c9d6ea; background: rgba(255, 255, 255, .06); border-left: 3px solid var(--pp-yellow); }
.rank-player.is-private { cursor: default; }
.rank-player.is-private:hover { text-decoration: none; }

/* ---- QA visual: medidor, pestañas, estadísticas, cabecera con mejor rango y entradas cortas ----- */
.rank-card { container-type: inline-size; }
@container (max-width: 330px) { .rank-card-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rank-card-stats dt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#stats-body.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
#stats-body .pro-stat.is-feature { grid-column: 1 / -1; }
#stats-body .pro-stat .stat-value { font-size: clamp(26px, 1.6rem + 1vw, 40px); white-space: nowrap; word-break: normal; }
#stats-body .pro-stat.is-feature .stat-value { font-size: clamp(44px, 3rem + 3vw, 72px); }
@media (max-width: 700px) { #stats-body.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pro-emblem > .cd-icon { width: 56px; height: 56px; }
@media (max-width: 700px) { .pro-emblem > .cd-icon { width: 40px; height: 40px; } }
@media (max-width: 540px) { .pro-emblem > .cd-icon { width: 32px; height: 32px; } }
.pro-hero-tier { display: grid; justify-items: center; align-content: center; gap: 6px; min-width: 210px; padding: 18px 20px; text-align: center; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%); }
.pro-hero-tier .tier-badge.is-xl { width: 124px; height: 140px; }
.pro-hero-tier .tier-badge.is-xl .tier-badge-mark { font-size: 54px; }
.pro-hero-tier-label { margin: 0; font-size: 10px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: #9fb3cf; }
.pro-hero-tier-name { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; color: #fff; }
.pro-hero-tier-elo { margin: 0; font-size: 13px; font-weight: 700; color: #c9d6ea; font-variant-numeric: tabular-nums; }
@media (min-width: 861px) { .pro-hero-inner { grid-template-columns: auto minmax(0, 1fr) auto auto; } .pro-hero-chip-tier { display: none; } }
@media (max-width: 860px) { .pro-hero-tier { display: none; } }

.player-page [data-reveal].is-revealed { animation-duration: .35s !important; animation-delay: 0ms !important; }
