:root {
  --bg: #12131c;
  --bg-2: #181a26;
  --panel: #1c1f2e;
  --panel-2: #232636;
  --line: #31354a;
  --line-strong: #454a66;
  --text: #f4f2ff;
  --muted: #8b90ab;
  --gold: #ffc53d;
  --gold-dim: #b98900;
  --red: #ff5c5c;
  --green: #3ddc84;
  --blue: #4fc3f7;
  --accent: #ffc53d;
  --shadow: 4px 4px 0 0 rgba(0, 0, 0, 0.45);
  --shadow-sm: 3px 3px 0 0 rgba(0, 0, 0, 0.4);
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

::selection { background: var(--gold); color: #111; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px 80px; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  flex-wrap: wrap;
  border-bottom: 3px solid var(--line);
}

.brand {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
}
.brand span { color: var(--gold); }

.topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.nav { display: flex; gap: 4px; align-items: center; }

.nav a, .nav span, .nav button {
  color: var(--muted);
  background: transparent;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.nav a:hover, .nav button:hover { text-decoration: none; color: var(--text); border-color: var(--line); }
.nav a.active, .nav button.active {
  background: var(--panel);
  color: var(--gold);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.nav button.btn-nav-gold {
  background: var(--gold);
  color: #151515;
  border-color: var(--gold-dim);
  box-shadow: var(--shadow-sm);
}
.nav button.btn-nav-gold:hover {
  background: #ffd066;
  color: #111;
  border-color: var(--gold);
}

.userchip { background: var(--panel); border: 2px solid var(--line); display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text); }
.userchip-ava {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 11px;
  overflow: hidden;
  flex-shrink: 0;
}
.userchip-foto {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--line-strong);
  margin-left: -6px;
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 2px solid var(--line-strong);
  color: var(--text);
  padding: 7px 14px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
  font-family: inherit;
}
.audio-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translate(-1px, -1px);
}
.audio-btn.playing {
  border-color: var(--gold);
  color: #151515;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(255, 197, 61, 0.4);
}
.audio-icon {
  font-size: 13px;
  line-height: 1;
}
.audio-btn.playing .audio-icon {
  animation: pulse-music 0.8s infinite alternate ease-in-out;
}
@keyframes pulse-music {
  from { transform: scale(1); }
  to { transform: scale(1.2); }
}

.avatar-initials {
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: inherit;
  user-select: none;
}
.ficha-ava.avatar-initials {
  font-size: 32px;
  display: grid;
  place-items: center;
}
.pava.avatar-initials {
  font-size: 14px;
  font-weight: 900;
}

/* ---------- Hero / Home ---------- */
.hero { padding: 48px 0 26px; text-align: center; }

.hero-title {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.aura-word {
  color: var(--gold);
  text-shadow: 4px 4px 0 var(--gold-dim);
  animation: aura-glow 2.6s ease-in-out infinite;
  display: inline-block;
}
@keyframes aura-glow {
  0%, 100% {
    text-shadow: 4px 4px 0 var(--gold-dim), 0 0 8px rgba(255, 197, 61, 0.25);
    transform: scale(1);
  }
  50% {
    text-shadow: 4px 4px 0 var(--gold-dim), 0 0 26px rgba(255, 197, 61, 0.85), 0 0 46px rgba(255, 197, 61, 0.45);
    transform: scale(1.04);
  }
}

.hero-sub { color: var(--muted); margin-top: 18px; font-size: 16px; }

.cats { margin-top: 30px; }

.cats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.cats-head h2 { font-size: 22px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); }

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

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
}
.cat-card:hover {
  text-decoration: none;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 0.5);
  border-color: var(--gold);
}
.cat-card:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 0 rgba(0,0,0,0.5); }

.cat-stack { display: flex; margin-left: 8px; }

.cat-ava {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  border: 3px solid var(--bg);
  margin-left: -8px;
  overflow: hidden;
}

.cat-title { font-size: 22px; font-weight: 900; }

