@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2'); }

:root {
  --ink: #0c182d;
  --muted: #515f72;
  --line: #e0e6ed;
  --soft: #f3f6fa;
  --blue: #1f1dfc;
  --blue-soft: #e8f0ff;
  --green: #3bd96f;
  --d-bg: #020618;
  --d-card: #0f172b;
  --d-line: #1d293d;
  --d-text: #f8fafc;
  --d-muted: #90a1b9;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: #ffffff;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
body.dark { background: var(--d-bg); color: var(--d-text); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
body.dark :focus-visible { outline-color: var(--green); }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.corpo { flex: 1; display: flex; flex-direction: column; gap: 20px; padding: 24px 20px 24px; }

/* Navegação inferior */
.nav {
  position: sticky; bottom: 0; display: flex; height: calc(72px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: #ffffff; border-top: 1px solid var(--line);
}
.nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); font-size: 11px; font-weight: 600;
}
.nav a[aria-current='page'] { color: var(--blue); font-weight: 700; }

/* Início */
.topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.saudacao { font-size: 14px; line-height: 1.4; font-weight: 500; color: var(--muted); }
.titulo { margin-top: 4px; font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.instalar {
  flex: none; height: 36px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 18px;
  background: #fff; color: var(--ink); font-size: 13px; font-weight: 600;
}
.destaque {
  display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 20px;
  background: var(--blue); color: #ffffff;
}
.destaque .rotulo { font-size: 12px; line-height: 1.25; font-weight: 700; letter-spacing: 0.04em; color: var(--blue-soft); }
.destaque .nome { margin-top: 4px; font-size: 22px; line-height: 1.2; font-weight: 800; }
.destaque .meta { font-size: 14px; line-height: 1.4; color: var(--blue-soft); }
.destaque .botao-claro {
  margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px;
  border-radius: 12px; background: #ffffff; color: var(--blue); font-size: 15px; font-weight: 700;
}
.secao { display: flex; flex-direction: column; gap: 12px; }
.secao h2 { font-size: 16px; line-height: 1.25; font-weight: 700; }
.grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cartao-tema {
  display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px;
  background: var(--soft); border: 1px solid var(--line);
}
.cartao-tema .icone {
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--blue-soft);
}
.cartao-tema .nome { min-height: 33px; font-size: 13px; line-height: 1.25; font-weight: 600; }
.cartao-tema .breve { font-size: 11px; font-weight: 600; color: var(--muted); }

/* Barra superior com voltar */
.barra { display: flex; align-items: center; height: 56px; padding: 0 8px; }
.icone-botao {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; border-radius: 22px; background: transparent; color: inherit;
}

/* Sessão */
.sessao { flex: 1; display: flex; flex-direction: column; gap: 20px; padding: 4px 20px 24px; }
.sessao .cabeca { display: flex; flex-direction: column; gap: 12px; }
.sessao .selo { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 20px; background: var(--blue-soft); }
.sessao h1 { font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.sessao .sub { margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.sessao .desc { font-size: 15px; line-height: 1.5; }
.etapas { display: flex; flex-direction: column; gap: 4px; }
.etapas h2 { margin-bottom: 4px; font-size: 16px; line-height: 1.25; font-weight: 700; }
.etapa { display: flex; align-items: center; gap: 12px; height: 40px; border-bottom: 1px solid var(--line); }
.etapa .num {
  display: flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 12px;
  background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 700;
}
.etapa .tit { flex: 1; font-size: 14px; font-weight: 600; }
.etapa .min { font-size: 13px; color: var(--muted); }
.acoes { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.botao {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border: 0; border-radius: 14px;
  background: var(--blue); color: #ffffff; font-size: 16px; font-weight: 700; width: 100%;
}
.botao[disabled] { background: var(--soft); color: var(--muted); cursor: default; }
.botao-borda {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #ffffff; color: var(--ink); font-size: 15px; font-weight: 600; width: 100%;
}
.aviso-pequeno { margin-top: 4px; font-size: 12.5px; line-height: 1.4; text-align: center; color: var(--muted); }

/* Aviso inicial */
.aviso { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 64px 24px 32px; }
.aviso .selo { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 22px; background: var(--blue-soft); }
.aviso h1 { margin-top: 16px; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.aviso .intro { margin-top: 16px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.aviso .itens { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.item-aviso { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); }
.item-aviso .ic { display: flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--blue-soft); }
.item-aviso p { font-size: 15px; line-height: 1.45; font-weight: 500; }

/* Histórico */
.cartao-sequencia { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: 20px; background: var(--soft); border: 1px solid var(--line); }
.cartao-sequencia .rot { font-size: 12px; line-height: 1.25; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.cartao-sequencia .valor { margin-top: 4px; font-size: 24px; line-height: 1.2; font-weight: 800; }
.semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dia { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dia .letra { font-size: 12px; font-weight: 600; color: var(--muted); }
.dia.hoje .letra { color: var(--ink); font-weight: 800; }
.dia .bolinha { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 16px; background: #ffffff; border: 1.5px solid var(--line); }
.dia.feito .bolinha { background: var(--blue); border-color: var(--blue); }
.lista { display: flex; flex-direction: column; gap: 4px; }
.lista h2 { margin-bottom: 8px; font-size: 16px; line-height: 1.25; font-weight: 700; }
.linha { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.linha .ic { display: flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); }
.linha .txt { flex: 1; min-width: 0; }
.linha .t1 { font-size: 15px; line-height: 1.3; font-weight: 600; }
.linha .t2 { margin-top: 2px; font-size: 13px; line-height: 1.3; color: var(--muted); }
.linha .fim { font-size: 13px; color: var(--muted); }
.vazio { padding: 20px; border-radius: 16px; background: var(--soft); border: 1px dashed var(--line); font-size: 14px; line-height: 1.5; color: var(--muted); }
.texto-botao { align-self: flex-start; border: 0; background: transparent; padding: 8px 0; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: underline; }
.icone-lixo { width: 44px; height: 44px; border: 0; border-radius: 22px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; }

/* Player (tema escuro) */
.player { flex: 1; display: flex; flex-direction: column; }
.player .barra { justify-content: space-between; }
.player .barra .rotulo { font-size: 13px; font-weight: 600; color: var(--d-muted); }
.player .corpo-player { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 16px 24px 32px; }
.arte { width: 260px; height: 260px; max-width: 70vw; max-height: 70vw; }
.arte .miolo { transform-origin: 130px 130px; }
.tocando .arte .miolo { animation: respirar 6s ease-in-out infinite; }
@keyframes respirar { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .tocando .arte .miolo { animation: none; } }
.player .nome { margin-top: 28px; text-align: center; font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.player .etapa-atual { margin-top: 6px; text-align: center; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--green); min-height: 20px; }
.player .progresso { width: 100%; margin-top: 24px; }
.player input[type='range'] { width: 100%; margin: 0; accent-color: var(--green); }
.player .tempos { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--d-muted); }
.controles { display: flex; align-items: center; justify-content: center; gap: 32px; margin-top: 20px; }
.controles .pular { width: 48px; height: 48px; border: 0; border-radius: 24px; background: transparent; color: var(--d-text); display: flex; align-items: center; justify-content: center; }
.controles .tocar { width: 72px; height: 72px; border: 0; border-radius: 36px; background: var(--blue); color: #ffffff; display: flex; align-items: center; justify-content: center; }
.controles button[disabled] { opacity: 0.4; cursor: default; }
.volumes { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 24px; padding: 16px; border-radius: 16px; background: var(--d-card); border: 1px solid var(--d-line); }
.volume { display: flex; align-items: center; gap: 12px; }
.volume label { width: 56px; font-size: 13px; font-weight: 600; }
.volume input { flex: 1; min-width: 0; }
.volume input[disabled] { opacity: 0.4; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; width: 100%; }
.chip {
  position: relative; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 1px solid var(--d-line);
  border-radius: 22px; background: var(--d-card); color: var(--d-text); font-size: 13px; font-weight: 600;
}
.chip select { border: 0; background: transparent; color: inherit; font: inherit; padding: 8px 0; max-width: 150px; }
.chip select option { color: #0c182d; }
.msg-audio { margin-top: 12px; width: 100%; padding: 12px 16px; border-radius: 12px; background: var(--d-card); border: 1px solid var(--d-line); font-size: 13px; line-height: 1.45; color: var(--d-muted); }

/* Cores dos ícones */
.cartao-tema .icone, .sessao .selo, .aviso .selo, .item-aviso .ic, .linha .ic { color: var(--blue); }
.dia.feito .bolinha { color: #ffffff; }

/* Aviso rápido */
#toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 10;
  max-width: calc(100% - 40px); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #ffffff;
  font-size: 14px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
#toast.visivel { opacity: 1; }
