@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }
@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #0f0e0d; --surface: #181614; --surface-2: #211e1b; --surface-3: #2a2622; --line: #2e2a26; --line-2: #3a3530;
  --text: #f3eee7; --muted: #a59d93; --dim: #6f685f;
  --ember: #ff6a2b; --ember-2: #ff8f4d; --ember-soft: rgba(255, 106, 43, .13); --ember-line: rgba(255, 106, 43, .35);
  --gold: #f2b640; --gold-soft: rgba(242, 182, 64, .14);
  --ok: #6fcf8e; --ok-soft: rgba(111, 207, 142, .13);
  --ice: #7cb8ff; --ice-soft: rgba(124, 184, 255, .13);
  --bad: #e5595b; --bad-soft: rgba(229, 89, 91, .13);
  --r: 16px; --r-sm: 10px;
  --display: 'Bricolage', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overscroll-behavior-y: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--ember-2); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 16px; height: 16px; } .ic.lg { width: 26px; height: 26px; } .ic.xl { width: 40px; height: 40px; }
.ic.cheio { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 6px; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; }
.tela { padding: 18px 16px calc(96px + var(--safe-b)); animation: entra .25s ease; }
.tela.sem-nav { padding-bottom: calc(32px + var(--safe-b)); }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } }

h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 700; line-height: 1.1; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .center { text-align: center; }
.sobre { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.linha { display: flex; align-items: center; gap: 10px; }
.entre { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pilha > * + * { margin-top: 12px; }
.secao { margin-top: 26px; }
.secao > .entre { margin-bottom: 10px; }

/* Cartões */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.destaque { background: linear-gradient(160deg, #221a14 0%, var(--surface) 60%); border-color: #3a2a1f; }
.card + .card { margin-top: 12px; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: 14px; font-weight: 600; font-size: 15px; background: var(--surface-2); border: 1px solid var(--line-2); transition: transform .08s, background .15s; }
.btn:active { transform: scale(.98); }
.btn.primario { background: var(--ember); border-color: var(--ember); color: #1a0d05; }
.btn.primario:disabled { background: var(--surface-3); border-color: var(--line-2); color: var(--dim); }
.btn.perigo { background: var(--bad-soft); border-color: rgba(229,89,91,.35); color: #ff9a9b; }
.btn.bloco { width: 100%; }
.btn.peq { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); }
.btn-ic:hover { background: var(--surface-2); color: var(--text); }
.link { color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* Campos */
.campo { display: block; }
.campo > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.input { width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); outline: none; font-size: 16px; }
textarea.input { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
.input:focus { border-color: var(--ember-line); box-shadow: 0 0 0 3px var(--ember-soft); }
.erro { color: #ff9a9b; font-size: 14px; min-height: 20px; }

/* Chips e opções */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.chip.on { background: var(--ember-soft); border-color: var(--ember-line); color: var(--text); }
.opcao { width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; gap: 12px; transition: border-color .15s, background .15s; }
.opcao + .opcao { margin-top: 10px; }
.opcao .t { font-weight: 600; } .opcao .s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.opcao.on { border-color: var(--ember-line); background: var(--ember-soft); }
.opcao .marca { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.opcao.on .marca { background: var(--ember); border-color: var(--ember); color: #1a0d05; }
.opcao .marca .ic { width: 14px; height: 14px; stroke-width: 3; opacity: 0; }
.opcao.on .marca .ic { opacity: 1; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.tag.ember { background: var(--ember-soft); color: var(--ember-2); } .tag.gold { background: var(--gold-soft); color: var(--gold); }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.ice { background: var(--ice-soft); color: var(--ice); } .tag.bad { background: var(--bad-soft); color: #ff9a9b; }

/* Barra de progresso */
.barra { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.barra > i { display: block; height: 100%; border-radius: inherit; background: var(--gold); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.barra.ember > i { background: linear-gradient(90deg, var(--ember), var(--ember-2)); }

/* Navegação inferior */
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 20;
  background: rgba(15, 14, 13, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 6px calc(6px + var(--safe-b)); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; color: var(--dim); text-decoration: none; font-size: 11px; font-weight: 600; border-radius: 12px; }
.nav a.on { color: var(--ember); }
.nav a .ic { width: 22px; height: 22px; }

/* Cabeçalho da Hoje */
.topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.ofensiva { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--ember-soft); border: 1px solid var(--ember-line); color: var(--ember-2); font-family: var(--display); font-weight: 700; font-size: 17px; }
.ofensiva.zero { background: var(--surface-2); border-color: var(--line-2); color: var(--dim); }
.ofensiva .ic { width: 20px; height: 20px; }
.ofensiva.pulsa .ic { animation: pulsa 1.2s ease 2; }
@keyframes pulsa { 50% { transform: scale(1.3); filter: drop-shadow(0 0 6px var(--ember)); } }

.hero { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.anel { position: relative; width: 112px; height: 112px; }
.anel svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anel .fundo { stroke: var(--surface-3); } .anel .frente { stroke: url(#grad-ember); transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.anel .meio { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.anel .meio b { font-family: var(--display); font-size: 36px; font-weight: 750; line-height: 1; }
.anel .meio small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.fases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; }
.fases i { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: block; }
.fases i > b { display: block; height: 100%; background: var(--ember); }
.nivel-linha { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.nivel-badge { width: 40px; height: 40px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-family: var(--display); font-weight: 750; font-size: 18px; flex: none; }

/* Avisos */
.aviso { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid; font-size: 14px; margin-top: 12px; }
.aviso .ic { margin-top: 1px; }
.aviso b { display: block; margin-bottom: 2px; }
.aviso.ice { background: var(--ice-soft); border-color: rgba(124,184,255,.3); color: #cfe3ff; } .aviso.ice .ic { color: var(--ice); }
.aviso.bad { background: var(--bad-soft); border-color: rgba(229,89,91,.3); color: #ffd0d0; } .aviso.bad .ic { color: var(--bad); }
.aviso.ok { background: var(--ok-soft); border-color: rgba(111,207,142,.3); color: #d5f5df; } .aviso.ok .ic { color: var(--ok); }
.aviso.gold { background: var(--gold-soft); border-color: rgba(242,182,64,.3); color: #fbe7bd; } .aviso.gold .ic { color: var(--gold); }

/* Cartão motivacional */
.cartao { position: relative; overflow: hidden; }
.cartao::after { content: '“'; position: absolute; right: 12px; top: -18px; font-family: var(--display); font-size: 120px; color: var(--surface-3); line-height: 1; pointer-events: none; }
.cartao p { font-family: var(--display); font-size: 18px; font-weight: 500; line-height: 1.35; margin: 8px 0 0; position: relative; z-index: 1; }

/* Missões */
.missao { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); position: relative; transition: border-color .2s, background .2s; }
.missao + .missao { margin-top: 10px; }
.missao .bola { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; transition: all .2s; }
.missao .bola .ic { width: 18px; height: 18px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: all .2s; color: #1a0d05; }
.missao.feito { background: linear-gradient(90deg, rgba(255,106,43,.08), var(--surface) 70%); border-color: #3b2a1f; }
.missao.feito .bola { background: var(--ember); border-color: var(--ember); }
.missao.feito .bola .ic { opacity: 1; transform: none; }
.missao.feito .titulo { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--dim); }
.missao .corpo { flex: 1; min-width: 0; }
.missao .titulo { font-weight: 600; }
.missao .gat { font-size: 13px; color: var(--dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.missao .xp { font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--gold); flex: none; }
.missao .area-ic { color: var(--dim); }
.missao.pop .bola { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.25); } }
.flutua { position: fixed; z-index: 60; pointer-events: none; font-family: var(--display); font-weight: 800; color: var(--gold); font-size: 18px; animation: sobe 1s ease forwards; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
@keyframes sobe { to { transform: translateY(-48px); opacity: 0; } }

.dia-ok { text-align: center; padding: 22px 16px; }
.dia-ok .medalha { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: var(--ember-soft); color: var(--ember); display: grid; place-items: center; }

/* Mapa */
.mapa { display: grid; grid-template-columns: repeat(11, 1fr); gap: 5px; }
.mapa i { aspect-ratio: 1; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; font-style: normal; font-size: 9px; color: var(--dim); font-weight: 600; position: relative; }
.mapa i.cumprido { background: var(--ember); color: #1a0d05; }
.mapa i.escudo { background: var(--ice-soft); box-shadow: inset 0 0 0 1.5px var(--ice); color: var(--ice); }
.mapa i.perdido { background: var(--bad-soft); color: #ff9a9b; }
.mapa i.folga { background: repeating-linear-gradient(45deg, var(--surface-2) 0 3px, var(--surface-3) 3px 6px); }
.mapa i.hoje { box-shadow: inset 0 0 0 2px var(--text); color: var(--text); }
.mapa i.hoje.cumprido { box-shadow: inset 0 0 0 2px #fff; }
.mapa i.marco::after { content: ''; position: absolute; top: -2px; right: -2px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); border: 2px solid var(--surface); }
.legenda { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat b { display: block; font-family: var(--display); font-size: 26px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }

.lista-linha { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.lista-linha + .lista-linha { border-top: 1px solid var(--line); }
.area-ic-box { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); flex: none; }

.marcos { position: relative; padding-left: 22px; }
.marcos::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--surface-3); }
.marcos > div { position: relative; padding: 6px 0 12px; }
.marcos > div::before { content: ''; position: absolute; left: -20px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--bg); }
.marcos > div.feito::before { background: var(--gold); }

/* Ferramentas */
.ferr { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; }
.ferr .area-ic-box { width: 48px; height: 48px; border-radius: 14px; background: var(--ember-soft); color: var(--ember); }
.relogio { position: relative; width: 260px; height: 260px; margin: 28px auto 20px; }
.relogio svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.relogio .meio { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.relogio .meio b { font-family: var(--display); font-size: 56px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.relogio .frente { stroke: var(--ember); transition: stroke-dashoffset 1s linear; }
.relogio.pausa-fase .frente { stroke: var(--ice); }
.controles { display: flex; justify-content: center; gap: 14px; }
.controles .grande { width: 72px; height: 72px; border-radius: 50%; background: var(--ember); color: #1a0d05; display: grid; place-items: center; }
.controles .grande .ic { width: 30px; height: 30px; fill: currentColor; stroke: none; }
.controles .lado { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; align-self: center; }
.bolha-wrap { height: 300px; display: grid; place-items: center; margin: 16px 0; }
.bolha { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffb07a, var(--ember) 55%, #c4421a); box-shadow: 0 0 60px rgba(255,106,43,.35); transition-property: transform; transition-timing-function: ease-in-out; }
.bolha-txt { font-family: var(--display); font-size: 24px; font-weight: 600; text-align: center; min-height: 32px; }

/* Questionário */
.passos { display: flex; gap: 4px; margin: 4px 0 22px; }
.passos i { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-3); }
.passos i.on { background: var(--ember); }
.pergunta { font-family: var(--display); font-size: 24px; font-weight: 650; line-height: 1.2; margin: 0 0 6px; }
.rodape-fixo { position: sticky; bottom: 0; padding: 14px 0 calc(8px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 28%); margin-top: 18px; display: flex; gap: 10px; }
.nota-area { padding: 12px 0; } .nota-area + .nota-area { border-top: 1px solid var(--line); }
.notas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.notas button { height: 40px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 600; color: var(--muted); }
.notas button.on { background: var(--ember); border-color: var(--ember); color: #1a0d05; }
.escala { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 4px; }
.radar { display: block; margin: 0 auto; }
.modo-card { padding: 18px; }
.modo-card ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.modo-card ul li + li { margin-top: 4px; }

/* Login */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px; }
.marca { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; }
.marca-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--ember); display: grid; place-items: center; color: #1a0d05; }

/* Modal */
.fundo-modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto; background: var(--surface); border-top: 1px solid var(--line-2); border-radius: 22px 22px 0 0; padding: 20px 16px calc(20px + var(--safe-b)); animation: sobeModal .28s cubic-bezier(.2,.8,.2,1); }
@keyframes sobeModal { from { transform: translateY(40px); opacity: .4; } }
.modal .alca { width: 40px; height: 4px; border-radius: 9px; background: var(--line-2); margin: -6px auto 14px; }
.dias-sem { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dias-sem button { height: 40px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 600; color: var(--muted); }
.dias-sem button.on { background: var(--ember-soft); border-color: var(--ember-line); color: var(--text); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; }
.seg button { height: 38px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }

.celebra { text-align: center; padding: 10px 0 4px; }
.celebra .grande-ic { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); animation: pop .5s ease; }
.celebra .grande-ic .ic { width: 42px; height: 42px; }

.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); z-index: 70; background: var(--surface-3); border: 1px solid var(--line-2); padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: fade .2s; max-width: calc(100% - 32px); }
.carregando { min-height: 100dvh; display: grid; place-items: center; color: var(--dim); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
