/* D45 · Código Masculino — identidade visual: azul-noite, branco-aço e ciano elétrico do logotipo */
:root {
  --bg: #04080d; --bg2: #08111a; --card: #0b151f; --card2: #0f1c29; --card3: #152739;
  --line: rgba(140, 200, 235, .13); --line2: rgba(25, 212, 255, .38);
  --text: #eef4f8; --muted: #9aaebf; --dim: #637789;
  --cyan: #19d4ff; --cyan-d: #0a9fd1; --cyan-soft: rgba(25, 212, 255, .12); --glow: 0 0 22px rgba(25, 212, 255, .35);
  --warn: #ffb547; --danger: #ff6170; --gold: #ffd166;
  --r: 18px; --r2: 24px;
  --head: "Chakra Petch", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 74px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.45;
  background-image: radial-gradient(rgba(25, 212, 255, .07) 1px, transparent 1.4px), radial-gradient(ellipse at 50% -10%, rgba(25, 212, 255, .10), transparent 60%);
  background-size: 22px 22px, 100% 100%; background-attachment: fixed; min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--head); font-style: italic; font-weight: 700; letter-spacing: .01em; margin: 0; line-height: 1.12; }
h1 { font-size: 30px; } h2 { font-size: 23px; } h3 { font-size: 19px; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 14px; } .tiny { font-size: 12.5px; }
.center { text-align: center; } .right { text-align: right; }
.upper { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 600; font-family: var(--head); }
.cyan { color: var(--cyan); }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 12px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.gap8 { gap: 8px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mb8 { margin-bottom: 8px; }
.ico { width: 24px; height: 24px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 18px; height: 18px; } .ico.lg { width: 30px; height: 30px; }

/* ---------- estrutura ---------- */
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(4, 8, 13, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: 1; min-width: 0; }
.topbar .brand img { width: 40px; height: 40px; }
.topbar .brand b { font-family: var(--head); font-style: italic; font-size: 15.5px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; flex: none; }
.topbar .title { font-family: var(--head); font-style: italic; font-weight: 700; font-size: 20px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line2); background: rgba(25, 212, 255, .06); display: grid; place-items: center; color: var(--cyan); cursor: pointer; flex: none; text-decoration: none; }
.iconbtn:active { transform: scale(.95); }
main { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.demo-strip { background: linear-gradient(90deg, rgba(255, 181, 71, .18), rgba(255, 181, 71, .06)); border-bottom: 1px solid rgba(255, 181, 71, .35); color: #ffd79a; font-size: 13.5px; padding: 7px 16px; text-align: center; }
.demo-strip button { background: none; border: 0; color: #ffd79a; text-decoration: underline; cursor: pointer; padding: 0 2px; font-size: 13.5px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(6, 12, 19, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.nav .in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--muted); font-size: 12.5px; font-weight: 600; position: relative; }
.nav a .ico { width: 26px; height: 26px; }
.nav a.on { color: var(--cyan); }
.nav a.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 4px 4px; background: var(--cyan); box-shadow: var(--glow); }

/* ---------- cartões ---------- */
.card { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px; position: relative; }
.card.glow { border-color: var(--line2); box-shadow: 0 0 0 1px rgba(25, 212, 255, .08), 0 10px 40px -18px rgba(25, 212, 255, .45); }
.card.flat { background: var(--card); }
.card.tight { padding: 14px; }
.card h2 + p, .card h3 + p { margin-top: 6px; }
.card p { margin: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px -4px; }
.section-title h2 { font-size: 21px; }
.section-title a, .linkbtn { color: var(--cyan); font-weight: 600; font-size: 15px; text-decoration: none; background: none; border: 0; cursor: pointer; padding: 8px 0; }
.hero-greet .upper { color: var(--muted); }
.hero-greet h1 { font-size: 29px; }
.hero-greet h1 span { color: var(--cyan); }
.daybar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.daybar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan-d), var(--cyan)); border-radius: 8px; box-shadow: var(--glow); transition: width .5s ease; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--cyan-soft); color: var(--cyan); font-size: 13.5px; font-weight: 700; font-family: var(--head); white-space: nowrap; }
.pill.gray { background: rgba(255, 255, 255, .06); color: var(--muted); }
.pill.warn { background: rgba(255, 181, 71, .14); color: var(--warn); }
.pill.gold { background: rgba(255, 209, 102, .14); color: var(--gold); }

