:root {
  --fundo: #f3f2ff;
  --superficie: #ffffff;
  --superficie-2: #e9e6ff;
  --tinta: #1c1640;
  --tinta-suave: #5d5880;
  --linha: #d9d5f3;
  --acao: #5b3df5;
  --acao-forte: #4529d6;
  --acao-tinta: #ffffff;
  --acao-clara: #c9bfff;
  --fita: #ffc93c;
  --fita-tinta: #2b2000;
  --feito: #12b886;
  --conquista: #ff4f7b;
  --perigo: #d92d20;
  --movel: #cfc9f2;
  --sombra: 0 1px 2px rgba(28, 22, 64, 0.06), 0 6px 18px rgba(28, 22, 64, 0.07);
  --raio: 20px;
  --raio-p: 14px;
  --fonte-placar: "Bricolage Grotesque", "Arial Rounded MT Bold", system-ui, sans-serif;
  --fonte: "Figtree", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fundo: #110d2b;
    --superficie: #1d1842;
    --superficie-2: #2a2459;
    --tinta: #efedff;
    --tinta-suave: #aaa4d6;
    --linha: #362f6b;
    --acao: #8c78ff;
    --acao-forte: #a593ff;
    --acao-tinta: #140e33;
    --acao-clara: #4a3f99;
    --fita: #ffc93c;
    --fita-tinta: #2b2000;
    --feito: #3ddc9f;
    --conquista: #ff6f93;
    --perigo: #ff8a7a;
    --movel: #3d3675;
    --sombra: 0 1px 2px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fundo: #110d2b;
  --superficie: #1d1842;
  --superficie-2: #2a2459;
  --tinta: #efedff;
  --tinta-suave: #aaa4d6;
  --linha: #362f6b;
  --acao: #8c78ff;
  --acao-forte: #a593ff;
  --acao-tinta: #140e33;
  --acao-clara: #4a3f99;
  --feito: #3ddc9f;
  --conquista: #ff6f93;
  --perigo: #ff8a7a;
  --movel: #3d3675;
  --sombra: 0 1px 2px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--fundo);
  color: var(--tinta);
  font-family: var(--fonte);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* a pessoa: pele, camiseta, short e tênis; o lado de trás do corpo sai mais escuro */
.figura {
  --pele: #e3a57f; --pele-fundo: #b87a58; --camisa: #5b3df5; --camisa-fundo: #3a24b5;
  --short: #2b2d4a; --short-fundo: #17182c; --tenis: #ff4f7b; --tenis-fundo: #c43159; --cabelo: #2e1d14;
  --madeira: #d8b088; --sofa: #a9b9de; --parede: #e2def5; --porta: #c9935e; --sombra: rgba(28, 22, 64, 0.13);
}
.figura .chao { stroke: var(--linha); stroke-width: 3; stroke-linecap: round; }
.figura .movel { fill: var(--movel); }
.figura .madeira { fill: var(--madeira); }
.figura .sofa { fill: var(--sofa); }
.figura .parede { fill: var(--parede); }
.figura .porta { fill: var(--porta); }
.figura .macaneta { fill: #8a6236; }
.figura .sombra { fill: var(--sombra); }
.figura .pele { fill: var(--pele); }
.figura .pele.fundo { fill: var(--pele-fundo); }
.figura .camisa { fill: var(--camisa); }
.figura .camisa.fundo { fill: var(--camisa-fundo); }
.figura .short { fill: var(--short); }
.figura .short.fundo { fill: var(--short-fundo); }
.figura .tenis { fill: var(--tenis); }
.figura .tenis.fundo { fill: var(--tenis-fundo); }
.figura .cabelo { fill: var(--cabelo); }
.figura .peso { fill: #ffb020; }
.figura .toalha { fill: none; stroke: #ff8a4c; stroke-width: 4.5; stroke-linecap: round; }

/* ---------- base ---------- */
.app { max-width: 560px; margin: 0 auto; padding: 12px 16px 120px; }
.app.com-abas { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
h1, h2, h3, .numero, .marca, .numero-semana, .alvo-numero, .relogio-descanso, .tempo-serie, .rotulo-descanso, .placar-numero, .relogio-bloco {
  font-family: var(--fonte-placar);
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
}
h2 { font-size: 32px; line-height: 1.08; margin: 18px 0 6px; font-weight: 800; }
h3 { font-size: 21px; line-height: 1.2; margin: 0 0 4px; font-weight: 700; }
p { margin: 6px 0; }
.suave { color: var(--tinta-suave); font-size: 15px; }
.grande { font-size: 21px; line-height: 1.35; }
.nota { background: var(--superficie-2); padding: 12px 16px; border-radius: var(--raio-p); font-size: 15px; }

.topo { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 12px; }
.marca { font-size: 22px; font-weight: 800; margin: 0; color: var(--acao); }
.etapa { color: var(--tinta-suave); margin: 0; font-size: 15px; font-weight: 600; }
.voltar {
  display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--acao);
  font: inherit; font-weight: 700; padding: 10px 8px 10px 0; cursor: pointer;
}
.voltar::before { content: ""; width: 9px; height: 9px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); margin-right: 4px; }

button { font: inherit; cursor: pointer; color: inherit; }
.primario, .secundario {
  display: block; width: 100%; min-height: 58px; border-radius: 999px;
  font-family: var(--fonte-placar); font-size: 21px; font-weight: 700;
  transition: transform 0.08s ease, background-color 0.15s ease;
}
.primario { background: var(--acao); color: var(--acao-tinta); border: 0; box-shadow: 0 6px 0 var(--acao-forte); margin-bottom: 6px; }
.primario:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--acao-forte); }
.primario:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.secundario { background: var(--superficie); color: var(--tinta); border: 2px solid var(--linha); }
.secundario:active { transform: scale(0.98); }
:focus-visible { outline: 3px solid var(--fita); outline-offset: 3px; }
.acoes { margin: 24px 0 8px; }

