/* ==========================================================================
   pages.css — Estilos específicos de cada tela
   --------------------------------------------------------------------------
   Índice:
     A. Arena (banner do jogo)         E. Extrato
     B. Modal de liga                  F. Suporte
     C. Carteira / notificações / menu G. Compliance e Parceiros
     D. Minha conta                    H. Sobre
   ========================================================================== */

/* A. Arena — banner do jogo (sem quadro: direto sobre o fundo) ---------- */
.arena-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-6);
  padding: var(--s-2) 0 0;
}
.arena-hero::before {
  /* brilho suave na cor do jogo atrás da arte */
  content: "";
  position: absolute; right: -40px; top: 50%; z-index: -1;
  width: 460px; height: 320px; transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--game) 20%, transparent), transparent);
  pointer-events: none;
}
.arena-hero .eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--lime); }
.arena-hero .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgb(var(--lime-rgb) / 0.12); }
.arena-hero h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(40px, 4.2vw, 60px); line-height: 0.88; text-transform: uppercase; letter-spacing: -0.03em; margin: var(--s-3) 0 var(--s-2); }
.arena-hero h1 em { display: block; color: var(--gold); font-style: normal; }
.arena-hero p { color: var(--paper-dim); font-size: var(--fs-lg); font-weight: 600; }
.arena-hero .chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.arena-hero .chip .icon { color: var(--lime); }
.chip-strong { color: var(--paper); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11.5px; }
.chip-strong s { color: var(--danger); text-decoration-thickness: 2px; }
.arena-art { justify-self: end; }
.arena-art img { display: block; filter: drop-shadow(10px 14px 0 rgba(0, 0, 0, 0.35)); animation: float 5s steps(4) infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }

@media (max-width: 900px) {
  .arena-hero { grid-template-columns: 1fr; }
  .arena-art { justify-self: center; order: -1; }
}

/* B. Modal de liga -------------------------------------------------------- */
.lm-prize { text-align: center; padding: var(--s-6) 0 var(--s-5); border-bottom: 1px solid var(--line); margin-bottom: var(--s-5); }
.lm-prize strong { display: block; font: 900 60px/0.95 var(--font-display); color: var(--gold); margin: 6px 0; }
.lm-prize small { color: var(--muted); }
.lm-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); margin-bottom: var(--s-6); }
.lm-podium li { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: rgb(var(--fg-rgb) / 0.04); border: 1px solid var(--line); }
.lm-podium li:first-child { border-color: rgb(var(--gold-rgb) / 0.35); background: rgb(var(--gold-rgb) / 0.06); }
.lm-podium strong { display: block; font-size: 17px; font-weight: 800; margin: 2px 0; }
.lm-podium small { color: var(--muted); font-size: 12px; }
.lm-sections { display: grid; gap: var(--s-5); margin-bottom: var(--s-6); }
.lm-sections h3 { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-md); font-weight: 800; margin-bottom: 4px; }
.lm-sections h3 .icon { color: var(--lilac); }
.lm-sections p { color: var(--paper-dim); font-size: var(--fs-sm); }
.lm-sections p + p { margin-top: 6px; }
.lm-math { font-family: var(--font-mono); font-size: 12.5px !important; color: var(--paper) !important; padding: var(--s-3); border-radius: var(--r-sm); background: rgb(var(--bg-rgb) / 0.6); margin-top: 6px; }
.lm-actions { display: grid; gap: var(--s-3); margin-top: var(--s-5); }
.lm-balance { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--muted); }
.lm-balance b { color: var(--paper); }
.lm-balance.is-low b { color: var(--danger); }

/* C. Carteira, notificações e menu da conta ------------------------------ */
.wallet-modal .balances { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin: var(--s-5) 0; }
.wallet-modal .balances > div { padding: var(--s-4); border-radius: var(--r-md); background: rgb(var(--fg-rgb) / 0.04); border: 1px solid var(--line); }
.wallet-modal .balances strong { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 800; margin-top: 4px; }
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); margin: var(--s-3) 0 var(--s-5); }
.pack {
  display: grid; justify-items: center; gap: 4px;
  padding: var(--s-4) var(--s-2);
  border-radius: var(--r-md);
  border: 1px solid var(--glass-border);
  background: rgb(var(--fg-rgb) / 0.03);
  transition: all var(--t-fast);
}
.pack .icon { color: var(--gold); }
.pack strong { font-size: var(--fs-lg); }
.pack span { color: var(--muted); font-size: var(--fs-sm); }
.pack:hover { border-color: var(--glass-border-hover); }
.pack[aria-pressed="true"] { border-color: var(--gold); background: rgb(var(--gold-rgb) / 0.08); box-shadow: 0 0 0 3px rgb(var(--gold-rgb) / 0.12); }
.wallet-total { display: flex; justify-content: space-between; align-items: center; padding: var(--s-4) 0; border-top: 1px solid var(--line); margin-bottom: var(--s-3); }
.wallet-total strong { font-size: 22px; color: var(--gold); }

