/* FORJA. Dono: frente Forja. */
/* =====================================================================================
   FORJA 2.1: herói aberto sobre a cena da forja (sem caixa), anel de 21 rebites, lingote
   incandescente, moedas, tabuletas de vidro, martelada com faíscas, brasas dos 21 dias e
   diário em pergaminho. Tudo com prefixo ff- (nada daqui vaza para outras telas).
   ===================================================================================== */
@property --ff-f { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --ff-quente { syntax: '<color>'; inherits: true; initial-value: rgb(52, 44, 40); }
@property --ff-morno { syntax: '<color>'; inherits: true; initial-value: rgb(52, 44, 40); }
@property --ff-frio { syntax: '<color>'; inherits: true; initial-value: rgb(52, 44, 40); }
@property --ff-brilho { syntax: '<color>'; inherits: true; initial-value: rgba(0, 0, 0, 0); }

.ff { --ff-ouro: #ffd2a4; --ff-brasa: #ffb47c; --ff-fogo: #ff7b3e; padding-bottom: calc(var(--abas) + 44px); }
.ff .olho { color: var(--ff-brasa); }
.ff .olho svg { width: 13px; height: 13px; }
.ff .cab-s .titulo-s { text-shadow: 0 2px 16px rgba(0,0,0,.7); }

/* entrada em cascata (desliga quando a tela só se atualiza) */
.ff-e { animation: ffEntra .9s var(--mola) both; animation-delay: calc(var(--d, 0) * 90ms + 60ms); }
@keyframes ffEntra { from { opacity: 0; transform: translateY(18px) scale(.985); } }
.ff-titulo.ff-e { animation-name: ffEntraTitulo; animation-duration: 1.2s; }
@keyframes ffEntraTitulo { from { opacity: 0; transform: translateY(10px); letter-spacing: .04em; } }
.sem-entrada .ff-e { animation: none; }
/* partes fora da tela param as animações decorativas (bateria) */
.ff .fora *, .ff .fora *::before, .ff .fora *::after, .ff .fora::before { animation-play-state: paused !important; }

/* =====================================================================================
   HERÓI: sem caixa, direto na cena, com brasas subindo
   ===================================================================================== */
.ff-heroi { position: relative; margin: calc(-18px - var(--st)) -18px 0; padding: calc(var(--st) + 56px) 18px 4px; text-align: center; isolation: isolate; }
.ff-brasas { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% + 40px); z-index: -1; pointer-events: none; }
.ff-menu { position: absolute; top: calc(var(--st) + 12px); right: 14px; z-index: 2; }
.ff-titulo {
  margin: 10px 0 0; padding: 0 0 .06em; font: 500 68px/1.06 var(--serif); letter-spacing: -.03em;
  background: linear-gradient(180deg, #fff5e0 0%, #ffdcab 36%, #ffa45c 72%, #d9662c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 26px rgba(255,120,50,.42)) drop-shadow(0 3px 2px rgba(0,0,0,.55));
}
.ff-frase { max-width: 320px; margin: 8px auto 0; font: italic 400 17.5px/1.45 var(--serif); color: rgba(247,234,216,.86); text-wrap: balance; text-shadow: 0 2px 16px rgba(0,0,0,.9), 0 1px 2px rgba(0,0,0,.7); }

/* ---------- anel de 21 rebites ---------- */
.ff-anel { position: relative; width: min(68vw, 258px); aspect-ratio: 1; margin: 22px auto 0; }
.ff-anel::before { content: ''; position: absolute; inset: -8%; border-radius: 50%; z-index: -1; background: radial-gradient(circle, rgba(255,122,50,.36) 0%, rgba(255,96,36,.13) 46%, transparent 70%); animation: ffRespira 4.5s ease-in-out infinite alternate; }
@keyframes ffRespira { from { opacity: .7; transform: scale(.96); } to { opacity: 1; transform: scale(1.04); } }
.ff-anel-svg { position: absolute; inset: 0; }
.ff-anel-svg svg { width: 100%; height: 100%; overflow: visible; }
.ff-anel-meio {
  position: absolute; inset: 19.5%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 36%, rgba(44,22,12,.82), rgba(14,8,6,.72) 62%, rgba(14,8,6,.5));
  box-shadow: inset 0 0 0 1px rgba(255,196,140,.13), inset 0 10px 26px rgba(0,0,0,.7), 0 0 34px rgba(0,0,0,.4);
}
.ff-dia {
  margin: 10px 0 0; font: 500 84px/1 var(--serif); letter-spacing: -.045em; font-variant-numeric: lining-nums tabular-nums;
  background: linear-gradient(180deg, #fff7e4 0%, #ffd69e 46%, #ff9a52 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(255,130,60,.5));
}
.ff-dia.longo { font-size: 60px; }
.ff-anel-meio span { margin-top: 4px; font: 600 11px/1 var(--cinzel); letter-spacing: .24em; text-transform: uppercase; color: rgba(255,210,170,.64); }
/* rebites: ferro frio, brasa fraca, aceso e cinza */
.ff-anel .rv .corpo { fill: url(#ffRvFerro); stroke: rgba(0,0,0,.6); stroke-width: 1; }
.ff-anel .rv .luz { fill: rgba(255,255,255,.2); }
.ff-anel .rv.perdeu .corpo { fill: url(#ffRvCinza); opacity: .5; stroke: rgba(0,0,0,.7); }
.ff-anel .rv.perdeu .luz { opacity: 0; }
.ff-anel .rv.meio .corpo { fill: url(#ffRvBrasa); stroke: rgba(255,120,60,.35); }
.ff-anel .rv.ok .corpo { fill: url(#ffRvAceso); stroke: rgba(255,214,160,.7); }
.ff-anel .rv.ok .luz { fill: rgba(255,255,255,.85); }
.ff-anel .rv.nada .corpo { fill: url(#ffRvFerro); stroke: rgba(255,178,122,.75); stroke-width: 1.4; }
.ff-anel .hl { fill: #ff7b3e; opacity: .85; }
.ff-anel .hl.meio { fill: #c4461b; opacity: .5; }
.ff-anel .hl.nada { fill: #ffb27a; opacity: .3; }
.ff-anel .ff-elo { opacity: .8; }
.ff-anel .rv.hoje .pulso { fill: none; stroke: #ffc493; stroke-width: 1.6; transform-box: fill-box; transform-origin: center; animation: ffPulso 2.2s ease-out infinite; }
@keyframes ffPulso { 0% { transform: scale(.75); opacity: .95; } 100% { transform: scale(1.7); opacity: 0; } }
.ff-anel.anima .rv { transform-box: fill-box; transform-origin: center; animation: ffAcende .7s var(--mola-salto) both; animation-delay: calc(var(--i) * 38ms + 360ms); }
@keyframes ffAcende { from { opacity: 0; transform: scale(.2); } }
.ff-anel.anima .ff-halos, .ff-anel.anima .ff-elo { animation: ffSurge 1.1s ease 1.1s both; }
@keyframes ffSurge { from { opacity: 0; } }

/* ---------- nível: o lingote incandescente ---------- */
.ff-nivel { display: block; width: 100%; max-width: 336px; margin: 20px auto 0; padding: 8px 4px; text-align: center; border-radius: 18px; transition: transform .2s var(--mola); }
.ff-nivel:active { transform: scale(.985); }
.ff-nivel-nome { display: block; font: 600 13px/1.2 var(--cinzel); letter-spacing: .22em; text-transform: uppercase; color: var(--ff-ouro); text-shadow: 0 0 14px rgba(255,130,60,.5), 0 2px 8px rgba(0,0,0,.85); }
.ff-lingote {
  position: relative; display: block; height: 30px; margin: 14px 14px 0;
  transition: --ff-f 1.1s var(--mola), --ff-quente .8s ease, --ff-morno .8s ease, --ff-frio .8s ease, --ff-brilho .8s ease;
}
.ff-lingote.anima { animation: ffEnche 1.8s var(--mola) .6s backwards; }
@keyframes ffEnche { from { --ff-f: 0; --ff-brilho: rgba(0,0,0,0); } }
.ff-canal {
  position: absolute; inset: 0; display: block; padding: 4px; border-radius: 9px;
  background: linear-gradient(180deg, #0c0a09, #1f1a17 50%, #0b0908);
  box-shadow: inset 0 3px 7px rgba(0,0,0,.9), inset 0 -1px 0 rgba(255,255,255,.05), 0 0 0 1px rgba(255,255,255,.07), 0 0 0 4px #231d1a, 0 0 0 5px rgba(255,214,170,.12), 0 14px 24px -10px rgba(0,0,0,.95);
}
.ff-lingote::before, .ff-lingote::after { content: ''; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #948980, #3d3632 55%, #171311); box-shadow: 0 1px 2px rgba(0,0,0,.85); }
.ff-lingote::before { left: -14px; }
.ff-lingote::after { right: -14px; }
.ff-metal {
  position: relative; display: block; height: 100%; width: calc(var(--ff-f) * 100%); min-width: 8px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(90deg, var(--ff-frio), var(--ff-morno) 58%, var(--ff-quente));
  box-shadow: 0 0 12px var(--ff-brilho), 0 0 30px -2px var(--ff-brilho); animation: ffTreme 2.6s ease-in-out infinite;
}
.ff-metal::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.1) 38%, rgba(0,0,0,.04) 60%, rgba(0,0,0,.3)); mix-blend-mode: soft-light; }
.ff-fluxo { position: absolute; inset: 0; background-image: linear-gradient(100deg, transparent 32%, rgba(255,255,255,.36) 46%, transparent 60%); background-size: 44px 100%; mix-blend-mode: overlay; animation: ffFlui 1.9s linear infinite; }
@keyframes ffFlui { to { background-position: 44px 0; } }
.ff-menisco { position: absolute; top: -3px; bottom: -3px; right: -4px; width: 14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,252,240,.95), rgba(255,236,190,.5) 45%, transparent); animation: ffMenisco 1.4s ease-in-out infinite alternate; }
@keyframes ffMenisco { from { opacity: .5; transform: scaleY(.85); } to { opacity: 1; transform: scaleY(1.1); } }
@keyframes ffTreme { 0%, 100% { filter: brightness(1) saturate(1); } 45% { filter: brightness(1.15) saturate(1.12); } 72% { filter: brightness(.95); } }
.ff-calor { position: absolute; left: 6px; bottom: 45%; display: block; height: 44px; width: calc(var(--ff-f) * (100% - 12px)); border-radius: 50% 50% 0 0; background: radial-gradient(60% 100% at 50% 100%, var(--ff-brilho), transparent 72%); filter: blur(8px); transform-origin: 50% 100%; animation: ffAr 2.3s ease-in-out infinite alternate; pointer-events: none; z-index: -1; }
@keyframes ffAr { from { opacity: .45; transform: scaleY(.8); } to { opacity: .95; transform: scaleY(1.25) translateY(-2px); } }
.ff-lingote.sobe .ff-metal { animation: ffSobe .65s ease-out; }
@keyframes ffSobe { 40% { filter: brightness(2.1) saturate(.6); box-shadow: 0 0 30px rgba(255,240,210,.95), 0 0 64px rgba(255,180,90,.75); } }
.ff-xp { display: block; margin-top: 13px; font-size: 14px; color: var(--txt-2); text-shadow: 0 2px 10px rgba(0,0,0,.85); }
.ff-xp b { color: var(--ff-ouro); font-weight: 600; }

/* ---------- moedas (sequência, melhor, dias 100%) ---------- */
.ff-moedas { display: flex; justify-content: center; align-items: flex-start; gap: 26px; margin-top: 22px; }
.ff-moedas .rotulo-m { color: rgba(255,222,190,.74); text-shadow: 0 2px 8px rgba(0,0,0,.85); }

/* =====================================================================================
   MISSÕES: tabuletas de vidro + linhas com martelada
   ===================================================================================== */
.ff-secao.secao-aberta { margin-top: 56px; }
.ff .cab-s .acao { display: inline-flex; align-items: center; min-height: 44px; margin: 0 -6px -10px 0; padding: 0 6px 0 14px; }
.ff-conta { padding-bottom: 6px; font: 600 12px/1 var(--cinzel); letter-spacing: .14em; color: rgba(255,214,170,.72); white-space: nowrap; }
/* o carrossel rola de lado e por isso corta o que passa da borda: a sombra das tabuletas (e o brilho do bloco aceso)
   precisa de espaço dentro dele para sumir sozinha. As margens negativas devolvem o espaço: nada muda de lugar. */
.ff-tabs { position: relative; gap: 12px; padding-top: 26px; padding-bottom: 54px; margin-top: -16px; margin-bottom: -32px; }
.ff-tab {
  position: relative; width: 142px; min-height: 154px; padding: 14px; border-radius: 22px; text-align: left; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.02)), rgba(22,14,11,.5);
  border: 1px solid rgba(255,255,255,.11); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 14px 30px -14px rgba(0,0,0,.85);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: transform .4s var(--mola), border-color .3s, box-shadow .3s, background .3s;
}
.ff-tab.on {
  border-color: rgba(255,150,90,.62); transform: translateY(-3px);
  background: radial-gradient(120% 70% at 50% 118%, rgba(255,110,45,.45), transparent 66%), linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.03)), rgba(32,16,10,.58);
  box-shadow: inset 0 1px 0 rgba(255,222,186,.26), 0 0 0 1px rgba(255,140,80,.16), 0 20px 38px -14px rgba(255,100,40,.55);
}
.ff-tab.on::after { content: ''; position: absolute; left: 50%; bottom: -13px; width: 30px; height: 3px; margin-left: -15px; border-radius: 3px; background: linear-gradient(90deg, transparent, #ffb066, transparent); box-shadow: 0 0 10px rgba(255,140,70,.9); }
.ff-tab:active { transform: scale(.97); }
.ff-tab-topo { display: flex; align-items: center; justify-content: space-between; }
.ff-tab-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ff-brasa); background: rgba(255,123,62,.12); box-shadow: inset 0 0 0 1px rgba(255,150,90,.24); transition: background .3s, color .3s; }
.ff-tab-ico svg { width: 19px; height: 19px; }
.ff-tab-anel { position: relative; width: 40px; height: 40px; }
.ff-tab-anel svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ff-tab-anel .tr { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 3.5; }
.ff-tab-anel .ab-arco { fill: none; stroke: #ff8a48; stroke-width: 3.5; stroke-linecap: round; transition: stroke-dashoffset .7s var(--mola); filter: drop-shadow(0 0 4px rgba(255,123,62,.65)); }
.ff-tab-anel b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: -.01em; color: var(--txt-2); }
.ff-tab-anel.previa { border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255,150,90,.32); }
.ff-tab-anel.previa b { font: 500 18px/1 var(--serif); color: var(--ff-ouro); }
.ff-tab-nome { margin-top: auto; padding-top: 20px; font: 500 23px/1.08 var(--serif); letter-spacing: -.01em; color: var(--txt); }
.ff-tab small { margin-top: 4px; font-size: 12.5px; line-height: 1.32; color: var(--txt-3); }
.ff-tab.completo .ff-tab-ico { background: linear-gradient(180deg, #ffd690, #ff7b3e); color: #2a0f04; box-shadow: 0 0 14px rgba(255,123,62,.6); }
.ff-tab.completo .ff-tab-anel b { color: var(--ff-ouro); }
.ff-tab.forjou { animation: ffForjou 1s var(--mola); }
@keyframes ffForjou { 25% { box-shadow: 0 0 0 6px rgba(255,160,90,.32), 0 0 30px rgba(255,120,50,.8); transform: translateY(-3px) scale(1.05); } }

.ff-lista { position: relative; margin-top: 2px; overflow-anchor: none; }   /* fica por cima do pé do carrossel (toque e desenho) */
.ff-lista > * + * { border-top: 1px solid rgba(255,255,255,.075); }
.ff-m { position: relative; display: flex; align-items: center; gap: 13px; width: 100%; min-height: 84px; padding: 12px 0; text-align: left; }
.ff-m-ico { flex: none; align-self: flex-start; width: 22px; height: 22px; margin-top: 2px; color: rgba(255,180,124,.82); }
.ff-m-ico svg { width: 22px; height: 22px; }
.ff-m-txt { flex: 1; min-width: 0; }
.ff-m-txt b { display: block; font-size: 16.5px; font-weight: 500; line-height: 1.3; color: var(--txt); transition: color .3s; }
.ff-m-txt small { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.42; color: var(--txt-3); }
.ff-m.feita .ff-m-txt b { color: var(--txt-2); }
.ff-m.feita .ff-m-ico { color: var(--ff-fogo); }
.ff-golpe {
  position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: rgba(245,236,224,.8);
  background: radial-gradient(circle at 36% 28%, #4f4640, #28221f 58%, #141110);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), inset 0 -3px 6px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08), 0 10px 20px -10px rgba(0,0,0,.95);
  transition: transform .35s var(--mola-salto), background .3s, box-shadow .3s, color .3s;
}
.ff-golpe svg { position: absolute; width: 23px; height: 23px; transition: opacity .25s, transform .45s var(--mola); }
.ff-golpe svg + svg { opacity: 0; transform: scale(.4) rotate(-20deg); stroke-width: 2.6; }
.ff-m.feita .ff-golpe {
  color: #2a0e03; background: radial-gradient(circle at 40% 32%, #fff6dc 0%, #ffc468 30%, #ff7b3e 62%, #a9370f 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -3px 6px rgba(120,30,0,.45), 0 0 0 1px rgba(255,204,154,.5), 0 0 26px -2px rgba(255,123,62,.75);
}
.ff-m.feita .ff-golpe svg:first-child { opacity: 0; transform: rotate(-40deg) scale(.6); }
.ff-m.feita .ff-golpe svg + svg { opacity: 1; transform: none; }
.ff-m:active .ff-golpe { transform: scale(.86); }
.ff-m.bate .ff-golpe::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(255,196,128,.95); animation: ffOnda .6s ease-out forwards; pointer-events: none; }
@keyframes ffOnda { to { transform: scale(1.75); opacity: 0; } }
.ff-mais { position: absolute; right: 66px; top: 50%; margin-top: -12px; font: 800 19px/1 var(--sans); letter-spacing: -.01em; color: #ffe2b8; text-shadow: 0 0 14px rgba(255,123,62,1), 0 0 3px rgba(255,150,80,.9), 0 2px 3px rgba(0,0,0,.85); pointer-events: none; animation: ffMais 1.05s var(--mola) forwards; }
@keyframes ffMais { 0% { opacity: 0; transform: translate(10px, 8px) scale(.7); } 16% { opacity: 1; transform: translate(0, 0) scale(1.08); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-4px, -40px) scale(1); } }
.ff-lista.troca > * { animation: ffLinha .55s var(--mola) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes ffLinha { from { opacity: 0; transform: translateX(22px); } }
.ff-m-previa { min-height: 74px; }

/* placar: aparece por uns segundos depois de marcar uma missão e some (nunca fica parado em cima da lista).
   Não pega toque: o dedo passa direto para a missão que estiver embaixo. */
.ff-placar { position: fixed; left: 0; right: 0; bottom: calc(var(--abas) + 12px); z-index: 30; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; opacity: 0; transform: translateY(18px) scale(.94); transition: opacity .35s ease, transform .5s var(--mola); }
.ff-placar.mostra { opacity: 1; transform: none; }
.ff-pl {
  position: relative; overflow: hidden; pointer-events: none; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 15px 0 13px; border-radius: 99px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), rgba(24,14,10,.62); border: 1px solid rgba(255,140,80,.26);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,220,180,.14); font-size: 13.5px; font-weight: 600; transition: border-color .4s;
}
.ff-pl.aceso { border-color: rgba(255,150,90,.5); }
.ff-pl-ico { display: grid; place-items: center; color: var(--ff-brasa); }
.ff-pl-ico svg { width: 16px; height: 16px; }
.ff-pl-n { color: var(--txt-3); }
.ff-pl-n b { font-size: 15px; color: var(--txt); }
.ff-pl-sep { width: 1px; height: 16px; background: rgba(255,255,255,.14); }
.ff-pl-xp { color: #ffb066; }
.ff-pl-barra { position: absolute; left: 15px; right: 15px; bottom: 4px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.07); }
.ff-pl-barra i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff7b3e, #ffd29a); box-shadow: 0 0 8px rgba(255,123,62,.85); transition: width .55s var(--mola); }

/* =====================================================================================
   OS 21 DIAS: brasas
   ===================================================================================== */
.ff-carvoes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px 9px; padding: 6px 2px 0; }
.ff-carvao { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; font: 600 13px/1 var(--sans); color: var(--txt-4); }
.ff-carvao .forma, .ff-carvao .luz { position: absolute; display: block; border-radius: var(--forma, 50%); transform: rotate(var(--rot, 0deg)); transition: transform .3s var(--mola); }
.ff-carvao .forma { inset: 0; background: rgba(255,255,255,.025); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.ff-carvao .luz { inset: -8px; opacity: 0; background: radial-gradient(closest-side, rgba(255,118,46,.7), rgba(255,100,40,.18) 60%, transparent); }
.ff-carvao span { position: relative; font-variant-numeric: tabular-nums; }
.ff-carvao::before { content: ''; position: absolute; inset: -4px; }   /* área de toque de 46 px sem mudar o desenho */
/* textura de carvão: manchas escuras que mudam de lugar em cada brasa */
.ff-carvao.ok .forma::after, .ff-carvao.meio .forma::after, .ff-carvao.perdeu .forma::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .62; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.055' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .04 0 0 0 0 .02 0 0 0 7 -3.6'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23c)'/%3E%3C/svg%3E");
  background-size: 120px 120px; background-position: var(--mx, 0) var(--my, 0);
}
.ff-carvao.perdeu .forma::after { opacity: .4; }
.ff-carvao:active .forma { transform: rotate(var(--rot, 0deg)) scale(.88); }
.ff-carvao.ok { color: #2b0c03; font-weight: 700; }
.ff-carvao.ok .forma { background: radial-gradient(circle at 50% 58%, #fff2cb 0%, #ffb75e 20%, #f26a2c 46%, #9a2c0e 76%, #3e1207 100%); box-shadow: inset 0 -3px 6px rgba(40,8,0,.55), inset 0 2px 3px rgba(255,236,200,.45), 0 0 0 1px rgba(255,170,110,.35); }
.ff-carvao.ok .luz { opacity: 1; animation: ffTremula 2.6s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.37s); }
@keyframes ffTremula { 0% { opacity: .5; transform: rotate(var(--rot, 0deg)) scale(.9); } 55% { opacity: 1; } 100% { opacity: .72; transform: rotate(var(--rot, 0deg)) scale(1.06); } }
.ff-carvao.meio { color: #ffc6a2; }
.ff-carvao.meio .forma { background: radial-gradient(circle at 50% 60%, rgba(236,104,52,.85) 0%, #6a2210 44%, #261009 100%); box-shadow: inset 0 -2px 5px rgba(0,0,0,.55), 0 0 0 1px rgba(255,120,60,.2); }
.ff-carvao.meio .luz { opacity: .42; }
.ff-carvao.perdeu { color: rgba(255,255,255,.5); }
.ff-carvao.perdeu .forma { opacity: .72; background: radial-gradient(circle at 38% 32%, #7a746f 0%, #4d4945 46%, #2a2725 100%); box-shadow: inset 0 -2px 5px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.05); }
.ff-carvao.futuro .forma { background: rgba(255,255,255,.02); }
.ff-carvao.nada .forma { background: rgba(34,20,12,.55); }
.ff-carvao.hoje { color: var(--txt); }
.ff-carvao.hoje.ok { color: #2b0c03; }
.ff-carvao.hoje::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1.6px solid rgba(255,182,128,.9); box-shadow: 0 0 12px rgba(255,140,70,.5); animation: ffPulsaHoje 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes ffPulsaHoje { 0%, 100% { transform: scale(.96); opacity: .95; } 50% { transform: scale(1.08); opacity: .55; } }
.ff-legenda { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 20px; font-size: 12.5px; color: var(--txt-3); }
.ff-legenda span { display: inline-flex; align-items: center; gap: 7px; }
.ff-leg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.ff-leg.ok { background: radial-gradient(circle at 50% 58%, #fff1c8, #ffb35a 25%, #f26a2c 55%, #9a2c0e); box-shadow: 0 0 8px rgba(255,110,40,.75); }
.ff-leg.meio { background: radial-gradient(circle, rgba(236,104,52,.9), #5a1d0d 62%); }
.ff-leg.perdeu { background: radial-gradient(circle at 38% 32%, #7a746f, #3a3633); }

/* =====================================================================================
   DIÁRIO: páginas de pergaminho
   ===================================================================================== */
.ff-pergs { display: grid; gap: 14px; }
.ff-perg {
  position: relative; display: block; width: 100%; padding: 15px 18px 16px; text-align: left; border-radius: 3px 6px 4px 5px; color: #3d2c18;
  background: radial-gradient(130% 100% at 18% 0%, #e2cfa4 0%, #ceb584 52%, #b19260 100%);
  box-shadow: inset 0 0 28px rgba(105,66,22,.45), inset 0 0 2px rgba(80,50,15,.6), 0 16px 30px -14px rgba(0,0,0,.95);
  transform: rotate(-.6deg); transition: transform .3s var(--mola);
}
.ff-perg:nth-child(2n) { transform: rotate(.5deg); }
button.ff-perg:active { transform: scale(.985); }
.ff-perg::before {   /* grão do papel */
  content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: .4; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .12 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23p)'/%3E%3C/svg%3E");
}
.ff-perg > * { position: relative; }
.ff-perg-data { display: block; font: 600 10.5px/1.35 var(--cinzel); letter-spacing: .13em; text-transform: uppercase; color: #7a5a30; }
.ff-perg-tit { display: block; margin: 6px 0 0; font: italic 500 20px/1.25 var(--serif); color: #2a1a09; }
.ff-perg p { margin: 6px 0 0; font: 400 15.5px/1.5 var(--serif); color: #4b3820; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ff-perg-vazio { padding: 22px 22px 22px; text-align: center; transform: rotate(-.4deg); }
.ff-perg-vazio p { -webkit-line-clamp: 4; }
.ff-pena { display: grid; place-items: center; color: #86663a; margin-bottom: 4px; }
.ff-pena svg { width: 28px; height: 28px; }
.ff-escreve { margin-top: 20px; }
.ff-tela-diario .cab .olho { margin-bottom: 8px; }
.ff-tela-diario .ff-escreve { margin: 2px 0 22px; }
.ff-dlista { padding-bottom: 10px; }
.ff-tela-diario { padding-bottom: calc(var(--abas) + 40px); }

/* =====================================================================================
   INTRODUÇÃO (quem ainda não começou)
   ===================================================================================== */
/* herói da introdução: título em cima, a cena no meio (o escudo na bigorna), o botão embaixo */
.ff-intro { min-height: min(calc(100svh - var(--abas) + 6px), 800px); display: flex; flex-direction: column; justify-content: space-between; padding-top: calc(var(--st) + 48px); padding-bottom: 4px; }
.ff-intro .ff-titulo { font-size: 88px; margin-top: 10px; }
.ff-de21 { margin: -6px 0 0; font: italic 400 28px/1.1 var(--serif); color: #ffcf9e; text-shadow: 0 0 18px rgba(255,120,50,.45), 0 2px 10px rgba(0,0,0,.85); }
.ff-intro .ff-frase { margin-top: 14px; font-size: 18px; max-width: 300px; }
.ff-intro-baixo { display: flex; flex-direction: column; align-items: center; }
.ff-comeca { min-height: 58px; padding: 0 32px; font-size: 17.5px; }
.ff-final .ff-comeca { margin-top: 0; }
/* "Como funciona" abre uma folha que sobe: a seta aponta para cima, acima do rótulo */
.ff-desce { display: flex; flex-direction: column-reverse; align-items: center; gap: 5px; margin: 10px auto 0; min-height: 48px; padding: 6px 14px; font: 600 11px/1 var(--cinzel); letter-spacing: .2em; text-transform: uppercase; color: rgba(255,214,170,.7); }
.ff-desce svg { width: 18px; height: 18px; transform: rotate(180deg); animation: ffDesce 1.8s ease-in-out infinite; }
@keyframes ffDesce { 50% { transform: rotate(180deg) translateY(4px); } }
.ff-desce:active { opacity: .7; }
.ff-numeros { display: grid; grid-template-columns: repeat(3, 1fr); margin: 44px 0 0; text-align: center; }
.ff-numeros > div + div { border-left: 1px solid rgba(255,190,130,.16); }
.ff-numeros b { display: block; font: 500 56px/1 var(--serif); letter-spacing: -.03em; background: linear-gradient(180deg, #fff3dc, #ffc98a 50%, #ff8f4a); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 14px rgba(255,120,50,.4)); }
.ff-numeros span { display: block; margin-top: 9px; padding: 0 6px; font: 600 10.5px/1.4 var(--cinzel); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,214,170,.68); text-wrap: balance; }
.ff-citacao { margin: 48px 4px 0; text-align: center; }
.ff-citacao .estrela4 { margin: 0 auto 14px; }
.ff-citacao p { margin: 0; font: italic 400 19px/1.55 var(--serif); color: var(--txt-2); text-wrap: pretty; text-shadow: 0 2px 14px rgba(0,0,0,.8); }
.ff-regras { list-style: none; margin: 0; padding: 0; }
.ff-regras li { display: flex; gap: 14px; padding: 15px 2px; border-top: 1px solid rgba(255,255,255,.075); }
.ff-regras li:first-child { border-top: 0; padding-top: 2px; }
.ff-romano { flex: none; width: 36px; font: 600 16px/1.45 var(--cinzel); color: var(--ff-brasa); text-align: center; }
.ff-regras p { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--txt-2); }
.ff-intro-trilha { margin-top: 54px; }
.ff-intro-trilha > .olho { display: block; margin: 0 2px 12px; }
.ff-trilha { display: block; width: 100%; padding: 6px 2px; text-align: left; }
.ff-intro-trilha .ff-trilha-txt { text-align: center; margin-top: 16px; }
.ff-trilha-barras { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.ff-trilha-barras i { flex: 1; height: calc(30% + var(--i) * 3.3%); border-radius: 3px; background: var(--c); box-shadow: 0 0 12px -3px var(--c), inset 0 1px 0 rgba(255,255,255,.25); }
.ff-trilha-rot { display: flex; justify-content: space-between; margin-top: 10px; font: 600 10.5px/1 var(--cinzel); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,214,170,.72); }
.ff-trilha-txt { display: block; margin-top: 14px; font-size: 14.5px; line-height: 1.5; color: var(--txt-3); }
.ff-trilha-txt u { text-decoration: none; color: var(--ff-brasa); font-weight: 600; }
.ff-final { margin: 50px 0 0; text-align: center; }
.ff-final p { margin: 12px 0 0; font-size: 13.5px; color: var(--txt-3); }
.ff-erro { min-height: 60dvh; display: flex; flex-direction: column; justify-content: center; }

/* =====================================================================================
   FOLHAS DA FORJA
   ===================================================================================== */
.ff-folha { --ff-ouro: #ffd2a4; --ff-brasa: #ffb47c; --ff-fogo: #ff7b3e; }   /* as folhas moram fora da tela .ff */
.ff-folha .olho { color: var(--ff-brasa, #ffb47c); margin-top: 4px; }
.ff-folha .olho svg { width: 13px; height: 13px; }
.ff-vitoria { text-align: center; padding: 10px 0 2px; }
.ff-vitoria .olho { display: flex; justify-content: center; }
.ff-vit-moeda { display: flex; width: fit-content; margin: 2px auto 18px; animation: ffMedalha 1s var(--mola-salto) both; }
.ff-vit-moeda .disco { box-shadow: 0 16px 34px -12px rgba(0,0,0,.8), 0 0 0 1px rgba(255,200,170,.4), 0 0 60px -6px rgba(255,106,60,.75); }
@keyframes ffMedalha { from { opacity: 0; transform: scale(.3) rotate(-25deg); } }
.ff-vitoria h3 { margin-top: 8px; }
.ff-niveis { list-style: none; margin: 6px 0 0; padding: 0; }
.ff-niveis li { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 10px; border-radius: 14px; }
.ff-niveis li + li::before { content: ''; position: absolute; top: 0; left: 48px; right: 10px; height: 1px; background: rgba(255,255,255,.06); }
.ff-nv-cor { flex: none; width: 24px; height: 12px; border-radius: 4px; background: var(--c); box-shadow: 0 0 10px -2px var(--c), inset 0 1px 0 rgba(255,255,255,.25); }
.ff-nv-n { width: 20px; font-size: 13px; color: var(--txt-4); text-align: right; }
.ff-niveis b { flex: 1; font: 500 17px/1.2 var(--serif); color: var(--txt-3); }
.ff-nv-xp { font-size: 13px; color: var(--txt-4); }
.ff-niveis li.feito b { color: var(--txt-2); }
.ff-niveis li.feito .ff-nv-xp { color: var(--txt-3); }
.ff-niveis li.atual { background: radial-gradient(120% 140% at 0% 50%, rgba(255,123,62,.22), rgba(255,123,62,.05) 70%); box-shadow: inset 0 0 0 1px rgba(255,150,90,.32); }
.ff-niveis li.atual::before, .ff-niveis li.atual + li::before { display: none; }
.ff-niveis li.atual b { color: var(--ff-ouro, #ffd2a4); }
.ff-niveis li.atual .ff-nv-xp { color: var(--ff-brasa, #ffb47c); }
.ff-niveis li.atual::after { content: 'agora'; position: absolute; right: 10px; top: -8px; padding: 2px 8px; border-radius: 99px; font: 700 10px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #2a0f04; background: linear-gradient(180deg, #ffd690, #ff8a48); }
.ff-menu-lista { margin-top: 12px; }
/* folha "Como funciona" */
.ff-folha-como .f-sub { text-wrap: pretty; }
.ff-folha-como .ff-citacao { margin: 22px 2px 4px; }
.ff-folha-como .ff-citacao .estrela4 { margin-bottom: 10px; }
.ff-folha-como .ff-citacao p { font-size: 17.5px; line-height: 1.55; text-shadow: none; }
.ff-folha-rot { margin: 26px 2px 10px; font: 600 11px/1 var(--cinzel); letter-spacing: .16em; text-transform: uppercase; color: var(--ff-brasa, #ffb47c); }
.ff-folha-como .ff-regras li { padding: 12px 0; }
.ff-folha-como .ff-regras li:first-child { padding-top: 2px; }
.ff-folha-como .ff-regras p { font-size: 15px; }
.ff-folha-como .seg { margin: 2px 0 0; }
.ff-como-sub { margin: 12px 2px 0; font: italic 400 15.5px/1.4 var(--serif); color: var(--txt-3); }
.ff-como-lista { margin-top: 4px; }
.ff-como-lista .ff-m-previa { min-height: 0; padding: 12px 0; }
.ff-folha-como .f-bts { margin-top: 18px; }
.ff-humor-tit { margin: 0 0 10px; font: 600 11px/1 var(--cinzel); letter-spacing: .16em; text-transform: uppercase; color: var(--txt-3); }
.ff-humores { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ff-humor { min-height: 40px; padding: 0 15px; border-radius: 99px; font-size: 14.5px; font-weight: 500; color: var(--txt-2); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); transition: background .2s, border-color .2s, color .2s, transform .2s var(--mola); }
.ff-humor:active { transform: scale(.95); }
.ff-humor.on { color: var(--txt); background: rgba(255,123,62,.2); border-color: rgba(255,150,90,.6); box-shadow: 0 0 16px -6px rgba(255,123,62,.8); }
.ff-tit-entrada { margin-bottom: 10px; }
textarea.ff-papel { min-height: 210px; font: 400 18px/1.6 var(--serif); }
.f-painel .ff-perg-cheio { margin: 10px 0 4px; padding: 20px 20px 24px; transform: none; }
.f-painel .ff-perg-cheio .ff-perg-tit { margin: 8px 0 0; font: italic 500 25px/1.2 var(--serif); color: #2a1a09; }
.ff-perg-txt { margin-top: 12px; font: 400 17.5px/1.65 var(--serif); color: #3a2915; white-space: pre-wrap; overflow-wrap: anywhere; }

/* =====================================================================================
   EFEITOS POR CIMA (faíscas e clarão): criados no body pelo tela-forja.js
   ===================================================================================== */
.ff-faiscas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 39; pointer-events: none; }
.ff-clarao { position: fixed; inset: 0; z-index: 38; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(80% 60% at 50% 55%, rgba(255,204,150,.5), rgba(255,120,50,.22) 45%, transparent 75%); animation: ffClarao 1.1s ease-out forwards; }
@keyframes ffClarao { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }

@media (min-width: 560px) {
  .ff-heroi { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 370px) {
  .ff-titulo { font-size: 60px; }
  .ff-intro .ff-titulo { font-size: 74px; }
  .ff-dia { font-size: 76px; }
  .ff-moedas { gap: 20px; }
  .ff-tab { width: 134px; }
}
@media (prefers-reduced-transparency: reduce) {
  .ff-tab, .ff-pl { background: #1b1411; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
