/* Sistema de design: os mesmos valores de marca/tokens.css (conferido por tools/conferir_design.py). */
@font-face { font-family: "Manrope"; src: url("/app/fontes/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; src: url("/app/fontes/manrope-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root { --mesa: #123b3a; --mesa-funda: #0b2726; --madeira: #c4873a; --latao-texto: #8a5a1c; --latao-claro: #f7ecdc; --folha: #f4f7f6; --cartao: #ffffff; --tinta: #142427; --suave: #4a605f; --linha: #dce6e4; --tom: #1f6f64; }
@media (prefers-color-scheme: dark) { :root { --latao-texto: #e3ad66; --latao-claro: #2e2819; --folha: #0f1819; --cartao: #172325; --tinta: #e9f1ef; --suave: #a0b5b4; --linha: #2a3a3c; --tom: #57bfad; } }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--folha); color: var(--tinta); font: 500 16px/1.45 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: calc(86px + env(safe-area-inset-bottom)); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 800; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--madeira); outline-offset: 2px; }

header { position: relative; background: linear-gradient(160deg, var(--mesa), var(--mesa-funda)); color: #fff; padding: calc(16px + env(safe-area-inset-top)) 18px 20px; border-radius: 0 0 24px 24px; }
header::after { content: ""; position: absolute; left: 18px; bottom: 0; width: 56px; height: 5px; border-radius: 5px 5px 0 0; background: var(--madeira); }
header h1 { padding-right: 64px; }
header:empty { display: none; }
header small { display: block; color: #b9d6d1; font-size: 13px; }
header h1 { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
header .estado { margin-top: 8px; font-size: 13px; color: #b9d6d1; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
header .estado button { border: 0; border-radius: 99px; background: rgba(255, 255, 255, .15); color: #fff; padding: 6px 14px; font-weight: 600; }
main { padding: 16px 14px; max-width: 640px; margin: 0 auto; }
h2 { font-size: 15px; margin: 18px 4px 10px; }
h2:first-child { margin-top: 0; }

.cartao { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--cartao); border: 1px solid var(--linha); border-radius: 18px; padding: 13px 14px; margin-bottom: 9px; }
.cartao .corpo { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cartao b { display: block; font-weight: 650; }
.cartao small { display: block; color: var(--suave); font-size: 13.5px; }
.cartao.feito b { text-decoration: line-through; color: var(--suave); }
.cartao.espera { opacity: .6; }
.cartao .escolha { flex: none; }
.hora { display: grid; place-items: center; width: 58px; min-height: 50px; flex: none; border-radius: 14px; background: var(--c, #6d4bc4); color: #fff; font-weight: 800; font-size: 14px; }
.t-audiencia { --c: #c2410c; } .t-reuniao { --c: #2563eb; } .t-atendimento { --c: #0e7490; } .t-prazo { --c: #b42318; } .t-compromisso { --c: #6d4bc4; } .t-bloqueio { --c: #64748b; } .t-dinheiro { --c: #15803d; } .t-contato { --c: #9a5b13; }
.marcar { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 2.5px solid var(--linha); background: none; color: transparent; font-weight: 900; }
.feito .marcar { background: #15803d; border-color: #15803d; color: #fff; }
.alta .marcar { border-color: #b42318; }
.selo { display: inline-block; border-radius: 99px; padding: 1px 9px; font-size: 12px; font-weight: 700; background: var(--linha); }
.selo.ruim { background: #fdeceb; color: #b42318; } .selo.bom { background: #e5f3ec; color: #14713d; }
.vazio { text-align: center; color: var(--suave); background: var(--cartao); border: 1px dashed var(--linha); border-radius: 18px; padding: 22px; }
.dias { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.dias button { flex: none; width: 56px; border: 1px solid var(--linha); background: var(--cartao); border-radius: 16px; padding: 8px 0; font-size: 12px; }
.dias button b { display: block; font-size: 20px; }
.dias button.on { background: var(--mesa); border-color: var(--mesa); color: #fff; }
.dias button.tem::after { content: ""; display: block; width: 6px; height: 6px; margin: 2px auto 0; border-radius: 50%; background: var(--madeira); }
.fichas { display: flex; flex-wrap: wrap; gap: 8px; }
.fichas button, .escolha { border: 1.5px solid var(--linha); background: var(--cartao); border-radius: 99px; padding: 8px 15px; font-weight: 600; font-size: 14px; }

nav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--cartao); border-top: 1px solid var(--linha); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--suave); padding: 5px 0; border-radius: 14px; }
nav button.on { color: var(--tom); background: color-mix(in srgb, var(--tom) 13%, transparent); box-shadow: inset 0 4px 0 var(--madeira); }
nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#mais { position: fixed; right: 18px; bottom: calc(82px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border: 0; border-radius: 22px; background: var(--madeira); color: #142427; font-size: 34px; line-height: 1; box-shadow: 0 12px 28px rgba(0, 0, 0, .3); }

dialog { width: 100%; max-width: 640px; max-height: 92dvh; margin: auto auto 0; border: 0; border-radius: 28px 28px 0 0; background: var(--folha); color: var(--tinta); padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); overflow: auto; }
dialog[open] { animation: sobe .24s ease-out; }
@keyframes sobe { from { transform: translateY(60px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }
dialog::backdrop { background: rgba(6, 24, 23, .55); }
.folha-topo { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.folha-topo h3 { flex: 1; font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.folha-topo button { border: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--linha); font-size: 20px; }
label { display: block; font-weight: 650; font-size: 14px; margin: 12px 0 6px; }
input, select, textarea { width: 100%; min-height: 48px; border: 1.5px solid var(--linha); border-radius: 14px; background: var(--cartao); padding: 10px 13px; }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.botao { display: block; width: 100%; text-align: center; text-decoration: none; border: 0; border-radius: 16px; background: var(--mesa); color: #fff; font-weight: 700; padding: 15px; margin-top: 12px; }
.botao.claro { background: var(--cartao); color: var(--tinta); border: 1.5px solid var(--linha); }
.botao.verde { background: #14804a; } .botao.perigo { background: none; color: #b42318; }
.botao:disabled { opacity: .6; }
details { margin-top: 14px; }
summary { cursor: pointer; font-weight: 700; color: var(--tom); padding: 8px 0; }
.entrada { max-width: 420px; margin: 0 auto; padding: 8vh 6px 0; text-align: center; }
.entrada img { width: 96px; height: 96px; border-radius: 26px; }
.entrada h1 { font-size: 26px; margin: 16px 0 8px; }
.entrada p, .nota { color: var(--suave); margin-top: 10px; font-size: 14.5px; }
.entrada ol { text-align: left; margin: 16px 0 0 20px; line-height: 1.9; }
.entrada textarea { margin-top: 14px; min-height: 90px; }
#visor { display: block; width: 100%; max-height: 60dvh; border-radius: 18px; background: #000; object-fit: cover; }
#aviso { position: fixed; left: 14px; right: 14px; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 9; display: grid; gap: 8px; pointer-events: none; }
#aviso div { background: var(--mesa); color: #fff; border-radius: 14px; padding: 13px 16px; box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
#aviso div.ruim { background: #8f1d14; }
dialog #aviso { position: static; margin-top: 12px; }
.cartao .escolha-nada { border: 0; background: none; text-align: left; padding: 0; }
.cartao small b { display: inline; margin-right: 6px; }
.botao.falar { display: flex; align-items: center; justify-content: center; gap: 10px; }
.botao.falar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#frase { margin-top: 12px; min-height: 96px; }
.cartao small.ficou { color: var(--r); font-weight: 650; }
.cartao.resultado { border-left: 5px solid var(--r); }
.cartao.resultado b { color: var(--r); }
.opcoes { display: flex; flex-wrap: wrap; gap: 8px; }
.opcoes label { margin: 0; }
.opcoes input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.opcoes span { display: inline-block; border: 1.5px solid var(--linha); background: var(--cartao); border-radius: 99px; padding: 9px 15px; font-weight: 600; font-size: 14px; }
.opcoes input:checked + span { background: var(--r); border-color: var(--r); color: #fff; }
.opcoes input:focus-visible + span { outline: 2px solid var(--r); outline-offset: 2px; }
.dias-rapidos { margin-bottom: 10px; }
.dias-rapidos button.on { background: var(--tinta); border-color: var(--tinta); color: var(--cartao); }

/* balão de sugestões */
.balao-topo { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; width: 50px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 23px 23px 6px 23px; background: var(--madeira); color: #142427; }
.balao-topo svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.balao-topo b { position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #b3261e; color: #fff; font-size: 12px; line-height: 22px; }
.partes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 16px; background: var(--linha); }
.partes button { border: 0; border-radius: 12px; background: none; min-height: 44px; font-weight: 700; font-size: 14px; }
.partes button.on { background: var(--cartao); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.sg { background: var(--cartao); border: 1px solid var(--linha); border-radius: 18px; padding: 13px 14px; margin-bottom: 10px; overflow-wrap: anywhere; }
.sg.nova { border-color: var(--madeira); box-shadow: inset 4px 0 0 var(--madeira); }
.sg small { display: block; color: var(--suave); font-size: 13px; }
.sg p { margin: 6px 0; white-space: pre-wrap; }
.sg blockquote { margin-top: 8px; padding: 10px 13px; border-radius: 4px 16px 16px 16px; background: var(--latao-claro); white-space: pre-wrap; }
.sg blockquote b { display: block; color: var(--latao-texto); font-size: 12.5px; }
.passos-sg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; list-style: none; margin: 8px 0 2px; }
.passos-sg li { padding-top: 8px; border-top: 5px solid var(--linha); border-radius: 3px; font-size: 11px; font-weight: 600; color: var(--suave); }
.passos-sg li.feito { border-color: var(--tom); color: var(--tinta); }
.sg .escolha { margin-top: 8px; }
.sg .escolha[aria-pressed="true"] { background: var(--mesa); border-color: var(--mesa); color: #fff; }
.sg .tirar { border: 0; background: none; color: #b3261e; font-weight: 700; font-size: 13.5px; padding: 10px 0 0; }
#sgTexto { min-height: 120px; }
