/* ==========================================================================
   Qual Atacarejo — visual de atacarejo: faixa escura de placa de corredor,
   etiquetas de preço penduradas num trilho de prateleira, preço no estilo do
   encarte (centavos no alto), encartes como tickets e a lista como cupom.
   ========================================================================== */

/* ==========================================================================
   Tokens — tema claro (padrão) e escuro (sistema ou botão)
   ========================================================================== */
:root {
  color-scheme: light;
  --paper: #e9e9e9;
  --surface: #ffffff;
  --surface-2: #dfdfdf;
  --ink: #111111;
  --ink-2: #4a4a4a;
  --muted: #636363;
  --line: #cfcfcf;
  --edge: #b8b8b8;            /* borda de controles (filtros) */

  /* Trilho metálico da prateleira */
  --rail-hi: #f2f4f4;
  --rail: #c3c9cb;
  --rail-lo: #98a0a4;
  
  /* Identidade da Marca */
  --tag: #fe7c00;             /* Laranja Oferta (especificação tipográfica da marca, 14/11/2026): destaque, etiqueta de oferta */
  --tag-ink: #111111;         /* tinta sobre o laranja: contraste 8:1 (branco daria 2,9:1) */
  --band: #075930;            /* Verde Institucional: faixa do cabeçalho e rodapé */
  --band-ink: #ffffff;        /* Branco sobre o verde: contraste 8,6:1 */
  --band-line: rgba(255, 255, 255, 0.28); /* divisórias e aros dentro da faixa verde */
  --band-edge: rgba(0, 0, 0, 0.14);       /* sombra sutil sob o cabeçalho */

  /* Semântica de preço e status */
  --good: #046c38;
  --good-bg: #d3f0dc;
  --high: #c81244;
  --high-bg: #ffe0e1;
  --warn: #dd7802;
  --part: #94400c;            /* atualização parcial: algumas redes falharam */
  --part-bg: #fff4c6;
  --good-on-tag: #0b3d22;     /* verde e framboesa escuros, legíveis sobre o laranja #FE7C00 (≥ 4,3:1) */
  --high-on-tag: #7a0a28;
  --shadow: rgba(17, 17, 17, 0.45);

  /* Cor fixa de cada rede (mantida para acessibilidade e daltonismo) */
  --store-1: #2988e0;
  --store-2: #e36f27;
  --store-3: #0fbb98;
  --store-4: #f9a107;
  --store-5: #d91a96;
  --store-6: #008300;
  --store-7: #8d43e0;

  /* Duas fontes (especificação tipográfica da marca, 15/11/2026): a Outfit 800 com
     -0,06em, a do logo, nos títulos, preços e botões; a Instrument Sans no resto.
     Abaixo de ~1,2rem o espaçamento afrouxa para -0,045em (seção 5 da especificação),
     para as letras não se tocarem */
  --f-display: "Outfit", "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --track: -0.06em;
  --track-sm: -0.045em;
  --word: .1em;               /* o -0,06em encolhe também o espaço: devolve o vão entre as palavras */
  --gutter: clamp(16px, 3vw, 24px);
  /* Margens laterais que desviam do notch do iPhone deitado (viewport-fit=cover) */
  --pad-l: max(var(--gutter), env(safe-area-inset-left, 0px));
  --pad-r: max(var(--gutter), env(safe-area-inset-right, 0px));

  /* Movimento: curvas fortes (as do CSS são fracas demais) e duração do toque */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* gaveta no estilo do iOS */
  --press: 160ms;
  --is-dark: 0; /* 1 no tema escuro: troca o ícone do botão de tema */
  /* Seta de 2 px (chevron para a direita) usada como máscara: abrir/fechar e seletores */
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5.5l6.5 6.5L9 18.5'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --is-dark: 1;
    --paper: #111312;         /* leve subtom esverdeado imperceptível para harmonizar */
    --surface: #1a1d1b;
    --surface-2: #242826;
    --ink: #efefef;
    --ink-2: #bbbbbb;
    --muted: #939393;
    --line: #303532;
    --edge: #464d49;
    --rail-hi: #5c676c;
    --rail: #3f494e;
    --rail-lo: #2a3236;
    --band: #053a20;          /* o verde institucional, mais fundo, para a noite (contraste 6,6:1 com o laranja) */
    --band-ink: #f3f5f4;
    --band-line: #1b5a38;
    --band-edge: #1b5a38;
    --good: #25c26e;
    --good-bg: #052b15;
    --high: #f94e6b;
    --high-bg: #3e1017;
    --part: #ffb347;
    --part-bg: #2e1a00;
    --shadow: rgba(0, 0, 0, 0.85);
    --tag: #ff8c1a;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --is-dark: 1;
  --paper: #111312;
  --surface: #1a1d1b;
  --surface-2: #242826;
  --ink: #efefef;
  --ink-2: #bbbbbb;
  --muted: #939393;
  --line: #303532;
  --edge: #464d49;
  --rail-hi: #5c676c;
  --rail: #3f494e;
  --rail-lo: #2a3236;
  --band: #053a20;
  --band-ink: #f3f5f4;
  --band-line: #1b5a38;
  --band-edge: #1b5a38;
  --good: #25c26e;
  --good-bg: #052b15;
  --high: #f94e6b;
  --high-bg: #3e1017;
  --part: #ffb347;
  --part-bg: #2e1a00;
  --shadow: rgba(0, 0, 0, 0.85);
  --tag: #ff8c1a;
}

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

/* Sem o clarão cinza/azul do celular ao tocar: cada controle tem o seu :active */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh; /* 100vh no celular é a tela com a barra do navegador recolhida */
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* :hover só com mouse: no toque ele gruda no que foi tocado */
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-thickness: 2px; } }
button, input, select { font: inherit; }

/* Toque: clique na hora (sem esperar o toque duplo) e, ao segurar um controle,
   nada de selecionar o texto dele. Texto de conteúdo continua selecionável. */
a, button, summary, label, select { touch-action: manipulation; }
button, summary, .btn, .chip, .main-nav a, .sheet-list label {
  -webkit-user-select: none; user-select: none;
}
/* Links de texto: escurecem enquanto o dedo está em cima */
a:not([class]):active, .link-button:active, .deal-name:active, .back:active, summary:active { opacity: .6; }

h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }

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

.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;
}

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 20;
  background: var(--tag); color: var(--tag-ink); padding: 8px 12px; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { left: 16px; }

/* ==========================================================================
   Cabeçalho e rodapé
   ========================================================================== */
.site-header {
  background: var(--band); color: var(--band-ink);
  position: sticky; top: 0; z-index: 5;
  padding-top: env(safe-area-inset-top, 0px); /* site instalado na tela inicial: fica abaixo do relógio */
  box-shadow: 0 1px 0 var(--band-edge); /* no escuro, a faixa e a página quase se confundem */
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 var(--pad-r) 0 var(--pad-l);
  display: flex; align-items: center; gap: 8px 24px; min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--band-ink); text-decoration: none; }
.brand:focus-visible { outline-color: var(--tag); outline-offset: 4px; }
/* Logo: "Qual Atacarejo" com a lupa e o carrinho, Outfit 800 -0,06em, "Qual" laranja #FE7C00 e "Atacarejo" branco sobre a faixa (img/logo-qual-atacarejo.svg, SVG animado
   em CSS que se monta uma vez ao carregar). No computador, a versão em linha com 40 px de
   altura; no celular, a empilhada com 44 px. O replay no hover troca o src (app.js). */
.brand-mark {
  display: block; flex: none; height: 40px; margin-left: -2px;
  transition: transform var(--press) var(--ease-out);
}
.brand:active .brand-mark { transform: scale(.96); }
.brand-mark img { display: block; height: 100%; width: auto; }
.brand-mark .brand-empilhado { display: none; }

/* min-width: 0 deixa o menu encolher e rolar, em vez de alargar a página no celular */
.main-nav { display: flex; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  display: inline-block; white-space: nowrap; text-decoration: none;
  padding: 22px 12px 18px; border-bottom: 4px solid transparent;
  font: 800 1.05rem/1 var(--f-display); text-transform: uppercase; letter-spacing: var(--track-sm); word-spacing: var(--word);
  color: var(--band-ink); opacity: .7;
  transition: opacity 150ms ease, border-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .main-nav a:hover { opacity: 1; } }
.main-nav a:active { opacity: 1; }
.main-nav a[aria-current="page"] { opacity: 1; border-bottom-color: var(--tag); }
.main-nav a:focus-visible { outline-color: var(--tag); outline-offset: -3px; }
.main-nav a[hidden] { display: none; } /* "Admin": só para as contas do ADMIN_EMAILS */
.nav-icon {
  display: none; width: 23px; height: 23px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
/* Ícones animados das abas (GUIA_DE_ESTILO_ANIMATIONS_ICONS.md do qualatacarejodesign).
   Aba parada: só o contorno. Aba atual: contorno e preenchimento no Amarelo Qual, com os
   detalhes de dentro recortados na cor da faixa. O preenchimento brota do centro (as
   barras do Comparar crescem de baixo). */
.nav-icon .ni-fill { fill: var(--tag); stroke: none; transform: scale(0); transform-box: fill-box; transform-origin: center; }
.ni-comparar .ni-fill { transform: scaleY(0); transform-origin: bottom; }
.nav-icon .ni-hole { fill: var(--band); }
.main-nav a[aria-current="page"] .nav-icon { color: var(--tag); }
.main-nav a[aria-current="page"] .ni-fill { transform: none; }
.main-nav a[aria-current="page"] :is(.ni-risco, .ni-hole) { stroke: var(--band); }
@media (prefers-reduced-motion: no-preference) {
  /* Ligar: gesto de 300–350 ms com ease out. Desligar: o mesmo caminho de volta, mais curto */
  .nav-icon { transition: color 220ms cubic-bezier(0, 0, .58, 1); }
  .nav-icon .ni-fill { transition: transform 220ms cubic-bezier(0, 0, .58, 1); }
  .nav-icon :is(.ni-risco, .ni-hole) { transition: stroke 220ms cubic-bezier(0, 0, .58, 1); }
  .main-nav a[aria-current="page"] .nav-icon { transition-duration: 300ms; }
  .main-nav a[aria-current="page"] .ni-fill { transition-duration: 350ms; }
  .main-nav a[aria-current="page"] .ni-bar:nth-child(2) .ni-fill { transition-delay: 70ms; }
  .main-nav a[aria-current="page"] .ni-bar:nth-child(3) .ni-fill { transition-delay: 140ms; }
  /* Ao abrir o site o ícone já aparece pronto: as transições só valem depois da 1ª tela */
  .main-nav:not(.is-ready) .nav-icon, .main-nav:not(.is-ready) .nav-icon * { transition: none; }

  /* O detalhe de cada ícone toca só quando a aba acabou de ser escolhida (is-entering, app.js) */
  .is-entering .ni-swing {             /* Encartes: a etiqueta balança presa pelo furo */
    transform-box: view-box; transform-origin: 8.6px 12px;
    animation: ni-balanco 650ms cubic-bezier(.37, 0, .63, 1);
  }
  .is-entering .ni-bar {               /* Comparar: as barras crescem, uma depois da outra */
    transform-box: fill-box; transform-origin: bottom;
    animation: ni-cresce 480ms both;
  }
  .is-entering .ni-bar:nth-child(2) { animation-delay: 70ms; }
  .is-entering .ni-bar:nth-child(3) { animation-delay: 140ms; }
  .is-entering .ni-risco {             /* Minha lista: os itens se escrevem no cupom */
    stroke-dasharray: 1; animation: ni-risca 260ms cubic-bezier(0, 0, .58, 1) 150ms both;
  }
  .is-entering .ni-risco:nth-child(4) { animation-delay: 230ms; }
  .is-entering .ni-risco:nth-child(5) { animation-delay: 310ms; }
  .is-entering .ni-giro {              /* Admin: a seta dá uma volta no sentido dela */
    transform-box: view-box; transform-origin: 12px 12px;
    animation: ni-gira 650ms cubic-bezier(.22, 1, .36, 1);
  }
}
@keyframes ni-balanco {
  0% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 55% { transform: rotate(8deg); }
  80% { transform: rotate(-3deg); } 100% { transform: rotate(0); }
}
/* Encolhe um pouco e cresce passando do ponto (sem pular da altura cheia para a metade) */
@keyframes ni-cresce {
  0% { transform: scaleY(1); animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  30% { transform: scaleY(.55); animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
  100% { transform: scaleY(1); }
}
@keyframes ni-risca { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ni-gira { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* Tema: lua no claro (o toque leva ao escuro) e sol no escuro. É um desenho só, que se
   transforma (guia de ícones: reaproveitar o mesmo traço). Gesto: a sombra sai da lua e
   ela encolhe até virar o miolo do sol. Detalhe: os raios saem de trás, um depois do
   outro, girando um pouco. Tudo segue --is-dark (0 no claro, 1 no escuro). */
.theme-toggle {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--band-line); background: transparent; color: var(--band-ink); cursor: pointer;
  transition: background-color 150ms ease, transform var(--press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .theme-toggle:hover { background: var(--band-line); } }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle:focus-visible { outline-color: var(--tag); outline-offset: 2px; border-radius: 50%; }
.theme-toggle .tema { width: 20px; height: 20px; overflow: visible; }
/* A lua fica na cor do texto da faixa; o sol, no Amarelo Qual (13,4:1 sobre a faixa) */
.tema-astro {
  fill: color-mix(in srgb, var(--tag) calc(var(--is-dark) * 100%), var(--band-ink));
  transform-box: view-box; transform-origin: 12px 12px;
  transform: scale(calc(1 - var(--is-dark) * .5));            /* r 9 (lua) → 4,5 (sol) */
}
.tema-sombra { transform: translate(calc(var(--is-dark) * 11px), calc(var(--is-dark) * -11px)); }
.tema-raios {
  fill: none; stroke: var(--tag); stroke-width: 2; stroke-linecap: round;
  transform-box: view-box; transform-origin: 12px 12px;
  transform: rotate(calc((1 - var(--is-dark)) * -45deg));
}
.tema-raios path { transform-box: view-box; transform-origin: 12px 12px; transform: scale(var(--is-dark)); }
@media (prefers-reduced-motion: no-preference) {
  .tema-astro { transition: transform 420ms cubic-bezier(.22, 1, .36, 1), fill 300ms cubic-bezier(0, 0, .58, 1); }
  .tema-sombra { transition: transform 420ms cubic-bezier(.22, 1, .36, 1); }
  .tema-raios { transition: transform 520ms cubic-bezier(.22, 1, .36, 1); }
  /* Raios: saem com atraso escalonado (120 ms + 25 ms cada) e um leve overshoot;
     na volta recolhem juntos e mais rápido, para a lua aparecer logo */
  .tema-raios path {
    transition: transform calc(180ms + var(--is-dark) * 120ms) cubic-bezier(.34, 1.56, .64, 1);
    transition-delay: calc(var(--is-dark) * (120ms + var(--i) * 25ms));
  }
}

/* Conta: "Entrar" (no celular, só o ícone) ou a foto de quem entrou */
.account-slot { flex: none; display: flex; margin-right: -12px; }
.account-slot:empty { display: none; }
.account-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px 0 11px; cursor: pointer;
  border-radius: 19px; border: 1px solid var(--band-line); background: transparent; color: var(--band-ink);
  font: 600 .9rem/1 var(--f-body); white-space: nowrap;
  transition: background-color 150ms ease, transform var(--press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .account-btn:hover { background: var(--band-line); } }
.account-btn:active { transform: scale(.96); }
.account-btn:focus-visible { outline-color: var(--tag); outline-offset: 2px; border-radius: 19px; }
.account-btn svg { width: 19px; height: 19px; flex: none; }
/* O aro amarelo é o sinal de "entrou" */
/* A foto fica redonda por ela mesma (e não cortando o botão), para o selo de novidades
   poder sair do círculo */
.avatar { justify-content: center; width: 38px; padding: 0; border: 2px solid var(--tag); }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-initial { font: 800 1.15rem/1 var(--f-display); letter-spacing: var(--track-sm); word-spacing: var(--word); text-transform: uppercase; }
.avatar--wait { border-color: var(--band-line); cursor: default; }
@media (hover: hover) and (pointer: fine) { .avatar--wait:hover { background: transparent; } }
.avatar--wait:active { transform: none; }

/* Celular: o cabeçalho fica numa linha só, sempre visível no topo (marca, conta e
   tema), e o menu vira abas fixas embaixo, no alcance do polegar. A barra continua
   dentro do <header> no HTML: só o CSS a leva para baixo. */
@media (max-width: 720px) {
  :root { --tabbar-h: 62px; }
  .header-inner { min-height: 60px; }
  .brand { flex: 1; }
  .account-slot { margin-right: -14px; }
  .account-btn { justify-content: center; width: 38px; padding: 0; }
  .account-label { display: none; }

  .main-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    overflow: visible; margin: 0;
    padding: 0 var(--pad-r) env(safe-area-inset-bottom, 0px) var(--pad-l); /* acima da barrinha do iPhone */
    background: var(--band); box-shadow: 0 -1px 0 var(--band-line);
  }
  .main-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    min-height: var(--tabbar-h); padding: 6px 2px 7px;
    border-bottom: 0; border-top: 3px solid transparent;
    font-size: .92rem; letter-spacing: var(--track-sm); word-spacing: var(--word);
    transition: opacity 150ms ease, border-color 150ms ease, background-color 150ms ease;
  }
  /* A aba atual: o mesmo amarelo que marca o menu no computador, agora em cima */
  .main-nav a[aria-current="page"] { border-top-color: var(--tag); }
  /* Resposta na hora do toque (o fundo acende enquanto o dedo está em cima) */
  .main-nav a:active { background: var(--band-line); transition-duration: 0s; }
  .nav-icon { display: block; }
  .nav-long { display: none; }
  /* O fim da página (rodapé) não fica escondido atrás das abas. Rodapé numa linha
     só: o aviso à esquerda e os dois ícones à direita, centralizados na altura */
  .site-footer .footer-inner {
    flex-wrap: nowrap; align-items: center; gap: 14px;
    padding-top: 16px; padding-bottom: calc(16px + var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  } /* 2 classes: a regra do rodapé vem depois no arquivo */
  .site-footer p { font-size: .8rem; line-height: 1.4; }
  .site-footer .footer-side { gap: 12px; }
  /* Teclado aberto: as abas saem de cena para não cobrir o campo que está sendo digitado */
  html:has(:is(input:not([type="checkbox"], [type="radio"]), textarea, select):focus) .main-nav { display: none; }
}
/* 320px: a marca encolhe para a conta e o tema caberem na mesma linha, e
   "Comparar preços" vira "Comparar" para os três itens do menu caberem sem rolar */
/* Celular: a marca empilhada (QUAL em cima, ATACAREJO embaixo) com 54 px (~111 px de
   largura): cabe ao lado da conta e do tema sem a página alargar, e a faixa cresce
   para 68 px para o logo respirar */
@media (max-width: 480px) {
  .header-inner { min-height: 68px; }
  .brand-mark { height: 54px; margin-left: 0; }
  .brand-mark .brand-linha { display: none; }
  .brand-mark .brand-empilhado { display: block; }
}
@media (max-width: 359px) {
  .header-inner { column-gap: 12px; }
  .account-slot { margin-right: -6px; }
  .nav-long { display: none; }
}

/* min-width: 0: como item flex, o main não encolheria abaixo da largura das tabelas */
main {
  flex: 1; width: 100%; min-width: 0; max-width: 1180px; margin: 0 auto;
  padding: 0 var(--pad-r) 48px var(--pad-l);
}
main:focus { outline: none; }

.site-footer { background: var(--band); color: var(--band-ink); }
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 26px var(--pad-r) calc(30px + env(safe-area-inset-bottom, 0px)) var(--pad-l); /* acima da barrinha do iPhone */
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 40px;
}
.site-footer p { max-width: 62ch; font-size: .9rem; opacity: .85; }
.footer-side { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.footer-gh {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%;
  border: 1px solid var(--band-line); color: var(--band-ink);
  transition: color 150ms ease, border-color 150ms ease, transform var(--press) var(--ease-out);
}
.footer-gh:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .footer-gh:hover { color: var(--tag); border-color: var(--tag); } }
.footer-gh:focus-visible { outline-color: var(--tag); border-radius: 50%; }
.footer-gh svg { width: 18px; height: 18px; fill: currentColor; }

/* ==========================================================================
   Topo das páginas
   ========================================================================== */
.hero { padding-block: clamp(28px, 5vw, 60px) 8px; }
.eyebrow {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px;
  font: 500 .95rem/1.4 var(--f-body); color: var(--ink-2);
}
.eyebrow-date { margin-right: 8px; }
/* Os filtros são botões: o espaço entre eles já os separa, sem o "·" */
.eyebrow .sep { display: none; }
/* Títulos grandes com line-height 1: mais juntas que isso, as linhas se encostam,
   o acento do "ESTÁ" (e o Ç de "AÇÚCAR") some na linha vizinha e a perna do Q
   invade a linha de baixo */
.hero-title {
  margin-bottom: 30px; max-width: 13.5em;
  font: 800 clamp(2.8rem, 8.4vw, 6.4rem)/1 var(--f-display);
  text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word); text-wrap: balance;
}
/* O amarelo do "hoje?" fica só na própria linha, sem cobrir a de cima. Como
   inline-block com o mesmo line-height do título, a caixa amarela tem exatamente a
   altura da linha (não o "content area" da fonte, que é mais alto e invadia a linha
   de cima). */
.hl {
  display: inline-block; line-height: 1;
  background: linear-gradient(var(--tag), var(--tag)) no-repeat 0 0 / 100% 100%; color: var(--tag-ink); padding: 0 .1em;
}
/* Ao chegar no início, o amarelo passa como marca-texto da esquerda para a direita e, no
   fim, o "?" balança como a etiqueta do logo (no tema escuro o marca-texto revela a palavra) */
.hl-q { display: inline-block; transform-origin: 50% 90%; }
@media (prefers-reduced-motion: no-preference) {
  .hl.is-marking { animation: marca-texto 560ms cubic-bezier(.22, 1, .36, 1) 300ms backwards; }
  .hl.is-marking .hl-q { animation: ni-balanco 700ms cubic-bezier(.37, 0, .63, 1) 760ms; }
}
@keyframes marca-texto { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
/* Resposta da pergunta: a rede com o menor preço de hoje na maioria dos itens
   básicos. Mesma voz do título (Outfit 800), um degrau menor; a cor da rede vem
   no quadradinho, nunca no texto. */
.answer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: -8px 0 28px; max-width: 42em; }
.answer-head {
  font: 800 clamp(1.75rem, 3.8vw, 2.5rem)/1.05 var(--f-display); text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word);
  color: var(--ink-2); text-wrap: balance; overflow-wrap: break-word;
}
/* inline (e não inline-flex): o nome fica na mesma linha de base do "Hoje é o".
   O nome quebra linha se precisar; só a 1ª palavra fica presa ao quadradinho */
.answer-store { color: var(--ink); }
.answer-first { white-space: nowrap; }
.answer-first::before {
  content: ""; display: inline-block; width: .46em; height: .46em; margin-right: .22em; vertical-align: .12em;
  border-radius: 3px; background: var(--c);
}
.answer-text { color: var(--ink-2); font-size: 1.02rem; text-wrap: pretty; }
.answer-text strong { color: var(--ink); }
.page-intro { padding-block: clamp(24px, 4vw, 44px) 20px; display: grid; gap: 10px; }
.page-intro .eyebrow { margin: 0; }
.page-title {
  font: 800 clamp(2.4rem, 6vw, 4.4rem)/1 var(--f-display);
  text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word); text-wrap: balance; overflow-wrap: anywhere;
}
/* Sem palavra sozinha na última linha, em todo o site: o navegador redistribui as
   palavras do parágrafo (no celular, onde as quebras são inevitáveis, faz a maior
   diferença). Navegador sem suporte quebra como sempre */
