/* Layout: barra de búsqueda arriba; ficha del personaje con plan a la izquierda y progreso a la derecha; tabla de equipo abajo */
/* Tema único oscuro: "el Abismo" — azul tinta profundo, éter cian como acento y oro para lo importante */
:root {
  --bg: #060912; --bg-glow: #0f1d33; --surface: rgba(19, 26, 46, .72); --surface-2: rgba(27, 36, 62, .72); --sunk: rgba(7, 11, 22, .72);
  --ink: #e8ecf6; --muted: #8e9ab6; --line: rgba(130, 160, 230, .12); --line-strong: rgba(130, 160, 230, .22);
  --aether: #4fc3d9; --aether-dim: rgba(79, 195, 217, .16); --violet: #8b7cf6; --gold: #e8bd62;
  --good: #5bc78b; --warn: #e6a457; --crit: #ef7d7d;
  --g-common: #9aa3b5; --g-rare: #5cc46e; --g-legend: #6aa6f0; --g-unique: #e6c34a; --g-epic: #f0904a;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .04);
  --f-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5;
  background: radial-gradient(1200px 500px at 70% -10%, var(--bg-glow), transparent 70%), var(--bg);
}
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
#char { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(26px, 3.5vw, 36px); }
h3 { font-size: 19px; margin-bottom: 12px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--aether); font-weight: 600; }
.muted { color: var(--muted); }

.top { display: flex; gap: 16px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.search { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; justify-content: flex-end; max-width: 640px; }
.search input { flex: 1 1 220px; }
input, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; }
button { font: inherit; font-size: 14px; font-weight: 600; border-radius: 6px; padding: 9px 14px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
button:hover { border-color: var(--aether); }
button.primary { background: var(--aether); border-color: var(--aether); color: #04121a; }
button.primary:hover { filter: brightness(1.1); }
input::placeholder { color: var(--muted); }
input:focus, select:focus { border-color: var(--line-strong); }
button:disabled { opacity: .6; cursor: progress; }
:focus-visible { outline: 2px solid var(--aether); outline-offset: 2px; }
.status { margin: 0; min-height: 1.5em; color: var(--muted); }
.status.err { color: var(--crit); }

.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.result { text-align: left; display: grid; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--surface); }
.result b { font-size: 16px; }
.result span { font-size: 13px; color: var(--muted); font-weight: 500; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; min-width: 0; }
.hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-strong); border-radius: 10px; padding: 16px 18px; }
.hero img { border-radius: 50%; background: var(--sunk); object-fit: cover; box-shadow: 0 0 0 2px var(--aether-dim), 0 0 18px var(--aether-dim); }
.hero .stat .v { color: var(--gold); }
.hero-id { flex: 1 1 200px; min-width: 0; }
.hero-id h2 { font-size: 28px; }
.hero-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: var(--sunk); border-radius: 8px; padding: 10px 14px; min-width: 150px; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.stat .v { font-family: var(--f-mono); font-size: 24px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--muted); min-height: 1.2em; }
.up { color: var(--good) !important; } .down { color: var(--crit) !important; }


.plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: r; }
.rec { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 12px 52px; position: relative; counter-increment: r; }
.rec::before { content: counter(r); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: 12px; background: var(--sunk); color: var(--muted); border: 1px solid var(--line); }
.rec:first-child { border-color: var(--aether); background: linear-gradient(90deg, var(--aether-dim), transparent 60%); }
.rec:first-child::before { background: var(--aether); color: #04121a; border-color: var(--aether); }
.rec.late { border-style: dashed; }
.rec-head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.boost { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.boost.both { background: var(--gold); color: #1a1205; }
.boost.gs { background: var(--gold); color: #1a1205; }
.boost.cp { background: var(--aether-dim); color: var(--aether); }
.plan-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 4px; }
.plan-head h3 { margin: 0; }
.seg { display: inline-flex; align-items: center; gap: 4px; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.seg span { font-size: 12px; color: var(--muted); padding: 0 6px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--aether); color: #04121a; }
.plan-note { margin: 4px 0 12px; font-size: 13px; color: var(--muted); min-height: 1em; }
.divider { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 600; padding: 10px 2px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.c-late { color: var(--gold); }
.rec h4 { margin: 0; font-size: 15px; font-weight: 600; }
.rec p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.rec .items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rec .item { font-size: 12px; font-family: var(--f-mono); background: var(--sunk); border-radius: 4px; padding: 2px 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.c-now { color: var(--aether); } .c-soon { color: var(--gold); } .c-end { color: var(--muted); }
.c-i3 { color: var(--good); } .c-i2 { color: var(--warn); } .c-i1 { color: var(--muted); }
.c-k1 { color: var(--good); } .c-k2 { color: var(--warn); } .c-k3 { color: var(--crit); }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 16px; }

.meters { display: grid; gap: 10px; }
.meter .lab { display: flex; justify-content: space-between; font-size: 13px; gap: 8px; }
.meter .lab b { font-weight: 600; }
.meter .lab span { font-family: var(--f-mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.bar { height: 8px; background: var(--sunk); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--aether); border-radius: 99px; }
.bar i.low { background: var(--warn); }
.bar i.full { background: var(--good); }

.kv { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.kv li { display: flex; justify-content: space-between; gap: 10px; }
.kv li span:last-child { font-family: var(--f-mono); color: var(--muted); }

.table-wrap { overflow-x: auto; }
.gear { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.gear th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.gear td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.gear tr.group td { font-family: var(--f-display); font-size: 15px; color: var(--muted); padding-top: 14px; border-bottom: 0; }
.piece { display: flex; align-items: center; gap: 8px; min-width: 0; }
.piece img { width: 32px; height: 32px; border-radius: 4px; background: var(--sunk); flex: none; }
.piece small { display: block; color: var(--muted); font-size: 12px; }
.grade { font-size: 12px; font-weight: 700; }
.g-Common { color: var(--g-common); } .g-Rare { color: var(--g-rare); } .g-Legend { color: var(--g-legend); }
.g-Unique { color: var(--g-unique); } .g-Epic, .g-Mythic { color: var(--g-epic); } .g-Special { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.gap { color: var(--warn); }
.ok { color: var(--good); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line); background: transparent; }
.dots i.Common { background: var(--g-common); border-color: var(--g-common); }
.dots i.Rare { background: var(--g-rare); border-color: var(--g-rare); }
.dots i.Legend { background: var(--g-legend); border-color: var(--g-legend); }
.dots i.Unique { background: var(--g-unique); border-color: var(--g-unique); }
.dots i.Epic, .dots i.Mythic { background: var(--g-epic); border-color: var(--g-epic); }

/* líneas de stats (ligado de alma) */
.lines { display: flex; flex-wrap: wrap; gap: 4px; max-width: 420px; }
.ln { font-size: 12px; padding: 1px 7px; border-radius: 4px; background: var(--sunk); border: 1px solid var(--line); white-space: nowrap; }
.ln i { font-style: normal; color: var(--muted); font-family: var(--f-mono); }
.ln.good { border-color: var(--good); color: var(--good); }
.ln.mid { border-color: var(--warn); color: var(--warn); }
.ln.bad { border-color: var(--crit); color: var(--crit); }
.ln.want { border-color: var(--gold); color: var(--gold); background: transparent; }
.ln.skill { border-style: dashed; }
.details { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.details li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.details li b { min-width: 120px; font-weight: 600; }
.details .have, .details .want { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.details .arrow { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

/* pestañas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; background: transparent; color: var(--muted); padding: 10px 16px; font-size: 14px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); background: var(--surface); }
.tabs button[aria-selected="true"] { color: var(--aether); border-bottom-color: var(--aether); background: var(--surface); }
.cmpbar { display: grid; gap: 4px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.cmpbar .plan-note { margin: 0; }
.cmp-controls { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.cmp-controls input { padding: 6px 10px; width: 200px; max-width: 100%; }
.cmp-controls button { padding: 6px 12px; }
.meters.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 28px; }

/* tablero Daevanion */
.boards-summary { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 24px; margin-bottom: 14px; }
.board-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.board-pills button { display: grid; gap: 0; text-align: left; padding: 6px 12px; border-radius: 8px; }
.board-pills button small { font-family: var(--f-mono); font-size: 11px; color: var(--muted); font-weight: 500; }
.board-pills button[aria-selected="true"] { border-color: var(--aether); background: var(--aether-dim); }
.boards-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; margin-bottom: 10px; }
@media (max-width: 820px) { .boards-pair { grid-template-columns: minmax(0, 1fr); } }
.board-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .board-wrap { grid-template-columns: minmax(0, 1fr); } }
.board-empty { display: grid; place-items: center; min-height: 240px; color: var(--muted); font-size: 14px; text-align: center; padding: 20px; }
.board-fig { min-width: 0; }
/* tablero al estilo del juego: fichas oscuras con la runa en el color de su rareza */
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.board-head h4 { font-family: var(--f-display); font-weight: 400; font-size: 18px; margin: 0; letter-spacing: .04em; text-transform: uppercase; }
.board-grid { display: grid; grid-template-columns: repeat(var(--n, 11), 1fr); gap: 5px; padding: 12px; background: linear-gradient(180deg, #0e1a2c, #0a1322); border: 1px solid var(--line-strong); border-radius: 10px; }
.tile.mine { box-shadow: 0 0 0 2px var(--aether), 0 0 10px rgba(79,195,217,.5); z-index: 1; }
.tile.dim { opacity: var(--op, 1); }
.tile { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 5px; background: linear-gradient(160deg, #2b3246, #161b2a); border: 1px solid #434b63; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); cursor: help; }
.tile.mini { width: 18px; height: 18px; display: inline-grid; cursor: default; border-radius: 3px; }
.tile .rune { width: 62%; height: 62%; fill: none; stroke-width: 2.2; stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.tile.g-Common .rune { stroke: #c8a660; }
.tile.g-Rare .rune { stroke: #6ad47e; }
.tile.g-Legend .rune { stroke: #b48af5; }
.tile.g-Unique { background: linear-gradient(160deg, #c7731f, #7a3c0c); border-color: #f0a24a; }
.tile.g-Unique .rune { stroke: #ffe9c4; }
.tile.g-Rare { border-color: #3f7a4a; } .tile.g-Legend { border-color: #6b4aa8; }
.tile .skic { width: 78%; height: 78%; border-radius: 4px; object-fit: cover; }
.tile.start { background: radial-gradient(circle at 50% 40%, #4fc3d9, #173a47 70%); border-color: var(--aether); }
.tile.start::before { content: ""; width: 42%; height: 42%; background: var(--ink); transform: rotate(45deg); border-radius: 2px; opacity: .9; }
.tile.locked { filter: brightness(.42) saturate(.35); }
.tile.ref { box-shadow: 0 0 0 2px var(--gold), 0 0 10px rgba(226,182,92,.55); filter: brightness(.7) saturate(.6); z-index: 1; }
.tile .pct { position: absolute; right: -2px; bottom: -2px; font-family: var(--f-mono); font-size: 9px; line-height: 1; padding: 1px 3px; border-radius: 3px; background: var(--gold); color: #1a1205; }
.board-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.board-legend span { display: inline-flex; align-items: center; gap: 6px; }
.board-side h4 { font-family: var(--f-display); font-weight: 400; font-size: 17px; margin: 0 0 8px; }
.nodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; max-height: 420px; overflow-y: auto; }
.nodes li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: baseline; padding: 4px 6px; border-radius: 6px; background: var(--sunk); }
.nodes li b { font-family: var(--f-mono); color: var(--gold); font-weight: 500; }
.nodes li small { display: block; color: var(--muted); }
.nodes li .g-Unique { color: var(--g-unique); } .nodes li .g-Legend { color: var(--g-legend); } .nodes li .g-Rare { color: var(--g-rare); }
.fx { margin-top: 12px; font-size: 13px; }
.fx summary { cursor: pointer; color: var(--muted); }
.fx .cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-top: 8px; }
.fx .cols2 span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* aviso de actualización */
.update { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--gold); border-radius: 10px; background: linear-gradient(90deg, rgba(226,182,92,.12), transparent 70%); }
.update b { color: var(--gold); }
.update p { margin: 2px 0 0; font-size: 13px; color: var(--muted); max-width: 70ch; }
.upd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1205; }
.linklike { background: none; border: 0; padding: 0; color: var(--aether); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: underline; }
footer .ver { display: inline-block; margin-bottom: 6px; }

/* guía de clase */
.guide a { color: var(--aether); }
.ghead { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.ghead h3 { font-size: 28px; margin: 2px 0 0; }
.ghead .src { margin: 0; font-size: 12px; color: var(--muted); max-width: 60ch; }
.gsec { margin-bottom: 22px; min-width: 0; }
.gsec h4 { font-family: var(--f-display); font-weight: 400; font-size: 18px; color: var(--gold); margin: 0 0 12px; }
.gnote { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.gcols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 960px) { .gcols { grid-template-columns: minmax(0, 1fr); } }
.gstack { display: grid; align-content: start; }
.gbadge { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 800; vertical-align: middle; }
.gbadge.ok { background: var(--good); color: #04130a; }
.gbadge.no { background: var(--warn); color: #1a1005; }

/* habilidades clave */
.gskills { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.gskill { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; }
.gskill.done { border-color: rgba(91, 199, 139, .45); }
.gskill img, .gskill .noimg { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); }
.gs-body { min-width: 0; display: grid; gap: 4px; }
.gs-body b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-body small { font-size: 12px; color: var(--muted); font-family: var(--f-mono); }
.gs-bar { height: 5px; background: var(--surface); border-radius: 99px; overflow: hidden; }
.gs-bar i { display: block; height: 100%; background: var(--aether); border-radius: 99px; }
.gskill.done .gs-bar i { background: var(--good); }
.gnotes { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.gnotes li { padding-left: 14px; position: relative; line-height: 1.7; }
.gnotes li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.skchip { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px 0 2px; margin: 1px 0; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; font-size: .95em; vertical-align: middle; }
.skchip img { width: 16px; height: 16px; border-radius: 3px; }
.skchip i { font-style: normal; font-family: var(--f-mono); font-size: 11px; color: var(--aether); }

/* arcanas */
.gcards { display: grid; gap: 10px; }
.gcard { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: start; padding: 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; }
.gcard-img { position: relative; width: 58px; }
.gcard-img img { width: 58px; height: 58px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); }
.gcard-img .lvl { position: absolute; right: -4px; bottom: -4px; font-family: var(--f-mono); font-size: 11px; padding: 1px 5px; border-radius: 4px; background: var(--gold); color: #1a1205; }
.gcard b { font-size: 15px; }
.gcard p { margin: 4px 0 6px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.gcard small { font-size: 12px; }

/* títulos */
.gtitles { display: grid; gap: 10px; }
.gtitle { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 10px 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; }
.emblem { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); }
.emblem svg { width: 22px; height: 22px; fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.e-Ataque { background: rgba(239, 125, 125, .12); }
.e-Ataque svg { stroke: var(--crit); }
.e-Defensa { background: rgba(79, 195, 217, .12); }
.e-Defensa svg { stroke: var(--aether); }
.e-Otro { background: rgba(226, 182, 92, .12); }
.e-Otro svg { stroke: var(--gold); }
.gt-body { display: grid; gap: 6px; min-width: 0; }
.gt-body b { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.tchain { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.tstep { font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); }
.tstep.goal { border-color: var(--gold); color: var(--gold); }
.tstep.now { background: var(--aether-dim); border-color: var(--aether); color: var(--ink); font-weight: 600; }
.tstep.done.goal { background: var(--gold); color: #1a1205; }
.tarrow { color: var(--muted); font-size: 12px; }

/* alas */
.gwings { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.gwing { margin: 0; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 12px 8px; text-align: center; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; }
.gwing img { width: 64px; height: 64px; object-fit: contain; }
.gwing.best { border-color: var(--gold); background: linear-gradient(180deg, rgba(226, 182, 92, .12), var(--sunk)); }
.gwing.best img { width: 84px; height: 84px; }
.gwing.mine { box-shadow: 0 0 0 2px var(--aether); }
.gwing figcaption b { display: block; font-size: 13px; }
.gwing figcaption small { font-size: 11px; color: var(--muted); }
.mywing { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); font-size: 14px; }
.mywing img { width: 36px; height: 36px; object-fit: contain; }
.mywing > span:not(.gbadge) { flex: 1; }

/* genus */
.glegend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 12px; margin-bottom: 12px; }
.glegend span:not(.muted) { padding: 2px 10px; border-radius: 99px; font-weight: 600; border: 1px solid; }
.glegend .t1, .gcell.t1 { background: rgba(226, 182, 92, .16); border-color: rgba(226, 182, 92, .55); color: var(--gold); }
.glegend .t2, .gcell.t2 { background: rgba(79, 195, 217, .13); border-color: rgba(79, 195, 217, .45); color: var(--aether); }
.glegend .t3, .gcell.t3 { background: var(--surface-2); border-color: var(--line-strong); color: var(--muted); }
.gboards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.gboard { padding: 10px; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; }
.gboard > b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 16px; margin-bottom: 8px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 5px; }
.gcell { position: relative; aspect-ratio: 1; min-width: 0; overflow-wrap: anywhere; hyphens: auto; display: grid; place-items: center; padding: 4px; border: 1px solid; border-radius: 6px; text-align: center; font-size: 11px; font-weight: 600; line-height: 1.15; cursor: help; }
.gcell i { position: absolute; top: 2px; left: 4px; font-style: normal; font-family: var(--f-mono); font-size: 9px; opacity: .7; }

.glinks { display: flex; flex-wrap: wrap; gap: 8px; }
.glinks a { font-size: 13px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-strong); text-decoration: none; }
.glinks a:hover { border-color: var(--aether); }

/* comparación con los mejores */
.inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.inline select { padding: 6px 10px; }
.meter .lab em { font-style: normal; font-size: 12px; }
.bar { position: relative; overflow: visible; }
.bar .mark { position: absolute; top: -4px; width: 3px; height: 16px; margin-left: -1px; background: var(--gold); border-radius: 2px; box-shadow: 0 0 6px rgba(226, 182, 92, .6); }
.legend { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.mark-l { display: inline-block; width: 3px; height: 12px; background: var(--gold); vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.gear.skills { min-width: 480px; }
.gear.skills .piece img { width: 26px; height: 26px; }
.gear tr.stig td { background: rgba(79, 195, 217, .04); }

footer { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; max-width: 95ch; }

/* ---------- pestaña Equipo: tarjetas por pieza ---------- */
.gear-group { font-family: var(--f-display); font-weight: 400; font-size: 18px; color: var(--gold); margin: 18px 0 10px; }
.gear-group:first-child { margin-top: 4px; }
.eqcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 12px; }
.eqcard { --gc: var(--g-common); background: linear-gradient(180deg, var(--surface-2), var(--surface) 70px); border: 1px solid var(--line); border-top: 3px solid var(--gc); border-radius: 10px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.eqcard.g-Rare { --gc: var(--g-rare); } .eqcard.g-Legend { --gc: var(--g-legend); } .eqcard.g-Unique { --gc: var(--g-unique); }
.eqcard.g-Epic, .eqcard.g-Mythic { --gc: var(--g-epic); }
.eqcard, .eqcard.g-Common, .eqcard.g-Rare, .eqcard.g-Legend, .eqcard.g-Unique, .eqcard.g-Epic { color: var(--ink); }
.gc-head { display: flex; gap: 12px; align-items: center; }
.gc-ic { position: relative; flex: 0 0 52px; height: 52px; border-radius: 8px; border: 1px solid var(--gc); background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--gc) 28%, transparent), var(--sunk) 75%); display: grid; place-items: center; }
.gc-ic img { width: 44px; height: 44px; object-fit: contain; }
.gc-ic span { position: absolute; right: -6px; bottom: -6px; font: 600 11px var(--f-mono); background: var(--bg); color: var(--gold); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; }
.gc-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gc-title small { font-size: 12px; color: var(--muted); }
.gc-title b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tag { font: 500 11px var(--f-mono); padding: 1px 6px; border-radius: 4px; background: var(--sunk); border: 1px solid var(--line); color: var(--muted); }
.tag.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.tag.gap { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.gc-score { flex: 0 0 auto; text-align: center; border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 8px; min-width: 56px; }
.gc-score b { display: block; font: 600 17px var(--f-mono); }
.gc-score small { font-size: 10px; color: var(--muted); }
.gc-score.s-good b { color: var(--good); } .gc-score.s-mid b { color: var(--warn); } .gc-score.s-bad b { color: var(--crit); }
.gc-base { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; font-size: 13px; }
.gc-base li { display: flex; gap: 6px; align-items: baseline; }
.gc-base li span { color: var(--muted); flex: 1 1 auto; }
.gc-base li b { font: 500 13px var(--f-mono); }
.gc-base li i { font: normal 500 11px var(--f-mono); color: var(--good); }
.gc-stones { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; }
.gc-stones .muted { margin-right: 2px; }
.stone { padding: 1px 7px; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); white-space: nowrap; }
.stone i { font-style: normal; font-family: var(--f-mono); color: var(--muted); }
.stone.Common { border-color: var(--g-common); } .stone.Rare { border-color: var(--g-rare); } .stone.Legend { border-color: var(--g-legend); }
.stone.Unique { border-color: var(--g-unique); } .stone.Epic, .stone.Mythic { border-color: var(--g-epic); }
.stone.theo { border-color: var(--aether); color: var(--aether); }
.stone.empty { border-style: dashed; color: var(--crit); }
.gc-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.gc-lines h5 { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gc-lines .muted { font-size: 12px; margin: 0; }
.lrows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.lrows li { display: flex; align-items: center; gap: 6px; padding: 3px 7px; border-radius: 5px; background: var(--sunk); border-left: 3px solid var(--line-strong); min-width: 0; }
.lrows li span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.lrows li b { font: 500 12px var(--f-mono); color: var(--ink); }
.lrows li em { font: normal 600 11px var(--f-mono); color: var(--muted); min-width: 34px; text-align: right; }
.lrows li.s-good { border-left-color: var(--good); } .lrows li.s-good em { color: var(--good); }
.lrows li.s-mid { border-left-color: var(--warn); } .lrows li.s-mid em { color: var(--warn); }
.lrows li.s-bad { border-left-color: var(--crit); } .lrows li.s-bad em { color: var(--crit); }
.lrows.ideal li { border-left-color: transparent; }
.lrows.ideal li.want { border-left-color: var(--gold); } .lrows.ideal li.want span { color: var(--gold); }
.lrows.ideal li.mine span { color: var(--good); }
.sbar { flex: 0 0 36px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; display: block; }
.sbar i { display: block; height: 100%; background: var(--aether); }
.lrows.ideal li.want .sbar i { background: var(--gold); } .lrows.ideal li.mine .sbar i { background: var(--good); }
.pill { font-size: 12px; padding: 0 7px; border-radius: 4px; border-left: 3px solid; background: var(--sunk); }
.pill.s-good { border-color: var(--good); } .pill.s-mid { border-color: var(--warn); } .pill.s-bad { border-color: var(--crit); }

/* ---------- alertas de eventos ---------- */
button.link { background: none; border: 0; padding: 2px 4px; color: var(--aether); font-size: 13px; font-weight: 500; text-decoration: underline; }
.alerts-btn { margin-top: 8px; display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 12px; border-color: var(--line-strong); background: var(--surface-2); }
.alerts-btn[aria-expanded="true"] { border-color: var(--aether); }
.alerts-btn small { font-weight: 500; font-size: 12px; color: var(--gold); }
.alerts-btn small:empty { display: none; }
.alerts-panel h4 { margin: 16px 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.al-head { display: flex; justify-content: space-between; align-items: center; }
.al-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
.al-next, .al-events, .al-timers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.al-next li { display: flex; align-items: center; gap: 10px; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.al-next li div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.al-next li small { color: var(--muted); font-size: 12px; }
.al-next li em { font: normal 600 13px var(--f-mono); color: var(--gold); white-space: nowrap; }
.al-next li.live { border-color: var(--good); } .al-next li.live em { color: var(--good); }
.al-ic { font-size: 20px; width: 26px; text-align: center; }
.al-opts { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.al-opts h4 { margin-top: 0; }
.al-opts select { margin-left: 6px; }
.al-opts label { display: flex; gap: 8px; align-items: center; }
.al-opts label input[type="checkbox"] { flex: 0 0 auto; }
.al-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.al-events li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.al-events li.off { opacity: .55; }
.al-name { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.al-name small { color: var(--muted); font-size: 12px; }
.al-lead { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.alerts-panel input[type="number"] { width: 58px; }
.alerts-panel input[type="number"], .alerts-panel input[type="time"], .alerts-panel select, .al-add input { font: inherit; font-size: 13px; padding: 4px 6px; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--sunk); color: var(--ink); color-scheme: dark; }
.al-edit { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; padding-top: 8px; border-top: 1px dashed var(--line); }
.al-days { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.al-days label { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; }
.al-toggle { position: relative; width: 38px; height: 22px; flex: 0 0 auto; }
.al-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.al-toggle span { position: absolute; inset: 0; border-radius: 11px; background: var(--line-strong); transition: background .15s; }
.al-toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: transform .15s; }
.al-toggle input:checked + span { background: var(--aether); }
.al-toggle input:checked + span::after { transform: translateX(16px); }
.al-toggle input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.al-add { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.al-add #al_bname { flex: 1 1 220px; min-width: 0; padding: 7px 9px; }
.al-add input[type="number"] { width: 52px; }
.al-timers li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; }
.al-timers li em { font-style: normal; color: var(--gold); font-family: var(--f-mono); }
.al-timers li.muted { background: none; border: 0; padding: 0; }
.al-toast { position: fixed; right: 16px; bottom: 16px; z-index: 50; max-width: min(360px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 3px; background: var(--surface-2); border: 1px solid var(--gold); border-left-width: 4px; border-radius: 8px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); cursor: pointer; animation: al-in .25s ease-out; }
.al-toast span { color: var(--muted); font-size: 13px; }
.al-toast.out { opacity: 0; transform: translateY(8px); transition: all .5s; }
@keyframes al-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 820px) { .al-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- pantallas anchas (PC en pantalla completa): usar los costados ---------- */
.wrap { max-width: 1840px; padding-left: clamp(16px, 2.5vw, 44px); padding-right: clamp(16px, 2.5vw, 44px); }
@media (min-width: 821px) { .boards-pair { grid-template-columns: repeat(2, minmax(0, 640px)); justify-content: center; } }
@media (min-width: 1400px) {
  /* Plan en dos columnas tipo periódico (cada tarjeta debajo de la anterior, sin huecos);
     el separador "Al final" cruza las dos columnas. */
  .plan { display: block; columns: 2; column-gap: 12px; }
  .plan > li { break-inside: avoid; margin-bottom: 10px; }
  .plan .divider, .plan .empty { column-span: all; }
  .al-events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .al-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Daevanion: los dos tableros a la izquierda y la lista de nodos que te faltan a la derecha. */
  .daev-layout { display: grid; grid-template-columns: minmax(0, 1300px) minmax(300px, 1fr); gap: 24px; align-items: start; }
  .daev-layout .boards-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0; }
  .daev-layout .board-wrap { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .daev-layout .nodes { max-height: 560px; }
  .gcols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}
@media (min-width: 1700px) {
  .meters.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}
.al-testbox { margin-top: 18px; border: 1px dashed var(--line-strong); border-radius: 8px; padding: 4px 14px 14px; }
.al-tcount { font: 600 13px var(--f-mono); color: var(--gold); }
.al-tlog { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 13px; max-height: 260px; overflow-y: auto; }
.al-tlog li { display: flex; gap: 10px; padding: 3px 8px; border-left: 3px solid var(--line-strong); background: var(--sunk); border-radius: 4px; }
.al-tlog li time { font-family: var(--f-mono); color: var(--muted); flex: 0 0 auto; }
.al-tlog li.ok { border-left-color: var(--good); } .al-tlog li.warn { border-left-color: var(--crit); } .al-tlog li.muted span { color: var(--muted); }

/* ---------- teléfono (Android) y ventanas angostas ---------- */
@media (max-width: 640px) {
  .wrap { gap: 14px; padding-top: 16px; }
  .top { flex-direction: column; align-items: stretch; }
  .search { max-width: none; }
  .search input { flex: 1 1 100%; min-width: 0; }
  .search select { flex: 1 1 0; min-width: 0; }
  .search button { flex: 0 0 auto; }
  .status { font-size: 13px; }
  .hero { padding: 14px; gap: 12px; }
  .hero img { width: 56px; height: 56px; }
  .hero-id { flex: 1 1 0; min-width: 0; }
  .hero-id h2 { font-size: 22px; overflow-wrap: anywhere; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .stat { min-width: 0; padding: 8px 10px; }
  .stat .v { font-size: 20px; }
  .stat .s { font-size: 11px; }
  #refresh { width: 100%; }
  .tabs button { padding: 10px 12px; }
  .panel { padding: 14px; }
  .plan-head { align-items: flex-start; }
  .seg span { display: none; }
  .rec { padding: 12px 12px 12px 46px; }
  .rec::before { left: 12px; }
  .cmp-controls { flex-direction: column; align-items: stretch; }
  .cmp-controls .inline { justify-content: space-between; }
  .cmp-controls select, .cmp-controls input { flex: 1 1 0; min-width: 0; }
  .board-grid { gap: 3px; padding: 8px; }
  .board-head h4 { font-size: 15px; }
  .board-head span { font-size: 11px; }
  .ghead h3 { font-size: 24px; }
  .gskills { grid-template-columns: 1fr; }
  .gwings { gap: 6px; }
  .gwing { padding: 8px 4px; }
  .gwing img { width: 48px; height: 48px; }
  .gwing.best img { width: 60px; height: 60px; }
  .gboards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gcell { font-size: 10px; }
  .details li b { min-width: 0; width: 100%; }
  .gc-lines { grid-template-columns: minmax(0, 1fr); }
  .eqcard { padding: 10px 12px 12px; }
}

/* =====================================================================
   Tema moderno (v2.3): vidrio, brillos suaves, iconos de línea propios.
   Va al final para ganar sobre las reglas anteriores sin reescribirlas.
   ===================================================================== */
body {
  background:
    radial-gradient(900px 520px at 88% -12%, rgba(79, 195, 217, .16), transparent 70%),
    radial-gradient(820px 520px at -8% 6%, rgba(139, 124, 246, .14), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .016) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .016) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--bg);
  background-attachment: fixed;
}
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.1; }
h3 { font-size: 20px; }

/* iconos */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ic-sm { width: .95em; height: .95em; vertical-align: -.12em; }
[data-icon] { display: inline-flex; }
[data-icon] .ic { width: 18px; height: 18px; }

/* controles */
input, select { border-radius: 10px; background: rgba(8, 12, 24, .75); border-color: var(--line-strong); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { outline: none; border-color: var(--aether); box-shadow: 0 0 0 3px rgba(79, 195, 217, .18); }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; background: var(--surface-2); border-color: var(--line-strong); transition: transform .12s, border-color .15s, box-shadow .15s, filter .15s; }
button:hover { border-color: rgba(79, 195, 217, .55); }
button:active { transform: translateY(1px); }
button.primary { background: linear-gradient(135deg, #63d6ea, #3c9fd0); border-color: transparent; color: #031018; box-shadow: 0 6px 18px rgba(79, 195, 217, .28); }
button.primary:hover { filter: brightness(1.08); box-shadow: 0 8px 24px rgba(79, 195, 217, .38); }
button.link, button.link:hover { box-shadow: none; transform: none; }

/* cabecera */
.top { align-items: center; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo { width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line-strong), 0 8px 24px rgba(79, 195, 217, .22); }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; flex: 1 1 520px; }
.search { max-width: 640px; flex: 1 1 420px; }
.search-field { position: relative; flex: 1 1 220px; display: flex; }
.search-field > [data-icon] { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field input { width: 100%; padding-left: 38px; }
.alerts-btn { margin-top: 0; padding: 9px 14px; border-radius: 99px; background: var(--surface-2); }
.alerts-btn [data-icon] { color: var(--gold); }
.alerts-btn small { font-size: 12px; }

/* tarjetas de vidrio */
.panel, .hero, .cmpbar, .result, .update, .eqcard, .al-events li, .al-next li { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.panel { border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.hero { border-radius: 20px; padding: 20px 22px; box-shadow: var(--shadow);
  background: linear-gradient(120deg, rgba(79, 195, 217, .10), rgba(139, 124, 246, .10) 55%, rgba(19, 26, 46, .75)); }
.hero img { box-shadow: 0 0 0 3px rgba(79, 195, 217, .55), 0 0 28px rgba(79, 195, 217, .35); }
.hero-id h2 { font-size: 30px; }
.stat { border-radius: 14px; border: 1px solid var(--line); padding: 12px 16px; min-width: 170px; }
.stat .k { display: flex; align-items: center; gap: 6px; }
.stat .k [data-icon] .ic { width: 14px; height: 14px; color: var(--aether); }
.stat .v { font-family: var(--f-display); font-weight: 600; font-size: 28px; letter-spacing: -.01em;
  background: linear-gradient(180deg, #ffe3a1, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cmpbar { border-radius: 14px; }
.result { border-radius: 14px; border-color: var(--line-strong); transition: transform .12s, border-color .15s; }
.result:hover { transform: translateY(-2px); }

/* pestañas tipo píldora */
.tabs { border-bottom: 0; background: var(--sunk); border: 1px solid var(--line); border-radius: 14px; padding: 5px; gap: 4px; width: fit-content; max-width: 100%; }
.tabs button { border: 0; border-radius: 10px; padding: 9px 16px; background: transparent; }
.tabs button:hover { background: rgba(255, 255, 255, .04); }
.tabs button[aria-selected="true"] { color: var(--ink); background: linear-gradient(135deg, rgba(79, 195, 217, .24), rgba(139, 124, 246, .2)); box-shadow: inset 0 0 0 1px rgba(79, 195, 217, .35); }
.tabs button[aria-selected="true"] [data-icon] { color: var(--aether); }

/* plan */
.rec { border-radius: 16px; background: var(--surface-2); border-color: var(--line); padding: 14px 16px 14px 56px; }
.rec::before { left: 16px; top: 14px; width: 28px; height: 28px; font-weight: 600; }
.rec:first-child { background: linear-gradient(110deg, rgba(79, 195, 217, .16), rgba(139, 124, 246, .08) 60%, var(--surface-2)); border-color: rgba(79, 195, 217, .45); }
.rec:first-child::before { background: linear-gradient(135deg, #63d6ea, #3c9fd0); border: 0; }
.boost { border-radius: 99px; padding: 3px 10px; }
.seg { border-radius: 12px; }
.seg button { border-radius: 9px; }
.seg button[aria-pressed="true"] { background: linear-gradient(135deg, #63d6ea, #3c9fd0); }
.rec .item { border-radius: 6px; background: rgba(255, 255, 255, .05); }
.bar { height: 9px; background: rgba(255, 255, 255, .06); }
.bar i { background: linear-gradient(90deg, #3c9fd0, #63d6ea); }

/* equipo, alertas */
.eqcard { border-radius: 16px; box-shadow: var(--shadow); }
.lrows li { border-radius: 8px; }
.lrows li span { display: flex; align-items: center; gap: 6px; }
.al-events li, .al-next li { border-radius: 12px; }
.al-name b { display: inline-flex; align-items: center; gap: 8px; }
.al-name b .ic { color: var(--aether); }
.al-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(79, 195, 217, .12); color: var(--aether); }
.al-ic .ic { width: 20px; height: 20px; }
.al-next li.live .al-ic { background: rgba(91, 199, 139, .14); color: var(--good); }
.al-timers li span .ic { color: var(--crit); }
.al-testbox h4 { display: flex; align-items: center; gap: 8px; }
.al-toast { border-radius: 14px; backdrop-filter: blur(14px); }
.glinks a { display: inline-flex; align-items: center; gap: 5px; }
.gbadge .ic { width: 12px; height: 12px; }

@media (max-width: 640px) {
  .brand .logo { width: 44px; height: 44px; }
  .top-actions { flex: 1 1 100%; justify-content: stretch; }
  .search { max-width: none; flex: 1 1 100%; }
  .alerts-btn { width: 100%; justify-content: center; }
  .tabs { width: 100%; }
  .panel { padding: 16px; border-radius: 16px; }
  .stat .v { font-size: 22px; }
}

/* ---------- plan: acordeón de piezas (líneas y pasivas) ---------- */
.acc { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.acc-tools { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.acc-item { border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 11, 22, .55); overflow: hidden; transition: border-color .2s, background .2s; }
.acc-item:hover { border-color: var(--line-strong); }
.acc-item.open { border-color: rgba(79, 195, 217, .4); background: rgba(10, 16, 32, .75); }
.acc-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: transparent; border: 0; border-radius: 0; text-align: left; font-weight: 500; justify-content: flex-start; }
.acc-head:hover { border: 0; background: rgba(255, 255, 255, .025); }
.acc-head:active { transform: none; }
.acc-ic { --gc: var(--g-common); position: relative; flex: 0 0 42px; height: 42px; border-radius: 10px; border: 1px solid var(--gc); display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--gc) 28%, transparent), rgba(7, 11, 22, .9) 75%); }
.acc-ic.g-Rare { --gc: var(--g-rare); } .acc-ic.g-Legend { --gc: var(--g-legend); } .acc-ic.g-Unique { --gc: var(--g-unique); } .acc-ic.g-Epic, .acc-ic.g-Mythic { --gc: var(--g-epic); }
.acc-ic img { width: 34px; height: 34px; object-fit: contain; }
.acc-ic i { position: absolute; right: -5px; bottom: -5px; font: normal 600 10px var(--f-mono); color: var(--gold); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 3px; }
.acc-title { flex: 0 1 220px; min-width: 0; display: flex; flex-direction: column; }
.acc-title b { font-size: 14px; color: var(--ink); }
.acc-title small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-sum { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.acc-sum .bad { color: var(--crit); font-weight: 600; }
.acc-prev { display: flex; flex-wrap: wrap; gap: 4px; max-height: 22px; overflow: hidden; }
.acc-prev .ln { font-size: 11px; }
.acc-score { flex: none; font: 600 14px var(--f-mono); padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line-strong); }
.acc-score.s-good { color: var(--good); } .acc-score.s-mid { color: var(--warn); } .acc-score.s-bad { color: var(--crit); }
.acc-chev { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform .28s ease; }
.acc-item.open .acc-chev { transform: rotate(180deg); color: var(--aether); }
/* animación de apertura: la fila de la cuadrícula pasa de 0 a su alto real */
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.acc-item.open .acc-body { grid-template-rows: 1fr; }
.acc-inner { min-height: 0; overflow: hidden; }
.acc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 4px 14px 14px; opacity: 0; transform: translateY(-6px); transition: opacity .25s ease .05s, transform .25s ease .05s; }
.acc-item.open .acc-cols { opacity: 1; transform: none; }
.acc-cols h5 { margin: 6px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.acc-cols .lrows li u { text-decoration: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--crit); border: 1px solid rgba(239, 125, 125, .45); border-radius: 4px; padding: 0 4px; }
.acc-cols .lrows li.none { color: var(--muted); border-left-color: transparent; }
@media (prefers-reduced-motion: reduce) { .acc-body, .acc-cols, .acc-chev { transition: none; } }
@media (max-width: 640px) {
  .acc-head { flex-wrap: wrap; }
  .acc-title { flex: 1 1 140px; }
  .acc-sum { order: 5; flex-basis: 100%; }
  .acc-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- guía: Pantheon / Deity Stats ---------- */
.pprio { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 10px 0 6px; }
.pprio small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; }
.pchip em { font-style: normal; font-weight: 500; font-size: 11px; color: var(--muted); }
.pchip i { font: normal 700 11px var(--f-mono); width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #63d6ea, #3c9fd0); color: #031018; }
.pchip.main { border-color: rgba(79, 195, 217, .5); background: rgba(79, 195, 217, .1); }
.pchip.alt { border-color: rgba(232, 189, 98, .35); color: var(--gold); }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 14px 0 6px; }
.dtile { border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; background: rgba(7, 11, 22, .5); display: flex; flex-direction: column; gap: 1px; opacity: .55; }
.dtile b { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.dtile b i { font: normal 700 11px var(--f-mono); color: #031018; background: var(--aether); border-radius: 50%; width: 18px; height: 18px; display: grid; place-items: center; }
.dtile small { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.dtile span { font-size: 12px; color: var(--muted); }
.dtile.main { opacity: 1; border-color: rgba(79, 195, 217, .5); background: linear-gradient(160deg, rgba(79, 195, 217, .12), rgba(7, 11, 22, .6)); }
.dtile.main span { color: var(--ink); }
.dtile.alt { opacity: .85; border-color: rgba(232, 189, 98, .3); }
.psub { margin: 16px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pslots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.pslot { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: rgba(7, 11, 22, .45); }
.pslot-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.pslot-h b { font-family: var(--f-display); font-size: 16px; }
.pslot-h small { font-size: 12px; color: var(--muted); }
.pslot ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pslot li { display: flex; flex-direction: column; gap: 5px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, .025); }
.pslot li b { font-size: 13px; }
.pslot li small { display: block; font-size: 11px; color: var(--muted); }
.pslot li.pick { border-color: rgba(79, 195, 217, .4); background: rgba(79, 195, 217, .07); }
.dstats { display: flex; flex-wrap: wrap; gap: 4px; }
.dstat { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); }
.dstat.main { color: var(--aether); border-color: rgba(79, 195, 217, .45); }
.dstat.alt { color: var(--gold); border-color: rgba(232, 189, 98, .35); }
@media (min-width: 900px) { .dgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.psrc { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* acordeón: cada pieza con sus secciones (líneas y pasivas) */
.acc-sec { padding: 2px 14px 12px; opacity: 0; transform: translateY(-6px); transition: opacity .25s ease .05s, transform .25s ease .05s; }
.acc-item.open .acc-sec { opacity: 1; transform: none; }
.acc-sec + .acc-sec { border-top: 1px dashed var(--line); padding-top: 10px; }
.acc-sec h6 { margin: 6px 0 2px; font-family: var(--f-display); font-size: 14px; font-weight: 600; color: var(--aether); }
.acc-sec .acc-cols { padding: 0; opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .acc-sec { transition: none; } }

/* guía: subpestañas (una sección a la vez) */
.gtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.gtabs button { padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); background: rgba(7, 11, 22, .55); border: 1px solid var(--line); }
.gtabs button .ic { width: 15px; height: 15px; }
.gtabs button:hover { color: var(--ink); }
.gtabs button[aria-selected="true"] { color: var(--ink); border-color: rgba(79, 195, 217, .5); background: linear-gradient(135deg, rgba(79, 195, 217, .2), rgba(139, 124, 246, .16)); }
.gtabs button[aria-selected="true"] .ic { color: var(--aether); }
.gpanel { animation: gp-in .25s ease; }
@keyframes gp-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .gpanel { animation: none; } }

/* ---------- plan en una sola columna ---------- */
.plan, .plan { display: grid; columns: auto; gap: 12px; }
@media (min-width: 1400px) { .plan { display: grid; columns: auto; } .plan > li { margin-bottom: 0; } }

/* ---------- plegado (plan y equipo): la fila pasa de 0 a su alto real ---------- */
.fold-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s ease; }
.fold.open > .fold-body { grid-template-rows: 1fr; }
.fold-inner { min-height: 0; overflow: hidden; }
.fold > .fold-body > .fold-inner { opacity: 0; transition: opacity .25s ease .05s; }
.fold.open > .fold-body > .fold-inner { opacity: 1; }
.fold.open > .rec-head .acc-chev, .fold.open > .gc-head .acc-chev { transform: rotate(180deg); color: var(--aether); }
@media (prefers-reduced-motion: reduce) { .fold-body, .fold-inner { transition: none !important; } }

.rec-toggle { width: 100%; padding: 0; background: transparent; border: 0; text-align: left; justify-content: flex-start; color: var(--ink); }
.rec-toggle:hover { border: 0; }
.rec-toggle:active { transform: none; }
.rec-toggle h4 { flex: 1 1 auto; }
.rec-toggle .acc-chev { margin-left: 6px; }
.fold-sum { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--warn); }
.rec.fold .fold-inner > p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

/* tarjetas de equipo plegables */
.gear-tools { margin-bottom: 4px; }
.eqcard.fold { gap: 0; }
.eqcard .gc-head { cursor: pointer; border-radius: 10px; }
.eqcard .gc-head:focus-visible { outline: 2px solid var(--aether); outline-offset: 4px; }
.eqcard .gc-head .acc-chev { color: var(--muted); }
.gc-sum { margin: 8px 0 0 64px; font-size: 12px; font-weight: 600; color: var(--muted); }
.gc-sum.bad { color: var(--warn); }
.eqcard.fold > .fold-body > .fold-inner { display: flex; flex-direction: column; gap: 10px; }
.eqcard.fold.open > .fold-body > .fold-inner { padding-top: 12px; }

/* Pantheon: imagen de cada decoración */
.pslot li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; }
.pimg { width: 56px; height: 56px; border-radius: 10px; background: radial-gradient(circle at 50% 40%, rgba(79, 195, 217, .16), rgba(7, 11, 22, .9) 75%); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.pimg img { width: 52px; height: 52px; object-fit: contain; }
.pslot li.pick .pimg { border-color: rgba(79, 195, 217, .55); box-shadow: 0 0 14px rgba(79, 195, 217, .2); }
.pinfo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

/* fondo: arte propio (nebulosa, anillos y las alas del logo) */
body {
  background:
    radial-gradient(900px 520px at 88% -12%, rgba(79, 195, 217, .10), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .012) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px) 0 0 / 44px 44px,
    url("img/bg.svg") center top / cover no-repeat,
    var(--bg);
  background-attachment: fixed;
}

.eqcards { align-items: start; }

/* ---------- guía: Genus con imágenes y mascotas/monturas nivel 1/2/3 ---------- */
.gb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gb-head img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong), 0 4px 12px rgba(0, 0, 0, .35); }
.gpets { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 10px; }
.gpet { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: rgba(7, 11, 22, .5); display: flex; flex-direction: column; gap: 10px; }
.gpet-h { display: flex; align-items: center; gap: 12px; }
.gpet-h img { width: 58px; height: 58px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong), 0 0 18px rgba(79, 195, 217, .18); }
.gpet-h b { display: block; font-family: var(--f-display); font-size: 17px; }
.gpet-h small { font-size: 12px; color: var(--muted); }
.gpet-lv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.gpet-lv li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; background: rgba(255, 255, 255, .03); font-size: 13px; }
.gpet-lv li i { font: normal 700 11px var(--f-mono); color: #031018; background: linear-gradient(135deg, #63d6ea, #3c9fd0); border-radius: 6px; padding: 2px 0; text-align: center; }
.gpet-lv li b { color: var(--good); font-family: var(--f-mono); font-weight: 600; }
.gpet-lv li em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.gpet-tot { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.gpet-tot b { color: var(--gold); font-family: var(--f-mono); font-weight: 600; }

/* ---------- teléfono: nada más ancho que la pantalla (va al final para ganar) ---------- */
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .top { flex-direction: column; align-items: stretch; gap: 12px; }
  .brand { min-width: 0; }
  .top-actions { flex: none; width: 100%; min-width: 0; justify-content: stretch; }
  .search { flex: none; width: 100%; max-width: none; }
  .search-field { flex: 1 1 100%; min-width: 0; }
  .search select { flex: 1 1 0; min-width: 0; }
  .alerts-btn { width: 100%; justify-content: center; flex-wrap: wrap; }
  .hero-id { min-width: 0; }
  .hero-id .muted { overflow-wrap: anywhere; }
  .hero-stats { width: 100%; }
  .stat { min-width: 0; }
  .tabs { width: 100%; }
  .plan-head { flex-direction: column; align-items: stretch; }
  .seg { align-self: flex-start; }
  .rec { padding: 12px 12px 12px 48px; }
  .rec-head, .rec-toggle { flex-wrap: wrap; }
  .eqcards { grid-template-columns: minmax(0, 1fr); }
  .gc-head { flex-wrap: wrap; }
  .gc-title { flex: 1 1 160px; }
  .gc-sum { margin-left: 0; }
  .gc-base { grid-template-columns: minmax(0, 1fr); }
  .gc-lines, .acc-cols { grid-template-columns: minmax(0, 1fr); }
  .acc-head { flex-wrap: wrap; gap: 8px 10px; }
  .acc-title { flex: 1 1 120px; }
  .acc-sum { order: 5; flex-basis: 100%; }
  .dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pslots, .gpets { grid-template-columns: minmax(0, 1fr); }
  .pprio { flex-direction: column; }
  .gtabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .gtabs::-webkit-scrollbar { display: none; }
  .gtabs button { flex: none; }
  .al-events, .al-next { grid-template-columns: minmax(0, 1fr); }
  .al-lead { flex-wrap: wrap; }
  .daev-layout { grid-template-columns: minmax(0, 1fr); }
  .boards-pair { grid-template-columns: minmax(0, 1fr); }
}

/* botón de Alertas: icono y textos centrados en vertical (antes por línea base: la campana quedaba arriba) */
.alerts-btn { align-items: center; line-height: 1.2; }
.alerts-btn [data-icon] { align-self: center; }
.alerts-btn small { line-height: 1.2; }
