/* Cão Tranquilo — app do plano de 14 dias (mobile-first, sem dependências).
   Cada perfil tem uma cor de destaque (body[data-p="..."]). Modo escuro automático.
   Também é usado pelo kit-enriquecimento.html (classes card, steps, badge, game__*, notice…). */

:root {
  --bg: #fbf8f3;
  --bg-2: #f4efe6;
  --surface: #ffffff;
  --surface-2: #f4f1ea;
  --text: #1f2430;
  --muted: #565d6b;
  --border: #e6e0d4;
  --danger: #b42318;
  --ok: #157a3c;
  --ok-soft: #e3f6e8;
  --grid: #ebe6dc;

  /* cor do perfil (padrão = verde-azulado da marca) */
  --pc: #0d7a6f;
  --pc-strong: #095d55;
  --pc-soft: #e2f4f1;
  --pc-ink: #ffffff;
  --pc-2: #3bb39f;

  /* cores de apoio (fundos suaves de ícones e cartões) */
  --c-yellow: #fff4cc;
  --c-green: #def5e5;
  --c-blue: #e3edff;
  --c-pink: #ffe6ef;
  --c-purple: #eee8ff;
  --c-orange: #ffecd9;
  --warn-soft: #fff1dc;
  --warn-ink: #7a4300;
  --avg: #c2410c;

  /* mascote */
  --dog-fur: #e9b46f;
  --dog-fur2: #b97b3a;
  --dog-light: #fff4e2;
  --dog-ink: #2a2019;
  --dog-tongue: #f27d93;
  --dog-cheek: #f6a3a3;

  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(31, 36, 48, .05), 0 6px 20px rgba(31, 36, 48, .07);
  --shadow-lg: 0 10px 30px rgba(31, 36, 48, .14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --nav-h: 64px;
  color-scheme: light dark;
}

[data-p="alerta"]     { --pc: #c2410c; --pc-strong: #9a3412; --pc-soft: #fff0e3; --pc-2: #f59e0b; }
[data-p="sozinho"]    { --pc: #2563eb; --pc-strong: #1e40af; --pc-soft: #e7efff; --pc-2: #38bdf8; }
[data-p="atencao"]    { --pc: #be185d; --pc-strong: #9d174d; --pc-soft: #fde7f0; --pc-2: #f472b6; }
[data-p="medo"]       { --pc: #0d7a6f; --pc-strong: #095d55; --pc-soft: #e2f4f1; --pc-2: #34d399; }
[data-p="empolgacao"] { --pc: #7c3aed; --pc-strong: #5b21b6; --pc-soft: #f0e9ff; --pc-2: #c084fc; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141c;
    --bg-2: #171a24;
    --surface: #1b1f2a;
    --surface-2: #232837;
    --text: #eceef4;
    --muted: #a9b0c0;
    --border: #2f3546;
    --danger: #ff8a7a;
    --ok: #6ee7a0;
    --ok-soft: #133022;
    --grid: #2a3040;

    --pc: #3cc4b3; --pc-strong: #6fe0d2; --pc-soft: #11302c; --pc-ink: #061a17; --pc-2: #1f8f80;

    --c-yellow: #3a3214;
    --c-green: #15301f;
    --c-blue: #17253f;
    --c-pink: #3a1727;
    --c-purple: #271d42;
    --c-orange: #3a2614;
    --warn-soft: #33270f;
    --warn-ink: #f6c97f;
    --avg: #fdba74;

    --dog-fur: #e0a95f;
    --dog-fur2: #a86b2d;
    --dog-light: #fbe8cc;
    --dog-ink: #1d1611;

    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
  }
  [data-p="alerta"]     { --pc: #fb923c; --pc-strong: #fdba74; --pc-soft: #3a2111; --pc-ink: #1f0d02; --pc-2: #f59e0b; }
  [data-p="sozinho"]    { --pc: #60a5fa; --pc-strong: #93c5fd; --pc-soft: #142444; --pc-ink: #06142b; --pc-2: #38bdf8; }
  [data-p="atencao"]    { --pc: #f472b6; --pc-strong: #f9a8d4; --pc-soft: #3a1328; --pc-ink: #2a0716; --pc-2: #fb7185; }
  [data-p="medo"]       { --pc: #3cc4b3; --pc-strong: #6fe0d2; --pc-soft: #11302c; --pc-ink: #061a17; --pc-2: #34d399; }
  [data-p="empolgacao"] { --pc: #a78bfa; --pc-strong: #c4b5fd; --pc-soft: #271a45; --pc-ink: #160b33; --pc-2: #c084fc; }
}

/* compatibilidade com nomes antigos (Kit) */
:root, [data-p] { --accent: var(--pc); --accent-strong: var(--pc-strong); --accent-soft: var(--pc-soft); --accent-ink: var(--pc-ink); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 110% -10%, var(--pc-soft), transparent 60%),
    radial-gradient(700px 380px at -20% 30%, var(--bg-2), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--pc-strong); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--pc-strong); outline-offset: 2px; border-radius: 6px; }
h1:focus, h2:focus, main:focus { outline: none; }
body.has-modal { overflow: hidden; }

.wrap { width: 100%; max-width: 580px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); color: var(--text); padding: 8px 12px; z-index: 70; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Topo ---- */
.topbar {
  position: sticky; top: 0; z-index: 15;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, var(--pc-soft), var(--surface) 75%);
  padding-top: env(safe-area-inset-top);
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.01em; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand__ic {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--pc), var(--pc-2)); font-size: 1rem;
}
.topbar__dog {
  color: var(--text); font-size: .88rem; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px;
}
.topbar__dog:empty { display: none; }

main { padding-top: 20px; padding-bottom: 28px; min-height: 60vh; }

/* ---- Tipografia ---- */
.h1 { font-size: clamp(1.5rem, 6.4vw, 2.05rem); line-height: 1.18; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 800; }
.h2 { font-size: clamp(1.2rem, 5vw, 1.45rem); line-height: 1.25; letter-spacing: -.01em; margin: 0 0 12px; font-weight: 800; }
.h3 { font-size: 1.08rem; line-height: 1.3; margin: 0 0 8px; }
.lead { font-size: 1.05rem; color: var(--muted); margin: 0 0 18px; }
.lead p { margin-bottom: 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 800; color: var(--pc-strong); margin: 0 0 6px; }
.muted { color: var(--muted); }
.tiny { font-size: .87rem; }
.center { text-align: center; }
.ok { color: var(--ok); font-weight: 700; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; }
.error { color: var(--danger); font-weight: 700; margin: 6px 0 0; }

/* ---- Blocos ---- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
}
.card--soft { background: var(--pc-soft); border-color: transparent; box-shadow: none; }
.card--warn { background: var(--warn-soft); border-color: transparent; box-shadow: none; }
.card--warn .h3 { color: var(--warn-ink); }
.card--plain { box-shadow: none; }
.card--hero { border: 2px solid var(--pc); }
.card--intro { background: linear-gradient(135deg, var(--c-green), var(--surface) 80%); }
.card--why { background: linear-gradient(135deg, var(--c-yellow), var(--surface) 75%); }
.card--reward { background: linear-gradient(135deg, var(--c-pink), var(--c-orange)); border-color: transparent; }
.card--goals { border: 2px solid var(--pc); }
.card--fix { background: linear-gradient(135deg, var(--c-purple), var(--c-blue)); border-color: transparent; }
.card--tip { background: linear-gradient(135deg, var(--c-orange), var(--surface) 80%); }
.card--today { border: 2px solid var(--pc); background: linear-gradient(160deg, var(--pc-soft), var(--surface) 70%); }
.card--party { background: linear-gradient(135deg, var(--c-yellow), var(--c-pink)); border-color: transparent; }
.card--msg { background: linear-gradient(160deg, var(--c-green), var(--surface) 60%); }
.card--chart, .card--checkin { overflow: hidden; }
.card--form { border-top: 4px solid var(--pc); }
.card-link { display: block; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card--tile .sec-title { margin-bottom: 2px; }
.section { margin: 28px 0 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.list { margin: 0; padding-left: 20px; }
.list li { margin-bottom: 8px; }
.list li:last-child { margin-bottom: 0; }

/* Título de seção com ícone colorido */
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; line-height: 1.25; font-weight: 800; margin: 0 0 12px; }
.sec-ic {
  flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px; font-size: 1.15rem; line-height: 1;
  background: var(--pc-soft);
}
.sec-ic--lg { width: 48px; height: 48px; border-radius: 15px; font-size: 1.45rem; }
.sec-ic--xl { width: 60px; height: 60px; border-radius: 18px; font-size: 1.9rem; }
.sec-ic--pc { background: linear-gradient(135deg, var(--pc-soft), var(--surface-2)); }
.sec-ic--yellow { background: var(--c-yellow); }
.sec-ic--green { background: var(--c-green); }
.sec-ic--blue { background: var(--c-blue); }
.sec-ic--pink { background: var(--c-pink); }
.sec-ic--purple { background: var(--c-purple); }
.sec-ic--orange { background: var(--c-orange); }
.card--why .sec-ic, .card--reward .sec-ic, .card--fix .sec-ic, .card--tip .sec-ic, .card--intro .sec-ic, .card--msg .sec-ic { background: var(--surface); box-shadow: var(--shadow); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .82rem; font-weight: 700; line-height: 1;
  padding: 7px 11px; border-radius: 999px;
  background: var(--surface-2); color: var(--text);
}
.badge--accent { background: var(--pc); color: var(--pc-ink); }
.badge--soft { background: var(--pc-soft); color: var(--pc-strong); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  font-size: .85rem; font-weight: 800; padding: 5px 12px; border-radius: 999px;
  background: var(--surface); color: var(--pc-strong); border: 1px solid var(--border);
}

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 24px; padding: 18px 16px; margin: 0 0 16px;
  background: linear-gradient(135deg, var(--pc-soft) 0%, var(--surface) 65%);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, var(--pc-2), transparent 70%); opacity: .25; pointer-events: none;
}
.hero__row { display: flex; align-items: center; gap: 12px; }
.hero__txt { min-width: 0; flex: 1 1 auto; position: relative; z-index: 1; }
.hero__txt .h1 { margin-bottom: 8px; }
.hero__hi { font-weight: 700; color: var(--muted); margin: 0 0 2px; }
.hero__prog { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); position: relative; z-index: 1; }
.hero__progtxt { margin: 0; }
.hero--welcome { display: flex; align-items: center; gap: 12px; }
.hero--welcome .lead { margin-bottom: 0; }
.hero--party { text-align: center; background: linear-gradient(160deg, var(--c-yellow), var(--c-pink) 55%, var(--pc-soft)); padding: 24px 16px; }
.hero--party .lead { color: var(--text); }

/* ---- Mascote ---- */
.mascot { display: block; flex: 0 0 auto; overflow: visible; }
.mascot--hero { width: 96px; height: auto; }
.mascot--big { width: 170px; height: auto; margin: 0 auto 8px; }
.m-fur { fill: var(--dog-fur); }
.m-fur2 { fill: var(--dog-fur2); }
.m-light { fill: var(--dog-light); }
.m-ink { fill: var(--dog-ink); }
.m-shine { fill: #fff; }
.m-stroke { fill: none; stroke: var(--dog-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.m-tongue { fill: var(--dog-tongue); }
.m-cheek { fill: var(--dog-cheek); opacity: .55; }
.m-collar { fill: var(--pc); }
.m-tag { fill: #ffd34d; stroke: #b88a00; stroke-width: 1; }
.m-shadow { fill: var(--text); opacity: .08; }
.m-hat { fill: var(--pc); }
.m-hat-band { fill: #ffd34d; }
.m-pom { fill: #ff6b6b; }
.m-dot--1 { fill: #ffd93d; } .m-dot--2 { fill: #4d96ff; } .m-dot--3 { fill: #6bcb77; } .m-dot--4 { fill: #ff6b6b; }
.m-tail { transform-origin: 84px 92px; animation: wag 1.1s ease-in-out infinite; }
.m-ear { transform-box: fill-box; }
.mascot--hero, .mascot--big { animation: bob 3s ease-in-out infinite; }
.mascot--big .m-tail { animation-duration: .5s; }
@keyframes wag { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(14deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ---- Anel de progresso ---- */
.ring { position: relative; width: 84px; height: 84px; flex: 0 0 84px; }
.ring svg { width: 100%; height: 100%; display: block; }
.ring__bg { fill: none; stroke: var(--surface-2); stroke-width: 9; }
.ring__fg { fill: none; stroke: var(--pc); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2, .8, .2, 1); }
.ring__txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring__txt b { font-size: 1.5rem; font-weight: 800; }
.ring__txt small { font-size: .72rem; color: var(--muted); font-weight: 700; margin-top: 2px; }

/* ---- Barra de progresso ---- */
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 8px 0 12px; }
.progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--pc), var(--pc-2)); border-radius: inherit; transition: width .8s cubic-bezier(.2, .8, .2, 1); }

/* ---- Formulários ---- */
.field { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 800; margin-bottom: 8px; padding: 0; }
.hint { color: var(--muted); font-size: .9rem; margin: -4px 0 8px; }
input[type="text"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1.05rem; /* >=16px evita zoom no iOS */
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
textarea { resize: vertical; min-height: 76px; line-height: 1.4; }
input[type="text"]:focus, select:focus, textarea:focus { border-color: var(--pc); outline: 3px solid var(--pc-soft); outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--danger) !important; }

.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.seg label { position: relative; display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg > label > span {
  display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 52px; padding: 6px 4px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-weight: 800; line-height: 1.15;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.seg__ic { font-size: 1.3rem; }
.seg input:checked + span { border-color: var(--pc); background: var(--pc-soft); color: var(--pc-strong); }
.seg input:focus-visible + span { outline: 3px solid var(--pc-strong); outline-offset: 2px; }

/* Escala do check-in (emojis grandes) */
.scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 6px; }
.scale__opt { position: relative; display: block; cursor: pointer; min-width: 0; }
.scale__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale__opt > span {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center;
  min-height: 92px; padding: 8px 2px;
  border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
}
.scale__emoji { font-size: 2rem; line-height: 1.1; }
.scale__opt small { font-weight: 700; font-size: .72rem; line-height: 1.15; color: var(--muted); margin-top: 6px; hyphens: auto; }
.scale__opt:hover > span { transform: translateY(-2px); }
.scale__opt input:checked + span { border-color: var(--pc); background: var(--pc-soft); transform: scale(1.04); }
.scale__opt input:checked + span small { color: var(--pc-strong); }
.scale__opt input:focus-visible + span { outline: 3px solid var(--pc-strong); outline-offset: 2px; }

/* Cartões de perfil (rádio) */
.profiles { display: grid; gap: 10px; }
.pcard { position: relative; display: block; cursor: pointer; }
.pcard input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pcard__box {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.pcard:hover .pcard__box { transform: translateY(-1px); border-color: var(--pc); }
.pcard__emoji {
  flex: 0 0 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.4rem; background: linear-gradient(135deg, var(--pc-soft), var(--surface-2));
}
.pcard__txt { flex: 1 1 auto; min-width: 0; }
.pcard__title { display: block; font-weight: 800; color: var(--pc-strong); }
.pcard__desc { display: block; color: var(--muted); font-size: .92rem; line-height: 1.4; margin-top: 2px; }
.pcard__meta { display: block; font-size: .82rem; font-weight: 800; color: var(--pc-strong); margin-top: 6px; }
.pcard__tick {
  flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--border); color: transparent; font-weight: 900; font-size: .85rem;
}
.pcard input:checked + .pcard__box { border-color: var(--pc); background: var(--pc-soft); }
.pcard input:checked + .pcard__box .pcard__tick { background: var(--pc); border-color: var(--pc); color: var(--pc-ink); }
.pcard input:focus-visible + .pcard__box { outline: 3px solid var(--pc-strong); outline-offset: 2px; }

/* Checkboxes grandes */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 10px 12px; border-radius: var(--radius-sm); border: 2px solid var(--border); background: var(--surface);
  transition: background-color .15s ease, border-color .15s ease;
}
.check:has(.cb:checked) { background: var(--ok-soft); border-color: var(--ok); }
.check > span { padding-top: 1px; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--pc); }
.cb {
  -webkit-appearance: none; appearance: none;
  width: 26px !important; height: 26px !important; margin: 0 !important;
  border: 2px solid var(--muted); border-radius: 8px; background: var(--surface);
  display: inline-grid; place-content: center; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.cb::before {
  content: ""; width: 12px; height: 7px; margin-top: -3px;
  border-left: 3px solid #fff; border-bottom: 3px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1);
}
.cb:checked { background: var(--ok); border-color: var(--ok); transform: scale(1.06); }
.cb:checked::before { transform: rotate(-45deg) scale(1); }
.cb:focus-visible { outline: 3px solid var(--pc-strong); outline-offset: 2px; }
.cb:disabled { cursor: default; opacity: .8; }
@media (prefers-color-scheme: dark) { .cb::before { border-color: #0b1a10; } }

/* Lista com ícone (✅, 💡, ⚠️) */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.tick { flex: 0 0 auto; font-size: 1.05rem; line-height: 1.5; }

/* ---- Botões ---- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  font: inherit; font-weight: 800; font-size: 1.05rem;
  min-height: 52px; padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  text-decoration: none; text-align: center;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease, background-color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn--primary {
  background: linear-gradient(135deg, var(--pc), var(--pc-strong));
  color: var(--pc-ink); box-shadow: 0 6px 16px -6px var(--pc);
}
@media (prefers-color-scheme: dark) { .btn--primary { background: linear-gradient(135deg, var(--pc-strong), var(--pc)); } }
.btn--primary:hover { filter: brightness(1.06); box-shadow: 0 10px 22px -8px var(--pc); }
.btn--big { min-height: 58px; font-size: 1.12rem; }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--pc); }
.btn--done { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.btn__sub { display: block; font-size: .8rem; font-weight: 600; opacity: .9; }
.btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn--link { background: none; color: var(--pc-strong); text-decoration: underline; min-height: 44px; }
.btn--wa { background: #0f7a40; color: #fff; }
.btn--wa:hover { background: #0b6634; }
.btn--sm { min-height: 44px; font-size: .95rem; padding: 8px 14px; width: auto; }
.btn.is-pending { filter: saturate(.4); opacity: .9; box-shadow: none; }
.btn.is-ready { animation: ready 1.6s ease-in-out 2; }
.btns { display: grid; gap: 10px; }
.btns--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.btns--2 .btn { font-size: .98rem; padding: 10px 10px; }
.link-btn { font: inherit; background: none; border: 0; color: var(--pc-strong); text-decoration: underline; cursor: pointer; padding: 10px 4px; min-height: 44px; }
.link-strong { font-weight: 800; color: var(--text); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; text-decoration: none; margin: -8px 0 6px; }
.pop { animation: pop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.1); } 65% { transform: scale(.97); } 100% { transform: scale(1); } }
@keyframes ready { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }

/* chips (voz) */
.speak { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 16px; }
.btn-speak {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  font: inherit; font-weight: 800; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--pc-strong); border: 2px solid var(--pc);
  transition: transform .12s ease, background-color .15s ease;
}
.btn-speak:hover { background: var(--pc-soft); }
.btn-speak:active { transform: scale(.96); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 6px 12px;
  font: inherit; font-size: .9rem; font-weight: 700; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.chip:hover { border-color: var(--pc); }
.chip[aria-pressed="true"] { background: var(--pc); color: var(--pc-ink); border-color: var(--pc); }
.speak__rate { display: inline-flex; gap: 4px; }
.chip--rate { padding: 6px 8px; justify-content: center; }
.speak.is-playing [data-act="tts-pause"] { border-color: var(--pc); }

/* ---- Lista de dias ---- */
.days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.day-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; min-height: 64px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.day-link:hover { border-color: var(--pc); transform: translateX(2px); }
.day-num {
  flex: 0 0 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center; font-weight: 800;
  background: var(--surface-2); color: var(--text);
}
.day-link.is-done .day-num { background: var(--ok); color: #fff; }
@media (prefers-color-scheme: dark) { .day-link.is-done .day-num { color: #0b1a10; } }
.day-link.is-today { border: 2px solid var(--pc); background: linear-gradient(90deg, var(--pc-soft), var(--surface)); }
.day-link.is-today .day-num { background: linear-gradient(135deg, var(--pc), var(--pc-2)); color: var(--pc-ink); }
.day-txt { flex: 1 1 auto; min-width: 0; }
.day-title { display: block; font-weight: 700; line-height: 1.3; }
.day-meta { display: block; color: var(--muted); font-size: .85rem; }
.day-flag { flex: 0 0 auto; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--pc-ink); background: var(--pc); padding: 4px 8px; border-radius: 999px; }

/* ---- Página do dia ---- */
.day-head { margin-bottom: 4px; }
.day-h1 { display: flex; gap: 10px; align-items: flex-start; }
.day-emoji {
  flex: 0 0 auto; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  font-size: 1.7rem; background: linear-gradient(135deg, var(--pc-soft), var(--c-yellow));
}
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 48px; min-height: 34px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -3px;
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pc), var(--pc-strong)); color: var(--pc-ink); font-weight: 800;
}
@media (prefers-color-scheme: dark) { .steps li::before { background: linear-gradient(135deg, var(--pc-strong), var(--pc)); } }
.steps p { margin: 0 0 4px; }
.step-more { margin-top: 4px; font-size: .92rem; color: var(--muted); }
.step-more summary { cursor: pointer; font-weight: 700; color: var(--pc-strong); min-height: 36px; display: inline-flex; align-items: center; }
.step-more p { margin: 4px 0 0; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; }
.box-title { display: flex; align-items: center; gap: 8px; font-weight: 800; margin: 0 0 6px; }
.box-title .ic { font-size: 1.15rem; }
.goals-count { font-weight: 800; color: var(--pc-strong); margin: 12px 0 10px; min-height: 1.5em; }
.done-wrap { margin-top: 4px; }
.done-flag { font-weight: 800; color: var(--ok); font-size: 1.05rem; margin-bottom: 10px; }

.errors { margin: 0; padding: 0; list-style: none; counter-reset: e; }
.errors li { counter-increment: e; position: relative; padding: 0 0 0 42px; margin: 0 0 14px; }
.errors li:last-child { margin-bottom: 0; }
.errors li::before {
  content: counter(e); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--c-orange); color: var(--warn-ink); font-weight: 800; font-size: .9rem;
}

/* ---- Gráfico ---- */
.chart { display: block; width: 100%; height: auto; margin-top: 8px; }
.chart text { fill: var(--muted); font-family: var(--font); font-size: 11px; }
.chart .emo { font-size: 13px; }
.chart .ylab { font-weight: 700; font-size: 10.5px; fill: var(--text); }
.chart .xlab { font-weight: 700; font-size: 10.5px; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--pc); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .avg { stroke: var(--avg); stroke-width: 2.5; stroke-dasharray: 6 4; stroke-linecap: round; }
.chart .pt { fill: var(--pc); stroke: var(--surface); stroke-width: 2; transition: r .15s ease; }
.chart .pt.is-sel { fill: var(--pc-strong); r: 7.5; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:focus { outline: none; }
.chart .hit:focus-visible { stroke: var(--pc-strong); stroke-width: 2.5; }
.legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--pc); position: relative; }
.lg--pt::after { content: ""; position: absolute; left: 6px; top: -7px; width: 10px; height: 10px; border-radius: 50%; background: var(--pc); }
.lg--avg { border-top: 3px dashed var(--avg); }
.chart-cap { min-height: 1.5em; font-size: .95rem; font-weight: 700; margin: 8px 0 0; }
.empty { text-align: center; padding: 18px 8px; color: var(--muted); background: var(--surface-2); border-radius: var(--radius-sm); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0; }
.stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.stat b { display: block; font-size: 1.05rem; line-height: 1.25; }
.stat span { font-size: .82rem; color: var(--muted); }

.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; margin-top: 8px; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { font-size: .8rem; color: var(--muted); font-weight: 800; }
.tbl td:first-child, .tbl th:first-child { white-space: nowrap; }

/* ---- FAQ / acordeões ---- */
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; font-weight: 800; padding: 14px 34px 14px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 11px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.2rem; background: var(--pc-soft); color: var(--pc-strong);
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 14px; color: var(--muted); }
.more summary { cursor: pointer; font-weight: 800; color: var(--pc-strong); min-height: 44px; display: flex; align-items: center; }

/* ---- Guias ---- */
.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.menu__item {
  display: flex; gap: 12px; align-items: center;
  padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.menu__item:hover { border-color: var(--pc); transform: translateY(-2px); }
.menu__item.is-done { border-color: var(--ok); }
.menu__txt { flex: 1 1 auto; min-width: 0; }
.menu__txt b { display: block; font-size: 1.05rem; }
.menu__txt small { display: block; color: var(--muted); font-size: .88rem; line-height: 1.35; }
.menu__go { font-size: 1.6rem; color: var(--muted); flex: 0 0 auto; }
.status { display: inline-block; margin-top: 6px; font-size: .8rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.status--ok { background: var(--ok-soft); color: var(--ok); }
.guide-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.guide-head .h1 { margin: 0; }
.guide-foot { text-align: center; border: 2px dashed var(--border); box-shadow: none; }

.rcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rcard { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.rcard__ic { flex: 0 0 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--surface); box-shadow: var(--shadow); }
.rcard b { display: block; }
.rcard__txt { display: block; color: var(--muted); font-size: .92rem; }
@media (min-width: 520px) { .rcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Mensagens ---- */
.msg {
  white-space: pre-wrap; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere;
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px var(--radius-sm) var(--radius-sm) var(--radius-sm);
  padding: 12px 14px; margin: 0 0 12px;
}

/* ---- Modal ---- */
.modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(15, 18, 30, .55);
  animation: fade .2s ease;
}
.modal__box {
  width: 100%; max-width: 420px; background: var(--surface); color: var(--text);
  border-radius: 24px; padding: 22px 18px 16px; box-shadow: var(--shadow-lg); text-align: center;
  animation: popin .3s cubic-bezier(.3, 1.4, .5, 1);
  max-height: calc(100vh - 32px); overflow-y: auto;
}
.modal__emoji { font-size: 2.4rem; margin: 0 0 4px; line-height: 1; }
.modal__box .btns { margin-top: 16px; }
@keyframes popin { from { opacity: 0; transform: scale(.9) translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- Confete ---- */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); width: max-content;
  background: var(--text); color: var(--bg); font-weight: 800;
  padding: 11px 18px; border-radius: 999px; z-index: 55; box-shadow: var(--shadow-lg);
  transition: opacity .2s ease, transform .25s cubic-bezier(.3, 1.4, .5, 1);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---- Barra de abas ---- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .07);
}
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--nav-h); padding: 6px 2px;
  color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 800;
}
.tab__ic { font-size: 1.3rem; line-height: 1; filter: grayscale(1); opacity: .7; transition: transform .2s ease; }
.tab[aria-current="page"] { color: var(--pc-strong); }
.tab[aria-current="page"] .tab__ic { filter: none; opacity: 1; transform: translateY(-2px) scale(1.12); }
.tab[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 4px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--pc), var(--pc-2));
}