p, li, dd, figcaption, label, .note, .section-sub, .check-sub, .empty, .empty-tip { text-wrap: pretty; }
/* Títulos: linhas de tamanho parecido, sem uma palavra pendurada embaixo */
h1, h2, h3 { text-wrap: balance; }
/* 100ch: as frases do topo das páginas são curtas e cabem numa linha no computador */
.page-intro p:not(.eyebrow) { color: var(--ink-2); max-width: 100ch; }

/* No celular a linha quebra e o "·" sobraria no fim dela: lá a data fica sozinha
   numa linha e os filtros se separam só pelo espaço (o sublinhado já os distingue) */
@media (max-width: 720px) {
  .eyebrow-date { flex-basis: 100%; }
}

/* Filtros na linha do topo (cidade, redes): botão em forma de pílula que abre uma gaveta.
   O amarelo fica para o que é oferta; o filtro usa as cores neutras dos controles. */
.filter-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; text-align: left;
  min-height: 36px; padding: 6px 12px 6px 11px; border-radius: 999px;
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--edge);
  font: 600 .92rem/1.2 var(--f-body);
  transition: border-color 150ms ease, background-color 150ms ease, transform var(--press) var(--ease-out);
}
/* Área de toque de ~46px de altura, maior que o desenho */
.filter-btn::after { content: ""; position: absolute; inset: -5px -2px; }
@media (hover: hover) and (pointer: fine) { .filter-btn:hover { border-color: var(--ink-2); } }
.filter-btn:active { background: var(--surface-2); transform: scale(.97); }
.filter-btn:focus-visible { border-radius: 999px; }
.filter-key { color: var(--ink-2); font-weight: 500; }
/* Seta do seletor: chevron de 2 px apontando para baixo; gira para cima com a gaveta aberta */
.caret {
  flex: none; display: inline-block; width: 13px; height: 13px; margin: 1px 0 0 1px; color: var(--ink-2);
  background: currentColor; -webkit-mask: var(--chevron) center / contain no-repeat; mask: var(--chevron) center / contain no-repeat;
  rotate: 90deg;
}
[aria-expanded="true"] > .caret { rotate: -90deg; }
@media (prefers-reduced-motion: no-preference) { .caret { transition: rotate 250ms cubic-bezier(.22, 1, .36, 1); } }
.filter-btn .pin { width: 16px; height: 16px; flex: none; margin-top: -1px; }
.filter-btn .dot { width: 9px; height: 9px; }

/* Gaveta (cidade, redes, conta): no computador surge no centro crescendo de leve;
   no celular sobe de baixo, com a curva das gavetas do iPhone. Ao fechar (classe
   is-closing, ver openSheet no app.js) faz o caminho de volta, mais rápido.
   Transição em vez de keyframes: fechar no meio da abertura volta de onde está. */
.sheet {
  width: min(420px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: 0 30px 60px -20px var(--shadow);
  overscroll-behavior: contain;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.sheet::backdrop { background: rgba(9, 9, 9, .55); transition: opacity 200ms ease; }
.sheet.is-closing { opacity: 0; transform: scale(.98); transition-duration: 150ms; }
.sheet.is-closing::backdrop { opacity: 0; transition-duration: 150ms; }
@starting-style {
  .sheet[open] { opacity: 0; transform: scale(.96); }
  .sheet[open]::backdrop { opacity: 0; }
}
/* Com a gaveta aberta, arrastar o fundo escurecido não rola a página de trás */
@media (pointer: coarse) { html:has(.sheet[open]) { overflow: hidden; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 6px 20px; }
.sheet-title { font: 800 1.9rem/1 var(--f-display); text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word); }
.sheet-title:focus { outline: none; } /* a gaveta abre com o foco no título (o leitor de tela o anuncia) */
.sheet-close {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  background: transparent; border: 0; color: var(--ink); font: 400 1.6rem/1 var(--f-body);
  transition: background-color 150ms ease, transform var(--press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .sheet-close:hover { background: var(--surface-2); } }
.sheet-close:active { background: var(--surface-2); transform: scale(.92); }
/* contain: ao chegar no fim da lista, o arrasto não passa para a página de trás */
.sheet-list {
  list-style: none; margin: 0; padding: 0 12px; max-height: 60vh; max-height: 60dvh;
  overflow-y: auto; overscroll-behavior: contain;
}
.sheet-list label {
  display: flex; align-items: center; gap: 12px; padding: 13px 8px; cursor: pointer;
  border-bottom: 1px solid var(--line); font-weight: 500;
  transition: background-color 150ms ease;
}
/* Linhas tocáveis: o fundo acende na hora do toque e apaga devagar ao soltar */
.sheet-list label:active, .choice:active { background: var(--surface-2); transition-duration: 0s; }
.sheet-list li:last-child label { border-bottom: 0; }
.sheet-list input:not(.cb-input) { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); flex: none; }
.sheet-all { font-weight: 700; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 20px 20px; }
.sheet-body { display: grid; gap: 14px; padding: 4px 20px 8px; }
/* Nada nas gavetas rola para o lado: palavras longas sem espaço (e-mail, nome de
   produto lido pelo OCR) quebram onde for preciso */
.sheet-title, .sheet-body, .sheet-sub { overflow-wrap: anywhere; min-width: 0; }
.sheet-email { word-break: break-all; }
.sheet-foot { padding: 0 20px 20px; margin-top: -8px; }
/* Escolha única (cidade, rede): a linha inteira é o botão */
.sheet-list--choice { padding-bottom: 14px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 8px; cursor: pointer; text-align: left;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--ink);
  font: 500 1rem/1.3 var(--f-body);
  transition: background-color 150ms ease;
}
.sheet-list li:last-child .choice { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .choice:hover { background: var(--surface-2); } }
.choice:focus-visible { outline-offset: -3px; }
.choice-mark { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink-2); }
.choice[aria-current="true"] { font-weight: 700; }
.choice[aria-current="true"] .choice-mark { border-color: var(--ink); }
.choice[aria-current="true"] .choice-mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.choice-label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.choice-meta {
  display: inline-flex; align-items: center; gap: 4px; flex: none; white-space: nowrap;
  font: 500 .86rem/1 var(--f-body); color: var(--muted);
}
.choice-meta .dot { width: 8px; height: 8px; }
.choice-meta .dot:last-of-type { margin-right: 6px; }
.sheet-actions .btn-tag { flex: 1; justify-content: center; padding: 15px; border: 2px solid var(--ink); border-radius: 10px; }
.btn-tag:disabled { opacity: .55; cursor: default; filter: none; }
@media (max-width: 720px) {
  .sheet {
    width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); /* acima da barrinha do iPhone */
    transition: transform 420ms var(--ease-drawer);
  }
  .sheet.is-closing { opacity: 1; transform: translateY(100%); transition-duration: 240ms; }
  @starting-style { .sheet[open] { opacity: 1; transform: translateY(100%); } }
}
/* Movimento reduzido: a gaveta só aparece e some, sem deslizar */
@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet::backdrop { transition: opacity 150ms ease; }
  .sheet.is-closing { opacity: 0; transform: none; }
  @starting-style { .sheet[open] { opacity: 0; transform: none; } }
}

/* ⓘ ao lado do título de seção: a explicação abre ao tocar */
.title-tail { white-space: nowrap; } /* a última palavra do título e o ⓘ não se separam */
.info-btn {
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: 10px;
  position: relative; top: -4px; vertical-align: middle; cursor: pointer;
  border-radius: 50%; border: 1.5px solid var(--ink-2); background: transparent; color: var(--ink-2);
  font: 600 .8rem/1 var(--f-body); text-transform: none; letter-spacing: 0;
  transition: transform var(--press) var(--ease-out);
}
.info-btn:active { transform: scale(.9); }
@media (hover: hover) and (pointer: fine) { .info-btn:hover { border-color: var(--ink); color: var(--ink); } }
.info-btn[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.info-btn:focus-visible { border-radius: 50%; }

/* ==========================================================================
   Busca
   ========================================================================== */
.search { position: relative; display: grid; gap: 10px; max-width: 780px; min-width: 0; }
.search-label { font: 600 1rem/1.3 var(--f-body); }
.search-row {
  display: flex; border: 2px solid var(--edge); border-radius: 10px; overflow: hidden; background: var(--surface);
}
.search-row:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tag) 75%, transparent);
}
/* appearance: none tira o visual de campo de busca do Safari (cantos e sombra próprios) */
.search-row input {
  flex: 1; min-width: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink);
  font: 500 1.15rem/1.2 var(--f-body); padding: 16px;
  -webkit-appearance: none; appearance: none;
}
.search-row input::placeholder { color: var(--muted); }
.search-row input:focus { outline: none; }
.btn-tag {
  display: flex; align-items: center; flex: none; cursor: pointer;
  padding: 0 24px; background: var(--tag); color: var(--tag-ink); border: 0; border-left: 2px solid var(--ink);
  font: 800 1.3rem/1 var(--f-display); text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word);
  transition: filter 150ms ease, transform var(--press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .btn-tag:hover { filter: brightness(.96); } }
.btn-tag:not(:disabled):active { transform: scale(.97); }
/* Dentro do campo de busca, encolher abriria uma fresta na borda: escurece no lugar */
.search-row .btn-tag:not(:disabled):active { transform: none; filter: brightness(.88); transition-duration: 0s; }
.btn-tag:focus-visible { outline-offset: -6px; border-radius: 0; }
/* Ícone do botão da busca: as barras do Comparar (o desenho da aba) afundam ao apertar e
   voltam passando do ponto, uma depois da outra; o + do Adicionar gira um quarto de volta */
.btn-tag.has-icon { gap: 9px; }
.btn-tag .ic { width: 1em; height: 1em; stroke-width: 2.5; }
.sb-bar { transform-box: fill-box; transform-origin: bottom; }
@media (prefers-reduced-motion: no-preference) {
  .sb-bar { transition: transform 380ms cubic-bezier(.34, 1.56, .64, 1); }
  .sb-bar:nth-child(2) { transition-delay: 50ms; }
  .sb-bar:nth-child(3) { transition-delay: 100ms; }
  .btn-tag:active .sb-bar { transform: scaleY(.45); transition: transform 110ms cubic-bezier(.55, 0, 1, .45); }
  .btn-tag .ic-plus { transition: rotate 300ms cubic-bezier(.22, 1, .36, 1); }
  .btn-tag:active .ic-plus { rotate: 90deg; transition-duration: 110ms; }
}
.search--compact .search-row input { padding: 13px 14px; font-size: 1.05rem; }
.search--compact .btn-tag { font-size: 1.1rem; padding: 0 18px; }
@media (max-width: 480px) {
  .search .btn-tag { padding: 0 16px; font-size: 1.15rem; }
  .search--compact .btn-tag { font-size: 1.05rem; }
}