.bloco { background: var(--superficie); border-radius: var(--raio); padding: 16px 18px; margin: 14px 0; box-shadow: var(--sombra); }
.bloco h2 { margin-top: 0; font-size: 24px; }
.bloco.destaque { border: 3px solid var(--fita); }
.aviso { background: #fff6dc; color: #3b2d00; border-radius: var(--raio-p); padding: 12px 16px; margin: 12px 0; border-left: 6px solid var(--fita); }
.aviso.perigo { background: #fde8e6; color: #5c0f09; border-left-color: var(--perigo); }
.erro { color: var(--perigo); min-height: 1em; font-weight: 600; }
.passos li, .como li { margin: 6px 0; }

/* ---------- primeiro uso ---------- */
.capa { text-align: center; padding-top: 8px; }
.capa .palco { background: var(--superficie-2); box-shadow: none; }
.capa h1 { font-size: 46px; line-height: 1; font-weight: 800; margin: 22px 0 8px; }
.capa .grande { color: var(--tinta-suave); max-width: 22em; margin: 0 auto; }
.roteiro { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; text-align: left; counter-reset: passo; }
.roteiro li { display: flex; align-items: center; gap: 14px; background: var(--superficie); border-radius: var(--raio-p); padding: 12px 14px; box-shadow: var(--sombra); counter-increment: passo; }
.roteiro li::before {
  content: counter(passo); flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--acao); color: var(--acao-tinta); font-family: var(--fonte-placar); font-weight: 800;
}
.progresso { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 2px 0 6px; }
.progresso span { height: 6px; border-radius: 3px; background: var(--linha); }
.progresso span.andou { background: var(--acao); }

/* perguntas e escolhas */
.perguntas { list-style: none; padding: 0; margin: 0; }
.pergunta { background: var(--superficie); border-radius: var(--raio-p); padding: 14px 16px; margin: 10px 0; box-shadow: var(--sombra); }
.pergunta p { margin: 0 0 10px; }
.escolha { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.escolha button {
  min-height: 50px; border-radius: var(--raio-p); border: 2px solid var(--linha); background: var(--superficie); color: var(--tinta); font-weight: 700;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
.escolha button:active { transform: scale(0.97); }
.escolha button[aria-checked="true"] { background: var(--acao); color: var(--acao-tinta); border-color: var(--acao); }
.escolha.quatro button { font-family: var(--fonte-placar); font-size: 22px; }
.escolha.tres button { font-size: 16px; padding: 0 6px; }

.campo { display: block; border: 0; padding: 0; margin: 22px 0; font-weight: 600; }
.campo legend { font-weight: 700; font-size: 18px; padding: 0; margin-bottom: 6px; }
.campo input[inputmode], .campo #nome, .campo #apelido, .campo #colarConvite, .convite input, .apagar input {
  display: block; width: 100%; margin-top: 8px; min-height: 56px; padding: 0 16px; font: inherit; font-size: 20px; font-weight: 500;
  border-radius: var(--raio-p); border: 2px solid var(--linha); background: var(--superficie); color: var(--tinta);
}
.campo input:focus { border-color: var(--acao); outline: none; }
.opcoes { display: grid; gap: 8px; margin-top: 8px; }
.dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.dia { position: relative; cursor: pointer; }
.dia input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dia span { display: grid; place-items: center; aspect-ratio: 1; min-height: 44px; border: 2px solid var(--linha); border-radius: 50%; background: var(--superficie); font-weight: 700; font-size: 14px; transition: background-color 0.15s ease; }
.dia input:checked + span { background: var(--acao); border-color: var(--acao); color: var(--acao-tinta); }
.dia input:focus-visible + span { outline: 3px solid var(--fita); outline-offset: 2px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--acao); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.opcao {
  display: flex; align-items: center; gap: 12px; background: var(--superficie); border: 2px solid var(--linha); border-radius: var(--raio-p);
  padding: 14px; cursor: pointer; font-weight: 600; min-height: 56px; transition: border-color 0.15s ease, background-color 0.15s ease;
}
.opcao:has(input:checked) { border-color: var(--acao); background: var(--superficie-2); }
.opcao input, .marcar input { width: 22px; height: 22px; accent-color: var(--acao); flex: none; margin: 0; }
.marcar { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-weight: 500; }

/* teste */
.medida { background: var(--superficie); border-radius: var(--raio); padding: 16px 18px; margin: 14px 0; box-shadow: var(--sombra); }
.medida .campo { margin: 4px 0; font-weight: 500; }
.contador { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 8px; margin: 8px 0; }
.contador button { min-height: 64px; border-radius: 50%; border: 0; background: var(--superficie-2); color: var(--acao); font-size: 32px; font-weight: 700; aspect-ratio: 1; }
.contador button:active { transform: scale(0.92); }
.contador .numero { text-align: center; font-size: 60px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.cronometro-teste { display: grid; gap: 8px; margin: 10px 0; }
.grande-numero { font-size: 64px; font-weight: 800; text-align: center; line-height: 1; }

/* ---------- abas ---------- */
.abas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; max-width: 560px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: var(--superficie); border-top: 1px solid var(--linha);
}
.aba { display: grid; justify-items: center; gap: 2px; background: none; border: 0; padding: 6px 0; color: var(--tinta-suave); font-size: 12px; font-weight: 700; }
.aba svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; padding: 2px 12px; box-sizing: content-box; border-radius: 999px; }
.aba[aria-current="page"] { color: var(--acao); }
.aba[aria-current="page"] svg { background: var(--superficie-2); }

/* ---------- início ---------- */
.cabeca-inicio { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.ola { margin: 0; font-family: var(--fonte-placar); font-size: 28px; font-weight: 800; line-height: 1.1; }
.selo-nivel { flex: none; font-family: var(--fonte-placar); font-size: 15px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--fita); color: var(--fita-tinta); }
.semana { margin: 14px 0 4px; background: var(--superficie); border-radius: var(--raio); padding: 16px 18px; box-shadow: var(--sombra); }
.semana-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.numero-semana { font-size: 30px; font-weight: 800; line-height: 1; margin: 0; }
.contagem { font-weight: 700; color: var(--acao); margin: 0; }
.tira-dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 14px 0 10px; text-align: center; }
.tira-dias span { display: grid; justify-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--tinta-suave); }
.tira-dias i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; font-style: normal; }
.tira-dias .treina i { background: var(--superficie-2); color: var(--acao); }
.tira-dias .treina i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tira-dias .hoje-dia { color: var(--tinta); }
.tira-dias .treina.extra i::after { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.divisao { margin: 10px 0 0; font-weight: 600; color: var(--acao); }
.tira-dias .hoje-dia i { border-color: var(--acao); }
.pips { display: flex; gap: 6px; }
.pip { flex: 1; height: 8px; border-radius: 4px; background: var(--linha); }
.pip.cheio { background: var(--feito); }
.semana .suave { margin: 8px 0 0; }
.proximo { font-weight: 700; margin: 10px 0 0; }

.hoje { background: var(--acao); color: var(--acao-tinta); box-shadow: 0 10px 28px rgba(91, 61, 245, 0.3); position: relative; overflow: hidden; }
.hoje::after {
  content: ""; position: absolute; right: 14px; top: 14px; width: 56px; height: 56px; opacity: 0.22; pointer-events: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 25% 25% no-repeat, linear-gradient(currentColor, currentColor) 33% 100% / 25% 50% no-repeat,
              linear-gradient(currentColor, currentColor) 66% 100% / 25% 75% no-repeat, linear-gradient(currentColor, currentColor) 100% 100% / 25% 100% no-repeat;
}
.hoje h2 { font-size: 28px; margin-bottom: 2px; padding-right: 64px; }
.hoje .suave, .hoje .lista-treino .suave { color: inherit; opacity: 0.8; }
.duracao { font-family: var(--fonte-placar); font-weight: 700; font-size: 17px; margin: 0 0 8px; opacity: 0.9; }
.lista-treino { list-style: none; padding: 0; margin: 6px 0 12px; }
.lista-treino li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.lista-treino li:last-child { border-bottom: 0; }
.lista-treino .escada { justify-self: center; }
.hoje .escada .degrau { border-color: rgba(255, 255, 255, 0.45); }
.hoje .escada .degrau.passou { background: rgba(255, 255, 255, 0.45); border-color: transparent; }
.hoje .escada .degrau.atual { background: var(--fita); border-color: var(--fita); }
.nome { margin: 0; font-weight: 700; }
.lista-treino .suave, .linha-escada .suave { margin: 0; }
.lista-treino li.parte .marcador { display: grid; place-items: center; width: 48px; height: 30px; border-radius: 10px; background: rgba(255, 255, 255, 0.18); font-family: var(--fonte-placar); font-weight: 700; font-size: 14px; }
.hoje .nota { background: rgba(255, 255, 255, 0.14); color: inherit; }
.hoje .primario { background: var(--fita); color: var(--fita-tinta); box-shadow: 0 6px 0 #d9a21c; margin-top: 14px; }
.hoje .primario:active { box-shadow: 0 2px 0 #d9a21c; }
.avisos { margin: 0; padding-left: 20px; }
.avisos li { margin: 6px 0; }

/* a escada: o desenho que marca o app */
.escada { display: inline-flex; align-items: flex-end; gap: 2px; height: 40px; }
.escada.pequena { height: 28px; gap: 1.5px; }
.degrau { width: 8px; height: calc(var(--n) / var(--t, 8) * 100%); border-radius: 3px 3px 1px 1px; background: transparent; border: 2px solid var(--linha); }
.escada.pequena .degrau { width: 5px; border-width: 1.5px; border-radius: 2px 2px 1px 1px; }
.degrau.passou { background: var(--acao-clara); border-color: var(--acao-clara); }
.degrau.atual { background: var(--acao); border-color: var(--acao); }
.degrau.falta { border-style: dashed; opacity: 0.6; }

.escadas-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.linha-escada { background: var(--superficie); border-radius: var(--raio-p); padding: 14px; box-shadow: var(--sombra); display: grid; gap: 8px; align-content: start; }
.linha-escada .nivel-grande { font-family: var(--fonte-placar); font-size: 26px; font-weight: 800; line-height: 1; margin: 0; color: var(--acao); }
.linha-escada .nivel-grande small { font-size: 15px; color: var(--tinta-suave); font-weight: 600; }
.linha-escada .suave { font-size: 13px; line-height: 1.3; }
.linha-escada.fora { opacity: 0.6; }
.titulo-secao { font-size: 24px; margin: 28px 0 0; }

table.reteste { width: 100%; border-collapse: collapse; font-size: 15px; }
.reteste th, .reteste td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--linha); }
.reteste th { color: var(--tinta-suave); font-weight: 600; }
.reteste tr.melhorou td:last-child { font-weight: 700; }
.reteste td span { color: var(--feito); font-weight: 700; }

/* ---------- treino ---------- */
.topo.treino { margin-bottom: 4px; }
.barra-treino { height: 6px; border-radius: 3px; background: var(--linha); overflow: hidden; margin: 0 0 12px; }
.barra-treino span { display: block; height: 100%; width: var(--p); background: var(--acao); border-radius: 3px; transition: width 0.3s ease; }
.palco { background: var(--superficie); border-radius: var(--raio); padding: 6px; box-shadow: var(--sombra); }
.palco .figura { width: 100%; height: auto; display: block; max-height: 34vh; }
h2.exercicio { font-size: 32px; margin: 16px 0 6px; }
.degrau-linha { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.etiqueta { display: inline-flex; align-items: center; gap: 8px; background: var(--superficie-2); color: var(--tinta); padding: 4px 12px 4px 8px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.series { display: flex; gap: 8px; margin: 16px 0 10px; }
.serie { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 2.5px solid var(--linha); font-family: var(--fonte-placar); font-size: 19px; font-weight: 800; color: var(--tinta-suave); }
.serie.feita { background: var(--feito); border-color: var(--feito); color: #fff; }
.serie.agora { border-color: var(--acao); color: var(--acao); box-shadow: 0 0 0 4px var(--superficie-2); }
.alvo { background: var(--superficie); border-radius: var(--raio); padding: 16px 18px; box-shadow: var(--sombra); }
.alvo-numero { font-size: 52px; font-weight: 800; line-height: 1; margin: 0; color: var(--acao); }
.alvo.falha .alvo-numero { font-size: 34px; color: var(--conquista); }
.ritmo { font-weight: 700; margin-top: 10px; }
.como { background: var(--superficie); border-radius: var(--raio); padding: 14px 18px; margin: 12px 0; box-shadow: var(--sombra); }
.como summary { font-weight: 700; cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.como ol { padding-left: 22px; }
.cuidado { margin: 8px 0 0; }

.barra-fixa {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--fundo); max-width: 560px; margin: 0 auto; box-shadow: 0 -10px 20px var(--fundo);
}
.barra-fixa.aberta { position: static; box-shadow: none; padding: 4px 0 0; }
.tempo-serie[hidden] { display: none; }
.tempo-serie { display: block; text-align: center; font-size: 56px; font-weight: 800; line-height: 1; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.pergunta-serie { font-weight: 700; font-size: 19px; margin: 14px 0 6px; }
.barra-fixa #salvar { margin-top: 18px; }

/* descanso: a tela inteira vira fita de piso, para ser vista do chão */
.descanso, .feito { margin: -12px -16px 0; padding: 24px 16px 32px; text-align: center; }
.descanso { background: var(--fita); color: var(--fita-tinta); min-height: 100vh; }
.rotulo-descanso { font-size: 26px; font-weight: 800; margin: 8px 0 0; }
.relogio-descanso { display: block; font-size: 108px; font-weight: 800; line-height: 1; margin: 6px 0 18px; font-variant-numeric: tabular-nums; }
.anel { position: relative; width: min(72vw, 280px); aspect-ratio: 1; margin: 10px auto 22px; display: grid; place-items: center; }
.anel svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.anel circle { fill: none; stroke-width: 14; }
.anel .trilho { stroke: rgba(43, 32, 0, 0.12); }
.anel .volta { stroke: var(--fita-tinta); stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.anel .relogio-descanso { margin: 0; font-size: 84px; }
.acoes-descanso { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.descanso .secundario { background: rgba(255, 255, 255, 0.4); border-color: transparent; color: var(--fita-tinta); font-size: 18px; }
.a-seguir { margin-top: 22px; background: rgba(255, 255, 255, 0.5); border-radius: var(--raio); padding: 10px; }
.a-seguir .figura { width: 100%; height: auto; max-height: 24vh; }
.a-seguir .figura .chao { stroke: rgba(43, 32, 0, 0.25); }
.a-seguir p { font-weight: 700; margin: 4px 0; }

/* aquecimento, alongamento e condicionamento: o relógio manda */
.relogio-bloco { display: block; text-align: center; font-size: 96px; font-weight: 800; line-height: 1; margin: 10px 0 140px; font-variant-numeric: tabular-nums; color: var(--acao); }
.barra-fixa .link { display: block; margin: 12px auto 0; }
.intervalo { margin: 0 0 12px; padding: 14px 16px 18px; text-align: center; border-radius: var(--raio); transition: background-color 0.3s ease; }
.intervalo .relogio-descanso { margin-bottom: 6px; }
.intervalo.esforco { background: var(--conquista); color: #fff; }
.intervalo.pausa { background: var(--fita); color: var(--fita-tinta); }
.intervalo p { margin: 0; font-weight: 700; }
.rodadas { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.rodadas span { width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: 0.3; }
.rodadas span.feita { opacity: 1; }

/* fim do treino */
.sensacoes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sensacoes button { display: grid; justify-items: center; gap: 6px; padding: 14px 4px; min-height: 0; }
.sensacoes .medidor { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.sensacoes .medidor b { width: 8px; border-radius: 3px; background: currentColor; opacity: 0.25; }
.sensacoes .medidor b:nth-child(1) { height: 40%; }
.sensacoes .medidor b:nth-child(2) { height: 70%; }
.sensacoes .medidor b:nth-child(3) { height: 100%; }
.sensacoes .medidor b.cheio { opacity: 1; }
.lista-dor { background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra); padding: 4px 16px; }
.lista-dor .pergunta { box-shadow: none; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--linha); border-radius: 0; }
.lista-dor .pergunta:last-child { border-bottom: 0; }
.lista-dor .pergunta p { font-weight: 600; }
.lista-dor .escolha button { min-height: 42px; font-size: 15px; }
.lista-dor .escolha button[data-v="leve"][aria-checked="true"] { background: var(--fita); border-color: var(--fita); color: var(--fita-tinta); }
.lista-dor .escolha button[data-v="forte"][aria-checked="true"] { background: var(--perigo); border-color: var(--perigo); color: #fff; }

/* treino salvo: o único momento de festa */
.feito { background: var(--acao); color: var(--acao-tinta); padding: 40px 16px 36px; border-radius: 0 0 32px 32px; position: relative; overflow: hidden; }
.feito .relogio-descanso { font-size: 120px; margin: 4px 0 0; }
.feito p { margin: 0; font-weight: 600; }
.festa { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.feito > :not(.festa) { position: relative; z-index: 1; }
.festa i { position: absolute; top: -20px; width: 9px; height: 15px; border-radius: 2px; animation: cai 2.6s cubic-bezier(0.25, 0.6, 0.5, 1) forwards; }
@keyframes cai {
  from { transform: translateY(0) rotate(0); opacity: 1; }
  to { transform: translateY(520px) rotate(var(--giro)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .festa { display: none; } }
.subiu { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.subiu li { display: flex; align-items: center; gap: 12px; background: var(--superficie-2); border-radius: var(--raio-p); padding: 10px 12px; }
.subiu .seta { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--feito); color: #fff; font-family: var(--fonte-placar); font-weight: 800; }
.numeros-fim { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.numeros-fim div { background: rgba(255, 255, 255, 0.14); border-radius: var(--raio-p); padding: 10px 4px; }
.numeros-fim b { display: block; font-family: var(--fonte-placar); font-size: 28px; font-weight: 800; line-height: 1.1; }
.numeros-fim span { font-size: 13px; opacity: 0.85; }

/* biblioteca */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--linha); background: var(--superficie); color: var(--tinta); font-weight: 700; }
.chip[aria-selected="true"] { background: var(--tinta); color: var(--fundo); border-color: var(--tinta); }
.lista-biblioteca { list-style: none; padding: 0; margin: 8px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lista-biblioteca > li.suave { grid-column: 1 / -1; }
.item-biblioteca {
  display: grid; gap: 6px; width: 100%; height: 100%; text-align: left; background: var(--superficie); border: 0;
  border-radius: var(--raio-p); padding: 8px 8px 12px; color: var(--tinta); box-shadow: var(--sombra); align-content: start;
}
.item-biblioteca:active { transform: scale(0.98); }
.item-biblioteca .nome { font-size: 15px; line-height: 1.25; padding: 0 4px; }
.item-biblioteca .nome, .item-biblioteca .suave { display: block; }
.item-biblioteca .suave { font-size: 13px; padding: 0 4px; }
.miniatura { width: 100%; height: auto; aspect-ratio: 240 / 164; background: var(--superficie-2); border-radius: 10px; }
.miniatura .chao { stroke-width: 3; }

/* histórico */
.placar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.placar > div { background: var(--superficie); border-radius: var(--raio); padding: 14px 16px; box-shadow: var(--sombra); }
.placar > div:first-child { background: var(--conquista); color: #fff; }
.placar > div:first-child .suave { color: inherit; opacity: 0.9; }
.placar-numero { font-size: 60px; font-weight: 800; line-height: 1; margin: 0; }
.barras { display: flex; align-items: flex-end; gap: 6px; height: 120px; overflow-x: auto; padding-bottom: 4px; }
.barra-semana { display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 4px; height: 100%; min-width: 30px; }
.barra-semana .barra { align-self: end; width: 22px; height: var(--h); min-height: 4px; border-radius: 8px 8px 3px 3px; background: var(--linha); }
.barra-semana.cumpriu .barra { background: var(--feito); }
.lista-historico { list-style: none; padding: 0; margin: 0; }
.lista-historico li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linha); }
.lista-historico li:last-child { border-bottom: 0; }
.lista-historico .data { display: grid; place-items: center; height: 52px; border-radius: var(--raio-p); background: var(--superficie-2); font-family: var(--fonte-placar); font-weight: 800; color: var(--acao); line-height: 1; text-align: center; }
.lista-historico .data small { display: block; font-size: 11px; font-weight: 700; color: var(--tinta-suave); }

/* entrada de tela: só o conteúdo novo, uma vez */
.app > * { animation: entra 0.22s ease-out both; }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.app > .abas, .app > .barra-fixa { animation: none; }
@media (prefers-reduced-motion: reduce) { .app > * { animation: none; } }

/* no escuro, short e móveis ganham um tom que aparece no fundo escuro */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .figura { --short: #4a4f86; --short-fundo: #34386a; --madeira: #7d5f42; --sofa: #4b5888; --parede: #2f2963; --porta: #7a5534; --sombra: rgba(0, 0, 0, 0.35); }
}
:root[data-theme="dark"] .figura { --short: #4a4f86; --short-fundo: #34386a; --madeira: #7d5f42; --sofa: #4b5888; --parede: #2f2963; --porta: #7a5534; --sombra: rgba(0, 0, 0, 0.35); }

/* recado depois de salvar ajustes */
.recado { background: var(--superficie); border-left: 6px solid var(--feito); border-radius: var(--raio-p); padding: 12px 16px; margin: 12px 0; box-shadow: var(--sombra); }
.recado ul { margin: 6px 0 0; padding-left: 20px; }
.recado li { margin: 4px 0; }

/* histórico: placar de três, conquistas, cintura */
.placar.tres-colunas { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.placar.tres-colunas > div { padding: 12px; }
.placar.tres-colunas .placar-numero { font-size: 44px; }
.placar.tres-colunas .suave { font-size: 13px; line-height: 1.3; margin-top: 4px; }
.placar > div:nth-child(3) { background: var(--acao); color: var(--acao-tinta); }
.placar > div:nth-child(3) .suave { color: inherit; opacity: 0.9; }
.conquistas { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.conquistas li { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px; border-radius: var(--raio-p); background: var(--fundo); }
.conquistas svg { grid-row: 1 / 3; width: 40px; height: 48px; }
.conquistas .nome { font-size: 14px; line-height: 1.2; }
.conquistas .suave { font-size: 12px; line-height: 1.3; margin: 2px 0 0; }
.conquistas .disco { fill: var(--linha); }
.conquistas .fita-medalha { fill: var(--linha); }
.conquistas .estrela { fill: var(--superficie); }
.conquistas li:not(.ganhou) .nome { color: var(--tinta-suave); }
.conquistas li.ganhou { background: var(--superficie-2); }
.conquistas li.ganhou .disco { fill: var(--fita); }
.conquistas li.ganhou .fita-medalha { fill: var(--conquista); }
.conquistas li.ganhou .estrela { fill: #fff6d6; }
.medida-agora { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 6px; }
.medida-agora strong { font-family: var(--fonte-placar); font-size: 34px; font-weight: 800; }
.medida-agora span { color: var(--tinta-suave); font-weight: 600; }
.medida-agora span.desceu { color: var(--feito); }
.grafico { width: 100%; height: auto; display: block; margin: 4px 0 8px; }
.grafico polyline { fill: none; stroke: var(--acao); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.grafico circle { fill: var(--superficie); stroke: var(--acao); stroke-width: 2.5; }
.grafico circle.ultimo { fill: var(--acao); }

/* o corpo: músculo parado com um tom de pele mais fundo; o que o exercício trabalha em vermelho */
.figura { --pele: #e2a47c; --pele-fundo: #bf805c; --musculo: #c98760; --musculo-fundo: #a96a48; --ativo: #e8323c; --ativo-fundo: #b5202a; --top: #5b3df5; --top-fundo: #3a24b5; }
.figura .musculo { fill: var(--musculo); opacity: 0.55; }
.figura .musculo.fundo { fill: var(--musculo-fundo); }
.figura .musculo.ativo { fill: var(--ativo); opacity: 0.92; }
.figura .musculo.ativo.fundo { fill: var(--ativo-fundo); opacity: 0.85; }
.figura .top { fill: var(--top); }
.figura .top.fundo { fill: var(--top-fundo); }
.figura .orelha { fill: var(--musculo); }
.trabalha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 14px; font-weight: 700; color: var(--tinta-suave); }
.trabalha span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #fde4e5; color: #9b1b23; }
.trabalha span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e8323c; }

/* vídeo gravado em casa no lugar do desenho */
.palco.video { padding: 0; overflow: hidden; background: #000; }
.palco.video video { display: block; width: 100%; max-height: 40vh; object-fit: contain; }

.visualmente-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.campo select { display: block; width: 100%; min-height: 48px; margin-top: 6px; padding: 0 12px; border: 2px solid var(--linha); border-radius: var(--raio-p);
  background: var(--superficie); color: var(--tinta); font: inherit; }

/* entrada no teste fechado e conta */
.termo { margin: 4px 0 12px; padding-left: 20px; display: grid; gap: 8px; color: var(--tinta-suave); font-size: 15px; }
.convite { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.convite input { min-width: 0; font-size: 14px; }
.apagar { margin-top: 14px; }
.apagar summary { cursor: pointer; color: var(--perigo); font-weight: 700; }
.apagar input { display: block; width: 100%; margin: 8px 0; box-sizing: border-box; }
button.perigo { min-height: 48px; padding: 0 18px; border: 0; border-radius: var(--raio-p); background: var(--perigo); color: #fff; font-weight: 700; }

/* ---------- o Sistema: o único lugar com este visual (janelas de caçador, fantasia e anime) ---------- */
body.modo-sistema {
  --s-fundo: #040918; --s-painel: rgba(8, 22, 54, 0.86); --s-borda: #38b6ff; --s-brilho: #9be4ff;
  --s-texto: #e6f4ff; --s-suave: #93b4d6; --s-ouro: #ffd166; --s-ok: #5ef2c2; --s-perigo: #ff5a6e; --s-arcano: #8a5cff;
  --s-fonte: "Chakra Petch", "Bahnschrift", system-ui, sans-serif;
  --s-epica: "Cinzel", "Trajan Pro", Georgia, serif;
  background:
    radial-gradient(90% 45% at 50% -5%, rgba(64, 120, 255, 0.35), transparent 70%),
    radial-gradient(60% 40% at 100% 40%, rgba(138, 92, 255, 0.16), transparent 70%),
    radial-gradient(60% 40% at 0% 80%, rgba(56, 182, 255, 0.1), transparent 70%),
    linear-gradient(rgba(56, 182, 255, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(56, 182, 255, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
    var(--s-fundo);
  background-attachment: fixed;
  color: var(--s-texto); color-scheme: dark;
}
body.modo-sistema .abas { background: rgba(5, 12, 32, 0.94); border-top-color: rgba(56, 182, 255, 0.35); backdrop-filter: blur(8px); }
body.modo-sistema .aba { color: var(--s-suave); }
body.modo-sistema .aba[aria-current="page"] { color: var(--s-brilho); }
body.modo-sistema .aba[aria-current="page"] svg { background: rgba(56, 182, 255, 0.16); box-shadow: 0 0 14px rgba(56, 182, 255, 0.4); }
[data-rank] { --cor: #93b4d6; }
[data-rank="D"] { --cor: #5ef2c2; }
[data-rank="C"] { --cor: #38b6ff; }
[data-rank="B"] { --cor: #8c9bff; }
[data-rank="A"] { --cor: #d38bff; }
[data-rank="S"] { --cor: #ffd166; }

/* mana no ar */
.s-ceu { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.s-ceu i { position: absolute; bottom: -12px; width: var(--t); height: var(--t); border-radius: 50%; background: var(--s-brilho); box-shadow: 0 0 8px 2px rgba(56, 182, 255, 0.7); opacity: 0; animation: mana 11s linear infinite; }
@keyframes mana { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: 0.8; } 80% { opacity: 0.5; } 100% { transform: translate(18px, -105vh); opacity: 0; } }

.sistema { position: relative; z-index: 1; display: grid; gap: 22px; padding-top: 6px; }
.sistema p { margin: 0 0 8px; }
.s-cabeca { display: flex; align-items: center; gap: 12px; margin: 4px 0 0 !important; font: 700 14px/1 var(--s-epica); letter-spacing: 0.4em; text-transform: uppercase; color: var(--s-brilho); text-shadow: 0 0 12px var(--s-borda); }
.s-cabeca::before, .s-cabeca::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--s-borda), transparent); }

/* a janela do Sistema: borda acesa, cantos marcados e o título preso no alto */
.s-janela {
  position: relative; padding: 28px 18px 16px; border: 1px solid rgba(56, 182, 255, 0.75); border-radius: 4px;
  background: linear-gradient(180deg, rgba(56, 182, 255, 0.1), transparent 34%), var(--s-painel);
  box-shadow: 0 0 0 1px rgba(56, 182, 255, 0.12), 0 0 28px rgba(56, 182, 255, 0.2), inset 0 0 26px rgba(56, 182, 255, 0.08);
}
.s-janela::before, .s-janela::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--s-brilho); pointer-events: none; filter: drop-shadow(0 0 4px var(--s-borda)); }
.s-janela::before { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.s-janela::after { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }
.s-titulo {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); margin: 0; padding: 5px 16px; z-index: 2;
  font: 600 13px/1.2 var(--s-fonte); letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap;
  color: var(--s-brilho); background: linear-gradient(180deg, #0b2147, #06132e); border: 1px solid var(--s-borda); border-radius: 3px;
  text-shadow: 0 0 10px rgba(56, 182, 255, 0.85); box-shadow: 0 0 14px rgba(56, 182, 255, 0.35);
}
.s-suave { color: var(--s-suave); font-size: 14px; }
.s-missao-nome { font: 700 21px/1.2 var(--s-epica); letter-spacing: 0.02em; color: #fff; text-shadow: 0 0 14px rgba(56, 182, 255, 0.6); }

/* a carta do caçador */
.s-carta { --cor: #93b4d6; padding-top: 30px; }
.s-heroi-linha { display: grid; grid-template-columns: 116px 1fr; gap: 14px; align-items: center; margin-bottom: 14px; }
.s-heroi { position: relative; height: 210px; display: grid; place-items: end center; }
.s-heroi::before { content: ""; position: absolute; left: 50%; bottom: 6px; width: 132px; height: 190px; transform: translateX(-50%); border-radius: 50% 50% 46% 46%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--cor) 55%, transparent), transparent); filter: blur(6px); animation: aura 3.2s ease-in-out infinite; }
.s-heroi::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 110px; height: 18px; transform: translateX(-50%); border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--cor) 80%, white); box-shadow: 0 0 16px var(--cor), inset 0 0 10px var(--cor); }
@keyframes aura { 0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.06); } }
.s-heroi .figura { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--cor) 70%, transparent)); }
.s-heroi .figura .chao, .s-heroi .figura .sombra { display: none; }
.s-heroi .figura .musculo.ativo { fill: var(--musculo); opacity: 0.55; }
.s-nome { font: 700 24px/1.05 var(--s-fonte); margin: 0 0 4px !important; }
.s-classe { font: 700 17px/1.2 var(--s-epica); letter-spacing: 0.08em; margin: 0 0 2px !important;
  background: linear-gradient(90deg, var(--s-ouro), #fff1c4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.s-titulo-ativo { color: var(--s-suave); font-size: 14px; font-style: italic; }
.s-nivel-rank { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.s-nivel { display: grid; margin: 0 !important; line-height: 1; }
.s-nivel span { font: 600 12px/1 var(--s-fonte); letter-spacing: 0.2em; text-transform: uppercase; color: var(--s-suave); }
.s-nivel b { font: 800 52px/1 var(--s-epica); background: linear-gradient(180deg, #fff, var(--s-brilho) 60%, var(--s-borda)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 10px rgba(56, 182, 255, 0.55)); }

/* o emblema do rank: hexágono com anel girando */
.s-emblema { position: relative; width: 78px; height: 78px; display: grid; place-items: center; flex: none; }
.s-emblema.grande { width: 168px; height: 168px; margin: 8px auto 14px; }
.s-anel { position: absolute; inset: 0; width: 100%; height: 100%; animation: gira 14s linear infinite; }
.s-anel circle { fill: none; stroke: var(--cor); stroke-width: 1.2; opacity: 0.7; }
.s-anel circle:first-child { stroke-dasharray: 2 6; }
.s-anel circle:last-child { stroke-dasharray: 40 12 4 12; opacity: 0.45; }
@keyframes gira { to { transform: rotate(360deg); } }
.s-hexagono { position: relative; width: 62%; height: 70%; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, color-mix(in srgb, var(--cor) 90%, white), color-mix(in srgb, var(--cor) 40%, #040918)); }
.s-hexagono::before { content: ""; position: absolute; inset: 2px; clip-path: inherit; background: radial-gradient(circle at 50% 30%, #12285a, #040918 75%); }
.s-hexagono b { position: relative; font: 800 30px/1 var(--s-epica); color: var(--cor); text-shadow: 0 0 14px var(--cor); }
.s-emblema.grande .s-hexagono b { font-size: 72px; }

.s-xp { position: relative; height: 12px; border: 1px solid rgba(56, 182, 255, 0.55); border-radius: 2px; background: rgba(0, 0, 0, 0.4); overflow: hidden; }
.s-xp i { position: relative; display: block; height: 100%; min-width: 4px; background: linear-gradient(90deg, #1c6fe0, #38b6ff 60%, var(--s-brilho)); box-shadow: 0 0 14px var(--s-borda); overflow: hidden; }
.s-xp i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%); transform: translateX(-100%); animation: brilho 3s ease-in-out infinite; }
@keyframes brilho { 60%, 100% { transform: translateX(100%); } }
.s-xp-texto { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px !important; font-size: 13px; }
.s-atributos { list-style: none; margin: 14px 0 10px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.s-atributos li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 3px 8px; cursor: help; }
.s-atributos span { font: 600 13px/1.2 var(--s-fonte); letter-spacing: 0.08em; text-transform: uppercase; color: var(--s-suave); }
.s-atributos b { font: 700 24px/1 var(--s-fonte); text-shadow: 0 0 10px rgba(56, 182, 255, 0.5); }
.s-atributos i { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--s-borda), var(--s-brilho) calc(var(--v) * 1%), rgba(56, 182, 255, 0.14) 0); box-shadow: 0 0 6px rgba(56, 182, 255, 0.35); }

/* missões */
.s-chamado { animation: chama 3.2s ease-in-out infinite; }
@keyframes chama { 50% { box-shadow: 0 0 0 1px rgba(56, 182, 255, 0.3), 0 0 44px rgba(56, 182, 255, 0.42), inset 0 0 30px rgba(56, 182, 255, 0.14); } }
.s-emergencia { border-color: var(--s-perigo); background: repeating-linear-gradient(135deg, rgba(255, 90, 110, 0.07) 0 10px, transparent 10px 20px), var(--s-painel);
  box-shadow: 0 0 30px rgba(255, 90, 110, 0.28), inset 0 0 26px rgba(255, 90, 110, 0.1); }
.s-emergencia .s-titulo { color: #ffd0d6; border-color: var(--s-perigo); text-shadow: 0 0 10px var(--s-perigo); background: #2a0a17; }
.s-emergencia::before, .s-emergencia::after { border-color: var(--s-perigo); }
.s-emergencia .s-tarefas li::before { border-color: #ffb3bd; box-shadow: 0 0 6px var(--s-perigo); }
.s-tarefas { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 7px; }
.s-tarefas li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.s-tarefas li::before { content: ""; flex: none; width: 10px; height: 10px; border: 1.5px solid var(--s-brilho); transform: rotate(45deg); box-shadow: 0 0 6px var(--s-borda); }
.s-pares { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; }
.s-pares div { padding: 8px 10px; border: 1px solid rgba(56, 182, 255, 0.3); border-radius: 3px; background: rgba(0, 0, 0, 0.25); }
.s-pares dt { font-size: 12px; color: var(--s-suave); }
.s-pares dd { margin: 2px 0 0; font: 700 20px/1.1 var(--s-fonte); font-variant-numeric: tabular-nums; }
.s-cumprida { font: 700 22px/1.2 var(--s-epica); color: var(--s-ok); text-shadow: 0 0 14px rgba(94, 242, 194, 0.5); }
.s-pips { display: flex; gap: 6px; margin: 4px 0 10px; }
.s-pips i { flex: 1; height: 8px; border: 1px solid var(--s-borda); border-radius: 2px; }
.s-pips i.cheio { background: var(--s-borda); box-shadow: 0 0 10px var(--s-borda); }
.s-escudos { display: flex; gap: 6px; align-items: center; }
.s-escudo { width: 18px; height: 21px; background: rgba(56, 182, 255, 0.18); clip-path: polygon(50% 0, 100% 18%, 100% 55%, 50% 100%, 0 55%, 0 18%); }
.s-escudo.tem { background: var(--s-brilho); filter: drop-shadow(0 0 6px var(--s-borda)); }

/* o portal: um redemoinho de mana com o núcleo escuro */
.s-portal { --cor: #93b4d6; position: relative; width: 168px; height: 196px; margin: 12px auto 14px; }
.s-portal::before { content: ""; position: absolute; inset: -18px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--cor) 45%, transparent), rgba(138, 92, 255, 0.18) 60%, transparent); filter: blur(4px); }
.s-portal i { position: absolute; inset: 0; border-radius: 50%; }
.s-portal i:nth-child(1) {
  background: conic-gradient(from 0deg, transparent 0 8%, var(--cor) 22%, transparent 36%, var(--s-arcano) 55%, transparent 70%, var(--s-brilho) 86%, transparent);
  -webkit-mask: radial-gradient(closest-side, transparent 52%, #000 62%, #000 86%, transparent 100%); mask: radial-gradient(closest-side, transparent 52%, #000 62%, #000 86%, transparent 100%);
  filter: blur(1.5px); animation: gira 4.5s linear infinite;
}
.s-portal i:nth-child(2) {
  inset: 12px; background: repeating-conic-gradient(from 10deg, rgba(155, 228, 255, 0.6) 0 3deg, transparent 3deg 20deg);
  -webkit-mask: radial-gradient(closest-side, transparent 58%, #000 70%, transparent 100%); mask: radial-gradient(closest-side, transparent 58%, #000 70%, transparent 100%);
  animation: gira 9s linear infinite reverse;
}
.s-portal i:nth-child(3) {
  inset: 38px 40px; background: radial-gradient(circle at 50% 40%, #1b0b45 0%, #07021a 55%, #01030b 100%);
  box-shadow: 0 0 18px 5px color-mix(in srgb, var(--cor) 70%, transparent), 0 0 4px 1px #fff, inset 0 0 22px rgba(138, 92, 255, 0.6);
}
.s-portal-janela.fechado .s-portal { filter: grayscale(0.7) brightness(0.7); }
.s-portal.fechando { animation: fecha 1.8s 0.4s cubic-bezier(0.6, 0, 0.4, 1) forwards; }
@keyframes fecha { 70% { transform: scale(0.08); filter: brightness(3); } 100% { transform: scale(0); opacity: 0; } }
.s-palco-portal { position: relative; height: 222px; }
.s-palco-portal .s-portal { position: absolute; left: 50%; top: 0; margin: 12px 0 0 -84px; }
.s-selo { position: absolute; left: 50%; top: 50%; width: 120px; height: 132px; margin: -66px 0 0 -60px; display: grid; place-items: center;
  filter: drop-shadow(0 0 18px rgba(255, 209, 102, 0.7)); animation: selo 0.8s 1.7s cubic-bezier(0.2, 0.8, 0.2, 1.4) both; }
.s-selo .s-hexagono { width: 100%; height: 100%; }
.s-selo svg { position: relative; width: 56px; height: 56px; fill: none; stroke: var(--s-ouro); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--s-ouro)); }
@keyframes selo { from { opacity: 0; transform: scale(0.2) rotate(-30deg); } to { opacity: 1; transform: none; } }
.s-portal-nome { text-align: center; font: 700 24px/1.15 var(--s-epica); letter-spacing: 0.03em; color: #fff; text-shadow: 0 0 16px var(--s-arcano), 0 0 6px var(--s-borda); }
.s-portal-sub { text-align: center; color: var(--s-suave); font-size: 14px; }
.s-objetivos { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 10px; }
.s-objetivos li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: start; }
.s-objetivos p { margin: 0 0 5px !important; font-weight: 600; line-height: 1.3; }
.s-objetivos b { font: 700 15px/1.3 var(--s-fonte); color: var(--s-suave); }
.s-marca { width: 11px; height: 11px; margin: 4px 0 0 2px; border: 1.5px solid var(--s-brilho); transform: rotate(45deg); }
.s-objetivos li.feito .s-marca { background: var(--s-ok); border-color: var(--s-ok); box-shadow: 0 0 10px var(--s-ok); }
.s-objetivos li.feito b { color: var(--s-ok); }
.s-barrinha { display: block; height: 4px; border-radius: 2px; background: rgba(56, 182, 255, 0.14); overflow: hidden; }
.s-barrinha > i { display: block; height: 100%; background: linear-gradient(90deg, var(--s-borda), var(--s-brilho)); box-shadow: 0 0 8px var(--s-borda); }
.s-objetivos li.feito .s-barrinha > i { background: var(--s-ok); }
.s-chefe { border-color: rgba(138, 92, 255, 0.8); box-shadow: 0 0 28px rgba(138, 92, 255, 0.28), inset 0 0 26px rgba(138, 92, 255, 0.1); }
.s-chefe .s-titulo { border-color: var(--s-arcano); color: #e3d6ff; text-shadow: 0 0 10px var(--s-arcano); }
.s-chefe::before, .s-chefe::after { border-color: #c3a8ff; }

/* listas */
.s-habilidades, .s-titulos { list-style: none; margin: 0 0 10px; padding: 0; }
.s-habilidades li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(56, 182, 255, 0.16); }
.s-habilidades li > div { flex: 1; display: grid; gap: 6px; }
.s-habilidades li.fora { opacity: 0.5; }
.s-habilidades b { font: 700 15px/1.3 var(--s-fonte); color: var(--s-brilho); white-space: nowrap; }
.s-habilidades small { color: var(--s-suave); font-size: 12px; }
.s-titulos li { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px solid rgba(56, 182, 255, 0.16); }
.s-titulos b { font: 700 16px/1.3 var(--s-epica); color: var(--s-suave); letter-spacing: 0.04em; }
.s-titulos span { font-size: 14px; color: var(--s-suave); }
.s-titulos li.ganho b { color: var(--s-ouro); text-shadow: 0 0 10px rgba(255, 209, 102, 0.45); }
.s-titulos li.ganho span { color: var(--s-texto); }
.s-habilidades li:last-child, .s-titulos li:last-child { border-bottom: 0; }
.s-fontes { display: grid; margin: 0 0 10px; }
.s-fontes div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed rgba(56, 182, 255, 0.2); }
.s-fontes dd { margin: 0; font: 700 15px/1.3 var(--s-fonte); font-variant-numeric: tabular-nums; }
.s-botao {
  position: relative; display: block; width: 100%; min-height: 54px; margin-top: 8px; border: 1px solid var(--s-brilho); border-radius: 3px; overflow: hidden;
  background: linear-gradient(180deg, rgba(56, 182, 255, 0.3), rgba(56, 182, 255, 0.1)); color: #fff; font: 700 16px/1 var(--s-fonte); letter-spacing: 0.14em; text-transform: uppercase;
  box-shadow: 0 0 18px rgba(56, 182, 255, 0.4), inset 0 0 14px rgba(56, 182, 255, 0.25); text-shadow: 0 0 8px var(--s-borda); cursor: pointer;
}
.s-botao::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%); transform: translateX(-100%); animation: brilho 3.6s ease-in-out infinite; }
.s-botao:hover { background: linear-gradient(180deg, rgba(56, 182, 255, 0.42), rgba(56, 182, 255, 0.16)); }
.s-botao:focus-visible, .sistema .s-atributos li:focus-visible { outline: 2px solid var(--s-ouro); outline-offset: 3px; }
.s-lista { list-style: none; margin: 4px 0 12px; padding: 0; text-align: left; }
.s-lista li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(56, 182, 255, 0.2); }
.s-lista li:last-child { border-bottom: 0; }
.s-lista b { font: 700 17px/1.25 var(--s-fonte); }
.s-lista span { color: var(--s-brilho); font: 700 15px/1.2 var(--s-fonte); white-space: nowrap; }
.s-lista.titulos li { display: grid; gap: 2px; }
.s-lista.titulos b { font-family: var(--s-epica); color: var(--s-ouro); }
.s-lista.titulos span { color: var(--s-suave); font: 400 14px/1.35 var(--fonte); white-space: normal; }

/* as janelas de recompensa, uma por vez */
.s-avisos { min-height: calc(100vh - 40px); align-content: center; gap: 22px; }
.s-contador { text-align: center; font: 600 12px/1 var(--s-fonte); letter-spacing: 0.2em; text-transform: uppercase; color: var(--s-suave); }
.s-aviso { padding: 44px 20px 26px; text-align: center; animation: surge 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.s-aviso .s-titulo { font-size: 15px; }
.s-raios-caixa { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.s-epico > :not(.s-raios-caixa):not(.s-titulo) { position: relative; z-index: 1; }
.s-raios { position: absolute; left: 50%; top: 52%; width: 640px; height: 640px; margin: -320px 0 0 -320px; z-index: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(155, 228, 255, 0.16) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(closest-side, #000 20%, transparent); mask: radial-gradient(closest-side, #000 20%, transparent); animation: gira 18s linear infinite; }
.s-aviso[data-tipo="rank"] .s-raios { background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--s-ouro) 30%, transparent) 0 6deg, transparent 6deg 18deg); }
.s-grande { font: 700 54px/1 var(--s-fonte); color: var(--s-brilho); text-shadow: 0 0 22px var(--s-borda); margin: 6px 0 12px !important; }
.s-medio { font: 700 26px/1.15 var(--s-epica); margin: 4px 0 10px !important; }
.s-nivel-novo { display: grid; margin: 4px 0 8px !important; line-height: 1; }
.s-nivel-novo span { font: 600 14px/1 var(--s-fonte); letter-spacing: 0.3em; text-transform: uppercase; color: var(--s-suave); }
.s-nivel-novo b { font: 800 112px/1 var(--s-epica); background: linear-gradient(180deg, #fff, var(--s-brilho) 55%, var(--s-borda)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(56, 182, 255, 0.7)); animation: pulsa 0.7s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1.4) both; }
.s-aviso[data-tipo="titulo"] .s-titulo, .s-aviso[data-tipo="rank"] .s-titulo { color: var(--s-ouro); border-color: var(--s-ouro); text-shadow: 0 0 10px rgba(255, 209, 102, 0.7); }
.s-aviso[data-tipo="portal"] .s-portal { --cor: var(--s-arcano); }
@keyframes surge {
  from { opacity: 0; transform: scaleY(0.04); filter: brightness(2.4); }
  60% { opacity: 1; transform: scaleY(1.03); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes pulsa { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .s-ceu, .s-raios { display: none; }
  .s-selo { animation: none; }
  .s-portal.fechando { display: none; }
  .s-aviso, .s-chamado, .s-anel, .s-portal i, .s-portal.fechando, .s-heroi::before, .s-xp i::after, .s-botao::after, .s-nivel-novo b { animation: none; }
}
@media (max-width: 380px) {
  .s-atributos { grid-template-columns: 1fr; }
  .s-grande { font-size: 44px; }
  .s-heroi-linha { grid-template-columns: 96px 1fr; }
  .s-nivel b { font-size: 44px; }
}

/* o ranking de caçadores */
.s-placar { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 8px; }
.s-placar li { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid rgba(56, 182, 255, 0.25); border-radius: 3px; background: rgba(0, 0, 0, 0.22); }
.s-placar li.voce { border-color: var(--s-brilho); background: rgba(56, 182, 255, 0.12); box-shadow: 0 0 14px rgba(56, 182, 255, 0.3); }
.s-placar li.lider { border-color: var(--s-ouro); box-shadow: 0 0 16px rgba(255, 209, 102, 0.3); }
.s-pos { font: 800 22px/1 var(--s-epica); text-align: center; color: var(--s-suave); }
.s-placar li.lider .s-pos { color: var(--s-ouro); text-shadow: 0 0 10px rgba(255, 209, 102, 0.7); }
.s-quem { display: grid; gap: 2px; min-width: 0; }
.s-quem b { font: 700 16px/1.2 var(--s-fonte); overflow-wrap: anywhere; }
.s-quem small { color: var(--s-brilho); font-weight: 600; }
.s-quem span { font-size: 13px; color: var(--s-suave); }
.s-rank-mini { display: grid; place-items: center; width: 30px; height: 34px; font: 800 16px/1 var(--s-epica); color: #040918; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, color-mix(in srgb, var(--cor) 70%, white), var(--cor)); filter: drop-shadow(0 0 6px var(--cor)); }
.s-pts { font: 700 20px/1 var(--s-fonte); color: var(--s-brilho); font-variant-numeric: tabular-nums; text-shadow: 0 0 10px rgba(56, 182, 255, 0.5); }
.s-campeao { text-align: center; font: 600 15px/1.3 var(--s-fonte); color: var(--s-suave); }
.s-campeao b { font-family: var(--s-epica); color: var(--s-ouro); font-size: 18px; text-shadow: 0 0 10px rgba(255, 209, 102, 0.5); }

.opcional { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--tinta-suave); }
