/* Fichado.gg: estilo oscuro inspirado en itero.gg */

:root {
  --bg: #0a0a0a;
  --card: #141414;
  --card-2: #1b1b1b;
  --muted: #262626;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --fg: #fafafa;
  --muted-fg: #a1a1a1;
  --dim-fg: #737373;

  --brand: #00d7c2;
  --brand-light: #7de8e2;
  --brand-ink: #03201d;
  --brand-soft: rgba(0, 215, 194, 0.08);
  --brand-line: rgba(0, 215, 194, 0.32);

  --win: #00d7c2;
  --loss: #ff5a64;
  --blue: #3aa5d9;
  --red: #e04a4a;
  --legendary: #ff8000;
  --epic: #b464ff;
  --rare: #3d9bff;

  --radius: 10px;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Fira Code', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(1000px 460px at 50% -160px, rgba(0, 215, 194, 0.14), transparent 70%);
  background-repeat: no-repeat;
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Barra de scroll: sin fondo, fina y gris oscuro, sin flechitas */
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; }
::-webkit-scrollbar-thumb { background: #2b2b2b; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3d3d3d; border: 2px solid transparent; background-clip: padding-box; }
img { display: block; }
h1, h2, h3 { letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted-fg); }
.win-text { color: var(--win); }
.loss-text { color: var(--loss); }

/* ---------- Barra superior ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
  padding: 0 24px;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.logo b { color: var(--brand); text-shadow: 0 0 14px rgba(0, 215, 194, 0.55); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a,
.nav-search-toggle {
  padding: 7px 13px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted-fg);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.nav a:hover,
.nav-search-toggle:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }
.nav a.active { color: var(--brand-light); background: var(--brand-soft); }

/* "Buscar" se despliega como buscador en el mismo lugar */
.nav-search { position: relative; display: flex; align-items: center; }
.nav-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #101010;
  transition: width 0.25s ease, opacity 0.2s ease, border-color 0.2s, padding 0.25s ease;
}
.nav-search-icon { flex: none; width: 15px; height: 15px; color: var(--dim-fg); }
.nav-search-form input { flex: 1; min-width: 0; padding: 7px 0; border: 0; background: transparent; font-size: 14px; }
/* El borde del buscador ya marca que está activo: sin el contorno extra del cuadro de texto */
.nav-search-form input:focus,
.nav-search-form input:focus-visible { outline: none; box-shadow: none; }
.nav-search.open .nav-search-toggle,
.nav-search.closing .nav-search-toggle { display: none; }
.nav-search.open .nav-search-form { width: 250px; padding: 0 12px; opacity: 1; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 215, 194, 0.15); }
.nav-recent {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: none;
  min-width: 250px;
  padding: 6px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.nav-search.open .nav-recent:not(:empty) { display: block; animation: drop-in 0.18s ease; }
.nav-recent-title { padding: 4px 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim-fg); }
.nav-recent a { display: block; padding: 7px 8px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--fg); }
.nav-recent a span { color: var(--dim-fg); font-weight: 500; }
.nav-recent a:hover { background: rgba(255, 255, 255, 0.06); }
@keyframes drop-in { from { opacity: 0; transform: translateY(-4px); } }

.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; height: 100%; }

.account { display: flex; align-items: center; }
.me-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.me-chip:hover { border-color: var(--brand); box-shadow: 0 0 18px rgba(0, 215, 194, 0.25); }
.me-icon { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--brand-line); }
.me-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 14px; height: 14px; color: var(--dim-fg); transition: transform 0.2s; }
.link { color: var(--brand-light); text-decoration: underline; }

/* Menú de tu nombre: Mi perfil, Configuración, Cerrar sesión */
.account-menu { position: relative; }
.account-menu .menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 200px;
  padding: 6px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
/* Puente invisible para que el menú no se cierre al bajar el mouse desde el nombre */
.account-menu .menu::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.account-menu:hover .menu,
.account-menu:focus-within .menu,
.account-menu.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.account-menu:hover .chev,
.account-menu.open .chev { transform: rotate(180deg); }
.account-menu.suppress .menu { opacity: 0; pointer-events: none; }
.account-menu .menu a,
.account-menu .menu button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.account-menu .menu a:hover,
.account-menu .menu button:hover { background: rgba(255, 255, 255, 0.06); }
.account-menu .menu .danger { color: #ff8a92; }

/* Botones de la ventana (solo en la ventana propia de Fichado.gg) */
.window-controls { display: none; }
.desktop .window-controls { display: flex; align-self: stretch; margin: 0 -24px 0 4px; }
.window-controls button {
  display: grid;
  place-items: center;
  width: 46px;
  border: 0;
  background: transparent;
  color: var(--muted-fg);
  transition: background 0.12s, color 0.12s;
}
.window-controls button:hover { background: rgba(255, 255, 255, 0.08); color: var(--fg); }
.window-controls button.close:hover { background: #c42b1c; color: #fff; }
.window-controls svg { width: 11px; height: 11px; }
.window-controls .restore,
.maximized .window-controls .maximize { display: none; }
.maximized .window-controls .restore { display: block; }
.window-controls span { display: block; line-height: 0; }
/* En la ventana propia, el encabezado se puede arrastrar: sin selección de texto ahí */
.desktop .topbar { user-select: none; }
.desktop .topbar input { user-select: text; }
.window-edge { display: none; }
.desktop .window-edge { display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 210; height: 4px; cursor: ns-resize; }
.desktop.maximized .window-edge { display: none; }

/* Actualizaciones */
.update-slot { display: flex; }
.update-slot:empty { display: none; }
.update-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: var(--brand-soft);
  color: var(--brand-light);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 215, 194, 0.25);
  animation: pulse-glow 2s ease-in-out infinite;
}
.update-pill:hover { background: var(--brand); color: var(--brand-ink); }
@keyframes pulse-glow { 50% { box-shadow: 0 0 26px rgba(0, 215, 194, 0.5); } }
.update-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }
.update-box { max-width: 380px; padding: 28px 24px; text-align: center; }
.update-box p { margin: 0 0 14px; font-weight: 600; }
.update-box p:last-child { margin-bottom: 0; }

/* ---------- Controles ---------- */

input, select {
  font: inherit;
  color: var(--fg);
  background: #101010;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--dim-fg); }
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 215, 194, 0.18); }
select { cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn-brand { background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 22px rgba(0, 215, 194, 0.22); }
.btn-brand:hover { background: var(--brand-light); box-shadow: 0 0 30px rgba(0, 215, 194, 0.38); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--border-strong); color: var(--fg); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-light); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.toggle { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-fg); cursor: pointer; user-select: none; }
.toggle input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.toggle span {
  position: relative;
  width: 36px;
  height: 20px;
  flex: none;
  border-radius: 99px;
  background: var(--muted);
  border: 1px solid var(--border-strong);
  transition: background 0.2s, border-color 0.2s;
}
.toggle span::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted-fg);
  transition: left 0.2s, background 0.2s;
}
.toggle input:checked + span { background: rgba(0, 215, 194, 0.22); border-color: var(--brand); }
.toggle input:checked + span::after { left: 18px; background: var(--brand); }
.toggle input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 215, 194, 0.25); }

/* ---------- Estructura ---------- */

.page { display: flex; flex-direction: column; flex: 1; }
/* Ventana propia: el encabezado queda fijo como la barra de un programa y solo la página se desplaza */
.desktop { height: 100vh; overflow: hidden; }
.desktop .page { min-height: 0; overflow-y: auto; }
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 24px 64px; }

footer { text-align: center; color: var(--dim-fg); font-size: 12px; padding: 22px 24px; border-top: 1px solid var(--border); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.pad { padding: 20px; }

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-fg);
}
.pad > .card-title { padding: 0 0 14px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
.page-head h1 { margin: 0 0 4px; font-size: 30px; }
.page-head p { margin: 0; }

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1192px;
  margin: 18px auto 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand-light);
  font-weight: 600;
}
#banner:empty { display: none; }
#banner { padding: 0 24px; }

/* ---------- Estados (cargando, vacío, error) ---------- */

.loading { text-align: center; padding: 90px 0; color: var(--muted-fg); }
.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 52px 24px; }
.empty h2 { margin: 16px 0 6px; font-size: 20px; }
.empty p { color: var(--muted-fg); margin: 0 auto 18px; max-width: 470px; }
.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand);
  font-size: 22px;
  font-weight: 800;
}
.empty-icon.err { color: var(--loss); background: rgba(251, 44, 54, 0.08); border-color: rgba(251, 44, 54, 0.32); }
.empty-icon.radar { position: relative; }
.empty-icon.radar::before,
.empty-icon.radar::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--brand);
  animation: ripple 2.4s ease-out infinite;
}
.empty-icon.radar::after { animation-delay: 1.2s; }
@keyframes ripple { from { transform: scale(1); opacity: 0.7; } to { transform: scale(2.2); opacity: 0; } }

/* ---------- Inicio ---------- */

.hero { text-align: center; padding: 60px 0 44px; }
.eyebrow {
  display: inline-block;
  margin: 0 0 22px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-light);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 { margin: 0 0 16px; font-size: clamp(34px, 5.6vw, 62px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 800; }
.glow { color: var(--brand); text-shadow: 0 0 26px rgba(0, 215, 194, 0.45); }
.hero-sub { max-width: 520px; margin: 0 auto 32px; color: var(--muted-fg); font-size: 17px; }

.search-big {
  display: flex;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 215, 194, 0.06);
}
.search-big select { width: 92px; background: var(--card-2); }
.search-big input { flex: 1; min-width: 0; font-size: 16px; background: transparent; border-color: transparent; }
.search-big input:focus { box-shadow: none; border-color: transparent; }
.search-big:focus-within { border-color: var(--brand-line); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; }
.chip { padding: 5px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); transition: border-color 0.15s; }
.chip span { color: var(--dim-fg); }
.chip:hover { border-color: var(--brand); }

.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool { overflow: hidden; transition: transform 0.2s, border-color 0.2s; }
.tool:hover { transform: translateY(-3px); border-color: var(--brand-line); }
.tool-art { position: relative; height: 150px; background-size: cover; background-position: center 18%; }
.tool-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(20, 20, 20, 0) 25%, var(--card)); }
.tool-body { padding: 2px 18px 18px; }
.tool h3 { margin: 0 0 4px; font-size: 17px; }
.tool p { margin: 0; color: var(--muted-fg); font-size: 14px; }
.tool .arrow { color: var(--brand); }

/* ---------- Perfil de jugador ---------- */

.profile { position: relative; display: flex; align-items: center; gap: 22px; padding: 22px; margin-bottom: 18px; overflow: hidden; }
.profile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(520px 220px at 0% 0%, rgba(0, 215, 194, 0.13), transparent 70%);
  pointer-events: none;
}
.avatar { position: relative; flex: none; }
.avatar img { width: 86px; height: 86px; border-radius: 18px; border: 2px solid rgba(0, 215, 194, 0.6); box-shadow: 0 0 26px rgba(0, 215, 194, 0.25); }
.avatar .level {
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  font: 600 12px var(--mono);
}
.profile h1 { margin: 0 0 2px; font-size: 28px; }
.profile h1 span { color: var(--dim-fg); font-weight: 500; }
.profile-actions { position: relative; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }

.player-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 14px; }

.rank-body { display: flex; align-items: center; gap: 14px; padding: 10px 16px 12px; }
.emblem { display: grid; place-items: center; flex: none; width: 64px; height: 64px; overflow: hidden; }
.emblem-img { width: 64px; height: 64px; object-fit: cover; transform: scale(2.2); }
.crest-lg { width: 46px; height: 46px; opacity: 0.6; }
.tier { font-weight: 800; font-size: 18px; }
.rank-wr { margin-left: auto; text-align: right; font-size: 13px; }
.wr-num { font-size: 16px; font-weight: 600; }
.wr-great { color: var(--legendary); }
.wr-good { color: var(--brand-light); }
.wr-bad { color: var(--loss); }

.winbar { height: 4px; margin: 0 16px 16px; border-radius: 99px; background: rgba(255, 90, 100, 0.35); overflow: hidden; }
.winbar span { display: block; height: 100%; border-radius: 99px; background: var(--brand); }

.summary-top { display: flex; align-items: center; gap: 18px; padding: 14px 16px; }
.donut {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(var(--brand) calc(var(--wr) * 1%), rgba(255, 90, 100, 0.55) 0);
}
.donut::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--card); }
.donut span { position: relative; font: 700 18px var(--mono); }
.wl { font: 600 14px var(--mono); }
.kda-avg { font: 600 17px var(--mono); margin: 2px 0; }
.kda-ratio { font-family: var(--mono); font-size: 13px; font-weight: 600; }

.mini-list { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.mini-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.mini-row .name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .right { text-align: right; font-family: var(--mono); font-size: 12px; }

.roles { display: flex; gap: 6px; padding: 0 16px 16px; flex-wrap: wrap; }
.role { padding: 3px 9px; border-radius: 999px; font-size: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); color: var(--muted-fg); }
.role b { color: var(--fg); }

.mastery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; padding: 14px 16px 16px; }
.mastery { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 12px; }
.mastery:hover .mname { color: var(--brand-light); }
.mname { font-weight: 700; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlvl {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 6px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--brand-line);
  color: var(--brand-light);
  font: 600 11px var(--mono);
}

/* ---------- Partidas ---------- */

.matches-head { display: flex; align-items: baseline; justify-content: space-between; margin: 2px 0 10px; }
.matches-head h2 { margin: 0; font-size: 18px; }

