:root {
  --bg: #0b1f2a;
  --card: #133241;
  --card2: #183c4d;
  --line: #24495a;
  --teal: #2dd4bf;
  --teal-d: #0f766e;
  --txt: #e6fffb;
  --muted: #9fb4bf;
  --ok: #4ade80;
  --r: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--txt); }
body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#app {
  max-width: 560px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 18px calc(env(safe-area-inset-bottom) + 36px);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.15; }

.tag {
  display: inline-block; background: var(--teal); color: var(--bg);
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
}
.muted { color: var(--muted); }

/* Topo */
.topo { padding: 6px 0 18px; }
.topo h1 { font-size: 34px; margin: 12px 0 6px; letter-spacing: -.01em; }
.topo p { margin: 0; color: var(--muted); }

/* Progresso */
.progresso { background: var(--card); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.progresso .linha { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.progresso strong { font-size: 15px; }
.barra { height: 8px; background: var(--bg); border-radius: 99px; margin: 10px 0 14px; overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--teal); border-radius: 99px; transition: width .4s; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 16px; border-radius: 12px;
  background: var(--teal); color: var(--bg); font-weight: 800; font-size: 16px;
}
.btn.sec { background: var(--card2); color: var(--txt); font-weight: 700; }
.btn.feito { background: rgba(74, 222, 128, .14); color: var(--ok); }
.btn svg { width: 20px; height: 20px; flex: 0 0 20px; }

/* Instalar */
.instalar {
  display: flex; gap: 12px; align-items: center;
  border: 1px dashed var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; font-size: 14px;
}
.instalar img { width: 40px; height: 40px; border-radius: 10px; }
.instalar div { flex: 1; }
.instalar b { display: block; font-size: 15px; }
.instalar .acao { color: var(--teal); font-weight: 800; white-space: nowrap; }
.instalar .x { color: var(--muted); font-size: 22px; line-height: 1; padding: 0 2px; }

/* Seções */
.secao { margin: 26px 0 12px; display: flex; justify-content: space-between; align-items: baseline; }
.secao h2 { font-size: 20px; }
.secao span { color: var(--muted); font-size: 13px; }

/* Lista de aulas */
.aula {
  display: flex; gap: 14px; align-items: center;
  background: var(--card); border-radius: var(--r); padding: 10px; margin-bottom: 10px;
  transition: transform .12s;
}
.aula:active { transform: scale(.985); }
.aula .capa { position: relative; flex: 0 0 64px; height: 92px; border-radius: 10px; overflow: hidden; background: var(--bg); }
.aula .capa img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.aula .num { font-size: 12px; font-weight: 800; color: var(--teal); letter-spacing: .08em; text-transform: uppercase; }
.aula h3 { font-size: 17px; margin: 2px 0 3px; }
.aula p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.aula .info { flex: 1; min-width: 0; }
.aula .meta { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; gap: 6px; align-items: center; }
.aula .estado { flex: 0 0 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; }
.aula.concluida .estado { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.aula.concluida .estado svg { width: 16px; height: 16px; }
.aula.proxima { outline: 2px solid var(--teal); outline-offset: -2px; }
.aula.inicio { background: linear-gradient(135deg, #0f4a4a, var(--card)); }

/* Bônus */
.bonus { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bonus a { background: var(--card); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.bonus a:active { transform: scale(.98); }
.bonus img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; display: block; }
.bonus div { padding: 10px 12px 12px; }
.bonus b { display: block; font-size: 14.5px; line-height: 1.25; }
.bonus small { color: var(--teal); font-weight: 700; font-size: 12px; }

.rodape { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 30px; }

/* Tela da aula */
.voltar { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; padding: 4px 0 14px; }
.voltar svg { width: 20px; height: 20px; }
.player {
  width: min(100%, calc(72vh * 9 / 16)); margin: 0 auto 16px;
  aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #000;
}
.player video { width: 100%; height: 100%; display: block; background: #000; }
.cab-aula h1 { font-size: 26px; margin: 10px 0 6px; }
.cab-aula p { margin: 0 0 16px; color: var(--muted); }
.acoes { display: grid; gap: 10px; }
.dica { background: var(--card); border-left: 3px solid var(--teal); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 16px 0; }
.dica b { color: var(--teal); }
.navega { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.navega .btn { font-size: 14.5px; padding: 12px; }

/* Ajuda iPhone */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.modal .caixa { background: var(--card); width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 22px 20px calc(env(safe-area-inset-bottom) + 22px); }
.modal h3 { font-size: 20px; margin-bottom: 12px; }
.modal ol { margin: 0 0 18px; padding-left: 22px; }
.modal li { margin-bottom: 8px; }

@media (min-width: 700px) {
  .topo h1 { font-size: 40px; }
}
