:root {
  color-scheme: dark;
  --bg: #0b0a09;
  --panel: #14110e;
  --panel-2: #1c1814;
  --line: #2a241d;
  --line-2: #3b3229;
  --text: #f3ecdd;
  --text-2: #c2b6a0;
  --muted: #8c8170;
  --gold: #e3b04b;
  --gold-soft: rgba(227, 176, 75, 0.14);
  --online: #3fbf6a;
  --up: #3fbf6a;
  --down: #e66767;
  --context-line: #4b4338;

  /* Facciones */
  --alliance: #4a86e8;
  --alliance-deep: #17325f;
  --alliance-soft: rgba(74, 134, 232, 0.16);
  --horde: #e04848;
  --horde-deep: #5e1616;
  --horde-soft: rgba(224, 72, 72, 0.16);

  --font-display: 'Cinzel', 'Trajan Pro', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 0% -80px, rgba(74, 134, 232, 0.16), transparent 70%),
    radial-gradient(900px 520px at 100% -80px, rgba(224, 72, 72, 0.16), transparent 70%),
    radial-gradient(1200px 500px at 50% -120px, rgba(227, 176, 75, 0.08), transparent 70%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: 20px;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 10, 9, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(227, 176, 75, 0.6);
  background: linear-gradient(90deg, var(--alliance-deep) 0 50%, var(--horde-deep) 50% 100%);
  color: var(--gold);
  font-size: 18px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.04em;
}
.brand-text em { font-style: normal; color: var(--gold); }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 7px 12px;
  border-radius: 7px;
  color: var(--text-2);
  font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: var(--text); background: var(--gold-soft); box-shadow: inset 0 -2px 0 var(--gold); }

.topbar-status { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.live .dot { background: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.25); }

.mock-banner {
  max-width: 1240px;
  margin: 12px auto 0;
  padding: 8px 14px;
  border: 1px dashed rgba(227, 176, 75, 0.45);
  border-radius: 8px;
  color: var(--gold);
  background: rgba(227, 176, 75, 0.06);
  font-size: 13px;
  width: calc(100% - 40px);
}

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

