:root { --cor: #C2410C; --cor-clara: #fff1e8; --tinta: #1c1917; --suave: #78716c; --linha: #ece7e3; --fundo: #faf8f6; --ok: #15803d; --erro: #b91c1c; --raio: 16px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--tinta); background: var(--fundo); padding-bottom: 96px; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }
.wrap, main, .cats, .busca, .rodape, .topo-info, .resumo, .aviso { max-width: 760px; margin-left: auto; margin-right: auto; }

/* topo */
.topo-capa { height: 120px; background: linear-gradient(135deg, var(--cor), color-mix(in srgb, var(--cor) 55%, #000)); }
.topo-info { display: flex; gap: 14px; align-items: flex-start; padding: 0 16px; margin-top: -42px; }
.topo-txt { padding-top: 50px; }
.logo { flex: none; width: 88px; height: 88px; border-radius: 22px; background: #fff; border: 4px solid #fff; box-shadow: 0 6px 20px rgba(0,0,0,.12); display: grid; place-items: center; overflow: hidden; font-weight: 800; font-size: 30px; color: var(--cor); }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.topo-txt { min-width: 0; padding-bottom: 2px; }
.topo h1 { margin: 0; font-size: 23px; line-height: 1.15; letter-spacing: -.01em; }
.topo p { margin: 2px 0 6px; color: var(--suave); font-size: 14px; }
.status { border: 0; border-radius: 99px; padding: 4px 10px 4px 22px; font-size: 13px; font-weight: 600; background: #e9f7ee; color: var(--ok); position: relative; }
.status::before { content: ""; position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: currentColor; }
.status.fechado { background: #fdecec; color: var(--erro); }
.resumo { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 16px 4px; font-size: 13.5px; color: var(--suave); }
.resumo b { color: var(--tinta); font-weight: 600; }
.aviso { margin: 10px 16px 0; padding: 10px 14px; border-radius: 12px; background: var(--cor-clara); color: color-mix(in srgb, var(--cor) 70%, #000); font-size: 14px; font-weight: 500; }
@media (min-width: 792px) { .aviso { margin-left: auto; margin-right: auto; } }

/* categorias e busca */
.cats { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; background: color-mix(in srgb, var(--fundo) 92%, transparent); backdrop-filter: blur(8px); scrollbar-width: none; margin-top: 8px; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; border: 1px solid var(--linha); background: #fff; border-radius: 99px; padding: 8px 15px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.cats button.on { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.busca { padding: 0 16px 6px; }
.busca input { width: 100%; border: 1px solid var(--linha); background: #fff; border-radius: 12px; padding: 11px 14px; font-size: 15px; outline: none; }
.busca input:focus { border-color: var(--cor); }

/* lista */
main { padding: 0 16px; }
.secao h2 { font-size: 19px; margin: 22px 0 8px; letter-spacing: -.01em; }
.destaques { display: flex; gap: 12px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.destaques::-webkit-scrollbar { display: none; }
.dest { flex: none; width: 150px; border: 0; padding: 0; background: none; text-align: left; }
.dest .foto { width: 150px; height: 112px; border-radius: 14px; }
.dest b { display: block; font-size: 14.5px; margin-top: 7px; line-height: 1.25; }
.dest span { font-size: 14px; color: var(--suave); }
.item { display: flex; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); padding: 13px; margin-bottom: 10px; transition: transform .12s; }
.item:active { transform: scale(.985); }
.item .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item b { font-size: 16px; line-height: 1.25; }
.item .desc { font-size: 13.5px; color: var(--suave); margin: 4px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .preco { margin-top: auto; font-weight: 700; font-size: 15px; }
.item .preco small { font-weight: 500; color: var(--suave); font-size: 12.5px; }
.item .foto { width: 96px; height: 96px; border-radius: 12px; flex: none; }
.item.esgotado { opacity: .55; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; background: #eee; color: #555; margin-top: 4px; align-self: flex-start; }
.foto { position: relative; overflow: hidden; background: linear-gradient(140deg, var(--cor-clara), color-mix(in srgb, var(--cor) 22%, #fff)); display: grid; place-items: center; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto .emo { font-size: 42px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.12)); }
.vazio { text-align: center; color: var(--suave); padding: 40px 10px; }
.rodape { padding: 26px 16px 10px; font-size: 13px; color: var(--suave); text-align: center; }
.rodape a { color: inherit; }

/* barra da sacola */
.barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--fundo) 70%, transparent); }
.barra button { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 728px; margin: 0 auto; border: 0; border-radius: 14px; padding: 15px 18px; background: var(--cor); color: #fff; font-size: 16px; font-weight: 600; box-shadow: 0 8px 24px color-mix(in srgb, var(--cor) 35%, transparent); }
.barra .qtd { background: rgba(255,255,255,.22); border-radius: 8px; min-width: 28px; padding: 2px 7px; text-align: center; font-size: 14px; }
.barra strong { margin-left: auto; }
.barra button.fechado { background: #57534e; box-shadow: none; }

/* folha (bottom sheet) */
.fundo { position: fixed; inset: 0; z-index: 20; background: rgba(20,15,10,.45); animation: some .2s; }
.folha { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; overflow-y: auto; background: #fff; border-radius: 22px 22px 0 0; animation: sobe .25s cubic-bezier(.2,.8,.3,1); overscroll-behavior: contain; }
@media (min-width: 760px) { .folha { left: 50%; right: auto; width: 560px; transform: translateX(-50%); bottom: 4vh; border-radius: 22px; max-height: 90vh; animation: some .2s; } }
@keyframes sobe { from { transform: translateY(40px); opacity: 0; } }
@keyframes some { from { opacity: 0; } }
.folha .cab { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--linha); }
.folha .cab h3 { margin: 0; font-size: 18px; flex: 1; }
.fechar { border: 0; background: #f2efec; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; line-height: 1; flex: none; }
.folha .corpo { padding: 16px; }
.folha .rodape-folha { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--linha); display: flex; gap: 10px; align-items: center; }
.foto-grande { height: 220px; margin: -16px -16px 14px; }
.foto-grande .emo { font-size: 84px; }
.folha h4 { margin: 0 0 4px; font-size: 21px; }
.folha .desc { color: var(--suave); margin: 0 0 10px; font-size: 15px; }
.grupo { margin: 18px -16px 0; }
.grupo-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #f6f3f0; padding: 10px 16px; }
.grupo-cab b { font-size: 15px; }
.grupo-cab small { display: block; color: var(--suave); font-size: 12.5px; }
.obrig { font-size: 11px; font-weight: 700; text-transform: uppercase; background: var(--tinta); color: #fff; border-radius: 6px; padding: 3px 7px; flex: none; }
.obrig.ok { background: var(--ok); }
.op { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--linha); cursor: pointer; }
.op span { flex: 1; }
.op em { font-style: normal; color: var(--suave); font-size: 14px; }
.op input { width: 22px; height: 22px; accent-color: var(--cor); flex: none; margin: 0; }
.campo { display: block; margin: 14px 0 0; }
.campo > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.campo input, .campo select, .campo textarea { width: 100%; border: 1px solid #ddd6d0; border-radius: 12px; padding: 12px 13px; font-size: 16px; background: #fff; outline: none; }
.campo textarea { resize: vertical; min-height: 64px; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--cor); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cor) 18%, transparent); }
.passos { display: flex; align-items: center; border: 1px solid #ddd6d0; border-radius: 12px; flex: none; }
.passos button { border: 0; background: none; width: 42px; height: 46px; font-size: 22px; color: var(--cor); }
.passos button:disabled { color: #ccc; }
.passos span { min-width: 22px; text-align: center; font-weight: 700; }
.btn { flex: 1; border: 0; border-radius: 13px; padding: 14px 16px; background: var(--cor); color: #fff; font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.btn.centro { justify-content: center; }
.btn:disabled { background: #c9c3be; }
.btn.claro { background: var(--cor-clara); color: color-mix(in srgb, var(--cor) 75%, #000); }
.linha-sacola { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linha); }
.linha-sacola .txt { flex: 1; min-width: 0; }
.linha-sacola b { display: block; }
.linha-sacola small { display: block; color: var(--suave); font-size: 13px; }
.linha-sacola .val { font-weight: 700; margin-top: 4px; }
.linha-sacola .passos button { width: 36px; height: 38px; font-size: 19px; }
.contas { margin-top: 14px; font-size: 15px; }
.contas div { display: flex; justify-content: space-between; padding: 4px 0; color: var(--suave); }
.contas .total { color: var(--tinta); font-weight: 800; font-size: 18px; border-top: 1px solid var(--linha); margin-top: 6px; padding-top: 10px; }
.escolha { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.escolha label { border: 1.5px solid #ddd6d0; border-radius: 12px; padding: 12px; text-align: center; font-weight: 600; cursor: pointer; }
.escolha label small { display: block; font-weight: 400; color: var(--suave); font-size: 12.5px; }
.escolha input { position: absolute; opacity: 0; pointer-events: none; }
.escolha label:has(input:checked) { border-color: var(--cor); background: var(--cor-clara); }
.pgtos { display: flex; flex-wrap: wrap; gap: 8px; }
.pgtos label { border: 1.5px solid #ddd6d0; border-radius: 99px; padding: 8px 14px; font-size: 14.5px; cursor: pointer; }
.pgtos input { position: absolute; opacity: 0; pointer-events: none; }
.pgtos label:has(input:checked) { border-color: var(--cor); background: var(--cor-clara); font-weight: 600; }
.nota { font-size: 13px; color: var(--suave); margin: 6px 0 0; }
.erro { color: var(--erro); font-size: 14px; font-weight: 600; margin: 12px 0 0; }
.ok-tela { text-align: center; padding: 30px 16px 20px; }
.ok-tela .icone { width: 74px; height: 74px; border-radius: 50%; background: #e9f7ee; color: var(--ok); display: grid; place-items: center; font-size: 38px; margin: 0 auto 14px; }
.ok-tela h3 { font-size: 22px; margin: 0 0 6px; }
.ok-tela p { color: var(--suave); margin: 0 0 18px; }
.pix { background: #f6f3f0; border-radius: 12px; padding: 12px; margin: 0 0 16px; text-align: left; font-size: 14px; word-break: break-all; }
.info h5 { margin: 18px 0 6px; font-size: 15px; }
.info p, .info li { margin: 0; color: var(--suave); font-size: 14.5px; }
.info ul { list-style: none; padding: 0; margin: 0; }
.info li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--linha); }
.info li.hoje { color: var(--tinta); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 30; background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14.5px; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: sobe .2s; max-width: calc(100% - 32px); }
/* ícones de linha */
.ic { width: 1.15em; height: 1.15em; vertical-align: -.22em; flex: none; }
.foto .emo { color: var(--cor); display: grid; place-items: center; filter: none; }
.foto .emo .ic { width: 44px; height: 44px; stroke-width: 1.3; }
.dest .foto .emo .ic { width: 50px; height: 50px; }
.foto-grande .emo .ic { width: 92px; height: 92px; stroke-width: 1.1; }
.resumo .ic { color: var(--cor); }
.passos .ic { width: 19px; height: 19px; vertical-align: -.25em; }
.escolha .ic { color: var(--cor); }
.nota .ic { color: var(--cor); }