.match {
  position: relative;
  display: grid;
  grid-template-columns: 100px auto 96px 88px auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px 44px 12px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.match::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--dim-fg); transition: box-shadow 0.2s; }
.match.win { --glow: 0, 215, 194; background: linear-gradient(90deg, rgba(0, 215, 194, 0.09), var(--card) 45%); }
.match.win::before { background: var(--win); box-shadow: 0 0 14px var(--win); }
.match.loss { --glow: 255, 90, 100; background: linear-gradient(90deg, rgba(251, 44, 54, 0.09), var(--card) 45%); }
.match.loss::before { background: var(--loss); }
.match.remake { --glow: 161, 161, 161; opacity: 0.7; }

/* Al pasar el mouse: brilla con el color del resultado y aparece la flecha */
.match:hover,
.match:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: rgba(var(--glow), 0.6);
  box-shadow: 0 0 0 1px rgba(var(--glow), 0.25), 0 8px 30px rgba(var(--glow), 0.16);
}
.match.win:hover, .match.win:focus-visible { background: linear-gradient(90deg, rgba(0, 215, 194, 0.16), var(--card) 60%); }
.match.loss:hover, .match.loss:focus-visible { background: linear-gradient(90deg, rgba(251, 44, 54, 0.15), var(--card) 60%); }
.match:hover::before { box-shadow: 0 0 18px rgba(var(--glow), 0.9); }
.m-arrow {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 22px;
  height: 22px;
  color: rgb(var(--glow));
  opacity: 0;
  transform: translate(-8px, -50%);
  filter: drop-shadow(0 0 6px rgba(var(--glow), 0.8));
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.match:hover .m-arrow,
.match:focus-visible .m-arrow { opacity: 1; transform: translate(0, -50%); }
@media (hover: none) {
  .m-arrow { opacity: 0.55; transform: translate(0, -50%); }
}

.m-meta { font-size: 12px; line-height: 1.5; }
.m-queue { font-weight: 700; font-size: 13px; }
.m-result { margin-top: 4px; font-weight: 800; font-size: 14px; }
.match.win .m-result { color: var(--win); }
.match.loss .m-result { color: var(--loss); }

.loadout { display: flex; align-items: center; gap: 4px; }
.champ-wrap { position: relative; flex: none; }
.champ-lg { width: 52px; height: 52px; border-radius: 10px; }
.champ-md { width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--border-strong); }
.champ-sm { width: 30px; height: 30px; border-radius: 7px; flex: none; }
.clvl {
  position: absolute;
  right: -4px;
  bottom: -4px;
  padding: 0 4px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  font: 600 10px var(--mono);
}
.stack { display: flex; flex-direction: column; gap: 3px; }
.spell { width: 24px; height: 24px; border-radius: 6px; }
.rune { width: 24px; height: 24px; border-radius: 50%; background: #000; }
.rune.sub { padding: 4px; background: rgba(255, 255, 255, 0.06); }

.m-kda .kda-line { font: 600 15px var(--mono); }
.m-stats { font-size: 12.5px; line-height: 1.6; }

.m-items { display: grid; grid-template-columns: repeat(4, 24px); gap: 3px; }
.item { width: 24px; height: 24px; border-radius: 5px; background: rgba(255, 255, 255, 0.05); }
.item.trinket { border-radius: 50%; }
/* Recompensa de la misión de rol (por ejemplo, las botas del tirador) */
.item.role-item { box-shadow: 0 0 0 1px rgba(227, 184, 91, 0.7); }

.m-players { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; min-width: 0; font-size: 11.5px; }
.mp { display: flex; align-items: center; gap: 5px; min-width: 0; line-height: 18px; color: var(--muted-fg); }
.mp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp:hover { color: var(--fg); }
.mp.is-target { color: var(--fg); font-weight: 700; }
.mp-icon { width: 16px; height: 16px; border-radius: 4px; flex: none; }

.img-empty { display: block; background: rgba(255, 255, 255, 0.05); }

.more { display: flex; justify-content: center; margin-top: 12px; }

/* ---------- Detalle de partida ---------- */

.detail-top { margin-bottom: 14px; }

.detail-head { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 18px 22px; padding: 22px 24px; margin-bottom: 18px; overflow: hidden; }
.detail-head::before { content: ''; position: absolute; inset: 0; pointer-events: none; }
.detail-head.win { border-color: rgba(0, 215, 194, 0.35); }
.detail-head.win::before { background: radial-gradient(640px 240px at 0% 0%, rgba(0, 215, 194, 0.17), transparent 70%); }
.detail-head.loss { border-color: rgba(255, 90, 100, 0.32); }
.detail-head.loss::before { background: radial-gradient(640px 240px at 0% 0%, rgba(251, 44, 54, 0.15), transparent 70%); }
.detail-head > * { position: relative; }
.detail-head h1 { margin: 2px 0 4px; font-size: 34px; line-height: 1.1; }
.detail-head.win h1 { color: var(--win); text-shadow: 0 0 22px rgba(0, 215, 194, 0.4); }
.detail-head.loss h1 { color: var(--loss); }
.d-queue { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-fg); }
.champ-xl { width: 76px; height: 76px; border-radius: 16px; border: 2px solid var(--border-strong); }
.detail-head.win .champ-xl { border-color: rgba(0, 215, 194, 0.6); box-shadow: 0 0 24px rgba(0, 215, 194, 0.25); }
.detail-head.loss .champ-xl { border-color: rgba(255, 90, 100, 0.55); }
.scoreboard { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: 36px; font-weight: 600; }
.scoreboard .blue { color: var(--blue); }
.scoreboard .red { color: var(--red); }
.scoreboard .vs { font: 600 14px var(--font); color: var(--dim-fg); }

.dteam { margin-bottom: 18px; overflow: hidden; }
.dteam.blue { border-top: 3px solid var(--blue); }
.dteam.red { border-top: 3px solid var(--red); }
.dteam-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.015); }
.dteam-head h2 { margin: 0; font-size: 16px; white-space: nowrap; }
.team-side { color: var(--muted-fg); font-weight: 600; }
.dteam.blue .team-side { color: var(--blue); }
.dteam.red .team-side { color: var(--red); }
.team-totals { display: flex; gap: 12px; font-size: 13px; color: var(--muted-fg); }
.objectives { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted-fg); }
.objectives span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.objectives img { width: 20px; height: 20px; object-fit: contain; }
.objectives b { color: var(--fg); font-family: var(--mono); }

