:root {
  --bg: #0a0a0a;
  --panel: #151515;
  --panel-2: #1d1d1d;
  --line: #2a2a2a;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --red: #ff1f1f;
  --red-dark: #b30f0f;
  --ok: #2ecc71;
  --radius: 14px;
  --font-title: 'Bebas Neue', 'Arial Narrow', Impact, sans-serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { color-scheme: dark; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body);
  font-size: 15px; line-height: 1.5; min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 400; letter-spacing: .02em; text-transform: uppercase; margin: 0; line-height: 1.05; }
h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
.red { color: var(--red); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 12px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); padding: 8px 0; }
.brand { font-family: var(--font-title); font-size: 22px; letter-spacing: .06em; }
.brand b { color: var(--red); font-weight: 400; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card.hero { background: linear-gradient(160deg, #1c0808, var(--panel) 60%); border-color: #3a1414; }
.card.warn { border-color: var(--red-dark); }
.stack { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--red); color: #fff; border: 0; border-radius: 12px; padding: 14px 16px;
  font-weight: 600; letter-spacing: .02em; text-transform: uppercase; font-size: 14px;
}
.btn:active { background: var(--red-dark); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.small { width: auto; padding: 8px 12px; font-size: 12px; }
.btn[disabled] { opacity: .5; }

.list { display: grid; gap: 8px; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.item.locked { opacity: .45; pointer-events: none; }
.item.today { border-color: var(--red); }
.item .num {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--panel-2); font-family: var(--font-title); font-size: 18px;
}
.item.done .num { background: var(--ok); color: #04210f; }
.item .title { font-weight: 600; }
.item .sub { color: var(--muted); font-size: 13px; }
.chev { color: var(--muted); }
.chip {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; background: var(--panel-2); color: var(--muted);
}
.chip.red { background: rgba(255, 31, 31, .15); color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.bar { height: 6px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--red); }

.section-title { margin: 20px 0 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
ul.plain { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 0;
  background: rgba(10, 10, 10, .94); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav a { flex: 1; max-width: 280px; text-align: center; padding: 14px 0; color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.nav a.on { color: var(--red); }

/* exercício */
.media {
  aspect-ratio: 16 / 9; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; place-items: center; overflow: hidden; margin-bottom: 12px;
}
.media:has(.ph) { background: #000; aspect-ratio: 16 / 9; }
.media img, .media video { width: 100%; height: 100%; object-fit: contain; }
.media .ph { text-align: center; color: var(--muted); padding: 24px; }
.media .ph b { display: block; font-family: var(--font-title); font-size: 26px; color: var(--red); letter-spacing: .04em; font-weight: 400; }
.sets { display: grid; gap: 8px; margin: 12px 0; }
.set {
  display: grid; grid-template-columns: 26px 1fr 64px 64px 44px; gap: 8px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px;
}
.set .n { font-family: var(--font-title); font-size: 20px; color: var(--muted); }
.set .target { font-size: 13px; color: var(--muted); }
.set input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 6px; text-align: center; min-width: 0;
}
.set input:focus { outline: 2px solid var(--red); border-color: transparent; }
.set .check {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 20px;
}
.set.done { border-color: #1f5a37; }
.set.done .check { background: var(--ok); color: #04210f; border-color: var(--ok); }
.set-head { display: grid; grid-template-columns: 26px 1fr 64px 64px 44px; gap: 8px; padding: 0 10px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; text-align: center; }
.set-head span:nth-child(2) { text-align: left; }
.pager { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(10, 10, 10, .96); border-top: 1px solid var(--line); max-width: 560px; margin: 0 auto; }
.pager .btn { flex: 1; }
.note { background: var(--panel-2); border-left: 3px solid var(--red); padding: 10px 12px; border-radius: 8px; margin: 10px 0; color: #ddd; font-size: 14px; }

.timer {
  position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: 536px; margin: 0 auto;
  background: var(--red); color: #fff; border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .6); z-index: 20;
}
.timer[hidden] { display: none; }
.timer .time { font-family: var(--font-title); font-size: 38px; line-height: 1; min-width: 92px; }
.timer .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.timer button { background: rgba(0, 0, 0, .28); border: 0; border-radius: 10px; padding: 8px 10px; font-weight: 600; font-size: 13px; }
.timer.over { background: var(--ok); color: #04210f; }

/* login */
.login { min-height: 100dvh; display: grid; align-content: center; gap: 16px; max-width: 420px; margin: 0 auto; padding: 24px 16px; }
.field { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.field:focus { outline: 2px solid var(--red); border-color: transparent; }
.field.code { text-align: center; font-size: 28px; letter-spacing: .4em; font-family: var(--font-title); }
.err { color: #ff8a8a; font-size: 13px; min-height: 1.2em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; }
.stat b { display: block; font-family: var(--font-title); font-size: 30px; font-weight: 400; color: var(--red); line-height: 1.1; }
.stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* Como fazer */
.steps { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; }
.steps summary { cursor: pointer; list-style: none; padding: 12px 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.steps summary::-webkit-details-marker { display: none; }
.steps summary::after { content: '+'; color: var(--red); font-size: 22px; line-height: 1; }
.steps[open] summary::after { content: '−'; }
.steps ol { margin: 0; padding: 0 14px 14px 38px; color: #d6d6d6; font-size: 14px; }
.steps li { margin: 0 0 8px; padding-left: 4px; }
.steps li::marker { color: var(--red); font-weight: 700; }
