/* ============================================================
   GOTHAM PVP · WEB
   Diseño solo oscuro a propósito (marca GOTHAM: negro / blanco / gris).
   Diagonales del logo (rayas inclinadas) como único gesto gráfico.
   ============================================================ */
:root {
  color-scheme: dark;
  --ink: #07080a;  --slab: #101114;  --slab-2: #17181d;  --rule: #2a2b31;
  --chalk: #f4f4f6;  --ash: #a2a3ab;  --smoke: #6c6d75;
  --win: #4fdc8c;  --loss: #ff4757;  --gold: #ffc247;  --info: #5aa9ff;  --chat: #c9a7ff;
  --f-display: 'Exo 2', 'Segoe UI', Arial, sans-serif;
  --f-body: 'Barlow', 'Segoe UI', Arial, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --skew: -12deg;  --r: 4px;
}
* { box-sizing: border-box; }
html, body { background: var(--ink); color: var(--chalk); }
body { font: 16px/1.5 var(--f-body); margin: 0; min-height: 100vh; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden], .hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
.display { font-family: var(--f-display); font-style: italic; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; line-height: .95; text-wrap: balance; }
.eyebrow { font-family: var(--f-display); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ash); }
.mono { font-family: var(--f-mono); font-size: 12.5px; }
.muted { color: var(--ash); } .dim { color: var(--smoke); }
.num { font-variant-numeric: tabular-nums; }
h2.display { font-size: clamp(28px, 4vw, 44px); margin: 0; }
h2 { font-family: var(--f-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 17px; letter-spacing: .03em; margin: 0 0 12px; }
h3 { font-family: var(--f-display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 17px; margin: 0; letter-spacing: .02em; }
.pos, .w { color: var(--win); } .neg, .l { color: var(--loss); }

/* ---------- botones y etiquetas ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--rule); background: var(--slab-2); border-radius: var(--r); padding: 10px 16px; cursor: pointer; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--chalk); transition: border-color .15s, background .15s, transform .1s; }
.btn:hover { border-color: var(--chalk); }
.btn:active { transform: scale(.98); }
.btn.solid, .btn.primary { background: var(--chalk); color: var(--ink); border-color: var(--chalk); }
.btn.solid:hover, .btn.primary:hover { background: #fff; }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn.discord:hover { background: #4752c4; border-color: #4752c4; }
.btn.discord.big { padding: 15px 28px; font-size: 16px; }
.btn.small { padding: 6px 11px; font-size: 12px; }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; }
.btn.danger { color: var(--loss); border-color: rgba(255, 71, 87, .45); background: transparent; }
.btn.danger:hover { background: var(--loss); color: #fff; border-color: var(--loss); }
.btn:disabled { opacity: .45; cursor: default; }
.tag { display: inline-block; font-family: var(--f-display); font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--rule); border-radius: 3px; color: var(--ash); white-space: nowrap; }
.tag.white { background: var(--chalk); color: var(--ink); border-color: var(--chalk); }
.tag.win, .tag.on { color: var(--win); border-color: rgba(79, 220, 140, .4); }
.tag.loss, .tag.red { color: var(--loss); border-color: rgba(255, 71, 87, .45); }
.tag.gold, .tag.warn { color: var(--gold); border-color: rgba(255, 194, 71, .45); }
.tag.info { color: var(--info); border-color: rgba(90, 169, 255, .45); }
.tag.off { color: var(--smoke); }
.cat-conexion { color: var(--info); border-color: rgba(90, 169, 255, .4); }
.cat-muertes { color: var(--loss); border-color: rgba(255, 71, 87, .4); }
.cat-monedas { color: var(--gold); border-color: rgba(255, 194, 71, .4); }
.cat-admin { background: var(--chalk); color: var(--ink); border-color: var(--chalk); }
.cat-partidas { color: var(--win); border-color: rgba(79, 220, 140, .4); }
.cat-chat { color: var(--chat); border-color: rgba(201, 167, 255, .4); }
.cat-personajes, .cat-panel { color: var(--chalk); }
.gangtag { font-weight: 800; font-family: var(--f-display); letter-spacing: .04em; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--smoke); margin-right: 6px; }
.dot.on { background: var(--win); box-shadow: 0 0 8px rgba(79, 220, 140, .6); }

/* ---------- formularios ---------- */
label { display: grid; gap: 6px; font-size: 13px; color: var(--ash); }
input, select, textarea { width: 100%; background: var(--ink); border: 1px solid var(--rule); color: var(--chalk); border-radius: var(--r); padding: 10px 12px; font: inherit; font-size: 15px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--chalk); }
input[type=checkbox] { width: auto; }
.err { color: var(--loss); font-size: 14px; min-height: 20px; }

/* ---------- entrada ---------- */
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; position: relative; overflow: hidden; }
.login-screen::before, .hero::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-78deg, transparent 0 46px, rgba(244, 244, 246, .03) 46px 48px); pointer-events: none; }
.login-card { position: relative; display: grid; justify-items: center; gap: 24px; text-align: center; width: 100%; max-width: 560px; }
.login-card img { width: min(460px, 100%); height: auto; }
.login-card p { margin: 0; color: var(--ash); max-width: 40ch; }
.login-card small { color: var(--smoke); font-size: 13px; }