.cat-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

.cat-play {
  margin-top: 4px;
  text-align: center;
  background: var(--gold);
  color: #151515;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 9px 0;
  border-radius: var(--radius);
  border: 2px solid var(--gold-dim);
  box-shadow: var(--shadow-sm);
}

/* ---------- Battle page ---------- */
.battle-head { text-align: center; padding: 40px 0 8px; }

.battle-title {
  font-size: clamp(24px, 4.5vw, 38px);
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
}

.battle-tag {
  margin-top: 14px;
  display: inline-block;
  background: var(--panel);
  border: 2px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: var(--radius);
  text-transform: uppercase;
}

.battle-stats { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 32px auto 0; flex-wrap: wrap; }
.battle-stats .battle-tag { margin-left: auto; }

.stat {
  background: var(--panel-2);
  border: 2px solid var(--line-strong);
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: var(--radius);
}
.stat-btn { cursor: pointer; color: var(--gold); }
.stat-btn:hover { border-color: var(--gold); }

/* ---------- Arena / fichas ---------- */
.arena { position: relative; margin: 8px 0 10px; }

/* Level Gamification Bar */
.level-bar-wrap {
  width: 100%;
  max-width: 580px;
  margin: 0 auto 28px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 18px;
  box-shadow: var(--shadow-sm);
}
.level-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.level-badge {
  background: var(--gold);
  color: #151515;
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.level-badge.levelup {
  animation: levelup-pop 0.6s ease;
}
@keyframes levelup-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); background: #35e08a; }
  100% { transform: scale(1); }
}
.level-title {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.level-count {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  flex-shrink: 0;
}
.level-progress-track {
  width: 100%;
  height: 9px;
  background: var(--bg-2);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.level-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5cff, var(--gold));
  border-radius: 6px;
  transition: width 0.35s ease;
  box-shadow: 0 0 10px rgba(255, 197, 61, 0.5);
}

.arena-row {
  display: flex;
  gap: 70px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  position: relative;
}

.arena-row.locked { pointer-events: none; }

.ficha {
  flex: 1 1 260px;
  max-width: 360px;
  min-height: 400px;
  aspect-ratio: 3 / 4;
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.08s, box-shadow 0.08s, border-color 0.08s;
  user-select: none;
  display: flex;
  align-items: flex-end;
}
.ficha:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 0.5);
  border-color: var(--gold);
}
.ficha:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 0 rgba(0,0,0,0.5); }

.ficha.loading { cursor: default; pointer-events: none; }

.ficha.won {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green), 5px 5px 0 0 rgba(0,0,0,0.5);
  animation: winpulse 0.7s ease;
}
.ficha.lost { filter: grayscale(0.7); opacity: 0.55; }

.ficha-info {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 70px 16px 18px;
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 55%, transparent 100%);
}

.ficha-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.ficha-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.ficha:hover .ficha-media img { transform: scale(1.05); }
.ficha-media.noimg { background: var(--bg-2); }
.ficha-mono {
  display: none;
  font-size: 60px;
  font-weight: 900;
  letter-spacing: 1px;
}
.ficha-media.noimg .ficha-mono { display: grid; }

.ficha-media img + .ficha-mono { display: none; }

.pava img,
.avatar img,
.cat-ava img,
.duel-item .ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-upload-box {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  background: var(--bg-2);
  margin-top: 8px;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.img-upload-box:hover {
  border-color: var(--gold);
}
.img-preview-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  overflow: hidden;
  background: var(--panel);
  display: grid;
  place-items: center;
}
.img-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ficha-name { font-size: 24px; font-weight: 900; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.8); }

.ficha-role { color: var(--muted); font-size: 12px; margin-top: 2px; min-height: 16px; text-shadow: 0 1px 4px rgba(0,0,0,0.9); }

.ficha-elo {
  display: inline-block;
  margin-top: 14px;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--gold);
  background: var(--bg-2);
  border: 2px solid var(--line);
  padding: 5px 14px;
  border-radius: var(--radius);
}

