/* La Bella Costela — site público
   Paleta tirada da logo (papel e tinta) e do post da marca (carvão e dourado do fogo). */

@font-face { font-family: 'Cinzel'; font-weight: 600; font-display: swap; src: url('../fonts/cinzel-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 700; font-display: swap; src: url('../fonts/cinzel-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('../fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('../fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('../fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-display: swap; src: url('../fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Kaushan Script'; font-weight: 400; font-display: swap; src: url('../fonts/kaushan-script-latin-400-normal.woff2') format('woff2'); }

:root {
  --paper: #e9dcc3;
  --paper-raised: #f4ebda;
  --paper-line: #cdb994;
  --ink: #23170d;
  --ink-soft: #5a4632;
  --char: #1c130c;
  --char-raised: #2a1d12;
  --ember: #e8a23a;
  --ember-light: #f3c567;
  --bronze: #7a4b21;
  --smoke: #d8cab2;
  --foil: #8f8e89;
  --ok: #2f6b3a;
  --danger: #a3311b;

  --f-display: 'Cinzel', 'Times New Roman', serif;
  --f-body: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --f-script: 'Kaushan Script', 'Brush Script MT', cursive;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 24px;
  --gutter: 16px;
  --max: 1120px;
  --topbar: 60px;
  --shadow-deep: 0 30px 60px -20px rgba(0, 0, 0, .55), 0 12px 24px -12px rgba(0, 0, 0, .4);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 8px); }
body {
  margin: 0;
  background: var(--char);
  color: var(--ink);
  font: 400 17px/1.55 var(--f-body);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }

/* Toque: controles e grupos de controles sem zoom por toque duplo (a pinça com
   dois dedos continua ampliando a página) e sem o retângulo cinza do navegador.
   O retorno do toque vem do estado :active (no iPhone, ativado em site.js). */
a, button, input, select, textarea, label, summary, [role='button'],
.qty, .dish-actions, .orderbar {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
a:not(.btn):active, button:not(.btn):not([disabled]):active { opacity: .7; }
[hidden] { display: none !important; }
html:not(.js) .needs-js,
html:not(.js) .promo-loading { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: var(--gutter); top: -60px; z-index: 100;
  background: var(--ember); color: var(--char); padding: 10px 16px; border-radius: var(--r-s);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 10px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 10px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 16px; letter-spacing: .01em; line-height: 1.1;
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-gold { background: var(--ember); color: var(--char); }
@media (hover: hover) { .btn-gold:hover { background: var(--ember-light); } }
.btn-ghost { border-color: rgba(244, 235, 218, .45); color: var(--paper-raised); }
@media (hover: hover) { .btn-ghost:hover { border-color: var(--paper-raised); background: rgba(244, 235, 218, .08); } }
.btn-order { background: var(--ink); color: var(--paper-raised); flex: 1; }
@media (hover: hover) { .btn-order:hover { background: #3a2716; } }
.btn-order .icon { color: var(--ember); }
.btn-add { border-color: var(--ink); color: var(--ink); background: transparent; padding: 0 16px; }
@media (hover: hover) { .btn-add:hover { background: rgba(35, 23, 13, .06); } }
.btn-add.is-added { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar);
  display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter);
  background: rgba(28, 19, 12, .86); color: var(--paper-raised);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(244, 235, 218, .08);
}
.topbar--solid { background: var(--char); }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.brand span { font: 700 15px/1 var(--f-display); letter-spacing: .04em; white-space: nowrap; }
@media (max-width: 359px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .brand { gap: 8px; }
  .brand span { font-size: 12.5px; letter-spacing: .02em; }
  .topbar-wa { padding: 0 12px; }
}
.topnav { display: none; gap: 4px; margin-left: auto; }
.topnav a { padding: 10px 12px; text-decoration: none; font-weight: 500; color: var(--smoke); border-radius: var(--r-s); }
@media (hover: hover) { .topnav a:hover { color: var(--paper-raised); } }
.topbar-wa {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border-radius: 10px; background: var(--ember); color: var(--char); font-weight: 700; text-decoration: none;
}
@media (min-width: 640px) {
  .topnav { display: flex; }
  .topbar-wa { margin-left: 8px; }
}

/* ---------- Hero ---------- */
/* No celular e no tablet o hero não tem foto: a costela aparece logo abaixo, no
   cardápio. O brilho de brasa vem do gradiente, subindo da base. */
.hero {
  position: relative; overflow: hidden; color: var(--paper-raised);
  background:
    radial-gradient(110% 55% at 78% 102%, rgba(232, 162, 58, .36), transparent 62%),
    radial-gradient(70% 40% at 12% 100%, rgba(194, 72, 27, .22), transparent 70%),
    radial-gradient(80% 50% at 0% 0%, rgba(142, 91, 43, .25), transparent 70%),
    var(--char);
}
.hero-text { position: relative; z-index: 2; padding: 28px var(--gutter) 60px; max-width: 560px; }
.hero-seal { width: 104px; height: 104px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(232, 162, 58, .25), 0 14px 30px rgba(0, 0, 0, .5); }
.hero-title {
  margin-top: 22px; font: 400 clamp(42px, 11vw, 76px)/1.02 var(--f-script); color: var(--paper-raised);
  text-wrap: balance;
}
.hero-title::after {
  content: ''; display: block; width: min(240px, 70%); height: 14px; margin-top: 10px;
  background: url('../img/underline.svg') no-repeat left / 100% 100%;
}
.hero-lede { margin-top: 16px; font-size: 19px; line-height: 1.45; color: var(--smoke); max-width: 32ch; }
.hero-facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.hero-facts li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.hero-facts .icon { color: var(--ember); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-actions .btn { flex: 1 1 150px; }

.hero-photo { display: none; position: relative; margin: 0; }
.hero-photo img { display: block; width: 100%; object-fit: cover; }

/* Tablet: hero sem foto, centralizado. */
@media (min-width: 600px) and (max-width: 959px) {
  .hero-text { margin: 0 auto; max-width: 640px; text-align: center; padding-top: 44px; padding-bottom: 72px; }
  .hero-seal { margin: 0 auto; }
  .hero-title::after, .hero-lede { margin-left: auto; margin-right: auto; }
  .hero-facts li { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-actions .btn { flex: 0 1 230px; }
}

/* Fumaça: o único movimento contínuo da página, eco da fumaça da logo. */
.smoke { position: absolute; inset: 0 0 auto 0; height: 60%; z-index: 1; pointer-events: none; }
.smoke span {
  position: absolute; bottom: 10%; width: 90px; height: 160px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(244, 235, 218, .16), transparent);
  filter: blur(8px); animation: smoke 9s ease-in infinite;
}
.smoke span:nth-child(1) { left: 22%; animation-delay: 0s; }
.smoke span:nth-child(2) { left: 46%; animation-delay: 3s; }
.smoke span:nth-child(3) { left: 68%; animation-delay: 6s; }
@keyframes smoke {
  0% { transform: translateY(40px) scale(.6); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(-150px) scale(1.4) translateX(20px); opacity: 0; }
}

@media (min-width: 960px) {
  .hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; min-height: 620px;
    background:
      radial-gradient(120% 70% at 70% 100%, rgba(232, 162, 58, .28), transparent 60%),
      radial-gradient(80% 50% at 0% 0%, rgba(142, 91, 43, .25), transparent 70%),
      var(--char);
  }
  /* O recuo da esquerda alinha o texto ao conteúdo central; a largura do texto
     é limitada nos filhos, não no bloco (senão o recuo espremia o texto em telas largas). */
  .hero-text { max-width: none; padding: 56px 32px 64px max(var(--gutter), calc((100vw - var(--max)) / 2)); }
  .hero-text > * { max-width: 540px; }
  .hero-photo { display: block; align-self: stretch; }
  .hero-photo img {
    aspect-ratio: auto; height: 100%; min-height: 620px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32%);
    mask-image: linear-gradient(to right, transparent 0, #000 32%);
  }
  .smoke { height: 70%; }
}

/* ---------- Cardápio ---------- */
.menu {
  background: var(--paper) url('../img/grain.svg');
  border-radius: var(--r-l) var(--r-l) 0 0; margin-top: -8px; position: relative; z-index: 3;
}
.menu-inner { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 48px; }
.section-head { max-width: 60ch; }
.section-title { font: 700 clamp(32px, 7vw, 44px)/1.1 var(--f-display); letter-spacing: .02em; }
.section-head p { margin-top: 10px; color: var(--ink-soft); }

.dish { display: grid; gap: 14px; }
.dish-name { font: 700 20px/1.2 var(--f-display); letter-spacing: .01em; }
.dish-price { display: flex; align-items: baseline; gap: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price { font-weight: 700; font-size: 21px; }
.price-unit { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.dish-desc { color: var(--ink-soft); }
.dish-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.dish-order { display: grid; gap: 10px; }
.dish-actions { display: flex; gap: 8px; }
.dish-actions .btn { padding: 0 14px; white-space: nowrap; }
.dish-estimate { color: var(--ink-soft); font-size: 15px; font-variant-numeric: tabular-nums; }

.qty {
  display: inline-flex; align-items: center; justify-self: start; border: 1.5px solid var(--paper-line);
  border-radius: 10px; background: var(--paper-raised);
}
.qty-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; cursor: pointer;
  color: var(--ink); border-radius: 9px;
}
@media (hover: hover) { .qty-btn:hover { background: rgba(35, 23, 13, .06); } }
.qty-btn[disabled] { opacity: .35; cursor: not-allowed; }
.qty-value { min-width: 96px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Prato em destaque */
.dish--featured {
  margin-top: 28px; background: var(--paper-raised); border-radius: var(--r-l); overflow: hidden;
  box-shadow: 0 1px 0 rgba(35, 23, 13, .08), 0 20px 40px -24px rgba(35, 23, 13, .45);
}
.dish--featured .dish-body { padding: 4px 20px 22px; display: grid; gap: 12px; }
.dish--featured .dish-actions .btn { flex: 1 1 auto; }
.dish--featured .dish-name { font-size: 30px; }
.dish--featured .price { font-size: 26px; }
.dish--featured .dish-desc { font-size: 18px; }
.dish--featured .dish-media--photo img { width: 100%; aspect-ratio: 545 / 305; object-fit: cover; }
.dish--featured .dish-media--ill { display: grid; place-items: center; padding: 24px 0 0; }
.dish--featured .dish-media--ill img { width: 160px; height: 160px; }

/* Lista impressa: linhas com fio pontilhado, como cardápio de balcão */
.menu-group { margin-top: 36px; }
.menu-group-title {
  font: 600 15px/1.2 var(--f-display); letter-spacing: .12em; color: var(--bronze);
  display: flex; align-items: center; gap: 12px;
}
.menu-group-title::after { content: ''; flex: 1; border-top: 1.5px solid var(--paper-line); }
.dish-list { list-style: none; margin: 8px 0 0; padding: 0; }
.dish-list > li { border-bottom: 1.5px dashed var(--paper-line); }
.dish-list > li:last-child { border-bottom: 0; }
.dish-list .dish { grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; row-gap: 12px; padding: 18px 0; }
.dish-list .dish-media { width: 64px; height: 64px; border-radius: 50%; background: var(--paper-raised); display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--paper-line); }
.dish-list .dish-media--ill img { width: 54px; height: 54px; }
.dish-list .dish-media--photo img { width: 100%; height: 100%; object-fit: cover; }
.dish-list .dish-body { display: contents; }
.dish-list .dish-head, .dish-list .dish-desc { grid-column: 2; }
.dish-list .dish-head { align-self: center; flex-wrap: wrap; row-gap: 2px; }
.dish-list .dish-desc { margin-top: -8px; }
.dish-list .dish-order { grid-column: 1 / -1; }

.menu-note { margin-top: 28px; font-size: 14px; color: var(--ink-soft); }
.menu-empty { margin-top: 24px; }

.dish-actions { flex-wrap: wrap; }

/* Nas linhas da lista, quantidade e botões dividem a mesma linha quando a LISTA
   tem largura para isso (container query): vale para celular, tablet e a coluna
   estreita do desktop. Sem espaço, os botões descem juntos para a linha de baixo. */
.dish-list { container-type: inline-size; }
@container (min-width: 520px) {
  .dish-list .dish-order { grid-template-columns: auto 1fr; align-items: center; }
  .dish-list .dish-estimate { grid-column: 1; grid-row: 2; }
  .dish-list .dish-actions { grid-column: 2; grid-row: 1; justify-content: flex-end; flex-wrap: nowrap; }
  .dish-list .btn-order { flex: 0 1 auto; }
}

/* Tablet: costela em destaque como card horizontal, foto ao lado do texto. */
@media (min-width: 640px) and (max-width: 959px) {
  .dish--featured { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; align-items: stretch; }
  .dish--featured .dish-media--photo img { height: 100%; min-height: 300px; aspect-ratio: auto; }
  .dish--featured .dish-body { padding: 24px; align-content: center; }
}

@media (min-width: 960px) {
  .menu-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 48px; padding-top: 64px; }
  .menu-inner > .section-head, .menu-inner > .menu-note { grid-column: 1 / -1; }
  .dish--featured { grid-column: 1; grid-row: 2 / span 3; align-self: start; position: sticky; top: calc(var(--topbar) + 16px); }
  .menu-group { grid-column: 2; margin-top: 28px; }
  .menu-inner > .menu-group:first-of-type { margin-top: 28px; }
}

/* ---------- Raspadinha ---------- */
.promo {
  padding: 48px var(--gutter) 64px;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(232, 162, 58, .18), transparent 70%),
    var(--char);
}
.promo-card {
  max-width: var(--max); margin: 0 auto; background: var(--paper) url('../img/grain.svg');
  border-radius: var(--r-l); box-shadow: var(--shadow-deep); padding: 24px 18px 26px;
  position: relative; display: grid; gap: 28px;
}
.promo-card::before {
  content: ''; position: absolute; inset: 8px; border: 1.5px solid rgba(142, 91, 43, .35);
  border-radius: calc(var(--r-l) - 6px); pointer-events: none;
}
.promo-title {
  display: inline-grid; justify-items: start; padding: 18px 30px 20px 24px; margin-left: -6px;
  background: url('../img/brush.svg') no-repeat center / 100% 100%; color: var(--paper-raised);
}
.promo-title-script { font: 400 clamp(40px, 11vw, 58px)/1 var(--f-script); transform: rotate(-3deg); }
.promo-title-sub { font: 700 clamp(18px, 4.6vw, 24px)/1 var(--f-display); letter-spacing: .14em; margin: 6px 0 0 18%; white-space: nowrap; }
.promo-lede { margin-top: 16px; font-size: 19px; font-weight: 500; max-width: 34ch; }
.promo-subtitle { margin-top: 22px; font: 700 16px/1.2 var(--f-display); letter-spacing: .06em; color: var(--bronze); }
.prize-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.prize { display: flex; align-items: center; gap: 12px; }
.prize img { width: 52px; height: 52px; flex: none; }
.prize strong { display: block; font-weight: 700; font-size: 18px; line-height: 1.2; }
.prize small { display: block; color: var(--ink-soft); font-size: 15px; }
.promo-rules { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 16px; color: var(--ink-soft); }
.promo-rules li { padding-left: 22px; position: relative; }
.promo-rules li::before {
  content: ''; position: absolute; left: 4px; top: .55em; width: 8px; height: 8px; border-radius: 2px;
  background: var(--ember); transform: rotate(45deg);
}
.promo-links { margin-top: 14px; font-size: 15px; }
.promo-links a { color: var(--ink); font-weight: 600; }

.promo-play { position: relative; min-height: 200px; }
.promo-loading, .promo-closed {
  min-height: 200px; display: grid; place-items: center; text-align: center; padding: 24px;
  border: 1.5px dashed var(--paper-line); border-radius: var(--r-m); color: var(--ink-soft); font-weight: 500;
}
.promo-closed p { max-width: 36ch; font-size: 18px; color: var(--ink); }

@media (min-width: 760px) {
  .promo-card { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; padding: 32px 28px 36px; align-items: start; }
  .promo-title-script { font-size: 44px; }
}
@media (min-width: 1024px) {
  .promo { padding: 80px var(--gutter) 96px; }
  .promo-card { gap: 48px; padding: 44px 44px 48px; }
  .promo-title-script { font-size: 58px; }
}

/* Formulário */
.promo-form { display: grid; gap: 16px; background: var(--paper-raised); border-radius: var(--r-m); padding: 22px 18px; box-shadow: inset 0 0 0 1.5px var(--paper-line); }
.promo-step-title { font: 700 22px/1.2 var(--f-display); }
.promo-step-hint { color: var(--ink-soft); font-size: 15px; margin-top: -8px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field input[type='text'], .field input[type='email'] {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid #8a7350;
  background: #fffaf0; font-size: 17px; color: var(--ink);
}
.field input::placeholder { color: #9a8a70; }
.field input:focus-visible { outline: 3px solid var(--ember); outline-offset: 1px; border-color: var(--ink); }
.field input[aria-invalid='true'] { border-color: var(--danger); background: #fff3ef; }
.field-error { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 0; }
.field-error:empty { display: none; }
.field-check { grid-template-columns: 24px 1fr; align-items: start; column-gap: 10px; }
.field-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.field-check label { font-weight: 500; font-size: 15px; }
.field-check .field-error { grid-column: 2; }
.form-alert { padding: 12px 14px; border-radius: 10px; background: #fbe4dc; color: #7a2412; font-weight: 600; font-size: 15px; }

/* Aviso de semana (bloqueio, nova raspadinha, prêmio anterior) */
.week-notice {
  padding: 12px 14px; border-radius: 10px; background: #f9ecc9; color: #4f3a0c;
  box-shadow: inset 0 0 0 1.5px #e3c47d; font-size: 16px;
}
.week-notice strong { font-weight: 700; }
.week-notice--soft { background: var(--paper-raised); color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--paper-line); font-size: 15px; }
.new-week { display: grid; gap: 14px; background: var(--paper-raised); border-radius: var(--r-m); padding: 22px 18px; box-shadow: inset 0 0 0 1.5px var(--paper-line); }
.new-week .link-btn { justify-self: start; }

/* Cartela */
.scratch-wrap { display: grid; gap: 16px; }
.scratch-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.scratch-head h3 { font: 700 21px/1.2 var(--f-display); }
.scratch-progress { font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.scratch-hint { color: var(--ink-soft); font-size: 15px; margin-top: -8px; }

.scratch-grid {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  padding: 10px; border-radius: var(--r-m); background: #d7c6a4;
  box-shadow: inset 0 2px 6px rgba(35, 23, 13, .25);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  /* A cartela inteira cabe na altura visível, inclusive com o celular deitado:
     a altura é 0,8 × a largura + 8px; descontamos a barra do topo (60px) e uma folga. */
  width: 100%; justify-self: center;
  max-width: max(260px, calc((100vh - 84px) * 1.25 - 10px));
  max-width: max(260px, calc((100svh - 84px) * 1.25 - 10px));
}
/* Concluída, não há mais o que raspar: a página volta a rolar por cima da cartela. */
.scratch-grid.is-complete { touch-action: manipulation; }
.scratch-cell {
  position: relative; aspect-ratio: 5 / 4; border-radius: 10px; overflow: hidden;
  background: var(--paper-raised); box-shadow: 0 1px 0 rgba(255, 255, 255, .5), 0 2px 4px rgba(35, 23, 13, .2);
  transition: box-shadow .3s, transform .3s;
}
.scratch-cell:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.cell-prize {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 2px; padding: 4px;
  text-align: center;
}
.cell-prize img { width: 58%; max-width: 72px; aspect-ratio: 1; object-fit: contain; }
.cell-prize span { font-weight: 700; font-size: clamp(12px, 3.2vw, 15px); line-height: 1.1; }
.cell-prize--pending::after {
  content: ''; width: 40%; height: 10px; border-radius: 5px; background: var(--paper-line); opacity: .6;
  animation: pulse 1s ease-in-out infinite alternate;
}
@keyframes pulse { to { opacity: .2; } }
.cell-foil { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .45s ease; cursor: grab; }
.scratch-cell.is-revealed .cell-foil { opacity: 0; pointer-events: none; }
.scratch-cell.is-match { box-shadow: 0 0 0 3px var(--ember), 0 0 22px rgba(232, 162, 58, .7); transform: scale(1.03); z-index: 1; }
.scratch-cell.is-match .cell-prize { background: radial-gradient(circle, #fff6dc, var(--paper-raised) 70%); }
.scratch-particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

.scratch-meta { display: grid; gap: 10px; }
.validity {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px;
  background: var(--paper-raised); box-shadow: inset 0 0 0 1.5px var(--paper-line); font-size: 15px;
}
.validity .icon { color: var(--bronze); }
.validity strong { font-weight: 700; }
.scratch-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.link-btn { background: none; border: 0; padding: 8px 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); min-height: 44px; }
.link-btn--quiet { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.match-note { font-weight: 700; color: var(--bronze); }

/* Resultado */
.result {
  background: var(--char); color: var(--paper-raised); border-radius: var(--r-m); padding: 24px 20px;
  display: grid; gap: 14px; position: relative; overflow: hidden;
  background-image: radial-gradient(80% 60% at 50% 0%, rgba(232, 162, 58, .3), transparent 70%);
}
.result-greet { font: 400 34px/1.05 var(--f-script); color: var(--ember-light); }
.result-title { font: 700 clamp(24px, 6vw, 30px)/1.15 var(--f-display); }
.result-desc { color: var(--smoke); }
.coupon {
  display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; border: 2px dashed rgba(243, 197, 103, .7);
  background: rgba(244, 235, 218, .06);
}
.coupon-label { font-size: 14px; color: var(--smoke); }
.coupon-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.coupon-code { font: 700 clamp(18px, 6vw, 26px)/1.1 var(--f-body); letter-spacing: .1em; white-space: nowrap; font-variant-numeric: tabular-nums; color: #fff; }
@media (max-width: 359px) {
  .promo { padding-left: 10px; padding-right: 10px; }
  .promo-card { padding-left: 14px; padding-right: 14px; }
  .result { padding-left: 16px; padding-right: 16px; }
  .coupon { padding-left: 12px; padding-right: 12px; }
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 8px;
  border: 1.5px solid rgba(244, 235, 218, .4); background: transparent; color: var(--paper-raised); cursor: pointer; font-weight: 600;
}
@media (hover: hover) { .copy-btn:hover { border-color: var(--paper-raised); } }
.status-pill { justify-self: start; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.status-pill--valid { background: #dcefd9; color: #1f4d27; }
.status-pill--expired { background: #f5d6cc; color: #7a2412; }
.status-pill--redeemed { background: #e6dccb; color: #4a3826; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; color: var(--smoke); }
.steps li::marker { color: var(--ember); font-weight: 700; }
.result-note { font-size: 14px; color: var(--smoke); }
.result .btn-gold { margin-top: 4px; }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Entrada da cartela: o momento orquestrado da página */
.scratch-grid.is-entering .scratch-cell { animation: cell-in .5s cubic-bezier(.2, .8, .3, 1.2) both; }
.scratch-grid.is-entering .scratch-cell:nth-child(2) { animation-delay: .05s; }
.scratch-grid.is-entering .scratch-cell:nth-child(3) { animation-delay: .1s; }
.scratch-grid.is-entering .scratch-cell:nth-child(4) { animation-delay: .15s; }
.scratch-grid.is-entering .scratch-cell:nth-child(5) { animation-delay: .2s; }
.scratch-grid.is-entering .scratch-cell:nth-child(6) { animation-delay: .25s; }
.scratch-grid.is-entering .scratch-cell:nth-child(7) { animation-delay: .3s; }
.scratch-grid.is-entering .scratch-cell:nth-child(8) { animation-delay: .35s; }
.scratch-grid.is-entering .scratch-cell:nth-child(9) { animation-delay: .4s; }
@keyframes cell-in { from { opacity: 0; transform: translateY(14px) scale(.9); } }
.result.is-entering { animation: result-in .6s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes result-in { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--char); color: var(--smoke); padding: 40px var(--gutter) calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(244, 235, 218, .08); }
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 56px; height: 56px; border-radius: 50%; }
.footer-name { font: 700 18px/1.2 var(--f-display); color: var(--paper-raised); letter-spacing: .04em; }
.footer-info { display: grid; gap: 10px; }
.footer-info p { display: flex; align-items: center; gap: 10px; }
.footer-info .icon { color: var(--ember); }
.footer-info a, .footer-links a { color: var(--paper-raised); text-underline-offset: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a, .footer-info a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-copy { max-width: var(--max); margin: 28px auto 0; font-size: 14px; opacity: .8; }
@media (min-width: 800px) {
  .footer-inner { grid-template-columns: 1.1fr 1fr auto; align-items: start; }
  .footer-links { flex-direction: column; }
}

/* ---------- Lista do pedido ---------- */
.orderbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 0 8px calc(8px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.orderbar-inner {
  max-width: 560px; margin: 0 auto; pointer-events: auto; background: var(--char-raised); color: var(--paper-raised);
  border-radius: 18px; padding: 12px 12px 12px 16px; box-shadow: 0 -10px 30px rgba(0, 0, 0, .35); display: grid; gap: 10px;
  border: 1px solid rgba(244, 235, 218, .1);
}
.orderbar.is-bump .orderbar-inner { animation: bump .35s ease; }
@keyframes bump { 40% { transform: translateY(-6px); } }
.orderbar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.orderbar-title { display: flex; align-items: center; gap: 8px; font: 700 16px/1.2 var(--f-body); }
.orderbar-title .icon { color: var(--ember); }
.orderbar-count { color: var(--smoke); font-weight: 500; }
.orderbar-toggle, .orderbar-clear {
  background: none; border: 0; color: var(--paper-raised); text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer; min-height: 44px; padding: 0 6px; font-weight: 600;
}
.orderbar-clear { color: var(--smoke); font-weight: 500; justify-self: start; }
.orderbar-body { display: grid; gap: 8px; }
.orderbar-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 38vh; overflow: auto; }
.orderbar-items li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(244, 235, 218, .1); }
.orderbar-items button { background: none; border: 1px solid rgba(244, 235, 218, .3); color: var(--paper-raised); border-radius: 8px; min-width: 44px; min-height: 44px; cursor: pointer; }
.orderbar-prize { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--smoke); }
.orderbar-prize input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ember); }
body.has-orderbar .site-footer { padding-bottom: 140px; }

/* ---------- Páginas legais ---------- */
.page-legal { background: var(--paper) url('../img/grain.svg'); }
.legal-inner { max-width: 720px; margin: 0 auto; padding: 40px var(--gutter) 64px; }
.legal-intro { margin-top: 12px; font-size: 19px; color: var(--ink-soft); }
.legal section { margin-top: 28px; }
.legal h2 { font: 700 20px/1.25 var(--f-display); margin-bottom: 8px; }
.legal p + p, .legal ul, .legal ol { margin-top: 10px; }
.legal ul, .legal ol { padding-left: 22px; display: grid; gap: 6px; }
.legal-back { margin-top: 36px; }
.legal a { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .smoke { display: none; }
}