/* ---------- cabecera ---------- */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(7, 8, 10, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
header.top .wrap { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.logo { height: 22px; width: auto; display: block; }
nav.main { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
nav.main a { padding: 8px 12px; text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 13.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ash); white-space: nowrap; position: relative; }
nav.main a:hover, nav.main a.on { color: var(--chalk); }
nav.main a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: var(--chalk); transform: skewX(var(--skew)); }
nav.main a.admin-link { color: var(--gold); }
.me-box { position: relative; margin-left: auto; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border: 1px solid var(--rule); border-radius: 99px; background: var(--slab); cursor: pointer; }
.me-chip .av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.me-chip .n { font-weight: 600; font-size: 14px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--slab-2); border: 1px solid var(--rule); border-radius: var(--r); min-width: 160px; display: grid; padding: 4px; z-index: 30; }
.me-menu a { padding: 9px 12px; text-decoration: none; border-radius: 3px; font-size: 14px; }
.me-menu a:hover { background: var(--slab); }
.av { background: linear-gradient(135deg, #3a3b41, #1b1c21); display: grid; place-items: center; font-family: var(--f-display); font-weight: 900; font-style: italic; flex-shrink: 0; }
main { padding-block: 0 80px; min-height: 60vh; }
.block { padding-block: 52px 0; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head .eyebrow { margin-bottom: 8px; }
footer { border-top: 1px solid var(--rule); padding-block: 28px; color: var(--smoke); font-size: 13.5px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.loading { color: var(--ash); padding: 40px 0; text-align: center; }
.empty { padding: 22px; text-align: center; color: var(--ash); }

/* ---------- inicio ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 40px; padding-block: 60px 52px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.4vw, 88px); margin: 14px 0 18px; }
.hero h1 span { display: block; -webkit-text-stroke: 1.5px var(--chalk); color: transparent; }
.hero p.lead { font-size: 18px; color: var(--ash); max-width: 46ch; margin: 0 0 26px; }
.ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.status { background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); padding: 22px; display: grid; gap: 16px; }
.status .row1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pulse { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 800; letter-spacing: .12em; font-size: 12px; color: var(--win); }
.pulse::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--win); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(79, 220, 140, .6); } 70%, 100% { box-shadow: 0 0 0 9px rgba(79, 220, 140, 0); } }
.big-count { font-family: var(--f-display); font-style: italic; font-weight: 900; font-size: 64px; line-height: 1; }
.big-count small { font-size: 22px; color: var(--smoke); }
.meter { height: 8px; background: var(--slab-2); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--chalk); }
.connect { display: flex; gap: 8px; align-items: center; background: var(--ink); border: 1px dashed var(--rule); border-radius: var(--r); padding: 10px 12px; }
.connect code { flex: 1; min-width: 0; font-family: var(--f-mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mode { position: relative; background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px 18px 18px; overflow: hidden; min-height: 150px; display: flex; flex-direction: column; gap: 8px; }
.mode .tag { align-self: flex-start; }
.mode .idx { font-family: var(--f-display); font-style: italic; font-weight: 900; font-size: 54px; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--rule); position: absolute; right: 10px; bottom: -6px; }
.mode p { margin: 0; color: var(--ash); font-size: 14.5px; max-width: 30ch; }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; }

.news { display: grid; gap: 14px; }
.news-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding: 18px; background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); }
.news-date { font-family: var(--f-display); font-style: italic; font-weight: 900; text-transform: uppercase; line-height: 1; }
.news-date b { display: block; font-size: 40px; }
.news-date span { font-size: 13px; color: var(--ash); letter-spacing: .1em; }
.news-item .t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.news-item p { margin: 0; color: var(--ash); font-size: 15px; white-space: pre-line; }
.news-item ul { margin: 8px 0 0; padding-left: 18px; color: var(--ash); font-size: 14.5px; }

.events { display: grid; gap: 14px; }
.event { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); }
.cal { width: 64px; text-align: center; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.cal span { display: block; background: var(--chalk); color: var(--ink); font-family: var(--f-display); font-weight: 800; font-size: 11px; letter-spacing: .14em; padding: 2px 0; }
.cal b { display: block; font-family: var(--f-display); font-style: italic; font-weight: 900; font-size: 28px; padding: 4px 0 2px; }
.event .meta { display: flex; gap: 6px 14px; flex-wrap: wrap; color: var(--ash); font-size: 14px; margin-top: 4px; }
.event .body { color: var(--ash); font-size: 14px; margin-top: 6px; white-space: pre-line; }
.prize { font-family: var(--f-display); font-style: italic; font-weight: 900; font-size: 22px; text-align: right; line-height: 1.1; }
.prize small { display: block; font-size: 11px; color: var(--ash); letter-spacing: .14em; font-style: normal; }
.cd { font-family: var(--f-mono); font-size: 12.5px; color: var(--gold); }

/* ---------- perfil ---------- */
.pf-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding-block: 40px 26px; border-bottom: 1px solid var(--rule); }
.pf-head .av { width: 96px; height: 96px; border-radius: 10px; font-size: 44px; border: 1px solid var(--rule); object-fit: cover; }
.pf-head h1 { font-size: clamp(34px, 5vw, 58px); margin: 4px 0 8px; }
.tagrow { display: flex; gap: 8px; flex-wrap: wrap; }
.rank { text-align: center; }
.rank .badge { width: 86px; height: 86px; margin: 0 auto 6px; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--chalk); color: var(--ink); font-family: var(--f-display); font-style: italic; font-weight: 900; font-size: 24px; padding: 0 8px; text-align: center; line-height: 1; }
.rank b { font-family: var(--f-display); font-style: italic; }
.char-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.char-tabs button { background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); padding: 7px 14px; cursor: pointer; font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ash); }
.char-tabs button.on { background: var(--chalk); color: var(--ink); border-color: var(--chalk); }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--r); margin-top: 22px; overflow: hidden; }
.kpi { padding: 16px 18px; border-right: 1px solid var(--rule); background: var(--slab); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi .v { font-family: var(--f-display); font-style: italic; font-weight: 900; font-size: 32px; line-height: 1.05; }
.kpi .eyebrow { font-size: 11px; }
.kpi small { color: var(--ash); font-size: 13px; }
.ban { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding: 16px 18px; border-radius: var(--r); border: 1px solid rgba(255, 71, 87, .5); background: rgba(255, 71, 87, .07); }
.ban .clock { font-family: var(--f-mono); font-size: 24px; color: var(--loss); }
.ban.ok { border-color: rgba(79, 220, 140, .4); background: rgba(79, 220, 140, .06); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; margin-top: 24px; }
.panel { background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px; min-width: 0; }
.panel > h3 { margin-bottom: 14px; }
.cars { display: grid; gap: 8px; }
.car { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--slab-2); border-radius: var(--r); }
.car .plate { font-family: var(--f-mono); font-size: 12px; background: var(--chalk); color: var(--ink); padding: 2px 7px; border-radius: 2px; }
.trophies { display: grid; gap: 10px; }
.trophy { display: flex; gap: 12px; align-items: center; }
.trophy .t { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; background: var(--gold); color: var(--ink); font-family: var(--f-display); font-weight: 900; font-style: italic; clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%); }
.search { display: flex; gap: 8px; }
.results { display: grid; gap: 6px; margin-top: 12px; }
.result { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--slab-2); border-radius: var(--r); text-decoration: none; }
.result:hover { outline: 1px solid var(--chalk); }
.result .grow { flex: 1; min-width: 0; }
.notice { max-width: 620px; margin: 60px auto 0; text-align: center; display: grid; gap: 14px; justify-items: center; padding: 30px 24px; background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); }
.notice p { margin: 0; color: var(--ash); }