.vs-note {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--red);
  border: 3px solid var(--red);
  border-radius: 50%;
  font-weight: 900;
  font-size: 20px;
  z-index: 5;
  box-shadow: var(--shadow);
}

/* pop elo overlay */
.pop {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(18, 19, 28, 0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 2;
}
.pop.show { opacity: 1; }
.pop .pop-old { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.pop .pop-num { font-size: 42px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--ac); }
.pop .pop-delta { font-size: 18px; font-weight: 900; }
.pop.up .pop-num, .pop.up .pop-delta { color: var(--green); }
.pop.down .pop-num, .pop.down .pop-delta { color: var(--red); }

/* ring + sparks */
.ring {
  position: absolute;
  inset: 8px;
  border-radius: var(--radius);
  border: 4px solid var(--green);
  animation: ring 0.7s ease-out forwards;
  z-index: 3;
  pointer-events: none;
}
@keyframes ring { from { transform: scale(0.85); opacity: 1; } to { transform: scale(1.15); opacity: 0; } }

.spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: spark 0.9s ease-out forwards;
  z-index: 3;
  pointer-events: none;
}
@keyframes spark {
  from { transform: translate(-50%, -50%) translate(0,0); opacity: 1; }
  to { transform: translate(-50%, -50%) translate(var(--dx), var(--dy)); opacity: 0; }
}
@keyframes winpulse {
  0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); }
}

/* ---------- bottom sections ---------- */
.battle-bottom { margin-top: 50px; }

.feed { margin-bottom: 40px; }
.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.feed-head h2 { font-size: 20px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); }
.feed-total { color: var(--muted); font-size: 13px; font-weight: 700; }

.feed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

.duel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  animation: itemIn 0.3s ease;
}
@keyframes itemIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.duel-item .ava {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; background: var(--bg-2); border: 2px solid var(--line);
  flex-shrink: 0;
  overflow: hidden;
}
.duel-item .names { flex: 1; min-width: 0; }
.duel-item .names b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel-item .w { color: var(--green); }
.duel-item .l { color: var(--muted); }
.duel-item .when { color: var(--muted); font-size: 11px; }
.duel-item .res { text-align: right; font-weight: 900; font-size: 12px; flex-shrink: 0; }
.duel-item .res .up { color: var(--green); }
.duel-item .res .down { color: var(--red); }

