/* Layout: coluna de celular com o sol da logo como painel do dia; o resto são blocos de tarefa empilhados sobre fundo branco.
   Tema único de marca: branco, tiffany e pink, como a logo. */
:root {
  --bg: #FFFFFF;
  --areia: #F4FBFB;
  --ink: #1F2A2E;
  --muted: #566567;
  --line: #D6E8E7;
  --tiffany: #0ABAB5;
  --tiffany-forte: #06716E;
  --tiffany-suave: #DDF6F5;
  --pink: #F2457F;
  --pink-forte: #C42A60;
  --pink-suave: #FFE1EC;
  --display: "Archivo Black", "Arial Black", sans-serif;
  --script: "Fraunces", Georgia, serif;
  --body: "Archivo", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--tiffany-forte); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.app { max-width: 480px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }

/* Faixa de demonstração */
.demo { background: var(--ink); color: #fff; font-size: 13px; }
.demo > div { max-width: 480px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.demo strong { font-weight: 600; flex: 1 1 0; }
.demo .passo { display: inline-flex; align-items: center; gap: 2px; }
.demo button { background: rgba(255, 255, 255, .14); border: 0; color: #fff; border-radius: 8px; min-width: 34px; min-height: 34px; padding: 0 9px; }
.demo .qual { min-width: 66px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Topo */
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
.marca { display: flex; align-items: center; gap: 8px; min-width: 0; }
.marca svg { width: 42px; height: 29px; flex: none; }
.marca .v { font-family: var(--display); color: var(--tiffany-forte); font-size: 20px; line-height: 1; letter-spacing: -.3px; }
.marca .s { font-family: var(--script); font-style: italic; font-weight: 600; color: var(--pink-forte); font-size: 17px; line-height: 1; display: inline-block; transform: rotate(-4deg); margin-left: 4px; white-space: nowrap; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--pink-suave); color: var(--pink-forte); font-weight: 700; flex: none; }

/* Painel do dia */
.painel { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sol { width: 100%; max-width: 330px; display: block; }
.sol .num { font-family: var(--display); fill: #fff; }
.painel h1 { font-family: var(--display); font-size: 30px; line-height: 1.05; letter-spacing: -.5px; font-weight: 400; text-wrap: balance; }
.painel .data { color: var(--muted); font-size: 15px; }
.fase { background: var(--areia); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; }
.fase b { color: var(--tiffany-forte); }

.avisoDia { background: var(--pink-suave); color: #6e1537; border-radius: 12px; padding: 10px 14px; font-size: 14.5px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.avisoDia button { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; white-space: nowrap; padding: 4px 0; }
.turma { background: var(--tiffany-suave); color: #074a48; border-radius: 12px; padding: 10px 14px; font-size: 14.5px; font-weight: 500; }

/* Barra do dia */
.barra { height: 10px; background: var(--tiffany-suave); border-radius: 99px; overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--tiffany); border-radius: 99px; transition: width .25s; }
.barra.p i { background: var(--pink); }
.resumoDia { display: flex; flex-direction: column; gap: 6px; }
.resumoDia .l { display: flex; justify-content: space-between; align-items: baseline; font-size: 14.5px; font-weight: 600; }
.resumoDia .l span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Blocos */
.bloco { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.bloco.feito { background: var(--areia); }
.cab { display: flex; align-items: flex-start; gap: 12px; }
.cab .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--tiffany-suave); color: var(--tiffany-forte); display: grid; place-items: center; flex: none; }
.cab .ic.p { background: var(--pink-suave); color: var(--pink-forte); }
.cab .ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cab .tx { flex: 1; min-width: 0; }
.cab h2 { font-size: 16.5px; font-weight: 700; line-height: 1.25; }
.cab small { color: var(--muted); font-size: 14px; display: block; }
.tit { font-family: var(--display); font-weight: 400; font-size: 25px; line-height: 1.1; letter-spacing: -.3px; padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
.sub { color: var(--muted); font-size: 15px; }
.sec { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tiffany-forte); margin-top: 8px; }

.marcar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--tiffany); background: var(--bg); color: #fff; display: grid; place-items: center; flex: none; padding: 0; }
.marcar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.marcar[aria-pressed="true"] { background: var(--tiffany-forte); border-color: var(--tiffany-forte); }
.marcar[aria-pressed="true"] svg { opacity: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 0; background: var(--tiffany-forte); color: #fff; font-weight: 600; text-decoration: none; text-align: center; }
.btn.claro { background: var(--tiffany-suave); color: #074a48; }
.btn.linha { background: var(--bg); border: 1px solid var(--line); color: var(--ink); }
.btn[disabled], .btn.off { background: var(--areia); color: var(--muted); border: 1px dashed var(--line); cursor: default; font-weight: 500; }
.btn.larga { width: 100%; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.acoes > * { flex: 1 1 auto; }

/* Água */
.aguaN { font-family: var(--display); font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.aguaN span { font-family: var(--body); font-size: 14.5px; font-weight: 500; color: var(--muted); }
.copos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.copos button { min-height: 44px; border-radius: 12px; border: 1px solid var(--tiffany); background: var(--bg); color: var(--tiffany-forte); font-weight: 700; font-variant-numeric: tabular-nums; padding: 4px; }
.copos button:active { background: var(--tiffany-suave); }
.linkb { background: none; border: 0; padding: 6px 0; color: var(--tiffany-forte); font-weight: 600; font-size: 14px; text-decoration: underline; text-align: left; }

/* Cardio */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: 7px 12px; font-size: 14px; min-height: 36px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.linhaForm { display: flex; gap: 8px; align-items: stretch; }
.linhaForm label { flex: 1; min-width: 0; }
input[type=number], input[type=text], input[type=date], select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); min-height: 44px; }
textarea { min-height: 88px; resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #6d7b7d; }
.rot { font-size: 13.5px; font-weight: 600; display: block; margin-bottom: 4px; }
.lista { display: flex; flex-direction: column; }
.lista .it { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.lista .it b { font-variant-numeric: tabular-nums; }
.tirar { background: none; border: 0; color: var(--muted); font-size: 14px; text-decoration: underline; padding: 6px 0 6px 8px; }

/* Humor */
.humor { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.humor button { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 8px 2px; font-size: 12.5px; min-height: 44px; }
.humor button[aria-pressed="true"] { background: var(--pink-forte); border-color: var(--pink-forte); color: #fff; font-weight: 600; }

/* Treinos */
.diaL { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.diaL .n { font-family: var(--display); font-size: 21px; width: 34px; text-align: center; color: var(--tiffany-forte); flex: none; font-variant-numeric: tabular-nums; }
.diaL .tx { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.diaL .tx small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; }
.diaL.fut { opacity: .62; }
.diaL.hoje { background: var(--pink-suave); margin: 0 -14px; padding-left: 14px; padding-right: 14px; border-top-color: transparent; }
.diaL.hoje .n { color: var(--pink-forte); }
.diaL a { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* Dieta */
.exemplo { background: #FFF6D6; color: #5A4300; border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.refeicao ul { margin: 0; padding-left: 18px; font-size: 15px; }
.refeicao li + li { margin-top: 3px; }
.hora { font-variant-numeric: tabular-nums; }
details summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--tiffany-forte); padding: 4px 0; }
details p { font-size: 14.5px; color: var(--muted); padding-top: 4px; }

/* Mente */
.mente { background: var(--pink-suave); border-radius: 18px; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.mente .e { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pink-forte); }
.mente h2 { font-family: var(--script); font-style: italic; font-weight: 600; font-size: 29px; line-height: 1.1; color: #8f1c45; text-wrap: balance; }
.mente textarea { background: #fff; border-color: #f4bcd0; }
.relembra { background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 14.5px; }
.relembra b { display: block; font-size: 13px; color: var(--pink-forte); }
.privado { font-size: 13.5px; color: #6e1537; }
.entrada { border-top: 1px solid var(--line); padding: 4px 0; }
.entrada summary { color: var(--ink); font-size: 15px; padding: 8px 0; }
.entrada .quem { color: var(--pink-forte); font-variant-numeric: tabular-nums; margin-right: 4px; }

/* Evolução */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--areia); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.tile b { display: block; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile b small { font-family: var(--body); font-size: 14px; font-weight: 500; color: var(--muted); }
.tile span { font-size: 13.5px; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal .hd { font-size: 12px; color: var(--muted); text-align: center; font-weight: 600; }
.cal button { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); padding: 0; font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.cal button.c { background: var(--tiffany-forte); border-color: var(--tiffany-forte); color: #fff; }
.cal button.m { background: var(--tiffany-suave); border-color: var(--tiffany); color: #074a48; }
.cal button.h { outline: 3px solid var(--pink); outline-offset: 1px; }
.cal button[disabled] { color: #8d9a9c; background: var(--areia); border-style: dashed; cursor: default; }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--line); }
.grafico svg { width: 100%; display: block; }
.grafico text { font-family: var(--body); font-size: 11px; fill: var(--muted); }
.grafico .val { fill: var(--ink); font-weight: 600; }
.grafico rect.alvo { fill: transparent; cursor: pointer; }
.leitura { font-size: 14px; color: var(--muted); min-height: 20px; font-variant-numeric: tabular-nums; }
.ficha { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ficha th { font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: left; padding: 4px 4px 6px 0; }
.ficha td { border-top: 1px solid var(--line); padding: 6px 4px 6px 0; vertical-align: middle; }
.ficha td small { display: block; color: var(--muted); font-size: 12.5px; }
.ficha input { padding: 6px 8px; min-height: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.ficha td:nth-child(2), .ficha td:nth-child(3) { width: 74px; }
.ficha .dif { width: 44px; text-align: right; font-weight: 700; color: var(--tiffany-forte); font-variant-numeric: tabular-nums; }

/* Ranking */
.posN { font-family: var(--display); font-size: 16px; }
.rankL { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rankL:first-child { border-top: 0; }
.rankL .p { font-family: var(--display); font-size: 18px; width: 36px; color: var(--tiffany-forte); flex: none; }
.rankL .nm { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; }
.rankL .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.rankL b { font-family: var(--display); font-weight: 400; font-size: 18px; }
.rankL.lider .p { color: var(--pink-forte); }
.rankL.eu { background: var(--pink-suave); margin: 0 -14px; padding-left: 14px; padding-right: 14px; border-top-color: transparent; }
.rankL.eu + .rankL { border-top-color: transparent; }
.rankL.eu .p { color: var(--pink-forte); }

/* Navegação */
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); z-index: 20; }
.nav > div { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.nav button { background: none; border: 0; padding: 9px 2px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); }
.nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav button[aria-current="page"] { color: var(--pink-forte); font-weight: 700; }

/* Perfil */
.fundo { position: fixed; inset: 0; background: rgba(15, 35, 38, .5); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.caixa { background: var(--bg); width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; max-height: 92%; overflow-y: auto; }
.caixa h2 { font-family: var(--display); font-weight: 400; font-size: 22px; }

.final { background: var(--tiffany-forte); color: #fff; border-radius: 18px; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.final h2 { font-family: var(--script); font-style: italic; font-weight: 600; font-size: 30px; line-height: 1.1; }

.aviso { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(82px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14.5px; z-index: 60; max-width: 88vw; text-align: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Entrada */
.entrada-marca { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: calc(32px + env(safe-area-inset-top, 0px)); }
.entrada-marca svg { width: 170px; }
.entrada-marca .d { font-weight: 600; letter-spacing: .4em; font-size: 14px; color: var(--pink-forte); padding: 10px 0 2px .4em; }
.entrada-marca .v { font-family: var(--display); font-size: 68px; line-height: .95; letter-spacing: -1px; color: var(--tiffany-forte); }
.entrada-marca .s { font-family: var(--script); font-style: italic; font-weight: 600; font-size: 44px; line-height: 1; color: var(--pink-forte); transform: rotate(-4deg); margin-top: -6px; }
.entrada-marca .k { font-weight: 600; letter-spacing: .18em; font-size: 12px; color: var(--tiffany-forte); padding-top: 12px; }
.caixaEntrada { display: flex; flex-direction: column; gap: 14px; }
.erro { background: var(--pink-suave); color: #6e1537; border-radius: 12px; padding: 10px 14px; font-size: 14.5px; }
.centro { text-align: center; }
.aceite { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.aceite input { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.btn.perigo { background: var(--pink-forte); }
.btn:disabled { opacity: .7; cursor: default; }
.marcar:disabled { cursor: default; opacity: .6; }
textarea[readonly] { background: var(--areia); }
.humor button:disabled { cursor: default; opacity: .7; }

/* Painel */
.painelL .nm { background: none; border: 0; padding: 0; text-align: left; }
.alerta { color: var(--pink-forte); font-weight: 600; }
.detalhe { background: var(--areia); margin: 0 -14px; padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.rolar { overflow-x: auto; }
.rolar .ficha { font-size: 13px; min-width: 340px; }
.rolar .ficha td:nth-child(2), .rolar .ficha td:nth-child(3) { width: auto; }

/* Avaliação */
.avItem, .avForm { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.avItem h3, .avForm h3 { font-size: 15.5px; font-weight: 700; margin: 0; }
.avItem .linkb { padding: 2px 0; flex: none; }
.detalhe .bloco { background: var(--bg); }

/* Acesso do nutri */
.nutriNova { align-items: flex-end; }
.nutriNova > div { flex: 1; min-width: 0; }
.nutriNova .btn { flex: none; }