/* ---------- sugerencias ---------- */
.sug-form { display: grid; gap: 14px; }
.sug-list { display: grid; gap: 10px; align-content: start; }
.sug { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 14px 16px; background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); }
.vote { display: grid; justify-items: center; gap: 2px; width: 46px; }
.vote button { background: var(--slab-2); border: 1px solid var(--rule); border-radius: var(--r); width: 38px; height: 30px; cursor: pointer; font-weight: 800; }
.vote button[aria-pressed="true"] { background: var(--chalk); color: var(--ink); }
.vote b { font-family: var(--f-display); font-size: 18px; }
.sug p { margin: 4px 0 8px; color: var(--ash); font-size: 14.5px; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- panel de admin ---------- */
.adm { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px; padding-top: 32px; }
.adm-nav { display: grid; gap: 2px; align-content: start; position: sticky; top: 90px; }
.adm-nav a { padding: 9px 12px; border-radius: var(--r); text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ash); white-space: nowrap; }
.adm-nav a:hover { color: var(--chalk); background: var(--slab); }
.adm-nav a.on { background: var(--chalk); color: var(--ink); }
.adm-nav .sep { height: 1px; background: var(--rule); margin: 8px 0; }
.adm-nav small { padding: 6px 12px 2px; color: var(--smoke); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-family: var(--f-display); font-weight: 700; }
.adm-body { min-width: 0; display: grid; gap: 18px; align-content: start; }
.adm-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adm-title h1 { font-size: 32px; margin: 4px 0 0; }
.card { background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px; min-width: 0; }
.card.tight { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card.tight > .card-head { padding: 14px 16px 0; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.stat .label { font-family: var(--f-display); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ash); }
.stat .value { font-family: var(--f-display); font-style: italic; font-weight: 900; font-size: 26px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 13px; color: var(--ash); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 160px; }
.spacer { flex: 1; }
.table-wrap, .tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--f-display); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--smoke); padding: 9px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--slab-2); }
td.num, th.num, td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn + .btn { margin-left: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--rule); background: transparent; color: var(--ash); border-radius: 99px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; }
.chip.on { background: var(--chalk); color: var(--ink); border-color: var(--chalk); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ash); padding: 8px 12px; cursor: pointer; font-family: var(--f-display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.tabs button.on { color: var(--chalk); border-color: var(--chalk); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--ash); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.player-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar { width: 54px; height: 54px; border-radius: 10px; background: var(--slab-2); border: 1px solid var(--rule); display: grid; place-items: center; font: italic 900 24px var(--f-display); }
.player-head .who { flex: 1; min-width: 200px; }
.player-head .who h2 { font-size: 24px; margin: 0; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--smoke); }
.list { display: grid; gap: 6px; }
.item-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--slab-2); }
.item-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scroll { max-height: 360px; overflow-y: auto; }
.chart { width: 100%; height: 190px; display: block; }
.chart text { fill: var(--ash); font: 10px var(--f-body); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--ash); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* roles */
.roles { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; }
.role-list { display: grid; gap: 6px; align-content: start; max-height: 70vh; overflow-y: auto; }
.role { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 10px 12px; background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); cursor: pointer; }
.role.on { border-color: var(--chalk); }
.role i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--smoke); }
.role .grow { flex: 1; min-width: 0; }
.role .grow b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role .grow span { font-family: var(--f-mono); font-size: 11px; color: var(--smoke); }
.perm-group h4 { margin: 14px 0 6px; font-family: var(--f-display); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--smoke); }
.perm-group { display: grid; gap: 2px; }
.perm { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: var(--r); background: var(--slab-2); }
.perm .grow { flex: 1; min-width: 0; }
.perm .grow span { display: block; color: var(--smoke); font-size: 13px; }
.perm input.lim { width: 110px; padding: 6px 9px; font-size: 13px; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--rule); transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ash); transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--chalk); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--ink); }
.switch input:disabled + span { opacity: .55; }
.switch input:focus-visible + span { outline: 2px solid var(--chalk); outline-offset: 2px; }
.locked { padding: 12px 14px; border: 1px dashed var(--gold); border-radius: var(--r); color: var(--gold); font-size: 14px; }
.editor { display: grid; gap: 12px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }

/* ---------- ventanas y avisos ---------- */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .72); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; background: var(--slab); border: 1px solid var(--rule); border-radius: 8px; padding: 20px; display: grid; gap: 14px; }
.modal-card.wide { max-width: 720px; }
.modal-card p { margin: 0; color: var(--ash); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; z-index: 60; max-width: calc(100vw - 32px); }
.toast { background: var(--slab-2); border: 1px solid var(--rule); border-left: 3px solid var(--chalk); padding: 10px 14px; border-radius: var(--r); font-size: 14px; max-width: 380px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.toast.ok { border-left-color: var(--win); }
.toast.bad { border-left-color: var(--loss); }

/* ---------- móvil ---------- */
@media (max-width: 900px) {
  .hero .wrap, .split, .grid2, .roles, .adm, .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .adm-nav { position: static; display: flex; overflow-x: auto; }
  .adm-nav .sep, .adm-nav small { display: none; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-right: 0; }
  .kpi:nth-child(n+4) { border-top: 1px solid var(--rule); }
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  header.top .wrap { flex-wrap: wrap; gap: 8px 14px; padding-block: 10px; }
  nav.main { order: 3; flex-basis: 100%; }
  .me-chip .n { display: none; }
  .news-item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .news-date b { display: inline; font-size: 24px; margin-right: 8px; }
  .event { grid-template-columns: auto minmax(0, 1fr); }
  .event .prize { grid-column: 1 / -1; text-align: left; }
  .pf-head { grid-template-columns: auto minmax(0, 1fr); }
  .pf-head .rank { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; text-align: left; }
  .pf-head .rank .badge { margin: 0; width: 60px; height: 60px; font-size: 16px; }
  .pf-head .av { width: 70px; height: 70px; font-size: 32px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-right: 1px solid var(--rule) !important; border-top: 1px solid var(--rule); }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:nth-child(2n) { border-right: 0 !important; }
  .two, .modes { grid-template-columns: minmax(0, 1fr); }
  .table-wrap table, .tbl-wrap table { min-width: 620px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