/* ---------- tables ---------- */
.table-wrap { background: var(--panel); border: 3px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; font-size: 14px; }
th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted);
  background: var(--bg-2);
  border-bottom: 2px solid var(--line);
}
td { border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 197, 61, 0.05); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.pos {
  width: 34px; height: 34px; border-radius: var(--radius);
  display: grid; place-items: center;
  font-weight: 900;
  background: var(--bg-2); border: 2px solid var(--line);
}
.pos.top1 { color: var(--gold); border-color: var(--gold-dim); }
.pos.top2 { color: #cfd6e6; border-color: var(--line-strong); }
.pos.top3 { color: #ff9d5c; border-color: var(--line-strong); }

.pava {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px;
  background: var(--bg-2); border: 2px solid var(--line);
  flex-shrink: 0;
  overflow: hidden;
}
.name { font-weight: 700; }
.role { color: var(--muted); font-size: 12px; }
.elo-cell { font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--gold); }

/* ---------- stats de cuenta ---------- */
.settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 9px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s;
}
.settings-link:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--gold);
}
.checkbox-field a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.stat-card {
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 18px;
  text-align: center;
}
.stat-num {
  font-size: 34px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

/* ---------- forms / admin ---------- */
.admin-panel {
  max-width: 640px;
  margin: 34px auto;
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.admin-panel h2 { font-size: 22px; font-weight: 900; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.admin-panel h2, .admin-panel h3 { color: var(--gold); }
.admin-panel .desc { color: var(--muted); margin-bottom: 20px; font-size: 14px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }

input[type="text"], input[type="password"], input[type="number"], input[type="email"], input[type="color"], select {
  width: 100%;
  background: var(--bg-2);
  border: 2px solid var(--line);
  color: var(--text);
  border-radius: var(--radius);
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
input:focus, select:focus { border-color: var(--gold); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: var(--gold);
  color: #151515;
  border: 2px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 rgba(0,0,0,0.45); text-decoration: none; }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 0 rgba(0,0,0,0.4); }
.btn.secondary { background: var(--panel-2); color: var(--text); border-color: var(--line-strong); }
.btn.danger { background: var(--panel-2); color: var(--red); border-color: var(--red); }
.btn.small { padding: 7px 13px; font-size: 12px; }

.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.row { display: flex; gap: 20px; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 140px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* admin + gest list items */
.admin-list { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.admin-list .item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  flex-wrap: wrap;
  transition: border-color 0.15s, background 0.15s;
}
.admin-list .item:hover { border-color: var(--line-strong); background: var(--panel); }
.admin-list .item .pava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: var(--bg); border: 2px solid var(--line); flex-shrink: 0; overflow: hidden; }
.admin-list .item .info { flex: 1; min-width: 0; }
.admin-list .item .info b { display: block; word-break: break-word; }
.admin-list .item .info small { color: var(--muted); display: block; margin-top: 2px; }
.admin-list .item .elo { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-list .item .admin-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- misc ---------- */
.empty { text-align: center; color: var(--muted); padding: 50px 20px; font-size: 16px; }
.hint { text-align: center; color: var(--muted); font-size: 13px; min-height: 20px; margin-top: 12px; }
kbd { background: var(--panel); border: 2px solid var(--line); border-bottom-width: 3px; border-radius: 5px; padding: 2px 7px; font-size: 12px; color: var(--text); }

.loader { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(18,19,28,0.6); opacity: 0; pointer-events: none; z-index: 4; }
.ficha.loading .loader { opacity: 1; }
.spinner {
  width: 28px; height: 28px;
  border: 4px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--panel-2);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 22px;
  font-weight: 800;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 1100;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--red); color: var(--red); }
.toast.warn { border-color: var(--gold); color: var(--gold); background: #26222b; }
.toast.top {
  bottom: auto;
  top: 20px;
  transform: translate(-50%, -20px);
}
.toast.top.show { transform: translate(-50%, 0); }

/* ---------- onboarding ---------- */
.onboarding-card { max-width: 440px; text-align: center; }
.onboarding-icon {
  font-size: 44px;
  margin-bottom: 14px;
}
.onboarding-card h3 {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 12px;
}
.onboarding-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.onboarding-nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

/* ---------- creador de batalla ---------- */
.battle-creator { display: inline-flex; align-items: center; }
.creator-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  font-size: 12px;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}
.creator-chip:hover { border-color: var(--gold); color: var(--gold); }
.creator-ava {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 11px;
  overflow: hidden;
  flex-shrink: 0;
}
.creator-ava img { width: 100%; height: 100%; object-fit: cover; }
.creator-name { font-weight: 800; }

.cat-creator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.cat-creator-ava {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.cat-creator-ava img { width: 100%; height: 100%; object-fit: cover; }
.cat-creator-name { font-weight: 800; }

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 18, 0.82);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background: var(--panel);
  border: 3px solid var(--line-strong);
  border-radius: var(--radius);
  width: 100%;
  max-width: 460px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.94);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal-card {
  transform: scale(1);
}

/* ---------- crop de imagen ---------- */
.crop-card { max-width: 420px; }
.crop-hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.crop-stage {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: #0a0b12;
  border: 3px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.crop-stage.dragging { cursor: grabbing; }
.crop-stage::before,
.crop-stage::after {
  content: "";
  position: absolute;
  background: rgba(255, 197, 61, 0.28);
  z-index: 3;
  pointer-events: none;
}
.crop-stage::before {
  left: 50%; top: 50%;
  width: min(300px, 100%);
  height: 300px;
  transform: translate(-50%, -50%);
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 4000px rgba(10, 11, 18, 0.55);
}
.crop-stage::after {
  left: 50%; top: 50%;
  width: 2px; height: 300px;
  transform: translate(-50%, -50%);
  background: rgba(255, 197, 61, 0.35);
}
.crop-stage img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--zoom, 1));
  max-width: none;
  display: block;
  z-index: 1;
}
.crop-controls { margin: 16px 0 4px; }
.crop-controls input[type="range"] { width: 100%; accent-color: var(--gold); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 2px solid var(--line);
}
.modal-header h3 {
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--gold);
  letter-spacing: 0.5px;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  font-family: inherit;
}
.modal-close:hover {
  color: var(--text);
  background: var(--panel-2);
}
.modal-body {
  padding: 22px;
}
.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 12px;
}
.modal-tab {
  flex: 1;
  background: var(--bg-2);
  border: 2px solid var(--line);
  color: var(--muted);
  padding: 9px 12px;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: inherit;
}
.modal-tab.active {
  background: var(--panel-2);
  color: var(--gold);
  border-color: var(--gold);
}

