:root {
  --bg: #080808;
  --surface: #121212;
  --surface-2: #1a1a1a;
  --surface-3: #242424;
  --line: #2a2a2a;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --faint: #6b6b6b;
  --red: #e11d2a;
  --red-2: #ff3b47;
  --red-dark: #7f1017;
  --red-glow: rgba(225, 29, 42, .35);
  --ok: #22c55e;
  --radius: 16px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); letter-spacing: .01em; margin: 0; line-height: 1.05; text-transform: uppercase; }
h1 { font-size: 34px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }

#app { max-width: 720px; margin: 0 auto; padding: calc(var(--safe-t) + 16px) 16px calc(var(--tabbar-h) + var(--safe-b) + 24px); }
body.no-tabs #app { padding-bottom: 24px; }
body.no-tabs .tabbar { display: none; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(8, 8, 8, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
@media (min-width: 760px) { .tabbar { left: 50%; right: auto; width: 720px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; } }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-size: 11px; font-weight: 600; }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--red-2); }

/* ---------- layout bits ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.section { margin-top: 28px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-title a { color: var(--red-2); font-size: 13px; font-weight: 600; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.red { color: var(--red-2); }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.hide { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; min-height: 40px; }
.topbar h2 { flex: 1; min-width: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.on { color: var(--red-2); }
.icon-btn.on svg { fill: currentColor; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.tight { padding: 12px; }
.card.link:active { transform: scale(.99); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; border-radius: 14px;
  background: var(--red); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .02em;
  box-shadow: 0 8px 24px -8px var(--red-glow);
  transition: transform .1s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--surface-2); box-shadow: none; color: var(--text); }
.btn.outline { background: transparent; border: 1.5px solid var(--red); color: var(--red-2); box-shadow: none; }
.btn.sm { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.chip {
  flex: none; height: 34px; padding: 0 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600; border: 1px solid var(--line);
  white-space: nowrap;
}
.chip.on { background: var(--red); color: #fff; border-color: var(--red); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: rgba(225, 29, 42, .15); color: var(--red-2); }
.badge.gray { background: var(--surface-3); color: var(--muted); }

.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); outline: none;
}
.input:focus { border-color: var(--red); }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; fill: none; stroke: var(--faint); stroke-width: 2; }
.search .input { padding-left: 44px; }

/* ---------- media ---------- */
.thumb { background: #fff; border-radius: 12px; overflow: hidden; aspect-ratio: 1; flex: none; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-hero { background: #fff; border-radius: 20px; overflow: hidden; aspect-ratio: 1; max-height: 52vh; margin: 0 auto; }
.media-hero video { width: 100%; height: 100%; object-fit: contain; }
.media-hero.locked { position: relative; }
.media-hero.locked img { width: 100%; height: 100%; object-fit: contain; filter: blur(3px) grayscale(.4); opacity: .55; }
.media-hero.locked .lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; text-decoration: none; color: #111; }
.media-hero.locked .lock b { background: #e11d2a; color: #fff; padding: 10px 16px; border-radius: 99px; font-size: 14px; }
.media-hero.locked .lock span { font-size: 12px; font-weight: 600; }

/* ---------- home ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.hello .logo { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .12em; color: var(--red-2); text-transform: uppercase; }
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 20px;
  background: radial-gradient(120% 90% at 100% 0%, #5a0a10 0%, #1a0406 45%, #0e0e0e 100%);
  border: 1px solid #3a0d12;
}
.hero::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; border-radius: 50%; background: var(--red); filter: blur(80px); opacity: .25; pointer-events: none; }
.hero .kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red-2); }
.hero h2 { font-size: 30px; margin: 6px 0 4px; }
.hero .btn { margin-top: 16px; }
.progress { height: 6px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--red-2)); border-radius: 99px; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week div { text-align: center; padding: 8px 0; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 11px; color: var(--faint); font-weight: 600; }
.week b { display: block; font-size: 16px; color: var(--muted); margin-top: 2px; font-family: var(--display); }
.week .done { background: var(--red); border-color: var(--red); color: #ffd7da; }
.week .done b { color: #fff; }
.week .today { border-color: var(--red); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat b { display: block; font-family: var(--display); font-size: 28px; font-weight: 800; line-height: 1; }
.stat span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick .card { display: flex; flex-direction: column; gap: 6px; }
.quick .emo { font-size: 24px; }

/* ---------- programs ---------- */
.prog {
  position: relative; overflow: hidden; display: block; border-radius: 20px; padding: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pc) 28%, #0e0e0e) 0%, #0e0e0e 70%);
  border: 1px solid color-mix(in srgb, var(--pc) 35%, #1a1a1a);
}
.prog .emo { position: absolute; right: 14px; top: 10px; font-size: 44px; opacity: .9; }
.prog h3 { font-size: 24px; margin: 8px 70px 6px 0; }
.prog .meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); font-weight: 600; }
.prog .meta span::before { content: '● '; color: var(--pc); }
.prog.active { box-shadow: 0 0 0 2px var(--red); }

