/* ==========================================================================
   Vistas: Home (Bosses), ficha do boss, Progresso GM, Requisitos e dados
   ========================================================================== */

/* ---------- Cabeçalho de página ---------- */
.page-head { display: flex; flex-direction: column; gap: var(--sp-2); }
.page-title { font-size: var(--fs-xl); overflow-wrap: anywhere; }
.page-intro { color: var(--text-2); max-width: 70ch; }

/* ---------- Home: barra de filtros ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.chip-filters { flex: 2 1 420px; }
.toolbar-sticky { position: sticky; top: calc(var(--header-h) + 8px); z-index: 20; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }

/* ---------- Home: grelha de bosses ---------- */
.boss-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--sp-3);
}
.boss-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease), background 0.15s var(--ease);
}
.boss-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--red);
}
.boss-card.is-empty::before { background: var(--line); }
.boss-card:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-2px); }
.boss-card-name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); line-height: 1.25; overflow-wrap: break-word; hyphens: auto; min-width: 0; }
/* Collection log no cartão (barra fina dourada; fica no fundo para alinhar entre cartões) */
.boss-card-log { display: grid; gap: 4px; margin-top: auto; min-height: 26px; color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; }
.boss-card-log-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.boss-card-log .icon { color: var(--boss-gold); flex-shrink: 0; }
.boss-card-log-k { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 800; color: var(--muted); }
.boss-card-log-n { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.boss-card-log .progress { height: 4px; }
.boss-card-log .progress-fill,
.boss-card[data-boss-theme] .boss-card-log .progress-fill { background: linear-gradient(90deg, color-mix(in oklab, var(--boss-gold) 70%, #3a2a08), var(--boss-gold)); }
.boss-card-log.is-done .boss-card-log-n { color: var(--boss-gold); }
.boss-card-log.is-none { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; }
.boss-card-log.is-none .icon { color: var(--muted); }
.boss-card-gm { display: grid; gap: 6px; color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Arte do boss como fundo (UI.bossArt: .has-art + --art; só bosses em data/boss-images.js).
   O fundo do cartão/hero não muda; a arte é um ::after quadrado (à altura do contentor, emblema
   inteiro) por baixo do conteúdo (isolation + z-index: -1), escurecida por um scrim de --bg-deep e
   esbatida com máscara para fundir com a cor de fundo, sem aresta. Se a imagem falhar, fica só o
   scrim (escuro e translúcido) sobre o fundo normal. */
.has-art { isolation: isolate; }
.has-art::after {
  content: "";
  position: absolute;
  top: 0;
  right: var(--art-right, 0);
  height: var(--art-h, 100%);
  aspect-ratio: 1;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(color-mix(in srgb, var(--bg-deep) var(--art-scrim, 35%), transparent), color-mix(in srgb, var(--bg-deep) var(--art-scrim, 35%), transparent)),
    var(--art) center / cover no-repeat;
  -webkit-mask-image: var(--art-mask, linear-gradient(90deg, transparent 0%, #000 45%));
  mask-image: var(--art-mask, linear-gradient(90deg, transparent 0%, #000 45%));
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
/* Cartão: quadrado com lado = min(altura, 80 % da largura útil), centrado na vertical e encostado
   à direita, para o texto à esquerda não ficar sobre o emblema em cartões estreitos (~250 px).
   Contraste medido do texto sobre a arte (pior caso, Easy): ≥ 4.75:1 a 250 px, ≥ 5.3:1 a 283 px. */
.boss-card.has-art {
  --art-scrim: 62%;
  --art-mask: linear-gradient(90deg, transparent 0%, #000 45%), linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  container-type: inline-size;
}
.boss-card.has-art::after { top: 50%; height: min(100%, 80cqw); transform: translateY(-50%); }
/* Células de nível vazias e chips de estilo são translúcidos: sobre a arte levam por baixo a cor
   de fundo do cartão (aspeto igual ao de sempre, mas opaco). */
.has-art .tier-cell.is-none { background: var(--surface); }
.has-art .chip-style { background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.hero.has-art { position: relative; overflow: hidden; }
/* Hero largo: o contador (.hero-gm, ~260 px) fica à direita, por isso o emblema vai para o espaço
   entre o título e o contador, esbatido dos dois lados. */
@media (min-width: 761px) {
  .hero.has-art {
    --art-right: calc(300px + 2 * 22px + var(--sp-5));
    --art-mask: linear-gradient(90deg, transparent 0%, #000 35%, #000 70%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 15%, #000 85%, transparent 100%);
  }
}
/* Estreito: o contador desce; emblema no canto superior direito, esbatido à esquerda e em baixo. */
@media (max-width: 760px) {
  .hero.has-art {
    --art-h: min(100%, 200px);
    --art-scrim: 50%;
    --art-mask: linear-gradient(90deg, transparent 0%, #000 50%), linear-gradient(180deg, #000 55%, transparent 100%);
  }
}

/* ---------- Ficha do boss ---------- */
.hero {
  padding: var(--sp-5);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent-glow) 35%, transparent), transparent 55%),
    var(--surface);
  border-color: var(--accent-border);
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.crumbs a:hover { color: var(--text); }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-3); }
.hero-title { margin-bottom: var(--sp-3); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.hero-gm { min-width: 200px; flex: 0 1 260px; display: grid; gap: 6px; }
.hero-gm-text { font-weight: 800; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }

/* Banner do boss (UI.bossBanner; só bosses em data/boss-banners.js): <picture> e .hero-body na
   mesma célula de grelha. O banner tem altura fluida (16:9, máx. 440 px; 4:5 em ≤ 640 px); se o
   texto precisar de mais altura, o cabeçalho cresce e o resto fica sobre --bg-deep (o gradiente
   acaba nessa cor, sem aresta). Nada é animado. A largura vem do contentor (máx. 1200 px). */
.hero.has-banner {
  position: relative;
  display: grid;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--boss-bg-deep);
}
.hero-banner, .hero-body { grid-area: 1 / 1; min-width: 0; }
.hero-banner {
  position: relative;
  z-index: -1;
  display: block;
  align-self: start;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  overflow: hidden;
}
.hero-banner-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--banner-focus, 50% 30%);
}
/* Gradiente: leve no topo (migalhas), livre ao meio (rosto), escuro em baixo, onde fica o texto. */
.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--boss-bg-deep) 70%, transparent) 0%,
    transparent 20%,
    transparent var(--hero-clear, 40%),
    color-mix(in srgb, var(--boss-bg-deep) 82%, transparent) calc(var(--hero-clear, 40%) + 22%),
    color-mix(in srgb, var(--boss-bg-deep) 94%, transparent) calc(var(--hero-clear, 40%) + 36%),
    var(--boss-bg-deep) 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--boss-bg-deep) 60%, transparent) 0%, transparent 45%);
}
.hero-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5);
}
/* Migalhas sobre a arte (moldura dourada clara): pílula escura por trás para manter o contraste. */
.has-banner .crumbs { align-self: flex-start; }
.has-banner .crumbs a {
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--boss-bg-deep) 82%, transparent);
}
@media (max-width: 760px) {
  .hero-body { padding: var(--sp-4); }
}
@media (max-width: 640px) {
  .hero-banner { aspect-ratio: 4 / 5; max-height: none; }
  .hero-banner-img { object-position: var(--banner-focus-m, 50% 0%); }
  .hero-banner::after {
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--boss-bg-deep) 70%, transparent) 0%,
      transparent 14%,
      transparent var(--hero-clear-m, 34%),
      color-mix(in srgb, var(--boss-bg-deep) 85%, transparent) calc(var(--hero-clear-m, 34%) + 20%),
      color-mix(in srgb, var(--boss-bg-deep) 95%, transparent) calc(var(--hero-clear-m, 34%) + 32%),
      var(--boss-bg-deep) 100%);
  }
}

/* Ficha do boss: Guia / Achievements. Estreito: separadores (só o painel ativo).
   Largo (≥ 1000 px): lado a lado (guia ~60 %, achievements ~40 % com scroll próprio), sem separadores. */
.boss-split { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.boss-pane { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.boss-pane:focus { outline: none; }
.boss-view-tabs { flex-wrap: nowrap; }
.boss-view-tabs .tab { flex: 1 1 auto; min-width: 0; justify-content: center; text-align: center; font-weight: 800; white-space: normal; }
.boss-view-tabs .tab-label { min-width: 0; overflow-wrap: normal; }
.boss-view-tabs .count-pill { margin-left: var(--sp-1); flex: none; }
.boss-split[data-view="guide"] > .boss-pane-ach,
.boss-split[data-view="ach"] > .boss-pane-guide { display: none; }
@media (min-width: 1000px) {
  .boss-split {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
    gap: var(--sp-5);
  }
  .boss-view-bar { display: none; }
  .boss-split[data-view] > .boss-pane { display: flex; }
  .boss-pane-ach {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-3));
    max-height: calc(100vh - var(--header-h) - var(--sp-6));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

.style-switch { display: flex; flex-direction: column; gap: var(--sp-3); }
.style-panel { display: flex; flex-direction: column; gap: var(--sp-4); }
.style-panel:focus { outline: none; }

.jump {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}
.jump .chip { min-height: 32px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 800; }

.not-gm-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--no); font-weight: 700; }

/* Equipamento / presets */
.gear { display: flex; flex-direction: column; gap: var(--sp-4); }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 460px)); gap: var(--sp-3); }
.preset {
  margin: 0;
  padding: var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
}
.preset-title { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); font-weight: 700; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.preset-img { display: block; border-radius: var(--radius-sm); overflow: hidden; }
.preset-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 944 / 632;
  background: var(--bg-deep);
  transition: transform 0.2s var(--ease);
}
.preset-img:hover img { transform: scale(1.02); }
.preset-missing { font-size: var(--fs-sm); padding: var(--sp-3); background: var(--bg-deep); border-radius: var(--radius-sm); }
.preset-actions { display: flex; }

