/* versão 20261014c */
:root {
  /* cores tiradas do logo */
  --papel: #fcf6ea;
  --papel-2: #f4e9d5;
  --branco: #fffdf8;
  --tinta: #2b1b0d;
  --suave: #6f5f4f;
  --regua: #e5d9c2;
  --regua-forte: #c9b999;
  --rosa: #a34751;
  --rosa-esc: #8d3d47;
  --rosa-cl: #f6e3e1;
  --oliva: #746e52;
  --oliva-esc: #5c5841;
  --oliva-cl: #eeead6;
  --cab: #7a3340;
  --erro: #a4261b;
  --r: 4px;
  --italico: Georgia, "Times New Roman", serif;
  --script: "Kaushan Script", "Segoe Script", cursive;
  --sans: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--tinta);
  background: var(--papel);
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
}
body.travado { overflow: hidden; }
h1, h2, h3, p, ul, ol, dl { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--rosa); outline-offset: 2px; }

.rotulo { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--suave); }

/* ---------- Cabeçalho: faixa com o logo e flores ---------- */
#app { display: flex; flex-direction: column; min-height: 100dvh; }
.topo-site { position: relative; overflow: hidden; padding-top: env(safe-area-inset-top, 0px); color: var(--papel); background: var(--cab); }
@keyframes florescer { from { opacity: 0; } to { opacity: 1; } }
.topo-in, .masthead { position: relative; z-index: 1; }
.topo-in { display: flex; align-items: center; justify-content: flex-start; max-width: 1100px; height: 48px; margin: 0 auto; padding: 0 16px; font-size: 0.85rem; }
.topo-link { color: rgba(252, 246, 234, 0.9); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.masthead { max-width: 1100px; margin: 0 auto; padding: 0 20px 24px; text-align: center; }
.logo { display: block; width: 112px; height: 112px; margin: 0 auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25)); animation: crescer 0.8s var(--ease) both; }
.marca { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.masthead.sem-logo .marca { position: static; width: auto; height: auto; clip: auto; margin-bottom: 4px; font-family: var(--script); font-weight: 400; font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: 1.1; }
.marca-sub { margin-top: 16px; font-family: var(--sans); font-weight: 700; font-size: clamp(0.9rem, 2.6vw, 1.05rem); line-height: 24px; letter-spacing: 0.2em; text-transform: uppercase; color: #fff; animation: subir-suave 0.7s 0.12s var(--ease) both; }
.marca-aviso { margin-top: 8px; font-family: var(--italico); font-style: italic; font-weight: 400; font-size: clamp(1.25rem, 4vw, 1.7rem); line-height: 32px; color: #f1d9bd; animation: subir-suave 0.7s 0.24s var(--ease) both; }
@keyframes crescer { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: none; } }
@keyframes subir-suave { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Dias: abas planas ---------- */
.abas { position: sticky; top: 0; z-index: 20; background: var(--cab); }
.abas::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 3px; background: var(--cab); pointer-events: none; }
.abas-cap { position: relative; display: flex; align-items: stretch; gap: 2px; width: max-content; max-width: 100%; margin: 0 auto -1px; padding: 0 16px 1px; overflow-x: auto; scrollbar-width: none; }
.abas-cap::-webkit-scrollbar { display: none; }
.aba { flex: none; position: relative; min-height: 49px; margin-bottom: -1px; padding: 0 20px; font-size: 0.84rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(252, 246, 234, 0.88); background: transparent; border: 0; border-radius: 12px 12px 0 0; outline: none; transition: color 0.25s var(--ease), background 0.25s var(--ease); }
@media (hover: hover) { .aba:not(.ativa):hover { color: #fff; background: rgba(255, 255, 255, 0.08); } }
.aba.ativa { color: var(--cab); background: var(--papel); }
.aba.ativa::before, .aba.ativa::after { content: ""; position: absolute; bottom: 0; width: 12px; height: 12px; pointer-events: none; }
.aba.ativa::before { left: -12px; background: radial-gradient(circle at 0 0, transparent 11.5px, var(--papel) 12px); }
.aba.ativa::after { right: -12px; background: radial-gradient(circle at 100% 0, transparent 11.5px, var(--papel) 12px); }
.aba:focus, .aba:focus-visible { outline: none; }
.aba:not(.ativa):focus-visible { background: rgba(255, 255, 255, 0.12); }
.aba .cont { margin-left: 6px; padding: 1px 6px; font-size: 0.7rem; letter-spacing: 0; color: var(--cab); background: #fff; border-radius: 9px; vertical-align: 1px; }
.aba.ativa .cont { color: #fff; background: var(--cab); }

/* ---------- Estrutura ---------- */
.layout { flex: 1 0 auto; width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.principal { min-width: 0; padding-top: 18px; }
.lateral { display: none; }

.prazo { animation: subir-suave 0.6s 0.4s var(--ease) both; margin-bottom: 8px; padding: 10px 14px; font-size: 0.92rem; font-weight: 600; color: var(--oliva-esc); text-align: center; background: var(--oliva-cl); border: 1px solid var(--oliva); border-radius: var(--r); }

#vista { scroll-margin-top: 76px; }
/* encerrado / sem cardápio / erro: cartão no meio da tela */
body.centralizar .layout { display: grid; grid-template-columns: minmax(0, 520px); justify-content: center; align-content: center; padding-top: 36px; padding-bottom: 36px; }
body.centralizar .principal { padding: 0; }
body.centralizar .aviso-card { margin: 0; }
body.centralizar .dock { display: none; }
.dia { animation: dia-entra 0.4s var(--ease) both; }
.dia.sai { animation: dia-sai 0.15s ease-in both; }
@keyframes dia-entra { from { opacity: 0; } to { opacity: 1; } }
@keyframes dia-sai { to { opacity: 0; transform: translateX(var(--dx, 0px)); } }
@keyframes card-entra { from { opacity: 0; transform: translate(var(--dx, 0px), 14px); } to { opacity: 1; transform: none; } }
@keyframes aparece { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dia-nome { animation: card-entra 0.5s var(--ease) backwards; margin-top: 22px; font-weight: 800; font-size: 1.7rem; line-height: 1.2; letter-spacing: -0.01em; text-align: center; color: var(--rosa-esc); }
.dia-ajuda { animation: card-entra 0.5s 0.05s var(--ease) backwards; margin-top: 2px; text-align: center; color: var(--suave); font-size: 0.95rem; }

/* ---------- Grupos e opções ---------- */
.grupo { margin-top: 30px; scroll-margin-top: 70px; }
.grupo-topo { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.grupo-n { min-width: 1.1em; font-family: var(--script); font-size: 1.3rem; color: var(--regua-forte); transition: color 0.2s; }
.grupo.ok .grupo-n { color: var(--rosa); }
.grupo-topo h3 { font-family: var(--script); font-weight: 400; font-size: 1.65rem; line-height: 1.15; color: var(--rosa-esc); }
.grupo-nota { margin-left: auto; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--suave); }
.grupo-nota::before { content: "Escolha 1"; }
.grupo.ok .grupo-nota { color: var(--oliva-esc); }
.grupo.ok .grupo-nota::before { content: "Escolhido"; }
.grupo.falta .grupo-topo h3 { animation: piscar 0.9s; }
@keyframes piscar { 0%, 100% { color: var(--rosa-esc); } 25%, 75% { color: var(--erro); } }

.itens { border-top: 1px solid var(--oliva); }
.item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 12px 10px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--regua);
  transition: background 0.15s, box-shadow 0.15s;
}
@media (hover: hover) { .item:hover { background: var(--papel-2); } }
.item.on { background: var(--rosa-cl); box-shadow: inset 0 0 0 1.5px var(--rosa); }
.marcador { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border: 1.5px solid var(--regua-forte); border-radius: 50%; transition: border-color 0.15s; }
.marcador::after { content: ""; width: 10px; height: 10px; background: var(--rosa); border-radius: 50%; transform: scale(0); transition: transform 0.18s var(--ease); }
.item.on .marcador { border-color: var(--rosa); }
.item.on .marcador::after { transform: scale(1); }
.item-corpo { flex: 1; display: grid; gap: 1px; min-width: 0; }
.item-nome { font-weight: 600; line-height: 1.25; }
.item-desc { font-size: 0.85rem; color: var(--suave); line-height: 1.3; }
.item-extra { flex: none; font-size: 0.88rem; font-weight: 700; color: var(--rosa); white-space: nowrap; }
.item-foto { flex: none; width: 60px; height: 60px; overflow: hidden; background: var(--papel-2); border-radius: var(--r); }
.item-foto img { display: block; width: 100%; height: 100%; object-fit: cover; }


.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 6px; }
.chip { min-height: 44px; padding: 0 16px; font-weight: 700; background: #fff; border: 1px solid var(--regua-forte); border-radius: var(--r); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.chip.on { color: #fff; background: var(--rosa); border-color: var(--rosa); }
.chip:disabled { opacity: 0.4; cursor: default; }
.dica { font-size: 0.85rem; color: var(--suave); }

.stepper { display: inline-flex; align-items: center; flex: none; background: #fff; border: 1px solid var(--regua-forte); border-radius: var(--r); }
.stepper button { width: 44px; height: 44px; font-size: 1.3rem; line-height: 1; color: var(--tinta); background: none; border: 0; }
.stepper button:active { background: var(--papel-2); }
.stepper output { min-width: 30px; text-align: center; font-weight: 700; }

/* ---------- Especial ---------- */
.esp-lista { margin-top: 14px; border-top: 1px solid var(--oliva); }
.esp { display: flex; align-items: center; gap: 14px; padding: 16px 0 16px 4px; border-bottom: 1px solid var(--regua); }
.esp-corpo { flex: 1; min-width: 0; }
.esp-corpo h3 { font-family: var(--script); font-weight: 400; font-size: 1.5rem; line-height: 1.2; color: var(--rosa-esc); }
.esp-corpo p { margin-top: 2px; font-size: 0.9rem; color: var(--suave); }
.preco { display: inline-block; margin-top: 6px; font-weight: 800; }
.esp .item-foto { width: 72px; height: 72px; }

/* ---------- Barra fixa de baixo ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; transform: translateY(115%); visibility: hidden; transition: transform 0.45s var(--ease), visibility 0s 0.45s; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--branco); border-top: 1px solid var(--regua-forte); box-shadow: 0 -8px 22px rgba(43, 27, 13, 0.1); }
.dock.on { transform: none; visibility: visible; transition-delay: 0s; }
.dock-in { display: flex; align-items: center; gap: 14px; max-width: 1100px; margin: 0 auto; }
.dock-resumo { flex: 1; display: grid; align-content: center; justify-items: center; gap: 0; min-height: 54px; padding: 0 10px; text-align: center; color: var(--rosa-esc); background: var(--branco); border: 1.5px solid var(--rosa); border-radius: var(--r); }
.dock-resumo b { font-size: 0.95rem; font-weight: 800; line-height: 1.25; white-space: nowrap; }
.dock-resumo span { font-size: 0.76rem; font-weight: 600; line-height: 1.2; color: var(--suave); white-space: nowrap; }
.dock-resumo:active { background: var(--rosa-cl); }
.dock-cta { flex: 1.15; min-height: 54px; padding: 0 12px; white-space: nowrap; font-size: 1rem; font-weight: 800; color: #fff; background: var(--rosa); border: 1px solid var(--rosa); border-radius: var(--r); transition: background 0.15s, transform 0.15s var(--ease); }
.dock-cta:active { background: var(--rosa-esc); transform: scale(0.99); }
.dock.pulso .dock-in { animation: pulso 0.35s var(--ease); }
@keyframes pulso { 40% { transform: scale(1.012); } }
.principal { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; font-weight: 800; color: #fff; background: var(--rosa); border: 0; border-radius: var(--r); text-decoration: none; }

/* ---------- Página do dia: cartões ---------- */
.cards-grade { column-count: 1; column-gap: 18px; margin-top: 20px; }
.card-grupo { break-inside: avoid; margin: 0 0 18px; overflow: hidden; background: var(--branco); border-radius: 10px; box-shadow: 0 4px 16px rgba(43, 27, 13, 0.09); animation: card-entra 0.55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms + 70ms); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
@media (hover: hover) { .card-grupo:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(43, 27, 13, 0.13); } }
.card-grupo h3 { padding: 14px 18px 10px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--suave); }
.card-grupo ul { margin: 0; padding: 0; list-style: none; }
.card-grupo li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--regua); }
.cg-nome { display: block; font-weight: 700; line-height: 1.3; color: var(--rosa-esc); }
.cg-desc { display: block; margin-top: 1px; font-size: 0.85rem; line-height: 1.35; color: var(--suave); }
.cg-extra { flex: none; font-size: 0.88rem; font-weight: 800; color: var(--rosa); white-space: nowrap; }
@media (min-width: 640px) { .cards-grade { column-count: 2; } }
.minhas { margin-top: 22px; }
.minhas > .rotulo { display: block; padding-bottom: 6px; border-bottom: 1px solid var(--oliva); }

/* ---------- Janela de montar a marmita (um passo por vez) ---------- */
dialog.sheet.montar { max-width: none; width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
dialog.sheet.montar .sheet-in { height: 100dvh; max-height: 100dvh; }
.passo-m { animation: entra 0.26s var(--ease) both; }
.passo-m.volta { animation-name: entraVolta; }
@keyframes entra { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes entraVolta { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.passo-titulo { font-family: var(--script); font-weight: 400; font-size: 2.1rem; line-height: 1.2; color: var(--rosa-esc); }
.passo-ajuda { margin-bottom: 14px; color: var(--suave); }
.passo-m .itens { margin-top: 4px; }
.revisao { margin: 14px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--oliva); }
.revisao li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--regua); }
.revisao small { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--suave); }
.revisao strong { font-weight: 700; }
.revisao .link { flex: none; }

/* rodapé fixo da janela: quantidade, repetir em outros dias e botões */
.rod-fixo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--branco); border-top: 1px solid var(--regua-forte); box-shadow: 0 -8px 20px rgba(43, 27, 13, 0.08); }
.rod-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rod-linha small { display: block; font-size: 0.82rem; color: var(--suave); }
.rod-valor strong { font-size: 1.35rem; font-weight: 800; }
.rod-valor span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--suave); }
.rod-rep { min-width: 0; }
.rod-rep .rotulo { display: block; margin-bottom: 6px; }
.chips-rol { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips-rol::-webkit-scrollbar { display: none; }
.chips-rol .chip { flex: none; }
.rod-botoes { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.rod-botoes .btn-sec, .rod-botoes .btn-principal { max-width: none; width: 100%; }
@media (min-width: 640px) {
  dialog.sheet.montar { max-width: 560px; height: min(90dvh, 760px); max-height: 90dvh; margin: auto; border-radius: 0; }
  dialog.sheet.montar .sheet-in { height: 100%; max-height: none; }
}

/* ---------- Estados ---------- */
.sk { height: 58px; margin-bottom: 8px; background: linear-gradient(90deg, #f1e6cf 25%, #f8f0df 37%, #f1e6cf 63%); background-size: 400% 100%; animation: brilho 1.3s ease infinite; border-radius: var(--r); }
.sk-t { width: 55%; height: 38px; margin-top: 16px; margin-bottom: 18px; }
@keyframes brilho { from { background-position: 100% 0; } to { background-position: 0 0; } }
.aviso-card { margin-top: 18px; padding: 26px 20px; text-align: center; background: var(--branco); border: 1px solid var(--regua-forte); border-radius: var(--r); }
.aviso-card h2 { margin-bottom: 6px; font-family: var(--script); font-weight: 400; font-size: 1.7rem; line-height: 1.2; color: var(--rosa-esc); }
.aviso-card p { margin-bottom: 16px; color: var(--suave); }

/* ---------- Pedido (lateral e janela) ---------- */
.resumo-dia { margin-bottom: 16px; }
.resumo-dia h3 { margin-bottom: 2px; font-family: var(--script); font-weight: 400; font-size: 1.3rem; color: var(--rosa-esc); }
.linha-c { padding: 12px 0; border-bottom: 1px dotted var(--regua-forte); }
.lc-topo { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.lc-topo b { white-space: nowrap; }
.lc-desc { margin-top: 1px; font-size: 0.88rem; color: var(--suave); }
.lc-acoes { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; margin-top: 6px; }
.lc-acoes .stepper button { width: 40px; height: 40px; }
.link { min-height: 44px; padding: 0 4px; font-size: 0.85rem; font-weight: 700; color: var(--rosa); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; }
.link:last-child { color: var(--suave); }
.vazio-c { padding: 18px 0; color: var(--suave); }
.tot-lateral { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0; padding-top: 12px; font-size: 1.1rem; font-weight: 800; border-top: 2px solid var(--tinta); }
.btn-final { width: 100%; min-height: 54px; font-weight: 800; color: #fff; background: var(--rosa); border: 0; border-radius: var(--r); }

/* ---------- Janela ---------- */
dialog.sheet { width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; padding: 0; overflow: hidden; color: var(--tinta); background: var(--papel); border: 0; border-radius: 0; }
dialog.sheet::backdrop { background: rgba(43, 27, 13, 0.55); animation: fundo 0.2s ease; }
dialog.sheet[open] { animation: subir 0.24s var(--ease); }
dialog.sheet.saindo { animation: descer 0.18s ease-in forwards; }
dialog.sheet.saindo::backdrop { opacity: 0; transition: opacity 0.18s; }
@keyframes subir { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes descer { to { transform: translateY(28px); opacity: 0; } }
@keyframes fundo { from { opacity: 0; } }

.sheet-in { display: flex; flex-direction: column; max-height: 92dvh; }
.sheet-topo { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; }
.sheet-tit { flex: 1; min-width: 0; display: grid; text-align: center; }
.sheet-tit strong { font-family: var(--script); font-weight: 400; font-size: 1.6rem; line-height: 1.15; color: var(--rosa-esc); }
.sheet-tit span { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--suave); }
.icone { flex: none; width: 44px; height: 44px; font-size: 1.4rem; line-height: 1; background: transparent; border: 1px solid var(--regua-forte); border-radius: var(--r); }
.progresso { height: 2px; margin: 0 16px; background: var(--regua); }
.progresso i { display: block; height: 100%; width: 0; background: var(--rosa); transition: width 0.3s var(--ease); }
.sheet-corpo { flex: 1; min-height: 0; padding: 18px 16px 12px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-rodape { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--branco); border-top: 1px solid var(--regua-forte); }
.rod-total { display: grid; line-height: 1.2; }
.rod-total small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--suave); }
.rod-total strong { font-size: 1.45rem; font-weight: 800; }
.btn-principal { flex: 1; max-width: 270px; min-height: 52px; padding: 0 22px; font-weight: 800; color: #fff; background: var(--rosa); border: 0; border-radius: var(--r); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn-principal:active { background: var(--rosa-esc); }
.btn-principal:disabled { opacity: 0.5; cursor: default; }
.btn-sec { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; font-weight: 700; color: var(--tinta); background: transparent; border: 1px solid var(--tinta); border-radius: var(--r); text-decoration: none; }

.passo { animation: aparece 0.22s var(--ease) both; }

.campo { display: grid; gap: 6px; margin-bottom: 16px; }
.campo > span:first-child { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--suave); }
.campo input, .campo textarea { width: 100%; min-height: 50px; padding: 12px 14px; font-size: 1rem; background: #fff; border: 1px solid var(--regua-forte); border-radius: var(--r); }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--rosa); box-shadow: 0 0 0 3px var(--rosa-cl); }
.campo textarea { resize: none; }
fieldset { margin: 0 0 16px; padding: 0; border: 0; }
fieldset legend { padding: 0; margin-bottom: 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--suave); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; flex: 1 1 auto; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 16px; font-weight: 600; background: #fff; border: 1px solid var(--regua-forte); border-radius: var(--r); transition: border-color 0.15s, background 0.15s; }
.seg input:checked + span { color: var(--rosa-esc); font-weight: 800; background: var(--rosa-cl); border-color: var(--rosa); box-shadow: inset 0 0 0 1px var(--rosa); }
.seg input:focus-visible + span { outline: 2px solid var(--rosa); outline-offset: 2px; }

.totais { margin: 4px 0 8px; padding-top: 10px; border-top: 2px solid var(--tinta); }
.totais div { display: flex; justify-content: space-between; padding: 3px 0; }
.totais dt, .totais dd { margin: 0; }
.totais .total { margin-top: 4px; padding-top: 8px; font-size: 1.3rem; font-weight: 800; border-top: 1px solid var(--regua); }

.sucesso { display: grid; justify-items: center; gap: 8px; padding: 14px 6px 8px; text-align: center; }
.sucesso-logo { width: 84px; height: 84px; }
.sucesso h2 { font-family: var(--script); font-weight: 400; font-size: 2.2rem; line-height: 1.15; color: var(--rosa-esc); }
.sucesso .num { margin: 4px 0; padding: 6px 14px; font-weight: 800; letter-spacing: 0.14em; border-top: 1px solid var(--oliva); border-bottom: 1px solid var(--oliva); }
.sucesso p { max-width: 36ch; color: var(--suave); }
.sucesso .btn-principal, .sucesso .btn-sec { width: 100%; max-width: none; margin-top: 8px; }

#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 100; display: flex; align-items: center; gap: 12px; max-width: min(92vw, 460px); padding: 12px 16px; font-weight: 500; color: var(--papel); background: var(--tinta); border-radius: var(--r); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22); opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity 0.2s, transform 0.25s var(--ease); }
#toast.on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
#toast.erro { background: var(--erro); }
#toast button { min-height: 44px; padding: 0 4px; font-weight: 800; color: #f2c9c4; background: none; border: 0; text-decoration: underline; }

/* ---------- Telas maiores ---------- */
@media (min-width: 640px) {
  dialog.sheet { margin: auto; border-radius: 0; }
  .logo { width: 150px; height: 150px; }
}
@media (min-width: 960px) {
  .topo-link { margin-left: auto; }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
  .dock { position: sticky; bottom: 0; left: auto; right: auto; margin: 20px 0 0; padding: 12px 0; background: linear-gradient(to top, var(--papel) 72%, rgba(252, 246, 234, 0)); border-top: 0; box-shadow: none; }
  .dock-resumo { display: none; }
  .principal { padding-bottom: 0; }
  .lateral { display: block; position: sticky; top: 84px; margin-top: 18px; padding: 22px; background: var(--branco); border: 1px solid var(--regua-forte); border-radius: var(--r); }
  .lateral h2 { margin-bottom: 8px; padding-bottom: 8px; font-family: var(--script); font-weight: 400; font-size: 1.7rem; line-height: 1.2; color: var(--rosa-esc); border-bottom: 2px solid var(--tinta); }
  #toast { bottom: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}