.benefits { list-style: none; padding: 0; margin: 0; }
.benefits li { padding: 7px 0 7px 28px; position: relative; }
.benefits li::before { content: ''; position: absolute; left: 0; top: 9px; width: 18px; height: 18px; border-radius: 6px; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; }

.phase { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.phase + .phase { margin-top: 12px; }
.phase > summary { list-style: none; padding: 16px; cursor: pointer; display: flex; gap: 12px; align-items: center; }
.phase > summary::-webkit-details-marker { display: none; }
.phase .num { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); font-family: var(--display); font-weight: 800; font-size: 20px; flex: none; }
.phase.current .num { background: var(--red); }
.phase[open] > summary .chev { transform: rotate(180deg); }
.chev { width: 20px; height: 20px; fill: none; stroke: var(--faint); stroke-width: 2; transition: transform .2s; flex: none; }
.phase .body { padding: 0 16px 16px; }
.tip { display: flex; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 0; }
.tip::before { content: '›'; color: var(--red-2); font-weight: 800; }
.day-link { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); margin-top: 8px; }
.day-link .letter { width: 34px; height: 34px; border-radius: 10px; background: var(--red-dark); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 17px; flex: none; }
.day-link.next { box-shadow: inset 0 0 0 1.5px var(--red); }

/* ---------- lists ---------- */
.ex-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ex-row + .ex-row { margin-top: 8px; }
.ex-row .thumb { width: 64px; }
.ex-row .name { font-weight: 600; line-height: 1.25; }
.ex-row .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ex-row .idx { font-family: var(--display); font-weight: 800; color: var(--red-2); width: 18px; text-align: center; flex: none; }
.group-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 18px 0 8px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; position: relative; }
.tile .thumb { border-radius: 0; }
.tile .cap { padding: 9px 10px 11px; }
.tile .cap b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.25; min-height: 32px; }
.tile .cap span { font-size: 11px; color: var(--faint); }
.tile .fav { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; }
.tile .fav svg { width: 15px; height: 15px; fill: var(--red-2); }
.tile.picked { box-shadow: 0 0 0 2px var(--red); }
.tile .check { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .emo { font-size: 44px; margin-bottom: 10px; }

/* ---------- exercise detail ---------- */
.desc p + p { margin-top: 12px; }
.desc p { color: #d4d4d4; }
.facts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- editor ---------- */
.edit-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.edit-item + .edit-item { margin-top: 8px; }
.edit-item .thumb { width: 52px; }
.edit-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.edit-fields label { font-size: 11px; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.edit-fields .input { height: 40px; margin-top: 4px; text-align: center; padding: 0 6px; }
.mini-btn { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.mini-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- sheet ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.7); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 720px; max-height: 88dvh; overflow: auto; background: var(--surface); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line); padding: 10px 16px calc(20px + var(--safe-b)); animation: up .25s cubic-bezier(.2,.8,.2,1); }
.sheet .grip { width: 40px; height: 5px; border-radius: 9px; background: var(--surface-3); margin: 0 auto 14px; }
.sheet-full { max-height: 94dvh; height: 94dvh; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px); background: #fff; color: #111; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- onboarding ---------- */
.onb { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.onb .steps { display: flex; gap: 6px; margin-bottom: 28px; }
.onb .steps i { flex: 1; height: 4px; border-radius: 9px; background: var(--surface-3); }
.onb .steps i.on { background: var(--red); }
.onb h1 { margin-bottom: 8px; }
.onb .opts { display: grid; gap: 10px; margin-top: 22px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); text-align: left; width: 100%; }
.opt .emo { font-size: 26px; }
.opt b { display: block; }
.opt.on { border-color: var(--red); background: color-mix(in srgb, var(--red) 12%, var(--surface)); }
.onb .foot { margin-top: auto; padding-top: 24px; }
.brand-splash { text-align: center; padding: 28px 0 10px; }
.brand-splash .mark { width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 26px; background: var(--red); display: grid; place-items: center; box-shadow: 0 20px 50px -12px var(--red-glow); }
.brand-splash .mark svg { width: 54px; height: 54px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.brand-splash h1 { font-size: 44px; }
.brand-splash h1 span { color: var(--red-2); }

/* ---------- player ---------- */
.player { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.player .top { display: flex; align-items: center; gap: 12px; }
.player .top .progress { flex: 1; }
.player .phase-tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red-2); }
.player h2 { font-size: 28px; margin: 4px 0 2px; }
.target { display: flex; gap: 10px; margin-top: 14px; }
.target > div { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.target small { display: block; font-size: 11px; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.target b { font-family: var(--display); font-size: 26px; font-weight: 800; }
.logger { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.stepper { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stepper button { width: 44px; height: 56px; font-size: 22px; color: var(--red-2); font-weight: 700; }
.stepper div { flex: 1; text-align: center; }
.stepper input { width: 100%; background: none; border: 0; outline: none; text-align: center; font-family: var(--display); font-size: 26px; font-weight: 800; padding: 0; }
.stepper small { display: block; font-size: 10px; color: var(--faint); font-weight: 600; text-transform: uppercase; margin-top: -2px; }
.player .actions { margin-top: auto; padding-top: 16px; display: grid; gap: 10px; }
.timer { display: grid; place-items: center; margin: 12px auto 0; position: relative; width: 190px; height: 190px; }
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 10; }
.timer .track { stroke: var(--surface-3); }
.timer .bar { stroke: var(--red); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.timer b { font-family: var(--display); font-size: 58px; font-weight: 800; }
.timer small { position: absolute; bottom: 44px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.timer.small-t { width: 150px; height: 150px; }
.timer.small-t b { font-size: 44px; }
.timer.small-t small { bottom: 30px; }
.rest-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 0; }
.rest-screen h1 { font-size: 40px; color: var(--red-2); }
.rest-screen .timer { width: 230px; height: 230px; margin-top: 18px; }
.rest-screen .timer b { font-size: 72px; }
.next-up { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); width: 100%; text-align: left; margin-top: 26px; }
.next-up .thumb { width: 60px; }
.note { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(225, 29, 42, .1); border: 1px solid rgba(225, 29, 42, .3); font-size: 13px; color: #ffc9cc; }
.done-screen { text-align: center; padding-top: 30px; }
.done-screen .trophy { font-size: 72px; }
.done-screen h1 { font-size: 42px; margin: 10px 0 6px; }

/* ---------- progress ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.cal .h { font-size: 11px; color: var(--faint); font-weight: 700; padding-bottom: 4px; }
.cal .d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font-size: 13px; color: var(--muted); background: var(--surface); }
.cal .d.on { background: var(--red); color: #fff; font-weight: 700; }
.cal .d.today { box-shadow: inset 0 0 0 1.5px var(--red-2); }
.hist { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.hist + .hist { margin-top: 8px; }
.hist .date { width: 46px; text-align: center; flex: none; }
.hist .date b { display: block; font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 1; }
.hist .date span { font-size: 11px; color: var(--red-2); font-weight: 700; text-transform: uppercase; }
.spark { width: 100%; height: 90px; }
.pr { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pr:last-child { border-bottom: 0; }

.install { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--red-dark); }
.disclaimer { font-size: 12px; color: var(--faint); text-align: center; margin-top: 32px; }

@media (min-width: 720px) {
  #app { padding-top: 28px; }
}

/* ---------- menus segmentados ---------- */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.seg a { flex: 1; text-align: center; padding: 10px 6px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--muted); transition: background .2s, color .2s; white-space: nowrap; }
.seg a.on { background: var(--red); color: #fff; box-shadow: 0 6px 18px -8px var(--red-glow); }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.lbl { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }

/* ---------- ferramentas ---------- */
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .tools { grid-template-columns: repeat(4, 1fr); } .tools.two { grid-template-columns: repeat(2, 1fr); } }
.tool { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; background: linear-gradient(160deg, #1a0a0c, var(--surface) 60%); border: 1px solid var(--line); cursor: pointer; transition: transform .12s, border-color .2s; }
.tool:active { transform: scale(.97); }
.tool:hover { border-color: var(--red-dark); }
.tool span { font-size: 26px; margin-bottom: 6px; }
.tool b { font-size: 14px; }
.tool em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.create { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px; border-radius: 18px; background: var(--surface); border: 1.5px dashed var(--red-dark); color: var(--text); }
.create:first-child { border-style: solid; border-color: var(--red); background: linear-gradient(160deg, #2a0508, var(--surface) 70%); }
.create span { font-size: 28px; }
.create b { font-size: 15px; }
.create em { font-style: normal; font-size: 12px; color: var(--muted); line-height: 1.35; }
.wcard { margin-bottom: 10px; }
.group-label button { background: none; }

/* ---------- corpo ---------- */
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.metric.wide { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.metric span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.metric b { font-family: var(--display); font-size: 32px; font-weight: 800; line-height: 1; }
.metric b small { font-size: 15px; color: var(--muted); margin-left: 3px; }
.metric em { font-style: normal; font-size: 12px; color: var(--muted); }
.metric em.down { color: #4ade80; }
.metric em.up { color: var(--red-2); }
.chart { width: 100%; height: auto; display: block; }
.chart .ct { font-size: 10px; fill: var(--faint); }
.chart .cv { font-size: 12px; font-weight: 700; fill: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid label { font-size: 12px; color: var(--muted); font-weight: 600; }
.form-grid .input { margin-top: 5px; height: 46px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare figure, .photos figure { margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.compare img, .photos img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.compare figcaption, .photos figcaption { padding: 7px 10px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos .mini-btn { width: 26px; height: 26px; }

/* ---------- nutrição / água / rotina ---------- */
.kcal { font-family: var(--display); font-size: 56px; font-weight: 800; line-height: 1; margin: 6px 0 4px; }
.kcal small { font-size: 22px; color: var(--muted); }
.water .big { font-family: var(--display); font-size: 30px; font-weight: 800; }
.water .big small { font-size: 15px; color: var(--muted); }
.drop { width: 58px; height: 58px; border-radius: 50%; background: conic-gradient(#3b82f6 var(--p), var(--surface-3) 0); display: grid; place-items: center; position: relative; flex: none; }
.drop::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.drop span { position: relative; font-size: 12px; font-weight: 800; }
.ring-s { flex: none; width: 58px; height: 58px; border-radius: 50%; background: conic-gradient(var(--red) var(--p), var(--surface-3) 0); display: grid; place-items: center; position: relative; }
.ring-s::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #120707; }
.ring-s span { position: relative; font-size: 13px; font-weight: 800; }
.habit-sum { display: flex; align-items: center; gap: 14px; }
.habit { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); text-align: left; transition: border-color .2s, background .2s; }
.habit .emo { font-size: 24px; }
.habit .check-b { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--surface-3); display: grid; place-items: center; font-weight: 800; flex: none; }
.habit.on { border-color: var(--red); background: color-mix(in srgb, var(--red) 10%, var(--surface)); }
.habit.on .check-b { background: var(--red); border-color: var(--red); color: #fff; }
.macro + .macro { margin-top: 10px; }

/* ---------- editor ---------- */
.note-in { height: 38px; margin-top: 8px; font-size: 13px; }
.toggle { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.toggle input { display: none; }
.toggle > span { flex: none; width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .2s; }
.toggle > span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + span { background: var(--red); }
.toggle input:checked + span::after { transform: translateX(18px); }

/* ---------- sugestão de carga ---------- */
.sug { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.sug.go { border-color: #166534; background: rgba(34, 197, 94, .08); }
.sug button { text-align: left; color: #86efac; padding: 0; }
.sug.used button { opacity: .5; }
.gen-intro h3 { margin-bottom: 4px; }

/* ---------- instalação ---------- */
.install { width:100%; display:flex; align-items:center; gap:12px; margin-top:14px; padding:12px 14px; border-radius:16px; background:linear-gradient(135deg, #2a0508, var(--surface) 70%); border:1px solid var(--red-dark); color:var(--text); text-align:left; }
.install img { border-radius:12px; flex:none; }
.install b { font-size:15px; }
.inst-top { display:flex; gap:14px; align-items:center; }
.inst-top img { border-radius:16px; flex:none; box-shadow:0 10px 26px rgba(225,29,42,.35); }
.inst-top h2 { font-size:24px; }
.ist-list { margin-top:16px; display:grid; gap:10px; }
.ist { display:flex; align-items:center; gap:12px; padding:12px; border-radius:14px; background:var(--surface-2); border:1px solid var(--line); font-size:14.5px; line-height:1.35; }
.ist b { color:#fff; }
.ist-n { flex:none; width:28px; height:28px; border-radius:50%; background:var(--red); color:#fff; display:grid; place-items:center; font-weight:800; font-size:14px; }
.ist-ic { flex:none; width:38px; height:38px; border-radius:10px; background:#0d0d0d; border:1px solid var(--line); display:grid; place-items:center; color:#4ea1ff; }
.ist-ic svg { width:22px; height:22px; }
.inst-perks { display:flex; flex-wrap:wrap; justify-content:center; gap:8px 14px; margin-top:14px; font-size:12px; color:var(--muted); }
.inst-arrow { position:fixed; left:50%; z-index:60; width:54px; height:54px; margin-left:-27px; border-radius:50%; background:var(--red); color:#fff; display:grid; place-items:center; box-shadow:0 10px 30px rgba(225,29,42,.6); animation:ibounce 1.2s ease-in-out infinite; pointer-events:none; }
.inst-arrow svg { width:26px; height:26px; }
.inst-arrow.bottom { bottom:calc(8px + env(safe-area-inset-bottom)); }
.inst-arrow.top { top:calc(8px + env(safe-area-inset-top)); left:auto; right:14px; margin:0; }
@keyframes ibounce { 0%, 100% { transform:translateY(0); } 50% { transform:translateY(8px); } }
.inst-arrow.top { animation-name:ibounceUp; }
@keyframes ibounceUp { 0%, 100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }
.btn.pulse { animation:pbreath 2.6s ease-in-out infinite; }
@keyframes pbreath { 0%, 100% { transform:scale(1); } 50% { transform:scale(1.025); } }

.pw { position: relative; }
.pw .input { padding-right: 92px; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font: 600 13px/1 inherit; padding: 10px; cursor: pointer; }