/* Rotação: fases em cartões, passos numerados */
.phases { display: grid; gap: var(--sp-3); }
.phase {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.phase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 10px var(--sp-4);
  background: linear-gradient(90deg, var(--band), var(--red-deep) 60%, transparent);
  color: var(--on-band);
}
.phase-title { font-size: var(--fs-sm); letter-spacing: 0.04em; overflow-wrap: anywhere; }
.phase-count { font-size: var(--fs-xs); font-weight: 600; opacity: 0.85; white-space: nowrap; }
.steps { list-style: none; margin: 0; padding: var(--sp-2) 0; counter-reset: step; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: var(--sp-3);
  row-gap: 4px;
  align-items: start;
  padding: var(--sp-2) var(--sp-4);
  line-height: 1.9;
}
.step + .step { border-top: 1px dashed rgba(230, 225, 222, 0.08); }
.step::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.step-label {
  justify-self: start;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1.8;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.step-text { grid-column: 2; overflow-wrap: anywhere; min-width: 0; }
.step-label + .step-text { grid-column: 2; }

.ability {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 6px 0 2px;
  margin: 0 1px;
  border-radius: 6px;
  background: rgba(230, 225, 222, 0.06);
  white-space: nowrap;
  line-height: 1.6;
}
.ability-icon { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; flex-shrink: 0; }

.sr-mark {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  margin: 0 2px;
  border-radius: 4px;
  background: var(--red);
  color: var(--on-red);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  cursor: help;
}

/* Notas */
.notes { display: flex; flex-direction: column; gap: var(--sp-3); }
.source { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }

/* ---------- Progresso GM ---------- */
.progress-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--sp-3) var(--sp-6);
  padding: var(--sp-5);
}
.progress-summary .progress { height: 14px; }
.big-count { font-family: var(--font-display); font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.progress-hint { grid-column: 1 / -1; }
.gm-groups { display: grid; gap: var(--sp-4); }
.gm-group { padding: var(--sp-4) var(--sp-5); }
.gm-group .card-title { font-size: var(--fs-base); }

/* ---------- Página do jogador: secções (a) Personagem e requisitos, (b) Aparência, (c) Dados ---------- */
.player-sec { display: grid; gap: var(--sp-3); min-width: 0; }
.player-sec-head { display: grid; gap: var(--sp-1); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); }
.player-sec-title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.player-sec .section-card > .card-head .card-title { font-size: var(--fs-md); }
/* Aparência: 3 seletores lado a lado (ecrã largo); 2 + animação a toda a largura (médio); empilhados (telemóvel) */
.look-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); align-items: stretch; }
.look-grid > .look-card { min-width: 0; }
.look-grid > #fx-panel { grid-column: 1 / -1; }
.look-grid .palette-grid { margin-top: var(--sp-3); }
/* textos de apoio iguais nos três cartões; anel com miniaturas menores para caber em 2 colunas */
.look-grid .section-card p.muted { font-size: var(--fs-sm); }
.look-grid .ring-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.look-grid .ring-face { min-height: 56px; }
.look-grid .ring-thumb { flex-basis: 44px; width: 44px; height: 44px; }
@media (min-width: 1100px) {
  .look-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .look-grid > #fx-panel { grid-column: auto; }
}
@media (max-width: 700px) {
  .look-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Todos os cartões da página Jogador (perfil, requisitos, próximos bosses, quests, modo desafio, adaptar,
   paleta, anel, animação, dados) com o mesmo aspeto: mesma altura por linha (stretch), mesmo padding, cabeçalho e
   texto de apoio; o corpo ocupa o resto do cartão e os controlos (.card-foot) ficam alinhados ao fundo.
   As grelhas de 2 colunas (.rd-player-grid) passam a colunas iguais; as colunas responsivas mantêm-se. */
.player-sec .section-card { display: flex; flex-direction: column; padding: var(--sp-5); min-width: 0; height: 100%; }
.player-sec .section-card > .card-head { flex: none; }
.player-sec .section-card > :not(.card-head) { flex: 1 1 auto; min-width: 0; }
.player-sec .section-card > div:not([class]) { display: flex; flex-direction: column; }
.player-sec .section-card p { overflow-wrap: anywhere; }
.player-sec .section-card p.muted, .player-sec .section-card p.small { font-size: var(--fs-sm); line-height: 1.5; }
.player-sec .card-foot { margin-top: auto; padding-top: var(--sp-3); display: grid; gap: var(--sp-2); justify-items: start; min-width: 0; }
.player-sec .rd-player-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
@media (max-width: 760px) {
  .player-sec .rd-player-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Requisitos e dados ---------- */
.row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: var(--sp-2); }
.row .input { flex: 1 1 200px; max-width: 340px; }
.row-sm { margin: var(--sp-3) 0; }
.req-form .muted.small { margin-top: var(--sp-2); }
.req-result { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); display: grid; gap: var(--sp-3); }
.req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-4); }
.req-grid .eyebrow { margin-bottom: var(--sp-2); }
.req-grid .muted.small { margin-top: var(--sp-2); }
.summary { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); font-weight: 700; border-left: 4px solid; }
.summary.ok { background: var(--ok-bg); border-color: var(--ok-line); }
.summary.no { background: var(--no-bg); border-color: var(--no-line); }
.req-links { display: flex; flex-wrap: wrap; gap: var(--sp-4); font-weight: 700; }
#data-panel .row { margin: var(--sp-4) 0 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 760px) {
  .section-card, .hero { padding: var(--sp-4); }
  .gm-group { padding: var(--sp-3) var(--sp-4); }
  .boss-grid { grid-template-columns: 1fr; gap: var(--sp-2); }
  .chip-filters { flex-wrap: nowrap; overflow-x: auto; flex-basis: 100%; padding: 2px; scrollbar-width: none; }
  .progress-summary { grid-template-columns: 1fr; }
  .ach { padding: var(--sp-3); }
  .ach-body { margin-left: 0; }
  .step { padding: var(--sp-2) var(--sp-3); grid-template-columns: 26px 1fr; column-gap: var(--sp-2); }
  .step::before { width: 24px; height: 24px; }
  .preset-grid { grid-template-columns: 1fr; }
  .toolbar-sticky { position: static; }
  .tabs { flex-wrap: nowrap; }
  .tab { white-space: nowrap; }
}

/* ==========================================================================
   Níveis de Combat Mastery (Easy → Grandmaster), logotipo, jogador
   ========================================================================== */

/* ---------- Selos e chips de nível ---------- */
.tier-badge {
  --c: var(--platinum);
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
[data-tier="easy"] { --c: var(--tier-easy); }
[data-tier="medium"] { --c: var(--tier-medium); }
[data-tier="hard"] { --c: var(--tier-hard); }
[data-tier="elite"] { --c: var(--tier-elite); }
[data-tier="master"] { --c: var(--tier-master); }
[data-tier="gm"] { --c: var(--tier-gm); }

.chip-tier[aria-pressed="false"] { border-color: color-mix(in srgb, var(--c, var(--line)) 40%, var(--line)); }
.chip-count { font-size: 11px; opacity: 0.8; font-variant-numeric: tabular-nums; }
.badge-sk { border-color: var(--line-strong); color: var(--text-2); font-weight: 700; }

/* Tira dos 6 níveis (cartões de boss e ficha) */
.tier-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.tier-cell {
  --c: var(--platinum);
  display: grid;
  gap: 2px;
  padding: 4px 4px 5px;
  border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--c) 9%, var(--bg-deep));
  text-align: center;
  min-width: 0;
}
.tier-cell-k { color: var(--c); font-size: 10px; font-weight: 900; letter-spacing: 0.04em; line-height: 1.2; }
.tier-cell-n { color: var(--text); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tier-cell-bar { display: block; height: 3px; border-radius: 2px; background: rgba(0, 0, 0, 0.35); overflow: hidden; }
.tier-cell-bar > span { display: block; height: 100%; background: var(--c); }
.tier-cell.is-none { opacity: 0.32; border-style: dashed; background: transparent; }
.tier-cell.is-current { box-shadow: 0 0 0 1px var(--c); }
.tier-cell.is-done .tier-cell-n { color: var(--c); }
.hero-strip { margin-top: var(--sp-3); max-width: 460px; }

/* Barras de nível (Progresso) */
.tier-bars { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-2) var(--sp-4); }
.tier-bar { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px var(--sp-2); font-size: var(--fs-sm); }
.tier-bar .progress { grid-column: 1 / -1; height: 6px; }
.tier-bar .progress-fill { background: var(--c); }
.tier-bar-n { justify-self: end; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.tier-bar.is-current .tier-bar-n { color: var(--text); }

/* Barra de ferramentas com 2 linhas (nível + pesquisa/filtros) */
.toolbar-col { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); min-width: 0; }
.toolbar-row > * { min-width: 0; max-width: 100%; }
.toolbar-label { color: var(--muted); font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.tier-chips { flex: 1 1 auto; }

/* Avisos discretos */
.wiki-notice { display: flex; gap: 6px; align-items: flex-start; }
.wiki-notice .icon { color: var(--warn); margin-top: 3px; }
.rot-note { display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); }
.rot-note .icon { color: var(--red-text); margin-top: 3px; }
.ach-note { margin-top: 4px; font-size: var(--fs-xs); color: var(--muted); font-style: italic; overflow-wrap: anywhere; }

/* Progresso: grupos colapsáveis */
details.gm-group { padding: 0; }
.gm-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  cursor: pointer;
  list-style: none;
}
.gm-group-head::-webkit-details-marker { display: none; }
.gm-group-head::before { content: "▸"; color: var(--red-text); font-weight: 900; transition: transform 0.15s var(--ease); }
details[open] > .gm-group-head::before { transform: rotate(90deg); }
.gm-group-head .card-title { flex: 1 1 200px; }
.gm-group-head .tier-counts { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.group-n { white-space: nowrap; }
.gm-group-body { padding: 0 var(--sp-5) var(--sp-4); display: grid; gap: var(--sp-3); }
.group-open { justify-self: start; }
.group-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.group-bulk { display: inline-flex; flex-wrap: wrap; gap: var(--sp-2); margin-left: auto; }
.progress-bulk-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-3); }
.progress-bulk-row > p { flex: 1 1 auto; min-width: 0; }

/* Ficha: achievements disponíveis por nível */
.available { display: grid; gap: var(--sp-3); }
.available-tools { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); }
.available-tools > .switch { margin-left: auto; min-height: 32px; }
/* Separadores de nível (losango + nome na cor do nível + "faltam N"); estilo completo no fim do ficheiro */
.tier-panel { display: grid; gap: var(--sp-3); }
.tier-panel:focus { outline: none; }
.tier-panel-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.tier-all-done { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); background: var(--ok-bg); border: 1px solid var(--ok-line); font-weight: 700; }
.done-block { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); background: var(--bg-deep); }
.done-block > summary { cursor: pointer; font-weight: 700; color: var(--text-2); padding: 4px 0; }
.done-block[open] > summary { margin-bottom: var(--sp-2); }

/* ---------- Home: hero (orb do progresso · nível atual · chips · ações) ----------
   Duas colunas: à esquerda a orb do progresso global (+ "Ver progresso"); à direita, de cima para baixo, o tier
   atual, os chips + "Em foco" e as 3 ações (a faixa de níveis continua por baixo do hero).
   Fundo: banner do boss em foco (ou do Got Hit) em todo o painel, sob um scrim radial (centro à vista, margens
   escuras). Contraste do texto sobre o fundo medido com píxeis reais (>= 4.5:1). */
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "progress main";
  align-items: center;
  gap: var(--sp-4) var(--sp-6);
  padding: var(--sp-5) var(--sp-6);
  background: #0a0e14;
  border-color: var(--accent-border);
  /* orb entre 280 e 340 px (cqw = % da largura do conteúdo do painel) */
  container-type: inline-size;
  --orb: clamp(280px, 30cqw, 340px);
}
.home-hero > :not(.home-hero-bg) { position: relative; z-index: 1; }
.home-hero { --hero-glow: var(--accent-glow); --hero-accent: var(--red-text); }
.home-hero[data-boss-theme] { --hero-glow: color-mix(in srgb, var(--boss-glow) 70%, var(--surface)); --hero-accent: var(--boss-accent-text); border-color: color-mix(in srgb, var(--boss-accent) 40%, var(--line)); }
/* Camada de fundo (decorativa): cobre o painel inteiro, por baixo do scrim (::before) */
.home-hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
/* Imagem do fundo: .home-hero-pic (fade ao carregar e fade cruzado ~400 ms ao mudar de boss) */
.home-hero-pic { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity 0.4s var(--ease); }
.home-hero-pic.is-loaded { opacity: 1; }
.home-hero-pic.is-leaving { opacity: 1; animation: hero-pic-out 0.4s var(--ease) forwards; }
@keyframes hero-pic-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .home-hero-pic { transition: none; }
  .home-hero-pic.is-leaving { display: none; }
}
/* Banner do boss em foco (ponto de foco de data/boss-banners.js) ou do Got Hit: cobre o painel */
.home-hero-pic:not(.is-multi) img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-focus, 50% 30%); filter: saturate(0.95); }
.home-hero-pic.is-brand img { object-position: 50% 22%; }
/* Scrim radial (estilo "altar"): o centro deixa ver o banner, as margens escurecem até ~93 % */
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(10, 14, 20, 0.33), rgba(10, 14, 20, 0.93) 75%);
}
/* Coluna direita: faixa de estado · "Em foco" · ações */
.hero-main { grid-area: main; display: grid; gap: var(--sp-3); align-content: center; min-width: 0; container: hero-main / inline-size; }
/* Moldura dourada (faixa de estado, chips de "Em foco" e cartões de ação): borda fina dourada, anel interior
   duplo (fundo + dourado translúcido), cantos de 6 px e fundo escuro translúcido. Cor fixa (não segue o tema do
   boss: --boss-gold muda por boss). Hover/foco: aro dourado mais forte. */