/* Sugestões que abrem embaixo do campo de busca vazio */
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 4;
  background: var(--surface); border: 1.5px solid var(--ink); border-radius: 10px; padding: 14px;
  box-shadow: 0 18px 30px -18px var(--shadow);
}
.suggest-title { margin-bottom: 10px; font: 600 .88rem/1 var(--f-body); color: var(--muted); }

/* Produtos dos encartes de hoje sugeridos enquanto se digita (app.js, productSuggest) */
.ac {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 4; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1.5px solid var(--ink); border-radius: 10px; box-shadow: 0 18px 30px -18px var(--shadow);
}
.ac-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name price" "meta price";
  gap: 2px 14px; align-items: center; padding: 9px 10px; border-radius: 6px; text-decoration: none; color: var(--ink);
  box-shadow: inset 3px 0 0 transparent; transition: box-shadow .15s, background-color .15s;
}
.ac-name { grid-area: name; font: 600 .95rem/1.25 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-meta { grid-area: meta; display: flex; align-items: center; gap: 6px; font: 500 .82rem/1.2 var(--f-body); color: var(--ink-2); }
.ac-price { grid-area: price; font: 700 .95rem/1 var(--f-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ac [aria-selected="true"] .ac-item { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--c); }
/* Sem oferta hoje (sugestões da Minha lista, que buscam em toda a base): preço apagado */
.ac-item.is-old .ac-price { color: var(--muted); font-weight: 600; }
.ac-when { color: var(--muted); white-space: nowrap; }
.ac-none { margin: 8px 2px 0; font: 500 .86rem/1.4 var(--f-body); color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .ac-item:hover { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--c); } }

/* Comparar sem busca: topo compacto */
.compare-intro { padding-block: clamp(18px, 3vw, 32px) 12px; }
.compare-intro .page-title { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }

/* Fichas com preço (Sua lista hoje, Em oferta hoje): nome, preço, rede e o "−X%" */
.price-chips { gap: 8px; }
.price-chips.is-collapsed > :nth-child(n+9) { display: none; }
.chips-more { margin-top: 10px; }
.price-chip {
  position: relative; gap: 8px; padding: 8px 14px 8px 12px; border-radius: 10px;
  border-left: 4px solid var(--c, var(--line));
}
.pc-name { font-weight: 600; }
.pc-price { font: 700 .92rem/1 var(--f-body); font-variant-numeric: tabular-nums; }
.pc-store { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; color: var(--ink-2); }
.pc-store .dot { width: 8px; height: 8px; }
.pc-off { font-size: .82rem; color: var(--muted); }
.price-chip.is-off { background: transparent; border-left-color: var(--line); }
.price-chip.is-off .pc-name { color: var(--ink-2); }
/* "−X%" num selinho escuro com o número amarelo, girado, no canto da ficha */
.pc-burst {
  position: absolute; top: -9px; right: -8px; padding: 3px 6px; rotate: 6deg; border-radius: 4px;
  background: var(--tag-ink); color: var(--tag); font: 800 .8rem/1 var(--f-display); letter-spacing: var(--track-sm); word-spacing: var(--word);
}
.price-chip:has(.pc-burst) { padding-right: 22px; }
@media (max-width: 560px) {
  .price-chip { flex-wrap: wrap; row-gap: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  /* As fichas entram uma depois da outra e o selinho carimba em seguida */
  .price-chip { animation: rise .35s var(--ease-out) backwards; animation-delay: calc(min(var(--i, 0), 10) * 35ms); }
  .pc-burst { animation: stamp .38s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(min(var(--i, 0), 10) * 35ms + .3s); }
}

.ticker {
  display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 30px; padding-top: 14px;
  border-top: 1px solid var(--line);
  font: 500 .92rem/1.4 var(--f-body); color: var(--ink-2);
}
.ticker b { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Filtros: campos, chips de rede
   ========================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; margin-bottom: 18px; }
.filters[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field-label { font: 600 .9rem/1.2 var(--f-body); color: var(--ink-2); }
.field select, .field input {
  font: 500 1rem/1.2 var(--f-body); color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 12px; min-width: 200px; max-width: 100%;
}
.field input { -webkit-appearance: none; appearance: none; } /* o select fica com a seta nativa */
@media (hover: hover) and (pointer: fine) { .field select:hover, .field input:hover { border-color: var(--ink-2); } }
.field select:focus, .field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tag) 70%, transparent); }
.field.grow { flex: 1; }
.field.grow input { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; text-decoration: none;
  padding: 7px 13px; min-height: 34px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 500 .9rem/1 var(--f-body);
}
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--ink); } }
a.chip:active { transform: scale(.97); }

/* ==========================================================================
   Seções
   ========================================================================== */
.section { padding-block: 34px 8px; }
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 8px 28px; margin-bottom: 18px;
}
.section-head > div { min-width: 0; }
.sign {
  font: 800 clamp(1.8rem, 3.8vw, 2.6rem)/.95 var(--f-display);
  text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word); text-wrap: balance;
}
/* 110ch: as explicações do ⓘ são frases curtas; no computador cabem numa linha (no celular, a tela quebra) */
.section-sub { margin-top: 6px; color: var(--ink-2); max-width: 110ch; font-size: .96rem; }
.hint { font: 500 .76rem/1.3 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.section-links { margin-top: 18px; font-weight: 600; }

/* ==========================================================================
   Prateleira: trilho e etiquetas de preço
   ========================================================================== */
.rail-box { position: relative; }
/* Sem a barra de rolagem do sistema: no lugar dela, setas, bordas esmaecidas e a barrinha abaixo.
   overscroll-behavior-x: ao chegar no fim da prateleira, o arrasto não vira "voltar página" */
.shelf-scroll {
  overflow-x: auto; padding-bottom: 16px; scroll-snap-type: x proximity; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.shelf-scroll::-webkit-scrollbar { display: none; }
.rail-box::before, .rail-box::after {
  content: ""; position: absolute; top: 14px; bottom: 12px; width: 32px; z-index: 1;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.rail-box::before { left: 0; background: linear-gradient(90deg, var(--paper), transparent); }
.rail-box::after { right: 0; background: linear-gradient(-90deg, var(--paper), transparent); }
.rail-box.can-left::before, .rail-box.can-right::after { opacity: 1; }
.rail-btn {
  position: absolute; z-index: 2; top: calc(50% + 2px); transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink);
  box-shadow: 0 8px 18px -8px var(--shadow);
  transition: opacity 200ms ease, transform var(--press) var(--ease-out);
}
.rail-btn--prev { left: 4px; }
.rail-btn--next { right: 4px; }
@media (hover: hover) and (pointer: fine) { .rail-btn:hover { transform: translateY(-50%) scale(1.06); } }
.rail-btn:active { transform: translateY(-50%) scale(.94); }
.rail-btn:disabled { opacity: 0; pointer-events: none; }
.rail-btn:focus-visible { outline-offset: 2px; border-radius: 50%; }
.rail-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: none) { .rail-btn { display: none; } }
.rail-track { position: relative; height: 4px; margin: 0 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.rail-thumb { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--ink-2); }
/* À direita, folga para o selo de desconto da última etiqueta, que passa da borda */
.rail {
  position: relative; list-style: none; margin: 0; padding: 26px 16px 4px 4px;
  display: flex; gap: 14px; width: max-content; min-width: 100%;
}
.rail::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; border-radius: 3px;
  background: linear-gradient(var(--rail-hi), var(--rail) 55%, var(--rail-lo));
  box-shadow: 0 3px 0 -1px var(--rail-lo);
}
/* Cada etiqueta gira a partir do gancho no trilho (16px acima dela): --swing vem
   do balanço ao rolar (app.js, swingOnScroll) e --k varia de uma para outra */
.rail > li {
  scroll-snap-align: start; display: flex;
  transform-origin: 50% -16px; rotate: calc(var(--swing, 0deg) * var(--k, 1));
}
/* Etiqueta de verdade: faixa fina com a cor da rede no alto (--c, o fundo em
   gradiente não mexe na borda), furo no meio e uma argola de arame passando por
   ele até o trilho. isolation: a argola e o furo se empilham só dentro da etiqueta */
.tag {
  position: relative; isolation: isolate; width: 196px; display: flex; flex-direction: column; gap: 9px;
  padding: 30px 14px 14px; text-decoration: none;
  background: linear-gradient(var(--c, var(--line)), var(--c, var(--line))) top / 100% 5px no-repeat var(--surface);
  color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px 9px 8px 8px;
  box-shadow: 0 14px 20px -16px var(--shadow);
  transform-origin: 50% -16px;
}
/* Argola: sai de dentro do trilho e desce até o centro do furo */
.tag::before {
  content: ""; position: absolute; z-index: 2; top: -28px; left: 50%; width: 12px; height: 41px; margin-left: -6px;
  border: 2.5px solid var(--rail-lo); border-radius: 6px;
}
/* Furo: a cor da página aparece por ele */
.tag::after {
  content: ""; position: absolute; z-index: 1; top: 9px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px;
  border-radius: 50%; background: var(--paper); box-shadow: inset 0 1.5px 2px rgba(0, 0, 0, .35);
}
@media (hover: hover) and (pointer: fine) { a.tag:hover { border-color: var(--ink); } }
.tag--deal { background-color: var(--tag); color: var(--tag-ink); border-color: transparent; }
/* Preço da etiqueta mais forte: inteiro maior, "R$" e centavos mais leves, como no encarte */
.tag .price .int { font-size: 4.2rem; }
.tag .price .cur { font-weight: 700; opacity: .7; }
.tag .price .dec { font-weight: 800; opacity: .9; }
/* Selo estourado do desconto, girado no canto, como nos encartes. Escuro com o
   número amarelo: aparece sobre a etiqueta amarela, nos dois temas */
.tag-burst {
  position: absolute; z-index: 3; top: -14px; right: -13px; width: 62px; height: 62px;
  display: grid; place-items: center; padding-top: 2px; rotate: 12deg;
  font: 800 1.2rem/1 var(--f-display); letter-spacing: var(--track); word-spacing: var(--word);
  clip-path: polygon(50% 0%,60.6% 10.4%,75% 6.7%,79% 21%,93.3% 25%,89.6% 39.4%,100% 50%,89.6% 60.6%,93.3% 75%,79% 79%,75% 93.3%,60.6% 89.6%,50% 100%,39.4% 89.6%,25% 93.3%,21% 79%,6.7% 75%,10.4% 60.6%,0% 50%,10.4% 39.4%,6.7% 25%,21% 21%,25% 6.7%,39.4% 10.4%);
}
.tag:has(.tag-burst) .tag-item { padding-right: 34px; } /* o nome não passa por baixo do selo */
@media (hover: hover) and (pointer: fine) { a.tag--deal:hover { border-color: var(--tag-ink); } }
.tag--ended { opacity: .62; }
.tag-item { min-height: 2.5em; font: 700 .8rem/1.25 var(--f-body); text-transform: uppercase; letter-spacing: .04em; }
/* Nome da rede na etiqueta (Comparar): todas as etiquetas reservam duas linhas,
   como o .tag-item, e o nome fica embaixo, junto do preço. Assim "Brasil
   Atacarejo", que quebra, não empurra o preço para baixo e a prateleira fica
   alinhada. Mais de duas linhas viram "…" (o nome inteiro fica no title). */
