:root {
  /* substituídas em app.js pelo "tema" de menu.js */
  --fundo: #07614f;
  --painel: #25483f;
  --destaque: #ffd54a;
  --rosa: #f7a8cd;
  --verde: #19b48b;
  --texto: #fffaf0;

  --suave: rgba(255, 250, 240, .72);
  --linha: rgba(255, 250, 240, .16);
  --perigo: #ff6b5e;
  --barra: 64px;
  --titulo: "Rye", "Outfit", serif;
  --corpo: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: #043d32;
  color: var(--texto);
  font-family: var(--corpo);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--destaque); outline-offset: 2px; }
[hidden] { display: none !important; }

#app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--fundo);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, .45);
}

.ecra { position: absolute; inset: 0; display: none; }
.ecra.ativo { display: block; }

/* ---------- Início ---------- */
#inicio.ativo {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 28px 24px; text-align: center;
  background: var(--fundo) center / cover no-repeat;
}
.atalhos { display: flex; gap: 10px; }
.atalhos a {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--linha); color: var(--texto); text-decoration: none; font-size: 13px; font-weight: 600;
}
.atalhos svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logo-grande {
  width: 190px; height: 190px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--destaque); box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
.nome-grande { font-family: var(--titulo); font-size: 40px; line-height: 1; color: var(--destaque); letter-spacing: .02em; }
.sub { color: var(--suave); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; font-weight: 600; }
.horario { display: flex; gap: 22px; font-size: 14px; color: var(--suave); }
.horario b { display: block; color: var(--destaque); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.acoes { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 300px; margin-top: 6px; }
.btn {
  min-height: 52px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-cheio { background: var(--destaque); color: #1d2b26; }
.btn-linha { border: 2px solid var(--linha); }
.linguas { display: flex; gap: 6px; border: 1px solid var(--linha); border-radius: 999px; padding: 4px; }
.linguas button { min-width: 48px; height: 34px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--suave); }
.linguas button[aria-pressed="true"] { background: var(--texto); color: #1d2b26; }

/* ---------- Vista em vídeo ---------- */
#reel { background: #000; }
.rolo {
  height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory;
  scrollbar-width: none; overscroll-behavior: contain;
}
.rolo::-webkit-scrollbar { display: none; }
.cartao { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #111; }
.cartao video, .cartao img.media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cartao img.media { animation: aproximar 14s ease-in-out infinite alternate; }
@keyframes aproximar {
  from { transform: scale(1.04); }
  to { transform: scale(1.2) translateY(-2.5%); }
}
.cartao::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .5) 0%, transparent 22%, transparent 42%, rgba(0, 0, 0, .86) 100%);
}
.topo {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
}
.topo img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--destaque); }
.topo strong { font-family: var(--titulo); font-size: 18px; color: var(--destaque); flex: 1; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.topo .linguas { background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
.topo .linguas button { min-width: 40px; height: 30px; }

.info {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: var(--barra);
  padding: 0 44px calc(34px + env(safe-area-inset-bottom)) 16px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}
.selos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.selo {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; background: var(--destaque); color: #1d2b26; text-shadow: none;
}
.selo.verde { background: var(--verde); color: #06241c; }
.linha-nome { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.info h2 { font-size: 30px; line-height: 1.05; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; color: var(--rosa); }
.preco { font-size: 22px; font-weight: 800; color: var(--destaque); white-space: nowrap; }
.preco small { display: block; font-size: 11px; font-weight: 600; color: var(--suave); text-align: right; }
.pao { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--destaque); }
.desc { margin-top: 6px; font-size: 15px; color: var(--texto); max-width: 34em; }
.alergs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.alerg {
  font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); text-shadow: none;
}
.alerg.marcado { background: var(--perigo); color: #2a0a07; font-weight: 800; }
.acao-cartao { margin-top: 12px; }
.btn-mini {
  height: 40px; padding: 0 18px; border-radius: 999px; background: var(--destaque); color: #1d2b26;
  font-weight: 800; font-size: 14px; text-shadow: none;
}
.indisponivel { font-size: 12px; font-weight: 700; color: var(--suave); text-shadow: none; }
.aviso-contem {
  display: inline-block; margin-bottom: 8px; padding: 6px 12px; border-radius: 10px;
  background: var(--perigo); color: #2a0a07; font-weight: 800; font-size: 13px; text-shadow: none;
}
.pontos {
  position: absolute; z-index: 3; right: 12px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 7px;
}
.pontos i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .4); transition: height .2s, background .2s; }
.pontos i.ativo { height: 20px; border-radius: 3px; background: var(--destaque); }
.dica {
  position: absolute; z-index: 2; left: 50%; bottom: calc(var(--barra) + 8px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  font-size: 12px; font-weight: 600; color: var(--suave); animation: subir 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes subir { 50% { transform: translate(-50%, -6px); } }
.vazio { height: 100%; display: flex; align-items: center; justify-content: center; padding: 32px; text-align: center; color: var(--suave); }

/* ---------- Lista ---------- */
#lista.ativo, #pedido.ativo { display: flex; flex-direction: column; }
.cabecalho {
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 10px;
}
.cabecalho img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--destaque); }
.cabecalho strong { font-family: var(--titulo); font-size: 20px; color: var(--destaque); flex: 1; line-height: 1; }
.cabecalho .linguas button { min-width: 40px; height: 30px; }
.separadores {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 12px; scrollbar-width: none; flex: none;
  border-bottom: 1px solid var(--linha);
}
.separadores::-webkit-scrollbar { display: none; }
.separadores button {
  flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linha);
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.separadores button.ativo { background: var(--destaque); border-color: var(--destaque); color: #1d2b26; }
.corpo { flex: 1; overflow-y: auto; padding: 0 14px calc(var(--barra) + 24px); scroll-behavior: smooth; }
.seccao { padding-top: 22px; }
.seccao h3 { font-family: var(--titulo); font-size: 26px; font-weight: 400; letter-spacing: .03em; text-transform: uppercase; }
.cor-destaque { color: var(--destaque); }
.cor-rosa { color: var(--rosa); }
.cor-verde { color: var(--verde); }
.nota { font-size: 13px; color: var(--suave); margin-top: 2px; }
.itens { margin-top: 10px; background: var(--painel); border-radius: 16px; padding: 4px 14px; }
.item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--linha); }
.item:last-child { border-bottom: 0; }
.item .txt { flex: 1; min-width: 0; }
.item .cab { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.item h4 { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.item .preco { font-size: 16px; }
.item .preco small { display: inline; font-size: 11px; margin-right: 4px; }
.item .preco span { display: block; text-align: right; }
.item .desc { font-size: 14px; color: var(--suave); margin-top: 3px; }
.item .pao { font-size: 13px; margin-top: 3px; }
.item .selos { margin: 6px 0 0; }
.item .alergs { margin-top: 8px; gap: 4px; }
.item .alerg { background: rgba(255, 255, 255, .1); font-size: 11px; padding: 3px 7px; }
.item .alerg.marcado { background: var(--perigo); }
.item .lado { flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.item .lado .indisponivel { max-width: 76px; text-align: right; font-size: 11px; }
.item .mini { position: relative; display: block; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: #0003; }
.mais {
  width: 40px; height: 40px; border-radius: 50%; background: var(--destaque); color: #1d2b26;
  font-size: 24px; font-weight: 700; line-height: 1; display: grid; place-items: center;
}
.item .mini img { width: 100%; height: 100%; object-fit: cover; }
.item .mini::after {
  content: "▶"; position: absolute; right: 5px; bottom: 5px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--destaque); color: #1d2b26; font-size: 10px; display: grid; place-items: center; padding-left: 2px;
}
.item.contem h4, .item.contem .preco, .item.contem .desc, .item.contem .pao, .item.contem .mini { opacity: .45; }
.fora-de-horas .itens { opacity: .6; }
.faixa { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--verde); color: #06241c; font-size: 14px; font-weight: 600; }
.faixa button { text-decoration: underline; font-weight: 800; color: inherit; }
.item.contem .aviso-contem { margin: 6px 0 0; font-size: 12px; padding: 3px 9px; }
.rodape { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--linha); font-size: 13px; color: var(--suave); text-align: center; }
.rodape p + p { margin-top: 6px; }
.rodape .por { margin-top: 14px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.rodape .por b { color: var(--destaque); }

/* ---------- Barra inferior ---------- */
#barra {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: calc(var(--barra) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(20, 42, 36, .92); backdrop-filter: blur(12px); border-top: 1px solid var(--linha);
}
#barra button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--suave); }
#barra button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#barra button.ativo { color: var(--destaque); }
#barra .conta {
  position: absolute; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--perigo); color: #2a0a07; font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
#barra .conta.ok { background: var(--destaque); color: #1d2b26; }

/* ---------- Pedido ---------- */
.topo-pedido { margin-top: 16px; }
.linha { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--linha); }
.linha:last-child { border-bottom: 0; }
.linha .txt { flex: 1; min-width: 0; }
.linha h4 { font-size: 16px; font-weight: 700; }
.linha .desc { font-size: 13px; color: var(--suave); }
.linha .preco { font-size: 16px; }
.qtd { flex: none; display: flex; align-items: center; gap: 4px; border: 1px solid var(--linha); border-radius: 999px; padding: 3px; }
.qtd button { width: 34px; height: 34px; border-radius: 50%; font-size: 20px; font-weight: 700; line-height: 1; }
.qtd b { min-width: 22px; text-align: center; font-size: 16px; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; font-size: 18px; font-weight: 700; }
.total b { font-size: 30px; color: var(--destaque); }
.dividir { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--suave); }
.dividir b { color: var(--texto); }
.acoes-pedido { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.combina { margin-top: 16px; }
.combina h5, #folha h5 { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--destaque); margin: 16px 0 8px; }
.combina h5 { margin-top: 0; }
.combina > div, .fichas { display: flex; flex-wrap: wrap; gap: 8px; }
.combina button, .fichas button {
  min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--linha);
  font-size: 14px; font-weight: 600; text-align: left;
}
.combina button { border-style: dashed; }
.combina button:disabled { opacity: .5; border-style: solid; }
.combina small, .fichas small { font-weight: 500; color: var(--suave); }
.fichas button[aria-pressed="true"] { background: var(--destaque); border-color: var(--destaque); color: #1d2b26; }
.fichas button[aria-pressed="true"] small { color: #1d2b26; }
#pedido .vazio { flex-direction: column; gap: 16px; height: 60%; }

#toast {
  position: absolute; z-index: 12; left: 50%; bottom: calc(var(--barra) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  padding: 10px 18px; border-radius: 999px; background: var(--texto); color: #1d2b26; font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35); white-space: nowrap;
}

/* ---------- Folha de alergénios ---------- */
#fundo-folha { position: absolute; z-index: 8; inset: 0; background: rgba(0, 0, 0, .55); }
#folha {
  position: absolute; z-index: 9; left: 0; right: 0; bottom: 0; max-height: 86%;
  display: flex; flex-direction: column;
  background: var(--painel); border-radius: 22px 22px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .4);
}
#folha h3 { font-family: var(--titulo); font-weight: 400; font-size: 24px; color: var(--destaque); }
#folha .intro { font-size: 14px; color: var(--suave); margin-top: 4px; }
#folha .rolar { overflow-y: auto; margin-top: 6px; padding-bottom: 4px; }
#folha .rolar .alergs { margin-top: 10px; }
#folha .rolar .aviso-contem { margin: 10px 0 0; }
.grelha { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 14px; }
.grelha button {
  min-height: 46px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--linha); font-size: 14px; font-weight: 600; text-align: left;
}
.grelha button[aria-pressed="true"] { background: var(--perigo); border-color: var(--perigo); color: #2a0a07; }
.grelha .ico { font-size: 18px; }
#folha .aviso { font-size: 12px; color: var(--suave); border-left: 3px solid var(--destaque); padding-left: 10px; }
#folha .fim { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
#folha .fim .btn { flex: 1; min-height: 48px; }

@media (prefers-reduced-motion: reduce) {
  .cartao img.media, .dica { animation: none; }
  .corpo { scroll-behavior: auto; }
}