.home-hero { --hero-frame: #c9a35a; --hero-frame-bg: #0b0f15; --hero-frame-fill: rgba(11, 15, 21, 0.9); }
.hero-status, .hero-focus-chip, .hero-action {
  border: 1px solid var(--hero-frame);
  border-radius: 6px;
  background-color: var(--hero-frame-fill);
  box-shadow: inset 0 0 0 3px var(--hero-frame-bg), inset 0 0 0 4px color-mix(in srgb, var(--hero-frame) 40%, transparent);
}
.hero-focus-chip { box-shadow: inset 0 0 0 2px var(--hero-frame-bg), inset 0 0 0 3px color-mix(in srgb, var(--hero-frame) 33%, transparent); }
/* Faixa de estado: [escudo + "TIER ATUAL" / nome] · [barra + "faltam x de N" · "a seguir"] · | · [LOG SPECIAL TROFÉUS].
   Placa escura própria sobre o scrim, para o contraste do texto não depender do banner. */
.hero-status { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-3) 18px; min-width: 0; padding: 12px 16px; }
.hero-status.is-done { grid-template-columns: minmax(0, 1fr) auto auto; }
.hero-tier { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hero-tier-shield { flex-shrink: 0; width: 40px; height: auto; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--c, var(--hero-accent)) 55%, transparent)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
.hero-tier-head { display: grid; gap: 2px; margin: 0; min-width: 0; }
.hero-tier-k { color: var(--text-2); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; line-height: 1.2; }
.hero-tier-name { color: var(--c, var(--text)); font-family: var(--font-hero); font-size: clamp(1.2rem, 1rem + 0.5vw, 1.5rem); font-weight: 700; letter-spacing: 0.03em; line-height: 1.1; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); }
.hero-tier.is-done .hero-tier-name { font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem); color: var(--boss-gold); }
.hero-tier-prog { display: grid; gap: 6px; min-width: 0; }
.hero-tier-prog .hero-tier-bar { height: 8px; border-radius: 4px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6); }
.hero-tier-prog .hero-tier-bar > span { border-radius: 4px; box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent); }
.hero-tier-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--sp-3); margin: 0; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.hero-tier-left { color: var(--text); font-weight: 600; }
.hero-tier-next { color: var(--text-2); font-weight: 600; }
.hero-mini-bar { display: block; height: 4px; border-radius: 2px; background: var(--bg-deep); overflow: hidden; }
.hero-mini-bar > span { display: block; height: 100%; background: var(--c, var(--hero-accent)); }
.hero-status-sep { width: 1px; height: 40px; background: color-mix(in srgb, var(--hero-frame) 35%, transparent); }
/* Mini-estatísticas (Collection log · Special · Troféus): ligações, rótulo pequeno em cima e valor grande */
.hero-nums { display: flex; gap: 6px; margin: 0; }
.hero-num { display: grid; justify-items: center; align-content: center; gap: 1px; min-width: 64px; min-height: 44px; padding: 2px 8px; border-radius: 4px; color: var(--text); text-decoration: none; transition: background 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.hero-num:hover { background: color-mix(in srgb, var(--hero-frame) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hero-frame) 55%, transparent); }
.hero-num:focus-visible { outline: 2px solid var(--hero-frame); outline-offset: 1px; box-shadow: none; }
.hero-num-k { color: var(--text-2); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.2; white-space: nowrap; }
.hero-num-v { color: var(--text); font-family: var(--font-hero); font-size: 1.25rem; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Em foco: rótulo + chips com a miniatura redonda do boss + nome (ligam à ficha) */
.hero-focus { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; margin: 0; font-size: var(--fs-xs); color: var(--text-2); }
.hero-focus-k { color: var(--text-2); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; flex-shrink: 0; padding: 3px 8px; border-radius: 4px; background: rgba(10, 14, 20, 0.8); }
.hero-focus-v { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.hero-focus-chip { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; min-height: 36px; padding: 3px 12px 3px 4px; color: var(--text); text-decoration: none; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.hero-focus-chip:hover, .hero-focus-chip:focus-visible { color: var(--text); border-color: #e3c47e; box-shadow: inset 0 0 0 2px var(--hero-frame-bg), inset 0 0 0 3px var(--hero-frame), 0 0 10px -2px color-mix(in srgb, var(--hero-frame) 60%, transparent); }
.hero-focus-chip:focus-visible { outline: 2px solid var(--hero-frame); outline-offset: 2px; }
.hero-focus-img { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--bg-deep); box-shadow: 0 0 0 1px var(--line-strong); }
.hero-focus-img.is-emblem { object-fit: contain; padding: 1px; }
.hero-focus-name { min-width: 0; font-family: var(--font-hero); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 2–3 bosses em foco: tríptico estático em todo o painel (faixas de igual largura, junções fundidas por
   máscaras), sob o mesmo scrim radial; sem animação. */
.home-hero-pic.is-multi { display: flex; }
.hero-strip {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin: 0 -28px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
}
.hero-strip:first-child { margin-left: 0; }
.hero-strip:last-child { margin-right: 0; }
.hero-strip-pic, .hero-strip-pic img { display: block; width: 100%; height: 100%; }
.hero-strip-pic img { object-fit: cover; object-position: var(--hero-focus, 50% 30%); filter: saturate(0.95); }
.hero-strip.is-plain { background: linear-gradient(160deg, color-mix(in srgb, var(--strip-a, var(--accent-bright)) 40%, transparent), var(--strip-d, var(--bg-deep)) 85%); opacity: 0.6; }

/* Progresso global: a orb (App.progressRing, css/progress-ring.css; tamanho = --orb) + "Ver progresso" */
.hero-progress {
  grid-area: progress;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1, 4px);
  color: var(--text);
  text-decoration: none;
  border-radius: 50%;
}
.hero-progress:hover { color: var(--text); }
.hero-progress:hover .pring-frame { filter: brightness(1.12); }
.hero-progress:focus-visible { outline: 2px solid var(--platinum); outline-offset: 4px; }
.hero-progress .pring.is-hero { --ring-size: var(--orb); }
.hero-progress-link { display: inline-flex; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); align-items: center; gap: 2px; padding: 3px 6px 3px 10px; border-radius: 999px; background: rgba(10, 14, 20, 0.8); color: color-mix(in oklab, var(--hero-accent) 62%, #fff); font-size: var(--fs-xs); font-weight: 700; }

/* Ações: Quase lá · Tasks ativas do Roll (mais larga) · Special disponível */
.hero-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--sp-2); align-items: stretch; }
.hero-action {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
  min-height: 64px;
  height: 100%;
  padding: 9px var(--sp-2) 9px 14px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
a.hero-action:hover, a.hero-action:focus-visible { color: var(--text); border-color: #e3c47e; background-color: rgba(20, 24, 31, 0.94); box-shadow: inset 0 0 0 3px var(--hero-frame-bg), inset 0 0 0 4px var(--hero-frame), 0 0 12px -3px color-mix(in srgb, var(--hero-frame) 60%, transparent); }
.hero-action:focus-visible { outline: 2px solid var(--hero-frame); outline-offset: 2px; }
.hero-action > .icon { flex-shrink: 0; color: var(--hero-accent); }
/* chevron discreto à direita: indica que o cartão é clicável; avança um pouco no hover/foco */
.hero-action > .hero-action-go { flex: 0 0 16px; color: var(--text-2); opacity: 0.7; transition: transform 0.15s var(--ease), opacity 0.15s var(--ease); }
.hero-action:hover > .hero-action-go, .hero-action:focus-visible > .hero-action-go { opacity: 1; transform: translateX(2px); color: var(--text); }
@media (prefers-reduced-motion: reduce) { .hero-action > .hero-action-go { transition: none; } .hero-action:hover > .hero-action-go { transform: none; } }
.hero-action-text { display: grid; min-width: 0; flex: 1 1 auto; }
.hero-action-k { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-action-v { font-family: var(--font-hero); font-weight: 700; font-size: 1.0625rem; line-height: 1.2; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-action-meta { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; color: var(--text-2); font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-action-meta .hero-mini-bar { flex: 1 1 40px; min-width: 30px; max-width: 90px; }
.hero-action-roll.has-task .hero-action-k { color: var(--text-2); }
/* Continuar: mantém o destaque vermelho (gradiente escuro vermelho, borda entre o vermelho e o dourado) */
.hero-action-main { background: linear-gradient(135deg, color-mix(in srgb, var(--red-deep) 82%, #000), rgba(27, 13, 16, 0.92) 75%); border-color: color-mix(in srgb, #b23a44 60%, var(--hero-frame)); box-shadow: inset 0 0 0 3px rgba(27, 13, 16, 0.9), inset 0 0 0 4px color-mix(in srgb, var(--hero-frame) 45%, transparent); }
a.hero-action-main:hover, a.hero-action-main:focus-visible { background: linear-gradient(135deg, color-mix(in srgb, var(--red-deep) 82%, #000), rgba(27, 13, 16, 0.92) 75%); border-color: #e3c47e; box-shadow: inset 0 0 0 3px rgba(27, 13, 16, 0.9), inset 0 0 0 4px var(--hero-frame), 0 0 12px -3px color-mix(in srgb, var(--hero-frame) 60%, transparent); }
.hero-action-main .hero-action-k { color: var(--text-2); }
.hero-action-main.is-done .hero-action-v { color: var(--boss-gold); }
/* Miniaturas dos bosses (arte real ou emblema, App.bossEmblem) */
.hero-thumb { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--bg-deep); box-shadow: 0 0 0 1px var(--line-strong); }
.hero-thumb.is-emblem { object-fit: contain; padding: 1px; }
.hero-thumb.is-blank { display: inline-block; }
.hero-action > .hero-thumb { width: 36px; height: 36px; }
/* Cartões-painel (Roll, Special): cabeçalho + linhas clicáveis (o cartão em si não é ligação) */
.hero-action-panel { flex-direction: column; align-items: stretch; gap: 6px; padding: 9px 10px 10px 12px; }
.hero-panel-head { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 24px; }
.hero-panel-head > .icon { flex-shrink: 0; color: var(--hero-accent); }
.hero-panel-head > .hero-action-k { flex: 1 1 auto; min-width: 0; }
.hero-panel-link { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; min-height: 32px; padding: 0 6px; border-radius: 4px; color: #e3c47e; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.hero-panel-link:hover { color: #f0d89c; background: rgba(201, 163, 90, 0.14); }
.hero-panel-link:focus-visible, .hero-item:focus-visible, .hero-panel-btn:focus-visible { outline: 2px solid var(--hero-frame); outline-offset: 1px; box-shadow: none; }
.hero-items { display: grid; align-content: start; gap: 4px; min-width: 0; }
.hero-item { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 36px; padding: 3px 8px 3px 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.035); color: var(--text); text-decoration: none; transition: background 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.hero-item:hover { color: var(--text); background: rgba(201, 163, 90, 0.12); box-shadow: inset 0 0 0 1px rgba(201, 163, 90, 0.55); }
.hero-item-text { display: grid; flex: 1 1 auto; min-width: 0; }
.hero-item-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hero-item-title { min-width: 0; font-family: var(--font-hero); font-size: 0.9375rem; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-item-tag { flex-shrink: 0; padding: 0 5px; border-radius: 3px; color: #e3c47e; font-size: 9.5px; font-weight: 800; line-height: 16px; text-transform: uppercase; letter-spacing: 0.06em; box-shadow: inset 0 0 0 1px rgba(201, 163, 90, 0.5); }
.hero-item-tag.is-special, .hero-item-tag.is-active { color: var(--tier-special); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tier-special) 50%, transparent); }
.hero-item-tag.is-offer { color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.hero-item-detail { color: var(--text-2); font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-panel-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; flex: 1 1 auto; }
.hero-panel-empty > .hero-action-v { color: var(--text-2); }
.hero-panel-empty > .hero-panel-link { margin-left: 0; }
.hero-panel-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--hero-frame); border-radius: 4px; background: rgba(201, 163, 90, 0.12); color: var(--text); font-family: var(--font-hero); font-size: 0.9375rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hero-panel-btn:hover { color: var(--text); background: rgba(201, 163, 90, 0.24); }

/* Coluna direita estreita (ex.: 901–1000 px) ou <= 900 px (abaixo): a faixa empilha (nível · barra · números) */
@container hero-main (max-width: 600px) {
  .hero-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
  .hero-action-roll { grid-column: 1 / -1; }
  .hero-status, .hero-status.is-done { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hero-status-sep { display: none; }
  .hero-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--hero-frame) 30%, transparent); }
  .hero-num { min-width: 0; }
}

/* ---------- Home: faixa de níveis (é também o filtro) ---------- */
.tier-filter { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sp-2); }.tier-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--c) 28%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--c) 5%, var(--surface));
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.tier-card[data-tier="all"] { --c: var(--red-text); }
.tier-card:hover { border-color: color-mix(in srgb, var(--c) 60%, var(--line)); }
.tier-card[aria-pressed="true"] {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, var(--surface));
  box-shadow: 0 0 0 1px var(--c), 0 0 18px -4px color-mix(in srgb, var(--c) 60%, transparent);
}
.tier-card:focus-visible { outline: 2px solid var(--platinum); outline-offset: 2px; }
.tier-card-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; }
.tier-card-cur {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 18%, var(--bg-deep));
  color: var(--c);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tier-card-cur::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.tier-card-name { color: var(--c); font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tier-card-n { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.1; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tier-card-n strong { color: var(--text); font-weight: 700; }
.tier-card.is-done .tier-card-n strong { color: var(--c); }
.tier-card-bar { display: block; height: 4px; border-radius: 2px; background: var(--bg-deep); overflow: hidden; }
.tier-card-bar > span { display: block; height: 100%; background: var(--c); }
/* Escudo do nível (assets/tiers, tools/tier-art.py): ícone centrado no topo do cartão (só os níveis
   com escudo; "Todos" e o log não têm). Texto centrado por baixo. Em fluxo normal (pseudo-elemento
   ::before como 1.ª linha da grelha do cartão): não passa por baixo do texto, por isso o contraste do
   nome e do x/N é o do cartão sem escudo. Mais vivo no cartão escolhido / nível atual. */
.tier-card { position: relative; isolation: isolate; overflow: hidden; text-align: center; align-content: center; justify-items: stretch; }
.tier-card-head { justify-content: center; flex-wrap: wrap; }
.tier-card[data-tier="easy"]::before, .tier-card[data-tier="medium"]::before, .tier-card[data-tier="hard"]::before,
.tier-card[data-tier="elite"]::before, .tier-card[data-tier="master"]::before, .tier-card[data-tier="gm"]::before,
.tier-card[data-tier="special"]::before {
  content: "";
  display: block;
  height: 54px;
  margin: 0 0 2px;
  background: no-repeat center / contain;
  opacity: 0.88;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.55));
  pointer-events: none;
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.tier-card:hover::before { opacity: 1; transform: translateY(-1px); }
.tier-card[aria-pressed="true"]::before, .tier-card.is-current::before { opacity: 1; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--c) 70%, transparent)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.55)); }
.tier-card[data-tier="easy"]::before { background-image: url("../assets/tiers/tier-easy.webp"); }
.tier-card[data-tier="medium"]::before { background-image: url("../assets/tiers/tier-medium.webp"); }
.tier-card[data-tier="hard"]::before { background-image: url("../assets/tiers/tier-hard.webp"); }
.tier-card[data-tier="elite"]::before { background-image: url("../assets/tiers/tier-elite.webp"); }
.tier-card[data-tier="master"]::before { background-image: url("../assets/tiers/tier-master.webp"); }
.tier-card[data-tier="gm"]::before { background-image: url("../assets/tiers/tier-grandmaster.webp"); }
.tier-card[data-tier="special"]::before { background-image: url("../assets/tiers/tier-special.webp"); }

/* ---------- Home: barra de ferramentas dos bosses (pesquisa a crescer · ordenação + contador) ---------- */
.home-toolbar { flex-wrap: nowrap; gap: var(--sp-2) var(--sp-4); padding: var(--sp-2) var(--sp-3); }
.home-toolbar .field-search { flex: 1 1 auto; }
.home-toolbar-end { display: flex; align-items: center; gap: var(--sp-4); flex-shrink: 0; }
.home-sort { display: flex; align-items: center; gap: var(--sp-2); }
.home-sort-label { color: var(--muted); font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.home-sort-select { width: auto; min-height: 36px; padding: 4px 8px; font-size: var(--fs-sm); }
.home-count { margin: 0; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }

@media (max-width: 1100px) {
  .home-hero { column-gap: var(--sp-5); }
}
@media (max-width: 900px) {
  /* hero empilhado: orb centrada em cima, depois o nível atual, os chips e as ações */
  .home-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "progress" "main"; row-gap: var(--sp-4); --orb: min(80cqw, 280px); }
  .hero-progress { justify-self: center; }
  /* faixa de estado empilhada: escudo + nível em cima, a barra, depois os 3 números em linha */
  .hero-status, .hero-status.is-done { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hero-status-sep { display: none; }
  .hero-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--hero-frame) 30%, transparent); }
  .hero-num { min-width: 0; }
  /* ações: Quase lá e Special lado a lado, Roll numa linha inteira */
  .hero-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
  .hero-action-roll { grid-column: 1 / -1; }
  /* Níveis: faixa com scroll horizontal e snap (só a faixa desliza, nunca a página) */
  .tier-filter {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(128px, 1fr);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 3px;
    margin: -3px;
    scrollbar-width: thin;
  }
  .tier-card { scroll-snap-align: start; }
}
@media (max-width: 760px) {
  .home-toolbar { flex-direction: column; align-items: stretch; }
  .home-toolbar-end { justify-content: space-between; gap: var(--sp-3); min-width: 0; }
  .home-sort { flex: 1 1 auto; min-width: 0; }
  .home-sort-select { flex: 1 1 auto; min-width: 0; max-width: 220px; }
}
/* Telemóvel: painel compacto. Números em 3 colunas, "Em foco" numa linha que desliza (só a linha, nunca a
   página) e os 3 cartões de ação empilhados. */