.tag-store-big {
  display: flex; flex-wrap: wrap; align-content: flex-end; align-items: flex-start; gap: 8px; min-height: 2em;
  font: 800 1.5rem/1 var(--f-display); text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word);
}
.tag-store-big .dot { margin-top: .3em; } /* na altura da primeira linha do nome */
.tag-store-name {
  flex: 1 1 0; min-width: 0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  padding-top: .15em; margin-top: -.15em; /* folga para o acento de ASSAÍ e ATACADÃO não ser cortado */
}
.tag-product {
  font: 500 .82rem/1.3 var(--f-body); min-height: 2.6em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.tag-row { display: flex; align-items: center; gap: 7px; font: 600 .9rem/1.2 var(--f-body); }
.tag-meta { font: 500 .86rem/1.3 var(--f-body); opacity: .8; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.tag--deal .dot, .vp-deal .dot { box-shadow: 0 0 0 1.5px var(--tag-ink); }

/* Identidade da rede: marcador colorido ao lado do texto (texto nunca colorido) */
.store { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Preço no estilo do encarte: R$ pequeno, inteiro grande, centavos no alto */
.price { display: inline-flex; align-items: flex-start; font-family: var(--f-display); letter-spacing: var(--track); word-spacing: var(--word); font-weight: 800; line-height: .8; white-space: nowrap; }
.price .cur { font-size: 1rem; font-weight: 800; margin: .3em .2em 0 0; }
.price .int { font-size: 3.7rem; }
.price .dec { font-size: 1.75rem; margin-top: .08em; }
.price .per { font: 600 .78rem/1 var(--f-body); align-self: flex-end; margin: 0 0 .3em .3em; letter-spacing: .02em; }
.price--sm .int { font-size: 2.5rem; }
.price--sm .dec { font-size: 1.25rem; }
.price--sm .cur { font-size: .85rem; }
.price--xl .int { font-size: clamp(4.4rem, 9vw, 6.4rem); }
.price--xl .dec { font-size: clamp(2rem, 4vw, 2.8rem); }
.price--xl .cur { font-size: 1.4rem; }
.price--xs .int { font-size: 1.85rem; }
.price--xs .dec { font-size: .95rem; margin-top: .1em; }
.price--xs .cur { font-size: .72rem; margin-top: .25em; }

/* "Vale a pena?" — selo sempre com ícone + texto (cor nunca sozinha) */
.v {
  align-self: flex-start; display: inline-flex; gap: 5px; align-items: center;
  padding: 4px 8px; border-radius: 4px; white-space: nowrap;
  font: 600 .82rem/1.2 var(--f-body);
  background: var(--surface-2); color: var(--ink-2);
}
.receipt .v { font: 600 .72rem/1.2 var(--f-body); text-transform: uppercase; letter-spacing: .04em; border-radius: 3px; }
.v-great, .v-good { background: var(--good-bg); color: var(--good); }
.v-high { background: var(--high-bg); color: var(--high); }
.tag--deal .v, .vp-deal .v { background: var(--tag-ink); color: var(--tag); }
.tag .v { white-space: normal; }
.v > [aria-hidden="true"] { flex: none; white-space: nowrap; } /* o ícone não se parte quando o selo quebra linha */

/* Ícones de traço (icon() no app.js): grade 24, pontas e junções redondas, cor do texto.
   Em tamanho de texto o traço vai a 2,6 para acompanhar o peso das letras (600). */
.ic {
  width: 1.05em; height: 1.05em; flex: none; overflow: visible;
  fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.v .ic { margin: 0 -1px 0 -2px; }
.v .ic-check2 { width: 1.2em; }
/* Setas de variação (▼ mais barato, ▲ mais caro): menores, coladas ao número */
.ic-arrow { width: .85em; height: .85em; margin-right: .2em; vertical-align: -.05em; stroke-width: 3; }
.sheet-close .ic, .login-nudge-close .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.login-nudge-close .ic { width: 15px; height: 15px; }
@media (prefers-reduced-motion: no-preference) {
  /* O check do selo se desenha quando ele aparece (o segundo do ✓✓ vem logo depois).
     Dentro de uma seção que entra com a rolagem (.reveal), espera ela aparecer. */
  .ic-draw path { stroke-dasharray: 1; animation: ic-draw 380ms cubic-bezier(0, 0, .58, 1) 200ms backwards; }
  .ic-draw path + path { animation-delay: 320ms; }
  .reveal:not(.is-in) .ic-draw path { animation-play-state: paused; }
}
@keyframes ic-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Abrir e fechar: a mesma seta de 2 px em todo lugar (detalhes, tabela, meses, categorias,
   execuções). Aponta para a direita fechada e gira para baixo aberta, com mola amortecida. */
:where(.vp-details, .table-toggle, details.panel, .r-missing) > summary { list-style: none; display: flex; align-items: center; gap: 6px; }
:where(.vp-details, .table-toggle, details.panel, .r-missing) > summary::-webkit-details-marker { display: none; }
:where(.vp-details, .table-toggle, details.panel, .r-missing) > summary::before,
details.run > summary::after, .month-name::after, .r-tri {
  content: ""; flex: none; display: inline-block; width: 14px; height: 14px;
  background: currentColor; -webkit-mask: var(--chevron) center / contain no-repeat; mask: var(--chevron) center / contain no-repeat;
}
:where(.vp-details, .table-toggle, details.panel, .r-missing)[open] > summary::before,
details.run[open] > summary::after, .month[open] .month-name::after, [aria-expanded="true"] > .r-tri { rotate: 90deg; }
@media (prefers-reduced-motion: no-preference) {
  :where(.vp-details, .table-toggle, details.panel, .r-missing) > summary::before,
  details.run > summary::after, .month-name::after, .r-tri { transition: rotate 250ms cubic-bezier(.22, 1, .36, 1); }
}

/* Carimbo de borracha: moldura dupla (a borda e uma linha fina por dentro, feita
   com sombras internas: a de cima, da cor do ticket, abre o vão entre as duas),
   torto, e a tinta falhada (máscara de ruído: pontos onde a tinta não "pegou") */
.stamp {
  align-self: flex-start; display: inline-block; transform: rotate(-4deg); white-space: nowrap;
  padding: 6px 9px; border: 2px solid currentColor; border-radius: 3px; color: var(--high);
  box-shadow: inset 0 0 0 1.5px var(--surface), inset 0 0 0 2.5px currentColor;
  font: 700 .68rem/1 var(--f-body); text-transform: uppercase; letter-spacing: .1em;
  --grunge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 3.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask: var(--grunge) 0 0 / 120px 60px; mask: var(--grunge) 0 0 / 120px 60px;
}
.stamp--soft { color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  /* As etiquetas chegam balançando no gancho. Curto (0,55 s) e com o atraso entre
     elas limitado às 6 primeiras: a prateleira assenta em menos de 0,8 s
     (antes, 0,9 s + até 0,5 s de atraso: quase 1,5 s a cada abertura) */
  /* A entrada fica no <li> e o balanço do mouse na etiqueta: um não reinicia o outro */
  .rail > li { animation: sway .55s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(min(var(--i, 0), 6) * 35ms); }
  /* O selo de desconto "carimba" logo depois que a etiqueta assenta */
  .tag-burst { animation: stamp .42s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(min(var(--i, 0), 6) * 35ms + .32s); }
  .tag, .ticket, .chip { transition: border-color 150ms ease, transform var(--press) var(--ease-out); }
  /* Passar o mouse: um empurrãozinho, e a etiqueta vai e volta até parar */
  @media (hover: hover) and (pointer: fine) {
    a.tag:hover { animation: nudge .9s ease-out; }
  }
}
/* Etiqueta e ticket afundam de leve ao toque (a etiqueta, a partir do gancho) */
a.tag:active, .ticket:active { transform: scale(.98); }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(0); } }
@keyframes stamp { from { scale: 1.8; opacity: 0; } }
@keyframes nudge {
  18% { transform: rotate(-3.5deg); }
  42% { transform: rotate(2.2deg); }
  64% { transform: rotate(-1.1deg); }
  84% { transform: rotate(.4deg); }
}

/* ==========================================================================
   Seções que aparecem ao rolar (app.js, reveal): a seção desliza para o lugar
   uma vez só, e a classe is-in dispara as animações de dentro dela. Sem estas
   regras (ou com "reduzir movimento"), tudo já aparece no estado final.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; translate: 0 22px; transition: opacity .5s ease, translate .6s var(--ease-out); }
  .reveal.is-in { opacity: 1; translate: none; }

  /* Ofertas de verdade: o selo carimba, o risco atravessa o preço antigo e o
     preço novo sobe, linha por linha (--i) */
  .reveal.is-in .burst { animation: stamp .42s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--i, 0) * 90ms + .1s); }
  .reveal.is-in .was s::after { animation: strike .3s ease-in backwards; animation-delay: calc(var(--i, 0) * 90ms + .35s); }
  .reveal.is-in .deal-price .price { animation: price-in .35s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 90ms + .6s); }

  /* Encartes: o carimbo bate no papel; o ticket sobe um pouco ao passar o mouse */
  .reveal.is-in .stamp { animation: stamp-hit .38s ease-out backwards; animation-delay: calc(var(--i, 0) * 120ms + .35s); }
  .ticket { transition: border-color 150ms ease, transform .2s var(--ease-out), box-shadow .2s ease; }
  @media (hover: hover) and (pointer: fine) {
    .ticket:hover { transform: translateY(-3px); box-shadow: 0 12px 18px -14px var(--shadow); }
  }

  /* Cotações: a barrinha cresce, o minigráfico se desenha da esquerda para a
     direita (cada pedaço no seu trecho do tempo: --t, --len) e o ponto de hoje
     aparece com um anel que se expande e some */
  .reveal.is-in .q-bar::after { animation: grow .5s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 60ms + .2s); }
  .reveal.is-in .spark-line:not(.spark-gap) {
    animation: draw calc(.7s * var(--len, 1)) linear backwards;
    animation-delay: calc(var(--i, 0) * 60ms + .25s + .7s * var(--t, 0));
  }
  .reveal.is-in .spark-gap {
    animation: fade-in calc(.7s * var(--len, 1)) linear backwards;
    animation-delay: calc(var(--i, 0) * 60ms + .25s + .7s * var(--t, 0));
  }
  .reveal.is-in .spark-dot { animation: dot-in .3s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--i, 0) * 60ms + .95s); }
  .reveal.is-in .spark-ring { animation: ping .8s ease-out; animation-delay: calc(var(--i, 0) * 60ms + 1.05s); }
  .quotes td:first-child { transition: padding-left .2s var(--ease-out), box-shadow .2s ease; }
}
/* ==========================================================================
   Comparar
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* Troca de busca, cidade ou redes: o resultado novo entra com um deslize curto,
     um bloco depois do outro (a busca no alto fica parada) */
  main[data-route="comparar"] > :not(.compare-top) { animation: rise .45s var(--ease-out) backwards; }
  main[data-route="comparar"] > :nth-child(3) { animation-delay: 60ms; }
  main[data-route="comparar"] > :nth-child(4) { animation-delay: 120ms; }
  main[data-route="comparar"] > :nth-child(n+5) { animation-delay: 180ms; }

  /* Faixa do "Vale a pena?": o típico aparece, a bolinha de hoje sai dele e
     desliza até o preço de hoje, e o trecho da diferença cresce junto */
  .range.reveal.is-in .range-med { animation: dot-in .3s cubic-bezier(.3, 1.6, .5, 1) backwards .15s; }
  .range.reveal.is-in .range-now { animation: range-slide .9s cubic-bezier(.2, .8, .2, 1) backwards .35s; }
  .range.reveal.is-in .range-diff { animation: grow .9s cubic-bezier(.2, .8, .2, 1) backwards .35s; }
  .range.reveal.is-in .range-labels { animation: fade-in .4s ease backwards 1.1s; }

  /* Brilho de oferta: um reflexo atravessa o quadro amarelo uma vez */
  .vp-deal::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%) no-repeat;
    background-size: 250% 100%; background-position: 150% 0;
    animation: shine 1.1s ease-in-out .55s both;
  }

  /* Ranking: as barras crescem uma depois da outra e a primeira (a que lidera)
     dá um pulinho quando a sua barra termina */
  .reveal.is-in .rank-bar span { animation: bar-grow .7s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 110ms + .15s); }
  .reveal.is-in .rank li:first-child .rank-name { animation: hop .45s ease-out .9s; }

  /* Preço girando: largura fixa por dígito para o número não tremer enquanto corre */
  .price.is-rolling { font-variant-numeric: tabular-nums; }
}
@keyframes rise { from { opacity: 0; translate: 0 14px; } }
@keyframes range-slide { from { left: var(--from); } }
@keyframes shine { to { background-position: -50% 0; } }
@keyframes bar-grow { from { width: 0; } }
@keyframes hop { 40% { translate: 0 -6px; } 70% { translate: 0 1px; } }
@keyframes strike { from { scale: 0 1; } }
@keyframes price-in { from { opacity: 0; translate: 0 8px; } }
@keyframes stamp-hit { 0% { scale: 1.7; opacity: 0; } 55% { scale: .94; opacity: 1; } 100% { scale: 1; } }
@keyframes grow { from { scale: 0 1; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes dot-in { from { scale: 0; } }
@keyframes ping { from { opacity: .45; scale: 1; } to { opacity: 0; scale: 3.2; } }

/* ==========================================================================
   Encartes por rede (tickets)
   ========================================================================== */
.stores { border-top: 2px solid var(--ink); }
.store-block {
  display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px 28px;
  padding-block: 22px; border-bottom: 1px solid var(--line);
}
.store-head { display: flex; flex-direction: column; gap: 8px; }
.store-name {
  display: flex; align-items: center; gap: 10px;
  font: 800 2.1rem/.95 var(--f-display); text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word);
}
.store-name::before { content: ""; width: 16px; height: 16px; border-radius: 3px; background: var(--c); flex: none; }
.store-meta { font: 500 .94rem/1.4 var(--f-body); color: var(--ink-2); }
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
/* Ticket com a faixa da cor da rede no alto (--c vem do bloco da rede; a mesma
   faixa das etiquetas da prateleira) */
.ticket {
  display: grid; grid-template-columns: minmax(88px, auto) minmax(0, 1fr); text-decoration: none; color: var(--ink);
  background: linear-gradient(var(--c, transparent), var(--c, transparent)) top / 100% 4px no-repeat var(--surface);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
@media (hover: hover) and (pointer: fine) { .ticket:hover { border-color: var(--ink); } }
.ticket[aria-current="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.stub {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  padding: 12px 10px; border-right: 2px dashed var(--line); text-align: center;
  background: linear-gradient(var(--c, transparent), var(--c, transparent)) top / 100% 4px no-repeat var(--surface-2);
}
/* Picote: meias-luas recortadas em cima e embaixo da linha tracejada (o ticket
   corta o que passa da borda, então só aparece a metade de cada círculo) */
.stub::before, .stub::after {
  content: ""; position: absolute; right: -8px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line);
}
.stub::before { top: -8px; }
.stub::after { bottom: -8px; }
.ticket[aria-current="true"] .stub { background-color: var(--tag); color: var(--tag-ink); }
.stub-days { font: 800 1.65rem/1 var(--f-display); letter-spacing: var(--track); word-spacing: var(--word); white-space: nowrap; }
.stub-days--sm { font-size: 1.2rem; }
.stub-month { font: 600 .68rem/1 var(--f-body); text-transform: uppercase; letter-spacing: .08em; opacity: .8; white-space: nowrap; }
.t-body { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; min-width: 0; }
.t-name { font: 700 1.04rem/1.25 var(--f-body); }
.t-count { font: 500 .9rem/1.3 var(--f-body); color: var(--ink-2); }
.t-deals {
  align-self: flex-start; padding: 3px 8px; border-radius: 4px; background: var(--tag); color: var(--tag-ink);
  font: 600 .82rem/1.25 var(--f-body);
}
.t-tags { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 2px; }

/* "Sem encarte hoje: Atakarejo, Assaí…" numa linha só */
.off { margin-top: 20px; font-size: .95rem; color: var(--ink-2); }
.off-title { font-weight: 600; color: var(--ink-2); }
.off a { color: var(--ink); font-weight: 600; }

/* "+N encartes" / "+N ofertas": listas encurtadas só no celular */
.btn.more-btn { display: none; margin-top: 10px; }
@media (max-width: 720px) {
  .btn.more-btn { display: inline-flex; }
  .tickets.is-collapsed > :nth-child(n+4), .deals.is-collapsed > :nth-child(n+6) { display: none; }
}

@media (max-width: 760px) {
  .store-block { grid-template-columns: minmax(0, 1fr); }
  .store-name { font-size: 1.8rem; }
}

/* ==========================================================================
   Ofertas de verdade (de/por)
   ========================================================================== */
.deals { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.deal {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; grid-template-areas: "burst info price";
  gap: 6px 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line);
}
/* Selo do tamanho do desconto (--s, do app.js) e girado de um jeito em cada linha (--r) */
.burst {
  grid-area: burst; justify-self: center; position: relative;
  width: var(--s, 62px); height: var(--s, 62px); display: grid; place-items: center; rotate: var(--r, 0deg);
  font: 800 calc(var(--s, 62px) * .29)/1 var(--f-display); letter-spacing: var(--track); word-spacing: var(--word);
  clip-path: polygon(50% 0%,60.6% 10.4%,75% 6.7%,79% 21%,93.3% 25%,89.6% 39.4%,100% 50%,89.6% 60.6%,93.3% 75%,79% 79%,75% 93.3%,60.6% 89.6%,50% 100%,39.4% 89.6%,25% 93.3%,21% 79%,6.7% 75%,10.4% 60.6%,0% 50%,10.4% 39.4%,6.7% 25%,21% 21%,25% 6.7%,39.4% 10.4%);
}
/* Um selo de desconto só para o site todo (prateleira e Ofertas de verdade): estrela
   amarela com contorno escuro e número escuro. O contorno é o fundo escuro do selo;
   a estrela amarela, um pouco menor, vai por cima dele (::before). Aparece em cima
   da etiqueta amarela e no fundo da página, nos dois temas */
.burst, .tag-burst { isolation: isolate; background: var(--tag-ink); color: var(--tag-ink); }
.burst::before, .tag-burst::before {
  content: ""; position: absolute; inset: 3px; z-index: -1; background: var(--tag); clip-path: inherit;
}
.deal-info { grid-area: info; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.deal-name { font: 700 1.06rem/1.25 var(--f-body); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .deal-name:hover { text-decoration: underline; } }
.deal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font: 500 .9rem/1.3 var(--f-body); color: var(--ink-2); }
.deal-meta .store { white-space: normal; }
.deal-price { grid-area: price; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.was { font: 500 .88rem/1.1 var(--f-body); color: var(--muted); white-space: nowrap; }
/* O risco do preço antigo é desenhado (e não o text-decoration), para poder
   atravessar o preço como uma remarcação quando a seção aparece */
.was s { position: relative; color: var(--ink-2); white-space: nowrap; text-decoration: none; }
.was s::after {
  content: ""; position: absolute; left: -2px; right: -2px; top: 52%; height: 1.5px;
  background: currentColor; rotate: -6deg; transform-origin: left center;
}
@media (max-width: 560px) {
  .deal { grid-template-columns: 66px minmax(0, 1fr); grid-template-areas: "burst info" "burst price"; }
  .burst { width: calc(var(--s, 62px) * .85); height: calc(var(--s, 62px) * .85); font-size: calc(var(--s, 62px) * .85 * .29); }
  /* Preço e "costuma custar" lado a lado; se não couberem (celular de 320–360px,
     preço de 4 dígitos), o "costuma custar" sobe para a linha de cima em vez de
     alargar a página para o lado */
  .deal-price { flex-direction: row-reverse; flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; gap: 6px 12px; }
  .was { white-space: normal; }
}

/* ==========================================================================
   Cotações de hoje: os itens básicos com o preço típico e o minigráfico de 12
   semanas. Variação com ▼/▲ além da cor; no celular cada linha vira um bloco.
   ========================================================================== */
.quotes td { vertical-align: middle; padding-block: 12px; }
.quotes th:first-child, .quotes td:first-child { padding-left: 0; }
.q-item a { font: 700 1.04rem/1.25 var(--f-body); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .q-item a:hover { text-decoration: underline; } }
.q-where { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; font-size: .88rem; color: var(--ink-2); }
.q-where .dot { margin-top: .38em; } /* na altura da 1ª linha quando o nome da rede quebra */
.q-price { text-align: right; white-space: nowrap; }
.q-unit { display: block; margin-top: 3px; font-size: .8rem; color: var(--ink-2); }
.quotes td.q-typ { color: var(--ink-2); }
.q-var { text-align: right; white-space: nowrap; }
.q-chg { font: 700 .98rem/1 var(--f-body); font-variant-numeric: tabular-nums; }
.q-down { color: var(--good); }
.q-up { color: var(--high); }
.q-typ-m { display: none; }
.spark { display: block; width: 120px; height: 34px; overflow: visible; }
.spark-line { stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; }
.spark-gap { stroke-dasharray: 3 3.5; opacity: .75; }
/* Anel da cor do fundo no último ponto: continua legível em cima da linha */
.spark-dot { fill: var(--ink-2); stroke: var(--paper); stroke-width: 2; }
/* Anel do ponto de hoje: invisível; só aparece na animação (expande e some) */
.spark-ring { fill: var(--ink-2); opacity: 0; }
.spark-dot, .spark-ring { transform-box: fill-box; transform-origin: center; }
.spark-line:not(.spark-gap) { stroke-dasharray: 1; } /* pathLength 1: o traço inteiro, que a animação desenha */
/* Variação com barrinha proporcional (cheia a partir de 40%), crescendo do número para a esquerda */
.q-chg-row { display: inline-flex; align-items: center; gap: 8px; }
.q-bar { position: relative; width: 44px; height: 6px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, currentColor 16%, transparent); }
.q-bar::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; scale: var(--w, 0) 1; transform-origin: right center; }
.spark-great, .spark-good { fill: var(--good); }
.spark-high { fill: var(--high); }
@media (hover: hover) and (pointer: fine) {
  .quotes tbody tr:hover .spark-dot { stroke: var(--surface-2); }
  /* Régua: a linha em foco ganha uma faixa da cor da rede à esquerda e o nome anda um pouco */
  .quotes tbody tr:hover td:first-child { padding-left: 14px; box-shadow: inset 4px 0 0 var(--c, var(--ink)); }
}
@media (max-width: 720px) {
  .quotes, .quotes tbody { display: block; }
  .quotes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .quotes tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "item price" "item var" "spark verdict";
    gap: 6px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .quotes td { padding: 0; border: 0; }
  .q-item { grid-area: item; align-self: start; }
  .q-price { grid-area: price; }
  .q-var { grid-area: var; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
  .q-spark { grid-area: spark; }
  .q-verdict { grid-area: verdict; justify-self: end; }
  .quotes td.q-typ { display: none; }
  .q-typ-m { display: block; font-size: .84rem; font-weight: 500; color: var(--ink-2); }
}

/* ==========================================================================
   Botões
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  padding: 9px 15px; min-height: 40px; border-radius: 8px; text-decoration: none; white-space: nowrap;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font: 600 .92rem/1 var(--f-body);
  transition: background-color 150ms ease, filter 150ms ease, transform var(--press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--surface-2); } }
.btn.primary { background: var(--ink); color: var(--paper); }
@media (hover: hover) and (pointer: fine) { .btn.primary:hover { background: var(--ink); filter: brightness(1.2); } }
.btn:not(:disabled):active { transform: scale(.97); }
.btn.small { font-size: .84rem; padding: 6px 11px; min-height: 32px; font-weight: 500; }
.btn:disabled { opacity: .6; cursor: default; }

/* "Fazer login com o Google": o botão padrão do Google, nas medidas do guia de marca
   (40px de altura, pílula, borda de 1px, "G" de 20px, 10px até o texto, Roboto Medium 14px) */
.gsi-btn {
  --gsi-bg: #fff; --gsi-line: #747775; --gsi-ink: #1f1f1f;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  height: 40px; padding: 0 16px 0 12px; border-radius: 20px; white-space: nowrap;
  border: 1px solid var(--gsi-line); background: var(--gsi-bg); color: var(--gsi-ink);
  font: 500 14px/20px Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; letter-spacing: .25px;
  transition: background-color 150ms ease, box-shadow 150ms ease, transform var(--press) var(--ease-out);
}
.gsi-logo { display: block; width: 20px; height: 20px; flex: none; }
.gsi-logo svg { display: block; width: 100%; height: 100%; }
@media (hover: hover) and (pointer: fine) {
  .gsi-btn:not(:disabled):hover { background: color-mix(in srgb, var(--gsi-bg) 92%, var(--gsi-ink)); box-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15); }
}
.gsi-btn:not(:disabled):active { transform: scale(.97); }
.gsi-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.gsi-btn:disabled { opacity: .6; cursor: default; }
.sheet-actions .gsi-btn { flex: 1; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .gsi-btn { --gsi-bg: #131314; --gsi-line: #8e918f; --gsi-ink: #e3e3e3; }
}
:root[data-theme="dark"] .gsi-btn { --gsi-bg: #131314; --gsi-line: #8e918f; --gsi-ink: #e3e3e3; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.link-button { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button:focus-visible { outline: 3px solid var(--ink); border-radius: 3px; }
.back { display: inline-block; margin-top: 24px; font-weight: 600; }

/* ==========================================================================
   Página do produto: etiqueta grande pendurada ao lado do nome, destaques e
   ações; embaixo, o gráfico (só com 4 semanas ou mais) e os anúncios como
   linha do tempo de tickets
   ========================================================================== */
.ph-eyebrow { margin: 22px 0 0; }
.product-hero {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-areas: "hang head" "hang body";
  gap: 6px 40px; align-items: start; padding-block: 18px 8px;
}
.ph-head { grid-area: head; display: grid; gap: 10px; justify-items: start; padding-top: 22px; }
.ph-hang { grid-area: hang; }
.ph-body { grid-area: body; display: grid; gap: 18px; }
/* Nome no tamanho certo: quanto mais longo, menor a letra */
.ph-title.is-mid { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.ph-title.is-long { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.02; }
/* Tamanho da embalagem numa etiquetinha amarela com ponta, como a da marca */
.size-chip {
  display: inline-flex; align-items: center; padding: 4px 10px 4px 16px;
  background: var(--tag); color: var(--tag-ink); font: 800 1.05rem/1 var(--f-display); letter-spacing: var(--track-sm); word-spacing: var(--word); text-transform: uppercase;
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%);
}
/* A etiqueta da página: a mesma da prateleira, maior, num pedaço de trilho só dela */
.ph-hang .rail { width: 100%; min-width: 0; padding-right: 18px; }
.ph-tag { width: 222px; }
.price--hero .int { font-size: 5rem; }
.price--hero .dec { font-size: 2.2rem; }
.price--hero .cur { font-size: 1.15rem; }
.ph-tag.is-ended .price, .ph-tag.is-ended .tag-store-big { opacity: .5; }
.ph-stamp { position: absolute; right: 12px; bottom: 54px; transform: rotate(-12deg); font-size: .82rem; }
.ph-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 54ch; }
.ph-fact { padding-left: 16px; position: relative; color: var(--ink-2); }
.ph-fact::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.ph-fact strong { color: var(--ink); }
.ph-fact.is-good strong { color: var(--good); }
.ph-fact.is-good::before { background: var(--good); }
.ph-fact.is-bad strong { color: var(--high); }
.ph-fact.is-bad::before { background: var(--high); }
.ph-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ph-actions .btn { text-decoration: none; }

/* Linha do tempo dos anúncios: tickets com o preço à direita e, entre eles, a variação */
.ads { list-style: none; margin: 0; padding: 0; display: grid; max-width: 720px; }
.ad-ticket { grid-template-columns: minmax(88px, auto) minmax(0, 1fr) auto; }
.ad-ticket .t-name { display: flex; align-items: center; gap: 7px; }
.ad-price { display: flex; align-items: center; padding: 10px 16px 10px 4px; }
.ad-ticket.is-now { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ad-ticket.is-now .stub { background-color: var(--tag); color: var(--tag-ink); }
/* Conector entre dois anúncios: uma linha tracejada vertical com a variação */
.ad-delta {
  position: relative; display: flex; align-items: center; gap: 8px; min-height: 34px; padding-left: 104px;
  font: 700 .86rem/1 var(--f-body); color: var(--muted); font-variant-numeric: tabular-nums;
}
.ad-delta::before { content: ""; position: absolute; left: 44px; top: 0; bottom: 0; border-left: 2px dashed var(--line); }
.ad-delta.q-down { color: var(--good); }
.ad-delta.q-up { color: var(--high); }

@media (max-width: 720px) {
  .product-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "hang" "body"; gap: 14px; }
  .ph-head { padding-top: 0; }
  .ph-hang { justify-self: center; width: 260px; }
  .ph-tag { width: 240px; }
  .ad-delta { padding-left: 98px; }
  .ad-price { padding-right: 12px; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Os conectores aparecem um depois do outro, depois que a seção chega */
  .reveal.is-in .ad-delta { animation: fade-in .4s ease backwards; animation-delay: .35s; }
}

/* ==========================================================================
   Comparar
   ========================================================================== */
.compare-top { padding-top: 26px; display: grid; gap: 14px; }
.compare-top .eyebrow { margin: 0; }
.query-note { margin: 22px 0 0; color: var(--ink-2); font-size: .92rem; }

.verdict-panel {
  --panel-bg: var(--surface);
  position: relative; margin-block: 14px 34px;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px 44px;
  padding: 30px 30px 28px 60px; border-radius: 6px 16px 16px 6px;
  background: var(--panel-bg); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 22px 34px -28px var(--shadow);
}
.verdict-panel::before {
  content: ""; position: absolute; left: 22px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border-radius: 50%; background: var(--paper); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .3);
}
/* No amarelo vale a regra da marca (a cor preenche, a tinta desenha): verde e
   framboesa usam os tons escuros do tema claro também no tema escuro (4,1:1 e 4,0:1) */
.vp-deal {
  --panel-bg: var(--tag); color: var(--tag-ink); border-color: transparent;
  --good: var(--good-on-tag); --high: var(--high-on-tag);
}
.vp-high { border: 2px solid var(--high); }
.vp-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.vp-title { font: 800 clamp(2.3rem, 5.2vw, 3.8rem)/.88 var(--f-display); letter-spacing: var(--track); word-spacing: var(--word); text-transform: uppercase; text-wrap: balance; }
.vp-text { font-size: 1rem; max-width: 52ch; }
.vp-offer { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 18px; }
.vp-where { display: flex; flex-direction: column; gap: 4px; padding-bottom: 6px; min-width: 0; }
.vp-where .tag-row { font-size: 1.05rem; }
.vp-details { min-width: 0; }
.vp-facts { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.vp-note { font: 500 .86rem/1.45 var(--f-body); opacity: .8; }
.vp-sum { font-size: 1.05rem; line-height: 1.45; }
.vp-save-row { align-self: flex-start; display: flex; align-items: center; gap: 4px; }
.vp-save { color: inherit; border-color: currentColor; }
/* Mortal de comemoração ao salvar na lista. O arquivo é alto (sobra em cima para o
   pulo): as margens negativas deixam a etiqueta na altura do botão sem empurrar nada */
.vp-flip { margin: -24px 0 -8px -2px; transition: opacity .3s ease; }
.vp-flip.is-leaving { opacity: 0; }
/* Contorno escuro: a etiqueta laranja do mortal não some no quadro laranja do "Ótimo momento" */
.vp-save-row .vp-flip.mascot {
  filter: drop-shadow(1.5px 0 0 var(--ink)) drop-shadow(-1.5px 0 0 var(--ink)) drop-shadow(0 1.5px 0 var(--ink)) drop-shadow(0 -1.5px 0 var(--ink));
}
/* Salvo: o botão fica preenchido (bem diferente do vazio, em qualquer fundo) e dá um pulinho */
.vp-save.is-saved { background: var(--ink); border-color: var(--ink); color: var(--paper); }
@media (hover: hover) and (pointer: fine) { .vp-save.is-saved:hover { background: var(--ink-2); border-color: var(--ink-2); } }
.list-toggle .lt-remove { display: none; }
@media (hover: hover) and (pointer: fine) {
  .list-toggle.is-saved:hover .lt-label { display: none; }
  .list-toggle.is-saved:hover .lt-remove { display: inline; }
}
@media (prefers-reduced-motion: no-preference) {
  .list-toggle.is-added { animation: ni-bump 260ms cubic-bezier(.34, 1.56, .64, 1) 140ms; }
}
/* Sem oferta hoje: a etiqueta balançando no centro da coluna da direita. As margens
   negativas tiram a sobra transparente do arquivo, para o quadro não crescer */
.vp-aside { display: grid; place-items: center; }
.vp-aside .mascot { margin-block: -28px; }
.vp-none-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.vp-none-tag { display: none; margin-left: auto; }
/* A sobra transparente do arquivo sai pelas margens: a etiqueta encosta na borda do
   texto à direita e o pé dela fica na altura do pé do botão */
.vp-none-tag .mascot { margin: -12px -11px -15px 0; }
.vp-deal .mascot { filter: none; } /* no amarelo, a etiqueta preta aparece nos dois temas */
@media (hover: hover) and (pointer: fine) { .vp-save:hover:not(:disabled) { background: color-mix(in srgb, currentColor 10%, transparent); } }
/* Convite para entrar, logo abaixo do "+ Minha lista" */
.login-nudge { margin-top: -6px; font-size: .88rem; line-height: 1.45; }
.login-nudge .link-button { font-weight: 600; }
.login-nudge-close {
  all: unset; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: 4px;
  vertical-align: middle; border-radius: 50%; cursor: pointer; font-size: 1.15rem; line-height: 1; opacity: .7;
}
@media (hover: hover) and (pointer: fine) { .login-nudge-close:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); } }
.login-nudge-close:active { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
.login-nudge-close:focus-visible { outline: 3px solid currentColor; }
.vp-details > summary { cursor: pointer; font: 600 .95rem/1.3 var(--f-body); }
.vp-details[open] > summary { margin-bottom: 4px; }
/* No computador os detalhes ficam sempre abertos, sem o "Ver detalhes" */
@media (min-width: 821px) { .vp-details > summary { display: none; } }
.vp-warn { grid-column: 1 / -1; font-weight: 600; border-left: 4px solid var(--warn); padding-left: 10px; }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.facts li { padding-left: 18px; position: relative; font-size: .96rem; line-height: 1.45; }
.facts li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 2px; background: currentColor; }