main.page { padding-block: 28px 40px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.section { margin-top: 28px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.03em;
}
.section-note { color: var(--muted); font-size: 13px; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
}
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Hero ---------- */

.hero { display: flex; flex-direction: column; gap: 6px; }
.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.hero-meta { color: var(--text-2); }

.progress-track {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-top: 10px;
  max-width: 460px;
}
.progress-track > span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tile { padding: 14px 16px; }
.tile-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.tile-value {
  margin-top: 4px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-sub { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Filtros ---------- */

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.filter:hover { color: var(--text); border-color: var(--muted); }
.filter[aria-pressed='true'] { color: var(--text); border-color: var(--gold); background: var(--gold-soft); }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- Tabla de clasificación ---------- */

.table-wrap { overflow-x: auto; }
table.ranking { width: 100%; border-collapse: collapse; min-width: 760px; }
.ranking th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ranking th.right, .ranking td.right { text-align: right; }
.ranking th button {
  all: unset;
  cursor: pointer;
}
.ranking th button:hover, .ranking th button[aria-sort] { color: var(--text); }
.ranking td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ranking tbody tr { cursor: pointer; transition: background 0.12s; }
.ranking tbody tr:hover, .ranking tbody tr:focus-visible { background: var(--panel-2); outline: none; }
.ranking tbody tr:last-child td { border-bottom: 0; }

.rank-cell { display: flex; align-items: center; gap: 8px; width: 64px; }
.rank-num { font-size: 18px; font-weight: 700; width: 24px; text-align: right; font-variant-numeric: tabular-nums; }
.rank-1 .rank-num { color: #f5c542; }
.rank-2 .rank-num { color: #cfd6de; }
.rank-3 .rank-num { color: #d28b52; }
.delta { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 26px; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.same { color: var(--muted); }

.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.class-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  flex: none;
  background: var(--panel-2);
}
.who-name { font-weight: 700; font-size: 15.5px; white-space: nowrap; }
.who-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.team-chip { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; white-space: nowrap; }

.level-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.level-num { font-size: 22px; font-weight: 700; width: 30px; font-variant-numeric: tabular-nums; }
.xp { flex: 1; min-width: 80px; }
.xp-track { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.xp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7a4fd6, #a970ff); }
.xp-fill.max { background: linear-gradient(90deg, #c7902f, var(--gold)); }
.xp-label { font-size: 11.5px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.status.online { color: var(--text-2); }
.status.online .dot { background: var(--online); }

/* ---------- Gráficos ---------- */

.chart-card { padding: 16px 16px 8px; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11.5px; font-family: var(--font-body); }
.chart .end-label { fill: var(--text-2); font-size: 11.5px; font-family: var(--font-body); }
.chart .end-label.strong { fill: var(--text); font-weight: 600; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; }
.chart .series path { transition: opacity 0.15s, stroke-width 0.15s; }
.chart .bar-value { fill: var(--text-2); font-size: 11.5px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 14px; height: 2px; border-radius: 2px; }

/* ---------- Tooltip ---------- */

.tooltip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  min-width: 180px;
  max-width: 320px;
  padding: 10px 12px;
  background: rgba(8, 10, 22, 0.96);
  border: 1px solid #3a3f5c;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 13px;
}
.tt-title { font-weight: 600; margin-bottom: 6px; color: var(--text); }
.tt-row { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.tt-row i { width: 12px; height: 2px; border-radius: 2px; flex: none; }
.tt-row b { font-variant-numeric: tabular-nums; min-width: 60px; }
.tt-row span { color: var(--text-2); }

/* Tooltip de objeto al estilo del juego */
.item-tt { font-size: 13px; line-height: 1.5; }
.item-tt .it-name { font-weight: 600; font-size: 14px; }
.item-tt .it-row { display: flex; justify-content: space-between; gap: 16px; }
.item-tt .it-green { color: #1eff00; }
.item-tt .it-muted { color: var(--text-2); }
.item-tt .it-gold { color: #ffd100; }

/* ---------- Hitos ---------- */

.feed { list-style: none; margin: 0; padding: 6px 0; }
.feed li { display: flex; gap: 12px; padding: 10px 16px; align-items: center; }
.feed li + li { border-top: 1px solid var(--line); }
.feed-level {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.feed-level.first { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.feed-text { font-size: 13.5px; min-width: 0; }
.feed-text a:hover { text-decoration: underline; }
.feed-time { color: var(--muted); font-size: 12px; }

.section-link { color: var(--gold); font-size: 13px; font-weight: 500; }
.section-link:hover { text-decoration: underline; }

/* ---------- Hitos ---------- */

.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ms-card header { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.ms-card .progress-track { margin-top: 8px; max-width: none; }
.ms-level { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.ms-count { color: var(--muted); font-size: 12.5px; }
.ms-list { list-style: none; margin: 0; padding: 4px 0; }
.ms-list li { display: flex; align-items: center; gap: 10px; padding: 6px 16px; }
.ms-list .class-icon { width: 26px; height: 26px; border-radius: 5px; }
.ms-pos { width: 20px; text-align: right; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ms-pos.first { color: var(--gold); }
.ms-who { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; line-height: 1.3; }
.ms-who:hover span:first-child { text-decoration: underline; }
.ms-meta { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-empty { color: var(--muted); font-size: 13px; padding: 12px 16px; margin: 0; }

/* ---------- Profesiones ---------- */

.prof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.prof-card { display: flex; flex-direction: column; }
.prof-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.prof-head:hover .prof-name { color: var(--gold); }
.prof-icon { width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--line-2); flex: none; }
.prof-icon.big { width: 72px; height: 72px; border-radius: 12px; }
.prof-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.prof-count { color: var(--muted); font-size: 12.5px; }
.prof-list { list-style: none; margin: 0; padding: 0 0 6px; }
.prof-list li { display: flex; align-items: center; gap: 10px; padding: 6px 16px; border-top: 1px solid var(--line); }
.prof-list .class-icon { width: 26px; height: 26px; border-radius: 5px; }
.prof-list.big li { padding: 10px 16px; }
.prof-list.big .prof-meta { white-space: normal; }
.prof-who { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; line-height: 1.3; flex: 1; }
.prof-who:hover span:first-child { text-decoration: underline; }
.prof-meta { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.skill { width: 110px; flex: none; }
.skill-track { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.skill-track > span { display: block; height: 100%; background: linear-gradient(90deg, #8a6c22, var(--gold)); border-radius: 999px; }
.skill-num { font-size: 12px; text-align: right; margin-top: 2px; }
.skill-num span { color: var(--muted); }

.prof-hero { display: flex; gap: 20px; padding: 20px; align-items: flex-start; flex-wrap: wrap; }
.prof-summary { color: var(--text-2); margin: 8px 0 14px; max-width: 70ch; }
.prof-links { display: flex; gap: 8px; flex-wrap: wrap; }
.prof-body { padding: 18px; }
.prof-body .section-title { margin-top: 18px; }
.prof-body .section-title:first-child { margin-top: 0; }
.prof-body p { color: var(--text-2); margin: 8px 0 0; }
.prof-body code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.bullets { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); }
.bullets li { margin-bottom: 4px; }
.mini-icon { width: 16px; height: 16px; border-radius: 4px; }
.prof-notes { margin-top: 16px; padding: 14px 16px; font-size: 13.5px; color: var(--text-2); display: grid; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  background: var(--gold-soft);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { background: rgba(227, 176, 75, 0.24); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.ghost { border-color: var(--line-2); background: var(--panel-2); }
.btn.ghost:hover { border-color: var(--muted); }

.prof-form { padding: 18px; display: grid; gap: 14px; }
.prof-form .section-note { margin: -8px 0 0; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); min-width: 0; }
.field input, .field select {
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field-row { display: grid; grid-template-columns: 1fr 120px 1fr; gap: 12px; align-items: end; border: 0; padding: 0; margin: 0; }
.field-row.secondaries { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.secondaries legend { color: var(--muted); font-size: 13px; padding: 0 0 6px; }
.form-actions { display: flex; align-items: center; gap: 14px; }
.form-msg { font-size: 13.5px; color: var(--muted); }
.form-msg.ok { color: var(--up); }
.form-msg.error { color: var(--down); }

@media (max-width: 680px) {
  .field-row, .field-row.secondaries { grid-template-columns: 1fr; }
  .skill { width: 88px; }
}

.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.link-btn { all: unset; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 5px; font-size: 14px; }
.link-btn:hover { color: var(--gold); background: var(--panel-2); }
.btn.danger { color: var(--down); border-color: rgba(230, 103, 103, 0.4); }
.btn.danger:hover { background: rgba(230, 103, 103, 0.12); }

table.owners { width: 100%; border-collapse: collapse; min-width: 560px; }
.owners th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.owners td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.owners tr:last-child td { border-bottom: 0; }
.owner-cell { font-weight: 600; vertical-align: top; }
.owners .class-icon { width: 30px; height: 30px; border-radius: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 12.5px; color: var(--text-2); }
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip b { color: var(--text); }

/* ---------- Wipeporra ---------- */

.wp-list { list-style: none; margin: 0; padding: 0; }
.wp-list li { display: grid; grid-template-columns: 44px 40px minmax(0, 1fr) 64px; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.wp-list li:first-child { border-top: 0; }
.wp-rank { font-size: 20px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.wp-list li.top .wp-rank { color: #e5484d; }
.wp-who { min-width: 0; }
.wp-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 6px; }
.wp-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7a2a2a, #e5484d); }
.wp-votes { font-size: 20px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.wp-votes span { font-size: 12px; color: var(--muted); font-weight: 500; }
.wp-voters { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ballot { display: grid; gap: 8px; }
.ballot-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.ballot-row:first-child { border-top: 0; }
.ballot-row .class-icon { width: 30px; height: 30px; border-radius: 6px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); }
.stepper button { all: unset; cursor: pointer; width: 34px; height: 34px; text-align: center; font-size: 18px; color: var(--text-2); }
.stepper button:hover { color: var(--gold); }
.stepper button:disabled { opacity: 0.3; cursor: default; }
.stepper input { width: 44px; text-align: center; font: inherit; font-weight: 700; color: var(--text); background: transparent; border: 0; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ballot-left { font-size: 15px; font-weight: 600; padding: 10px 14px; border-radius: 8px; background: var(--panel-2); }
.ballot-left.ok { color: var(--up); }
.ballot-left.over { color: var(--down); }

.ballot-order { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ballot-item { display: grid; grid-template-columns: 44px 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); cursor: grab; }
.ballot-item.dragging { opacity: 0.4; }
.ballot-item .class-icon { width: 30px; height: 30px; border-radius: 6px; }
.ballot-points { font-size: 18px; font-weight: 700; text-align: center; color: var(--gold); font-variant-numeric: tabular-nums; }
.ballot-move { display: flex; gap: 4px; }
.ballot-move button { all: unset; cursor: pointer; width: 32px; height: 32px; text-align: center; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-2); font-size: 12px; }
.ballot-move button:hover { color: var(--gold); border-color: var(--gold); }
.ballot-move button:disabled { opacity: 0.25; cursor: default; }

.rules { margin: 0; padding-left: 18px; color: var(--text-2); }
.rules li { margin-bottom: 4px; }
.castigos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.castigo { padding: 14px 16px; display: grid; gap: 6px; }
.castigo h3 { margin: 0; font-family: var(--font-display); font-size: 16px; }
.castigo .cond { color: var(--text-2); font-size: 13.5px; }
.castigo .pena { font-size: 14px; }
.castigo .pena b { color: var(--down); }
.castigo .logro { font-size: 12px; color: var(--gold); }

/* ---------- Instalar ---------- */

.steps { display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 18px 20px; }
.step-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--gold); border: 1px solid var(--gold); background: var(--gold-soft); }
.step h2 { margin: 4px 0 6px; font-family: var(--font-display); font-size: 18px; }
.step p { margin: 0 0 10px; color: var(--text-2); }
.step code, .prof-body code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.step .btn { margin: 4px 0 10px; }
a.status:hover { color: var(--gold); }

/* ---------- Oro, bestiario ---------- */

.coin { font-size: 0.6em; font-weight: 700; padding: 0 3px; border-radius: 3px; vertical-align: middle; }
.coin.g { color: #1a1408; background: #e3b04b; }
.coin.s { color: #1a1a1a; background: #c9ced6; }
.coin.c { color: #fff; background: #b1633a; }
.bestiary-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 56px; gap: 10px; align-items: center; padding: 5px 0; }
.bestiary-type { font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bestiary-track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bestiary-track > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8a6c22, var(--gold)); }
.bestiary-row b { text-align: right; }
.victims { list-style: none; margin: 0; padding: 4px 0; }
.victims li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.victims li:first-child { border-top: 0; }
.victims em { font-style: normal; color: var(--muted); font-size: 12px; margin-left: 6px; }
table.gather { width: 100%; border-collapse: collapse; min-width: 640px; }
.gather th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.gather th.right { text-align: right; }
.gather td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.gather tr:last-child td { border-bottom: 0; }
.gather .class-icon { width: 30px; height: 30px; border-radius: 6px; }
.gather .muted { color: var(--muted); }
.gather-cell.best { color: var(--gold); font-weight: 700; }

.auto { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--up); border: 1px solid rgba(63, 191, 106, 0.4); border-radius: 4px; padding: 0 4px; vertical-align: middle; }

/* ---------- Equipos ---------- */

.teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.team-card { overflow: hidden; }
.team-card header { padding: 16px 18px 12px; border-top: 3px solid var(--team); }
.team-rank { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.team-name { margin: 2px 0 0; font-family: var(--font-display); font-size: 20px; }
.team-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 18px 14px; }
.team-stats div { font-size: 12px; color: var(--muted); }
.team-stats b { display: block; font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.member { display: flex; align-items: center; gap: 10px; padding: 8px 18px; border-top: 1px solid var(--line); }
.member:hover { background: var(--panel-2); }
.member .class-icon { width: 30px; height: 30px; border-radius: 6px; }
.member-name { font-weight: 600; font-size: 14px; }
.member-sub { color: var(--muted); font-size: 12px; }
.member-level { margin-left: auto; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }

/* ---------- Ficha de jugador ---------- */

.back { color: var(--muted); font-size: 13.5px; display: inline-block; margin-bottom: 14px; }
.back:hover { color: var(--text); }

.profile { display: flex; gap: 20px; align-items: center; padding: 20px; flex-wrap: wrap; }
.profile .class-icon { width: 84px; height: 84px; border-radius: 14px; border-width: 2px; }
.profile-main { flex: 1; min-width: 240px; }
.profile-name { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 3.6vw, 36px); line-height: 1.1; }
.profile-line { color: var(--text-2); margin-top: 4px; }
.profile-line + .profile-line { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.profile-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.big-rank { font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--gold); }
.profile-xp { width: 100%; padding: 0 20px 18px; }
.profile-xp .xp-track { height: 10px; }

.gear-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px;
}
.gear-col { display: flex; flex-direction: column; gap: 8px; }
.gear-bottom { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; }
.slot {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: #0d0b09;
  overflow: hidden;
  cursor: default;
}
.slot img { width: 100%; height: 100%; display: block; }
.slot.empty { opacity: 0.55; display: grid; place-items: center; color: var(--muted); font-size: 9.5px; text-align: center; line-height: 1.1; padding: 2px; }
.slot:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.slot[data-quality='POOR'] { border-color: #9d9d9d; }
.slot[data-quality='COMMON'] { border-color: #d8d8d8; }
.slot[data-quality='UNCOMMON'] { border-color: #1eff00; }
.slot[data-quality='RARE'] { border-color: #0070dd; }
.slot[data-quality='EPIC'] { border-color: #a335ee; box-shadow: 0 0 10px rgba(163, 53, 238, 0.35); }
.slot[data-quality='LEGENDARY'] { border-color: #ff8000; }

.stats-list { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.stats-group h3 { margin: 0 0 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dotted var(--line-2); font-size: 14px; }
.stat-row span { color: var(--text-2); }
.stat-row b { font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .gear-layout { grid-template-columns: 1fr; }
  .gear-col { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .stats-list { order: 3; }
  .profile-side { align-items: flex-start; }
}

.milestones { list-style: none; margin: 0; padding: 0; }
.milestones li { display: flex; gap: 14px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.milestones li:first-child { border-top: 0; }

/* ---------- Pie ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 18px 28px;
  color: var(--muted);
  font-size: 12.5px;
  border-top: 1px solid var(--line);
}

@media (max-width: 560px) {
  .page { padding-inline: 16px; }
  .topbar-inner { gap: 8px 10px; padding: 10px 16px; }
  .brand-text { font-size: 15px; }
  .topbar-status { display: none; }
  .nav a { padding: 6px 9px; }
  .mock-banner { width: calc(100% - 32px); }
  .tile { padding: 12px; }
  .tile-value { font-size: 20px; }
  .hero-meta { font-size: 14px; }
}

.loading, .error { padding: 60px 0; text-align: center; color: var(--muted); }
.error { color: var(--down); }

/* ---------- Facciones: Alianza contra Horda ---------- */

.fac-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 7px 1px 3px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  vertical-align: middle;
}
.fac-chip img { width: 16px; height: 16px; border-radius: 50%; }
.fac-chip.alliance { border-color: rgba(74, 134, 232, 0.55); background: var(--alliance-soft); color: #9cc0ff; }
.fac-chip.horde { border-color: rgba(224, 72, 72, 0.55); background: var(--horde-soft); color: #ff9a9a; }
.fac-chip.none { opacity: 0.7; }

.ranking tbody tr.fac-alliance td:first-child { box-shadow: inset 4px 0 0 var(--alliance); }
.ranking tbody tr.fac-horde td:first-child { box-shadow: inset 4px 0 0 var(--horde); }
.ranking tbody tr.fac-alliance:hover { background: rgba(74, 134, 232, 0.07); }
.ranking tbody tr.fac-horde:hover { background: rgba(224, 72, 72, 0.07); }


/* Ficha de jugador con su bando */
.profile.fac-alliance { border-top: 3px solid var(--alliance); background: linear-gradient(180deg, rgba(23, 50, 95, 0.45), transparent 70%); }
.profile.fac-horde { border-top: 3px solid var(--horde); background: linear-gradient(180deg, rgba(94, 22, 22, 0.45), transparent 70%); }
.profile.fac-alliance .class-icon { box-shadow: 0 0 20px rgba(74, 134, 232, 0.35); }
.profile.fac-horde .class-icon { box-shadow: 0 0 20px rgba(224, 72, 72, 0.35); }

/* ---------- Marca Navio Forever: azul y rojo por toda la web ---------- */

:root {
  /* Dos banderines (azul Alianza, rojo Horda) con borde dorado. */
  --flags: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 18'%3E%3Cpath d='M1 1h10v16l-5-4-5 4z' fill='%232b5fb8' stroke='%23e3b04b'/%3E%3Ccircle cx='6' cy='6.5' r='1.7' fill='%23e3b04b'/%3E%3Cpath d='M17 1h10v16l-5-4-5 4z' fill='%23b83232' stroke='%23e3b04b'/%3E%3Ccircle cx='22' cy='6.5' r='1.7' fill='%23e3b04b'/%3E%3C/svg%3E");
  --flag-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 18'%3E%3Cpath d='M1 1h10v16l-5-4-5 4z' fill='%232b5fb8' stroke='%23e3b04b'/%3E%3Ccircle cx='6' cy='6.5' r='1.7' fill='%23e3b04b'/%3E%3C/svg%3E");
  --flag-h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 18'%3E%3Cpath d='M1 1h10v16l-5-4-5 4z' fill='%23b83232' stroke='%23e3b04b'/%3E%3Ccircle cx='6' cy='6.5' r='1.7' fill='%23e3b04b'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c2b6a0' stroke-width='1.6'/%3E%3C/svg%3E");
  --banner-line: linear-gradient(90deg, var(--alliance) 0%, var(--gold) 50%, var(--horde) 100%);
}

/* Barra superior: línea azul → dorado → rojo y menú con pestañas azules y rojas alternas */
.topbar { border-bottom: 0; }
.topbar::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--banner-line);
  opacity: 0.9;
}
.nav a { position: relative; }
.nav a::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--alliance);
  opacity: 0;
  transition: opacity 0.15s;
}
.nav a:nth-child(even)::before { background: var(--horde); }
.nav a:hover::before, .nav a.active::before { opacity: 1; }
.nav a:nth-child(odd):hover { background: var(--alliance-soft); }
.nav a:nth-child(even):hover { background: var(--horde-soft); }
.nav a.active { color: var(--text); background: linear-gradient(90deg, var(--alliance-soft), var(--horde-soft)); box-shadow: inset 0 -2px 0 var(--gold); }

/* Barra de progreso del evento y de los hitos */
.progress-track > span { background: linear-gradient(90deg, var(--alliance), var(--gold) 55%, var(--horde)); }

/* Títulos de sección con los dos banderines */
.section-title { display: inline-flex; align-items: center; gap: 10px; }
.section-title::before {
  content: '';
  width: 26px;
  height: 17px;
  flex: none;
  background: var(--flags) no-repeat center / contain;
}

/* Tarjetas de cifras: borde superior azul y rojo alternos */
.tile { border-top: 2px solid var(--alliance); }
.tiles .tile:nth-child(even) { border-top-color: var(--horde); }

/* Botones principales: estandarte azul → rojo con borde dorado */
.btn {
  background: linear-gradient(90deg, rgba(23, 50, 95, 0.85), rgba(94, 22, 22, 0.85));
  border-color: var(--gold);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.btn:hover { background: linear-gradient(90deg, rgba(43, 95, 184, 0.9), rgba(184, 50, 50, 0.9)); }
.btn.ghost { background: var(--panel-2); border-color: var(--line-2); text-shadow: none; }
.btn.ghost:hover { border-color: var(--gold); background: var(--panel-2); }
.btn.danger { background: var(--panel-2); text-shadow: none; }

/* Filtros (Logros): el activo lleva los dos colores */
.filter[aria-pressed='true'] { background: linear-gradient(90deg, var(--alliance-soft), var(--horde-soft)); border-color: var(--gold); }

/* Desplegables con banderines a la izquierda y flecha propia */
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-left: 42px;
  padding-right: 32px;
  background-color: var(--panel-2);
  background-image: var(--flags), var(--chevron);
  background-repeat: no-repeat, no-repeat;
  background-position: 10px center, right 12px center;
  background-size: 24px 16px, 12px 8px;
}
.field select option { background: #1c1814; color: var(--text); }

/* Pasos de instalación y posiciones destacadas: alternan azul y rojo */
.steps .step:nth-child(odd) .step-num { border-color: var(--alliance); color: #9cc0ff; background: var(--alliance-soft); }
.steps .step:nth-child(even) .step-num { border-color: var(--horde); color: #ff9a9a; background: var(--horde-soft); }
.steps .step:nth-child(odd) { border-left: 3px solid var(--alliance); }
.steps .step:nth-child(even) { border-left: 3px solid var(--horde); }

/* Tarjetas de hitos y profesiones: banderín azul o rojo alterno en la cabecera */
.ms-grid .ms-card:nth-child(odd) header, .prof-grid .prof-card:nth-child(odd) { border-top: 2px solid var(--alliance); }
.ms-grid .ms-card:nth-child(even) header, .prof-grid .prof-card:nth-child(even) { border-top: 2px solid var(--horde); }

/* Tabla: cabecera con línea bicolor */
.ranking thead tr { background: linear-gradient(90deg, rgba(23, 50, 95, 0.35), rgba(94, 22, 22, 0.35)); }
.ranking th { border-bottom-color: var(--line-2); }
.owners thead tr, .gather thead tr { background: linear-gradient(90deg, rgba(23, 50, 95, 0.35), rgba(94, 22, 22, 0.35)); }

/* Pie con la misma línea que la cabecera */
.footer { border-top: 0; position: relative; }
.footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--banner-line); opacity: 0.7; }

/* Wipeporra: clasificación oculta hasta votar */
.wp-locked { padding: 18px 16px; display: grid; gap: 10px; }
.wp-locked-title { font-family: var(--font-display); font-size: 17px; color: var(--gold); }
.wp-locked p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.wp-locked .btn { justify-self: start; margin-top: 4px; }
.wp-voted { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.wp-voted li { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.wp-voted li:first-child { border-top: 0; }
.wp-voted .class-icon { width: 26px; height: 26px; border-radius: 5px; }
.wp-voted span { flex: 1; min-width: 0; font-weight: 600; }
.wp-voted em { font-style: normal; font-weight: 400; color: var(--muted); }
.wp-voted b { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.wp-voted li.yes b { color: var(--up); }
.wp-voted span.class-icon { flex: none; width: 26px; }