@media (max-width: 640px) {
  .home-hero { padding: var(--sp-3); row-gap: var(--sp-3); }
  .hero-main { gap: var(--sp-2); }
  .home-hero-pic:not(.is-multi):not(.is-brand) img, .hero-strip-pic img { object-position: var(--hero-focus-m, 50% 30%); }
  .hero-strip { margin: 0 -16px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%); }
  .hero-status { padding: 10px 12px; }
  .hero-tier-shield { width: 34px; }
  .hero-tier-name { font-size: 1.25rem; }
  .hero-tier.is-done .hero-tier-name { font-size: 1.1rem; }
  /* números: 3 colunas compactas, alvo de toque >= 44 px */
  .hero-num { padding: 2px 4px; }
  .hero-num-k { font-size: 10px; letter-spacing: 0.05em; }
  .hero-num-v { font-size: 1.15rem; }
  /* Em foco: uma linha (a lista desliza na horizontal, nunca a página) */
  .hero-focus-v { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 1px 0; }
  .hero-focus-v::-webkit-scrollbar { display: none; }
  .hero-focus-chip { flex-shrink: 0; min-height: 44px; max-width: 200px; }
  /* ações empilhadas (uma por linha) */
  .hero-actions { grid-template-columns: minmax(0, 1fr); }
  .hero-action { min-height: 56px; }
  .hero-item, .hero-panel-link, .hero-panel-btn { min-height: 44px; }
}

/* ---------- Página do jogador ---------- */
.req-tier-label { margin-top: var(--sp-4); }
.req-tier-chips { margin-bottom: var(--sp-2); }
.req-tier-note { display: flex; flex-wrap: wrap; gap: 4px; }

@media (max-width: 760px) {
  .gm-group-head { padding: var(--sp-3) var(--sp-4); }
  .gm-group-body { padding: 0 var(--sp-3) var(--sp-3); }
  .tier-chips { flex-wrap: wrap; overflow: visible; flex-basis: 100%; }
  .tier-chips .chip { min-height: 32px; padding: 3px 10px; }
  .available-tools { justify-content: flex-start; }
}
/* Progresso: "Importar do jogo" */
.game-import { margin-block: var(--space-3, 12px); }
.game-import > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.game-import-body { display: grid; gap: 8px; margin-top: 10px; }
.game-import-text { width: 100%; min-height: 8rem; resize: vertical; font-family: inherit; }
.game-import-opt { cursor: pointer; gap: 6px; }
.game-import-summary { font-weight: 700; }
.game-import-list ul { max-height: 12rem; overflow: auto; margin: 4px 0 0; padding-left: 1.2rem; }

/* Achievements na wiki mas ainda não no jogo */
.ach-not-in-game .ach-name { opacity: .75; }
.badge-not-in-game, .badge-no-ach { white-space: nowrap; }

/* ==========================================================================
   Tema por boss + cabeçalho, separadores de nível e cartões de achievement
   (exemplo aprovado: mockups/boss-redesign.html). Cores em --boss-* (padrão em
   base.css; por boss em data/boss-themes.js, aplicadas inline por App.ui.bossTheme
   no <main> da ficha e em cada .boss-card da Home). As derivadas são declaradas
   aqui, no mesmo elemento que recebe os valores, para recalcularem por boss.
   ========================================================================== */
:root, .page[data-view="boss"], .boss-card {
  --gold-hi: color-mix(in oklab, var(--boss-gold) 35%, #fff8e0);
  --gold-lo: color-mix(in oklab, var(--boss-gold) 55%, #3a2a08);
  --gold-line: color-mix(in oklab, var(--boss-gold) 55%, transparent);
  --boss-panel: color-mix(in oklab, var(--boss-bg-deep) 45%, var(--surface));
  --boss-edge: color-mix(in oklab, var(--boss-accent) 22%, var(--line));
}
/* Cores de nível harmonizadas com o boss (82 % nível + 18 % acento; GM com o dourado) */
.page[data-view="boss"] [data-tier="easy"] { --c: color-mix(in oklab, var(--tier-easy) 82%, var(--boss-accent)); }
.page[data-view="boss"] [data-tier="medium"] { --c: color-mix(in oklab, var(--tier-medium) 82%, var(--boss-accent)); }
.page[data-view="boss"] [data-tier="hard"] { --c: color-mix(in oklab, var(--tier-hard) 82%, var(--boss-accent)); }
.page[data-view="boss"] [data-tier="elite"] { --c: color-mix(in oklab, var(--tier-elite) 82%, var(--boss-accent)); }
.page[data-view="boss"] [data-tier="master"] { --c: color-mix(in oklab, var(--tier-master) 82%, var(--boss-accent)); }
.page[data-view="boss"] [data-tier="gm"] { --c: color-mix(in oklab, var(--tier-gm) 82%, var(--boss-gold)); }

/* ---------- Cabeçalho da ficha ---------- */
.boss-hero {
  position: relative;
  display: grid;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border-color: color-mix(in oklab, var(--boss-gold) 35%, transparent);
  background:
    radial-gradient(70% 90% at 72% 20%, color-mix(in oklab, var(--boss-accent-2) 38%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in oklab, var(--boss-bg-deep) 70%, var(--boss-accent-2)) 0%, var(--boss-bg-deep) 65%);
  box-shadow: 0 0 0 1px #0008, 0 20px 50px -20px color-mix(in oklab, var(--boss-glow) 35%, transparent);
}
/* Com banner: o texto começa a (1 − ov) da altura do banner (ov = fração de baixo onde o nome pode
   ficar, já escurecida pelo gradiente); o que não couber desce abaixo do banner, sobre --boss-bg-deep.
   A figura (meio/topo do banner) nunca fica por baixo do texto. ov por boss em data/boss-banners.js. */
.boss-hero.has-banner {
  --banner-h: min(56.25cqw, 440px);
  --ov: var(--hero-ov, 0.3);
  container-type: inline-size;
  background: var(--boss-bg-deep);
}
.boss-hero.has-banner > .hero-body { padding-top: calc(var(--banner-h) * (1 - var(--ov))); }
.boss-hero.has-banner .crumbs { position: absolute; top: 18px; left: 22px; z-index: 2; }
.boss-hero.has-banner .hero-banner::after {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--boss-bg-deep) 65%, transparent) 0%,
      transparent 18%,
      transparent min(calc((1 - var(--ov)) * 100% - 16%), 62%),
      color-mix(in srgb, var(--boss-bg-deep) 80%, transparent) min(calc((1 - var(--ov)) * 100% + 4%), 86%),
      color-mix(in srgb, var(--boss-bg-deep) 94%, transparent) min(calc((1 - var(--ov)) * 100% + 16%), 95%),
      var(--boss-bg-deep) 100%),
    radial-gradient(55% 45% at 0% 100%, color-mix(in srgb, var(--boss-bg-deep) 80%, transparent), transparent),
    linear-gradient(90deg, color-mix(in srgb, var(--boss-bg-deep) 55%, transparent) 0%, transparent 40%);
}
@media (max-width: 640px) {
  .boss-hero.has-banner { --banner-h: 125cqw; --ov: var(--hero-ov-m, 0.22); }
  .boss-hero.has-banner .crumbs { top: 14px; left: 14px; }
}
.boss-hero:not(.has-banner) { min-height: 240px; }
.boss-hero > .hero-body { grid-area: 1 / 1; min-width: 0; padding: 18px 22px 22px; gap: var(--sp-5); position: relative; z-index: 1; }
/* Faíscas estáticas (só decoração, sem animação); com .has-art o ::after é a arte */
.boss-hero:not(.has-art)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(2px 2px at 12% 38%, var(--gold-hi), transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 30%, var(--boss-glow), transparent 60%),
    radial-gradient(2px 2px at 36% 44%, var(--boss-gold), transparent 60%),
    radial-gradient(1.5px 1.5px at 8% 52%, var(--boss-gold), transparent 60%),
    radial-gradient(1.5px 1.5px at 30% 56%, var(--boss-glow), transparent 60%);
  opacity: 0.8;
}