.dcols,
.drow {
  display: grid;
  grid-template-columns: 44px 48px minmax(150px, 1.4fr) 104px minmax(120px, 1fr) 62px 72px 88px 204px;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
}
.dcols { padding-top: 10px; padding-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim-fg); }
.drow { border-top: 1px solid var(--border); font-size: 13.5px; transition: background 0.15s; }
.drow:hover { background: rgba(255, 255, 255, 0.025); }
.drow.is-focus { background: linear-gradient(90deg, rgba(0, 215, 194, 0.12), transparent 65%); box-shadow: inset 3px 0 0 var(--brand); }
.champ-d { width: 44px; height: 44px; border-radius: 9px; }
.d-loadout { display: grid; grid-template-columns: repeat(2, 22px); gap: 3px; }
.spell-d { width: 22px; height: 22px; border-radius: 5px; }
.rune-d { width: 22px; height: 22px; border-radius: 50%; background: #000; }
.rune-d.sub { padding: 4px; background: rgba(255, 255, 255, 0.06); }
.d-name { min-width: 0; }
.d-player { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-player span { color: var(--dim-fg); font-weight: 500; }
a.d-player:hover { color: var(--brand-light); }
.drow.is-focus .d-player { color: var(--brand-light); }
.d-sub { font-size: 12px; }
.d-vision .d-sub, .d-cs .d-sub { white-space: nowrap; }
.d-name .badges { margin-top: 4px; }
.dmgbar { height: 6px; margin-top: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.dmgbar span { display: block; height: 100%; border-radius: 99px; background: var(--muted-fg); }
.dteam.blue .dmgbar span { background: var(--blue); }
.dteam.red .dmgbar span { background: var(--red); }
.drow.is-focus .dmgbar span { background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.d-items { display: flex; gap: 3px; }

/* ---------- Descripción flotante (objetos, hechizos, runas) ---------- */

[data-tip] { cursor: help; }
.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: max-content;
  max-width: 340px;
  padding: 12px 14px;
  background: rgba(14, 14, 14, 0.97);
  border: 1px solid var(--brand-line);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65), 0 0 26px rgba(0, 215, 194, 0.12);
  color: var(--muted-fg);
  font-size: 13px;
  line-height: 1.55;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s, transform 0.12s;
}
.tooltip.show { opacity: 1; transform: none; }
.tt-head { display: flex; align-items: center; gap: 10px; }
.tt-icon { width: 38px; height: 38px; flex: none; border-radius: 8px; border: 1px solid var(--border-strong); }
.tt-icon.tt-round { border-radius: 50%; background: #000; }
.tt-name { color: var(--fg); font-weight: 800; font-size: 14.5px; line-height: 1.25; }
.tt-meta { font: 600 12px var(--mono); color: #e3b85b; }
.tt-label { max-width: 280px; margin-top: 4px; color: var(--muted-fg); font-size: 12.5px; line-height: 1.5; }
.badge[data-tip='label'] { cursor: help; }
.tt-body { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.tt-stats { display: block; color: var(--fg); padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.tt-hl { color: var(--fg); font-weight: 600; }
.tt-ability { color: var(--brand-light); font-weight: 700; }
.tt-magic { color: #7fa9ff; }
.tt-physical { color: #ff9f62; }
.tt-true { color: #fafafa; font-weight: 600; }
.tt-heal { color: #5fd68a; }
.tt-shield { color: #cfd8e3; }
.tt-armor { color: #f3c969; }
.tt-mr { color: #a98bff; }
.tt-speed { color: #f5d06b; }
.tt-mana { color: #6fb8ff; }
.tt-kw { color: #e3b85b; }
.tt-gold { color: #e3b85b; }
.tt-rules { font-style: italic; color: var(--dim-fg); }

/* ---------- Insignias ---------- */

.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 5px; }
.badge {
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
}
.badge-hot { color: #ffa24d; border-color: rgba(255, 128, 0, 0.4); background: rgba(255, 128, 0, 0.1); }
.badge-legend { color: var(--legendary); border-color: rgba(255, 128, 0, 0.45); background: rgba(255, 128, 0, 0.08); }
.badge-good { color: var(--brand-light); border-color: var(--brand-line); background: var(--brand-soft); }
.badge-bad { color: #ff8a92; border-color: rgba(251, 44, 54, 0.35); background: rgba(251, 44, 54, 0.08); }
.badge-warn { color: #f5c451; border-color: rgba(252, 187, 0, 0.35); background: rgba(252, 187, 0, 0.08); }
.badge-info { color: var(--muted-fg); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.03); }
.badge-multi { color: var(--epic); border-color: rgba(180, 100, 255, 0.4); background: rgba(180, 100, 255, 0.1); }
.m-kda .badge-multi { margin-top: 4px; }

/* ---------- En vivo ---------- */

.live-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.live-form > input { width: 240px; }

.live-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 14px 18px; margin-bottom: 18px; }
.live-title { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--loss); box-shadow: 0 0 10px var(--loss); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.live-timer { margin-left: auto; font-size: 20px; font-weight: 600; color: var(--brand-light); }

/* Consejos para la partida */
.advice { margin-bottom: 18px; }
.advice .card-title .muted { font-weight: 600; letter-spacing: normal; text-transform: none; }
.advice-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.4fr) minmax(260px, 1.2fr); gap: 22px; padding: 14px 16px 16px; }
.advice-sub { margin-bottom: 10px; font-weight: 800; font-size: 14px; }
.advice-sub .muted { font-weight: 500; }
.dmg-split { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, 0.06); }
.dmg-split .phys { background: #ff9f62; }
.dmg-split .mag { background: #7fa9ff; }
.dmg-legend { display: flex; justify-content: space-between; margin-top: 6px; font: 600 12px var(--mono); }
.dmg-legend .phys { color: #ff9f62; }
.dmg-legend .mag { color: #7fa9ff; }
.threats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.threat { padding: 3px 10px; border-radius: 12px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.03); color: var(--muted-fg); font-size: 12px; }
.threat b { color: var(--fg); }
.advice-row { padding: 9px 0; border-top: 1px solid var(--border); }
.advice-row:first-of-type { border-top: 0; padding-top: 0; }
.advice-title { font-weight: 700; font-size: 13.5px; }
.advice-title .muted { font-weight: 500; }
.advice-tip { margin: 2px 0 7px; font-size: 12.5px; color: var(--muted-fg); }
.advice-icons, .build-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.advice-none { margin: 0; font-size: 13px; }
.advice-link { display: inline-block; margin-top: 12px; font-size: 13px; }
.item-lg { width: 34px; height: 34px; border-radius: 7px; border: 1px solid var(--border-strong); }
.rune-lg { width: 34px; height: 34px; border-radius: 50%; background: #000; }
.rune-lg.sub { padding: 7px; background: rgba(255, 255, 255, 0.06); }
.spell-lg { width: 34px; height: 34px; border-radius: 7px; }
.build-meta { margin: -4px 0 4px; font-size: 12.5px; }
.build-row { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.build-label { flex: none; width: 66px; font-size: 12px; color: var(--muted-fg); }
.build-item { position: relative; }
.build-count {
  position: absolute;
  right: -4px;
  bottom: -4px;
  padding: 0 4px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  font: 600 10px var(--mono);
}

/* Ventanita encima del juego */
.mini-launch { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; padding: 13px 18px; margin-bottom: 18px; font-size: 14px; }
.mini-launch > div { flex: 1; min-width: 240px; }
.mini-launch .muted { font-size: 12.5px; margin-top: 2px; }
.mini-launch .mini-old { flex-basis: 100%; margin: 0; color: #f5c451; }
.mini { background-image: none; }
.mini .topbar, .mini footer, .mini #banner, .mini .window-edge { display: none; }
.mini main { max-width: none; padding: 0; }
.mini-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding-left: 12px;
  background: #101212;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  cursor: move;
  user-select: none;
}
.mini-score { min-width: 0; margin-left: auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11.5px; color: var(--muted-fg); font-family: var(--mono); }
.mini-score .gold { color: #f5c451; }
.mini-title { flex: none; color: var(--muted-fg); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
/* La de objetivos y la de hechizos se ajustan solas a lo que muestran: sin barra de desplazamiento ni bordes para agrandar */
.mini-autosize .page { overflow: hidden; }
.mini-autosize .mini-edges { display: none; }
.mini-btn { display: grid; place-items: center; min-width: 30px; height: 34px; padding: 0 6px; border: 0; background: transparent; color: var(--muted-fg); font: 600 11px var(--mono); cursor: pointer; }
.mini-btn svg { width: 12px; height: 12px; }
.mini-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--fg); }
.mini-locked-hint { display: none; position: sticky; bottom: 0; padding: 5px 10px; background: rgba(16, 18, 18, 0.95); border-top: 1px solid var(--border); font-size: 11px; color: var(--muted-fg); text-align: center; }
.mini-locked .mini-locked-hint { display: block; }
.mini-locked .mini-bar { cursor: default; }
.mini-locked .mini-btn, .mini-locked .mini-close, .mini-locked .mini-refresh { opacity: 0.35; }
.mini-hint-peek, .mini-peek .mini-hint-locked { display: none; }
.mini-peek .mini-hint-peek { display: inline; }
.mini-peek .mini-locked-hint { color: var(--fg); }
.mini-locked #miniLock, .mini-locked.mini-peek #miniLock { opacity: 1; color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.mini-close { display: grid; place-items: center; width: 38px; height: 34px; border: 0; background: transparent; color: var(--muted-fg); cursor: pointer; }
.mini-close svg { width: 10px; height: 10px; }
.mini-close:hover { background: #c42b1c; color: #fff; }
.mini-body { padding: 10px 12px 12px; }
.mini-wait { margin: 16px 0; text-align: center; font-size: 13px; line-height: 1.5; }
.mini-rival { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.mini-champ { width: 36px; height: 36px; border-radius: 8px; flex: none; }
.mini-who { min-width: 0; }
.mini-diff { font-size: 12px; color: var(--muted-fg); margin-top: 1px; }
.mini-items { margin-top: 7px; }
.mini-stats { margin-top: 5px; font-size: 11.5px; }
#miniTip:not(:empty) { margin-top: 7px; }
.mini-buy { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); border-radius: 0; }
.mini-buy.fresh { animation: fresh-glow 2.4s ease-out; border-radius: 8px; }
.mini-sub { margin-bottom: 7px; font-weight: 800; font-size: 13px; }
.mini-sub .muted { font-weight: 500; font-size: 11.5px; }
.mini-option { display: flex; align-items: flex-start; gap: 9px; padding: 6px 0; border-top: 1px solid var(--border); }
.mini-option:first-of-type { border-top: 0; padding-top: 0; }
.mini-option .advice-icons { flex: none; gap: 4px; }
.mini-option-title { font-weight: 700; font-size: 12.5px; }
.mini-option-tip { font-size: 11.5px; color: var(--muted-fg); line-height: 1.35; }
.item-md { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border-strong); }
.mini-ai { margin-top: 9px; padding: 8px 10px; }
.mini-ai .ai-line { font-size: 12px; }
.mini-refresh { margin-top: 9px; padding: 4px 10px; font-size: 12px; }
/* La explicación de Fichado AI se oculta o se muestra tocando su título */
.mini-ai .advice-sub { display: flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
.mini-ai .advice-sub::after { content: 'Ocultar ▴'; margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted-fg); }
.mini-ai .advice-sub:hover::after { color: var(--brand-light); }
.mini-ai.collapsed { padding-top: 6px; padding-bottom: 6px; }
.mini-ai.collapsed .advice-sub { margin-bottom: 0; }
.mini-ai.collapsed .advice-sub::after { content: 'Mostrar ▾'; }
.mini-ai.collapsed > :not(.advice-sub) { display: none; }
/* Bordes y esquina para cambiar el tamaño de la ventanita */
.mini-edges span { position: fixed; z-index: 60; }
.mini-edges [data-edge='top'] { top: 0; left: 10px; right: 10px; height: 4px; cursor: ns-resize; }
.mini-edges [data-edge='bottom'] { bottom: 0; left: 10px; right: 16px; height: 6px; cursor: ns-resize; }
.mini-edges [data-edge='left'] { top: 10px; bottom: 10px; left: 0; width: 6px; cursor: ew-resize; }
.mini-edges [data-edge='right'] { top: 10px; bottom: 16px; right: 0; width: 6px; cursor: ew-resize; }
.mini-edges [data-edge='topleft'] { top: 0; left: 0; width: 10px; height: 10px; cursor: nwse-resize; }
.mini-edges [data-edge='topright'] { top: 0; right: 0; width: 10px; height: 4px; cursor: nesw-resize; }
.mini-edges [data-edge='bottomleft'] { bottom: 0; left: 0; width: 10px; height: 10px; cursor: nesw-resize; }
.mini-grip { right: 0; bottom: 0; display: grid; place-items: center; width: 16px; height: 16px; color: var(--muted-fg); cursor: nwse-resize; transition: color 0.15s; }
.mini-grip svg { width: 10px; height: 10px; }
.mini-grip:hover { color: var(--brand-light); }
.mini-locked .mini-edges { display: none; }

/* Parche */
.nav a.has-news { position: relative; }
.nav a.has-news::after { content: ''; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px var(--brand); }
.patch-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.patch-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.03); color: var(--muted-fg); font: 600 13px var(--font, inherit); cursor: pointer; }
.patch-chip span { margin-left: 4px; font-family: var(--mono); opacity: 0.75; }
.patch-chip.on { color: var(--fg); border-color: var(--brand); background: var(--brand-soft); }
.patch-chip.kind-buff.on { border-color: var(--win); background: rgba(0, 200, 120, 0.1); }
.patch-chip.kind-nerf.on { border-color: #ff6b75; background: rgba(251, 44, 54, 0.1); }
.patch-highlights { margin-bottom: 18px; padding: 12px 16px; }
.patch-highlights summary, .patch-text summary { cursor: pointer; font-weight: 800; font-size: 15px; }
.patch-highlights-img { width: 100%; height: auto; margin-top: 12px; border-radius: 8px; }
.patch-section { margin-bottom: 22px; }
.patch-section > h2 { margin: 0 0 12px; font-size: 20px; }
/* Un bloque por tipo de cambio, cada uno con su color */
.patch-kind-section { --kind: var(--muted-fg); margin-bottom: 28px; }
.patch-kind-section.kind-buff { --kind: var(--win); }
.patch-kind-section.kind-nerf { --kind: #ff6b75; }
.patch-kind-section.kind-rework { --kind: #b794ff; }
.patch-kind-section > h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--kind); font-size: 21px; color: var(--kind); }
.patch-kind-section > h2 .muted { font-size: 13px; font-weight: 600; }
.kind-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--kind); box-shadow: 0 0 10px var(--kind); }
.patch-subtitle { margin: 14px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-fg); }
.patch-kind-section .patch-card { border-left: 3px solid var(--kind); }
.patch-text { margin-bottom: 10px; }
.patch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.patch-card { padding: 14px 16px; }
.patch-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 15px; }
.patch-icon { width: 38px; height: 38px; border-radius: 8px; flex: none; }
.patch-kind { margin-left: 4px; }
.kind-buff.badge { color: var(--win); border-color: rgba(0, 200, 120, 0.45); background: rgba(0, 200, 120, 0.1); }
.kind-nerf.badge { color: #ff8a92; border-color: rgba(251, 44, 54, 0.4); background: rgba(251, 44, 54, 0.08); }
.kind-ajuste.badge { color: var(--muted-fg); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.04); }
.kind-rework.badge { color: #c4a7ff; border-color: rgba(160, 120, 255, 0.45); background: rgba(160, 120, 255, 0.1); }
.patch-ai { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; }
.patch-context { margin: 0 0 10px; font-size: 12.5px; line-height: 1.45; font-style: italic; }
.patch-detail { margin-top: 8px; }
.patch-detail-title { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; }
.patch-ability { width: 22px; height: 22px; border-radius: 5px; }
.patch-detail ul, .patch-group ul { margin: 5px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.45; }
.patch-detail li, .patch-group li { margin-bottom: 3px; }
.pc-label { color: var(--muted-fg); }
.pc-arrow { color: var(--brand-light); }
.patch-text { padding: 13px 16px; }
.patch-text[open] summary { margin-bottom: 8px; }
.patch-group { margin-top: 10px; }
.patch-extra { margin-top: 12px; }

/* Análisis de Fichado AI en el perfil */
.coach-pick { display: flex; align-items: stretch; gap: 8px; }
/* Botones de línea con su ícono (el elegido se ilumina) */
.lane-picker { display: flex; padding: 3px; gap: 2px; border-radius: 11px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.03); }
.lane-picker button {
  display: grid;
  place-items: center;
  min-width: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-fg);
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.15s, box-shadow 0.18s;
}
.lane-picker button img { width: 18px; height: 18px; opacity: 0.6; transition: opacity 0.18s, transform 0.18s; }
.lane-picker button:hover { background: rgba(255, 255, 255, 0.06); color: var(--fg); }
.lane-picker button:hover img { opacity: 0.95; transform: scale(1.12); }
.lane-picker button:active { transform: scale(0.92); }
.lane-picker button.on { background: var(--brand-soft); color: var(--brand-light); box-shadow: inset 0 0 0 1px var(--brand-line), 0 0 14px rgba(0, 215, 194, 0.18); }
.lane-picker button.on img { opacity: 1; filter: drop-shadow(0 0 4px rgba(0, 215, 194, 0.7)); }
.coach { margin-bottom: 18px; padding: 16px 18px; border-color: rgba(138, 120, 255, 0.35); background: linear-gradient(135deg, rgba(110, 90, 255, 0.07), rgba(0, 215, 194, 0.04)); }
.coach .card-title { padding: 0; margin-bottom: 8px; }
.coach .card-title .muted { font-weight: 500; letter-spacing: normal; text-transform: none; }
.coach-summary { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.coach-elo { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 190, 60, 0.07); border: 1px solid rgba(255, 190, 60, 0.3); }
.coach-elo-label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #ffd166; }
.coach-elo b { font-size: 18px; }
.coach-elo .muted { flex-basis: 100%; font-size: 12.5px; }
.coach-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.coach-sub { margin-bottom: 6px; font-weight: 800; font-size: 13.5px; }
.coach-sub.good { color: var(--win); }
.coach-sub.bad { color: #ff8a92; }
.coach-sub.tip { color: var(--brand-light); }
.coach-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.45; }
.coach-list li { margin-bottom: 6px; }
.coach-champs { margin: 12px 0 0; font-size: 13px; }
@media (max-width: 900px) { .coach-grid { grid-template-columns: 1fr; } }

/* Análisis de la partida (detalle de partida) */
.postgame { margin-bottom: 18px; }
.postgame > .card-title .muted { color: var(--dim-fg); letter-spacing: 0.02em; text-transform: none; font-weight: 600; }
.pg-wait { display: flex; align-items: center; gap: 8px; margin: 0; }
.pg-ai { margin-bottom: 16px; padding: 14px 16px; border: 1px solid rgba(138, 120, 255, 0.35); border-radius: 12px; background: linear-gradient(135deg, rgba(110, 90, 255, 0.08), rgba(0, 215, 194, 0.04)); }
.pg-ai:has(> .btn:only-child), .pg-ai:has(> p:only-child) { padding: 12px 16px; }
.pg-ai.fresh { animation: fresh-glow 2.4s ease-out; }
.pg-ai-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.pg-score { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border: 3px solid; border-radius: 50%; line-height: 1; animation: pop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.pg-score b { font: 800 24px var(--mono); }
.pg-score span { margin-top: -6px; font-size: 11px; color: var(--muted-fg); }
.pg-score.good { border-color: var(--brand); color: var(--brand-light); box-shadow: 0 0 18px rgba(0, 215, 194, 0.25); }
.pg-score.mid { border-color: #f5c451; color: #f5c451; }
.pg-score.bad { border-color: var(--loss); color: #ff8a92; }
.pg-summary { margin: 0; font-size: 14.5px; line-height: 1.5; }
.pg-ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pg-line { margin: 10px 0 0; font-size: 13.5px; line-height: 1.45; }
.pg-tip { padding: 9px 12px; border-radius: 9px; background: var(--brand-soft); border: 1px solid var(--brand-line); }
.pg-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.pg-tile { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255, 255, 255, 0.025); animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.pg-tile:nth-child(2) { animation-delay: 0.04s; }
.pg-tile:nth-child(3) { animation-delay: 0.08s; }
.pg-tile:nth-child(4) { animation-delay: 0.12s; }
.pg-tile:nth-child(n + 5) { animation-delay: 0.16s; }
.pg-label { font-size: 12px; color: var(--muted-fg); }
.pg-tile b { font: 700 19px var(--mono); }
.pg-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 12px; color: var(--dim-fg); }
.pg-sub .item { width: 18px; height: 18px; border-radius: 4px; }
.pg-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.pg-chart { padding: 12px 14px 6px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.pg-deaths { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-death { padding: 4px 10px; border: 1px solid var(--border); border-radius: 99px; background: rgba(255, 255, 255, 0.03); font-size: 12.5px; }
.pg-death b { color: var(--muted-fg); }
.pg-death.many { border-color: rgba(255, 90, 100, 0.4); background: rgba(255, 90, 100, 0.06); }
@media (max-width: 760px) { .pg-ai-grid { grid-template-columns: 1fr; } }

/* Análisis del equipo entero: la culpa y cada compañero */
.pg-blame { margin: 0 0 14px; padding: 10px 13px; border: 1px solid rgba(255, 90, 100, 0.35); border-radius: 10px; background: rgba(255, 90, 100, 0.06); }
.pg-blame p { margin: 0; font-size: 14px; line-height: 1.5; }
.pg-team { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 12px; }
.pg-mate {
  display: grid;
  grid-template-columns: 40px minmax(150px, 220px) 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.pg-mate.me { border-color: var(--brand-line); background: var(--brand-soft); }
.pg-mate.perjudico { border-color: rgba(255, 90, 100, 0.5); background: rgba(255, 90, 100, 0.07); }
.pg-mate.mejor { border-color: rgba(255, 196, 81, 0.45); }
.pg-mate-champ { width: 40px; height: 40px; border-radius: 9px; }
.pg-mate-who { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; font-size: 13px; }
.pg-mate-who .muted { overflow: hidden; max-width: 100%; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.pg-mate-who .you { margin-left: 4px; }
.pg-mate-note { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid; border-radius: 50%; font: 800 15px var(--mono); }
.pg-mate-note.good { border-color: var(--brand); color: var(--brand-light); }
.pg-mate-note.mid { border-color: #f5c451; color: #f5c451; }
.pg-mate-note.bad { border-color: var(--loss); color: #ff8a92; }
.pg-mate-text p { margin: 2px 0; font-size: 12.5px; line-height: 1.4; }
.pg-you-title { margin-top: 16px; }
.pg-team-ask { margin-top: 12px; }
@media (max-width: 760px) {
  .pg-mate { grid-template-columns: 40px minmax(0, 1fr) 36px; }
  .pg-mate-text { grid-column: 1 / -1; }
}

/* Los números de los 10 (para comparar) */
.pg-side.blue::before, .pg-side.red::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; vertical-align: 1px; }
.pg-side.blue::before { background: var(--blue); }
.pg-side.red::before { background: var(--red); }
.pg-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 16px; }
.pg-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pg-table th { padding: 4px 6px; color: var(--muted-fg); font-size: 11px; font-weight: 700; text-align: right; }
.pg-table td { padding: 4px 6px; border-top: 1px solid var(--border); text-align: right; white-space: nowrap; }
.pg-table td:first-child, .pg-table th:first-child { text-align: left; }
.pg-table tr.me td { background: var(--brand-soft); }
.pg-table-who { display: flex; align-items: center; gap: 7px; }
.pg-table-who .champ-sm { width: 24px; height: 24px; border-radius: 6px; }

/* Cartel al terminar la partida: el análisis está listo */
.pg-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(440px, calc(100vw - 40px));
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--brand);
  border-radius: 12px;
  background: rgba(20, 20, 20, 0.97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  animation: toast-in 0.45s cubic-bezier(0.2, 0.9, 0.1, 1) backwards;
}
.pg-toast.loss { border-left-color: var(--loss); }
.pg-toast-champ { width: 42px; height: 42px; flex: none; border-radius: 10px; }
.pg-toast-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.pg-toast-close { flex: none; width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--muted-fg); font-size: 18px; cursor: pointer; }
.pg-toast-close:hover { background: rgba(255, 255, 255, 0.06); color: var(--fg); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.97); } }

/* Posible smurf */
.badge-smurf { color: #ffd166; border-color: rgba(255, 190, 60, 0.55); background: rgba(255, 170, 0, 0.14); font-weight: 800; }
.smurf-alert { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 11px 16px; margin-bottom: 14px; border-color: rgba(255, 190, 60, 0.45); background: linear-gradient(90deg, rgba(255, 170, 0, 0.1), transparent 70%); font-size: 13.5px; }
.smurf-alert > b { color: #ffd166; }
.smurf-who { display: inline-flex; align-items: center; gap: 6px; }
.smurf-champ { width: 22px; height: 22px; border-radius: 5px; }
.smurf-status { margin: 0 0 12px; font-size: 12.5px; }

/* Picks recomendados en la selección de campeones */
.pick-reasons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.chip { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid; white-space: nowrap; }
.chip.good { color: var(--brand-light); border-color: var(--brand-line); background: var(--brand-soft); }
.chip.bad { color: #ff8a92; border-color: rgba(251, 44, 54, 0.35); background: rgba(251, 44, 54, 0.08); }
.cs-pick.is-mine { box-shadow: inset 3px 0 0 var(--brand); }
.cs-duo { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.duo-head { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Tu campeón contra tu rival de línea (OP.GG) */
.matchup-flags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 2px; }
.matchup-tip { margin: 10px 0 0; padding: 9px 11px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); font-size: 12.5px; line-height: 1.45; color: var(--muted-fg); }
.matchup-tip b { color: var(--fg); }
.skill-order { display: inline-block; padding: 5px 10px; border-radius: 7px; background: rgba(255, 255, 255, 0.05); font-weight: 600; }
.cs-matchup { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }

/* Partida en curso (datos en vivo del juego) */
.game-panel { margin-bottom: 18px; border-top: 3px solid var(--brand); }
.game-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 13px 18px; border-bottom: 1px solid var(--border); font-size: 14.5px; }

/* Tiempos de los objetivos (panel de la partida y ventanita) */
.obj-timers { display: flex; flex-wrap: wrap; gap: 6px; }
.obj-timers:empty { display: none; }
.obj-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 4px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  white-space: nowrap;
  transition: border-color 0.3s, background 0.3s;
}
.obj-chip b { font-size: 12px; }
.obj-ico { width: 20px; height: 20px; flex: none; }
.obj-ico.neutral { filter: grayscale(1) brightness(1.35); opacity: 0.85; }
.obj-label { color: var(--muted-fg); }
.obj-chip.soon { border-color: rgba(245, 196, 81, 0.55); background: rgba(245, 196, 81, 0.08); animation: obj-pulse 1.6s ease-in-out infinite; }
.obj-chip.soon b { color: #f5c451; }
.obj-chip.alive { border-color: var(--brand-line); background: var(--brand-soft); }
.obj-chip.alive b { color: var(--brand-light); }
/* Verde si te conviene (buff tuyo, inhibidor rival caído); rojo si no */
.obj-chip.buff.ally, .obj-chip.inhib.enemy { border-color: var(--brand-line); background: var(--brand-soft); }
.obj-chip.buff.ally b, .obj-chip.inhib.enemy b { color: var(--brand-light); }
.obj-chip.buff.enemy, .obj-chip.inhib.ally { border-color: rgba(255, 90, 100, 0.45); background: rgba(255, 90, 100, 0.08); }
.obj-chip.buff.enemy b, .obj-chip.inhib.ally b { color: #ff8a92; }
@keyframes obj-pulse { 50% { box-shadow: 0 0 0 3px rgba(245, 196, 81, 0.16); } }
.game-timers { padding: 10px 18px; border-bottom: 1px solid var(--border); }
.game-timers:empty { display: none; }
/* Plegada: arriba el marcador (se toca para ver todo lo demás). */
.game-top { display: flex; align-items: center; gap: 10px; padding-right: 16px; border-bottom: 1px solid transparent; cursor: pointer; transition: background 0.15s, border-color 0.3s; }
.game-top:hover { background: rgba(255, 255, 255, 0.025); }
.game-top:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.game-top .game-head { flex: 1; min-width: 0; border-bottom: 0; }
.game-panel.open .game-top { border-bottom-color: var(--border); }
.game-more-btn { display: inline-flex; flex: none; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted-fg); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: color 0.15s, border-color 0.15s; }
.game-top:hover .game-more-btn { color: var(--fg); border-color: rgba(255, 255, 255, 0.18); }
.game-more-btn svg { width: 12px; height: 12px; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.game-panel.open .game-more-btn svg { transform: rotate(180deg); }
.game-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.game-panel.open .game-more { grid-template-rows: 1fr; }
.game-more-inner { min-height: 0; overflow: hidden; }
/* En vivo: primero la barra de "En vivo" y los 10 jugadores, después la partida en curso (marcador y "Ver todo")
   y al final los consejos, que plegada no se ven. */
.live-stack { display: flex; flex-direction: column; }
.live-stack > #liveResult { display: contents; }
.live-stack .live-head { order: 1; }
.live-stack #smurfAlert { order: 2; }
.live-stack .teams-grid { order: 3; }
.live-stack > #ingamePanel { order: 4; }
.live-stack .card.advice { order: 5; }
.live-stack.folded .card.advice { display: none; }
.game-panel:not(.open) .game-more-inner { visibility: hidden; transition: visibility 0s 0.35s; }
.mini-timers { padding: 8px 10px 0; gap: 5px; }
.mini-timers .obj-label { display: none; }
.mini-timers .buff .obj-label { display: inline; font-size: 11px; }
.mini-timers .obj-chip { padding: 2px 7px 2px 3px; }
body[data-timers='off'] #miniTimers { display: none; }

/* Ventanita de tiempos del mapa: uno abajo del otro, con nombre */
.obj-list { flex-direction: column; align-items: stretch; gap: 5px; }
.obj-list .obj-chip { border-radius: 9px; padding: 5px 10px 5px 6px; font-size: 13px; }
.obj-list .obj-chip b { margin-left: auto; padding-left: 10px; font-size: 14px; }
.obj-list .obj-ico { width: 24px; height: 24px; }
.mini-tiempos .mini-body, .mini-hechizos .mini-body { padding: 8px 9px 10px; }

/* Ventanita de hechizos rivales: tocar un hechizo cuenta su enfriamiento */
.sp-list { display: flex; flex-direction: column; gap: 6px; }
.sp-row { display: flex; align-items: center; gap: 8px; }
.sp-champ { width: 32px; height: 32px; flex: none; border-radius: 8px; }
.sp-who { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.2; }
.sp-who b { overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.sp-who .muted { font-size: 11px; }
.sp-boots { color: var(--brand-light); font-weight: 700; }
.sp-spells { display: flex; gap: 5px; }
.sp-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #111;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s, box-shadow 0.2s;
}
.sp-btn:hover { border-color: var(--brand-line); transform: translateY(-1px); }
.sp-btn:active { transform: scale(0.92); }
.sp-icon { width: 100%; height: 100%; object-fit: cover; transition: filter 0.2s; }
.sp-time { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px #000, 0 0 2px #000; }
.sp-btn.cd { border-color: rgba(255, 90, 100, 0.65); }
.sp-btn.cd .sp-icon { filter: grayscale(1) brightness(0.38); }
.sp-btn.soon { border-color: rgba(245, 196, 81, 0.75); }
.sp-btn.soon .sp-time { color: #f5c451; }
.sp-btn.ready { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(0, 215, 194, 0.35), 0 0 14px rgba(0, 215, 194, 0.55); animation: pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sp-unknown { display: grid; place-items: center; width: 34px; height: 34px; border: 1px dashed var(--border-strong); border-radius: 8px; color: var(--dim-fg); cursor: default; }
.sp-hint { margin: 8px 0 0; font-size: 11px; text-align: center; }

/* ---------- Pantalla Overlay (configurar las ventanitas) ---------- */
.ov-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-old { margin: -8px 0 16px; color: #f5c451; }
.ov-old:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.ov-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; transition: border-color 0.2s, box-shadow 0.2s; }
.ov-card:hover { border-color: var(--border-strong); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); }
.ov-card .ov-preview, .ov-card .ov-settings, .ov-card .ov-actions { transition: opacity 0.2s; }
.ov-card.off .ov-preview, .ov-card.off .ov-settings, .ov-card.off .ov-actions { opacity: 0.35; pointer-events: none; }
.ov-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ov-card-head h3 { margin: 0 0 4px; font-size: 17px; }
.ov-card-head p { margin: 0; font-size: 13px; }
/* Un "juego" de fondo para ver la transparencia */
.ov-preview {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    radial-gradient(120px 90px at 22% 30%, rgba(70, 140, 80, 0.55), transparent 70%),
    radial-gradient(140px 100px at 78% 70%, rgba(150, 110, 50, 0.5), transparent 70%),
    linear-gradient(135deg, #1c2a20, #2a2416 55%, #1a2333);
}
.ov-preview-panel { width: 230px; padding: 9px; border: 1px solid var(--border-strong); border-radius: 9px; background: rgba(16, 18, 18, 0.96); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); transition: opacity 0.2s; }
.ov-mock { font-size: 13px; }
.ov-mock .mini-sub { margin: 9px 0 3px; }
.ov-settings { display: flex; flex-direction: column; gap: 10px; }
.ov-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.ov-row-wide { flex-wrap: wrap; }
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.seg button { padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--muted-fg); font: 600 12px var(--mono); cursor: pointer; transition: background 0.15s, color 0.15s; }
.seg button:hover { color: var(--fg); }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.ov-actions { display: flex; gap: 8px; }
.game-score { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-left: auto; font-size: 13px; color: var(--muted-fg); }
.game-score b { color: var(--fg); margin-left: 4px; }
.game-score .gold { color: #f5c451; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; padding: 14px 18px 16px; }
.game-options { position: relative; border-radius: 10px; }
.game-options.fresh { animation: fresh-glow 2.4s ease-out; }
@keyframes fresh-glow { from { box-shadow: 0 0 0 6px rgba(0, 215, 194, 0.35); background: rgba(0, 215, 194, 0.06); } }
.game-refresh { margin-top: 10px; }
/* Fichado AI sin clave: qué hacer. */
.ai-setup-title { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; font-weight: 700; }
.ai-setup-spark { color: #a99bff; }
.ai-setup p { margin: 0 0 8px; font-size: 13px; }
.ai-setup-steps { margin: 0 0 12px; padding-left: 20px; font-size: 13px; line-height: 1.75; color: var(--muted-fg); }
.ai-setup-steps b { color: var(--fg); }
.ai-setup-line { display: inline-block; margin-top: 6px; font-size: 12.5px; }
p.ai-setup-line { display: block; margin: 9px 0 0; font-size: 11.5px; line-height: 1.4; }
.coach .ai-setup { margin-top: 4px; }
/* Cuando Fichado AI no puede responder: qué pasó y qué hacer */
.ai-error { --tone: #f2c53d; margin: 2px 0 12px; }
.ai-error:last-child { margin-bottom: 0; }
.ai-error.bad, .ai-error-line.bad { --tone: var(--loss); }
.ai-error-title { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; font-size: 14px; font-weight: 700; }
.ai-error-icon { flex: none; color: var(--tone); }
.ai-error p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: var(--muted-fg); }
.ai-error p:last-child { margin-bottom: 0; }
.ai-error-line { --tone: #f2c53d; display: flex; align-items: flex-start; gap: 7px; margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted-fg); }
.ai-error-line .ai-error-icon { margin-top: 1px; }
.ai-error-line b { color: var(--fg); }
.mini-ai .ai-error-line { font-size: 11.5px; }
.ai-settings-focus { animation: ai-focus 1.6s ease-out; }
@keyframes ai-focus { 0%, 40% { box-shadow: 0 0 0 2px var(--brand), 0 0 24px rgba(0, 215, 194, 0.35); } 100% { box-shadow: 0 0 0 0 transparent; } }
.ai-box { margin-top: 12px; padding: 11px 13px; border-radius: 10px; border: 1px solid rgba(138, 120, 255, 0.35); background: linear-gradient(135deg, rgba(110, 90, 255, 0.09), rgba(0, 215, 194, 0.05)); }
.ai-box .advice-sub { margin-bottom: 6px; }
.ai-line { margin: 0 0 6px; font-size: 13px; line-height: 1.45; }
.ai-line:last-child { margin-bottom: 0; }
.ai-line b { color: var(--brand-light); }
.rival-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rival-head .champ-sm { width: 40px; height: 40px; }
.rival-cmp { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.rival-cmp th { text-align: left; font-size: 12px; color: var(--muted-fg); font-weight: 600; padding: 0 8px 4px 0; }
.rival-cmp td { padding: 3px 8px 3px 0; border-top: 1px solid var(--border); }
.rival-cmp td:last-child { font-size: 12px; text-align: right; padding-right: 0; }
.rival-stats { margin-top: 8px; font-size: 12px; }
.game-enemies { padding: 4px 18px 14px; border-top: 1px solid var(--border); }
.game-enemies .advice-sub { margin: 10px 0 6px; }
.enemy-row { display: grid; grid-template-columns: 30px minmax(110px, 1fr) 150px minmax(0, 1.4fr) minmax(0, 1.3fr); align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.enemy-row:first-of-type { border-top: 0; }
.enemy-row.dead { opacity: 0.55; }
.enemy-who { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; }
.enemy-who .muted { font-size: 12px; }
.enemy-kda { font-size: 13px; white-space: nowrap; }
.enemy-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.badge-heal { color: #7be3a0; border-color: rgba(60, 200, 120, 0.4); background: rgba(60, 200, 120, 0.08); }
.badge-ap { color: #9ab8ff; border-color: rgba(90, 140, 255, 0.4); background: rgba(90, 140, 255, 0.08); }
.badge-ad { color: #ffb37a; border-color: rgba(255, 140, 60, 0.4); background: rgba(255, 140, 60, 0.08); }
@media (max-width: 900px) {
  .game-grid { grid-template-columns: 1fr; }
  .enemy-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .enemy-row .build-icons, .enemy-row .enemy-tags { grid-column: 2 / -1; }
}

/* Fase de pick */
.live-dot.pick { background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.cs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 14px; }
.cs-team { padding-bottom: 6px; overflow: hidden; }
.cs-team.blue { border-top: 3px solid var(--blue); }
.cs-team.red { border-top: 3px solid var(--red); }
.cs-slot { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.cs-slot + .cs-slot { border-top: 1px solid var(--border); }
.cs-team .card-title { padding-bottom: 8px; }
.cs-slot.is-me { background: linear-gradient(90deg, rgba(0, 215, 194, 0.1), transparent 70%); box-shadow: inset 3px 0 0 var(--brand); }
.cs-champ { width: 44px; height: 44px; flex: none; border-radius: 9px; }
.cs-champ.intent { opacity: 0.45; filter: grayscale(0.6); }
.cs-who { min-width: 0; }
.cs-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-sub { font-size: 12px; }
.cs-help { padding: 14px 16px 16px; }
.cs-label { margin: 12px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-fg); }
.cs-label:first-child { margin-top: 2px; }
.cs-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cs-pick { display: flex; align-items: center; gap: 10px; }
.cs-pick .badge { margin-top: 2px; }
.cs-rate { margin-left: auto; text-align: right; font-size: 13px; }
.cs-rate .muted { font-size: 11.5px; }
.cs-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.cs-tip { margin-top: 8px; }
/* ARAM: Caos: qué mejoras elegir (S = las más elegidas y probadas) */
.aug-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.aug-row { display: flex; align-items: flex-start; gap: 9px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255, 255, 255, 0.025); animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(var(--i, 0) * 30ms); }
.aug-tier { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 6px; font: 800 12px var(--mono); }
/* Notas de las mejoras como las de iTero: oscuras, con el borde y la letra del color y apenas un tinte de fondo. */
.aug-tier {
  --c: #9aa0aa;
  width: 26px;
  border: 1px solid var(--c);
  background: color-mix(in srgb, var(--c) 16%, #0c0e11);
  color: color-mix(in srgb, var(--c) 88%, #fff);
  font: 800 12px var(--font);
}
.aug-tier.g0 { --c: #ff5468; border-color: #ffcd50; box-shadow: 0 0 6px rgba(255, 205, 80, 0.5); }
.aug-tier.g1 { --c: #ff9640; }
.aug-tier.g2 { --c: #f2c53d; }
.aug-tier.g3 { --c: #3ccf87; }
.aug-tier.g4 { --c: #4ea3ff; }
.aug-tier.g5 { --c: #9aa0aa; }
.ov-cards { margin-top: 14px; }
.ov-cards h3 .badge { margin-left: 6px; vertical-align: 2px; }
.ov-cards-demo { display: flex; justify-content: center; gap: 14px; padding: 26px 12px 16px; border-radius: 10px; background: radial-gradient(ellipse at top, rgba(140, 110, 200, 0.16), transparent 70%), rgba(0, 0, 0, 0.25); }
.ov-cards-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 120px; padding: 0 8px 14px; border: 2px solid rgba(190, 170, 235, 0.55); border-radius: 8px; background: #0d161b; font-size: 12px; text-align: center; }
.ov-cards-card .aug-tier { width: 38px; height: 26px; margin-top: -14px; font-size: 14px; }
.ov-cards-best { position: absolute; top: -34px; padding: 1px 6px; border: 1px solid #ffcd50; border-radius: 4px; background: color-mix(in srgb, #ffcd50 16%, #0c0e11); color: #ffcd50; font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; }
.aug-text { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; font-size: 13px; line-height: 1.3; }
.aug-text .muted { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 11.5px; }
.aug-pick { flex: none; padding-top: 2px; color: var(--muted-fg); font-size: 12px; }
.aram-build-title { margin-top: 4px; }
.mini .aug-row { padding: 5px 7px; }
.mini .aug-text { font-size: 12px; }
.mini .aug-text .muted { -webkit-line-clamp: 1; }
/* Oro en objetos de los dos equipos en el marcador */
.team-gold { font-family: var(--mono); font-weight: 700; }
.mini-score .team-gold { font-size: 11.5px; }

/* Importar runas, hechizos y build al cliente */
.cs-section.cs-import { margin: 0 0 14px; padding: 0 0 14px; border-top: 0; border-bottom: 1px solid var(--border); }
.cs-import-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 14px; font-size: 14px; }
.cs-import-btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.2s ease; }
.cs-import-btn:hover:not(:disabled) svg { transform: translateY(2px); }
.cs-import-btn.busy svg { animation: blink 0.9s ease-in-out infinite; }
.cs-import-note { margin-top: 6px; font-size: 12px; text-align: center; }
.cs-import-result:not(:empty) { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255, 255, 255, 0.02); }
.cs-import-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 12.5px; line-height: 1.4; animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.cs-import-line:nth-child(2) { animation-delay: 0.08s; }
.cs-import-line:nth-child(3) { animation-delay: 0.16s; }
.cs-import-line .spell { width: 18px; height: 18px; border-radius: 4px; }
.cs-import-mark { display: grid; place-items: center; flex: none; width: 17px; height: 17px; border-radius: 50%; font-size: 10px; font-weight: 800; }
.cs-import-line.ok .cs-import-mark { background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 1px var(--brand-line); }
.cs-import-line.bad .cs-import-mark { background: rgba(255, 90, 100, 0.12); color: var(--loss); }
.cs-import-line.bad { color: #ff8a92; }
.spinner-sm { display: inline-block; width: 14px; height: 14px; margin: 0; border-width: 2px; }
.cs-source { margin: 12px 0 0; font-size: 11.5px; }
.cs-bans { display: flex; align-items: center; gap: 5px; margin-bottom: 18px; font-size: 12px; }
.cs-bans .muted { margin-right: 4px; }
.cs-bans .ban.enemy { box-shadow: 0 0 0 1px rgba(224, 74, 74, 0.6); }
.cs-bans .ban.ally { box-shadow: 0 0 0 1px rgba(58, 165, 217, 0.6); }

.team { margin-bottom: 20px; }
.team-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.team-head h2 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; }
.team.blue h2 { color: var(--blue); }
.team.red h2 { color: var(--red); }
.bans { display: flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12px; }
.bans .muted { margin-right: 4px; }
.ban { width: 24px; height: 24px; border-radius: 5px; filter: grayscale(1); opacity: 0.65; }

.lp {
  display: grid;
  grid-template-columns: 52px auto auto minmax(170px, 1.5fr) minmax(150px, 1fr) 120px 92px;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  padding: 10px 16px 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.team.blue .lp { border-left: 3px solid var(--blue); }
.team.red .lp { border-left: 3px solid var(--red); }
.lp.is-me { border-color: var(--brand-line); background: linear-gradient(90deg, rgba(0, 215, 194, 0.08), var(--card) 50%); box-shadow: 0 0 26px rgba(0, 215, 194, 0.1); }
.team .lp.is-me { border-left-color: var(--brand); }
.team-head { flex-wrap: wrap; }
.team-tag { padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.team-tag.mine { background: var(--brand-soft); color: var(--brand-light); border: 1px solid var(--brand-line); }
.team-tag.enemy { background: rgba(251, 44, 54, 0.1); color: #ff8a92; border: 1px solid rgba(251, 44, 54, 0.35); }
.premade-summary { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; }

/* Grupos (dúo, trío...): cada grupo tiene su color */
.pm-g1 { --pm: 245, 196, 81; }
.pm-g2 { --pm: 180, 100, 255; }
.pm-g3 { --pm: 255, 126, 182; }
.pm-g4 { --pm: 95, 214, 138; }
.pm-item { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; padding: 4px 12px; border-radius: 12px; border: 1px solid rgba(var(--pm), 0.45); background: rgba(var(--pm), 0.08); }
.pm-item b { color: rgb(var(--pm)); }
.pm-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--pm)); box-shadow: 0 0 8px rgb(var(--pm)); }
.badge-premade { display: inline-flex; align-items: center; gap: 5px; color: rgb(var(--pm)); border-color: rgba(var(--pm), 0.5); background: rgba(var(--pm), 0.12); }
.lp.premade { border-color: rgba(var(--pm), 0.5); box-shadow: 0 0 22px rgba(var(--pm), 0.1); }
.drow.premade { box-shadow: inset 3px 0 0 rgb(var(--pm)); }
.m-meta .badge-premade { margin-top: 6px; }
.mp.is-partner { color: #f5c451; font-weight: 600; }
.partners .mini-row { padding: 2px 0; border-radius: 6px; }
.partners .mini-row:hover .name { color: var(--brand-light); }
.partners .name span { font-weight: 500; }
.partners-empty { margin: 0; padding: 10px 16px 16px; font-size: 13px; }

.lp-champ { display: block; }
.lp-champ:hover img { box-shadow: 0 0 0 2px var(--brand); }
.lp-info { min-width: 0; }
.lp-top { display: flex; align-items: center; min-width: 0; }
.lp-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-name span { color: var(--dim-fg); font-weight: 500; }
a.lp-name:hover { color: var(--brand-light); }
.you { flex: none; margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: var(--brand); color: var(--brand-ink); font-size: 10px; font-weight: 800; }
.lp-champname { font-size: 13px; }
.lp-rank { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lp-rank .tier { font-size: 14px; }
.crest { width: 34px; height: 34px; flex: none; }
.lp-rank .sub { font-size: 12px; }
.lp-wr { font-size: 12px; }
.lp-wr .winbar { margin: 5px 0 0; }
.lp-mastery { text-align: right; font-size: 13px; }
.pos-icon { display: inline-block; width: 14px; height: 14px; margin-right: 5px; vertical-align: -2px; opacity: 0.85; }

/* Los dos equipos lado a lado: azul a la izquierda, rojo a la derecha, una fila por línea. */
.teams-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin-bottom: 18px; }
.teams-grid .team-head { align-self: end; margin: 0 0 4px; }
.teams-grid .lp { margin: 0; }
.team-head.blue h2 { color: var(--blue); }
.team-head.red h2 { color: var(--red); }
.lp.side-blue { border-left: 3px solid var(--blue); }
.lp.side-red { border-left: 3px solid var(--red); }
.lp.side-blue.is-me, .lp.side-red.is-me { border-left-color: var(--brand); }
.lp-rank > div { min-width: 0; }

@media (min-width: 1101px) {
  /* Tarjetas compactas para que entren las dos columnas sin tener que hacer scroll. */
  .teams-grid .lp { grid-template-columns: 44px 22px 22px minmax(0, 1fr) 118px 76px 62px; gap: 8px; padding: 8px 10px 8px 8px; }
  .teams-grid .lp .champ-lg { width: 44px; height: 44px; }
  .teams-grid .lp .spell, .teams-grid .lp .rune { width: 22px; height: 22px; }
  .teams-grid .lp .rune.sub { padding: 4px; }
  .teams-grid .crest { width: 28px; height: 28px; }
  .teams-grid .lp-rank { gap: 6px; }
  .teams-grid .lp-rank .tier { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .teams-grid .lp-rank .q { display: none; }
  .teams-grid .lp-mastery { font-size: 12px; }
  /* Campeón y etiquetas en la misma línea: tarjetas más bajas. */
  .teams-grid .lp-info { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 3px; }
  .teams-grid .lp-top { flex-basis: 100%; }
  .teams-grid .badges { margin-top: 0; }
}

.page-head.compact { margin-bottom: 14px; }
.page-head.compact p { display: none; }

@media (max-width: 1100px) {
  /* En pantallas chicas: un equipo debajo del otro. */
  .teams-grid { grid-template-columns: minmax(0, 1fr); }
  .teams-grid .t-blue { order: 1; }
  .teams-grid .t-red { order: 2; }
  .teams-grid .team-head.t-red { margin-top: 14px; }
}

/* ---------- Iniciar sesión ---------- */

.login { display: grid; place-items: center; padding: 36px 0 20px; }
.login-card { position: relative; width: 100%; max-width: 470px; padding: 34px 30px 26px; text-align: center; overflow: hidden; }
.login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 220px at 50% -40px, rgba(0, 215, 194, 0.16), transparent 70%);
  pointer-events: none;
}
.login-card > * { position: relative; }
.login-logo { margin: 0 auto 16px; filter: drop-shadow(0 0 18px rgba(0, 215, 194, 0.55)); }
.login-card h1 { margin: 0 0 8px; font-size: 30px; }
.login-sub { margin: 0 auto 26px; max-width: 360px; }
.btn-lg { width: 100%; padding: 14px 18px; font-size: 15px; }
.hint { margin: 10px 0 0; font-size: 13px; color: var(--dim-fg); }
.hint a { color: var(--brand-light); text-decoration: underline; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--dim-fg); font-size: 12.5px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border-strong); }
.login-form { display: flex; gap: 8px; }
.login-form input { flex: 1; min-width: 0; }
.login-form select { width: 86px; }
.login-step { margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--border); text-align: left; }
.login-step .hint { text-align: left; }
.step-title { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-weight: 700; text-align: left; }
.step-num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 12px; font-weight: 800; }
/* Inicio de sesión en la PC: buscando el cliente de LoL */
.login-detect { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, 0.03); text-align: left; }
.login-detect b { display: block; font-size: 15.5px; }
.login-detect p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.45; }
.detect-icon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 215, 194, 0.1); color: var(--brand); }
.login-detect.waiting .detect-icon { animation: detect-pulse 1.8s ease-out infinite; }
@keyframes detect-pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 215, 194, 0.45); } 100% { box-shadow: 0 0 0 14px rgba(0, 215, 194, 0); } }
@media (prefers-reduced-motion: reduce) { .login-detect.waiting .detect-icon { animation: none; } }
#detect { width: 100%; margin-top: 14px; }
.login-options.is-disabled { opacity: 0.4; }
.login-hint { margin: 0 0 12px; }
.login-card .status { margin-top: 16px; }
.login-card .status:empty { display: none; }
.login-foot { margin: 22px 0 0; font-size: 12px; color: var(--dim-fg); }

.session { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.session-icon { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--brand-line); box-shadow: 0 0 18px rgba(0, 215, 194, 0.2); }
.session-name { font-weight: 800; font-size: 17px; }
.session-name span { color: var(--dim-fg); font-weight: 500; }

/* ---------- Ajustes ---------- */

.settings-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.settings-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.settings-col:empty { display: none; }
/* Contador de instalaciones (solo el dueño) */
.installs-total { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 14px; }
.installs-total b { font-size: 44px; font-weight: 800; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.installs-total span { color: var(--muted-fg); font-size: 14.5px; }
.installs-more { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.installs-more div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255, 255, 255, 0.02); }
.installs-more b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.installs-more span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted-fg); line-height: 1.35; }
.installs-card[aria-busy] b { color: var(--dim-fg); }
.note.note-err { color: var(--loss); }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.stack-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted-fg); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.status { margin: 0; min-height: 1.4em; font-size: 14px; }
.status.ok { color: var(--brand-light); }
.status.err { color: #ff8a92; }
.steps { margin: 18px 0 0; padding-left: 20px; line-height: 1.85; color: var(--muted-fg); }
.steps a { color: var(--brand-light); text-decoration: underline; }
.steps b { color: var(--fg); }
.note { margin: 16px 0 0; padding: 10px 12px; font-size: 13.5px; color: var(--muted-fg); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 8px; }
.note b { color: var(--fg); }

/* ---------- Pantallas más chicas ---------- */

@media (max-width: 1239px) {
  .player-grid { grid-template-columns: 300px minmax(0, 1fr); }
  .m-players { display: none; }
  .match { grid-template-columns: 100px auto 96px 88px auto; }
}

@media (max-width: 1100px) {
  .dcols, .drow { grid-template-columns: 44px 48px minmax(130px, 1.4fr) 100px minmax(100px, 1fr) 66px 204px; }
  .d-gold, .d-vision { display: none; }
}

@media (max-width: 980px) {
  .player-grid, .settings-grid { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr; }
  .lp {
    grid-template-columns: 52px 24px 24px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 0.8fr);
    grid-template-areas:
      'champ spells runes info info info'
      'champ spells runes rank wr mastery';
    row-gap: 8px;
  }
  .lp-champ { grid-area: champ; }
  .lp-spells { grid-area: spells; }
  .lp-runes { grid-area: runes; }
  .lp-info { grid-area: info; }
  .lp-rank { grid-area: rank; }
  .lp-wr { grid-area: wr; }
  .lp-mastery { grid-area: mastery; }
}

@media (max-width: 1100px) {
  .advice-grid { grid-template-columns: 1fr 1fr; }
  .advice-build { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  .cs-grid { grid-template-columns: 1fr 1fr; }
  .cs-help { grid-column: 1 / -1; order: 3; }
}

@media (max-width: 700px) {
  .advice-grid { grid-template-columns: 1fr; }
  .cs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 940px) {
  .dcols, .drow { grid-template-columns: 44px 48px minmax(110px, 1.4fr) 96px minmax(90px, 1fr) 204px; }
  .d-cs { display: none; }
}

@media (max-width: 760px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .logo span { display: none; }
  .nav { gap: 0; }
  .nav a, .nav-search-toggle { padding: 7px 8px; font-size: 13px; white-space: nowrap; }
  .nav-search.open .nav-search-form { width: min(200px, 48vw); }
  .me-chip { padding: 2px; }
  .me-name, .chev { display: none; }
  .update-pill { padding: 5px 9px; font-size: 12px; }
  .login-card { padding: 28px 18px 22px; }
  .login-form { flex-wrap: wrap; }
  .login-form select { width: auto; }
  .login-form .btn { width: 100%; }
  main { padding: 20px 16px 48px; }
  #banner { padding: 0 16px; }
  .profile { flex-wrap: wrap; }
  .profile-actions { margin-left: 0; width: 100%; }
  .match { grid-template-columns: auto 1fr; gap: 10px 14px; }
  .m-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
  .m-result { margin: 0; }
  .search-big { flex-wrap: wrap; }
  .search-big select { width: auto; }
  .search-big .btn { width: 100%; }
  .live-form > input { width: 100%; }
  .lp {
    grid-template-columns: 44px repeat(3, minmax(0, 1fr));
    grid-template-areas:
      'champ info info info'
      'rank rank wr mastery';
    gap: 10px;
    padding: 10px 12px;
  }
  .lp-spells, .lp-runes { display: none; }
  .scoreboard { margin-left: 0; font-size: 28px; }
  .detail-head h1 { font-size: 28px; }
  .dcols { display: none; }
  .drow {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
      'champ name kda'
      'dmg dmg cs'
      'items items items';
    gap: 8px 12px;
    padding: 10px 12px;
  }
  .d-champ { grid-area: champ; }
  .d-name { grid-area: name; }
  .d-kda { grid-area: kda; text-align: right; }
  .d-dmg { grid-area: dmg; }
  .d-cs { display: block; grid-area: cs; text-align: right; }
  .d-items { grid-area: items; }
  .d-loadout { display: none; }
  .lp .champ-lg { width: 44px; height: 44px; }
  .crest { width: 28px; height: 28px; }
}

/* ---------- Movimiento: cómo aparece cada cosa y cómo responde al tocarla ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } }

/* Cada pantalla entra deslizándose de abajo, una parte detrás de otra */
#app > * { animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
#app > *:nth-child(2) { animation-delay: 0.05s; }
#app > *:nth-child(3) { animation-delay: 0.1s; }
#app > *:nth-child(4) { animation-delay: 0.15s; }
#app > *:nth-child(n + 5) { animation-delay: 0.2s; }

/* Listas: partidas, cambios del parche, jugadores, análisis... entran escalonadas */
.match, .patch-card, .lp, .coach, .smurf-alert, .mini-option, .rank-card, .card.side-card { animation: rise 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.match:nth-child(2), .patch-card:nth-child(2), .lp:nth-child(4) { animation-delay: 0.04s; }
.match:nth-child(3), .patch-card:nth-child(3), .lp:nth-child(5) { animation-delay: 0.08s; }
.match:nth-child(4), .patch-card:nth-child(4), .lp:nth-child(6) { animation-delay: 0.12s; }
.match:nth-child(5), .patch-card:nth-child(5), .lp:nth-child(7) { animation-delay: 0.16s; }
.match:nth-child(6), .patch-card:nth-child(6), .lp:nth-child(8) { animation-delay: 0.2s; }
.match:nth-child(7), .patch-card:nth-child(7), .lp:nth-child(9) { animation-delay: 0.24s; }
.match:nth-child(n + 8), .patch-card:nth-child(n + 8), .lp:nth-child(n + 10) { animation-delay: 0.28s; }
.mini-option:nth-child(3) { animation-delay: 0.06s; }
.mini-option:nth-child(4) { animation-delay: 0.12s; }

/* Etiquetas que aparecen con un "pop" (no en lo que se actualiza solo durante la partida) */
.badge { animation: pop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.game-panel .badge, .mini .badge, .enemy-row .badge { animation: none; }

/* Botones: se levantan al pasar el mouse y se hunden al tocarlos */
.btn { transition: transform 0.15s ease, background 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.96); }
.btn-ghost:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.nav a, .nav-search-toggle { transition: color 0.15s, background 0.15s, transform 0.15s; }
.nav a:active, .nav-search-toggle:active { transform: scale(0.95); }
.patch-chip { transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.15s; }
.patch-chip:hover { border-color: var(--brand-line); color: var(--fg); }
.patch-chip:active { transform: scale(0.94); }

/* Tarjetas que se levantan al pasar el mouse */
.patch-card, .lp, .cs-pick, .rank-card { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s, background 0.2s; }
.patch-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.lp:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3); }
.cs-pick { border-radius: 8px; }
.cs-pick:hover { background: rgba(255, 255, 255, 0.04); transform: translateX(3px); }

/* Imágenes de campeones y objetos: un pequeño zoom al pasar el mouse */
.champ-lg, .item-lg, .patch-icon, .mini-champ { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.lp-champ:hover .champ-lg, .item-lg:hover, .patch-card:hover .patch-icon { transform: scale(1.08); }

/* Menús y avisos que aparecen */
.update-pill { animation: pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.ai-box, .matchup-tip { animation: fade-in 0.4s ease backwards; }

/* ---------- Estadísticas de Solo/Dúo y Flexible ---------- */

@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes ring-fill { from { stroke-dashoffset: 100; } }
@keyframes draw-line { from { stroke-dashoffset: 1; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* Las tarjetas de rango del perfil se pueden tocar */
.queue-card { cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s; }
.queue-card:hover { transform: translateY(-2px); border-color: var(--brand-line); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.queue-card:active { transform: scale(0.98); }
.queue-card.qs-source { opacity: 0; }
.queue-title-end { display: inline-flex; align-items: center; gap: 8px; }
.queue-hint { display: inline-flex; align-items: center; gap: 4px; color: var(--dim-fg); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: none; transition: color 0.2s; }
.queue-arrow { display: inline-block; transition: transform 0.2s ease; }
.queue-card:hover .queue-hint, .queue-card:focus-visible .queue-hint { color: var(--brand-light); }
.queue-card:hover .queue-arrow { transform: translateX(3px); }

/* La ventana: tapa la página (no el encabezado) */
body.qs-open { overflow: hidden; }
.qs { position: fixed; inset: var(--qs-top, 0px) 0 0 0; z-index: 18; }
.qs-backdrop { position: absolute; inset: 0; background: rgba(5, 5, 5, 0.66); backdrop-filter: blur(6px); }
.qs-panel {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  transform-origin: 0 0;
}
.qs-ghost { position: fixed; z-index: 40; margin: 0; pointer-events: none; transform-origin: 0 0; }

.qs-bar { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--border); }
.qs-tabs { position: relative; display: flex; padding: 3px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); }
.qs-tabs button {
  position: relative;
  z-index: 1;
  padding: 7px 18px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted-fg);
  font: 700 14px var(--font);
  cursor: pointer;
  transition: color 0.25s;
}
.qs-tabs button:hover { color: var(--fg); }
.qs-tabs button[aria-selected='true'] { color: var(--brand-ink); }
.qs-ink {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: 8px;
  background: var(--brand);
  box-shadow: 0 0 18px rgba(0, 215, 194, 0.35);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.1, 1), width 0.4s cubic-bezier(0.2, 0.9, 0.1, 1);
}
.qs-who { margin-left: auto; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-who span { color: var(--dim-fg); font-weight: 500; }
.qs-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: none;
  color: var(--muted-fg);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, transform 0.25s ease;
}
.qs-close:hover { color: var(--fg); background: rgba(255, 255, 255, 0.06); transform: rotate(90deg); }
.qs-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.qs-content { padding: 18px; }
.qs-small { font-size: 12px; }

/* Cada parte entra deslizándose, una detrás de otra (--base: espera a que la ventana termine de abrirse) */
@keyframes qs-in { from { opacity: 0.3; transform: translateY(10px); } }
@keyframes qs-in-soft { from { opacity: 0.45; transform: translateY(4px) scale(0.98); } }
/* El encabezado solo se aclara (sin moverse): el emblema que vuela calcula dónde termina */
@keyframes qs-fade-soft { from { opacity: 0.3; } }
.qs-sec { animation: qs-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(var(--base, 0ms) + var(--d, 0) * 50ms); }

.qs-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 14px;
  padding: 18px 26px 18px 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: radial-gradient(560px 240px at 8% 50%, color-mix(in srgb, var(--tier) 22%, transparent), transparent 70%), var(--card-2);
  animation-name: qs-fade-soft;
}
.qs-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.06) 50%, transparent 65%) 0 0 / 250% 100% no-repeat;
  animation: shimmer 1.6s ease 0.5s backwards;
  background-position: -100% 0;
  pointer-events: none;
}
.qs-emblem { display: grid; place-items: center; flex: none; width: 128px; height: 128px; overflow: hidden; }
.qs-emblem-img { width: 128px; height: 128px; object-fit: cover; transform: scale(2.2); }
.qs-crest { width: 76px; height: 76px; opacity: 0.6; }
.qs-hero-main { min-width: 0; }
.qs-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-fg); }
.qs-hero h2 { margin: 2px 0 6px; font-size: 36px; font-weight: 800; line-height: 1.05; }
.qs-lp { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.qs-lp-bar { width: 190px; height: 6px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.08); }
.qs-lp-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--tier);
  box-shadow: 0 0 12px var(--tier);
  transform-origin: left;
  animation: grow-x 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 350ms);
}
.qs-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 28px; margin-top: 12px; }
.qs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  animation: qs-in-soft 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 100ms + var(--i, 0) * 60ms);
}
.qs-chip-crest { width: 20px; height: 20px; }
.qs-hero-wr { margin-left: auto; text-align: right; }
.qs-big { font-size: 42px; font-weight: 700; line-height: 1; margin-bottom: 4px; }

.qs-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.qs-w5 { grid-column: span 5; }
.qs-w7 { grid-column: span 7; }
.qs-w12 { grid-column: 1 / -1; }
.qs-card { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card-2); }
.qs-stack { display: flex; flex-direction: column; gap: 14px; }
.qs-sec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-fg);
}
.qs-sec-title .muted { color: var(--dim-fg); letter-spacing: 0.02em; text-transform: none; font-weight: 600; }
.qs-sec-title .mono { font-size: 15px; letter-spacing: 0; }
.qs-empty { text-align: center; padding: 34px 16px; }
.qs-empty p { margin: 6px 0 0; }
.sk {
  display: block;
  height: 10px;
  margin: 3px 0;
  border-radius: 6px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.sk-tall { height: 18px; }
.sk-w40 { width: 40%; }
.sk-w50 { width: 50%; }
.sk-w60 { width: 60%; }
.sk-w70 { width: 70%; }
.sk-w80 { width: 80%; }
.sk-w90 { width: 90%; }
.sk-ring { flex: none; width: 116px; height: 116px; margin: 0; border-radius: 50%; }
.sk-square { width: 100%; height: auto; aspect-ratio: 1; margin: 0; border-radius: 8px; }
.sk-chart { height: 190px; margin: 0 0 10px; border-radius: 10px; }
.sk-icon { width: 38px; height: 38px; margin: 0; border-radius: 9px; }
.sk-icon.sk-small { width: 24px; height: 24px; }
.sk-bar { height: 6px; margin: 0; }
.sk-crest { width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 50%; }
.qs-loading .qs-recent-info { flex: 1; }
.qs-loading .qs-tile, .qs-loading .qs-champ, .qs-loading .qs-season, .qs-loading .qs-multi-item { animation: none; }
.qs-loading .qs-season { align-items: stretch; }
.qs-loading .qs-multi-item { align-items: stretch; }
/* Cuando llegan los datos ocupan el lugar del esqueleto: sin volver a aparecer, solo un fundido corto */
.qs-swap { animation: qs-in-soft 0.25s ease backwards; }
.qs-swap .qs-sec, .qs-swap .qs-tile, .qs-swap .qs-champ, .qs-swap .qs-season, .qs-swap .qs-game { animation: none; }
/* Las imágenes tienen fondo mientras bajan */
.qs-game-img, .qs-champ-img { background: rgba(255, 255, 255, 0.06); }

/* Últimas partidas: anillo de victorias y los campeones de cada partida */
.qs-recent-top { display: flex; align-items: center; gap: 18px; }
.qs-ring { position: relative; flex: none; width: 116px; height: 116px; }
.qs-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.qs-ring circle { fill: none; stroke-width: 11; }
.qs-ring-track { stroke: rgba(255, 90, 100, 0.45); }
.qs-ring-fill {
  stroke: var(--brand);
  stroke-dasharray: 100;
  animation: ring-fill 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 250ms);
}
.qs-ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.qs-ring-text b { font: 700 25px var(--mono); }
.qs-ring-text > span { font-size: 11px; color: var(--muted-fg); }
.qs-recent-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.qs-wl { font-size: 15px; font-weight: 600; }
.qs-kda { font-size: 19px; font-weight: 700; }
.qs-strip { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.qs-game {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  animation: qs-in-soft 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 120ms + var(--i, 0) * 15ms);
  transition: transform 0.15s ease;
}
.qs-game-img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 2px solid; border-radius: 8px; }
.qs-game.win .qs-game-img { border-color: var(--win); }
.qs-game.loss .qs-game-img { border-color: var(--loss); }
.qs-game.remake .qs-game-img { border-color: var(--dim-fg); filter: grayscale(1); opacity: 0.6; }
.qs-game::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: -5px; height: 3px; border-radius: 3px; }
.qs-game.win::after { background: var(--win); }
.qs-game.loss::after { background: var(--loss); }
.qs-game:hover { z-index: 1; transform: translateY(-3px) scale(1.08); }

/* Gráfico */
.qs-trend { display: flex; flex-direction: column; }
.qs-trend p { margin: 8px 0 0; }
.qs-chart { display: block; width: 100%; height: auto; overflow: visible; }
.qs-zero { stroke: rgba(255, 255, 255, 0.14); stroke-dasharray: 4 6; }
.qs-line {
  fill: none;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1;
  animation: draw-line 1.4s cubic-bezier(0.45, 0, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 320ms);
}
.qs-area { animation: fade-in 0.9s ease backwards; animation-delay: calc(var(--base, 0ms) + 900ms); }
.qs-dot {
  stroke: var(--card-2);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 380ms + var(--i, 0) * 60ms);
  transition: transform 0.15s;
}
.qs-dot:hover { transform: scale(1.5); }
.qs-dot.win { fill: var(--win); }
.qs-dot.loss { fill: var(--loss); }

/* Gráfico de LP (como el de OP.GG) */
.qs-lp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.qs-lp-head > b { font-size: 15px; }
.qs-lp-now { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.qs-lp-now b { text-transform: uppercase; letter-spacing: 0.02em; }
.qs-lp-now .mono { color: var(--muted-fg); font-weight: 600; }
.qs-lp-now-crest { width: 26px; height: 26px; }
.qs-lpchart { position: relative; cursor: crosshair; }
.qs-lpchart[data-match] { cursor: pointer; }
.qs-lp-tier { stroke-width: 1.5; stroke-dasharray: 8 6; opacity: 0.8; }
.qs-lp-div { stroke-width: 1; stroke-dasharray: 2 5; opacity: 0.4; }
.qs-lp-label { font: 600 11px var(--mono); opacity: 0.75; }
.qs-lp-line {
  fill: none;
  stroke: #5b8def;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  filter: drop-shadow(0 0 6px rgba(91, 141, 239, 0.5));
  animation: draw-line 1.6s cubic-bezier(0.45, 0, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 320ms);
}
.qs-lp-area { animation: fade-in 0.9s ease backwards; animation-delay: calc(var(--base, 0ms) + 1100ms); }
.qs-lp-real {
  fill: #fff;
  stroke: #5b8def;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 1500ms);
}
.qs-lp-guide { stroke: rgba(255, 255, 255, 0.3); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; transition: opacity 0.15s; }
.qs-lp-cursor { fill: #5b8def; stroke: #fff; stroke-width: 2; opacity: 0; transition: opacity 0.15s; }
.qs-lpchart.hover .qs-lp-guide, .qs-lpchart.hover .qs-lp-cursor { opacity: 1; }
.qs-lp-tip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px 8px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(18, 18, 18, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
}
.qs-lp-tip[hidden] { display: none; }
.qs-lp-tip-champ { width: 34px; height: 34px; border-radius: 8px; }

/* Promedios */
.qs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
.qs-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  animation: qs-in-soft 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 120ms + var(--i, 0) * 20ms);
  transition: border-color 0.2s, transform 0.2s ease;
}
.qs-tile:hover { border-color: var(--brand-line); transform: translateY(-2px); }
.qs-tile-label { font-size: 12px; color: var(--muted-fg); }
.qs-tile-value { font: 700 23px var(--mono); }
.qs-tile-sub { font-size: 12px; color: var(--dim-fg); }

/* Campeones y líneas */
.qs-champs { display: flex; flex-direction: column; gap: 2px; }
.qs-champ {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(110px, 160px) 86px 84px;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  animation: qs-in-soft 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 150ms + var(--i, 0) * 25ms);
  transition: background 0.15s, transform 0.15s ease;
}
.qs-champ:hover { background: rgba(255, 255, 255, 0.04); transform: translateX(3px); }
.qs-champ-img { width: 38px; height: 38px; border-radius: 9px; }
.qs-champ-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.qs-champ-name b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qs-champ-name span, .qs-champ-kda, .qs-champ-cs { font-size: 12px; }
.qs-champ-wr { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.qs-champ-kda, .qs-champ-cs { text-align: right; }
.qs-meter { flex: 1; height: 6px; overflow: hidden; border-radius: 99px; background: rgba(255, 90, 100, 0.3); }
.qs-meter span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--brand);
  transform-origin: left;
  animation: grow-x 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 480ms + var(--i, 0) * 45ms);
}
.qs-meter.share { background: rgba(255, 255, 255, 0.07); }
.qs-meter.share span { background: var(--brand-light); }
.qs-roles { display: flex; flex-direction: column; gap: 10px; }
.qs-role { display: grid; grid-template-columns: 26px 96px minmax(0, 1fr) 40px; align-items: center; gap: 10px; font-size: 13px; }
.qs-role img { width: 24px; height: 24px; opacity: 0.9; }
.qs-role-name { display: flex; flex-direction: column; line-height: 1.2; }
.qs-role-name span { font-size: 11px; }
.qs-role > .mono { text-align: right; }