/* Faixa do histórico: menor — típico — maior, com o preço de hoje */
.range { max-width: 520px; }
.range-track { position: relative; height: 6px; margin: 12px 8px; border-radius: 3px; background: color-mix(in srgb, currentColor 22%, transparent); }
.range-med { position: absolute; top: -6px; width: 2px; height: 18px; margin-left: -1px; background: currentColor; }
.range-now { position: absolute; top: -7px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--panel-bg); }
.vp-high .range-now { background: var(--high); }
.vp-range-m { display: none; } /* cópia da faixa para o celular (ver o @media abaixo) */
/* Trecho entre o típico e hoje: verde quando hoje está abaixo, framboesa quando acima */
.range-diff { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.range-diff.is-below { background: var(--good); transform-origin: right center; }
.range-diff.is-above { background: var(--high); transform-origin: left center; }
.range-labels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font: 600 .92rem/1.2 var(--f-body); }
.range-labels > span { display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.range-labels > span:nth-child(2) { align-items: center; text-align: center; }
.range-labels > span:nth-child(3) { align-items: flex-end; text-align: right; }
.range-labels small { font: 500 .68rem/1 var(--f-body); text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
@media (max-width: 359px) { .range-labels { font-size: .84rem; } } /* folga para preço de 3 dígitos (R$ 129,90) */

@media (max-width: 820px) {
  .verdict-panel { grid-template-columns: minmax(0, 1fr); padding: 26px 20px 24px 48px; }
  .verdict-panel::before { left: 17px; top: 42px; margin-top: 0; }
  /* A faixa do histórico fica à vista, abaixo do resumo, e sai do "Ver detalhes" */
  .vp-range-m { display: block; }
  .vp-facts > .range { display: none; }
  /* Numa coluna só, a etiqueta grande deixaria o quadro mais alto: vai a pequena, na linha do botão */
  .vp-aside { display: none; }
  .vp-none-tag { display: block; }
}

/* Painéis (gráfico, ranking, tabelas) */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; }
.panel + .panel, .panels + .panel, .history + .panel, .panel + .history { margin-top: 18px; }
/* Período do histórico: uma linha acima dos painéis que ele recorta */
.range-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 12px; }
.range-label { margin-right: 4px; font: 600 .78rem/1 var(--f-body); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.range-row .cat-chip { min-height: 36px; padding: 7px 14px; }
.panels { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; margin-top: 8px; }
.panels > .panel { margin-top: 0; }
.panel-title { font: 800 1.5rem/1 var(--f-display); text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word); }
.panel .section-sub { margin: 4px 0 14px; font-size: .9rem; }
@media (max-width: 900px) { .panels { grid-template-columns: minmax(0, 1fr); } }

.chart-box { position: relative; height: 340px; }
@media (max-width: 600px) { .chart-box { height: 280px; } }
.chart-box canvas:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }

/* Painel de leitura do gráfico: fica acima dele, nunca por cima das linhas. Sem o
   ponteiro, mostra o último preço de cada rede; com o ponteiro (ou o dedo, ou as
   setas do teclado), a semana escolhida. Também é a legenda: tocar numa rede a
   destaca no gráfico. Altura fixa (uma linha por rede), para nada pular. */