.notif-list { display: grid; gap: var(--s-2); margin-top: var(--s-4); }
.notif { display: flex; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: rgb(var(--fg-rgb) / 0.03); }
.notif > .icon { color: var(--gold); margin-top: 2px; }
.notif strong { display: block; font-size: var(--fs-md); }
.notif p { color: var(--muted); font-size: var(--fs-sm); margin: 2px 0 6px; }

.menu-who { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); margin-bottom: var(--s-3); }
.menu-who strong { display: block; font-size: var(--fs-lg); }
.menu-who small { color: var(--muted); }
.menu-nav { display: grid; gap: 2px; }
.menu-nav a {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 48px; padding: 0 var(--s-3);
  border-radius: var(--r-md);
  color: var(--paper-dim);
  font-weight: 600;
}
.menu-nav a .icon:first-child { color: var(--muted); }
.menu-nav a .icon:last-child { margin-left: auto; color: var(--faint); }
.menu-nav a:hover { background: rgb(var(--fg-rgb) / 0.05); color: var(--paper); }
.menu-nav a[aria-current="page"] { background: rgb(var(--gold-rgb) / 0.08); color: var(--gold); }
.menu-nav a[aria-current="page"] .icon:first-child { color: var(--gold); }
.menu-slogan { display: flex; gap: var(--s-3); align-items: center; margin: var(--s-6) 0 var(--s-4); padding: var(--s-4); border-radius: var(--r-md); background: rgb(var(--lime-rgb) / 0.06); font-size: var(--fs-sm); color: var(--paper-dim); }
.menu-slogan .icon { color: var(--lime); }

/* D. Minha conta --------------------------------------------------------- */
.account-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-6); align-items: start; }
.panel { padding: var(--s-8); display: grid; gap: var(--s-5); align-content: start; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4); }
.panel-head .label { display: flex; align-items: center; gap: var(--s-2); }
.panel-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; text-transform: uppercase; margin-top: var(--s-2); }
.panel > p { color: var(--paper-dim); }
.profile-id { display: flex; align-items: center; gap: var(--s-4); }
.profile-id h2 { font-family: var(--font-display); font-weight: 800; font-size: 30px; text-transform: uppercase; line-height: 1; }
.profile-id p { color: var(--muted); }
.profile-tags { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.game-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
.game-option {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 64px;
  padding: var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid var(--glass-border);
  background: rgb(var(--fg-rgb) / 0.03);
  text-align: left;
  transition: all var(--t-fast);
}
.game-option:hover { border-color: var(--glass-border-hover); }
.game-option[aria-checked="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); }
.game-option .face { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, rgb(var(--bg-rgb) / 0.6)); }
.game-option strong { display: block; font-size: var(--fs-md); }
.game-option small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.game-option small.ok { color: var(--lime); }
.game-option > .icon { margin-left: auto; color: var(--faint); }
.game-option.is-soon { opacity: 0.5; cursor: not-allowed; }

.link-box { padding: var(--s-5); border-radius: var(--r-md); background: rgb(var(--bg-rgb) / 0.5); border: 1px solid var(--line); display: grid; gap: var(--s-4); }
.link-box.is-locked { border-color: rgb(var(--lime-rgb) / 0.28); }
.link-box .row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.link-box .id { font-family: var(--font-mono); font-size: var(--fs-lg); color: var(--paper); }
.link-box p { color: var(--muted); font-size: var(--fs-sm); }
.link-box .actions { display: flex; gap: var(--s-4); align-items: center; flex-wrap: wrap; }

/* E. Extrato ------------------------------------------------------------- */
.statement-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.statement-bar .chip .icon { color: var(--lilac); }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.summary > div { padding: var(--s-6); display: grid; gap: var(--s-2); }
.summary strong { font: 900 40px/1 var(--font-display); }
.summary .is-main strong { color: var(--gold); }
.summary small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm); }
.summary small .icon { color: var(--lime); }

