:root {
  --violeta: #3D234A;
  --violeta-2: #2E1A38;
  --dourado: #C6A15B;
  --dourado-texto: #7A5B22;
  --champagne: #E8D6B3;
  --creme: #F5EFE3;
  --branco: #FFFDF8;
  --linha: #EADFC8;
  --trilho: #F0E6D2;
  --texto: #2A241C;
  --suave: #5C5246;
  --serif: "Playfair Display", Georgia, serif;
  --acento: "Cormorant Garamond", Georgia, serif;
  --sans: "Raleway", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sombra: 0 10px 24px -18px rgba(61, 35, 74, .35);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #E9DFCB;
  font-family: var(--sans);
  color: var(--texto);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--violeta); }
:focus-visible { outline: 3px solid var(--dourado); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app {
  max-width: 480px; min-height: 100%; margin: 0 auto;
  background: var(--creme); position: relative;
  display: flex; flex-direction: column;
}
@media (min-width: 520px) {
  #app { box-shadow: 0 0 60px -20px rgba(61, 35, 74, .35); }
}
.tela {
  flex: 1; display: flex; flex-direction: column; gap: 18px;
  padding: 28px 20px 24px;
  animation: entra .28s ease;
}
.tela.com-nav { padding-bottom: 120px; }
.tela.com-player { padding-bottom: 100px; }
.tela.com-nav.com-player { padding-bottom: 190px; }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tela { animation: none; } * { transition: none !important; } }

/* Tipografia */
h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.2; color: var(--violeta); }
h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.25; color: var(--violeta); }
h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--violeta); }
p { margin: 0; line-height: 1.55; }
.olho { font-family: var(--acento); font-style: italic; font-size: 21px; color: var(--dourado-texto); }
.rotulo { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--dourado-texto); }
.suave { color: var(--suave); }
.pequeno { font-size: 13px; }
.mini { font-size: 12px; }
.centro { text-align: center; }
.justo { text-align: justify; hyphens: auto; }
.pilha { display: flex; flex-direction: column; gap: 10px; }
.pilha-sm { display: flex; flex-direction: column; gap: 4px; }
.linha { display: flex; align-items: center; gap: 12px; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grade-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grade-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.empurra { margin-top: auto; }

/* Topo */
.topo { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.marca { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--violeta); }
.logo-mini { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--dourado); }
.btn-icone {
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--violeta);
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
}
.btn-icone.borda { background: var(--branco); border: 1px solid var(--linha); }
.progresso { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.progresso span { height: 4px; border-radius: 2px; background: var(--champagne); }
.progresso span.on { background: var(--violeta); }

/* Cartões */
.cartao {
  background: var(--branco); border: 1px solid var(--linha); border-radius: 22px;
  padding: 18px; box-shadow: var(--sombra);
}
.cartao.escuro { background: var(--violeta); border-color: var(--violeta); color: var(--branco); }
.cartao.champ { background: var(--champagne); border-color: var(--dourado); box-shadow: none; }
.cartao.plano { box-shadow: none; }
.opcao {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--branco); border: 1px solid var(--linha); border-radius: 20px;
  text-align: left; box-shadow: var(--sombra); position: relative; min-height: 64px;
}
.opcao:active { transform: scale(.99); }
.opcao.sel { border: 2px solid var(--dourado); padding: 15px; }
.opcao.champ { background: var(--champagne); border-color: var(--dourado); box-shadow: none; }
.opcao .tit { font-size: 16px; font-weight: 600; color: var(--violeta); display: block; }
.opcao .sub { font-size: 13px; color: var(--suave); display: block; margin-top: 2px; }
.opcao .cresce { flex: 1; min-width: 0; }
.bolha {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--creme);
  display: flex; align-items: center; justify-content: center; color: var(--dourado-texto);
}
.bolha.branca { background: var(--branco); color: var(--violeta); }
.bolha.ouro { background: var(--dourado); color: var(--texto); }
.area {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  min-height: 96px; padding: 14px; background: var(--branco); border: 1px solid var(--linha);
  border-radius: 20px; text-align: left; color: var(--violeta); font-weight: 600; font-size: 15px;
}
.area.sel { border: 2px solid var(--dourado); padding: 13px; }
.check {
  position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--dourado); color: var(--texto); display: flex; align-items: center; justify-content: center;
}
.selo { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.selo.ouro { background: var(--dourado); color: var(--texto); }
.selo.violeta { background: var(--violeta); color: var(--branco); }
.selo.claro { background: var(--branco); border: 1px solid var(--linha); color: var(--dourado-texto); }

/* Botões */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 16px 20px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; min-height: 54px;
}
.btn.pri { background: var(--violeta); color: var(--branco); }
.btn.pri:hover { background: var(--violeta-2); }
.btn.sec { background: var(--branco); border-color: var(--violeta); color: var(--violeta); }
.btn.ouro { background: var(--dourado); color: var(--texto); }
.btn.texto { background: transparent; color: var(--violeta); min-height: 44px; padding: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.chip {
  min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linha);
  background: var(--branco); font-size: 14px; font-weight: 600; color: var(--violeta);
}
.chip.sel { background: var(--violeta); border-color: var(--violeta); color: var(--branco); }
.grade-3 .chip { padding: 0 6px; font-size: 13px; overflow-wrap: anywhere; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--branco); border: 1px solid var(--linha); border-radius: 999px; }
.seg button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; font-size: 14px; color: var(--violeta); }
.seg button.sel { background: var(--violeta); color: var(--branco); }