.chart-readout { margin: 0 0 12px; }
.cr-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px;
  margin: 0 0 6px; padding: 0 6px;
}
.cr-when { font: 600 .78rem/1.3 var(--f-body); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.cr-hint { font-size: .78rem; color: var(--muted); }
.cr-hint[hidden] { display: inline; visibility: hidden; } /* guarda o lugar: o título não pula */
.is-locked .cr-hint { display: none; } /* fixada: o "× Soltar" toma o lugar do aviso */
.cr-unpin {
  margin-left: auto; padding: 4px 10px; border: 1.5px solid var(--ink-2); border-radius: 999px; background: var(--surface);
  font: 600 .78rem/1 var(--f-body); color: var(--ink); cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .cr-unpin:hover { background: var(--surface-2); } }
.cr-unpin:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cr-unpin[hidden] { display: none; }
/* Semana fixada: o título fica na cor do texto, para mostrar que o painel parou */
.is-locked .cr-when { color: var(--ink); }
.cr-list { list-style: none; margin: 0; padding: 0; columns: 2 280px; column-gap: 16px; }
/* Linha: o botão da rede (marcador, preço, nome) e, ao lado, o produto como link */
.cr-list li {
  break-inside: avoid; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px;
  min-height: 30px; border-radius: 6px; transition: opacity 150ms ease;
}
.cr-row {
  display: grid; grid-template-columns: 22px var(--cr-val, 5.4em) auto; align-items: center; gap: 8px;
  padding: 3px 6px; border: 0; border-radius: 6px; background: transparent;
  font: 400 .88rem/1.2 var(--f-body); color: var(--ink); text-align: left; cursor: pointer;
  transition: background-color 150ms ease;
}
.cr-list.has-unit { --cr-val: 7.6em; }
@media (hover: hover) and (pointer: fine) { .cr-row:hover { background: var(--surface-2); } }
.cr-row:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.cr-key { width: 22px; height: 14px; display: block; }
.cr-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cr-store { font-weight: 600; white-space: nowrap; }
.cr-prod { min-width: 0; padding-right: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; color: var(--muted); }
.cr-link { color: inherit; text-decoration: none; }
/* Com endereço é link: sublinhado discreto, que acende ao passar o mouse */
.cr-link[href] { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .cr-link[href]:hover { color: var(--ink); text-decoration-color: currentColor; } }
.cr-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-radius: 2px; }
.is-min .cr-val { color: var(--good); }
.is-empty .cr-val, .is-empty .cr-store { color: var(--muted); font-weight: 500; }
/* Uma rede em destaque: as outras ficam apagadas, como no gráfico */
.has-focus .cr-list li:not(.is-focus) { opacity: .45; }
.cr-row[aria-pressed="true"] { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
@media (max-width: 600px) {
  .cr-list li { min-height: 32px; column-gap: 6px; }
  .cr-row { gap: 6px; }
}


.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rank li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: baseline; }
.rank-name { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.rank-pct { font: 800 1.5rem/1 var(--f-display); letter-spacing: var(--track); word-spacing: var(--word); }
.rank-bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.rank-bar span { display: block; height: 100%; background: var(--c); border-radius: 4px; }
.rank-score { display: flex; align-items: baseline; gap: 10px; }
.rank-weeks { font: 500 .88rem/1 var(--f-body); color: var(--muted); white-space: nowrap; }
/* Menos de 4 semanas para comparar: sem porcentagem, barra apagada */
.rank-few { font: 600 .78rem/1 var(--f-body); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
.rank .is-few .rank-name { color: var(--ink-2); }
.rank .is-few .rank-bar span { opacity: .35; }

/* ==========================================================================
   Tabelas
   ========================================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  color: var(--ink-2); white-space: nowrap; border-bottom: 2px solid var(--ink);
  font: 600 .72rem/1.2 var(--f-body); text-transform: uppercase; letter-spacing: .05em;
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num { font-family: var(--f-body); font-variant-numeric: tabular-nums; font-weight: 500; font-size: .9rem; }
@media (hover: hover) and (pointer: fine) { tbody tr:hover { background: var(--surface-2); } }
tr.clickable { cursor: pointer; }
tr.clickable:active { background: var(--surface-2); }

/* Tabela dos produtos do encarte: no celular (até 720px, onde as 4 colunas não
   cabem) ficam só nome e preço; embalagem e selo de oferta descem para baixo do
   nome (.fold-meta). Assim o preço, que é o que se compara, nunca fica cortado
   na borda da tela nem escondido numa rolagem para o lado. */
.fold-meta { display: none; }
.table--fold td:first-child { overflow-wrap: anywhere; } /* nome do OCR sem espaços não alarga a tabela */
@media (max-width: 720px) {
  .table--fold .fold { display: none; }
  .table--fold .fold-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px;
    font-size: .82rem; color: var(--ink-2);
  }
  .table--fold .fold-meta .v { white-space: normal; align-items: baseline; }
}

/* ==========================================================================
   Histórico de atualizações (#/atualizacoes): busca e resultado por rede
   ========================================================================== */
.run-notify { flex: 0 0 100%; padding: 0; }
.run-notify .check-sub { max-width: 60ch; }
.run-search { margin-top: 4px; }
.run-search .btn { min-height: 41px; }
.run-search .btn[hidden] { display: none; }
.run-period { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.run-period .field input { min-width: 170px; }
@media (max-width: 600px) {
  /* De e Até lado a lado: um período se lê numa linha só */
  /* No celular a busca cabe em duas linhas: De | Até, Tipo | Resultado */
  .run-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .run-period { display: contents; }
  .run-period .field input { min-width: 0; }
  .run-search .btn { grid-column: 1 / -1; justify-self: start; }
}
/* Minutos por mês: a barra atrás do número deixa ver de relance o mês que mais rodou */
.usage { max-width: 560px; }
.usage tbody th, .usage tfoot th {
  font: 500 .93rem/1.4 var(--f-body); text-transform: none; letter-spacing: 0; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.usage tbody th::first-letter { text-transform: uppercase; }
.usage tr.is-empty, .usage tr.is-empty th { color: var(--muted); }
.usage-min { position: relative; width: 45%; }
.usage-min > span:last-child { position: relative; }
.usage-bar {
  position: absolute; right: 10px; top: 50%; height: 60%; transform: translateY(-50%);
  background: var(--tag); opacity: .45; border-radius: 3px;
}
.usage tfoot th, .usage tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.run-count { margin: 0 0 8px; }
.run-results > .btn { margin-top: 14px; }
.runs { border-top: 2px solid var(--ink); }
details.run { border-bottom: 1px solid var(--line); }
details.run > summary {
  list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px;
  align-items: start; padding: 12px 4px;
}
details.run > summary::-webkit-details-marker { display: none; }
details.run > summary::after { color: var(--muted); align-self: center; } /* seta de abrir: ver "Abrir e fechar" */
@media (hover: hover) and (pointer: fine) { details.run > summary:hover { background: var(--surface-2); } }
.run-badge {
  font: 600 .74rem/1 var(--f-body); text-transform: uppercase; letter-spacing: .04em; text-align: center;
  padding: 6px 8px; border-radius: 6px; min-width: 84px; margin-top: 1px;
}
.run-badge--ok { background: var(--good-bg); color: var(--good); }
.run-badge--fail { background: var(--high-bg); color: var(--high); }
.run-badge--part { background: var(--part-bg); color: var(--part); }
.run-badge--off { background: var(--surface-2); color: var(--ink-2); }
.run-badge--live { background: var(--tag); color: var(--tag-ink); }
.run-head { display: grid; gap: 2px; min-width: 0; }
.run-when { font-weight: 600; font-variant-numeric: tabular-nums; }
.run-meta, .run-sum { font-size: .88rem; color: var(--ink-2); }
.run-sum.has-fail { color: var(--high); font-weight: 600; }
.run-sum.has-part { color: var(--part); font-weight: 600; }
.run-body { display: grid; gap: 12px; padding: 2px 4px 18px; }
.run-stores { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.run-stores > li {
  display: grid; grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1fr) auto; gap: 4px 14px;
  align-items: baseline; padding: 10px 12px;
}
.run-stores > li + li { border-top: 1px solid var(--line); }
.run-stores > li.is-failed { box-shadow: inset 3px 0 0 var(--high); }
.run-store { display: flex; align-items: center; gap: 7px; font-weight: 600; min-width: 0; }
.run-status { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; font-weight: 600; white-space: nowrap; }
/* "Rodar pipeline agora": a seta vira o loader (o arco encurta e gira, a ponta some) e
   termina em check ou ×, que se desenham; tudo na cor do texto do botão */
.run-icon { transform-origin: center; } /* o próprio <svg> gira em torno do centro dele */
.run-icon .ri-ok, .run-icon .ri-fail { opacity: 0; }
.run-btn:is(.is-ok, .is-fail) .ri-arc, .run-btn:is(.is-ok, .is-fail) .ri-head { opacity: 0; }
.run-btn.is-running .ri-head { opacity: 0; }
.run-btn.is-running .ri-arc { stroke-dasharray: .7 1; }
.run-btn.is-ok .ri-ok, .run-btn.is-fail .ri-fail { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .run-icon .ri-arc { transition: stroke-dasharray .3s var(--ease-out); }
  .run-btn.is-running .run-icon { animation: gira-loader .9s linear infinite; }
  .run-btn.is-ok .ri-ok, .run-btn.is-fail .ri-fail { stroke-dasharray: 1; animation: ic-draw .35s cubic-bezier(0, 0, .58, 1) backwards; }
  .run-btn.is-fail .ri-fail + .ri-fail { animation-delay: .12s; }
}
@keyframes gira-loader { to { transform: rotate(360deg); } }
.run-status.ok { color: var(--good); }
.run-status.fail { color: var(--high); }
.run-new { font-size: .88rem; color: var(--ink-2); }
.run-time { font: 500 .82rem/1.2 var(--f-body); font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; white-space: nowrap; }
.run-error, .run-flyers { grid-column: 1 / -1; margin: 0; font-size: .85rem; }
.run-error { color: var(--high); overflow-wrap: anywhere; }
.run-flyers { padding-left: 18px; color: var(--ink-2); display: grid; gap: 2px; }
.run-link { justify-self: start; font-size: .9rem; }
@media (max-width: 600px) {
  details.run > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .run-badge { justify-self: start; min-width: 0; }
  .run-head { grid-column: 1; }
  details.run > summary::after { grid-row: 1 / span 2; grid-column: 2; }
  .run-stores > li { grid-template-columns: minmax(0, 1fr) auto; }
  .run-time { text-align: left; }
}

details.table-toggle { margin-top: 14px; }
details.table-toggle summary, details.panel > summary {
  cursor: pointer; font: 600 .95rem/1.3 var(--f-body);
}
details.panel { margin-top: 18px; }
details.panel[open] > summary { margin-bottom: 14px; }

/* ==========================================================================
   Minha lista: cupom
   ========================================================================== */
.list-layout {
  display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); grid-template-rows: auto 1fr;
  grid-template-areas: "receipt add" "receipt share"; gap: 24px 36px; align-items: start; padding-bottom: 20px;
}
.list-layout > .receipt { grid-area: receipt; }
.list-add { grid-area: add; min-width: 0; }
.list-share { grid-area: share; display: grid; gap: 10px; min-width: 0; }
.list-share .actions { margin-top: 0; }
.note-line { font: 400 .92rem/1.45 var(--f-body); color: var(--ink-2); }
.account { display: grid; gap: 8px; justify-items: start; margin-top: 6px; }
.account strong { color: var(--ink-2); font-weight: 600; overflow-wrap: anywhere; }
.account-error { color: var(--high); }
.account-error:empty { display: none; }
.account-who { display: grid; gap: 2px; overflow-wrap: anywhere; }
/* Gaveta "Sua conta": a foto (ou a inicial) com o aro amarelo, igual à do topo */
.account-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-avatar {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center; overflow: hidden;
  border-radius: 50%; border: 2px solid var(--tag); background: var(--tag-ink); color: var(--tag);
}
.account-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-avatar .avatar-initial { font: 800 1.35rem/1 var(--f-display); letter-spacing: var(--track); word-spacing: var(--word); text-transform: uppercase; }
.account-who span { color: var(--muted); font-size: .9rem; }
.receipt {
  position: relative; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-bottom: 0; padding: 26px 24px 30px;
  font: 500 .86rem/1.5 var(--f-body);
  box-shadow: 0 20px 30px -24px var(--shadow);
}
.receipt::after {
  content: ""; position: absolute; left: -1px; right: -1px; bottom: -12px; height: 12px;
  background:
    linear-gradient(to bottom right, var(--surface) 50%, transparent 50%) 0 0 / 16px 12px repeat-x,
    linear-gradient(to bottom left, var(--surface) 50%, transparent 50%) 0 0 / 16px 12px repeat-x;
}
.r-head { text-align: center; font: 800 1.6rem/1 var(--f-display); letter-spacing: var(--track); word-spacing: var(--word); text-transform: uppercase; }
.r-sub { text-align: center; color: var(--ink-2); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; margin-top: 8px; }
.r-rule { border: 0; border-top: 1.5px dashed var(--ink-2); margin: 16px 0; }
.r-rule--double { border-top: 4px double var(--ink); }
.r-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.r-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; font-weight: 600; text-transform: uppercase; }
.r-line a { text-decoration: none; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .r-line a:hover { text-decoration: underline; } }
.r-amount { font-variant-numeric: tabular-nums; }
.r-remove, .r-more {
  all: unset; cursor: pointer; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  color: var(--muted); font: 600 1rem/1 var(--f-body);
}
@media (hover: hover) and (pointer: fine) { .r-remove:hover, .r-more:hover { background: var(--surface-2); color: var(--ink); } }
.r-remove:active, .r-more:active { background: var(--surface-2); color: var(--ink); }
.r-remove:focus-visible, .r-more:focus-visible { outline: 2px solid var(--ink); }
.r-more .more-icon { width: 18px; height: 18px; fill: currentColor; }
.r-line .r-more { align-self: center; } /* sem texto, o ⋯ ficaria alto na linha de base do preço */
/* Quantidade antes do nome ("100×"), como no cupom do caixa: um campinho com
   sublinhado tracejado que cresce com o número; 1 fica apagado, mais de 1 em negrito */
.qty { display: inline-flex; align-items: baseline; gap: 1px; color: var(--muted); }
.qty--many { color: var(--ink); }
.qty-input {
  width: calc(var(--ch, 1) * 1ch + 6px); min-width: 0; padding: 0 2px; margin: -2px 0;
  border: 0; border-bottom: 1.5px dashed currentColor; border-radius: 0; background: transparent; color: inherit;
  text-align: center; font: 600 16px/1.2 var(--f-body); font-variant-numeric: tabular-nums; /* 16px: o iPhone não dá zoom ao tocar */
  position: relative;
}
.qty-input:focus { outline: none; border-bottom-style: solid; border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.qty-x { font-weight: 600; }
.r-total-units { display: block; margin-top: 2px; color: var(--muted); font-size: .74rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.r-detail { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; color: var(--ink-2); font-size: .78rem; margin-top: 3px; }
.r-detail > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
/* O selo do "Vale a pena?" fica sempre à direita: com o "1,69 cada", quem quebra é o texto da loja */
.r-detail { flex-wrap: nowrap; align-items: flex-start; }
.r-detail > span:first-child { flex: 1 1 auto; min-width: 0; align-items: flex-start; }
.r-detail > span:first-child .dot { flex: none; margin-top: .42em; }
.r-detail .r-tags { flex: none; }
.r-section { font-weight: 600; letter-spacing: .08em; margin-bottom: 8px; text-transform: uppercase; }
.r-where { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.r-where li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; }
.r-where li > span:first-child { display: flex; align-items: center; gap: 6px; }
.r-where li > span:last-child { font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }
/* Com mais de uma cidade, a cidade da loja numa linha menor, embaixo da rede */
.r-where-name { display: grid; min-width: 0; }
.r-where-city { color: var(--muted); font-size: .78rem; }
.r-missing { margin-top: 8px; color: var(--muted); font-size: .78rem; }
.r-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; text-transform: uppercase; font-weight: 600; }
.r-empty { text-align: center; color: var(--ink-2); padding: 12px 0; }
.r-tags { display: inline-flex; align-items: center; gap: 8px; }
.r-delta { font: 700 .74rem/1 var(--f-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.r-changes { margin-top: 12px; text-align: center; font-size: .76rem; color: var(--ink-2); }
.r-changes .q-down, .r-changes .q-up { font-weight: 700; white-space: nowrap; } /* "▲ 1 item mais caro" não se parte */
/* Modo "no mercado": botão no topo do cupom, barra de progresso e itens riscados */
.r-shop-btn {
  display: flex; align-items: center; gap: 8px; width: fit-content; margin: 14px auto 0; padding: 6px 14px 6px 10px; cursor: pointer;
  border: 1.5px dashed var(--ink-2); border-radius: 999px; background: transparent; color: var(--ink);
  font: 600 .78rem/1 var(--f-body); text-transform: uppercase; letter-spacing: .06em;
}
.r-shop-btn.is-on { border-style: solid; background: var(--ink); color: var(--paper); }
.r-shop-btn:active { transform: scale(.97); }
.r-progress { display: grid; gap: 6px; margin-top: 12px; }
.r-progress-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.r-progress-bar span { display: block; height: 100%; background: var(--good); transition: width .3s var(--ease-out); }
.r-progress-text { text-align: center; font-size: .76rem; color: var(--ink-2); }
/* Carrinho do botão (shopCart no app.js): contorno na cor do texto, cesto enchendo de
   Amarelo Qual conforme o progresso (no botão ligado, fundo tinta: contorno claro) */
.shop-cart { width: 22px; height: 22px; stroke-width: 2; margin: -2px 0; }
.shop-cart-fill { fill: var(--tag); stroke: none; }
.shop-cart-wheel { fill: currentColor; stroke: none; }
.r-progress { position: relative; }
.r-flip { position: absolute; right: -4px; bottom: -10px; transition: opacity .3s ease; }
.r-flip.is-leaving { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .r-shop-btn.is-full .shop-cart { animation: ni-bump 300ms cubic-bezier(.34, 1.56, .64, 1); }
}
.r-line--check { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
/* Caixinha desenhada (drawnCheck no app.js), em todo lugar que se marca algo: modo mercado,
   redes, cidades e avisos por e-mail. A de verdade fica invisível por cima, maior, para o
   toque e o teclado; marcada, o verde brota do centro e o check se desenha; "em parte"
   (Todas as redes com só algumas marcadas) vira um traço */
.cb { position: relative; width: 22px; height: 22px; flex: none; align-self: center; }
.cb-input { position: absolute; inset: -8px; z-index: 1; width: auto; height: auto; margin: 0; opacity: 0; cursor: pointer; }
.r-box { display: block; width: 22px; height: 22px; overflow: visible; }
.r-box-line { fill: none; stroke: var(--ink-2); stroke-width: 2; }
.r-box-fill { fill: var(--good); transform-box: fill-box; transform-origin: center; transform: scale(0); }
.r-box-check { fill: none; stroke: var(--surface); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.r-box-dash { fill: none; stroke: var(--surface); stroke-width: 2.6; stroke-linecap: round; opacity: 0; }
.cb-input:is(:checked, :indeterminate) + .r-box .r-box-line { stroke: var(--good); }
.cb-input:is(:checked, :indeterminate) + .r-box .r-box-fill { transform: none; }
.cb-input:checked + .r-box .r-box-check { stroke-dashoffset: 0; }
.cb-input:indeterminate + .r-box .r-box-dash { opacity: 1; }
.cb-input:indeterminate + .r-box .r-box-check { stroke-dashoffset: 1; }
.cb-input:focus-visible + .r-box { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.cb-input:disabled { cursor: default; }
.cb-input:disabled + .r-box { opacity: .45; }
.check > .cb { grid-row: span 2; margin-top: 1px; }
/* Feito: o item fica mais claro e o risco atravessa o nome e o preço da esquerda para a direita */
.r-line .r-name {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 0 2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.r-items li.is-done { opacity: .5; }
.r-items li.is-done .r-line .r-name { background-size: 100% 2px; }
@media (prefers-reduced-motion: no-preference) {
  .r-box-fill { transition: transform 200ms cubic-bezier(.22, 1, .36, 1); }
  .r-box-check { transition: stroke-dashoffset 250ms cubic-bezier(0, 0, .58, 1); }
  .cb-input:checked + .r-box .r-box-check { transition-delay: 90ms; }
  .r-line .r-name { transition: background-size 320ms cubic-bezier(0, 0, .58, 1) 120ms; }
  .r-items li { transition: opacity 250ms ease 200ms; }
  .cb.is-checking .r-box { animation: ni-bump 250ms cubic-bezier(.34, 1.56, .64, 1) 120ms; }
}
@media (prefers-reduced-motion: no-preference) {
  /* O cupom sai da impressora: desce de cima para baixo e a borda serrilhada aparece no fim */
  .receipt.is-printing { animation: print .8s cubic-bezier(.3, .7, .3, 1) backwards .1s; }
}
@keyframes print {
  from { clip-path: inset(0 -40px 100% -40px); translate: 0 -10px; }
  to { clip-path: inset(0 -40px -60px -40px); translate: none; }
}
details.r-missing summary { cursor: pointer; }
.r-missing-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.r-missing-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }
/* "Você economiza", destacado como nos cupons de mercado */
.r-save {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 16px; padding: 8px 10px;
  background: var(--tag); color: var(--tag-ink); font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.r-save-value { font: 800 1.3rem/1 var(--f-display); letter-spacing: var(--track); word-spacing: var(--word); font-variant-numeric: tabular-nums; }
.r-save-note { margin-top: 4px; color: var(--muted); font-size: .74rem; text-align: right; }
/* Cupom longo (8 itens ou mais): uma seção por categoria, com quantidade e
   subtotal, que fecha com um toque; e os itens sem oferta hoje numa linha só */
.r-group + .r-group { margin-top: 8px; padding-top: 6px; border-top: 1.5px dashed var(--line); }
.r-group-title { margin: 0; font: inherit; }
.r-group-head {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  padding: 4px 0; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  -webkit-user-select: none; user-select: none;
}
.r-group-name { overflow-wrap: anywhere; }
.r-group-count { color: var(--ink-2); font-weight: 500; letter-spacing: .03em; white-space: nowrap; }
/* Nome em duas linhas (celular estreito): o triângulo acompanha a primeira */
.r-group-head > .r-tri { align-self: start; margin-top: .42em; }
.r-group-sum { font-variant-numeric: tabular-nums; }
.r-group-body { margin-top: 4px; padding-bottom: 6px; }
.r-group-head:focus-visible, .r-fold-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
@media (hover: hover) and (pointer: fine) {
  .r-group-head:hover .r-group-name, .r-fold-btn:hover .r-fold-text { text-decoration: underline; text-underline-offset: 3px; }
}
.r-group-head:active, .r-fold-btn:active { opacity: .6; }
/* Seta que gira para baixo quando abre (ver "Abrir e fechar") */
.r-tri { align-self: center; width: 12px; height: 12px; }
.r-fold { margin-top: 12px; }
.r-items + .r-fold { margin-top: 14px; }
.r-fold-btn {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) 10px; gap: 10px; align-items: baseline;
  padding: 4px 0; color: var(--ink-2); font-size: .8rem; line-height: 1.5;
  -webkit-user-select: none; user-select: none;
}
/* Fechada, a linha mostra os nomes em até 2 linhas; aberta, os itens vêm embaixo */
.r-fold-btn[aria-expanded="false"] .r-fold-text {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere;
}
.r-fold .r-items { margin-top: 12px; }
/* O display: grid das listas do cupom passaria por cima do atributo hidden */
.r-items[hidden], .r-group-body[hidden] { display: none; }
/* No dedo, o título da seção ocupa a largura toda e tem ~38px de altura */
@media (pointer: coarse) { .r-group-head { padding-block: 8px; } .r-fold-btn { padding-block: 7px; } }
.share-url {
  flex: 1; min-width: 220px; font: 500 .82rem/1.3 var(--f-body); color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px;
}
@media (max-width: 860px) {
  .list-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "add" "receipt" "share"; }
  .receipt { max-width: 480px; padding-inline: 18px; }
}

/* Categorias da Minha lista: botões no topo (Tudo, cada categoria, + Nova).
   No celular rolam para o lado, para não empurrar o cupom para baixo */
.cat-chips { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.cat-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 14px; cursor: pointer;
  border-radius: 999px; border: 1.5px solid var(--edge); background: var(--surface); color: var(--ink);
  font: 600 .92rem/1 var(--f-body); white-space: nowrap;
  transition: border-color 150ms ease, background-color 150ms ease, transform var(--press) var(--ease-out);
}
.cat-chip .n { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.cat-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cat-chip[aria-pressed="true"] .n { color: inherit; opacity: .7; }
.cat-chip--new { border-style: dashed; color: var(--ink-2); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .cat-chip:hover { border-color: var(--ink-2); } }
.cat-chip:active { transform: scale(.97); }
.cat-chip:focus-visible { border-radius: 999px; }
@media (max-width: 720px) {
  .cat-chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--pad-l)) calc(-1 * var(--pad-r)); padding: 2px var(--pad-r) 4px var(--pad-l);
  }
  .cat-chips::-webkit-scrollbar { display: none; }
}
/* Categoria criada pela pessoa e aberta: renomear ou apagar */
.cat-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -6px 0 18px; font: 500 .92rem/1.4 var(--f-body); color: var(--ink-2); }
.cat-tools .link-button { color: var(--ink); }
/* Menu do ⋯: "Nova categoria…" e o remover em vermelho, separado das categorias */
.choice-plus { width: 20px; flex: none; text-align: center; font: 500 1.35rem/1 var(--f-body); }
.choice--new { font-weight: 600; }
.btn.btn-danger { color: var(--high); border-color: var(--high); }
@media (hover: hover) and (pointer: fine) { .btn.btn-danger:hover { background: var(--high-bg); } }
/* Campo do nome da categoria: 16px para o iPhone não dar zoom ao tocar */
.sheet-input {
  width: 100%; min-width: 0; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--ink);
  background: var(--surface); color: var(--ink); font: 500 16px/1.2 var(--f-body);
  -webkit-appearance: none; appearance: none;
}
.sheet-input:focus { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--tag) 75%, transparent); }
.sheet-body .field-label { margin-bottom: -6px; }