/* "‹ BOSSES" */
.boss-hero .crumbs { align-self: flex-start; }
.boss-hero .crumbs a {
  gap: 6px;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  font: 700 13px/1 var(--font-ornate);
  letter-spacing: 0.14em;
  color: var(--gold-hi);
  background: color-mix(in oklab, var(--boss-bg-deep) 78%, transparent);
  border: 1px solid color-mix(in oklab, var(--boss-gold) 35%, transparent);
  text-shadow: 0 1px 2px #000;
}
.boss-hero .crumbs a:hover { color: var(--gold-hi); border-color: var(--boss-gold); }

/* Setas boss anterior / seguinte (js/views/boss.js, bossNav). Botões circulares escuros semitransparentes
   (o fundo garante o contraste do ícone dourado sobre qualquer arte), contorno dourado discreto, 48 px
   (44 px em ecrã estreito). Com banner e > 640 px: nos lados, a meio da altura do banner (o nome fica em
   baixo à esquerda, abaixo delas); "n / total" no canto superior direito. Sem banner ou ≤ 640 px: linha
   no canto superior direito (‹ n / total ›), à altura do "‹ BOSSES". */
.boss-nav {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}
.boss-nav-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--gold-hi);
  background: color-mix(in oklab, var(--boss-bg-deep) 72%, transparent);
  border: 1px solid color-mix(in oklab, var(--boss-gold) 40%, transparent);
  box-shadow: 0 2px 10px #0009;
  text-decoration: none;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.boss-nav-btn .icon { width: 24px; height: 24px; stroke-width: 2.5; filter: drop-shadow(0 1px 1px #000); }
.boss-nav-btn:hover {
  color: var(--gold-hi);
  background: color-mix(in oklab, var(--boss-bg-deep) 88%, transparent);
  border-color: var(--boss-gold);
}
.boss-nav-btn:focus-visible { border-radius: 50%; border-color: var(--boss-gold); }
.boss-nav-btn:active { transform: scale(0.94); }
.boss-nav-pos {
  padding: 5px 10px;
  border-radius: 999px;
  font: 700 12px/1 var(--font-body);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--text-2);
  background: color-mix(in oklab, var(--boss-bg-deep) 78%, transparent);
  border: 1px solid color-mix(in oklab, var(--boss-gold) 25%, transparent);
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
}
@media (min-width: 641px) {
  /* Camada do tamanho do cabeçalho que só deixa passar cliques nas setas e no contador. */
  .boss-hero.has-banner .boss-nav { inset: 0; display: block; pointer-events: none; }
  .boss-hero.has-banner .boss-nav > * { pointer-events: auto; }
  .boss-hero.has-banner .boss-nav-btn {
    position: absolute;
    top: calc(var(--banner-h) / 2);
    transform: translateY(-50%);
  }
  .boss-hero.has-banner .boss-nav-btn:active { transform: translateY(-50%) scale(0.94); }
  .boss-hero.has-banner .boss-nav-btn.is-prev { left: 16px; }
  .boss-hero.has-banner .boss-nav-btn.is-next { right: 16px; }
  .boss-hero.has-banner .boss-nav-pos { position: absolute; top: 22px; right: 22px; }
}
@media (max-width: 640px) {
  .boss-nav { top: 12px; right: 12px; gap: 4px; }
  .boss-nav-btn { width: 44px; height: 44px; }
  .boss-nav-btn .icon { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .boss-nav-btn { transition: none; }
  .boss-nav-btn:active, .boss-hero.has-banner .boss-nav-btn:active { transform: none; }
}
@media (min-width: 641px) and (prefers-reduced-motion: reduce) {
  .boss-hero.has-banner .boss-nav-btn:active { transform: translateY(-50%); }
}

/* Nome + linha (estado | divisória | progresso), ancorados em baixo à esquerda */
.hero-bottom { display: grid; gap: var(--sp-3); margin-top: auto; }
.boss-hero .hero-title {
  margin: 0;
  max-width: min(100%, 16ch);
  font: 900 clamp(1.9rem, 5vw, 3.2rem)/1.02 var(--font-name);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  overflow-wrap: break-word;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--boss-gold) 40%,
    color-mix(in oklab, var(--boss-gold) 60%, var(--boss-accent)) 62%, var(--gold-lo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0.6px color-mix(in oklab, var(--gold-lo) 70%, #000);
  filter: drop-shadow(0 2px 0 #000c) drop-shadow(0 0 10px color-mix(in oklab, var(--boss-glow) 50%, transparent))
    drop-shadow(0 0 24px color-mix(in oklab, var(--boss-glow) 22%, transparent));
}
.boss-hero .hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(240px, 300px);
  align-items: end;
  gap: var(--sp-4) 22px;
  margin: 0;
}
.boss-hero .hero-row.no-gm { grid-template-columns: minmax(0, 1fr); }
.hero-left { display: grid; gap: var(--sp-3); justify-items: start; min-width: 0; }
.hero-divider {
  align-self: stretch;
  width: 1px;
  min-height: 80px;
  background: linear-gradient(180deg, transparent, var(--gold-line) 30%, var(--gold-line) 70%, transparent);
}

/* Pílula "com rotação" e chips de estilo */
.boss-hero .hero-meta { gap: 8px; }
.boss-hero .hero-meta .badge {
  padding: 4px 13px;
  font-size: 13px;
  font-weight: 600;
  font-style: normal;
  background: color-mix(in oklab, var(--boss-bg-deep) 85%, #000);
  border: 1.5px solid var(--line-strong);
  color: var(--text-2);
}
.boss-hero .hero-meta .badge-ok {
  color: var(--boss-accent-text);
  background: color-mix(in oklab, var(--boss-accent) 14%, color-mix(in oklab, var(--boss-bg-deep) 85%, #000));
  border-color: var(--boss-accent);
  box-shadow: 0 0 12px -2px color-mix(in oklab, var(--boss-glow) 50%, transparent), inset 0 0 8px -2px color-mix(in oklab, var(--boss-glow) 40%, transparent);
}
.boss-hero .chip-row { gap: 6px; }
.boss-hero .chip-style {
  min-width: 34px;
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff10, #0000), color-mix(in oklab, var(--c) 14%, #14120e);
  border: 1px solid color-mix(in oklab, var(--boss-gold) 55%, transparent);
  box-shadow: inset 0 0 0 1px #000a, inset 0 1px 0 #ffffff14;
}

/* Quadrados de nível (UI.tierStrip) */
.boss-hero .hero-strip { margin: 0; max-width: none; }
.boss-hero .tier-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.boss-hero .tier-cell {
  width: 54px;
  min-height: 56px;
  place-content: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff0d, #0000 60%), #0d0f0b;
  border: 1px solid color-mix(in oklab, var(--c) 55%, var(--boss-gold));
  box-shadow: inset 0 0 0 1px #000b, 0 2px 6px #0008;
}
.boss-hero .tier-cell-k { font-size: 13px; font-weight: 800; }
.boss-hero .tier-cell-n { font-size: 13px; font-weight: 600; }
.boss-hero .tier-cell-bar { display: none; }
.boss-hero .tier-cell.is-none { opacity: 1; background: #0d0f0b; border: 1.5px dashed #ffffff3a; box-shadow: none; }
.boss-hero .tier-cell.is-none .tier-cell-k, .boss-hero .tier-cell.is-none .tier-cell-n { color: #9d9a90; }
.boss-hero .tier-cell.is-done { border-color: var(--boss-gold); box-shadow: inset 0 0 0 1px #000b, 0 0 10px -2px var(--boss-gold); }

/* Progresso: "x/N Achievements", barra com moldura dourada e remates, "x/N GM" + ícones */
.boss-hero .hero-gm { min-width: 0; display: grid; gap: 10px; }
.boss-hero .hero-gm-text { margin: 0; font: 800 1.25rem/1.2 var(--font-body); font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000; }
.boss-hero .hero-gm-text small { font-size: 0.9375rem; font-weight: 600; color: var(--text-2); }
.hero-bar { position: relative; display: block; height: 18px; margin: 0 16px; }
.hero-bar-frame {
  position: absolute;
  inset: 0;
  display: block;
  padding: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold-hi), var(--boss-gold) 45%, var(--gold-lo));
  box-shadow: 0 0 0 1px #000, 0 2px 6px #000a;
}
.hero-bar-track { display: block; height: 100%; border-radius: 2px; overflow: hidden; background: linear-gradient(180deg, #000, #15180f); box-shadow: inset 0 1px 3px #000; }
.hero-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(180deg, color-mix(in oklab, var(--boss-glow) 70%, #fff), var(--boss-accent) 45%, var(--boss-accent-2));
  box-shadow: 0 0 10px var(--boss-glow);
  transition: width 0.3s var(--ease);
}
.bar-cap { position: absolute; top: 50%; width: 26px; height: 30px; color: var(--boss-gold); transform: translateY(-50%); filter: drop-shadow(0 1px 1px #000); }
.bar-cap.l { left: -16px; }
.bar-cap.r { right: -16px; transform: translateY(-50%) scaleX(-1); }
.bar-cap-gem { fill: var(--gold-hi); }
.hero-gm-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.hero-gm-sub { font-size: 14px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #000; }
.hero-gm-icons { display: flex; gap: 8px; }
.hero-gm-icons > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0d0f0bcc;
  border: 1px solid color-mix(in oklab, var(--boss-gold) 45%, transparent);
  color: var(--boss-gold);
}
.icon-fill { width: 18px; height: 18px; flex-shrink: 0; }

/* Sem banner: arte (se houver) à direita, por baixo do texto, sobre o gradiente do tema */
.boss-hero.has-art { --art-scrim: 25%; }
@media (max-width: 640px) {
  .boss-hero.has-art { --art-h: min(100%, 150px); --art-scrim: 40%; }
}

@media (max-width: 900px) {
  .boss-hero .hero-row { grid-template-columns: minmax(0, 1fr); }
  .hero-divider { width: 100%; min-height: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-line), transparent); }
  .boss-hero .hero-gm { max-width: 420px; width: 100%; }
}
@media (max-width: 640px) {
  .boss-hero > .hero-body { padding: 14px 14px 16px; }
  .boss-hero .tier-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .boss-hero .hero-strip { width: 100%; }
  .boss-hero .tier-cell { width: auto; min-height: 52px; }
  .boss-hero .hero-gm-text { font-size: 1.125rem; }
}

/* ---------- Títulos de secção da ficha (Cinzel, dourado) ---------- */
.page[data-view="boss"] .section-card { border-color: var(--boss-edge); }
.page[data-view="boss"] .section-card > .card-head { border-bottom-color: var(--gold-line); }
.page[data-view="boss"] .section-card > .card-head .card-title {
  font: 700 clamp(0.95rem, 0.85rem + 0.4vw, 1.125rem)/1.25 var(--font-ornate);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.page[data-view="boss"] .section-card > .card-head .card-title > span {
  background: linear-gradient(180deg, var(--gold-hi), var(--boss-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page[data-view="boss"] .section-card > .card-head .card-title > .icon {
  color: var(--gold-hi);
  background: color-mix(in oklab, var(--boss-accent-2) 40%, var(--boss-bg-deep));
  border: 1px solid var(--gold-line);
}

/* ---------- Separadores de nível ---------- */
.page[data-view="boss"] .tier-tabs {
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--boss-bg-deep) 70%, var(--surface));
  border: 1px solid var(--boss-edge);
}
.tabs .tier-tab {
  --c: var(--boss-gold);
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 9px;
  row-gap: 0;
  min-width: 112px;
  min-height: 44px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}
.tier-tab-dot { grid-row: span 2; width: 10px; height: 10px; border-radius: 2px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 8px -1px var(--c); }
.tier-tab-name { font-size: 14px; font-weight: 700; line-height: 1.2; color: var(--c); }
.tier-tab .tier-tab-n { font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabs .tier-tab:hover:not(:disabled) { background: color-mix(in oklab, var(--c) 9%, transparent); border-color: color-mix(in oklab, var(--c) 35%, transparent); color: var(--text); }
.tabs .tier-tab.active {
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 22%, transparent), color-mix(in oklab, var(--c) 8%, transparent));
  border-color: color-mix(in oklab, var(--c) 70%, transparent);
  box-shadow: inset 0 -3px 0 var(--c), 0 0 14px -6px var(--c);
  color: var(--text);
}
.tier-tab.active .tier-tab-n { color: var(--text); }
.tier-tab.is-complete .tier-tab-n { color: var(--gold-hi); }
.tabs .tier-tab.is-none { opacity: 1; cursor: not-allowed; border: 1px dashed #ffffff2a; }
.tier-tab.is-none .tier-tab-name, .tier-tab.is-none .tier-tab-n { color: #a19e94; font-weight: 500; }
.tier-tab.is-none .tier-tab-dot { background: #6d6a62; box-shadow: none; }

/* ---------- Cartões de achievement (achItem; ficha e Progresso) ---------- */
.ach.ach-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: start;
  padding: 14px 16px 14px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff06, #0000), var(--boss-panel);
  border: 1px solid var(--boss-edge);
  border-left: 3px solid var(--c, var(--line-strong));
}
.ach.ach-card:hover { border-color: color-mix(in oklab, var(--c, var(--line-strong)) 45%, var(--boss-edge)); border-left-color: var(--c, var(--line-strong)); }
.ach-card > .check {
  width: 26px;
  height: 26px;
  margin: 0;
  border-radius: 7px;
  border: 2px solid color-mix(in oklab, var(--boss-gold) 65%, #666);
  background: #0b0d08;
  box-shadow: inset 0 2px 4px #000;
}
.ach-card > .check::after {
  width: 15px;
  height: 15px;
  border: 0;
  background: #1b1405;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scale(0);
}
.ach-card > .check:hover { border-color: var(--boss-gold); }
.ach-card > .check:checked {
  border-color: var(--gold-hi);
  background: linear-gradient(180deg, var(--gold-hi), var(--boss-gold) 55%, var(--gold-lo));
  box-shadow: 0 0 10px -2px var(--boss-gold);
}
.ach-card > .check:checked::after { transform: scale(1); }
.ach-card > .check:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold-hi); }
.ach-main { min-width: 0; }
.ach-card .ach-head { display: block; }
.ach-card .ach-name { display: block; font-size: 1rem; line-height: 1.3; color: var(--text); }
.ach-card .ach-body { margin-left: 0; }
.ach-req { margin-top: 4px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; overflow-wrap: anywhere; }
.ach-card .ach-foot { gap: 6px 14px; margin-top: 8px; font-size: 13px; }
.ach-card .ach-foot .badge { font-size: 12px; }
.ach-speed { display: inline-flex; align-items: center; gap: 5px; color: var(--boss-accent-text); font-weight: 600; }
.ach-done-stamp { display: none; }
.ach-card.done .ach-done-stamp { display: inline-flex; align-items: center; gap: 5px; color: var(--gold-hi); font-weight: 600; }
.ach-card .ach-wiki { margin-left: 0; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 1px solid #ffffff30; }
.ach-card .ach-wiki:hover { color: var(--text); border-bottom-color: var(--text); }
.ach-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ach-side .row-menu { margin-left: 0; }
.ach-side .tier-badge {
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: color-mix(in oklab, var(--c) 12%, #0b0d08);
}
.ach-side .tier-badge::before { content: ""; width: 7px; height: 7px; transform: rotate(45deg); background: var(--c); }
/* Concluído: esbatido, nome riscado a dourado, visto dourado */
.ach.ach-card.done { background: color-mix(in oklab, var(--boss-panel) 70%, #000); border-left-color: var(--boss-gold); }
.ach-card.done .ach-name { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--boss-gold) 70%, transparent); text-decoration-thickness: 2px; }
.ach-card.done .ach-req { color: var(--muted); }
.ach-card.done .tier-badge { border-color: color-mix(in oklab, var(--c) 30%, transparent); }
@media (max-width: 640px) {
  .ach.ach-card { grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 12px 12px 12px 10px; }
  .ach-card > .check { grid-row: 1 / span 2; }
  .ach-side { grid-column: 2; grid-row: 1; flex-direction: row; align-items: center; justify-content: space-between; }
  .ach-card > .ach-main { grid-column: 2; grid-row: 2; }
  .ach-card .ach-name { font-size: 0.97rem; }
}

/* ---------- Home: cartões com o tema do boss (borda e progresso num subtom do acento) ---------- */
.boss-card[data-boss-theme] { border-color: color-mix(in oklab, var(--boss-accent) 28%, var(--line)); }
.boss-card[data-boss-theme]::before { background: linear-gradient(180deg, var(--boss-accent), var(--boss-accent-2)); }
.boss-card[data-boss-theme]:hover { border-color: color-mix(in oklab, var(--boss-accent) 55%, var(--line)); box-shadow: var(--shadow), 0 0 18px -8px var(--boss-glow); }
.boss-card[data-boss-theme] .boss-card-gm .progress-fill { background: linear-gradient(90deg, var(--boss-accent-2), var(--boss-accent)); }

/* Cartão de boss: linha no topo em vez de barra lateral; cabeçalho nome + x/N; níveis em anéis de
   progresso (--p em %, definido por UI.tierStrip); collection log discreto. Só no cartão: a ficha
   (.boss-hero) mantém os seus chips. */
.boss-card::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 3px; background: linear-gradient(90deg, var(--red), transparent 70%); }
.boss-card.is-empty::before { background: linear-gradient(90deg, var(--line), transparent 70%); }
.boss-card[data-boss-theme]::before { background: linear-gradient(90deg, var(--boss-accent), transparent 70%); }
.boss-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.boss-card-count { flex-shrink: 0; font-weight: 700; font-size: var(--fs-md); font-variant-numeric: tabular-nums; color: var(--text); }
.boss-card-count > span { color: var(--text-2); font-weight: 500; }
.boss-card-gm .progress { height: 6px; background: color-mix(in srgb, var(--boss-accent, var(--platinum)) 18%, var(--bg-deep)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--boss-accent, var(--platinum)) 28%, transparent); }
.boss-card-gm .progress-fill { min-width: 4px; }
.boss-card .tier-cell, .has-art.boss-card .tier-cell.is-none { background: none; border: 0; border-radius: 0; padding: 0; gap: 3px; justify-items: center; }
.boss-card .tier-cell.is-current { box-shadow: none; }
.boss-card .tier-cell-k {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 11px; font-weight: 800; letter-spacing: 0;
  background: radial-gradient(circle, var(--bg-deep) 58%, transparent 60%), conic-gradient(var(--c) calc(var(--p, 0) * 1%), rgba(255, 255, 255, 0.14) 0);
}
.boss-card .tier-cell.is-done .tier-cell-k { background: var(--c); color: #111; }
.boss-card .tier-cell.is-none .tier-cell-k { background: radial-gradient(circle, var(--bg-deep) 58%, transparent 60%), rgba(255, 255, 255, 0.08); }
.boss-card .tier-cell.is-none { opacity: 0.4; }
.boss-card .tier-cell.is-none .tier-cell-n { visibility: hidden; }
.boss-card .tier-cell-n { font-size: 12px; }
.boss-card .tier-cell-bar { display: none; }
.boss-card-log { border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 8px; font-weight: 500; letter-spacing: 0.02em; }
.boss-card-log-k { text-transform: none; letter-spacing: 0.02em; font-weight: 500; }
.boss-card-log-n { color: var(--text-2); }
.boss-card .tier-cell[data-tier="easy"] { --c: var(--tier-easy); }
.boss-card .tier-cell[data-tier="medium"] { --c: var(--tier-medium); }
.boss-card .tier-cell[data-tier="hard"] { --c: var(--tier-hard); }
.boss-card .tier-cell[data-tier="elite"] { --c: var(--tier-elite); }
.boss-card .tier-cell[data-tier="master"] { --c: var(--tier-master); }
.boss-card .tier-cell[data-tier="gm"] { --c: var(--tier-gm); }
.boss-card-log { gap: 6px; }
.boss-card-log .progress { height: 5px; background: color-mix(in srgb, var(--boss-gold, var(--gold)) 16%, var(--bg-deep)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--boss-gold, var(--gold)) 24%, transparent); }
.boss-card-log .progress-fill { min-width: 3px; }
.boss-card-trophy { flex-shrink: 0; width: 24px; height: 34px; margin-right: auto; margin-left: 2px; align-self: center; object-fit: contain; opacity: 0.8; filter: saturate(0.9); }
.boss-card-trophy:not(.is-on) { opacity: 0.7; filter: grayscale(0.4) brightness(0.9); }
.boss-card-trophy.is-on { opacity: 1; filter: drop-shadow(0 0 6px rgba(255, 190, 70, 0.8)); }

/* ==========================================================================
   Boss completo na Home (.boss-card.is-complete; regra App.celebrate.isBossComplete, a mesma do pop-up)
   Variantes A + B + E de research/mockup-complete.html:
   A moldura dourada com brilho, linha do topo e barra principal a dourado (anéis de nível e barra do
     collection log mantêm as cores próprias);
   B fita diagonal "COMPLETO" no canto (texto #1a1200 sobre #a8801f–#e8c765 ≥ 5:1); o cabeçalho ganha
     margem à direita para o contador x/N não ficar por baixo;
   E reflexo de luz a atravessar o cartão (só transform, elemento filho; desligado com reduced-motion).
   ========================================================================== */
.boss-card.is-complete {
  --cc-gold: #e8c765;
  --cc-gold-2: #a8801f;
  border-color: var(--cc-gold);
  box-shadow: 0 0 0 1px #e8c76555, 0 0 22px -4px var(--cc-gold);
}
.boss-card.is-complete:hover,
.boss-card.is-complete[data-boss-theme]:hover { border-color: var(--cc-gold); box-shadow: 0 0 0 1px #e8c76577, 0 0 28px -4px var(--cc-gold); }
.boss-card.is-complete::before,
.boss-card.is-complete[data-boss-theme]::before { height: 4px; background: linear-gradient(90deg, var(--cc-gold-2), var(--cc-gold), var(--cc-gold-2)); }
.boss-card.is-complete .boss-card-gm:not([data-tier]) .progress-fill { background: linear-gradient(90deg, var(--cc-gold-2), var(--cc-gold)); }
.boss-card.is-complete .boss-card-head { padding-right: 40px; }
.boss-card.is-complete > .boss-card-name { padding-right: 40px; }
.boss-card-ribbon {
  position: absolute;
  top: 14px;
  right: -30px;
  z-index: 3;
  width: 116px;
  padding: 3px 0;
  transform: rotate(38deg);
  text-align: center;
  background: linear-gradient(90deg, var(--cc-gold-2), var(--cc-gold), var(--cc-gold-2));
  color: #1a1200;
  font: 800 10px/1.3 var(--font-body);
  letter-spacing: 0.12em;
  pointer-events: none;
  box-shadow: 0 2px 6px #0008;
}
.boss-card-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, #ffe9a840 48%, transparent 60%);
  transform: translateX(-120%);
  animation: boss-card-shine 3.4s ease-in-out infinite;
  will-change: transform;
}
@keyframes boss-card-shine { 0%, 40% { transform: translateX(-120%); } 80%, 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
  .boss-card-shine { display: none; animation: none; }
}
/* Task do Roll no hero que abre a RuneScape Wiki: seta de ligação externa discreta no fim da linha. */
.hero-item.is-external .hero-item-title::after { content: " \2197"; font-size: 0.85em; opacity: 0.6; }

/* ---------- Perfil do personagem (js/components/profile-ui.js) ----------
   Grelha compacta das skills ao estilo do painel do jogo: células pequenas com ícone à esquerda e o nível à direita
   (29 skills + nível total, nível de combate e quests). Ícones em assets/skills/ (tools/build-skill-icons.py). */
.prof-body { display: grid; gap: var(--sp-3); align-content: start; min-width: 0; }
.prof-top { display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); align-items: start; min-width: 0; }
@media (min-width: 1000px) {
  .prof-top { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
}
.prof-block { min-width: 0; }
.prof-block p { margin: 0 0 var(--sp-2); }
.prof-hs .field-label { display: block; }
.prof-hs-row { margin-top: var(--sp-1, 4px); }
.prof-hs-row .input { flex: 1 1 140px; min-width: 0; }
.prof-hs .inline-check, .prof-auto { display: flex; gap: var(--sp-2); align-items: flex-start; margin-top: var(--sp-2); }
.prof-hs-status { margin: var(--sp-2) 0 0; min-height: 1.2em; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.prof-hs-status .prof-retry { margin-left: var(--sp-1, 4px); }
.prof-note { margin-top: var(--sp-2) !important; }
.prof-grid-skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 4px;
  max-width: 640px;
  min-width: 0;
}
@media (max-width: 420px) {
  .prof-grid-skills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.prof-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  height: 40px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: var(--text);
  font: inherit;
}
.prof-cell:focus-within { border-color: var(--text-2); }
.prof-ico { width: 26px; height: 26px; object-fit: contain; flex: none; }
.prof-skill-input.input {
  width: 3.4em;
  min-width: 0;
  height: 30px;
  padding: 0 4px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  -moz-appearance: textfield;
  appearance: textfield;
}
.prof-skill-input::-webkit-outer-spin-button, .prof-skill-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.prof-skill-input[aria-invalid="true"] { border-color: var(--no-line); }
.prof-cell.is-ro { background: var(--surface-2); }
.prof-cell-v { font-weight: 800; font-variant-numeric: tabular-nums; padding-right: 4px; white-space: nowrap; }
.prof-cell.is-btn { cursor: pointer; text-align: left; }
.prof-cell.is-btn:hover { border-color: var(--text-2); }
.prof-privacy { margin: 0; padding: var(--sp-2) var(--sp-3); border-left: 3px solid var(--ok-line); background: var(--ok-bg); border-radius: var(--radius-sm); }
.prof-io summary { cursor: pointer; font-weight: 700; }
.prof-io[open] summary { margin-bottom: var(--sp-2); }
.prof-format code { white-space: normal; overflow-wrap: anywhere; font-size: var(--fs-xs); }
.prof-warns { margin: 0; padding-left: 1.2em; color: var(--warn); }
.prof-credit { margin: 0; }
.req-need { display: grid; gap: var(--sp-2); justify-items: start; margin-top: var(--sp-3); }

/* ---------- Perfil › Diários (Area Tasks): grelha compacta zona × tier ---------- */
.prof-dia { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); }
.prof-dia > summary { cursor: pointer; }
.prof-dia[open] > summary { margin-bottom: var(--sp-2); }
.prof-dia-scroll { overflow-x: auto; min-width: 0; }  /* a 375 px, se não couber, desliza só aqui dentro */
.prof-dia-grid { display: grid; gap: 2px; min-width: 330px; max-width: 560px; }
/* colunas FIXAS iguais no cabeçalho e nas linhas: zona | Beginner | Easy | Medium | Hard | Elite | ações */
.prof-dia-row { display: grid; grid-template-columns: minmax(6.5em, 1fr) repeat(5, 40px) 62px; align-items: center; gap: 2px 4px; }
.prof-dia-head { font-size: var(--fs-xs); color: var(--text-2); }
.prof-dia-th { text-align: center; font-weight: 700; cursor: help; }
.prof-dia-area { min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-sm); }
.prof-dia-count { font-variant-numeric: tabular-nums; }
.prof-dia-cell { display: grid; place-items: center; height: 26px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; }
.prof-dia-cell.is-used { border-color: var(--line); background: var(--surface-2); }
.prof-dia-cell.is-on { border-color: var(--ok-line); }
.prof-dia-cell.is-none { cursor: default; border: 1px dashed transparent; }
.prof-dia-check { margin: 0; }
.prof-dia-acts { display: flex; gap: 2px; justify-content: flex-end; }
.prof-dia-btn.btn { min-width: 28px; height: 26px; padding: 0 6px; }

/* ---------- Página Jogador: faixa do Roll (1 linha) e abas ---------- */
.player-roll-strip { display: flex; align-items: center; gap: var(--sp-2); padding: 8px var(--sp-3); min-width: 0; }
.player-roll-ic { flex: none; display: inline-flex; color: var(--text-2); }
.player-roll-k { flex: none; font-size: var(--fs-sm); white-space: nowrap; }
.player-roll-list { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); color: var(--text-2); }
.player-roll-go.btn { flex: none; margin-left: auto; }
@media (max-width: 480px) { .player-roll-list { display: none; } }
.player-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2);
  overflow-x: auto; scrollbar-width: thin; min-width: 0; }
.player-tab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 12px;
  border: 1px solid transparent; border-radius: calc(var(--radius) - 3px); background: transparent; color: var(--text-2); font: inherit;
  font-weight: 700; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; }
.player-tab:hover { color: var(--text); background: var(--bg-deep); }
.player-tab[aria-selected="true"] { background: var(--bg-deep); color: var(--text); border-color: var(--line); box-shadow: inset 0 -2px 0 var(--boss-gold); }
.player-tab:focus-visible { outline: 2px solid var(--focus, var(--text)); outline-offset: 1px; }
@media (max-width: 480px) { .player-tabs { gap: 2px; padding: 3px; } .player-tab { padding: 0 6px; } .player-tab .icon { display: none; } }
.player-tabpanel { min-width: 0; }
.player-ch-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
@media (max-width: 760px) { .player-ch-grid { grid-template-columns: minmax(0, 1fr); } }
.player-data-grid { align-items: stretch; }
.help-wrap { display: grid; gap: 2px; }
.help-wrap .help-lead { margin: 0; }
.help-q > summary { list-style: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 800; color: var(--text-2); cursor: pointer; }
.help-q > summary::-webkit-details-marker { display: none; }
.help-q[open] > summary { background: var(--surface-2); color: var(--text); }
.help-q > p { margin: 4px 0 0; }
.help-more > summary { cursor: pointer; color: var(--text-2); }
.ch-comp-mini { margin: 0; padding-left: 1.1em; }

/* Perfil mais baixo: células da grelha das skills mais pequenas */
.player-tabpanel .prof-cell { height: 34px; }
.player-tabpanel .prof-ico { width: 22px; height: 22px; }
.player-tabpanel .prof-skill-input.input { height: 26px; }
.player-tabpanel .prof-grid-skills { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 3px; }

/* ---------- Aba Quests: base (barra, filtros) ---------- */
.prof-q-body { display: grid; gap: var(--sp-3); min-width: 0; }
.prof-qbar { display: flex; height: 6px; border-radius: 3px; background: var(--bg-deep); overflow: hidden; border: 1px solid var(--line); }
.prof-qbar-done { background: var(--ok); }
.prof-qbar-started { background: var(--warn); }
.prof-qfilters { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; min-width: 0; }
.prof-q-search.input { flex: 1 1 180px; min-width: 0; max-width: 300px; height: 34px; }

/* ---------- Jogador: layout B (menu lateral com contadores; < 768 px barra de abas horizontal) ---------- */
.player-layout { display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); align-items: start; min-width: 0; }
.player-nav { min-width: 0; }
.player-tab-count { font-weight: 600; font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .player-tab-count { display: none; } }
@media (min-width: 768px) {
  .player-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .player-nav { position: sticky; top: var(--sp-3); }
  .player-tabs { flex-direction: column; overflow: visible; }
  .player-tab { flex: none; justify-content: flex-start; padding: 10px 12px; text-align: left; }
  .player-tab-count { margin-left: auto; }
  .player-tab[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--boss-gold); }
}
/* Diários na aba Quests: secção recolhível com o aspeto de cartão */
.prof-dia.card { padding: var(--sp-3) var(--sp-4); }
.prof-dia.card > summary { font-size: var(--fs-md); }

/* ---------- Jogador: ficha do personagem (topo, todas as abas) ---------- */
.psheet { display: grid; gap: var(--sp-3) var(--sp-5); padding: var(--sp-4) var(--sp-5); min-width: 0;
  grid-template-columns: minmax(0, 1fr); align-items: center;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent-glow) 30%, transparent), transparent 55%), var(--surface);
  border-color: var(--accent-border); }
@media (min-width: 900px) {
  .psheet { grid-template-columns: minmax(200px, 1fr) auto; grid-template-areas: "id stats" "next actions"; }
  .psheet-id { grid-area: id; } .psheet-stats { grid-area: stats; } .psheet-next { grid-area: next; } .psheet-actions { grid-area: actions; justify-content: flex-end; }
  .psheet.is-empty { grid-template-areas: "id actions"; }
}
.psheet-id { display: grid; gap: 2px; min-width: 0; }
.psheet-id .eyebrow { margin: 0; }
.psheet-name { margin: 0; font-family: var(--font-hero); font-size: var(--fs-2xl); font-weight: 700; line-height: 1.05; letter-spacing: 0.01em; overflow-wrap: anywhere; }
.psheet-empty { margin: 4px 0 0; max-width: 52ch; }
.psheet-phase { display: inline-flex; align-items: center; gap: 6px; justify-self: start; margin-top: 4px; padding: 2px 10px 2px 4px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--boss-gold) 55%, transparent); background: color-mix(in srgb, var(--boss-gold) 12%, transparent); font-size: var(--fs-sm); min-width: 0; }
.psheet-phase b { font-family: var(--font-hero); font-size: 1rem; padding: 0 6px; border-radius: 999px; background: var(--boss-gold); color: #1d1400; }
.psheet-phase span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psheet-phase.is-off { opacity: 0.75; border-color: var(--line); background: transparent; }
.psheet-phase.is-off b { background: var(--surface-3); color: var(--text); }
.psheet-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; min-width: 0; }
@media (min-width: 900px) { .psheet-stats { grid-template-columns: repeat(4, 104px); } }
.psheet-stat { display: grid; gap: 2px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--bg-deep) 70%, transparent); min-width: 0; }
.psheet-stat-k { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.psheet-stat-v { font-family: var(--font-hero); font-size: 1.375rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.psheet-bar { display: block; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.psheet-bar > span { display: block; height: 100%; background: var(--boss-gold); border-radius: inherit; transition: width .3s ease; }
.psheet-bar.is-wide { height: 6px; }
.psheet-next { display: grid; gap: 4px; min-width: 0; font-size: var(--fs-sm); }
.psheet-next-link { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.psheet-next-link:hover span { text-decoration: underline; }
.psheet-next.is-ready .psheet-bar > span { background: var(--ok); }
.psheet-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }

/* ---------- Menu lateral: aba ativa bem marcada; troca de aba com fade suave ---------- */
.player-tab .icon { flex: none; opacity: 0.85; }
.player-tab[aria-selected="true"] { color: var(--text); background: var(--surface); border-color: color-mix(in srgb, var(--boss-gold) 45%, transparent);
  box-shadow: inset 0 -2px 0 var(--boss-gold); }
.player-tab[aria-selected="true"] .icon { color: var(--boss-gold); opacity: 1; }
.player-tab[aria-selected="true"] .player-tab-count { color: var(--boss-gold); }
@media (min-width: 768px) { .player-tab[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--boss-gold); } }
.player-tab-name { font-family: var(--font-hero); font-size: 1rem; letter-spacing: 0.02em; }
.player-tabpanel { animation: ptab-in .22s ease-out both; }
@keyframes ptab-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .player-tabpanel { animation: none; } .psheet-bar > span { transition: none; } }

/* ---------- Perfil: células das skills com 99/120 em destaque e barra até ao próximo marco ---------- */
.prof-cell { position: relative; overflow: hidden; }
.prof-cell-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--surface-3); }
.prof-cell-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); background: var(--tier-easy); }
.prof-cell.is-99 { border-color: color-mix(in srgb, var(--boss-gold) 65%, transparent); background: color-mix(in srgb, var(--boss-gold) 10%, var(--bg-deep)); }
.prof-cell.is-99 .prof-cell-bar::after { background: var(--boss-gold); }
.prof-cell.is-99 .prof-skill-input { color: var(--boss-gold); }
.prof-cell.is-120 { border-color: var(--tier-special); background: color-mix(in srgb, var(--tier-special) 12%, var(--bg-deep)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tier-special) 40%, transparent); }
.prof-cell.is-120 .prof-cell-bar { display: none; }
.prof-cell.is-120 .prof-skill-input { color: var(--tier-special); }