.qs-multi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.qs-multi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.qs-multi-item b { font-size: 21px; }
.qs-multi-item > span { font-size: 11px; color: var(--muted-fg); }
.qs-multi-item.zero { opacity: 0.4; }
.qs-multi-item.triple:not(.zero) { color: var(--rare); }
.qs-multi-item.quadra:not(.zero) { color: var(--epic); border-color: rgba(180, 100, 255, 0.4); }
.qs-multi-item.penta:not(.zero) { color: var(--legendary); border-color: rgba(255, 128, 0, 0.45); background: rgba(255, 128, 0, 0.08); box-shadow: 0 0 18px rgba(255, 128, 0, 0.15); }

.qs-best { display: block; width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s, transform 0.2s ease; }
.qs-best:hover { border-color: var(--brand-line); transform: translateY(-2px); }
.qs-best-row { display: flex; align-items: center; gap: 12px; }
.qs-go { margin-left: auto; color: var(--brand-light); font-size: 18px; transition: transform 0.2s ease; }
.qs-best:hover .qs-go { transform: translateX(4px); }

/* Temporadas */
.qs-seasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qs-season {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: radial-gradient(130px 80px at 50% 0%, color-mix(in srgb, var(--tier) 18%, transparent), transparent), rgba(255, 255, 255, 0.02);
  text-align: center;
  animation: qs-in-soft 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--base, 0ms) + 180ms + var(--i, 0) * 30ms);
  transition: transform 0.2s ease, border-color 0.2s;
}
.qs-season:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tier) 55%, transparent); }
.qs-season.now { border-color: var(--brand-line); }
.qs-season-crest { width: 46px; height: 46px; margin-bottom: 4px; }
.qs-season-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-fg); }
.qs-now { padding: 1px 6px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-light); letter-spacing: 0.02em; }
.qs-season b { font-size: 15px; }
.qs-season-peak { margin-top: 4px; font-size: 11px; color: var(--dim-fg); }