/* ---- Rodapé ---- */
.footer { border-top: 1px solid var(--border); padding: 20px 0 24px; color: var(--muted); font-size: .88rem; }
.footer p { margin: 0 0 6px; }
body.has-nav .footer { padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }

/* ---- Entrada animada ---- */
.screen > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.screen > *:nth-child(2) { animation-delay: .04s; }
.screen > *:nth-child(3) { animation-delay: .08s; }
.screen > *:nth-child(4) { animation-delay: .12s; }
.screen > *:nth-child(5) { animation-delay: .16s; }
.screen > *:nth-child(6) { animation-delay: .2s; }
.screen > *:nth-child(7) { animation-delay: .24s; }
.screen > *:nth-child(n+8) { animation-delay: .28s; }
.no-anim .screen > * { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- Telas maiores ---- */
@media (min-width: 720px) {
  main { padding-top: 32px; }
  .card { padding: 22px; }
  .hero { padding: 24px; }
  .mascot--hero { width: 120px; }
  .tabbar { left: 50%; right: auto; width: 580px; transform: translateX(-50%); border: 1px solid var(--border); border-bottom: 0; border-radius: 18px 18px 0 0; }
}

@media (max-width: 380px) {
  .mascot--hero { width: 76px; }
  .hero--welcome { flex-direction: column; text-align: center; }
  .scale { gap: 4px; }
  .scale__emoji { font-size: 1.7rem; }
  .scale__opt small { font-size: .66rem; }
  .btns--2 .btn { font-size: .92rem; padding: 10px 6px; }
  .speak__rate .chip { min-width: 44px; padding: 6px 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .tabbar, .topbar, .toast, .btn, .skip, .speak { display: none !important; }
  body.has-nav .footer { padding-bottom: 0; }
}

/* ---- Utilitários ---- */
.mt { margin-top: 14px; }
.mt-s { margin-top: 8px; }
[data-act="install"] { margin-bottom: 16px; }

/* ---- Kit Enriquecimento ---- */
.notice { background: var(--warn-soft); color: var(--warn-ink); border-radius: var(--radius-sm); padding: 10px 12px; font-size: .92rem; }
.game__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.game__head .h3 { margin: 0; }
.game__num {
  flex: 0 0 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pc-soft); color: var(--pc-strong); font-weight: 800;
}
.game .meta-row { margin-bottom: 10px; }