.table-wrap { padding: var(--s-2) 0 0; overflow: hidden; }
.table-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4); padding: var(--s-6) var(--s-6) var(--s-4); }
.table-head h2 { font-size: 20px; font-weight: 800; }
.table-head p { color: var(--muted); font-size: var(--fs-sm); }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 760px; }
table.data th { text-align: left; padding: var(--s-3) var(--s-6); font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
table.data td { padding: var(--s-4) var(--s-6); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td strong.event { display: block; font-size: var(--fs-md); }
table.data td small { color: var(--muted); font-size: 12px; }
table.data td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr.detail td { background: rgb(var(--bg-rgb) / 0.45); color: var(--paper-dim); }
table.data tr.detail code { font-family: var(--font-mono); font-size: 12px; color: var(--lilac); }
.table-foot { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-4) var(--s-6); color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.table-foot .icon { color: var(--lilac); }

/* F. Suporte ------------------------------------------------------------- */
.support-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: var(--s-6); align-items: start; }
.support-form { display: grid; gap: var(--s-5); }
.support-form .submit { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.protocol { font-family: var(--font-mono); font-size: 12px; padding: 6px 10px; border-radius: var(--r-sm); background: rgb(var(--fg-rgb) / 0.05); color: var(--paper-dim); }
.side-cards { display: grid; gap: var(--s-4); }
.side-card { padding: var(--s-6); display: grid; gap: var(--s-2); }
.side-card > .icon { color: var(--lilac); margin-bottom: var(--s-2); }
.side-card h3 { font-size: var(--fs-lg); font-weight: 800; }
.side-card p { color: var(--muted); font-size: var(--fs-sm); }

/* G. Compliance e Parceiros --------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4); }
.info-card { padding: var(--s-6); display: grid; gap: var(--s-3); align-content: start; }
.info-card .ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgb(var(--lilac-rgb) / 0.08); color: var(--lilac); }
.info-card h2 { font-family: var(--font-display); font-weight: 800; font-size: 24px; text-transform: uppercase; line-height: 1; }
.info-card p { color: var(--muted); font-size: var(--fs-sm); }
.info-card .badge { justify-self: start; margin-top: var(--s-2); }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); padding: var(--s-8); flex-wrap: wrap; }
.cta-band h2 { font-family: var(--font-display); font-weight: 900; font-size: 34px; text-transform: uppercase; line-height: 1; margin: var(--s-2) 0; }
.cta-band p { color: var(--muted); max-width: 560px; }
.cta-band .label { display: flex; align-items: center; gap: var(--s-2); color: var(--lime); }

/* H. Sobre -------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
.about-grid h2 { font-family: var(--font-display); font-weight: 900; font-size: 36px; text-transform: uppercase; line-height: 0.95; }
.split-bar { display: flex; height: 14px; border-radius: var(--r-pill); overflow: hidden; }
.split-bar span:first-child { background: var(--gold); }
.split-bar span:last-child { background: var(--pine); }
.split-legend { display: flex; justify-content: space-between; }
.split-legend strong { font: 900 32px/1 var(--font-display); }
.split-legend div:first-child strong { color: var(--gold); }
.split-legend div:last-child strong { color: var(--lilac); }
.podium-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.podium-split li { padding: var(--s-4); border-radius: var(--r-md); background: rgb(var(--fg-rgb) / 0.04); text-align: center; }
.podium-split strong { display: block; font: 900 28px/1 var(--font-display); color: var(--gold); margin-top: 4px; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.values .info-card h3 { font-size: var(--fs-lg); font-weight: 800; }

@media (max-width: 960px) {
  .account-grid, .support-grid, .about-grid { grid-template-columns: 1fr; }
  .summary, .values { grid-template-columns: 1fr; }
  .panel { padding: var(--s-6); }
}
@media (max-width: 560px) {
  .game-pick { grid-template-columns: 1fr; }
  .pack-grid { gap: var(--s-2); }
  .lm-podium, .lc-podium { gap: 6px; }
  .modal { padding: var(--s-6) var(--s-5); }
}

/* Evita que textos longos (IDs, nomes) estiquem a página no celular */
.page > *, .account-grid > *, .panel > * { min-width: 0; }
.link-box .id { overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .overlay { padding: var(--s-3); }
  .lm-podium li { padding: 10px; }
  .lm-podium strong { font-size: 14px; white-space: nowrap; }
  .lm-podium small { display: none; }
  .lm-prize strong { font-size: 48px; }
}

/* Lista de pontuação maior, no detalhe da liga */
.points-lg { margin-top: 6px; padding: 8px 14px; }
.points-lg li { font-size: var(--fs-sm); padding: 6px 0; }
.points-lg b { color: var(--gold); }

/* ==========================================================================
   I. Meu perfil (#meu-perfil) — perfil gamificado
   ========================================================================== */
.profile-page { gap: var(--s-5); padding-top: var(--s-8); }
.menu-who small.gold { color: var(--gold); display: block; font-weight: 700; }

/* Topo com fundo personalizável */
.profile-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-6);
  min-height: 300px;
  padding: var(--s-8);
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  background: var(--ink-2);
}
.profile-hero::after {
  /* escurece a base para o texto ler bem sobre qualquer fundo */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent 20%, rgb(var(--bg-rgb) / 0.85) 100%);
}
.profile-hero.has-art { background: radial-gradient(120% 140% at 80% 0%, color-mix(in srgb, var(--tint) 35%, var(--ink-2)) 0%, var(--ink-2) 60%, var(--ink) 100%); }
.profile-hero-art {
  position: absolute; z-index: -2;
  right: 2%; top: 50%; transform: translateY(-50%);
  opacity: 0.55;
}
.profile-id { display: flex; align-items: flex-end; gap: var(--s-6); }
.profile-who { display: grid; gap: 8px; }
.profile-who h1 { font: 900 clamp(40px, 5vw, 64px)/0.9 var(--font-display); text-transform: uppercase; letter-spacing: -0.01em; }
.profile-title { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 800; font-size: var(--fs-lg); }
.profile-level { display: flex; align-items: center; gap: var(--s-3); }
.profile-xp { display: grid; gap: 6px; min-width: 240px; font-size: var(--fs-sm); font-weight: 700; }
.profile-xp small { color: var(--muted); font-weight: 500; }
.profile-xp .progress { height: 6px; }