/* anel de progresso */
.ringwrap { display: grid; place-items: center; position: relative; margin: 4px auto; width: 210px; height: 210px; }
.ringwrap svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ringwrap .val { text-align: center; }
.ringwrap .val b { display: block; font-family: var(--head); font-style: italic; font-size: 54px; line-height: 1; color: var(--cyan); text-shadow: 0 0 22px rgba(25, 212, 255, .45); }
.ringwrap .val span { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.stat .k { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.stat .k .ico { color: var(--cyan); width: 20px; height: 20px; }
.stat .v { font-family: var(--head); font-style: italic; font-weight: 700; font-size: 26px; margin-top: 4px; }
.stat .v small { font-size: 16px; color: var(--muted); font-style: normal; }

/* missões */
.mission { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; transition: border-color .2s, background .2s; }
.mission.done { border-color: var(--line2); background: linear-gradient(180deg, rgba(25, 212, 255, .08), rgba(25, 212, 255, .02)); }
.mission .body { flex: 1; min-width: 0; }
.mission .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mission .head h3 { font-family: var(--body); font-style: normal; font-weight: 700; font-size: 18px; }
.mission .desc { color: var(--muted); font-size: 15px; margin-top: 4px; }
.mission.tap { cursor: pointer; }
.check { width: 46px; height: 46px; border-radius: 50%; border: 2.5px solid rgba(154, 174, 191, .45); display: grid; place-items: center; flex: none; background: transparent; cursor: pointer; color: transparent; padding: 0; }
.check .ico { width: 26px; height: 26px; stroke-width: 3; }
.check.on { border-color: var(--cyan); background: var(--cyan); color: #03121b; box-shadow: var(--glow); }
.check.auto { cursor: default; }
.mission .micon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--cyan-soft); color: var(--cyan); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .03); cursor: pointer; font-weight: 600; font-size: 15px; }
.chip .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid rgba(154, 174, 191, .5); display: grid; place-items: center; }
.chip .box .ico { width: 15px; height: 15px; stroke-width: 3.4; opacity: 0; }
.chip.on { border-color: var(--line2); background: var(--cyan-soft); color: #dff8ff; }
.chip.on .box { background: var(--cyan); border-color: var(--cyan); color: #03121b; }
.chip.on .box .ico { opacity: 1; }
.chip.sel { border-color: var(--cyan); background: var(--cyan-soft); color: var(--cyan); }
.water { margin-top: 12px; }
.water .nums { display: flex; justify-content: space-between; font-weight: 700; font-family: var(--head); font-size: 17px; margin-bottom: 8px; }
.water .ctrl { display: flex; gap: 10px; margin-top: 12px; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 12px 20px; border-radius: 16px; border: 1.5px solid transparent; font-weight: 700; font-size: 17px; cursor: pointer; text-decoration: none; text-align: center; transition: transform .08s, filter .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { background: linear-gradient(180deg, #3fe0ff, var(--cyan) 45%, #0fb8e6); color: #02121b; box-shadow: 0 8px 26px -10px rgba(25, 212, 255, .8); }
.btn.secondary { background: rgba(25, 212, 255, .08); border-color: var(--line2); color: var(--cyan); }
.btn.ghost { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--text); }
.btn.danger { background: rgba(255, 97, 112, .1); border-color: rgba(255, 97, 112, .45); color: #ff9aa4; }
.btn.block { width: 100%; }
.btn.sm { min-height: 44px; padding: 8px 10px; font-size: 15px; border-radius: 13px; gap: 6px; }
.btnrow { display: flex; gap: 10px; } .btnrow > * { flex: 1; min-width: 0; }
.btn { line-height: 1.2; }

/* formulários */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; font-size: 15px; color: #cfdbe5; }
.field small { color: var(--dim); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 54px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #070f17; font-size: 17px; outline: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(25, 212, 255, .15); }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 24px, calc(100% - 14px) 24px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.checkline { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 10px 0; }
.checkline input { width: 24px; height: 24px; margin-top: 1px; accent-color: var(--cyan); flex: none; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: #070f17; border: 1px solid var(--line); border-radius: 16px; padding: 5px; }
.seg button { min-height: 46px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; font-size: 15.5px; }
.seg button.on { background: var(--cyan); color: #02121b; }
.err { color: #ff9aa4; font-size: 15px; }
.note { background: rgba(255, 181, 71, .08); border: 1px solid rgba(255, 181, 71, .3); color: #ffe0ad; border-radius: 16px; padding: 12px 14px; font-size: 15px; }
.info { background: var(--cyan-soft); border: 1px solid var(--line2); color: #d5f6ff; border-radius: 16px; padding: 12px 14px; font-size: 15px; }

/* listas */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.li:last-child { border-bottom: 0; }
.li.link { cursor: pointer; }
.li .chev { color: var(--dim); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--card3); display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-style: italic; color: var(--cyan); overflow: hidden; flex: none; border: 1.5px solid var(--line2); font-size: 18px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 84px; height: 84px; font-size: 34px; }
.pos { width: 34px; text-align: center; font-family: var(--head); font-style: italic; font-weight: 700; font-size: 20px; color: var(--muted); flex: none; }
.pos.p1 { color: var(--gold); } .pos.p2 { color: #d9e2ea; } .pos.p3 { color: #e0a36f; }
.li.me { background: var(--cyan-soft); border-radius: 14px; padding-left: 8px; padding-right: 8px; border-bottom-color: transparent; }
.pts { font-family: var(--head); font-style: italic; font-weight: 700; font-size: 20px; }
.pts small { font-size: 13px; font-style: normal; color: var(--muted); font-weight: 600; }
.mini-missions { display: flex; gap: 4px; margin-top: 4px; }
.mini-missions i { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: var(--dim); }
.mini-missions i.on { background: var(--cyan-soft); color: var(--cyan); }
.mini-missions .ico { width: 13px; height: 13px; }

/* desafios */
.ch-card { overflow: hidden; padding: 0; cursor: pointer; color: inherit; text-decoration: none; display: block; }
.ch-card .cover { height: 110px; background-size: cover; background-position: center 35%; position: relative; }
.ch-card .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 8, 13, 0), rgba(11, 21, 31, 1)); }
.ch-card .cover .tag { position: absolute; left: 14px; top: 12px; z-index: 1; }
.ch-card .inner { padding: 4px 18px 18px; margin-top: -26px; position: relative; z-index: 1; }
.cover-lg { height: 170px; border-radius: var(--r2); background-size: cover; background-position: center 35%; border: 1px solid var(--line); position: relative; overflow: hidden; }
.cover-lg::before, .cover-lg::after { content: ""; position: absolute; width: 10px; height: 70px; background: var(--cyan); }
.cover-lg::before { left: 0; top: 0; } .cover-lg::after { right: 0; bottom: 0; }

/* mural */
.post { border-bottom: 1px solid var(--line); padding: 14px 0; }
.post:last-child { border-bottom: 0; }
.post .ph { border-radius: 16px; margin-top: 10px; max-height: 560px; width: 100%; object-fit: cover; border: 1px solid var(--line); }
.post .txt { margin-top: 8px; white-space: pre-wrap; word-wrap: break-word; }
.reacts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.react { min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .03); font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.react.on { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-soft); }
.react b { font-family: var(--head); }
.codebox { font-family: var(--head); font-style: italic; font-weight: 700; font-size: 38px; letter-spacing: .18em; color: var(--cyan); text-shadow: var(--glow); text-align: center; padding: 8px 0; }

/* medalhas */
.medals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.medal { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.medal .badge { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; position: relative; background: rgba(255, 255, 255, .04); border: 2px dashed rgba(154, 174, 191, .3); color: var(--dim); }
.medal .badge .ico { width: 32px; height: 32px; }
.medal .badge .lock { position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px; border-radius: 50%; background: var(--card3); display: grid; place-items: center; border: 1px solid var(--line); }
.medal .badge .lock .ico { width: 15px; height: 15px; }
.medal.on { border-color: var(--line2); background: linear-gradient(180deg, rgba(25, 212, 255, .1), var(--card)); }
.medal.on .badge { border: 0; background: radial-gradient(circle at 35% 30%, #c9f6ff, var(--cyan) 55%, #0a6f95); color: #03121b; box-shadow: var(--glow); }
.medal b { font-family: var(--head); font-style: italic; font-size: 17px; }
.medal .how { font-size: 13.5px; color: var(--muted); line-height: 1.3; }
.medal .daybar { width: 100%; height: 6px; }

/* gráficos */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--body); }
.metric-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.metric-chips::-webkit-scrollbar { display: none; }
.metric-chips .chip { min-height: 40px; white-space: nowrap; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
table.tbl th, table.tbl td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.tbl th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* folha (modal) */
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .25s ease; }
.sheet .grab { width: 44px; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .18); margin: 2px auto 12px; }
.sheet .sh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet .x { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; flex: none; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 60; background: #e9fbff; color: #03121b; padding: 12px 18px; border-radius: 14px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: calc(100% - 32px); text-align: center; animation: up .2s; }
.toast.bad { background: #ffd4d8; color: #3a0409; }
.loading { display: grid; place-items: center; padding: 60px 0; color: var(--muted); }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(25, 212, 255, .2); border-top-color: var(--cyan); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* entrada */
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth .banner { height: 150px; background: url(img/banner.jpg) 30% center / cover; position: relative; }
.auth .banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 8, 13, .1), var(--bg)); }
.auth .logo { width: 160px; height: 160px; margin: -70px auto 0; position: relative; z-index: 1; filter: drop-shadow(0 0 24px rgba(25, 212, 255, .35)); }
.auth .box { padding: 8px 18px 40px; max-width: 480px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.photo-prev { width: 100%; max-height: 420px; object-fit: contain; background: #000; border-radius: 16px; border: 1px solid var(--line2); }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumbs .t { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.thumbs .t img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .t button { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.card-canvas { width: 100%; max-width: 300px; margin: 0 auto; display: block; border-radius: 18px; border: 1px solid var(--line2); box-shadow: 0 16px 50px -20px rgba(25, 212, 255, .6); }
.celebrate { text-align: center; border-color: var(--line2); background: radial-gradient(ellipse at 50% 0%, rgba(25, 212, 255, .22), var(--card) 70%); }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 16px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv b { text-align: right; }
.big-num { font-family: var(--head); font-style: italic; font-weight: 700; font-size: 44px; color: var(--cyan); line-height: 1; text-shadow: var(--glow); }
/* análise de foto do prato */
.est-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.est-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: inherit; font: inherit; font-size: 15px; text-align: left; cursor: pointer; width: 100%; }
.est-row .ico { color: var(--cyan); }
.est-row b { font-family: var(--head); color: var(--text); white-space: nowrap; }
.est-row .chev { color: var(--dim); }
.est-day { margin-top: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.est-day b { color: var(--text); }
.est-items { display: flex; flex-direction: column; }
.est-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.est-item:last-child { border-bottom: 0; }
.est-item b.grow { font-size: 15.5px; line-height: 1.3; }
.est-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-top: 4px; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wt { display: flex; align-items: center; gap: 4px; flex: none; color: var(--muted); font-size: 14px; }
.wt input { width: 72px; min-height: 40px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); color: var(--text); font: inherit; font-size: 16px; text-align: right; }
.wt input:focus { outline: none; border-color: var(--cyan); }
.wt input:disabled { opacity: .5; }
.iconbtn.sm { width: 36px; height: 36px; color: var(--muted); border-color: var(--line); background: transparent; }
.tiny-pill { font-size: 11px; padding: 2px 7px; vertical-align: 2px; }
.macro-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.macro-grid div { background: rgba(255, 255, 255, .04); border-radius: 12px; padding: 8px 6px; text-align: center; }
.macro-grid span { display: block; font-size: 11.5px; color: var(--muted); }
.macro-grid b { display: block; margin-top: 2px; font-family: var(--head); font-size: 16px; }
@media (max-width: 380px) { .macro-grid { grid-template-columns: repeat(2, 1fr); } .wt input { width: 64px; } }
/* desafio entre grupos */
.liga-cover { background: radial-gradient(circle at 18% 120%, rgba(25, 212, 255, .38), transparent 55%), radial-gradient(circle at 92% -20%, rgba(255, 209, 102, .22), transparent 50%), linear-gradient(135deg, #0d2233, #04080d); }
.vs { position: absolute; right: 16px; top: 4px; z-index: 1; font-family: var(--head); font-style: italic; font-weight: 700; font-size: 58px; line-height: 1; letter-spacing: -.02em; color: rgba(25, 212, 255, .22); pointer-events: none; }
.liga-home { text-decoration: none; color: inherit; border-color: var(--line2); }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; margin-top: 16px; }
.podium.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pcol { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.pname { font-weight: 700; font-size: 14.5px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pval { font-family: var(--head); font-style: italic; font-weight: 700; font-size: 26px; color: var(--text); margin-top: 4px; font-variant-numeric: tabular-nums; }
.punit { font-size: 11px; color: var(--muted); line-height: 1.2; }
.pblk { width: 100%; margin-top: 8px; border-radius: 14px 14px 6px 6px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); display: grid; place-items: start center; padding-top: 8px; }
.pblk span { font-family: var(--head); font-style: italic; font-weight: 700; font-size: 22px; color: var(--muted); }
.pcol.p1 .pblk { height: 96px; background: linear-gradient(180deg, rgba(255, 209, 102, .22), rgba(255, 209, 102, .04)); border-color: rgba(255, 209, 102, .45); }
.pcol.p1 .pblk span { color: var(--gold); font-size: 28px; }
.pcol.p2 .pblk { height: 70px; }
.pcol.p3 .pblk { height: 52px; }
.pcol.mine .pname { color: var(--cyan); }
.pcol.mine .pblk { box-shadow: inset 0 0 0 2px var(--cyan), var(--glow); }
.race-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.race-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.race-legend i { width: 18px; height: 0; border-top: 2.5px solid; display: inline-block; }
.race-legend .l-mine { border-color: var(--cyan); }
.race-legend .l-lead { border-top-style: dashed; border-color: #dfe8ef; }
.race-legend .l-other { border-color: rgba(154, 174, 191, .5); border-top-width: 1.5px; }
.race-read { min-height: 18px; color: var(--muted); }
.race-read b { color: var(--text); }
.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dest { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 16px; padding: 12px; min-width: 0; }
.dest.mine { border-color: var(--line2); background: var(--cyan-soft); }
.dest > b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest ol { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: d; display: flex; flex-direction: column; gap: 4px; }
.dest li { counter-increment: d; display: flex; gap: 6px; font-size: 14px; align-items: baseline; }
.dest li::before { content: counter(d) "º"; color: var(--dim); font-family: var(--head); font-style: italic; font-weight: 700; width: 22px; flex: none; }
.dest li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest li b { font-variant-numeric: tabular-nums; }
/* ---------- v3: senha com olho ---------- */
.pw { position: relative; }
.pw input { padding-right: 58px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 48px; height: 46px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; border-radius: 12px; }
.pw-eye[aria-pressed="true"] { color: var(--cyan); }
.pw-eye:focus-visible { outline: 2px solid var(--cyan); }

/* ---------- v3: ajustar foto (arrastar, zoom, girar) ---------- */
.adj { display: flex; flex-direction: column; align-items: center; }
.adj-view { position: relative; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #000; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; border: 1.5px solid var(--line2); max-width: 100%; }
.adj-view:active { cursor: grabbing; }
.adj-view canvas { display: block; }
.adj-mask { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  background-image: linear-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .14) 1px, transparent 1px); background-size: 33.34% 33.34%; background-position: -1px -1px; }
.adj-view.round .adj-mask { background: radial-gradient(circle closest-side, transparent 98.5%, rgba(4, 8, 13, .62) 100%); box-shadow: none; }
.adj-asp { justify-content: center; }
.adj-ctrl { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 14px; }
.adj-ctrl input[type=range] { flex: 1; min-width: 60px; }
.adj-ctrl .btn.ghost.sm { width: 44px; padding: 0; flex: none; }
.adj .btnrow { width: 100%; }
input[type=range] { accent-color: var(--cyan); height: 32px; }

/* ---------- v3: várias atividades no dia ---------- */
.act-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.act-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--text); text-align: left; cursor: pointer; font-size: 15.5px; }
.act-row .ico { color: var(--cyan); flex: none; }
.act-row .ico:last-child { color: var(--muted); }
.act-row:active { transform: scale(.99); }

/* ---------- v3: sono ---------- */
.sleep { margin-top: 12px; }
.sleep-val { font-family: var(--head); font-style: italic; font-weight: 700; font-size: 28px; color: var(--cyan); text-shadow: var(--glow); }
.sleep-range { width: 100%; margin-top: 6px; height: 40px; }
.sleep-scale { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--dim); margin-top: -4px; }

/* ---------- v3: plano alimentar ---------- */
.plan-items { margin: 10px 0 0; padding-left: 22px; }
.plan-items li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.plan-items li:last-child { border-bottom: 0; }
.plan-items li::marker { color: var(--cyan); }
.plan-sub { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--cyan-soft); font-size: 14.5px; }
.plan-edit { border: 1.5px solid var(--line); }
.plan-edit textarea { min-height: 110px; }

/* ---------- v3: painel do nutricionista ---------- */
.pat-card { display: block; text-decoration: none; color: inherit; }
.pat-card:active { transform: scale(.995); }
.pat-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pat-stats > div { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; }
.pat-stats span { font-size: 12.5px; color: var(--muted); }
.pat-stats b { font-size: 17px; }
.pat-stats small { font-size: 12.5px; color: var(--muted); }
.pat-stats small.cyan { color: var(--cyan); }

/* ---------- v4: abas com links, suplementação, imagem do desafio, convite ---------- */
.seg.tabs-links, .seg.ptabs { margin-bottom: 2px; }
.seg a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border-radius: 12px; color: var(--muted); font-weight: 700; font-size: 15.5px; text-decoration: none; }
.seg a.on { background: var(--cyan); color: #02121b; }
.seg.ptabs button { font-size: 14.5px; padding: 0 4px; line-height: 1.15; }
.supp .row { align-items: center; }
.supp-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--cyan-soft); color: var(--cyan); flex: none; }
.supp h2 { font-size: 21px; }
.supp-dose { font-family: var(--head); font-style: italic; font-weight: 700; font-size: 22px; color: var(--cyan); margin-top: 4px; }
.supp-edit { border: 1.5px solid var(--line); transition: border-color .2s; }
.supp-edit.on { border-color: var(--line2); }
.supp-edit .checkline b { font-size: 17px; }
.cover-prev { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; border: 1px solid var(--line2); display: block; }
.cv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ch-card .cover.has-img { background: #04080d; }
.cover-lg.has-img { background: #04080d; height: auto; aspect-ratio: 16 / 9; max-height: 260px; }
.cover-lg.has-img::before, .cover-lg.has-img::after { z-index: 1; }
.cover-edit { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border-radius: 12px;
  border: 1px solid var(--line2); background: rgba(4, 8, 13, .78); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.avatar.cv-thumb { border-color: var(--line2); }
.invite-prev { width: 100%; max-width: 360px; margin: 0 auto; display: block; border-radius: 16px; border: 1px solid var(--line2); }

@media (max-width: 360px) { body { font-size: 16px; } .nav a { font-size: 11.5px; } .grid3 { grid-template-columns: 1fr 1fr; } h1 { font-size: 26px; } }