/* ---------- Desafio: fase atual ---------- */
.ch-now-card { grid-column: 1 / -1; }
.ch-now { display: grid; gap: var(--sp-3); min-width: 0; }
.ch-now-head { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.ch-now-head > div { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.ch-now-id { flex: none; font-family: var(--font-hero); font-size: 1.5rem; font-weight: 700; padding: 0 10px; border-radius: var(--radius-sm); background: var(--boss-gold); color: #1d1400; }
.ch-now-n { flex: none; font-family: var(--font-hero); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--boss-gold); }
.ch-now-cols { display: grid; gap: var(--sp-3) var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ch-now-col h4 { margin: 0 0 6px; font-size: var(--fs-sm); color: var(--text-2); }
.ch-now-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-sm); }
.ch-now-list li { min-width: 0; overflow-wrap: anywhere; }
.ch-now-list li.is-opt { color: var(--text-2); }
.ch-now-ic { display: inline-grid; vertical-align: middle; width: 20px; height: 20px; }
.ch-now-ic svg { width: 16px; height: 16px; }
.ch-now-ok { margin: 0; color: var(--ok); font-weight: 700; }

@media (max-width: 899px) { .psheet-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .psheet-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ch-now-list li[data-type] { display: flex; align-items: center; gap: 6px; }
.ch-now-ic { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; color: var(--k, var(--text-2)); }
.ch-now-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- Aba Quests (lista plana): progresso, filtros, menu ⋯, secções, linhas de 1 linha ---------- */
.prof-qprog { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: var(--fs-sm); }
.prof-qprog-n { font-family: var(--font-hero); font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.prof-qprog-bar { flex: 1 1 auto; height: 8px; min-width: 60px; }
.prof-qprog-txt { color: var(--text-2); white-space: nowrap; }
.prof-qfilters { flex-wrap: nowrap; }
@media (max-width: 760px) { .prof-qfilters { flex-wrap: wrap; } }
.prof-qchips { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.prof-qchip { flex: none; }
.prof-qchip[aria-pressed="true"] { background: var(--boss-gold); border-color: var(--boss-gold); color: #1d1400; font-weight: 700; }
.prof-qmenu { position: relative; margin-left: auto; flex: none; }
.prof-qmenu-btn { list-style: none; display: grid; place-items: center; width: 34px; height: 32px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-2); font-size: 1.25rem; line-height: 1; }
.prof-qmenu-btn::-webkit-details-marker { display: none; }
.prof-qmenu[open] .prof-qmenu-btn { background: var(--surface-2); color: var(--text); }
.prof-qmenu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; display: grid; min-width: 240px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.prof-qmenu-item { text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.prof-qmenu-item:hover, .prof-qmenu-item:focus-visible { background: var(--surface); }
.prof-qsec { min-width: 0; }
.prof-qsec[hidden] { display: none; }
.prof-qsec-h, .prof-qsec-sum { margin: 0 0 4px; font-family: var(--font-hero); font-size: 1.125rem; font-weight: 700; }
.prof-qsec-sum { cursor: pointer; list-style: none; }
.prof-qsec-sum::-webkit-details-marker { display: none; }
.prof-qsec-sum::before { content: "▸ "; color: var(--muted); }
.prof-qsec[open] > .prof-qsec-sum::before { content: "▾ "; }
.prof-qsec-n { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; }
.prof-q-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 var(--sp-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .prof-q-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prof-q { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 34px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.prof-q-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); cursor: pointer; }
.prof-q.is-done .prof-q-title { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 55%, transparent); }
.prof-q.is-done .prof-q-tag { opacity: .55; }
.prof-qst { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: transparent; color: var(--muted); font: 800 13px/1 var(--font-body); cursor: pointer; transition: background .15s, border-color .15s; }
.prof-qst:hover { border-color: var(--text-2); }
.prof-qst.is-s1 { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.prof-qst.is-s2 { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.prof-qst:focus-visible { outline: 2px solid var(--boss-gold); outline-offset: 2px; }
.prof-q-tag { flex: 0 1 auto; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.prof-q-tag.is-phase { color: var(--boss-gold); border-color: color-mix(in srgb, var(--boss-gold) 45%, transparent); }
.prof-q-status:empty { display: none; }
@media (max-width: 760px) {
  .prof-q-search.input { max-width: none; }
  .prof-qmenu { order: 1; }
  .prof-qchips { order: 2; flex: 1 1 100%; flex-wrap: wrap; overflow: visible; }
}

/* ---------- Aparência › Títulos de bosses (mockup research/mockup-titles.html) ---------- */
.ttl-body { display: grid; gap: var(--sp-3); min-width: 0; }
.ttl-hero { display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-width: 0; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c, var(--line)) 18%, transparent), transparent 60%), var(--bg-deep); }
.ttl-hero.is-on { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.ttl-hero-emb { flex: none; width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--boss-gold); font-size: 1.5rem; }
.ttl-hero-text { display: grid; min-width: 0; flex: 1 1 auto; }
.ttl-hero-k { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ttl-hero-full { font-family: var(--font-hero); font-size: 1.75rem; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.ttl-hero-full em { font-style: normal; color: var(--c); text-shadow: 0 0 12px color-mix(in srgb, var(--c) 50%, transparent); }
.ttl-hero .btn { flex: none; }
@media (max-width: 480px) { .ttl-hero { flex-wrap: wrap; } .ttl-hero-full { font-size: 1.375rem; } }
.ttl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.ttl-q.input { flex: 1 1 200px; max-width: 300px; min-width: 0; height: 34px; }
.ttl-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ttl-chips .chip[aria-pressed="true"] { background: var(--boss-gold); border-color: var(--boss-gold); color: #1d1400; font-weight: 700; }
.ttl-count { margin-left: auto; }
.ttl-groups { display: grid; gap: 6px; min-width: 0; }
.ttl-group { min-width: 0; }
.ttl-group-sum { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; list-style: none; font-family: var(--font-hero); font-size: 1.125rem; font-weight: 700; }
.ttl-group-sum::-webkit-details-marker { display: none; }
.ttl-group-sum::before { content: "▸"; color: var(--muted); }
.ttl-group[open] > .ttl-group-sum::before { content: "▾"; }
.ttl-group-sum small { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; }
.ttl-ph { font-size: .9rem; padding: 0 7px; border-radius: 6px; background: var(--boss-gold); color: #1d1400; }
.ttl-grid { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
@media (max-width: 480px) { .ttl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ttl-seal { position: relative; display: grid; gap: 6px; align-content: start; min-width: 0; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 14%, transparent), transparent 55%), var(--bg-deep); }
.ttl-seal-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ttl-seal-emb { flex: none; width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-2); color: var(--boss-gold); }
.ttl-seal-boss { flex: 1 1 auto; min-width: 0; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttl-tick { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--boss-gold); color: #1d1400; font-size: 11px; font-weight: 900; }
.ttl-lock { flex: none; font-size: 12px; opacity: .7; }
.ttl-seal-t { font-family: var(--font-hero); font-size: 1.1875rem; line-height: 1.1; color: var(--c); text-shadow: 0 0 10px color-mix(in srgb, var(--c) 45%, transparent); overflow-wrap: anywhere; }
.ttl-seal.is-locked { background: var(--bg-deep); }
.ttl-seal.is-locked .ttl-seal-t { color: color-mix(in srgb, var(--c) 45%, var(--muted)); text-shadow: none; opacity: .75; }
.ttl-seal.is-locked .ttl-seal-emb { filter: grayscale(1); opacity: .6; }
.ttl-seal.is-active { border-color: var(--boss-gold); box-shadow: 0 0 0 1px color-mix(in srgb, var(--boss-gold) 50%, transparent); }
.ttl-seal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ttl-use.btn { min-height: 26px; padding: 0 10px; font-size: var(--fs-xs); }
.ttl-use.is-on { background: var(--boss-gold); border-color: var(--boss-gold); color: #1d1400; font-weight: 700; }
.ttl-bar { display: block; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.ttl-bar > span { display: block; height: 100%; background: var(--c); }
.ttl-cond { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttl-own { display: inline-flex; gap: 4px; align-items: center; }
.ttl-note { margin: 0; }
/* Ficha: título sob o nome */
.psheet-namebox { display: grid; min-width: 0; }
.psheet-title { margin: 2px 0 0; font-family: var(--font-hero); font-size: 1.125rem; font-weight: 700; color: var(--c); letter-spacing: .01em;
  text-shadow: 0 0 10px color-mix(in srgb, var(--c) 40%, transparent); overflow-wrap: anywhere; }

/* Título composto: escolha de prefixo/sufixo e linha da ficha com as duas cores */
.ttl-hero { flex-wrap: wrap; }
.ttl-hero-full em { color: var(--c); }
.ttl-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; flex: 1 1 320px; min-width: 0; }
@media (max-width: 480px) { .ttl-picks { grid-template-columns: minmax(0, 1fr); } }
.ttl-pick { display: grid; gap: 2px; min-width: 0; }
.ttl-sel.input { width: 100%; height: 34px; font-size: var(--fs-sm); }
.psheet-title > span { color: var(--c); text-shadow: 0 0 10px color-mix(in srgb, var(--c) 40%, transparent); }
.psheet-title > .psheet-title-sep { color: var(--muted); text-shadow: none; }

/* Ficha: miniaturas da Vitrine */
.psheet-vitrine { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; text-decoration: none; }
.psheet-vit-it { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-deep); }
.psheet-vitrine:hover .psheet-vit-it, .psheet-vitrine:focus-visible .psheet-vit-it { border-color: var(--boss-gold); }