/* ==========================================================================
   Avisos por e-mail (gaveta "Sua conta" e Minha lista): duas caixas que a
   pessoa marca à vontade; a cidade dos avisos troca no link da frase de cima
   ========================================================================== */
.alerts { display: grid; min-width: 0; }
.sheet .alerts { border-top: 1px solid var(--line); padding-top: 16px; }
.alerts--panel {
  justify-self: stretch; margin-block: 8px 4px; padding: 18px 18px 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.alerts-title { font: 800 1.35rem/1 var(--f-display); text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word); }
/* Etiqueta de oferta antes do título, como em "Menor preço de hoje" (um pouco maior,
   porque este título é pequeno). As margens negativas tiram a sobra do arquivo */
.alerts-title > .mascot {
  display: inline-block; width: 1.8em; vertical-align: -.1em;
  margin: -.45em -.02em -.45em -.29em;
}
.alerts-when { margin: 8px 0 2px; font: 400 .92rem/1.45 var(--f-body); color: var(--ink-2); }
.alerts-city { color: var(--ink); font-weight: 600; }
.alerts-city:disabled { cursor: default; }
.alerts-city .caret { display: inline-block; vertical-align: middle; margin: -2px 0 0 5px; }
/* Gaveta das cidades dos avisos: explicação do limite e, no limite, as caixas que sobram apagadas */
.sheet-sub { padding: 0 20px 8px; color: var(--ink-2); font: 500 .95rem/1.4 var(--f-body); }
.sheet-list label:has(input:disabled) { opacity: .45; cursor: default; }
.check {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 12px; align-items: start;
  padding: 12px 0; cursor: pointer; -webkit-user-select: none; user-select: none;
}
.check + .check { border-top: 1px dashed var(--line); }
.check > input { grid-row: span 2; width: 22px; height: 22px; margin: 0; accent-color: var(--ink); cursor: inherit; }
.check-title { font: 600 1rem/1.375 var(--f-body); }
.check-sub { font: 400 .88rem/1.4 var(--f-body); color: var(--ink-2); }
/* Enquanto os avisos da conta não chegam, as caixas esperam apagadas */
.check:has(input:disabled) { cursor: default; }
.check:has(input:disabled) > span:not(.cb) { opacity: .55; }
/* Espaço reservado: "Salvo." aparece e some sem empurrar o que vem embaixo */
.alerts-status { min-height: 1.45em; font: 500 .86rem/1.45 var(--f-body); color: var(--good); }
/* "Salvando…" com a etiqueta carregando antes; margens negativas: não muda a altura */
.alerts-status:has(> .mascot) { display: flex; align-items: center; gap: 2px; color: var(--ink-2); }
.alerts-status > .mascot { margin: -8px 0 -8px -6px; }
.alerts-status.is-error { color: var(--high); }
/* Aviso ligado: o sino balança preso no topo e o ponto amarelo cai nele (ref. 02 do guia) */
.alerts-status:has(> .ic-bell) { display: flex; align-items: center; gap: 7px; }
.alerts-status .ic-bell { width: 19px; height: 19px; stroke-width: 2.2; color: var(--ink); }
.ic-bell-dot { fill: var(--tag); stroke: var(--surface); stroke-width: 1.5; }
@media (prefers-reduced-motion: no-preference) {
  .ic-bell > path { transform-box: view-box; transform-origin: 12px 3px; animation: sino 650ms ease-in-out 200ms; }
  .ic-bell-dot { animation: ponto-cai 380ms backwards; }
}
@keyframes sino {
  0%, 100% { transform: none; } 20% { transform: rotate(14deg); } 45% { transform: rotate(-10deg); }
  70% { transform: rotate(5deg); } 88% { transform: rotate(-2deg); }
}
@keyframes ponto-cai {
  0% { opacity: 0; transform: translateY(-7px); animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  60% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
  100% { transform: none; }
}

/* Botão com ícone (copiar, compartilhar): ícone de traço antes do texto */
.btn.has-icon { display: inline-flex; align-items: center; gap: 7px; }
.btn.has-icon .ic { width: 1.15em; height: 1.15em; stroke-width: 2.3; }
/* Copiar: o link some girando, o check se desenha e "Link copiado" sobe numa pill tinta */
.copy-wrap { position: relative; display: inline-flex; }
.ic-copy > path:not(.ic-copy-check) { transform-box: view-box; transform-origin: 12px 12px; }
.ic-copy-check { opacity: 0; }
.is-copied .ic-copy > path:not(.ic-copy-check) { opacity: 0; }
.is-copied .ic-copy > .ic-copy-check { opacity: 1; }
.copy-pill {
  position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 2; pointer-events: none;
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
  background: var(--ink); color: var(--paper); font: 600 .82rem/1 var(--f-body);
  translate: -50% 0; animation: copy-pill 1.7s both;
}
.copy-pill::after { /* rabicho apontando para o botão */
  content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px;
  border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0;
}
@keyframes copy-pill { 0% { opacity: 0; } 12%, 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .is-copied .ic-copy > path:not(.ic-copy-check) { animation: ic-plus-out 180ms cubic-bezier(.55, 0, 1, .45) backwards; }
  .is-copied .ic-copy > .ic-copy-check { stroke-dasharray: 1; animation: ic-draw 260ms cubic-bezier(0, 0, .58, 1) 120ms backwards; }
  .copy-pill { animation-name: copy-pill-sobe; }
}
@keyframes copy-pill-sobe {
  0% { opacity: 0; transform: translateY(6px); animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
  14% { opacity: 1; transform: none; }
  80% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-4px); }
}
/* Vindo do link do e-mail: um contorno amarelo mostra onde mudar os avisos */
.is-flash { animation: flash 2.4s var(--ease-out); }
@keyframes flash { from, 40% { box-shadow: 0 0 0 4px var(--tag); } to { box-shadow: 0 0 0 4px transparent; } }
@media (prefers-reduced-motion: reduce) { .is-flash { animation-duration: 0s; } }

/* ==========================================================================
   Encarte aberto
   ========================================================================== */
.flyer-filters { margin: 22px 0 0; }

/* Capa do encarte: um ticket grande (canhoto com as datas, faixa da cor da rede,
   picote), o carimbo da situação no canto e as setas para o anterior e o próximo */
.flyer-cover {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "stub body" "nav nav";
  margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: linear-gradient(var(--c, transparent), var(--c, transparent)) top / 100% 6px no-repeat var(--surface);
  box-shadow: 0 18px 30px -26px var(--shadow);
}
.fc-stub {
  grid-area: stub; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  min-width: 150px; padding: 26px 22px 20px; text-align: center; border-right: 2px dashed var(--line);
  background: linear-gradient(var(--c, transparent), var(--c, transparent)) top / 100% 6px no-repeat var(--surface-2);
}
.fc-stub::before, .fc-stub::after {
  content: ""; position: absolute; right: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line);
}
.fc-stub::before { top: -11px; }
.fc-stub::after { bottom: -11px; }
.fc-days { font: 800 clamp(2.4rem, 5vw, 3.4rem)/.9 var(--f-display); letter-spacing: var(--track); word-spacing: var(--word); white-space: nowrap; }
.fc-days--sm { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.fc-month { font: 600 .78rem/1 var(--f-body); text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.fc-body { grid-area: body; display: grid; gap: 6px; align-content: center; padding: 24px 150px 20px 26px; min-width: 0; }
.fc-body .store-name { font-size: clamp(2.4rem, 5.6vw, 4rem); }
.fc-body .store-name::before { width: .34em; height: .34em; }
.fc-body .flyer-title { font: 700 1.3rem/1.25 var(--f-body); }
.fc-deals { color: var(--ink); font-weight: 700; }
.fc-countdown { font: 600 .95rem/1.3 var(--f-body); color: var(--ink-2); }
.fc-stamp { position: absolute; top: 28px; right: 22px; transform: rotate(-8deg); font-size: .9rem; padding: 8px 12px; }
.stamp--good { color: var(--good); }
.fc-nav { grid-area: nav; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.fc-nav-link { display: grid; gap: 2px; padding: 12px 20px; text-decoration: none; color: var(--ink); min-width: 0; }
.fc-nav-next { text-align: right; border-left: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { .fc-nav-link:hover { background: var(--surface-2); } }
.fc-nav-dir { font: 700 .95rem/1.2 var(--f-body); }
.fc-nav-name { font: 500 .82rem/1.3 var(--f-body); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Celular: o carimbo sai do canto (cobriria o nome da rede) e vai para baixo do texto */
@media (max-width: 720px) {
  .flyer-cover { grid-template-areas: "stub body" "stub stamp" "nav nav"; }
  .fc-stub { min-width: 96px; padding: 22px 12px 16px; }
  .fc-body { padding: 20px 16px 8px 18px; }
  .fc-body .flyer-title { font-size: 1.1rem; }
  .fc-stamp { grid-area: stamp; position: static; justify-self: start; margin: 4px 0 18px 20px; }
  .fc-nav-link { padding: 10px 14px; }
}

/* Produtos do encarte por categoria: atalhos no alto e uma tabela por seção */
.flyer-deals { padding-top: 26px; }
.flyer-products { margin-top: 26px; }
/* fp-: classes só da página do encarte (cat-chips/cat-chip são os botões da Minha lista) */
.fp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 8px; }
.fp-chips:empty { display: none; }
.fp-chip { cursor: pointer; font: inherit; }
.cat-count { margin-left: 6px; font: 600 .78rem/1 var(--f-body); font-variant-numeric: tabular-nums; color: var(--muted); }
.cat-group + .cat-group { margin-top: 22px; }
.cat-title {
  display: flex; align-items: baseline; gap: 4px; padding: 14px 0 6px;
  font: 800 1.35rem/1 var(--f-display); text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word);
}
/* Ações da linha: "+" para a Minha lista e a setinha que mostra que a linha abre o produto */
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; width: 100%; }
/* 👍/👎 do item: verde e vermelho; votado, o botão fica preenchido na cor */
.vote { display: inline-flex; gap: 4px; flex: none; }
.vote-btn {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0; cursor: pointer;
  border-radius: 50%; border: 1.5px solid var(--edge); background: var(--surface);
  transition: background-color .15s, border-color .15s, transform var(--press) var(--ease-out);
}
.vote-btn .thumb { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.vote-btn.is-up { color: var(--good); }
.vote-btn.is-down { color: var(--high); }
.vote-btn.is-down .thumb { rotate: 180deg; }
.vote-btn.is-up[aria-pressed="true"] { background: var(--good); border-color: var(--good); color: #fff; }
.vote-btn.is-down[aria-pressed="true"] { background: var(--high); border-color: var(--high); color: #fff; }
@media (hover: hover) and (pointer: fine) { .vote-btn:hover { border-color: currentColor; } }
.vote-btn:active { transform: scale(.88); }
.vote-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .vote-btn.is-voted { animation: ni-bump 260ms cubic-bezier(.34, 1.56, .64, 1); }
}
/* O botão "Minha lista" nas linhas: largura fixa (a do "Na minha lista"), para a coluna
   não mudar de largura ao pôr ou tirar e os nomes não quebrarem; e o mortal flutua
   acima do botão, sem crescer a linha */
.row-actions .vp-save-row { position: relative; }
.row-actions .vp-save { min-width: 9.6em; justify-content: center; }
.row-actions .vp-flip { position: absolute; right: -8px; bottom: 55%; margin: 0; pointer-events: none; }
/* Até 960px (celular, tablet e janela estreita, onde as 6 colunas com o botão não
   cabem e a tabela ganharia rolagem para o lado): embalagem, preço por kg e selo de
   oferta descem para baixo do nome, e cada produto vira um bloco (nome e preço em
   cima, o botão "Minha lista" embaixo, numa linha só dele) */
@media (max-width: 960px) {
  .flyer-products .table--fold .fold { display: none; }
  .flyer-products .table--fold .fold-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px;
    font-size: .82rem; color: var(--ink-2);
  }
  .flyer-products .table--fold .fold-meta .v { white-space: normal; align-items: baseline; }
  .flyer-products table, .flyer-products thead, .flyer-products tbody { display: block; }
  .flyer-products tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; border-bottom: 1px solid var(--line); }
  .flyer-products thead tr { border-bottom: 2px solid var(--ink); }
  .flyer-products th, .flyer-products td { border-bottom: 0; }
  .flyer-products th:last-child { display: none; }
  .flyer-products td:last-child { grid-column: 1 / -1; width: auto; padding: 0 0 10px 10px; }
  .flyer-products .row-actions { justify-content: space-between; }
}
.has-add { display: inline-flex; align-items: center; gap: 5px; }
.has-add .ic { width: 1em; height: 1em; stroke-width: 2.8; margin-left: -2px; }
.ic-add > path:not(.ic-add-check) { transform-box: view-box; transform-origin: 12px 12px; }
.ic-add-check { opacity: 0; }
:disabled > .ic-add > path:not(.ic-add-check) { opacity: 0; }
:disabled > .ic-add > .ic-add-check { opacity: 1; }
.is-saved > .ic-add > path:not(.ic-add-check) { opacity: 0; }
.is-saved > .ic-add > .ic-add-check { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .is-added > .ic-add > path:not(.ic-add-check) { animation: ic-plus-out 180ms cubic-bezier(.55, 0, 1, .45) backwards; }
  .is-added > .ic-add > .ic-add-check { stroke-dasharray: 1; animation: ic-draw 260ms cubic-bezier(0, 0, .58, 1) 120ms backwards; }
}
@keyframes ic-plus-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: rotate(90deg) scale(.3); } }
@keyframes ni-bump { 0%, 100% { transform: none; } 50% { transform: scale(1.15); } }

