body {
  background: var(--papel);
}
.app {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 120px;
  min-height: 100vh;
}

/* Cabeçalho */
.cab {
  padding: max(22px, env(safe-area-inset-top)) 16px 14px;
}
.cab__linha {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.cab__mesa {
  margin: 0 0 6px;
  font: 700 12px/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--acento);
}
.cab__nome {
  font-size: clamp(30px, 8.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
.cab__nota {
  margin: 10px 0 0;
  color: var(--tinta-2);
  font-size: 14px;
}
.chamar {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  border: 1.5px solid var(--tinta);
  background: var(--cartao);
  font-weight: 600;
  margin-top: 2px;
}
.chamar svg {
  width: 18px;
  height: 18px;
  color: var(--acento);
}
.chamar.ativo {
  background: var(--tinta);
  color: var(--papel);
}

/* Acompanhar pedidos */
.acompanhar {
  margin: 4px 16px 10px;
  display: grid;
  gap: 8px;
}
.pedido-estado {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 12px 14px;
  border-radius: var(--raio);
  background: var(--tinta);
  color: var(--papel);
}
.pedido-estado b {
  font-family: var(--f-display);
  font-size: 17px;
  letter-spacing: -0.01em;
}
.pedido-estado small {
  color: #bdb4a5;
  font-size: 12.5px;
}
.pedido-estado .passos {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 8px;
}
.pedido-estado .passos i {
  height: 4px;
  border-radius: 2px;
  background: #4a433a;
}
.pedido-estado .passos i.on {
  background: var(--acento);
}
.pedido-estado.erro {
  background: #f4dcd6;
  color: var(--erro);
}

/* Navegação de secções */
.sec-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 16px;
  background: rgba(245, 240, 230, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linha);
}
.sec-nav::-webkit-scrollbar {
  display: none;
}
.sec-nav a {
  flex: none;
  padding: 7px 13px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--tinta-2);
}
.sec-nav a.on {
  background: var(--tinta);
  color: var(--papel);
}

/* Lista */
.lista {
  padding: 0 16px;
}
.sec {
  padding-top: 26px;
  scroll-margin-top: 60px;
}
.sec h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 23px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--tinta);
}
.sec h2 small {
  font: 400 12px var(--f-mono);
  color: var(--tinta-3);
}
.prato {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px dashed var(--linha);
}
.prato:last-child {
  border-bottom: 0;
}
.prato__txt h3 {
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 16.5px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.prato__txt p {
  margin: 4px 0 0;
  color: var(--tinta-2);
  font-size: 14px;
  line-height: 1.42;
}
.prato__preco {
  display: inline-block;
  margin-top: 7px;
  font: 700 14.5px var(--f-mono);
  letter-spacing: -0.02em;
}
.prato__preco.mudou {
  animation: mudou 2.2s ease-out;
}
@keyframes mudou {
  0%,
  30% {
    background: #f5e6c8;
    box-shadow: 0 0 0 4px #f5e6c8;
  }
  100% {
    background: transparent;
    box-shadow: 0 0 0 4px transparent;
  }
}
.prato__lado {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.prato__foto {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--papel-2);
}
.mais {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--tinta);
  background: var(--cartao);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}
.passo {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--tinta);
  color: var(--papel);
  height: 38px;
}
.passo button {
  width: 38px;
  height: 38px;
  border: 0;
  background: none;
  color: inherit;
  font-size: 20px;
  line-height: 1;
}
.passo span {
  min-width: 18px;
  text-align: center;
  font: 700 15px var(--f-mono);
}

.vazio {
  text-align: center;
  padding: 60px 20px;
  color: var(--tinta-2);
}
.vazio h2 {
  margin-bottom: 8px;
}

.rodape {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 46px 16px 0;
  color: var(--tinta-3);
  font-size: 12.5px;
  text-align: center;
}
.rodape .mu {
  font-size: 19px;
  color: var(--tinta-2);
}

/* Barra do carrinho */
.barra {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px max(12px, env(safe-area-inset-bottom));
  z-index: 10;
  background: linear-gradient(to top, var(--papel) 65%, rgba(245, 240, 230, 0));
}
.barra__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 608px;
  margin: 0 auto;
  height: 56px;
  padding: 0 18px 0 10px;
  border: 0;
  border-radius: 16px;
  background: var(--acento);
  color: var(--acento-tinta);
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.5);
}
.barra__qtd {
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
  font: 700 15px var(--f-mono);
}
.barra__total {
  margin-left: auto;
  font-family: var(--f-mono);
  font-weight: 700;
}

/* Folhas */
.veu {
  position: fixed;
  inset: 0;
  background: rgba(31, 27, 22, 0.45);
  z-index: 20;
}
.folha {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  max-width: 640px;
  margin: 0 auto;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--papel);
  border-radius: 20px 20px 0 0;
  animation: sobe 0.22s ease-out;
}
@keyframes sobe {
  from {
    transform: translateY(40px);
    opacity: 0.4;
  }
}
.folha__pega {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--linha);
  margin: 8px auto 0;
}
.folha__cab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 6px;
}
.folha__cab h2 {
  font-size: 24px;
}
.fechar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--papel-2);
  font-size: 22px;
  line-height: 1;
}
.folha__corpo {
  overflow-y: auto;
  padding: 4px 16px 16px;
  display: grid;
  gap: 16px;
}
.folha__rodape {
  padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--linha);
  display: grid;
  gap: 10px;
}
.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 600;
}
.total strong {
  font: 700 21px var(--f-mono);
}
.btn--grande {
  min-height: 54px;
  border-radius: 16px;
  font-size: 16.5px;
}
.miudo {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--tinta-3);
}

.linhas {
  list-style: none;
  margin: 0;
  padding: 0;
}
.linha {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--linha);
}
.linha__nome {
  font-weight: 600;
}
.linha__preco {
  font: 700 14px var(--f-mono);
  color: var(--tinta-2);
}
.linha__nota {
  grid-column: 1 / -1;
}
.linha__nota button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--acento);
  font-weight: 600;
  font-size: 13.5px;
}
.linha__nota input {
  min-height: 36px;
  font-size: 14px;
}

.opcoes {
  display: grid;
  gap: 10px;
}
.opcao {
  text-align: left;
  display: grid;
  gap: 2px;
  padding: 16px;
  border-radius: var(--raio);
  border: 1.5px solid var(--linha);
  background: var(--cartao);
}
.opcao strong {
  font-family: var(--f-display);
  font-size: 19px;
}
.opcao span {
  color: var(--tinta-2);
  font-size: 14px;
}
.opcao:active {
  border-color: var(--tinta);
}
.estado-chamada {
  text-align: center;
  padding: 18px 8px 26px;
}
.estado-chamada h3 {
  font-size: 22px;
  margin: 12px 0 6px;
}
.estado-chamada p {
  margin: 0;
  color: var(--tinta-2);
}
.sino {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--acento);
  color: #fff;
}
.sino svg {
  width: 32px;
  height: 32px;
}
.sino.a-tocar svg {
  animation: abana 1.1s ease-in-out infinite;
  transform-origin: 50% 10%;
}
@keyframes abana {
  0%,
  60%,
  100% {
    transform: rotate(0);
  }
  10%,
  30% {
    transform: rotate(-14deg);
  }
  20%,
  40% {
    transform: rotate(14deg);
  }
}
.sino.ok {
  background: var(--ok);
}

@media (prefers-reduced-motion: reduce) {
  .folha,
  .sino.a-tocar svg,
  .prato__preco.mudou {
    animation: none;
  }
}
