/* Plano Patudo 21 · estilos (identidade em ../identidade-visual.md) */
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans.woff2) format("woff2"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "DM Serif Display"; src: url(fonts/dm-serif-display.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --creme: #F8F2E9; --creme-claro: #F6F1E7; --bege: #EFE6D8; --verde-nevoa: #E1E6D5; --pessego: #F7DFCF; --branco: #FFFFFF;
  --terracota: #C4623A; --terracota-esc: #A94F2C; --terracota-clara: #E58B62;
  --oliva: #5F6E4F; --oliva-esc: #4C5A3F; --floresta: #1F3326; --salvia: #B9C4B0;
  --cafe: #3A2216; --texto: #2A2622; --texto-suave: #6A5F55; --borda: #CDBFAE; --quase-preto: #1D1813;
  --sombra: 0 2px 0 var(--bege), 0 10px 24px rgba(58,34,22,.08);
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --top: 56px; --nav: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bege); color: var(--texto); font: 400 17px/1.6 var(--sans); }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--creme); position: relative; box-shadow: 0 0 40px rgba(58,34,22,.08); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--terracota-esc); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--cafe); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 30px; } h2 { font-size: 24px; } h3 { font-size: 20px; color: var(--floresta); }
p { margin: 0 0 .8em; }
strong { color: var(--floresta); }
.hl { color: var(--terracota); }
.muted { color: var(--texto-suave); }
.small { font-size: 14.5px; }
.eyebrow { font: 700 12.5px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--terracota); margin-bottom: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Barra de topo */
.topbar { position: sticky; top: 0; z-index: 20; height: calc(var(--top) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0; display: flex; align-items: center; gap: 6px; background: rgba(248,242,233,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--bege); }
.topbar .title { flex: 1; font: 700 16px var(--sans); color: var(--cafe); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .brand { font-family: var(--serif); font-weight: 400; font-size: 20px; }
.topbar .brand b { color: var(--terracota); font-weight: 400; }
.icon-btn { width: 44px; height: 44px; border: 0; background: none; border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: var(--cafe); }
.icon-btn:active { background: var(--bege); }
.icon-btn svg { width: 24px; height: 24px; }
.sos-btn { text-decoration: none; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--terracota-esc); color: #fff; font: 700 14px var(--sans); letter-spacing: .06em; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.sos-btn svg { width: 16px; height: 16px; }

/* Navegação inferior */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 20; display: flex; background: var(--branco); border-top: 1px solid var(--bege); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; height: var(--nav); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--texto-suave); font: 600 11.5px var(--sans); }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--terracota); }
.view { padding: 18px 16px calc(var(--nav) + 32px + env(safe-area-inset-bottom)); }
.view.no-nav { padding-bottom: 40px; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 24px; border: 0; border-radius: 14px; background: var(--terracota); color: #fff; font: 700 17px var(--sans); text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 var(--terracota-esc), 0 12px 24px rgba(196,98,58,.25); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--terracota-esc), 0 6px 14px rgba(196,98,58,.25); }
.btn.block { display: flex; width: 100%; }
.btn.dark { background: var(--floresta); box-shadow: 0 5px 0 #0f1c14, 0 12px 24px rgba(31,51,38,.2); }
.btn.ghost { background: transparent; color: var(--cafe); border: 2px solid var(--borda); box-shadow: none; }
.btn.ghost:active { transform: none; background: var(--bege); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.small { min-height: 44px; font-size: 15px; padding: 8px 16px; }
.link-btn { background: none; border: 0; padding: 8px 0; color: var(--terracota-esc); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.mt { margin-top: 18px; } .mt2 { margin-top: 28px; }

/* Cards */
.card { background: var(--branco); border-radius: 18px; padding: 18px; box-shadow: var(--sombra); }
.card + .card { margin-top: 12px; }
.card.olive { background: var(--oliva); color: var(--creme-claro); box-shadow: inset 0 -4px 0 var(--oliva-esc), 0 12px 26px rgba(58,34,22,.16); }
.card.olive h2, .card.olive h3, .card.olive strong { color: #fff; }
.card.olive .eyebrow { color: var(--pessego); }
.card.peach { background: var(--pessego); box-shadow: none; }
.card.mist { background: var(--verde-nevoa); box-shadow: none; }
.card.dashed { background: var(--verde-nevoa); border: 2px dashed var(--oliva); box-shadow: none; }
.card.forest { background: var(--floresta); color: var(--creme-claro); }
.card.forest h2, .card.forest h3, .card.forest strong { color: #fff; }
.card.top { border-top: 8px solid var(--terracota); }
.card.top.w1 { border-top-color: var(--terracota); } .card.top.w2 { border-top-color: var(--oliva); } .card.top.w3 { border-top-color: var(--floresta); }
a.card { display: block; text-decoration: none; color: inherit; }
.list-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--branco); border-radius: 16px; box-shadow: var(--sombra); text-decoration: none; color: inherit; min-height: 64px; }
.list-card + .list-card { margin-top: 10px; }
.list-card .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bege); color: var(--terracota-esc); }
.list-card .ico svg { width: 24px; height: 24px; }
.list-card .txt { flex: 1; min-width: 0; }
.list-card .txt b { display: block; color: var(--cafe); font-weight: 700; line-height: 1.3; }
.list-card .txt span { display: block; font-size: 14px; color: var(--texto-suave); line-height: 1.4; }
.list-card .chev { color: var(--borda); flex: none; }
.list-card.done .ico { background: var(--verde-nevoa); color: var(--oliva); }
.list-card.locked { opacity: .9; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 0 10px; }
.section-title h2 { margin: 0; font-size: 22px; }

/* Pílulas e tags */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--oliva); color: var(--creme-claro); font: 700 11.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.pill.t { background: var(--terracota); color: #fff; }
.pill.soft { background: var(--bege); color: var(--cafe); }
.pill.mist { background: var(--verde-nevoa); color: var(--oliva-esc); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 999px; background: var(--branco); border: 2px solid var(--bege); cursor: pointer; font-weight: 600; font-size: 15px; }
.chip.on { border-color: var(--terracota); background: #fff5ef; color: var(--terracota-esc); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }

/* Formulários */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 700; font-size: 15px; color: var(--cafe); margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=number], input[type=date], input[type=time], select, textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--borda); background: var(--branco); font-size: 17px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--terracota); }
:focus-visible { outline: 3px solid var(--terracota-clara); outline-offset: 2px; }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 12px; border: 2px solid var(--borda); background: var(--branco); font-weight: 700; cursor: pointer; text-align: center; padding: 6px; }
.seg input:checked + span { border-color: var(--terracota); background: #fff5ef; color: var(--terracota-esc); }
.seg input:focus-visible + span { outline: 3px solid var(--terracota-clara); }

/* Separadores internos (Treinar) */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; min-height: 40px; padding: 8px 16px; border-radius: 999px; background: var(--branco); color: var(--cafe); text-decoration: none; font-weight: 700; font-size: 15px; border: 2px solid var(--bege); display: flex; align-items: center; }
.tabs a.on { background: var(--floresta); border-color: var(--floresta); color: #fff; }

svg.mascot, img.mascot { width: 64px; height: 64px; }
.mascot.big { width: 120px; height: 120px; display: block; margin: 0 auto; }
/* Início */
.hello { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.hello h1 { margin: 0; font-size: 28px; }
.hello .mascot { width: 64px; height: 64px; flex: none; }
.today { display: flex; gap: 16px; align-items: center; }
.today .info { flex: 1; }
.ring { width: 88px; height: 88px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 700 20px/1 var(--sans); color: #fff; }
.ring .lbl small { display: block; font-size: 11px; font-weight: 600; opacity: .8; margin-top: 2px; }
.tip { display: flex; gap: 12px; align-items: flex-start; }
.tip .mascot { width: 52px; height: 52px; flex: none; }
.tip p:last-child { margin-bottom: 0; }

/* Plano */
.week { margin-top: 14px; }
.dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0 4px; }
.dot { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--sans); text-decoration: none; background: var(--creme); color: var(--texto-suave); border: 2px solid var(--bege); }
.dot.done { background: var(--oliva); color: #fff; border-color: var(--oliva); }
.dot.now { background: var(--terracota); color: #fff; border-color: var(--terracota); box-shadow: 0 0 0 4px rgba(196,98,58,.2); }
.dot.star { position: relative; }
.dot.star::after { content: "★"; position: absolute; top: -8px; right: -4px; font-size: 13px; color: var(--terracota); }
.dot.done.star::after { color: var(--oliva-esc); }

/* Dia e lição */
.cover { margin: -18px -16px 18px; height: 168px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 16px; color: #fff; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .art { position: absolute; right: 12px; bottom: 0; width: 150px; height: 150px; opacity: .95; }
.cover img.art { inset: auto; right: 20px; top: 50%; transform: translateY(-50%); width: 128px; height: 128px; opacity: 1; border-width: 4px; }
.cover .badge { position: relative; z-index: 1; }
.cover.c0 { background: var(--terracota); } .cover.c1 { background: var(--oliva); } .cover.c2 { background: var(--floresta); } .cover.c3 { background: var(--terracota-esc); } .cover.c4 { background: #7a6a52; } .cover.c5 { background: var(--oliva-esc); } .cover.c6 { background: #8c4a32; }
.meta { font-size: 14px; color: var(--texto-suave); margin-bottom: 4px; }
.sub { font-size: 18px; color: var(--texto-suave); margin-bottom: 18px; }
.block { margin-top: 22px; }
.block h3 { font-size: 21px; }
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
ol.steps li { counter-increment: s; position: relative; padding: 2px 0 12px 44px; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--terracota); color: #fff; font: 700 15px/30px var(--sans); text-align: center; }
ul.dots-list { padding-left: 0; list-style: none; margin: 0; }
ul.dots-list li { position: relative; padding: 0 0 8px 24px; }
ul.dots-list li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--oliva); }
.pairs .pair { background: var(--branco); border-radius: 14px; padding: 14px; box-shadow: var(--sombra); }
.pairs .pair + .pair { margin-top: 10px; }
.pairs .pair .err { font-weight: 700; color: var(--terracota-esc); }
.pairs .pair .err::before { content: "✕ "; }
.pairs .pair .fix::before { content: "✓ "; color: var(--oliva); font-weight: 700; }
.causes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.causes .c { background: var(--branco); border-radius: 14px; padding: 12px; box-shadow: var(--sombra); font-size: 15px; line-height: 1.45; }
.causes .c b { display: block; color: var(--cafe); margin-bottom: 2px; }
.note { border-radius: 14px; padding: 14px 16px; margin-top: 14px; }
.note.puppy { background: var(--verde-nevoa); }
.note.small { background: var(--pessego); }
.note.warn { background: var(--pessego); border-left: 5px solid var(--terracota-esc); }
.note.never { background: #fbe9e1; border-left: 5px solid var(--terracota-esc); }
.note > b:first-child { display: block; margin-bottom: 4px; color: var(--cafe); }
details.note summary { cursor: pointer; font-weight: 700; color: var(--cafe); min-height: 32px; }
.session { position: relative; }
.session h3 { margin-right: 52px; }
.check { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--borda); background: var(--branco); cursor: pointer; display: grid; place-items: center; color: transparent; }
.check svg { width: 22px; height: 22px; }
.check.on { background: var(--oliva); border-color: var(--oliva); color: #fff; }
.pager { display: flex; gap: 10px; margin-top: 28px; }
.pager a { flex: 1; }
.tri { display: flex; gap: 6px; margin-top: 8px; }
.tri button { flex: 1; min-height: 44px; border-radius: 10px; border: 2px solid var(--borda); background: var(--branco); font-size: 13.5px; font-weight: 700; cursor: pointer; padding: 4px; }
.tri button.on.f { background: var(--oliva); border-color: var(--oliva); color: #fff; }
.tri button.on.p { background: #e9b949; border-color: #e9b949; color: var(--cafe); }
.tri button.on.n { background: var(--terracota); border-color: var(--terracota); color: #fff; }
.ck-item { padding: 12px 0; border-bottom: 1px solid var(--bege); }
.ck-item:last-child { border-bottom: 0; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
table.tbl th, table.tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--bege); }
table.tbl th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-suave); }

/* SOS */
.sos-head { background: var(--terracota-esc); color: #fff; margin: -18px -16px 18px; padding: 22px 16px; }
.sos-head h1 { color: #fff; }
.phone { display: flex; align-items: center; gap: 12px; }
.phone .txt { flex: 1; }
.sign { padding: 12px 0; border-bottom: 1px solid var(--bege); }
.sign:last-child { border-bottom: 0; }
.sign b { color: var(--cafe); }

/* Bloqueado */
.lock { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--terracota-esc); }
.lock svg { width: 14px; height: 14px; }

/* Ecrãs de entrada */
.gate { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 32px 22px; }
.gate .mascot { width: 120px; height: 120px; margin: 0 auto 10px; display: block; }
.logo { font-family: var(--serif); font-size: 34px; color: var(--cafe); text-align: center; margin-bottom: 4px; }
.logo b { color: var(--terracota); font-weight: 400; }
.logo-img { display: block; width: min(260px, 72%); height: auto; margin: 0 auto 16px; }
.topbar .brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-sym { width: 22px; height: auto; flex: none; }
.steps-bar { display: flex; gap: 6px; margin-bottom: 22px; }
.steps-bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--bege); }
.steps-bar i.on { background: var(--terracota); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--floresta); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; opacity: 0; transition: .25s; z-index: 50; max-width: calc(100% - 32px); pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Brincadeiras e compras */
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.level { color: var(--terracota); letter-spacing: 2px; }

/* Impressão */
.print-only { display: none; }
.sheet { background: #fff; border-radius: 6px; padding: 18px; box-shadow: var(--sombra); overflow-x: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal div { border: 2px solid var(--borda); border-radius: 8px; padding: 4px; min-height: 76px; font-size: 9px; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; }
.cal div b { display: block; font: 400 16px var(--serif); color: var(--terracota); }
.cal div.star { border-color: var(--terracota); }
.cards8 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cards8 > div { border: 2px dashed var(--borda); border-radius: 12px; padding: 10px; font-size: 12px; line-height: 1.4; }
.cards8 h3 { font-size: 18px; margin: 0 0 4px; }
.cards8 ol { margin: 0; padding-left: 16px; }
@media print {
  @page { size: A4; margin: 12mm; }
  body, #app { background: #fff; box-shadow: none; max-width: none; }
  .topbar, .tabbar, .no-print, .toast { display: none !important; }
  .view { padding: 0 !important; }
  .print-only { display: block; }
  .sheet { box-shadow: none; padding: 0; border-radius: 0; overflow: visible; }
  .cal { gap: 6px; }
  .cal div { min-height: 110px; font-size: 11px; padding: 6px; }
  .cal div b { font-size: 22px; }
  .cards8 > div { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Foto da raça do cão */
img.dogph { border-radius: 50%; object-fit: cover; border: 3px solid var(--branco); box-shadow: 0 2px 10px rgba(58,34,22,.15); }
.dhero { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 11; margin-bottom: 16px; box-shadow: var(--sombra); background: var(--pessego); }
.dhero img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }
.dhero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(29,24,19,.72) 0%, rgba(29,24,19,.25) 42%, rgba(29,24,19,0) 65%); }
.dhero-txt { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 1; color: #fff; }
.dhero-txt .small { opacity: .92; font-weight: 600; }
.dhero-txt h1 { color: #fff; margin: 0; font-size: 30px; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
/* Grelha de raças */
.breeds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.breed { position: relative; }
.breed input { position: absolute; opacity: 0; }
.breed span { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; box-sizing: border-box; padding: 10px 4px 8px; border-radius: 14px; border: 2px solid var(--borda); background: var(--branco); cursor: pointer; text-align: center; }
.breed img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; }
.breed img.sym { object-fit: contain; padding: 8px; box-sizing: border-box; background: var(--creme); }
.breed b { font-size: 13px; line-height: 1.2; color: var(--cafe); }
.breed input:checked + span { border-color: var(--terracota); background: #fff5ef; }
.breed input:checked + span b { color: var(--terracota-esc); }
.breed input:focus-visible + span { outline: 3px solid var(--terracota-clara); }
.seg span { flex-direction: column; line-height: 1.25; }
img.brandmark { object-fit: contain; border: 0; border-radius: 0; box-shadow: none; }
.topbar .brand img.brandlogo { height: 38px; width: auto; display: block; }