/* ---------- landing ---------- */
.verify-badge {
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 900;
  color: #111;
  background: var(--green, #35e08a);
  border: 3px solid #1e8a52;
  border-radius: 50%;
  box-shadow: 4px 4px 0 0 rgba(0, 0, 0, 0.45), 0 0 30px rgba(53, 224, 138, 0.35);
  animation: verify-pop 0.4s ease;
}
@keyframes verify-pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.landing-hero { padding: 64px 0 40px; }

/* ---------- hero mejorado ---------- */
.hero-enhanced { position: relative; overflow: hidden; }
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,197,61,0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}
.hero-badge {
  display: inline-block;
  background: var(--panel-2);
  border: 2px solid var(--gold-dim);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

/* ---------- landing & 2-column gaming layout ---------- */
.landing-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 48px;
}

.landing-card-section {
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.landing-card-section:hover {
  border-color: var(--line-strong);
  box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 0.5);
}

.landing-card-section .section-head {
  text-align: left;
  margin-bottom: 20px;
}
.landing-card-section .section-head h2 {
  font-size: 22px;
  text-align: left;
  margin: 0 0 6px;
}
.landing-card-section .section-head h2::after {
  margin: 10px 0 0;
  width: 44px;
}
.landing-card-section .section-head p {
  text-align: left;
  font-size: 14px;
}

/* Demo VS en landing */
.demo-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 10px auto 0;
  width: 100%;
}
.demo-ficha {
  flex: 1;
  max-width: 190px;
  background: var(--panel-2);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.demo-ficha:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(255, 197, 61, 0.35);
}
.demo-ficha.won {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(61, 220, 132, 0.5);
  animation: demo-bounce 0.5s;
}
.demo-ficha.lost {
  opacity: 0.45;
  filter: grayscale(0.6);
}
@keyframes demo-bounce { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.demo-ficha-media {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-2);
}
.demo-ficha-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-ficha-info { padding: 10px 12px; text-align: center; }
.demo-ficha-name { font-weight: 900; font-size: 14px; color: var(--text); }
.demo-ficha-elo { font-size: 11px; font-weight: 900; color: var(--gold); margin-top: 2px; }
.demo-vs-note {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--gold-dim);
  flex-shrink: 0;
  padding: 0 2px;
}
.demo-hint {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 14px;
}

/* Aura vertical cards */
.aura-cards-vert {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
  flex: 1;
  justify-content: center;
}
.aura-card-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.aura-card-row:hover {
  transform: translateX(4px);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}
.aura-card-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--panel);
  border: 2px solid var(--line-strong);
  border-radius: 10px;
}
.aura-card-text h3 {
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 3px;
}
.aura-card-text p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

/* Steps list */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
  flex: 1;
  justify-content: center;
}
.step-card-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.step-card-row:hover {
  transform: translateX(4px);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}