/* Barras */
.barra { height: 8px; border-radius: 4px; background: var(--trilho); overflow: hidden; }
.barra > span { display: block; height: 100%; border-radius: 4px; background: var(--violeta); }
.barra > span.ouro { background: var(--dourado); }
.barra > span.cinza { background: #B9A98A; }

/* Formulário */
label.campo { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 600; color: var(--violeta); }
input[type=text], input[type=email], textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--linha); border-radius: 16px;
  background: var(--branco); font-size: 16px; line-height: 1.5; color: var(--texto); font-weight: 400;
}
textarea { resize: vertical; min-height: 110px; }
input[type=range] { width: 100%; accent-color: var(--violeta); height: 32px; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--violeta); flex-shrink: 0; margin: 2px 0 0; }
.escala-rot { display: flex; justify-content: space-between; font-size: 12px; color: var(--suave); }
.numero { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1; }

/* Respiração */
.respira { display: flex; justify-content: center; padding: 8px 0; }
.respira .anel { width: 240px; height: 240px; border-radius: 50%; background: var(--champagne); display: flex; align-items: center; justify-content: center; }
.respira .bola {
  width: 120px; height: 120px; border-radius: 50%; background: var(--branco); border: 2px solid var(--dourado);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: width 4s ease-in-out, height 4s ease-in-out;
}
.respira .bola.grande { width: 210px; height: 210px; }
.respira .bola b { font-family: var(--serif); font-size: 24px; color: var(--violeta); font-weight: 600; }
.respira .bola span { font-size: 14px; color: var(--suave); }
.relogio { font-family: var(--serif); font-size: 44px; font-weight: 600; color: var(--violeta); text-align: center; }

/* Semana */
.semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 12px 10px; }
.semana .d { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--suave); }
.semana .c { width: 30px; height: 30px; border-radius: 50%; background: var(--trilho); display: flex; align-items: center; justify-content: center; color: var(--texto); font-size: 12px; font-weight: 700; }
.semana .c.feito { background: var(--dourado); }
.semana .c.hoje { background: transparent; border: 2px solid var(--violeta); color: var(--violeta); }

/* Lista de dias */
.dia { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--branco); border: 1px solid var(--linha); border-radius: 18px; width: 100%; text-align: left; min-height: 64px; }
.dia .num { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--creme); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--dourado-texto); }
.dia.feito .num { background: var(--dourado); color: var(--texto); }
.dia.atual { background: var(--violeta); border-color: var(--violeta); color: var(--branco); }
.dia.atual .num { background: var(--dourado); color: var(--texto); }
.dia.atual .t { color: var(--branco); }
.dia.atual .m { color: var(--champagne); }
.dia .t { font-size: 15px; font-weight: 600; color: var(--violeta); display: block; }
.dia .m { font-size: 13px; color: var(--suave); display: block; }
.dia.bloq { opacity: .75; }

/* Navegação */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end;
  padding: 6px 6px calc(10px + env(safe-area-inset-bottom)); background: var(--branco); border-top: 1px solid var(--linha); z-index: 20;
}
.nav button { min-height: 52px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--suave); }
.nav button.ativo { color: var(--violeta); font-weight: 700; }
.nav .sos { color: var(--violeta); font-weight: 700; }
.nav .sos .bot { width: 58px; height: 58px; margin-top: -28px; border-radius: 50%; background: var(--dourado); border: 4px solid var(--creme); display: flex; align-items: center; justify-content: center; color: var(--texto); box-shadow: 0 10px 20px -12px rgba(61,35,74,.6); }

