/* Comp Lab Forever — tema inspirado na UI do WoW.
   Hierarquia: dourado só para nota, seleção e ação principal; o resto em tons neutros de pedra/couro.
   Tipografia: Cinzel só em títulos grandes e números de nota; texto corrido ≥ 12px. */
:root {
  --bg: #0b0a08;
  --panel: #16130f;
  --panel-2: #1d1914;
  --panel-3: #262019;
  --line: #322b21;
  --line-soft: #26211a;
  --gold: #e8c36a;
  --gold-bright: #ffd97a;
  --gold-dim: #8a6d35;
  --text: #efe6d2;
  --muted: #a89e8f;
  --pos: #5fe08a;
  --neg: #ff7a6b;
  --warn: #f5b942;
  --red: #8f1a12;
  --q-S: #ff8000;
  --q-A: #b65cff;
  --q-B: #3b9bff;
  --q-C: #3ee03e;
  --q-D: #9d9d9d;
  --r: 14px;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-padding-top: 76px; }
body {
  color: var(--text);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 15% -120px, rgba(232, 195, 106, .12), transparent 70%),
    radial-gradient(800px 500px at 100% 0, rgba(143, 26, 18, .14), transparent 70%);
  background-repeat: no-repeat;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }
code { background: var(--panel-3); padding: 1px 6px; border-radius: 5px; font-size: 12px; color: var(--gold); }
h1, h2, h3, h4 { margin: 0; }
h2 { font-family: var(--display); font-weight: 700; letter-spacing: .03em; font-size: 20px; color: var(--text); }
h3 { font: 700 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
h4 { font: 700 13px/1.3 var(--sans); color: var(--text); margin: 16px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.fine { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.fine.top { margin: 0 0 12px; }
.tbd { color: var(--warn); font-size: 12px; }
.pos-t { color: var(--pos); }
.neg-t { color: var(--neg); }
.src { margin-left: 3px; font-size: 12px; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; border-radius: 6px; }
button, select, input { font: inherit; color: inherit; }

/* ---------- ícones (moldura estilo action bar) ---------- */
.frame {
  --s: 40px;
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--s); height: var(--s); border-radius: calc(var(--s) * .16);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--cls, var(--gold-dim)) 45%, #000), #000);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px #463a25, 0 2px 6px rgba(0, 0, 0, .6);
}
.frame::before { content: attr(data-letter); font: 800 calc(var(--s) * .45) var(--display); color: rgba(255, 255, 255, .8); }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 -8px 14px rgba(0, 0, 0, .35); }
.frame.ghost { background: repeating-linear-gradient(45deg, #15120d 0 6px, #1b1711 6px 12px); }
.frame.ghost::before { content: ""; }
.frame .corner { position: absolute; right: -5px; bottom: -5px; z-index: 1; line-height: 0; }
.frame.mini { box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--cls, #463a25); }

/* ---------- header ---------- */
.hero {
  display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between;
  padding: 20px clamp(16px, 4vw, 40px) 16px; max-width: 1480px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; }
.crest { width: 42px; height: 42px; fill: var(--gold); filter: drop-shadow(0 0 14px rgba(232, 195, 106, .4)); }
.crest .crest-inner { fill: var(--red); }
h1 {
  font: 800 clamp(26px, 3.4vw, 32px)/1 var(--display); letter-spacing: .06em;
  background: linear-gradient(180deg, #fff1c4, var(--gold) 55%, #b2852f); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- botões ---------- */
.btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 8px 14px; cursor: pointer; font-weight: 600; transition: .15s; min-height: 38px;
}
.btn:hover { border-color: var(--gold-dim); color: var(--gold-bright); }
.btn.primary { background: linear-gradient(180deg, #b0281b, #6e130c); border-color: #e0a84a; color: #ffe7b0; font-family: var(--display); letter-spacing: .05em; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.small { padding: 4px 10px; font-size: 12px; min-height: 32px; }
.link { background: none; border: 0; color: var(--gold); padding: 0; cursor: pointer; font-size: 13px; margin-top: 12px; }
.link:hover { color: var(--gold-bright); text-decoration: underline; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, .3); }
.seg button { background: transparent; border: 0; padding: 8px 13px; cursor: pointer; color: var(--muted); transition: .15s; min-height: 38px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: #2b2416; color: var(--gold-bright); }
select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; cursor: pointer; color: var(--text); min-height: 36px; }

.help {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; position: relative;
  font: 700 11px/1 var(--sans); color: var(--muted); border: 1px solid var(--line); cursor: help; text-transform: none; letter-spacing: 0;
}
.help:hover, .help:focus { color: var(--text); border-color: var(--gold-dim); }
.help:hover::after, .help:focus::after {
  content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); z-index: 30;
  width: max-content; max-width: 260px; padding: 8px 10px; border-radius: 8px; white-space: normal; text-align: left;
  font: 400 12px/1.45 var(--sans); color: var(--text); background: #0f0d0a; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}

main { padding: 18px clamp(16px, 4vw, 40px) 56px; max-width: 1480px; margin: 0 auto; }

/* ---------- placar fixo ---------- */
.scorebar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 10, 8, .94); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.scorebar-inner {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  max-width: 1480px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px);
}
.mode {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 10px; cursor: pointer; text-align: left; min-width: 0;
  background: transparent; border: 1px solid transparent; color: var(--muted); transition: .2s;
}
.mode .frame { filter: grayscale(.7) brightness(.7); transition: .2s; }
.mode:hover { background: var(--panel-2); }
.mode.on { border-color: var(--gold-dim); color: var(--text); background: #1f1a11; }
.mode.on .frame { filter: none; }
.mode-label { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode-label .short { display: none; }
.mode-score { margin-left: auto; font: 800 22px/1 var(--display); white-space: nowrap; }
.mode-score small { font-size: 13px; margin-left: 3px; }
.mode-pending { margin-left: auto; color: var(--muted); }
.delta {
  position: absolute; top: -6px; right: 6px; font: 800 12px/1 var(--sans); padding: 3px 7px; border-radius: 99px;
  animation: pop 2.6s ease forwards; pointer-events: none;
}
.delta.up { background: #163d24; color: var(--pos); border: 1px solid #2c8a4c; }
.delta.down { background: #4a1712; color: var(--neg); border: 1px solid #8a2c22; }
@keyframes pop { 0% { opacity: 0; transform: translateY(4px) scale(.8); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .delta { animation: none; } }

/* faixas = qualidade de item */
.band-S { color: var(--q-S); text-shadow: 0 0 18px rgba(255, 128, 0, .45); }
.band-A { color: var(--q-A); text-shadow: 0 0 18px rgba(182, 92, 255, .4); }
.band-B { color: var(--q-B); text-shadow: 0 0 18px rgba(59, 155, 255, .35); }
.band-C { color: var(--q-C); text-shadow: 0 0 18px rgba(62, 224, 62, .3); }
.band-D { color: var(--q-D); }

/* ---------- painéis ---------- */
.panel {
  position: relative; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

/* ---------- roster ---------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 8px 0 14px; }
.lead { margin: 4px 0 0; color: var(--muted); }
.lead b { color: var(--text); }
.playing { font-size: 12px; color: var(--muted); padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; }
.roster { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: start; }
.player {
  --accent: var(--gold-dim);
  border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  background: radial-gradient(240px 110px at 50% -40px, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%), var(--panel);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
}
.player header { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 800 16px var(--display); color: #1a140b;
  background: radial-gradient(circle at 35% 30%, #fff1c4, var(--gold) 50%, #8a6d35);
  box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--accent);
}
.pname { display: grid; line-height: 1.2; min-width: 0; }
.pname h3 { margin: 0; font: 700 16px var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); }
.pname span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch-wrap { margin-left: auto; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.switch-label { font-size: 12px; color: var(--muted); }
.switch {
  position: relative; width: 38px; height: 22px; flex: none; border-radius: 99px; cursor: pointer; padding: 0;
  background: #120f0b; border: 1px solid var(--line); transition: .2s;
}
.switch span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #5a5144; transition: .2s; }
.switch[aria-checked="true"] { background: #2b2416; border-color: var(--gold-dim); }
.switch[aria-checked="true"] span { left: 18px; background: radial-gradient(circle at 35% 30%, #fff1c4, var(--gold)); }

.class-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cls-btn {
  display: grid; justify-items: center; gap: 4px; background: none; border: 0; padding: 6px 2px; border-radius: 10px; cursor: pointer; min-width: 0;
}
.cls-btn:hover { background: rgba(255, 255, 255, .03); }
.cls-btn .frame { transition: filter .2s, box-shadow .2s; }
.cls-name { font-size: 12px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.class-grid.has-picks .cls-btn:not(.on) .frame { filter: grayscale(.85) brightness(.5); }
.class-grid.has-picks .cls-btn:not(.on):hover .frame { filter: none; }
.cls-btn.on .frame { box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--cls), 0 0 16px color-mix(in srgb, var(--cls) 70%, transparent); }
.cls-btn.on .cls-name { color: var(--cls); font-weight: 700; }

.pick { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--cls) 16%, transparent), transparent 85%); border-left: 2px solid var(--cls); }
.pick-info { display: grid; line-height: 1.25; min-width: 0; flex: 1; }
.pick-name { font: 700 16px var(--display); color: var(--cls); }
.pick-spec { font-size: 13px; color: var(--text); }
.pick-spec em { font-style: normal; font-size: 12px; color: var(--muted); }
.swap { flex: none; }
.spec-choice { display: flex; gap: 8px; align-items: center; }
.spec-choice button { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 6px; line-height: 0; }
.spec-choice button .frame { filter: grayscale(.8) brightness(.55); transition: .15s; }
.spec-choice button:hover .frame { filter: none; }
.spec-choice button[aria-pressed="true"] .frame { filter: none; box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold); }
.spec-choice .auto { line-height: 1; font-size: 12px; font-weight: 700; padding: 0 10px; height: 32px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.spec-choice .auto[aria-pressed="true"] { color: #1a140b; background: var(--gold); border-color: var(--gold); }

.player.off { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .015) 0 10px, transparent 10px 20px), var(--panel); border-style: dashed; border-color: var(--line); }
.player.off .avatar { filter: grayscale(1) brightness(.6); box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--line); }
.player.off .pname h3 { color: var(--muted); }
.off-body { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; }
.off-body .frame { filter: grayscale(1) brightness(.6); }
.off-body p { margin: 0; }

/* ---------- controles do modo ---------- */
.subcontrols { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 22px 0 14px; min-height: 38px; }
.field { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; }
.hint b { color: var(--text); }

/* ---------- Raio-X ---------- */
.xray { padding: 22px; background: radial-gradient(600px 160px at 0 0, rgba(232, 195, 106, .08), transparent 70%), linear-gradient(180deg, var(--panel-2), var(--panel)); }
.xray-head { display: grid; grid-template-columns: auto 1fr; gap: 12px 28px; align-items: center; margin-bottom: 18px; }
.score { display: flex; align-items: center; gap: 14px; }
.score-num { font: 800 76px/.9 var(--display); font-variant-numeric: tabular-nums; }
.score-meta { display: grid; gap: 6px; }
.band-letter { font: 800 18px/1.1 var(--display); }
.conf-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 4px 3px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); width: fit-content; }
.conf-pill.conf-alta { color: #8cf0ad; border-color: #1f6b3a; }
.conf-pill.conf-média { color: #f5d27a; border-color: #6e5317; }
.conf-pill.conf-baixa { color: #ffb3a8; border-color: #7a2219; }
.xray-title h2 { font-size: 22px; }
.alt-tag { font: 700 12px var(--sans); color: var(--gold); border: 1px solid var(--gold-dim); border-radius: 99px; padding: 2px 8px; vertical-align: 4px; letter-spacing: 0; }
.verdict { margin: 6px 0 0; color: var(--muted); max-width: 820px; }
.verdict b { color: var(--text); font-weight: 650; }
.gates { margin: 10px 0 0; padding: 8px 12px; list-style: none; color: var(--warn); font-size: 13px; background: rgba(245, 185, 66, .08); border-radius: 10px; border: 1px solid rgba(245, 185, 66, .25); width: fit-content; }

.xray-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.xray-side { display: grid; gap: 14px; align-content: start; }
.xray-block { background: rgba(0, 0, 0, .22); border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px; min-width: 0; }
.radar-block { display: grid; align-content: start; }
.radar { width: 100%; max-width: 560px; height: auto; justify-self: center; overflow: visible; }
.radar .ring { fill: none; stroke: rgba(232, 195, 106, .1); stroke-width: 1; }
.radar .ring.outer { stroke: rgba(232, 195, 106, .22); fill: rgba(0, 0, 0, .18); }
.radar .spoke { stroke: rgba(232, 195, 106, .1); stroke-width: 1; }
.radar .ring-lbl { fill: var(--muted); font-size: 10px; opacity: .7; }
.radar .ref { fill: none; stroke: #c9c2b4; stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .7; }
.radar .comp { fill: rgba(232, 195, 106, .22); stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; }
.radar .dot { fill: var(--gold-bright); stroke: var(--panel); stroke-width: 2; }
.radar .hit { fill: transparent; cursor: help; }
.radar .vtx:hover .dot { r: 7; }
.radar .axis { fill: var(--text); font: 600 12px var(--sans); }
.radar .axis .up { fill: var(--pos); font-size: 11px; }
.radar .axis .down { fill: var(--neg); font-size: 11px; }
.radar .axis-val { fill: var(--gold); font: 800 14px var(--display); }
.radar-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; justify-content: center; }
.lg-comp, .lg-ref { display: inline-block; width: 18px; height: 10px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.lg-comp { background: rgba(232, 195, 106, .35); border: 2px solid var(--gold); }
.lg-ref { width: 24px; border-top: 2px dashed #c9c2b4; height: 0; vertical-align: 3px; border-radius: 0; }

.why { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.why li { display: grid; grid-template-columns: 44px 1fr; gap: 6px; font-size: 13px; }
.why b { font-variant-numeric: tabular-nums; }
.why.pos b { color: var(--pos); }
.why.neg b { color: var(--neg); }

.meters { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.meters li { display: grid; grid-template-columns: 22px 54px 1fr 48px; gap: 8px; align-items: center; color: var(--muted); }
.meters li.cur { color: var(--text); }
.meter-label { font-size: 13px; font-weight: 600; }
.meter { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 4px; background: #6e5a31; transition: width .35s; }
.meters li.cur .meter span { background: linear-gradient(90deg, var(--gold-dim), var(--gold)); }
.meter-val { text-align: right; font: 800 16px var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.meter-val small { font-size: 12px; margin-left: 2px; }

.roles-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.role-count { font-size: 12px; padding: 3px 10px; border-radius: 99px; border: 1px solid; }
.role-count b { font-size: 13px; margin-right: 2px; }
.role-count.role-tank, .role.role-tank { color: #9cc8ff; border-color: #2f5aa8; }
.role-count.role-heal, .role.role-heal { color: #8cf0ad; border-color: #1f6b3a; }
.role-count.role-dps, .role.role-dps { color: #ffb3a8; border-color: #7a2219; }
.stack { display: flex; gap: 2px; height: 12px; border-radius: 4px; overflow: hidden; }
.stack span { min-width: 6px; }
.stack-legend { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.stack-legend b { color: var(--text); margin-left: 2px; }
.stack-legend .zero { opacity: .5; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.kit { list-style: none; margin: 0; padding: 0; display: grid; font-size: 13px; }
.kit li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line-soft); color: var(--muted); }
.kit li b { color: var(--text); display: inline-flex; gap: 4px; }
.kit li.miss b { color: var(--neg); }
.kit i { font-style: normal; font-weight: 700; width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 4px; font-size: 12px; }
.kit i.ok { background: rgba(95, 224, 138, .14); color: var(--pos); }
.kit i.miss { background: rgba(255, 122, 107, .12); color: var(--neg); text-decoration: line-through; }

.pug { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 14px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(59, 155, 255, .35); background: rgba(59, 155, 255, .05); font-size: 13px; }
.pug-title { font-weight: 700; color: #9cc8ff; }
.pug-item { display: inline-flex; gap: 8px; align-items: center; }

/* abas de detalhe */
.dtabs { display: flex; gap: 4px; margin-top: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.dtab {
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600; white-space: nowrap; min-height: 44px;
}
.dtab:hover { color: var(--text); }
.dtab.on { color: var(--gold-bright); border-bottom-color: var(--gold); }
.count-pill { font-size: 12px; background: var(--panel-3); border-radius: 99px; padding: 1px 7px; margin-left: 4px; color: var(--muted); }
.dtab-body { padding-top: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.contribs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; }
.contrib { display: flex; gap: 12px; align-items: center; }
.contrib-body { flex: 1; display: grid; gap: 3px; min-width: 0; }
.contrib-head { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.contrib-head span { font-weight: 700; }
.contrib-spec { font-size: 12px; }
.contrib.empty { opacity: .5; }
.contrib.empty > div { display: grid; }
.role { font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 99px; margin-left: 4px; border: 1px solid; }
.bar { height: 6px; background: rgba(0, 0, 0, .45); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); transition: width .3s; }
.bar span.pos { background: linear-gradient(90deg, #2c8a4c, var(--pos)); }
.bar span.neg { background: linear-gradient(90deg, #8a2c22, var(--neg)); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; }
.checklist li { display: grid; grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--line-soft); font-size: 13px; align-items: baseline; }
.checklist li:last-child { border-bottom: 0; }
.checklist .mark { font-weight: 800; }
.checklist .ok .mark { color: var(--pos); }
.checklist .miss .mark { color: var(--neg); }
.checklist .partial .mark { color: var(--warn); }
.checklist .miss .lbl { color: var(--muted); }
.checklist .who { color: var(--muted); }
.checklist .who em { color: var(--text); font-style: normal; }
.checklist s { color: #6f6758; margin-left: 4px; }
.count { margin-left: auto; font-size: 12px; color: var(--muted); letter-spacing: 0; text-transform: none; font-weight: 600; }
.pips { color: var(--gold); letter-spacing: 1px; margin-left: 4px; }
.conf { display: inline-block; font: 800 12px/1.25 var(--sans); padding: 0 4px; border-radius: 4px; border: 1px solid; vertical-align: 1px; letter-spacing: 0; }
.conf-A { color: #8cf0ad; border-color: #1f6b3a; }
.conf-B { color: #9cc8ff; border-color: #2f5aa8; }
.conf-C { color: #f5d27a; border-color: #6e5317; }
.conf-O { color: #c9c2b4; border-color: #4f483c; }
.syn { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.syn li { display: grid; grid-template-columns: 28px 1fr; gap: 6px; }
.syn b { color: var(--pos); }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerts li { padding: 9px 12px; border-radius: 10px; font-size: 13px; border-left: 3px solid; background: rgba(0, 0, 0, .3); }
.alerts .warn { border-color: var(--warn); }
.alerts .info { border-color: #5f8fd6; }

.combos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.combo { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; text-align: left; background: rgba(0, 0, 0, .25); border: 1px solid var(--line-soft); transition: .15s; }
.combo:hover { border-color: var(--gold-dim); }
.combo.sel { border-color: var(--gold); background: rgba(232, 195, 106, .08); }
.rank { font: 800 16px var(--display); color: var(--muted); width: 18px; text-align: center; flex: none; }
.party { display: flex; gap: 8px; flex: 1; min-width: 0; }
.member { display: grid; justify-items: center; gap: 1px; min-width: 0; flex: 1; }
.member .who, .member .what { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .who { color: var(--muted); margin-top: 5px; }
.member .what { font-weight: 600; }
.combo-score { font: 800 24px/1 var(--display); flex: none; }
.combo-score small { font-size: 13px; margin-left: 2px; }

.empty-state { text-align: center; padding: 40px 24px; }
.empty-icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; opacity: .9; }
.empty-state p { color: var(--muted); max-width: 460px; margin: 8px auto 18px; }

/* ---------- ajustes avançados ---------- */
.tuning { margin-top: 18px; }
.tuning summary { cursor: pointer; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; list-style: none; }
.tuning summary::-webkit-details-marker { display: none; }
.tuning summary h2 { font-size: 18px; }
.tuning summary h2::before { content: "▸ "; color: var(--gold-dim); }
.tuning details[open] summary h2::before { content: "▾ "; }
h3.sub { margin: 22px 0 10px; }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 18px; }
.gear-grid .field { justify-content: space-between; }
.gear-grid select { max-width: 70%; }
.sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 28px; }
.slider { display: grid; grid-template-columns: 1fr 130px 40px; gap: 10px; align-items: center; font-size: 13px; min-height: 36px; }
.slider.disabled { opacity: .4; }
.slider input { accent-color: var(--gold); width: 100%; }
.slider b { text-align: right; font-variant-numeric: tabular-nums; color: var(--gold); }
.rules-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.spec-cell { display: flex; gap: 10px; align-items: flex-start; }
.disclaimer { text-align: center; color: #7a7163; font-size: 12px; margin-top: 28px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 40;
  width: max-content; max-width: calc(100vw - 32px); text-align: center;
  background: #1f1a11; color: var(--gold-bright); border: 1px solid var(--gold-dim);
  padding: 9px 16px; border-radius: 12px; transition: .25s; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsivo ---------- */
@media (max-width: 1280px) {
  .roster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rules-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .xray-main { grid-template-columns: 1fr; }
  .xray-side { grid-template-columns: 1fr 1fr; }
  .xray-side > :first-child { grid-column: 1 / -1; }
  .mode-label .long { display: none; }
  .mode-label .short { display: inline; }
}
@media (max-width: 860px) {
  .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 64px; }
  .hero { padding: 14px 16px 10px; }
  .crest { width: 34px; height: 34px; }
  .actions .btn { padding: 6px 10px; min-height: 36px; font-size: 13px; }
  .scorebar-inner { gap: 4px; padding: 6px 8px; }
  .mode { flex-direction: column; gap: 2px; padding: 6px 4px; align-items: center; text-align: center; }
  .mode .frame { display: none; }
  .mode-label { font-size: 12px; }
  .mode-score { margin: 0; font-size: 20px; }
  .mode-pending { margin: 0; }
  .delta { top: -4px; right: 2px; }
  .roster { grid-template-columns: 1fr; }
  .player.collapsed .pname span { display: none; }
  .player.collapsed { gap: 10px; }
  .class-grid { grid-template-columns: repeat(5, 1fr); }
  .spec-choice button .frame { --s: 40px !important; }
  .spec-choice .auto { height: 40px; }
  .xray { padding: 16px; }
  .xray-head { grid-template-columns: 1fr; }
  .score-num { font-size: 60px; }
  .xray-side { grid-template-columns: 1fr; }
  .radar .axis { font-size: 17px; }
  .radar .axis-val { font-size: 19px; }
  .radar .ring-lbl { font-size: 12px; }
  .radar-block { padding: 12px 6px; }
  .checklist li { grid-template-columns: 18px 1fr; }
  .checklist .who { grid-column: 2; }
  .combo { flex-wrap: wrap; }
  .party { gap: 4px; }
  table { display: block; overflow-x: auto; }
  .slider { grid-template-columns: 1fr 110px 36px; }
  .gear-grid select { max-width: 64%; }
}

/* duplas e trios (Leveling) */
.subgroups { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.subgroups.trios { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.subgroups li { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.subgroups li > span:not(.frame) { flex: 1; margin-left: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subgroups b { font: 800 16px var(--display); }
.mini-rate { font-size: 12px; color: var(--muted); }
.radar .axis title { pointer-events: auto; }
.radar .axis { cursor: help; }

.xray-col { display: grid; gap: 14px; align-content: start; min-width: 0; }

/* selects longos (ex.: nome do BG) não estouram a largura no celular */
.field { max-width: 100%; }
.field select { min-width: 0; max-width: 100%; }
@media (max-width: 640px) {
  .subcontrols .field { width: 100%; }
  .subcontrols .field select { flex: 1; width: 0; }
}

.pick-actions { display: grid; justify-items: end; gap: 2px; flex: none; }
.small-link { margin: 0; font-size: 12px; color: var(--muted); }
/* no celular a dica do "?" vira um balão fixo no rodapé, para nunca sair da tela */
@media (max-width: 640px) {
  .help:hover::after, .help:focus::after {
    position: fixed; left: 16px; right: 16px; bottom: 16px; top: auto; transform: none; max-width: none; width: auto;
  }
}

/* disputa de loot */
.armor-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.armor { font-size: 12px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--text); text-transform: capitalize; }
.armor b { margin-left: 2px; }
.armor.zero { opacity: .45; }
.loot-pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.loot-pairs li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: baseline; }
.sev { font-size: 12px; font-weight: 700; text-align: center; border-radius: 99px; padding: 1px 0; border: 1px solid; }
.sev.neg { color: #ffb3a8; border-color: #7a2219; }
.sev.warn { color: #f5d27a; border-color: #6e5317; }
.sev.low { color: var(--muted); border-color: var(--line); }