@media (max-width: 860px) {
  .qs-w5, .qs-w7 { grid-column: 1 / -1; }
  .qs-hero { flex-wrap: wrap; gap: 14px; }
  .qs-hero-wr { margin-left: 0; text-align: left; }
  .qs-emblem, .qs-emblem-img { width: 96px; height: 96px; }
  .qs-hero h2 { font-size: 28px; }
  .qs-who { display: none; }
  .qs-close { margin-left: auto; }
  .qs-champ { grid-template-columns: 38px minmax(0, 1fr) minmax(90px, 1fr); }
  .qs-champ-kda, .qs-champ-cs { display: none; }
}

/* ---------- Animación de inicio (al abrir Fichado.gg) ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg) radial-gradient(700px 380px at 50% 40%, rgba(0, 215, 194, 0.16), transparent 70%);
  transition: opacity 0.5s ease, visibility 0.5s;
}
.splash.done { opacity: 0; visibility: hidden; }
.splash.done .splash-logo { transform: scale(1.08); }
.no-splash .splash { display: none; }
.splash-logo { display: grid; justify-items: center; gap: 14px; transition: transform 0.5s ease; }
.splash-logo img { animation: splash-in 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both, splash-glow 1.8s ease-in-out 0.75s infinite; }
.splash-name { font-weight: 800; font-size: 30px; letter-spacing: -0.02em; animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both; }
.splash-name b { color: var(--brand); text-shadow: 0 0 18px rgba(0, 215, 194, 0.6); }
.splash-bar { width: 170px; height: 3px; margin-top: 4px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, 0.08); animation: fade-in 0.4s ease 0.5s both; }
.splash-bar span { display: block; width: 40%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--brand), transparent); animation: splash-load 1.1s ease-in-out infinite; }
@keyframes splash-in { from { opacity: 0; transform: scale(0.5) rotate(-90deg); } }
@keyframes splash-glow { 50% { filter: drop-shadow(0 0 20px rgba(0, 215, 194, 0.75)); } }
@keyframes splash-load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Si Windows pide menos movimiento, casi sin animaciones */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Tutorial de bienvenida ---------- */
.tut { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; animation: tut-in 0.3s ease-out; }
.tut.closing { animation: tut-out 0.26s ease-in forwards; }
.tut-lock { overflow: hidden; }
.tut-backdrop { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 35%, rgba(0, 215, 194, 0.1), transparent 60%), rgba(4, 5, 6, 0.82); backdrop-filter: blur(8px); }
.tut-box { position: relative; display: flex; flex-direction: column; width: min(920px, 100%); max-height: calc(100vh - 40px); overflow: hidden; border: 1px solid var(--border-strong); border-radius: 16px; background: linear-gradient(180deg, #171717, #111); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 215, 194, 0.06); animation: tut-pop 0.4s cubic-bezier(0.2, 0.9, 0.25, 1.1); }
.tut-skip { position: absolute; top: 14px; right: 16px; z-index: 2; padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--dim-fg); font: 600 12.5px var(--font); cursor: pointer; }
.tut-skip:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }
.tut-stage { flex: 1; min-height: 0; overflow: auto; }
.tut-pane { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 410px; animation: tut-step 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tut-visual { position: relative; display: grid; place-items: center; padding: 34px 28px; border-right: 1px solid var(--border); background: radial-gradient(ellipse at 30% 20%, rgba(0, 215, 194, 0.08), transparent 60%), #0d0d0d; overflow: hidden; }
.tut-text { display: flex; flex-direction: column; justify-content: center; padding: 40px 38px 30px; }
.tut-count { margin-bottom: 8px; color: var(--brand); font: 700 12px var(--font); letter-spacing: 0.08em; text-transform: uppercase; }
.tut-text h2 { margin: 0 0 14px; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; }
.tut-body { color: var(--muted-fg); font-size: 14.5px; line-height: 1.6; }
.tut-body p { margin: 0 0 10px; }
.tut-body b { color: var(--fg); }
.tut-body a { color: var(--brand-light); }
.tut-body kbd, .tut-keys kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: #1d1d1d; color: var(--fg); font: 600 12px var(--mono); }
.tut-steps { margin: 4px 0 12px; padding-left: 20px; line-height: 1.75; }
.tut-form { display: flex; gap: 8px; margin: 4px 0 6px; }
.tut-form input { flex: 1; min-width: 0; }
.tut-later { font-size: 12.5px; }
.tut-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border); background: #121212; }
.tut-dots { display: flex; gap: 7px; }
.tut-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.18); cursor: pointer; transition: width 0.25s, background 0.25s; }
.tut-dots button.on { width: 22px; background: var(--brand); }
.tut-nav { display: flex; gap: 8px; }