/* Player de som */
.player {
  position: fixed; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 456px;
  bottom: 92px; z-index: 19; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px;
  background: var(--violeta); color: var(--branco); border-radius: 20px; box-shadow: 0 14px 28px -14px rgba(0,0,0,.5);
}
.player.sem-nav { bottom: 16px; }
.player .info { flex: 1; min-width: 0; }
.player .info b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .info span { font-size: 12px; color: var(--champagne); }
.player .btn-icone { color: var(--branco); }

/* Rodapé */
.rodape {
  margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--linha);
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.rodape img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--dourado); }
.rodape p { font-size: 12px; line-height: 1.5; color: var(--suave); }
.rodape strong { color: var(--violeta); }

/* Avisos */
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; background: #EFE4CE; border-radius: 16px; font-size: 13px; line-height: 1.5; color: var(--violeta); }
.alerta { padding: 16px; background: var(--champagne); border: 1px solid var(--dourado); border-radius: 20px; }
.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 50; max-width: 440px; width: calc(100% - 32px);
  background: var(--violeta); color: var(--branco); padding: 14px 18px; border-radius: 16px; font-size: 14px; box-shadow: 0 14px 28px -14px rgba(0,0,0,.5);
}
.boas-vindas-logo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--dourado), 0 20px 40px -20px rgba(61,35,74,.6); align-self: center; }
.tela-tela { background: var(--violeta); color: var(--branco); }
.tela-tela h1 { color: var(--branco); }

/* Sobre: assinatura */
.autora-nome { font-family: var(--serif); font-size: 19px; line-height: 1.25; color: var(--violeta); }
.lista-cred { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.lista-cred li { position: relative; padding: 8px 0 8px 16px; border-top: 1px solid var(--linha, #EADFC8); font-size: 15px; line-height: 1.45; text-align: left; }
.lista-cred li::before { content: ""; position: absolute; left: 0; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--ouro, #C6A15B); }
.autora-pilares { font-family: var(--acento); font-style: italic; font-size: 19px; line-height: 1.35; margin: 4px 0 0; }
/* Respiração 3D */
.corpo3d { position: relative; display: flex; flex-direction: column; align-items: center; perspective: 700px; padding: 6px 0; --dur: 4s; }
.corpo3d svg { transform-style: preserve-3d; animation: gira3d 14s ease-in-out infinite; filter: drop-shadow(0 18px 18px rgba(58, 38, 24, .25)); overflow: visible; }
.corpo3d .pulmoes { transform-origin: 120px 200px; transform-box: view-box; transition: transform var(--dur) ease-in-out; }
.corpo3d .cerebro { transform-origin: 120px 52px; transform-box: view-box; transition: opacity var(--dur) ease-in-out, transform var(--dur) ease-in-out; opacity: .85; }
.corpo3d .coracao { transform-origin: 148px 210px; transform-box: view-box; animation: bate 0.86s ease-in-out infinite; }
.corpo3d.ins .pulmoes, .corpo3d.seg .pulmoes { transform: scale(1.14); }
.corpo3d.seg .cerebro { opacity: 1; transform: scale(1.06); }
.corpo3d.exp .coracao, .corpo3d.fim .coracao { animation-duration: 1.05s; }
.fase3d { margin-top: -6px; display: flex; flex-direction: column; align-items: center; }
.fase3d b { font-family: var(--serif); font-size: 26px; color: var(--violeta); font-weight: 600; }
.fase3d span { font-size: 15px; color: var(--suave); }
@keyframes gira3d { 0%, 100% { transform: rotateY(-14deg); } 50% { transform: rotateY(14deg); } }
@keyframes bate { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.12); } 24% { transform: scale(.98); } 36% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .corpo3d svg, .corpo3d .coracao { animation: none; } }
.autora-sub { font-size: 15px; font-weight: 600; color: var(--violeta); }

/* v1.8 · lembrete, instalação, registros */
.lista-passos { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; }
.lista-passos li { padding-left: 4px; }
input[type=time] { width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--linha); background: var(--branco); font: inherit; font-size: 18px; color: var(--texto); }
input[type=time]:focus { outline: 2px solid var(--violeta); outline-offset: 2px; }
.rodape a { color: inherit; font-weight: 700; }
