html:has(#p-pedido[open]) { overflow: hidden; }
.p-pedido {
  position: fixed; inset: 0; margin: auto; padding: 6px; border: 0; width: min(36rem,calc(100vw - 16px)); max-width: none;
  max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; background: transparent;
  font: 400 1rem/1.48 var(--texto,Arial,sans-serif);
}
.p-pedido::backdrop { background: #09090bc9; }
.p-pedido [hidden] { display: none !important; }
.p-painel {
  min-width: 0; min-height: 360px; padding: clamp(29px,4vw,42px) clamp(24px,6vw,62px) clamp(45px,6vw,67px);
  text-align: center;
}
.p-cabecalho { display: grid; justify-items: center; gap: 6px; }
.p-cabecalho .comanda-marca { width: clamp(109px,21vw,143px); }
.p-titulo, .p-vazio h3, .p-nome { font-family: var(--titulo,Georgia,serif); font-weight: 400; text-transform: none; letter-spacing: -.035em; }
.p-titulo { margin: 0; font-size: clamp(36px,5vw,53px); line-height: 1.07; }
.p-titulo:focus { outline: 0; }
.p-pedido button { cursor: pointer; }
.p-pedido button:focus-visible, .p-manual:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.p-pedido button:disabled { cursor: default; opacity: .5; }
.p-fechar, .p-quantidade button, .p-link, .p-remover {
  display: inline-grid; place-items: center; min-height: 44px; border: 0; padding: 0 6px; background: transparent; color: var(--tinta-carimbo);
  font: 400 1rem/1.3 var(--controle,var(--texto)); text-align: center;
}
.p-pedido .p-fechar {
  position: absolute; top: clamp(9px,2vw,16px); left: clamp(11px,3vw,24px); width: 44px; height: 44px; padding: 0;
  color: var(--tinta-carimbo); font: 400 1.7rem/1 var(--texto);
}
.p-nota, .p-explica, .p-vazio p { max-width: 38ch; margin: 9px auto 0; color: var(--tinta-suave); font-size: .92rem; line-height: 1.5; }
.p-vazio { padding-top: clamp(23px,4.5vw,32px); }
.p-vazio h3 { font-size: 1.65rem; line-height: 1.15; margin: 0; }
.p-vazio p { margin-bottom: 18px; }
.p-itens, .p-linhas { list-style: none; padding: 0; margin: 0; }
.p-itens:not(:empty), .p-resumo { margin-top: clamp(22px,4vw,34px); }
.p-item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 2px 10px; text-align: left; }
.p-item + .p-item { margin-top: 12px; }
.p-item-info { display: grid; gap: 2px; }
.p-nome { font-size: clamp(20px,2.2vw,26px); line-height: 1.16; overflow-wrap: anywhere; }
.p-unitario { color: var(--tinta-suave); font-size: .81rem; }
.p-subtotal, .p-total strong, .p-linhas strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-subtotal { font-size: .95rem; }
.p-quantidade { display: inline-flex; align-items: center; justify-self: start; }
.p-quantidade button { width: 44px; padding: 0; font: 500 1.35rem/1 var(--texto); }
.p-qtd { min-width: 1.8ch; text-align: center; font-variant-numeric: tabular-nums; }
.p-link, .p-remover { text-decoration: underline; text-underline-offset: .22em; }
.p-pedido .p-remover { justify-self: end; font-size: .9rem; }
.p-total { display: grid; justify-content: center; gap: 2px; margin: 15px 0 12px; }
.p-total span { color: var(--tinta-carimbo); font: 400 .99rem/1.35 var(--controle,var(--texto)); }
.p-total strong { font: 650 clamp(23px,3vw,31px)/1.2 var(--texto); font-variant-numeric: tabular-nums; }
.p-linhas li { display: flex; justify-content: space-between; align-items: baseline; text-align: left; gap: 11px; margin: 10px 0; font-size: .94rem; line-height: 1.4; }
.p-linhas span { overflow-wrap: anywhere; }
.p-acoes { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; margin-top: 13px; }
.p-retorno { margin: 7px auto 0; font-size: .88rem; color: var(--tinta-suave); }
.p-manual { box-sizing: border-box; display: block; width: 100%; padding: 9px; margin: 8px 0; font: inherit; color: inherit; background: #fff7; border: 1px solid var(--tinta-suave); }
.p-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); }
@media(max-width:440px) {
  .p-pedido { max-height: calc(100dvh - 14px); }
  .p-item { grid-template-columns: auto auto; justify-content: center; gap: 2px 12px; text-align: center; }
  .p-item-info, .p-subtotal { grid-column: 1/-1; }
}