/* Selo de nível (como o da Steam): círculo com anel na cor da faixa */
.lvl {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 50%;
  font: 900 20px/1 var(--font-display);
  border: 3px solid var(--lvl);
  color: var(--paper);
  background: color-mix(in srgb, var(--lvl) 14%, rgb(var(--bg-rgb) / 0.8));
}
.lvl-lilas { --lvl: var(--lilac); }
.lvl-ouro { --lvl: var(--gold); }
.lvl-rubi { --lvl: #ff5a64; }
.lvl-sm { width: 30px; height: 30px; font-size: 14px; border-width: 2px; }

/* Faixa de estatísticas */
.profile-stats { display: grid; grid-template-columns: repeat(6, 1fr); padding: var(--s-5) var(--s-6); gap: var(--s-4); }
.profile-stats > div { display: grid; gap: 4px; }
.profile-stats .label { display: flex; align-items: center; gap: 6px; font-size: 10px; }
.profile-stats strong { font: 900 30px/1 var(--font-display); }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-5); align-items: start; }
.profile-main, .profile-side { display: grid; gap: var(--s-5); }
.profile-page .panel { padding: var(--s-6); gap: var(--s-4); }
.profile-page .panel-head h2 { font-size: 26px; }
.profile-page .panel-head h2 small { font: 500 14px var(--font-body); }

/* Ligas marcantes (vitrine) */
.showcase { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s-3); }
.show-card {
  position: relative; overflow: hidden;
  display: grid; gap: 4px; align-content: start;
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: linear-gradient(160deg, color-mix(in srgb, var(--game) 14%, transparent), rgb(var(--bg-rgb) / 0.5) 70%);
  border: 1px solid color-mix(in srgb, var(--game) 30%, transparent);
}
.show-medal { position: absolute; top: 12px; right: 12px; color: var(--gold); }
.show-medal .icon { width: 22px; height: 22px; }
.show-card h3 { font: 800 20px/1 var(--font-display); text-transform: uppercase; margin-top: 4px; }
.show-place { font: 900 34px/1 var(--font-display); color: var(--gold); margin-top: 6px; }
.show-card p { color: var(--paper-dim); font-size: var(--fs-sm); }
.show-prize { color: var(--muted); font-size: 12px; margin-top: 4px; }
.show-prize b { color: var(--lime); }

/* Conquistas */
.ach-total { width: 160px; align-self: center; }
.ach-tabs { flex-wrap: wrap; gap: 4px; }
.ach-tabs .tab { min-height: 34px; padding: 0 12px; font-size: 12.5px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-3); }
.ach {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: rgb(var(--fg-rgb) / 0.03);
  border: 1px solid var(--line);
}
.ach-ic {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--faint);
  background: rgb(var(--fg-rgb) / 0.05);
}
.ach.is-done { border-color: rgb(var(--gold-rgb) / 0.28); background: linear-gradient(160deg, rgb(var(--gold-rgb) / 0.08), transparent 70%); }
.ach.is-done .ach-ic { color: var(--ink); background: linear-gradient(180deg, var(--gold-soft), var(--gold)); box-shadow: 0 6px 14px -6px rgb(var(--gold-rgb) / 0.6); }
.ach-body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.ach-body strong { font-size: var(--fs-md); }
.ach-body p { color: var(--muted); font-size: 12.5px; }
.ach-body small { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--paper-dim); }
.ach-body .progress { height: 5px; margin-top: 4px; }
.ach-body .progress > span { background: var(--lilac); }
.ach-rarity { color: var(--faint) !important; }