.step-card-row .step-num {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 900;
  color: #111;
  background: var(--gold);
  border: 2px solid var(--gold-dim);
  border-radius: 10px;
  box-shadow: 2px 2px 0 0 var(--gold-dim);
  margin: 0;
}
.step-card-row .step-text h3 {
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 3px;
}
.step-card-row .step-text p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

/* Features compact */
.features-grid-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 6px;
  flex: 1;
  align-content: center;
}
.feature-card-compact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.feature-card-compact:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}
.feature-card-compact .feature-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 15px;
  background: var(--panel);
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  color: var(--gold);
}
.feature-card-compact h3 {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 2px;
}
.feature-card-compact p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
}

/* Secciones de ancho completo */
.landing-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}
.landing-section {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 3px solid var(--line);
}
.section-head {
  text-align: center;
  margin-bottom: 32px;
}
.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  margin: 0 0 12px;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--gold);
  margin: 14px auto 0;
  border-radius: 2px;
}
.section-head p { color: var(--muted); margin: 0; font-size: 15px; }

.landing-cta-final { padding-bottom: 24px; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}
.faq-item {
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.15s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item summary:hover { color: var(--gold); }
.faq-item p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  padding: 0 20px 18px;
}
.landing-footer {
  margin-top: 56px;
  padding: 32px 0 0;
  border-top: 3px solid var(--line);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  width: 100%;
}
.landing-footer-col p { margin: 0; }
.landing-footer-brand {
  color: var(--text);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 1px;
  margin-bottom: 10px !important;
}
.landing-footer-brand span { color: var(--gold); }
.landing-footer-col > p:not(.landing-footer-brand) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.landing-footer-title {
  color: var(--gold);
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px !important;
}
.landing-footer-links {
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.landing-footer-links a {
  color: var(--muted);
  font-size: 13px;
  border: none;
  padding: 0;
}
.landing-footer-links a:hover {
  color: var(--gold);
  border: none;
}
.landing-footer-bottom {
  grid-column: 1 / -1;
  border-top: 2px solid var(--line);
  padding-top: 18px;
  text-align: center;
}
.landing-footer-bottom p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.docs-body {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 34px;
}
.docs-body h2 {
  color: var(--gold);
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 28px 0 12px;
  padding-top: 22px;
  border-top: 2px solid var(--line);
}
.docs-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.docs-body p { margin: 0 0 14px; }
.docs-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.docs-body ul { margin: 0 0 14px; padding-left: 22px; }
.docs-body li { margin-bottom: 10px; padding-left: 4px; }
.docs-body li::marker { color: var(--gold); }
.docs-body b { color: var(--text); }

.docs-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}
.docs-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 20px;
}
.docs-item .step-num { margin: 0; flex: 0 0 auto; }
.docs-item h3 {
  color: var(--gold);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 6px;
}
.docs-item p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.docs-item a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- estado vacío de batallas ---------- */
.gestion-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 12px 0 26px;
}
.gestion-head-text { flex: 1; min-width: 240px; }
.gestion-head-text h1.title {
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin: 8px 0 6px;
}
.gestion-head-text .sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.gestion-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--muted);
}
.gestion-badge.publica { color: #35e08a; border-color: #35e08a66; background: #35e08a14; }
.gestion-badge.privada { color: var(--gold); border-color: var(--gold-dim); background: var(--gold-dim14); }
.gestion-head-actions { justify-content: flex-end; }

/* ---------- estado vacío de batallas ---------- */
.empty-state {
  background: var(--panel);
  border: 3px dashed var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 48px 28px;
  text-align: center;
  max-width: 520px;
  margin: 8px auto 0;
}
.empty-state-icon {
  font-size: 42px;
  margin-bottom: 14px;
}
.empty-state h3 {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 10px;
}
.empty-state p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 22px;
}

/* ---------- carga masiva de personajes ---------- */
.many-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.many-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  flex-wrap: wrap;
}
.many-thumb {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  flex-shrink: 0;
  background: var(--bg);
}
.many-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.many-item input[type="text"] { flex: 1; min-width: 140px; }
.many-item .admin-actions { margin-left: auto; }