/* Selo "+1" que cai na aba Minha lista (pingListTab no app.js): cai acelerando, achata ao
   bater, segura um instante e some; o ícone da aba dá um pulinho na hora do impacto */
.main-nav a { position: relative; }
.nav-ping {
  position: absolute; top: 8px; right: 2px; z-index: 1; pointer-events: none;
  padding: 3px 6px 2px; border-radius: 999px; background: var(--tag); color: var(--tag-ink);
  font: 800 .78rem/1 var(--f-display); letter-spacing: var(--track-sm); word-spacing: var(--word);
  animation: nav-ping 1.5s both;
}
@media (max-width: 820px) { .nav-ping { top: 5px; right: auto; left: calc(50% + 6px); } }
@keyframes nav-ping {
  0% { opacity: 0; transform: translateY(-16px); animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  17% { opacity: 1; transform: translateY(0) scale(1.12, .85); animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
  32% { transform: none; }
  80% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-4px); }
}
.main-nav a.is-pinged .nav-icon { animation: ni-bump 250ms cubic-bezier(.34, 1.56, .64, 1) 250ms; }
.row-go { font: 600 1.4rem/1 var(--f-body); color: var(--muted); transition: translate .15s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { tr.clickable:hover .row-go { translate: 3px 0; color: var(--ink); } }
/* Folga à direita: a setinha anda 3 px com o mouse e o mortal sai um pouco do botão */
.flyer-products td:last-child, .flyer-products th:last-child { width: 1%; white-space: nowrap; padding-right: 8px; }

/* Todos os encartes da rede, por mês */
/* Busca nos encartes da rede (nome, data, mês, ano) */
.flyer-search {
  width: 100%; max-width: 460px; margin: 0 0 12px; padding: 10px 14px; border: 1.5px solid var(--edge); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: 400 1rem/1.3 var(--f-body);
}
.flyer-search:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.flyer-search-count { margin: -4px 0 10px; }
.flyer-search-count[hidden] { display: none; }
.months { display: grid; gap: 10px; }
.month { border-top: 2px solid var(--ink); }
.month-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0 12px; cursor: pointer; list-style: none;
}
.month-head::-webkit-details-marker { display: none; }
.month-name { font: 800 1.5rem/1 var(--f-display); text-transform: uppercase; letter-spacing: var(--track); word-spacing: var(--word); }
.month-name::after { margin-left: 10px; width: 18px; height: 18px; color: var(--muted); vertical-align: -.05em; } /* ver "Abrir e fechar" */
.month-count { font: 500 .9rem/1 var(--f-body); color: var(--ink-2); }
.month .tickets { padding-bottom: 12px; }
.ticket.is-ended { opacity: .62; }
@media (hover: hover) and (pointer: fine) { .ticket.is-ended:hover { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  /* O carimbo da capa bate no papel quando a página abre; os tickets de cada mês
     entram um depois do outro */
  .fc-stamp { animation: stamp-hit .4s ease-out backwards .3s; }
  .reveal.is-in .month[open] .ticket { animation: rise .4s var(--ease-out) backwards; }
  .reveal.is-in .month[open] .ticket:nth-child(2) { animation-delay: 40ms; }
  .reveal.is-in .month[open] .ticket:nth-child(3) { animation-delay: 80ms; }
  .reveal.is-in .month[open] .ticket:nth-child(4) { animation-delay: 120ms; }
  .reveal.is-in .month[open] .ticket:nth-child(n+5) { animation-delay: 160ms; }
  .month[open] .tickets { animation: fade-in .25s ease; }
}
.flyer-head { display: grid; gap: 8px; padding-block: 14px 22px; }
.flyer-head .store-name { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.flyer-head .store-name::before { width: .36em; height: .36em; }
.flyer-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font: 700 1.3rem/1.25 var(--f-body); }
.flyer-period { font: 500 1.02rem/1.25 var(--f-body); color: var(--ink-2); }
.flyer-meta { color: var(--ink-2); }

/* ==========================================================================
   Textos
   ========================================================================== */
.note { color: var(--ink-2); font-size: .92rem; }
.muted { color: var(--muted); }
.empty { color: var(--ink-2); padding: 24px 0; }
.loading {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  color: var(--ink-2); padding-top: 56px; font-family: var(--f-body);
}

/* ==========================================================================
   Etiquetas animadas (animations/): laranja #FE7C00 com o "?" branco (paleta da
   especificação, 14/11/2026). Lê nos dois temas, então não há mais o invert do escuro.
   Quem pede menos movimento no sistema vê a etiqueta parada (regra no próprio SVG).
   ========================================================================== */
.mascot { display: block; height: auto; flex: none; }
.empty-state { display: grid; justify-items: center; text-align: center; padding: 24px 0 8px; }
.empty-state .empty { padding: 4px 0 0; }
.panel > .mascot { margin: -8px 0 2px -8px; }
/* Busca sem resultado: tudo centralizado, com a etiqueta grande em cima. A lista
   de dicas fica centralizada como bloco, mas com o texto alinhado à esquerda */
.panel--empty { margin-top: 22px; padding: 22px 20px 26px; text-align: center; }
.panel--empty > .mascot { margin: -10px auto 4px; }
.panel--empty .note { max-width: 90ch; margin-inline: auto; text-wrap: balance; }
/* Nada encontrado: buscas mais curtas em botões e uma dica, tudo centralizado */
.empty-tries { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 18px 0 0; }
.empty-tries-label { font: 600 .88rem/1 var(--f-body); color: var(--ink-2); }
.empty-tip { max-width: 64ch; text-wrap: balance; margin: 14px auto 0; font-size: .88rem; line-height: 1.45; color: var(--muted); }
/* Endereço que não existe */
.not-found { display: grid; justify-items: center; gap: 12px; text-align: center; padding-block: clamp(28px, 6vw, 64px) 24px; }
.not-found > .mascot { margin-bottom: -14px; }
.not-found p { color: var(--ink-2); max-width: 80ch; }
.not-found .btn { margin-top: 6px; text-decoration: none; }
.receipt > .mascot { margin: 0 auto -6px; }
/* Etiqueta antes do título, no tamanho da letra (em). O arquivo tem margem em volta
   da etiqueta: as margens negativas tiram essa sobra, para a etiqueta alinhar com a
   coluna do texto e não aumentar a altura da linha. */
.sign > .mascot {
  display: inline-block; width: 1.4em; vertical-align: -.05em;
  margin: -.3em .02em -.3em -.23em;
}
.error > .mascot { margin: -8px 0 0 -8px; }
.note-loading { display: flex; align-items: center; gap: 6px; }
/* Última do rodapé: a margem negativa tira a sobra transparente do arquivo, para a
   etiqueta encostar na mesma margem direita da página */
.footer-mark { display: block; width: 52px; height: auto; flex: none; margin: 0 -8px 0 -6px; }
.error { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-top: 32px; display: grid; gap: 10px; }
.warn { font-size: .92rem; border-left: 4px solid var(--warn); padding-left: 10px; }

@media (max-width: 720px) {
  .field select, .field input { min-width: 0; width: 100%; }
  .filters .field { flex: 1 1 100%; }
}

/* ==========================================================================
   Toque (dedo): alvos pequenos ganham área invisível de ~44px e campos de
   texto ficam com 16px (abaixo disso o iPhone dá zoom ao tocar no campo)
   ========================================================================== */
@media (pointer: coarse) {
  .r-remove, .r-more, .login-nudge-close { position: relative; }
  .info-btn::after, .r-remove::after, .r-more::after, .login-nudge-close::after { content: ""; position: absolute; inset: -10px; }
  .share-url { font-size: 16px; }
}

/* Paginação do histórico de atualizações */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.pager-pos { font: 600 .88rem/1 var(--f-body); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pager .btn[disabled] { opacity: .45; cursor: default; }

/* Ordem das categorias (Minha lista → Organizar) */
.order-list { list-style: none; margin: 4px 0 0; padding: 0 20px; }
.order-row { position: relative; display: grid; grid-template-columns: 1.6em minmax(0, 1fr) repeat(3, 40px); align-items: center; gap: 6px; min-height: 52px; border-bottom: 1px solid var(--line); }
.order-row:last-child { border-bottom: 0; }
/* A última favorita separa as favoritas das outras com uma linha mais forte */
.order-row.is-fav + .order-row:not(.is-fav) { border-top: 2px solid var(--ink-2); }
.order-pos { font: 600 .82rem/1 var(--f-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.order-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.order-label .n { color: var(--muted); font-weight: 500; }
.order-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border: 1.5px solid var(--edge); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: 700 1.1rem/1 var(--f-body); cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform var(--press) var(--ease-out);
}
.order-up { color: var(--good); }
.order-down { color: var(--high); }
.order-btn[disabled] { opacity: .25; cursor: default; }
@media (hover: hover) and (pointer: fine) { .order-btn:not([disabled]):hover { border-color: currentColor; } }
.order-btn:not([disabled]):active { transform: scale(.94); }
.order-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Estrela: vazia (contorno) ou preenchida no laranja da marca */
.star { width: 22px; height: 22px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linejoin: round; }
.star.is-filled { fill: var(--tag); stroke: var(--tag); }
.order-fav[aria-pressed="true"] { border-color: var(--tag); }
@media (prefers-reduced-motion: no-preference) {
  .order-fav .star { transition: transform 200ms cubic-bezier(.34, 1.56, .64, 1); }
  .order-fav:active .star { transform: scale(.8); }
}
/* "+1" / "−1" que sobe ao lado das setas */
.order-pop {
  position: absolute; right: -6px; top: 50%; pointer-events: none;
  font: 800 .9rem/1 var(--f-display); letter-spacing: var(--track-sm);
  animation: order-pop 800ms cubic-bezier(.22, 1, .36, 1) forwards;
}
.order-pop.is-up { color: var(--good); }
.order-pop.is-down { color: var(--high); }
@keyframes order-pop { from { opacity: 1; transform: translateY(-50%); } to { opacity: 0; transform: translateY(-160%); } }
@media (prefers-reduced-motion: reduce) { .order-pop { display: none; } }
.order-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0; padding: 0 20px 6px; font: 500 .84rem/1.4 var(--f-body); color: var(--muted); }
.order-legend span { display: inline-flex; align-items: center; gap: 4px; }
.order-legend .legend-star { width: 15px; height: 15px; fill: var(--tag); stroke: var(--tag); stroke-width: 1.8; }
.order-legend b { font-weight: 800; }
.order-legend .is-up { color: var(--good); }
.order-legend .is-down { color: var(--high); }
/* Favorita nos botões de categoria: estrelinha laranja antes do nome */
.chip-star { width: 14px; height: 14px; fill: var(--tag); stroke: var(--tag); stroke-width: 1.8; flex: none; margin-right: -2px; }

/* Esvaziar a lista / tirar os itens da categoria aberta: discreto, abaixo das ações */
.list-clear { margin: 14px 0 0; font: 500 .9rem/1.4 var(--f-body); }
.list-clear .link-button { color: var(--high); }
/* Aviso com "Desfazer" no pé da tela (acima das abas, no celular) */
.undo-toast {
  position: fixed; z-index: 20; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); display: flex; align-items: center; gap: 16px;
  width: max-content; max-width: calc(100vw - 32px); padding: 12px 14px 12px 18px; border-radius: 12px;
  background: var(--ink); color: var(--paper); box-shadow: 0 8px 24px var(--shadow);
  font: 500 .95rem/1.3 var(--f-body); transition: opacity .3s ease;
}
.undo-toast.is-leaving { opacity: 0; }
.undo-btn {
  flex: none; padding: 7px 12px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--tag); color: var(--tag-ink); font: 700 .9rem/1 var(--f-body);
}
.undo-btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
@media (max-width: 720px) { .undo-toast { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: no-preference) {
  .undo-toast { animation: undo-in 260ms cubic-bezier(.22, 1, .36, 1); }
}
@keyframes undo-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* Novidades da conta: o número na foto e a lista na gaveta "Sua conta" */
.account-btn { position: relative; }
/* Selo de novidades na foto da conta: vermelho com o número branco, fora do círculo,
   com um aro da cor da faixa que o separa da foto; entra com um pulinho */
.account-badge {
  position: absolute; top: -7px; right: -8px; z-index: 1; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; background: var(--high); color: #fff; box-shadow: 0 0 0 2.5px var(--band);
  font: 700 .74rem/1 var(--f-body); font-variant-numeric: tabular-nums; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .account-badge { animation: badge-in 420ms cubic-bezier(.34, 1.56, .64, 1) 300ms backwards; }
}
@keyframes badge-in { from { transform: scale(0); } }
.notes { display: grid; gap: 8px; }
.notes-title { font: 600 .78rem/1.2 var(--f-body); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.notes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.notes li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start;
  padding: 10px 10px 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: .92rem; line-height: 1.4;
}
.notes li.is-new { box-shadow: inset 3px 0 0 var(--tag); background: color-mix(in srgb, var(--tag) 12%, var(--surface)); }
.notes-date { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.notes-del { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.notes-del .ic { width: 14px; height: 14px; }
.notes-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); color: var(--ink-2); }
.notes-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notes-icon.is-correcao { color: var(--good); }
.notes-icon.is-lista { color: var(--tag); }
.notes-lead, .notes-date.is-block { display: block; }
.notes-items { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; gap: 4px; }
.notes .notes-items li { display: block; padding: 0; background: none; box-shadow: none; border-radius: 0; font-size: .9rem; }
.notes-items li::before { content: "·"; margin-right: 6px; color: var(--muted); }
.notes-items a, .notes-more { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 2px; }
.notes-when { color: var(--muted); white-space: nowrap; }
.notes-deal { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--good-bg); color: var(--good); font-size: .76rem; font-weight: 600; vertical-align: 1px; white-space: nowrap; }
.notes-more { display: inline-block; margin-top: 2px; font-size: .86rem; font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .notes-del:hover { background: var(--surface); color: var(--ink); } }