/* Por jogo */
.game-bars { display: grid; gap: var(--s-4); }
.game-bars li { display: flex; align-items: center; gap: var(--s-3); }
.game-bars .face { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, rgb(var(--bg-rgb) / 0.6)); }
.game-bars li > div { flex: 1; display: grid; gap: 6px; }
.game-bars-row { display: flex; justify-content: space-between; gap: var(--s-2); font-size: var(--fs-sm); }
.game-bars-row span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.bar { height: 6px; border-radius: var(--r-pill); background: rgb(var(--fg-rgb) / 0.07); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--c); }

/* Amigos */
.friends { display: grid; gap: 2px; }
.friend { display: flex; align-items: center; gap: var(--s-3); padding: 8px; margin: 0 -8px; border-radius: var(--r-md); }
.friend:hover { background: rgb(var(--fg-rgb) / 0.04); }
.friend > div { flex: 1; min-width: 0; display: grid; }
.friend strong { font-size: var(--fs-sm); }
.friend small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend.is-liga small { color: var(--gold); }
.friend.is-online small { color: var(--lime); }
.friend.is-offline { opacity: 0.6; }
.friend-av { position: relative; width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgb(var(--pine-rgb) / 0.6); }
.friend-av i { position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: var(--faint); }
.friend.is-online .friend-av i { background: var(--lime); }
.friend.is-liga .friend-av i { background: var(--gold); }

/* Editor de perfil */
.profile-editor { width: min(640px, 100%); }
.editor-preview { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4); margin: var(--s-4) 0; border-radius: var(--r-md); background: rgb(var(--bg-rgb) / 0.5); }
.editor-preview strong { display: block; font-size: var(--fs-lg); }
.editor-preview small { display: block; font-weight: 700; }
.editor-tabs { margin-bottom: var(--s-4); }
.opt-list { display: grid; gap: 6px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-2); }
.opt-grid-sm { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); margin-top: 8px; }
.opt {
  position: relative;
  display: grid; gap: 6px; justify-items: start;
  padding: var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid var(--glass-border);
  background: rgb(var(--fg-rgb) / 0.03);
  text-align: left;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.opt:hover { border-color: var(--glass-border-hover); }
.opt[aria-pressed="true"] { border-color: var(--gold); background: rgb(var(--gold-rgb) / 0.07); }
.opt.is-locked { cursor: not-allowed; }
.opt.is-locked > :not(.opt-lock) { opacity: 0.35; filter: grayscale(0.8); }
.opt-title { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.opt-title .icon { color: var(--gold); }
.opt-name { font-size: 12.5px; font-weight: 700; color: var(--paper-dim); }
.opt-lock { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.opt-check { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--ink); }
.opt-swatch { width: 100%; height: 64px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(120% 140% at 80% 0%, color-mix(in srgb, var(--tint, #333) 35%, var(--ink-2)), var(--ink)); }

.opt-avatar { width: 66px; height: 66px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: rgb(var(--pine-rgb) / 0.6); justify-self: center; }
.opt-ring { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--ring); justify-self: center; background: rgb(var(--bg-rgb) / 0.6); }
.opt-grid-sm .opt { justify-items: center; text-align: center; }

@media (max-width: 1100px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .profile-hero { flex-direction: column; align-items: flex-start; min-height: 0; padding: var(--s-6) var(--s-5); }
  .profile-id { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
  .avatar.xl { width: 136px; height: 136px; }
  .profile-xp { min-width: 0; flex: 1; }
  .profile-level { width: 100%; }
  .profile-hero-art { opacity: 0.3; right: -30%; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); padding: var(--s-5); }
  .profile-page .panel { padding: var(--s-5); }
  .ach-total { display: none; }
}

/* Modo Preto e creme: o fundo do perfil vira uma faixa no topo e o texto
   fica sobre creme (os fundos escolhidos continuam aparecendo em cima) */
:root[data-theme="creme"] .profile-hero::after {
  background: linear-gradient(180deg, rgb(var(--bg-rgb) / 0.1) 0%, rgb(var(--bg-rgb) / 0.55) 40%, rgb(var(--bg-rgb) / 0.94) 72%);
}
:root[data-theme="creme"] .profile-hero-art { opacity: 0.4; }