/* ---------- bottom nav móvil (tipo app) ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--panel);
  border-top: 3px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.4);
}
.bottom-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 4px;
  max-width: 520px;
  margin: 0 auto;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 4px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid transparent;
  min-width: 0;
  transition: all 0.15s ease;
}
.bottom-nav-item svg { width: 22px; height: 22px; display: block; }
.bottom-nav-item:hover { color: var(--text); }
.bottom-nav-item.active {
  color: var(--gold);
  border-color: var(--line-strong);
  background: var(--panel-2);
}
.bottom-nav-item.primary {
  color: #151515;
  background: var(--gold);
  border-color: var(--gold-dim);
  box-shadow: var(--shadow-sm);
}
.bottom-nav-item.primary:hover { color: #111; background: #ffd066; }
.bottom-nav-item .bn-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .landing-row-2col {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 36px;
  }
  .landing-card-section {
    padding: 24px 18px;
  }
}

@media (max-width: 700px) {
  .wrap { padding: 0 12px 90px; }
  .brand { font-size: 17px; }
  .topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 0;
  }
  .topbar-right {
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .topbar-right .nav { gap: 4px; flex-wrap: nowrap; }
  .topbar-right .nav a,
  .topbar-right .nav button,
  .topbar-right .audio-btn {
    padding: 6px 8px;
    font-size: 10px;
  }
  /* En móvil, los links de navegación del topbar pasan al bottom-nav */
  .topbar-right .nav > a:not(.userchip-link):not(.settings-link) { display: none; }
  .topbar-right .settings-link { display: none; }
  .topbar-right .nav button#logout-link { padding: 6px 8px; font-size: 10px; }
  .userchip { font-size: 12px; padding: 3px 8px 3px 3px; }
  .userchip-ava, .userchip-foto { width: 24px; height: 24px; }
  .audio-btn .audio-label { display: none; }
  .audio-btn .audio-icon { font-size: 13px; }

  .bottom-nav { display: block; }
  .arena-row { gap: 14px; }
  .ficha { flex: 1 1 0; max-width: none; min-height: 300px; }
  .ficha-info { padding: 50px 10px 12px; }
  .ficha-name { font-size: 17px; }
  .ficha-role { font-size: 10px; }
  .ficha-elo { font-size: 11px; margin-top: 10px; }
  .vs-note { width: 42px; height: 42px; font-size: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  th, td { padding: 9px 10px; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .features-grid-compact { grid-template-columns: 1fr; }
  .aura-cards { grid-template-columns: 1fr; }
  .demo-vs { flex-direction: column; gap: 12px; }
  .demo-ficha { max-width: 220px; width: 100%; }
  .demo-vs-note { padding: 4px 0; }
  .landing-section { margin-top: 48px; padding-top: 40px; }
  .landing-footer { grid-template-columns: 1fr; gap: 20px; }
  .docs-item { flex-direction: column; }

  /* mejoras móviles */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .empty-state { padding: 36px 18px; }
  .cats-head { align-items: flex-start; }
  .admin-actions { flex-wrap: wrap; }
  .battle-stats { flex-wrap: wrap; gap: 8px; justify-content: center; }
  .item { flex-wrap: wrap; }
  .item .admin-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  .modal-card { max-height: 92vh; }
  .crop-stage { height: 260px; }
  .table-wrap { overflow-x: auto; }
  .battle-creator .creator-chip { max-width: 100%; }
  .duel-item { flex-wrap: wrap; gap: 6px; }
  .duel-item .when { margin-left: auto; }
  .gestion-head { flex-direction: column; }
  .gestion-head-actions { justify-content: flex-start; width: 100%; }
  .gestion-head-actions .btn { flex: 1 1 auto; justify-content: center; }
  .many-item { align-items: flex-start; }
  .many-item .admin-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
}