/* Sapatinhos com Amor. Um caderno de ateliê: papel quente, serifa macia e o fio como fio condutor. */
@font-face { font-family: 'Fraunces'; src: url('assets/fonts/fraunces-latin.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('assets/fonts/fraunces-italic-latin.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('assets/fonts/dm-sans-latin.woff2') format('woff2'); font-weight: 100 1000; font-style: normal; font-display: swap; }

:root {
  --escala: 1;
  --papel: #FBF5EE;
  --cartao: #FFFDFA;
  --tinta: #3B2A26;
  --tinta-2: #68534C;
  --rosa: #A5505D;
  --rosa-e: #86394A;
  --rosa-c: #F6E4E2;
  --salva: #5F7154;
  --salva-c: #E8EEE1;
  --areia: #E9D9C3;
  --linha: #EEDFD0;
  --sombra: 0 1px 2px rgba(92, 63, 57, .05), 0 8px 24px rgba(92, 63, 57, .07);
  --serifa: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --nav: 74px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { font-size: calc(18px * var(--escala)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papel); color: var(--tinta);
  font-family: var(--sans); line-height: 1.55;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.com-folha { overflow: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--rosa); outline-offset: 2px; border-radius: 8px; }
main:focus { outline: none; }
.ic { width: 1.35em; height: 1.35em; flex: none; }

#app, #entrada { max-width: 560px; margin: 0 auto; }
#vista { padding-bottom: calc(var(--nav) + 2rem + env(safe-area-inset-bottom)); min-height: 100vh; }

/* ---------- Entrada ---------- */
#entrada {
  position: fixed; top: 0; bottom: 0; left: 0; right: 0; max-width: none; z-index: 40;
  background: radial-gradient(120% 70% at 50% 8%, #FFF9F2 0%, var(--papel) 55%, #F6EADD 100%);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  transition: opacity .4s ease, transform .4s ease;
}
#entrada.sai { opacity: 0; transform: scale(1.02); pointer-events: none; }
.ent-fundo { position: absolute; top: 0; bottom: 0; left: 0; right: 0; pointer-events: none; }
.bola { position: absolute; display: block; border: 2px solid #EFD7CF; border-radius: 50%; }
.b1 { width: 76px; height: 76px; left: 7%; top: 8%; }
.b2 { width: 44px; height: 44px; right: 11%; top: 13%; }
.b3 { width: 54px; height: 54px; right: 26%; bottom: 3%; }
.raminho { position: absolute; width: 50px; opacity: .85; }
.r1 { left: 9%; top: 15%; }
.r2 { right: 7%; bottom: 3%; transform: rotate(146deg); }
.ent-in { position: relative; width: 100%; max-width: 420px; padding: 24px 28px; text-align: center; }
.fio { width: 100%; max-width: 320px; display: block; margin: 0 auto 14px; }
.tr { fill: none; stroke: var(--rosa); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.t1 { stroke-dasharray: 1 2; stroke-dashoffset: 1.02; animation: desenha 1.9s .15s cubic-bezier(.45, 0, .2, 1) forwards; }
.t2 { stroke-dasharray: 1 2; stroke-dashoffset: 1.02; stroke: #C98790; animation: desenha .8s 1.6s ease-out forwards; }
.t3 { stroke: #C98790; stroke-width: 2.6; opacity: 0; animation: surge .5s 2.1s forwards; }
@keyframes desenha { to { stroke-dashoffset: 0; } }
@keyframes surge { to { opacity: 1; } }
.ent-in h1 { font-family: var(--serifa); font-weight: 500; font-size: 2.45rem; line-height: 1.05; letter-spacing: -.015em; animation: sobe .7s .35s both; }
.lema { font-family: var(--serifa); font-style: italic; color: var(--salva); }
.ent-in .lema { margin: .55rem 0 1.9rem; font-size: 1.12rem; animation: sobe .7s .5s both; }
.ent-nota { margin-top: .9rem; font-size: .86rem; color: var(--tinta-2); }
@keyframes sobe { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Botões ---------- */
.bt {
  display: flex; align-items: center; justify-content: center; gap: .5em; width: 100%;
  min-height: 3.2rem; padding: .7rem 1.2rem; border-radius: 16px; font-weight: 600; text-align: center;
  transition: transform .12s ease, background-color .15s ease;
}
.bt:active { transform: scale(.98); }
.bt-p { background: var(--rosa); color: #fff; box-shadow: 0 6px 18px rgba(165, 80, 93, .28); }
.bt-p:hover { background: var(--rosa-e); }
.bt-s { background: var(--rosa-c); color: var(--rosa-e); }
.bt-s.feita { background: var(--salva-c); color: var(--salva); }
.bt-g { min-height: 3.7rem; font-size: 1.2rem; border-radius: 18px; }
.bt-m { min-height: 2.9rem; width: auto; display: inline-flex; }
.txt { color: var(--rosa-e); font-weight: 600; min-height: 2.6rem; }
.redondo {
  width: 2.7rem; height: 2.7rem; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--cartao); border: 1px solid var(--linha);
}
.letra { font-family: var(--serifa); font-weight: 600; font-size: 1.02rem; }

/* ---------- Topo ---------- */
.topo { display: flex; align-items: center; gap: .7rem; padding: calc(.8rem + env(safe-area-inset-top)) 1rem .6rem; }
.topo-t { flex: 1; font-family: var(--serifa); font-weight: 500; font-size: 1.45rem; line-height: 1.15; min-width: 0; }
.topo-marca { flex: 1; font-family: var(--serifa); font-style: italic; color: var(--salva); font-size: 1rem; }
.topo .letra { margin-left: auto; }
.olho { font-size: .76rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--rosa-e); }

/* ---------- Início ---------- */
.ola { padding: .5rem 1.1rem 1.1rem; }
.ola h1 { font-family: var(--serifa); font-weight: 500; font-size: 2.05rem; line-height: 1.08; letter-spacing: -.015em; margin-bottom: .6rem; }
.ola p { color: var(--tinta-2); }
.continua {
  position: relative; display: flex; margin: 0 1rem; border-radius: 22px; overflow: hidden; min-height: 9rem;
  background: var(--f, var(--rosa-c)); border: 1px solid rgba(92, 63, 57, .07);
}
.continua.aula { background: linear-gradient(135deg, #F8E7E3 0%, #F3D9D6 100%); }
.cont-tx { flex: 1; min-width: 0; padding: 1.05rem 1.1rem; position: relative; z-index: 1; }
.cont-tx h2 { font-family: var(--serifa); font-weight: 500; font-size: 1.42rem; line-height: 1.12; margin: .3rem 0 .25rem; }
.cont-tx p:not(.olho) { color: var(--tinta-2); font-size: .94rem; }
.cont-tx .bt { margin-top: .8rem; }
.cont-tx .cadeia { margin-top: .7rem; }
.cont-il { width: 44%; align-self: center; margin-right: -.5rem; }
.bloco { padding: 1.7rem 1rem 0; }
.bloco-c { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; padding-top: 1.1rem; border-top: 2px dashed var(--areia); }
.bloco-c h2 { font-family: var(--serifa); font-weight: 500; font-size: 1.38rem; line-height: 1.15; }
.contagem { color: var(--tinta-2); font-size: .88rem; white-space: nowrap; }
.ver { color: var(--rosa-e); font-weight: 600; font-size: .92rem; border-bottom: 1.5px solid currentColor; }

.percurso { list-style: none; margin-top: .9rem; position: relative; }
.percurso li { display: flex; align-items: flex-start; gap: .85rem; position: relative; padding-bottom: 1rem; }
.percurso li:not(:last-child)::before {
  content: ''; position: absolute; left: calc(1.15rem - 1px); top: 2.3rem; bottom: 0; width: 0;
  border-left: 2.5px dashed #E2C9BD;
}
.percurso li.ok:not(:last-child)::before { border-left-color: var(--salva); border-left-style: solid; }
.no {
  width: 2.3rem; height: 2.3rem; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--cartao); border: 2px solid #E2C9BD; font-family: var(--serifa); font-weight: 600; color: var(--rosa-e);
}
.percurso li.ok .no { background: var(--salva); border-color: var(--salva); color: #fff; }
.percurso a { flex: 1; padding-top: .28rem; font-size: .98rem; line-height: 1.35; }
.percurso li.ok a { color: var(--tinta-2); }
.percurso .termo { pointer-events: none; border-bottom: 0; }

.fila { display: flex; gap: .7rem; overflow-x: auto; margin: 0 -1rem; padding: .2rem 1rem .9rem; scroll-snap-type: x proximity; scrollbar-width: none; }
.fila::-webkit-scrollbar { display: none; }
.col { flex: 0 0 9.2rem; scroll-snap-align: start; border-radius: 18px; padding: .6rem .8rem .8rem; background: var(--f); border: 1px solid rgba(92, 63, 57, .06); display: flex; flex-direction: column; }
.col b { font-family: var(--serifa); font-weight: 500; font-size: 1.02rem; line-height: 1.15; }
.col small { color: var(--tinta-2); font-size: .8rem; margin-top: .15rem; }
.ilu { display: block; width: 100%; height: auto; }

.liga {
  display: flex; align-items: center; gap: .7rem; min-height: 3.2rem; padding: .7rem .95rem; margin-top: .7rem;
  border-radius: 14px; background: var(--cartao); border: 1px solid var(--linha); font-weight: 600; line-height: 1.3;
}
.liga span { flex: 1; }
.liga .ic:last-child { width: 1.05em; height: 1.05em; color: var(--rosa); }
.liga.suave { background: transparent; border: 0; border-bottom: 1.5px dashed var(--areia); border-radius: 0; padding: .6rem .1rem; min-height: 2.9rem; color: var(--rosa-e); }
.liga.ext { font-weight: 500; font-size: .94rem; }
.liga.destaque { margin: 1.4rem 1rem 0; background: var(--salva-c); border-color: #D5DFCA; }
.guardar { display: flex; gap: .85rem; margin: 1.5rem 1rem 0; padding: 1rem; border-radius: 18px; background: var(--cartao); border: 1px solid var(--linha); }
.guardar > .ic { color: var(--rosa); width: 1.7em; height: 1.7em; margin-top: .1rem; }
.guardar p { color: var(--tinta-2); font-size: .94rem; margin-top: .15rem; }
.guardar-bts { display: flex; align-items: center; gap: 1rem; margin-top: .7rem; flex-wrap: wrap; }
.rod { text-align: center; padding: 2.2rem 1rem .4rem; color: var(--tinta-2); font-size: .86rem; }

/* ---------- Progresso em cadeia ---------- */
.cadeia, .cadeia span {
  display: block; height: 14px;
  background-repeat: repeat-x; background-size: 20px 14px;
}
.cadeia { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14'%3E%3Cellipse cx='10' cy='7' rx='8.4' ry='4.6' fill='none' stroke='%23DFCDBB' stroke-width='2'/%3E%3C/svg%3E"); }
.cadeia span { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14'%3E%3Cellipse cx='10' cy='7' rx='8.4' ry='4.6' fill='none' stroke='%23A5505D' stroke-width='2.4'/%3E%3C/svg%3E"); transition: width .35s ease; }

/* ---------- Aulas ---------- */
.player {
  position: relative; margin: 0 1rem; border-radius: 20px; overflow: hidden; padding-top: 62%;
  background: #E6D5CC center / cover no-repeat; box-shadow: var(--sombra);
}
.player.livre { padding-top: 0; }
.player iframe, .player video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; background: #000; }
.tocar {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(59, 42, 38, 0) 40%, rgba(59, 42, 38, .32) 100%);
}
.tocar .ic { width: 4.6rem; height: 4.6rem; color: #fff; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .4)); stroke-width: 1.4; }
.aula-info { padding: 1rem 1.1rem 0; }
.aula-info h2 { font-family: var(--serifa); font-weight: 500; font-size: 1.5rem; line-height: 1.14; margin: .2rem 0 .4rem; }
.aula-info > p:not(.olho) { color: var(--tinta-2); margin-bottom: .9rem; }
.aulas { display: flex; flex-direction: column; gap: .55rem; }
.aula-li { display: flex; align-items: center; gap: .8rem; padding: .8rem .85rem; border-radius: 16px; background: var(--cartao); border: 1px solid var(--linha); min-height: 3.6rem; }
.aula-li.atual { border-color: var(--rosa); box-shadow: inset 0 0 0 1px var(--rosa); }
.aula-n { width: 2.2rem; height: 2.2rem; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--rosa-c); color: var(--rosa-e); font-family: var(--serifa); font-weight: 600; }
.aula-t { flex: 1; min-width: 0; line-height: 1.28; }
.aula-t b { display: block; font-weight: 600; }
.aula-t small { display: block; color: var(--tinta-2); font-size: .84rem; margin-top: .12rem; }
.aula-li.fechada { background: transparent; border-style: dashed; border-color: #E2CFBE; }
.aula-li.fechada .aula-n { background: #F2E8DC; color: var(--tinta-2); }
.aula-li.fechada .aula-t b { color: var(--tinta-2); }
.breve { flex: none; font-size: .74rem; font-weight: 700; padding: .25em .6em; border-radius: 99px; background: #F2E8DC; color: var(--tinta-2); white-space: nowrap; }
.nota-peq { font-size: .86rem; color: var(--tinta-2); margin-top: .9rem; }

/* ---------- Modelos ---------- */
.pag { padding: .2rem 1rem 0; }
.intro { color: var(--tinta-2); margin-bottom: .95rem; }
.busca { display: flex; align-items: center; gap: .6rem; padding: 0 .95rem; min-height: 3.15rem; border-radius: 14px; background: var(--cartao); border: 1px solid var(--linha); }
.busca .ic { color: var(--tinta-2); }
.busca input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; height: 3rem; }
.busca:focus-within { border-color: var(--rosa); box-shadow: 0 0 0 2px rgba(165, 80, 93, .2); }
.chips { display: flex; gap: .45rem; overflow-x: auto; margin: .75rem -1rem 1rem; padding: 0 1rem .15rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: .35em; min-height: 2.5rem; padding: 0 .9rem; border-radius: 99px; background: var(--cartao); border: 1px solid var(--linha); font-size: .92rem; font-weight: 500; white-space: nowrap; }
.chip .ic { width: 1em; height: 1em; color: var(--rosa); }
.chip.on { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.chip.on .ic { color: #fff; }
.cols { display: flex; flex-direction: column; gap: .65rem; }
.col-l { display: flex; align-items: center; min-height: 6.4rem; border-radius: 18px; background: var(--f); border: 1px solid rgba(92, 63, 57, .06); overflow: hidden; }
.col-t { flex: 1; min-width: 0; padding: .7rem 1rem; }
.col-t small { display: block; color: var(--tinta-2); font-size: .82rem; }
.col-t b { display: block; font-family: var(--serifa); font-weight: 500; font-size: 1.28rem; line-height: 1.14; margin: .1rem 0; }
.col-l .col-il { width: 42%; flex: none; padding-right: .4rem; }
.achados { color: var(--tinta-2); font-size: .9rem; margin-bottom: .6rem; }
.grelha { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem .7rem; }
.cm { display: flex; flex-direction: column; min-width: 0; }
.cm-il { position: relative; display: block; background: var(--f); border-radius: 16px; padding: 1.2rem .35rem .4rem; border: 1px solid rgba(92, 63, 57, .06); margin-bottom: .45rem; }
.cm-n { position: absolute; left: .6rem; top: .3rem; font-family: var(--serifa); font-size: .95rem; color: var(--tinta-2); }
.cm-fav { position: absolute; right: .5rem; top: .35rem; color: var(--rosa); }
.cm-fav .ic { width: 1.05em; height: 1.05em; }
.cm-nome { font-family: var(--serifa); font-weight: 500; font-size: 1.02rem; line-height: 1.16; }
.cm-niv { color: var(--tinta-2); font-size: .82rem; margin-top: .1rem; }
.cm .cadeia { margin-top: .35rem; }
.vazio { padding: 2rem 1rem; text-align: center; color: var(--tinta-2); }

/* ---------- Receita ---------- */
.em-receita #nav { display: none; }
.em-receita #vista { padding-bottom: calc(6.4rem + env(safe-area-inset-bottom)); }
.m-hero { position: relative; background: var(--f); padding: calc(.8rem + env(safe-area-inset-top)) 1rem .55rem; overflow: hidden; border-radius: 0 0 26px 26px; }
.m-barra { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; }
.m-acoes { display: flex; gap: .45rem; }
.fav.on { color: var(--rosa); }
.m-num { position: absolute; right: .6rem; top: 3.1rem; font-family: var(--serifa); font-weight: 300; font-size: 6.6rem; line-height: 1; color: var(--c); letter-spacing: -.03em; }
.m-hero .ilu { position: relative; max-width: 330px; margin: -.3rem auto 0; }
.m-leg { text-align: center; font-size: .76rem; color: var(--tinta-2); }
.m-cab { padding: 1rem 1.1rem .1rem; }
.m-cab h1 { font-family: var(--serifa); font-weight: 500; font-size: 2rem; line-height: 1.08; letter-spacing: -.012em; margin: .15rem 0 .35rem; }
.m-cab p:not(.olho) { color: var(--tinta-2); }
.m-sec { padding: 1rem 1.1rem 0; }
.mini { font-size: .98rem; font-weight: 700; margin: 1.1rem 0 .5rem; }
.m-sec .mini { margin-top: 0; }
.tams { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.tam { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 3.5rem; padding: .3rem .1rem; border-radius: 13px; background: var(--cartao); border: 1.5px solid var(--linha); line-height: 1.15; }
.tam b { font-family: var(--serifa); font-size: 1.14rem; font-weight: 600; }
.tam small { font-size: .7rem; color: var(--tinta-2); white-space: nowrap; }
.tam.on { background: var(--rosa); border-color: var(--rosa); color: #fff; }
.tam.on small { color: #fff; }
.m-meta { font-size: .9rem; color: var(--tinta-2); margin: .6rem 0 .4rem; }
.pes { display: grid; grid-template-columns: 1fr 1fr; padding: .22rem; border-radius: 14px; background: #F3E8DB; margin-bottom: .75rem; }
.pes button { min-height: 2.75rem; border-radius: 11px; font-weight: 600; color: var(--tinta-2); }
.pes button.on { background: var(--cartao); color: var(--tinta); box-shadow: 0 1px 4px rgba(92, 63, 57, .14); }
.etapas { padding: .7rem 1rem 0; display: flex; flex-direction: column; gap: .55rem; }
.etapa { background: var(--cartao); border: 1px solid var(--linha); border-radius: 18px; overflow: hidden; }
.etapa.mat { margin: 1rem 1rem 0; }
.etapa summary { display: flex; align-items: center; gap: .7rem; min-height: 3.55rem; padding: .55rem .85rem; list-style: none; cursor: pointer; }
.etapa summary::-webkit-details-marker, .como summary::-webkit-details-marker, .ponto summary::-webkit-details-marker { display: none; }
.et-n { width: 2.1rem; height: 2.1rem; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--rosa-c); color: var(--rosa-e); font-family: var(--serifa); font-weight: 600; }
.etapa.ok .et-n { background: var(--salva); color: #fff; }
.et-t { flex: 1; min-width: 0; font-family: var(--serifa); font-weight: 500; font-size: 1.14rem; line-height: 1.15; }
.et-c { color: var(--tinta-2); font-size: .86rem; font-variant-numeric: tabular-nums; }
.seta { width: 1em !important; height: 1em !important; color: var(--tinta-2); transition: transform .18s ease; }
details[open] > summary .seta { transform: rotate(90deg); }
.et-in { padding: 0 .85rem .85rem; }
.linha { display: flex; gap: .75rem; padding: .85rem .1rem; border-top: 1.5px dashed var(--linha); cursor: pointer; }
.caixa { width: 1.75rem; height: 1.75rem; flex: none; margin-top: .05rem; border-radius: 9px; border: 2px solid #D9BFB1; background: #fff; display: flex; align-items: center; justify-content: center; color: transparent; transition: background-color .15s ease, border-color .15s ease; }
.caixa .ic { width: 1.1rem; height: 1.1rem; stroke-width: 2.6; }
.linha.on .caixa { background: var(--salva); border-color: var(--salva); color: #fff; }
.linha.on .corpo { opacity: .62; }
.corpo { flex: 1; min-width: 0; transition: opacity .15s ease; }
.ln-t { font-weight: 700; line-height: 1.3; margin-bottom: .1rem; }
.ln-x { line-height: 1.5; }
.ln-li { margin: .2rem 0 0 1.15rem; }
.ln-li li { margin-bottom: .32rem; padding-left: .15rem; }
.ln-c { display: inline-block; margin-top: .45rem; padding: .22em .65em; border-radius: 9px; background: #F4EBDD; font-size: .9rem; font-weight: 600; }
.ln-d { margin-top: .45rem; font-size: .9rem; color: var(--tinta-2); line-height: 1.45; }
.n { font-weight: 700; color: var(--rosa-e); background: var(--rosa-c); padding: 0 .28em; border-radius: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.n.gen { color: var(--tinta-2); background: #F2E8DC; }
.termo { font: inherit; color: inherit; border-bottom: 1.5px dotted var(--rosa); line-height: 1.1; }
.comos { display: flex; flex-direction: column; gap: .45rem; margin-top: .75rem; }
.como { background: #FBF4EA; border-radius: 13px; }
.como summary { display: flex; align-items: center; gap: .55rem; min-height: 3rem; padding: .45rem .75rem; list-style: none; cursor: pointer; font-size: .94rem; line-height: 1.25; }
.como summary > span { flex: 1; }
.como summary > .ic:first-child { color: var(--rosa); }
.como-in { padding: 0 .8rem .8rem; font-size: .96rem; }
.ln-solta { padding: .6rem 0; border-top: 1.5px dashed #EADBC8; }
.nota { margin-top: .9rem; padding: .85rem .95rem; border-radius: 14px; font-size: .96rem; line-height: 1.48; }
.nota b:first-child { display: block; margin-bottom: .1rem; }
.dica { background: var(--salva-c); }
.dica b:first-child { color: var(--salva); }
.alerta { background: var(--rosa-c); }
.alerta b:first-child { color: var(--rosa-e); }
.dif { margin: 1rem 1rem 0; background: #F6ECDC; }
.dif + .liga, .dif + .liga + .liga { margin: .2rem 1rem 0; }
#barra:empty { display: none; }
.contador-b {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 20;
  display: flex; align-items: stretch; gap: .5rem; padding: .55rem .8rem calc(.55rem + env(safe-area-inset-bottom));
  background: var(--cartao); border-top: 1px solid var(--linha); box-shadow: 0 -6px 22px rgba(92, 63, 57, .09);
}
.c-menos { width: 2.9rem; flex: none; min-height: 3.3rem; border-radius: 14px; background: #F3E8DB; display: flex; align-items: center; justify-content: center; }
.c-mais { flex: 1; min-width: 0; min-height: 3.3rem; padding: 0 .3rem; border-radius: 14px; background: var(--rosa); color: #fff; font-weight: 700; white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: .3em; box-shadow: 0 5px 14px rgba(165, 80, 93, .28); }
.c-mais:active, .c-menos:active { transform: scale(.97); }
.c-num { flex: none; min-width: 3.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.c-num small { font-size: .72rem; color: var(--tinta-2); margin-bottom: .15rem; }
.c-num b { font-family: var(--serifa); font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; display: inline-block; }
.pulo { animation: pulo .22s ease; }
@keyframes pulo { 40% { transform: scale(1.22); } }

/* ---------- Guia ---------- */
.capitulos { display: flex; flex-direction: column; gap: .5rem; }
.cap { width: 100%; text-align: left; display: flex; align-items: center; gap: .8rem; min-height: 4.1rem; padding: .65rem .85rem; border-radius: 16px; background: var(--cartao); border: 1px solid var(--linha); }
.cap-ic { width: 2.5rem; height: 2.5rem; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--rosa-c); color: var(--rosa-e); }
.cap-t { flex: 1; min-width: 0; line-height: 1.25; }
.cap-t b { display: block; font-family: var(--serifa); font-weight: 500; font-size: 1.1rem; }
.cap-t small { display: block; color: var(--tinta-2); font-size: .86rem; margin-top: .1rem; }
.cap.destaque { background: var(--rosa-c); border-color: #EBCFCB; }
.cap.destaque .cap-ic { background: var(--rosa); color: #fff; }
.texto > p { margin-bottom: .8rem; }
.sec { font-family: var(--serifa); font-weight: 500; font-size: 1.28rem; line-height: 1.16; margin: 1.5rem 0 .6rem; padding-top: 1rem; border-top: 2px dashed var(--areia); }
.texto > .sec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.lista { margin: 0 0 .9rem 1.25rem; }
.lista li { margin-bottom: .45rem; padding-left: .2rem; }
.tabela { overflow-x: auto; margin: .6rem 0 1rem; border-radius: 14px; border: 1px solid var(--linha); background: var(--cartao); }
.tabela table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.35; }
.tabela th { text-align: left; padding: .6rem .7rem; background: #F6ECE0; font-weight: 700; }
.tabela td { padding: .6rem .7rem; border-top: 1px solid var(--linha); vertical-align: top; }
.ponto { background: var(--cartao); border: 1px solid var(--linha); border-radius: 14px; margin-bottom: .45rem; scroll-margin-top: 4rem; }
.ponto summary { display: flex; align-items: center; gap: .6rem; min-height: 3.2rem; padding: .5rem .85rem; list-style: none; cursor: pointer; font-weight: 600; line-height: 1.25; }
.ponto summary > span { flex: 1; }
.ponto-in { padding: 0 .9rem .9rem; }
.ponto-in > p { margin-bottom: .55rem; }
.ex { font-size: .95rem; }
.gloss { margin-top: .8rem; background: var(--cartao); border: 1px solid var(--linha); border-radius: 14px; overflow: hidden; }
.gloss > div { display: flex; gap: .8rem; padding: .62rem .85rem; border-top: 1px solid var(--linha); }
.gloss > div:first-child { border-top: 0; }
.gloss dt { flex: 0 0 4.7rem; font-weight: 700; color: var(--rosa-e); line-height: 1.35; }
.gloss dd { flex: 1; line-height: 1.35; }

/* ---------- Ferramentas ---------- */
.apagar { display: block; margin: 1.5rem auto 0; font-size: .88rem; color: var(--tinta-2); font-weight: 500; text-decoration: underline; }
.cont-cx { background: var(--cartao); border: 1px solid var(--linha); border-radius: 20px; padding: .9rem 1rem 1rem; margin-bottom: .8rem; }
.cont-c { display: flex; justify-content: space-between; align-items: center; }
.cont-c h2 { font-family: var(--serifa); font-weight: 500; font-size: 1.2rem; }
.cont-cx output { display: block; text-align: center; font-family: var(--serifa); font-size: 4.4rem; line-height: 1.1; font-weight: 500; font-variant-numeric: tabular-nums; margin: .1rem 0 .55rem; }
.cont-bts { display: flex; gap: .55rem; }
.cont-bts .c-mais, .cont-bts .c-menos { min-height: 4rem; }
.cont-bts .c-menos { width: 4rem; }
.campo { display: block; margin-bottom: .7rem; }
.campo > span:first-child { display: block; font-weight: 600; margin-bottom: .22rem; }
.campo-e { display: flex; align-items: center; min-height: 3.2rem; padding: 0 .95rem; border-radius: 14px; background: var(--cartao); border: 1.5px solid var(--linha); }
.campo-e:focus-within { border-color: var(--rosa); box-shadow: 0 0 0 2px rgba(165, 80, 93, .18); }
.campo-e input { flex: 1; min-width: 0; height: 3rem; border: 0; outline: 0; background: none; font-size: 1.08rem; }
.campo-e em { font-style: normal; color: var(--tinta-2); margin-left: .4rem; }
.campo small { display: block; color: var(--tinta-2); font-size: .84rem; margin-top: .2rem; }
.resultado { margin: 1rem 0; padding: 1rem 1.05rem; border-radius: 18px; background: var(--rosa-c); }
.res-g { font-family: var(--serifa); font-size: 2.4rem; line-height: 1.1; font-weight: 500; color: var(--rosa-e); margin: .05rem 0 .25rem; }
.resultado .bt { margin-top: .75rem; }

/* ---------- Navegação ---------- */
#nav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 20;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom));
  background: var(--cartao); border-top: 1px solid var(--linha);
}
#nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .08rem; min-height: 3.2rem; border-radius: 12px; color: var(--tinta-2); font-size: .73rem; font-weight: 600; line-height: 1.1; }
#nav a .ic { width: 1.5rem; height: 1.5rem; }
#nav a.on { color: var(--rosa-e); background: var(--rosa-c); }

/* ---------- Folha inferior e avisos ---------- */
#folha-fundo { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; background: rgba(59, 42, 38, .42); animation: surge .18s ease both; }
#folha {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; z-index: 51;
  background: var(--papel); border-radius: 24px 24px 0 0; padding: .6rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom));
  animation: folha .24s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes folha { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.pega { width: 2.6rem; height: 4px; border-radius: 4px; background: #E0CDBB; margin: 0 auto .9rem; }
#folha h2 { font-family: var(--serifa); font-weight: 500; font-size: 1.5rem; line-height: 1.14; margin-bottom: .45rem; }
#folha p { margin-bottom: .9rem; }
#folha .bt { margin-top: .5rem; }
.passos .ic { vertical-align: -.25em; color: var(--rosa); }
.letras { display: flex; flex-direction: column; gap: .5rem; }
.letras button { min-height: 3.4rem; border-radius: 14px; background: var(--cartao); border: 1.5px solid var(--linha); font-weight: 600; }
.letras button.on { border-color: var(--rosa); color: var(--rosa-e); background: var(--rosa-c); }
.fim { text-align: center; }
.fim-il { max-width: 210px; margin: 0 auto .4rem; }
#aviso {
  position: fixed; left: 50%; bottom: calc(6.2rem + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); z-index: 45;
  max-width: calc(100% - 2rem); width: max-content; padding: .6rem 1rem; border-radius: 14px; background: var(--tinta); color: #fff; font-size: .94rem; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
#aviso.ver { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 600px) {
  body { background: #F4E9DC; }
  #app { background: var(--papel); min-height: 100vh; box-shadow: 0 0 40px rgba(92, 63, 57, .08); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
}