/* Dibujos de cada paso */
.tut-art { position: relative; width: 100%; max-width: 330px; }
.tut-mock { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: #151515; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); animation: tut-float 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s backwards; }
.tut-champ { width: 26px; height: 26px; border-radius: 6px; }

.tut-hello { display: grid; place-items: center; gap: 22px; min-height: 280px; }
.tut-halo { position: absolute; top: 18%; left: 50%; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 215, 194, 0.35), transparent 65%); transform: translateX(-50%); filter: blur(10px); animation: tut-breathe 3s ease-in-out infinite; }
.tut-logo { position: relative; width: 104px; height: 104px; filter: drop-shadow(0 10px 30px rgba(0, 215, 194, 0.45)); animation: tut-float 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.tut-chips { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tut-chips span { padding: 4px 10px; border: 1px solid var(--brand-line); border-radius: 999px; background: var(--brand-soft); color: var(--brand-light); font-size: 12px; font-weight: 700; animation: tut-float 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.tut-chips span:nth-child(2) { animation-delay: 0.08s; }
.tut-chips span:nth-child(3) { animation-delay: 0.16s; }
.tut-chips span:nth-child(4) { animation-delay: 0.24s; }

.tut-rank { display: flex; align-items: center; gap: 12px; }
.tut-rank b { display: block; font-size: 16px; }
.tut-rank span { color: var(--muted-fg); font-size: 12px; }
.tut-ring { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: conic-gradient(#e3b85b 0 58%, rgba(255, 255, 255, 0.08) 0); }
.tut-ring span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #151515; color: #e3b85b; font: 800 13px var(--mono); }
.tut-lp { width: 100%; height: 56px; }
.tut-match { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 8px; border-left: 3px solid; background: rgba(255, 255, 255, 0.025); font-size: 12.5px; }
.tut-match .mono { margin-left: auto; color: var(--muted-fg); }
.tut-match.win { border-color: var(--win); }
.tut-match.win b { color: var(--win); }
.tut-match.loss { border-color: var(--loss); }
.tut-match.loss b { color: var(--loss); }

.tut-bar, .tut-score { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #111; font-size: 12px; }
.tut-bar .live-dot, .tut-score .live-dot { width: 7px; height: 7px; }
.tut-time { margin-left: auto; color: var(--brand); font-weight: 700; }
.tut-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tut-team { display: flex; gap: 3px; padding: 6px; border-radius: 8px; border-top: 2px solid; background: rgba(255, 255, 255, 0.025); }
.tut-team.blue { border-color: var(--blue); }
.tut-team.red { border-color: var(--red); }
.tut-team .tut-champ { width: 100%; max-width: 24px; height: auto; aspect-ratio: 1; }
.tut-score { border-top: 2px solid var(--brand); }
.tut-score .mono { margin-left: 4px; color: var(--fg); }
.tut-more { margin-left: auto; padding: 2px 7px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--muted-fg); }
.tut-import { padding: 9px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 12.5px; text-align: center; box-shadow: 0 6px 18px rgba(0, 215, 194, 0.25); }

.tut-game { min-height: 280px; border-radius: 12px; border: 1px solid var(--border-strong); background: radial-gradient(ellipse at 70% 30%, rgba(80, 110, 160, 0.35), transparent 60%), linear-gradient(160deg, #1e2a36, #0f151c); overflow: hidden; animation: tut-float 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.tut-ov { position: absolute; top: 14px; left: 14px; width: 132px; border: 1px solid var(--border-strong); border-radius: 8px; background: rgba(12, 12, 12, 0.88); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5); }
.tut-ov-bar { display: flex; align-items: center; justify-content: space-between; padding: 5px 8px; border-bottom: 1px solid var(--border); font-size: 9.5px; letter-spacing: 0.06em; }
.tut-ov-lock { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.tut-ov-lock svg { width: 10px; height: 10px; }
.tut-ov-row { display: flex; align-items: center; gap: 5px; padding: 5px 8px; }
.tut-ov-row .tut-champ { width: 22px; height: 22px; margin-right: auto; }
.tut-spell { position: relative; display: block; width: 22px; height: 22px; overflow: hidden; border-radius: 5px; }
.tut-spell img { width: 100%; height: 100%; }
.tut-spell.cd img { filter: grayscale(1) brightness(0.45); }
.tut-spell.cd i { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 8.5px; font-style: normal; font-weight: 700; }
.tut-cards { position: absolute; right: 14px; bottom: 34px; left: 160px; display: flex; justify-content: center; gap: 8px; }
.tut-card-mini { position: relative; display: flex; justify-content: center; width: 44px; height: 70px; border: 2px solid rgba(200, 180, 240, 0.6); border-radius: 6px; background: #0d161b; }
.tut-card-mini .aug-tier { width: 26px; height: 18px; margin-top: -10px; font-size: 10.5px; }
.tut-best { position: absolute; top: -28px; padding: 0 4px; border: 1px solid #ffcd50; border-radius: 3px; background: #1a160c; color: #ffcd50; font-size: 7.5px; font-weight: 800; white-space: nowrap; }
.tut-keys { position: absolute; bottom: 10px; left: 14px; color: var(--muted-fg); font-size: 11px; }

.tut-key { display: grid; place-items: center; min-height: 240px; }
.tut-key-card { display: flex; flex-direction: column; gap: 9px; width: 100%; padding: 18px; border: 1px solid var(--border-strong); border-radius: 12px; background: #151515; font-size: 12px; animation: tut-float 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.tut-key-field { padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: #0d0d0d; color: var(--brand-light); }
.tut-key-btn { align-self: flex-start; padding: 6px 10px; border-radius: 7px; background: #c53030; color: #fff; font-weight: 700; }

.tut-ai { padding: 12px 13px; border: 1px solid rgba(138, 120, 255, 0.35); border-radius: 10px; background: linear-gradient(135deg, rgba(110, 90, 255, 0.1), rgba(0, 215, 194, 0.05)); font-size: 12px; line-height: 1.5; }
.tut-ai-title { margin-bottom: 6px; font-weight: 700; }
.tut-ai p { margin: 0 0 4px; color: var(--muted-fg); }
.tut-ai p b { color: var(--brand-light); }
.tut-ai-note { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted-fg); font-size: 12px; }

.tut-done { display: grid; place-items: center; min-height: 260px; }
.tut-check { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 10px rgba(0, 215, 194, 0.12), 0 0 50px rgba(0, 215, 194, 0.45); animation: tut-pop 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.3) backwards; }
.tut-check svg { width: 50px; height: 50px; }
.tut-spark { position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-light); opacity: 0; animation: tut-spark 0.9s ease-out 0.15s forwards; transform: rotate(calc(var(--i) * 25.7deg)) translateY(0); }
.tut-spark:nth-child(3n) { background: #ffcd50; }
.tut-spark:nth-child(3n + 1) { background: #ff6478; }

@keyframes tut-in { from { opacity: 0; } }
@keyframes tut-out { to { opacity: 0; } }
@keyframes tut-pop { from { opacity: 0; transform: scale(0.94) translateY(10px); } }
@keyframes tut-step { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 18px)); } }
@keyframes tut-float { from { opacity: 0; transform: translateY(12px); } }
@keyframes tut-breathe { 50% { opacity: 0.6; transform: translateX(-50%) scale(1.08); } }
@keyframes tut-spark { 0% { opacity: 1; transform: rotate(calc(var(--i) * 25.7deg)) translateY(0); } 100% { opacity: 0; transform: rotate(calc(var(--i) * 25.7deg)) translateY(-90px); } }

@media (max-width: 760px) {
  .tut-pane { grid-template-columns: 1fr; }
  .tut-visual { padding: 22px; border-right: 0; border-bottom: 1px solid var(--border); }
  .tut-text { padding: 24px 22px; }
  .tut-text h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .tut, .tut-box, .tut-pane, .tut-mock, .tut-logo, .tut-chips span, .tut-halo, .tut-game, .tut-key-card, .tut-check, .tut-spark { animation: none; }
}
