* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* ivitra · Editorial Warm: creme quente, verde-petróleo de identidade, terracota para ação. Sem roxo.
   Fonte da verdade: docs/design/IVITRA_DESIGN_SYSTEM.md e docs/design/DESIGN_TOKENS.md. App só no tema claro. */
:root {
  /* Marca */
  --teal: #075F60;          /* brand.deepTeal: identidade, seleção contextual, links */
  --teal-hover: #054B4C;    /* petróleo pressionado/hover de chip ativo */
  --teal-light: #35B6A6;    /* brand.lightTeal: detalhe do símbolo, ilustração */
  --accent: #C4653D;        /* brand.terracotta: ícones e elementos de ação (3.7:1 no creme, só UI e ícone) */
  --accent-strong: #B4552E; /* terracota para fundo com texto branco (4.9:1, AA) */
  --accent-text: #AA4F2D;   /* terracota para texto sobre creme ou branco (5.1:1) */
  --accent-soft: #F3E3D6;   /* areia dos callouts */
  /* Superfícies e texto */
  --bg: #FAF7F2;
  --surface: #FFFCF8;       /* creme claro do mockup: formulários, sheets e menus (nunca branco puro) */
  --surface-2: #F1ECE6;
  --text: #242523;
  --muted: #6E6C68;
  --border: #E6DFD7;
  /* Papéis (nomes antigos mantidos para não quebrar componentes) */
  --brand: var(--teal);
  --brand-2: var(--teal);
  --violet: var(--teal-light);
  --pink: var(--accent);
  --accent-bright: var(--accent);
  --cta: var(--accent-strong);
  --cta-hover: #9C4627;
  --on-cta: #FFFFFF;
  --on-accent: #FFFFFF;
  --peach: #F2B08A;
  /* Semânticas */
  --sale: #B74F36;
  --deal-bg: #F8E6DF;
  --deal-text: #A4432C;
  --success: #237B62;
  --error: #B84040;
  --like: var(--accent);
  --ring: var(--teal);
  /* Elevação mínima: borda faz o trabalho; sombra só para o que flutua */
  --shadow-1: 0 1px 2px rgba(36, 37, 35, 0.04);
  --shadow-2: 0 12px 32px rgba(36, 37, 35, 0.12);
  --scrim: rgba(36, 37, 35, 0.42);
  /* Forma */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-field: 14px;
  --radius-banner: 20px;
  --radius-sheet: 24px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: Fraunces, Georgia, "Times New Roman", serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 64px;
  --brandrow-h: 56px;
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { line-height: 1.2; text-wrap: balance; letter-spacing: -0.02em; }
h1 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 700; }
h2 { margin: 0 0 12px; font-size: 1.25rem; font-weight: 700; }
h3 { margin: 24px 0 10px; font-size: 1rem; font-weight: 700; }
select, input, button, textarea { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
button:not(:disabled), a, label.chip { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 10px; }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--text); color: var(--bg); border-radius: 10px; }
.skip:focus { top: 12px; }

/* Cabeçalho: uma linha só. Em Buscar o logo fica ao lado do campo e tudo fica fixo no topo;
   nas outras abas não há campo (lupa leva ao Buscar) e a barra some ao rolar para baixo e volta ao subir. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  padding-top: env(safe-area-inset-top);
  transition: transform 0.22s var(--ease-out);
}
.topbar.is-hidden { transform: translateY(-100%); }
.topbar-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand actions";
  align-items: center;
  column-gap: 10px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: var(--brandrow-h);
}
.brand { grid-area: brand; justify-self: start; display: flex; align-items: center; height: var(--brandrow-h); padding: 0; border: 0; background: none; }
/* Assinatura ivitra: símbolo V + nome em Inter. Compacta; em Buscar no celular fica só o símbolo */
.brand { gap: 8px; color: var(--text); }
.brand-mark { display: block; width: 28px; height: 26px; flex: none; }
.brand-word { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.045em; line-height: 1; padding-bottom: 2px; }
.top-actions { grid-area: actions; display: flex; align-items: center; gap: 4px; height: var(--brandrow-h); }
.top-actions .icon-btn { color: var(--text); }
.search-form { grid-area: search; display: none; gap: 8px; min-width: 0; }
.search-field {
  flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--radius-field); background: var(--surface-2); color: var(--muted);
}
.search-field { transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.search-field:focus-within { outline: 2px solid var(--ring); outline-offset: 1px; background: var(--surface); border-color: var(--border); }
.search-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 1rem; color: var(--text); }
.search-submit { display: none; }
/* Buscar: [logo] [campo] [avisos] [perfil] numa linha fixa */
body[data-tab="explore"] .topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand search actions"; }
body[data-tab="explore"] .topbar.is-hidden { transform: none; }
body[data-tab="explore"] .search-form { display: flex; }
body[data-tab="explore"] .brand-word, body[data-tab="explore"] .top-search { display: none; }
@media (min-width: 900px) {
  .topbar-inner { padding: 8px 16px; column-gap: 24px; }
  .brand, .top-actions { height: 48px; }
  body[data-tab="explore"] .brand-word { display: block; }
  body[data-tab="explore"] .search-form { max-width: 720px; justify-self: center; width: 100%; }
  body[data-tab="explore"] .search-submit { display: block; }
}

/* Fica fora do fluxo: aparecer não empurra a página nem altera quem observa os blocos */
.header-cats {
  position: absolute; top: 100%; left: 0; right: 0; display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 16px 10px; background: color-mix(in srgb, var(--bg) 96%, transparent);
  box-shadow: 0 8px 12px -10px rgba(36, 37, 35, 0.25); scrollbar-width: none;
  /* Escondida: recolhida para dentro do cabeçalho. Sai mais rápido do que entra. */
  clip-path: inset(0 0 100% 0); opacity: 0; visibility: hidden;
  transition: clip-path 0.22s cubic-bezier(0.4, 0, 1, 1), opacity 0.18s ease-in, visibility 0s linear 0.22s;
}
/* Aparece desenrolando de cima para baixo (a margem negativa deixa a sombra à mostra) */
.header-cats.show {
  clip-path: inset(0 0 -24px 0); opacity: 1; visibility: visible;
  transition: clip-path 0.42s var(--ease-out), opacity 0.26s ease-out, visibility 0s;
}
.header-cats::-webkit-scrollbar { display: none; }
.header-cats .fchip { flex: none; opacity: 0; transform: translateY(-10px) scale(0.94); transition: transform 0.18s ease-in, opacity 0.14s ease-in; }
/* As pílulas descem em cascata, uns 30 ms uma depois da outra */
.header-cats.show .fchip {
  opacity: 1; transform: none;
  transition: transform 0.48s var(--ease-out), opacity 0.3s ease-out, background-color 0.15s ease, color 0.15s ease;
  transition-delay: calc(40ms + var(--i, 0) * 30ms);
}
.header-cats.show .fchip:active { transform: scale(0.96); transition-delay: 0s; }

/* Os blocos do Explorar se recolhem enquanto passam por baixo do cabeçalho, entregando a vez à faixa */
@supports (animation-timeline: view()) {
  #explore-tiles { animation: tiles-leave linear both; animation-timeline: view(block 64px 0px); animation-range: exit 0% exit 100%; }
  @keyframes tiles-leave { to { opacity: 0.15; transform: translateY(10px) scale(0.96); } }
}
@media (prefers-reduced-motion: reduce) {
  #explore-tiles { animation: none; }
  .header-cats, .header-cats.show { clip-path: none; }
  .header-cats .fchip { transform: none; }
}

/* Navegação inferior */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--nav-h); padding: 6px 2px; background: none; border: 0; color: var(--muted); font-size: 0.72rem; font-weight: 500; overflow: hidden;
}
.tab-dot { position: absolute; top: 8px; left: calc(50% + 6px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs button .ico { transition: transform 0.2s var(--ease-out); }
.tabs button.active { color: var(--teal); }
.tabs button.active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--teal); }
.tabs button.active .ico { stroke-width: 2; }
.tabs button:active .ico { transform: scale(0.88); }
.tabs button.bump .ico, .tabs button.active .ico { animation: nav-bounce 0.4s var(--ease-out); }
@keyframes nav-bounce { 0% { transform: scale(1); } 35% { transform: scale(1.25) translateY(-2px); } 70% { transform: scale(0.95); } 100% { transform: none; } }
@media (hover: hover) { .tabs button:hover { color: var(--text); } .tabs button:hover .ico { transform: translateY(-2px); } }
/* Troca de aba: o conteúdo entra de baixo, de leve */
main > section.tab { animation: tab-in 0.28s var(--ease-out) both; }
@keyframes tab-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) {
  .tabs { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); width: 520px; border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-2); padding-bottom: 0; overflow: hidden; }
  .tabs button { min-height: 58px; }
}

main { max-width: 1440px; margin: 0 auto; padding: 8px 16px calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); }
.muted { color: var(--muted); }
.section-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.section-title-row h2 { margin: 0; font-size: 1.15rem; }
.section-title-row .muted { font-size: 0.85rem; }

/* Descobrir: hero editorial em areia, título curto em Fraunces e um CTA */
.hero {
  position: relative; display: flex; align-items: center; gap: 12px; overflow: hidden; margin: 8px 0 16px; padding: 20px;
  border-radius: var(--radius-banner); background: var(--accent-soft); color: var(--text);
}
.hero-text { position: relative; z-index: 1; display: grid; justify-items: start; gap: 6px; flex: 1; min-width: 0; }
.hero h1 { margin: 0; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; max-width: 13em; }
.hero p { margin: 0; max-width: 30em; font-size: 0.9rem; color: var(--text); opacity: 0.8; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 8px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--cta); color: var(--on-cta); font-weight: 600; font-size: 0.92rem; transition: background-color 0.15s ease, transform 0.15s var(--ease-out);
}
.hero-cta .ico { width: 18px; height: 18px; }
.hero-cta:active { transform: scale(0.97); }
@media (hover: hover) { .hero-cta:hover { background: var(--cta-hover); } }
.hero-art { flex: none; width: min(34%, 190px); height: auto; max-height: 160px; margin: -8px -8px -8px 0; }
@media (max-width: 380px) { .hero-art { display: none; } }
@media (min-width: 900px) { .hero { padding: 32px 36px; } .hero h1 { font-size: 2.25rem; } .hero p { font-size: 1rem; } }
.chip-row, .sub-row, .collections { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 4px 16px 6px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-left: 16px; }
.chip-row::-webkit-scrollbar, .sub-row::-webkit-scrollbar, .collections::-webkit-scrollbar { display: none; }
.fchip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 0.88rem; font-weight: 500; scroll-snap-align: start;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s var(--ease-out);
}
.fchip .ico { width: 17px; height: 17px; }
.fchip:active { transform: scale(0.96); }
@media (hover: hover) {
  .fchip:hover { border-color: var(--text); }
  .fchip.on:hover, .fchip[aria-pressed="true"]:hover { background: var(--cta-hover); color: var(--on-cta); }
}
.fchip.on, .fchip[aria-pressed="true"] { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }

/* Banner editorial / coleção: cartão liso, só um toque da cor da coleção */
.banner {
  position: relative; display: flex; align-items: center; width: 100%; min-height: 96px; overflow: hidden; padding: 16px 18px; text-align: left;
  color: var(--text); border: 0; border-radius: var(--radius-banner);
  background: color-mix(in srgb, var(--g1) 14%, var(--bg)); scroll-snap-align: start;
  transition: transform 0.2s var(--ease-out), border-color 0.2s;
}
.banner:active { transform: scale(0.98); }
.banner-art, .banner-go .ico { transition: transform 0.3s var(--ease-out); }
@media (hover: hover) {
  .banner:hover { background: color-mix(in srgb, var(--g1) 20%, var(--bg)); }
  .banner:hover .banner-go .ico { transform: translateX(3px); }
}
.banner-text { position: relative; z-index: 1; display: grid; gap: 2px; max-width: 70%; }
.banner-text strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.banner-text span:not(.banner-go) { font-size: 0.82rem; font-weight: 400; color: var(--text); opacity: 0.78; }
.banner-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 14px; border-radius: 999px; background: var(--cta); justify-self: start; font-size: 0.8rem; font-weight: 600; color: var(--on-cta) !important; }
.banner-go .ico { width: 16px; height: 16px; }
.banner-art { position: absolute; right: -18px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; color: color-mix(in srgb, var(--g1) 70%, var(--text)); background: color-mix(in srgb, var(--g1) 30%, var(--bg)); }
.banner-art .ico { width: 34px; height: 34px; stroke-width: 1.5; margin-right: 18px; }
.banner-photo { position: absolute; inset: 0 0 0 auto; width: 48%; background-size: cover; background-position: center; -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); opacity: 0.9; }
.collections .banner { flex: none; width: min(280px, 82vw); min-height: 120px; }
.feed-banner { grid-column: 1 / -1; }
.feed-banner .banner { min-height: 104px; }

/* Explorar: grade de categorias */
.cat-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
/* Categoria em pílula compacta: ícone e nome lado a lado, cabe mais na tela do celular */
.cat-tile {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px 0 8px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 0.84rem; font-weight: 500; min-width: 0; transition: transform 0.15s var(--ease-out), border-color 0.2s;
}
.cat-tile .art { display: grid; place-items: center; width: 24px; height: 24px; color: var(--brand-2); }
.cat-tile .art .ico { width: 20px; height: 20px; stroke-width: 1.7; }
.cat-tile:active { transform: scale(0.96); }
@media (hover: hover) { .cat-tile:hover { border-color: var(--text); } }
.cat-tile > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-tile.more { background: var(--surface-2); }

/* Categoria aberta: título simples e contagem, sem banner (regra do kit); subcategorias em chips */
.cat-hero { display: grid; gap: 4px; margin: 4px 0 10px; padding: 0; color: var(--text); background: none; }
.cat-hero .cover, .cat-hero .art-bg { display: none; }
.cat-hero-text { display: grid; gap: 2px; }
.cat-hero-text h1 { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.cat-hero-text span { font-size: 0.88rem; font-weight: 400; color: var(--muted); }
.back-pill { position: static; justify-self: start; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; margin-left: -8px; padding: 0 12px 0 6px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 0.85rem; font-weight: 500; }
@media (hover: hover) { .back-pill:hover { color: var(--text); background: var(--surface-2); } }
.back-pill .ico { width: 16px; height: 16px; }
.sub-row { gap: 8px; }
.sub-item { flex: none; scroll-snap-align: start; white-space: nowrap; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 10px; }
.results-head h2 { margin: 0; font-size: 1.1rem; }
.search-tools { display: flex; gap: 8px; margin: 0 0 12px; }

/* Grade e cards de produto */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 860px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1400px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.grid > p.muted { grid-column: 1 / -1; }
.card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); animation: rise 0.35s var(--ease-out) both; transition: box-shadow 0.2s ease, transform 0.2s var(--ease-out); }
@media (hover: hover) { .card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); } }
.card.leaving { animation: leave 0.2s ease-in forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes leave { to { opacity: 0; transform: scale(0.96); } }
.media { position: relative; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.media-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; border-radius: 0; }
.media img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform 0.45s var(--ease-out); }
@media (hover: hover) { .card:hover .media img { transform: scale(1.05); } }
/* Entrada em cascata: os primeiros cards da grade chegam um depois do outro */
.grid > .card:nth-child(2) { animation-delay: 0.04s; } .grid > .card:nth-child(3) { animation-delay: 0.08s; } .grid > .card:nth-child(4) { animation-delay: 0.12s; }
.grid > .card:nth-child(5) { animation-delay: 0.16s; } .grid > .card:nth-child(6) { animation-delay: 0.2s; } .grid > .card:nth-child(7) { animation-delay: 0.24s; } .grid > .card:nth-child(8) { animation-delay: 0.28s; }
.noimg { display: grid; place-items: center; height: 100%; padding: 12px; background: linear-gradient(135deg, var(--surface-2), var(--border)); color: var(--muted); font-weight: 700; text-align: center; }
.icon-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s var(--ease-out); }
.icon-btn:active { transform: scale(0.88); }
@media (hover: hover) { .icon-btn:hover { background: var(--surface-2); color: var(--text); } }
/* Dispensar (X): único controle sobre a foto, canto superior direito. Círculo pequeno e translúcido,
   ícone de 14px; a área de toque continua 44×44 porque o botão é maior que o círculo desenhado. */
.media .act-hide { position: absolute; top: 0; right: 0; width: 44px; height: 44px; background: none; color: var(--text); border-radius: 50%; }
.media .act-hide::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.72); box-shadow: 0 0 0 0.5px rgba(36, 37, 35, 0.08); transition: background-color 0.15s ease; }
.media .act-hide .ico { position: relative; width: 14px; height: 14px; stroke-width: 2; }
@media (hover: hover) { .media .act-hide:hover { background: none; } .media .act-hide:hover::before { background: #fff; } }
@keyframes pop { 50% { transform: scale(1.3); } }
.sticker { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: var(--teal); font-size: 0.68rem; font-weight: 600; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sticker .ico { width: 12px; height: 12px; }
.sticker.exploring { color: var(--accent-text); }
.body { display: flex; flex-direction: column; gap: 3px; flex: 1; padding: 10px 12px 12px; }
.price-block { display: flex; flex-direction: column; min-width: 0; }
.price { font-size: 1.1rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.list-price { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.deal-off { padding: 1px 6px; border-radius: 6px; background: var(--deal-bg); color: var(--deal-text); font-weight: 600; }
.card h3 { margin: 0; font-size: 0.86rem; font-weight: 500; line-height: 1.3; letter-spacing: 0; color: var(--text); }
.title-btn { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 0; border: 0; background: none; text-align: left; font-weight: 500; line-height: 1.3; }
.store { margin: 0; font-size: 0.75rem; color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-proven { display: flex; align-items: center; gap: 4px; align-self: flex-start; margin: 2px 0 0; padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--deal-bg); font-size: 0.7rem; font-weight: 600; color: var(--deal-text); }
.deal-proven .ico { flex: none; width: 13px; height: 13px; }
.deal-note { margin: 0; font-size: 0.8rem; color: var(--muted); }
.reason { display: flex; align-items: center; gap: 5px; align-self: flex-start; max-width: 100%; margin: 0; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 0.78rem; font-weight: 500; line-height: 1.3; }
.reason .ico { width: 14px; height: 14px; color: var(--teal); }
.reason.exploring { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.reason.exploring .ico { color: var(--accent-text); }
.attrs { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.attr { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.72rem; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch { flex: none; width: 11px; height: 11px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--text) 30%, transparent); }
.buy { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 20px; border-radius: 999px; background: var(--cta); color: var(--on-cta); text-decoration: none; font-weight: 600; font-size: 1rem; transition: transform 0.15s var(--ease-out), background-color 0.15s ease; }
.buy .ico { width: 18px; height: 18px; }
.buy:active { transform: scale(0.98); }
@media (hover: hover) { .buy:hover { background: var(--cta-hover); } }
.skeleton { pointer-events: none; animation: none; }
.skeleton .media, .skeleton .line { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton .line { height: 12px; border-radius: 6px; }
.skeleton .line.short { width: 55%; }
.skeleton .body { gap: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.feed-more { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 1px; padding: 16px 0; }
.disclosure { color: var(--muted); font-size: 0.78rem; margin-top: 24px; }
.card-cta { display: none; }
@media (min-width: 1040px) and (hover: hover) {
  .card-cta { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; margin-top: 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-size: 0.85rem; font-weight: 500; text-decoration: none; }
  .card-cta .ico { width: 16px; height: 16px; }
  .card-cta:hover { border-color: var(--text); }
}

/* Detalhe do produto, com a barra de compra fixa embaixo */
.detail { width: 100%; max-width: 560px; height: 100%; max-height: 100%; margin: 0 auto; padding: 0; border: 0; background: var(--bg); color: var(--text); overflow: hidden; }
.detail[open] { display: flex; flex-direction: column; animation: sheet 0.3s var(--ease-out); }
.detail::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) { .detail { height: auto; max-height: calc(100% - 48px); margin-top: 24px; border-radius: 28px; box-shadow: var(--shadow-2); } }
.detail-bar { display: flex; align-items: center; padding: calc(6px + env(safe-area-inset-top)) 8px 6px; background: var(--bg); }
.detail-bar .icon-btn { color: var(--text); }
.detail-bar .spacer { flex: 1; }
.detail-actions { display: flex; }
.detail-body { overflow-y: auto; flex: 1; }
.detail-media { aspect-ratio: 1 / 1; max-height: 50vh; width: 100%; background: #fff; }
.detail-media[role="button"] { cursor: zoom-in; }
.detail-media[role="button"]:focus-visible { outline: 3px solid var(--ring); outline-offset: -3px; }
/* Foto em tela cheia */
.lightbox { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden; }
.lightbox::backdrop { background: #000; }
.lightbox-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; outline: 0; }
.lightbox-track::-webkit-scrollbar { display: none; }
.lightbox-slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; scroll-snap-align: center; scroll-snap-stop: always; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.lightbox-slide img { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pinch-zoom; }
.lightbox-slide.broken img { visibility: hidden; }
.lightbox-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; background: rgba(255, 255, 255, 0.14); color: #fff; }
.lightbox .gallery-count { top: calc(16px + env(safe-area-inset-top)); right: auto; left: 16px; }
.lightbox .gallery-arrow { background: rgba(255, 255, 255, 0.85); }

.detail-media img { width: 100%; height: 100%; object-fit: contain; padding: 16px; display: block; }
.detail-media.has-gallery { position: relative; }
.gallery-track {
  display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline: 3px solid var(--ring); outline-offset: -3px; }
.gallery-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.gallery-slide.broken { visibility: hidden; }
.gallery-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gallery-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(36, 37, 35, 0.22); }
.gallery-dot.on { background: var(--brand-2); }
.gallery-count {
  position: absolute; right: 12px; top: 12px; padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: rgba(36, 37, 35, 0.6); color: #fff;
}
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); display: none; place-items: center; width: 38px; height: 38px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--text); box-shadow: var(--shadow-1, 0 2px 8px rgba(0,0,0,.2));
}
.gallery-arrow.prev { left: 10px; }
.gallery-arrow.next { right: 10px; }
.gallery-arrow .ico { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .gallery-arrow { display: grid; } }
.detail-info { display: grid; gap: 12px; padding: 18px 18px 24px; background: var(--surface); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; margin-top: -18px; position: relative; }
.detail-info h2 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.detail-info h3 { margin: 8px 0 0; }
.detail-store { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.store-badge { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 600; font-size: 0.85rem; }
.detail-price { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.detail-info .reason { margin: 0; white-space: normal; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 0.9rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.detail-cta { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
.detail-more { display: grid; gap: 8px; padding: 0 0 8px; }
.detail-more .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Alertas e perfil */
.drop-list { display: grid; gap: 10px; }
.drop-item { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: left; width: 100%; }
.drop-item .thumb { width: 76px; height: 76px; border-radius: 12px; background: var(--media-bg) center / contain no-repeat; }
.drop-item strong { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.drop-item .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.85rem; font-weight: 700; }
.drop-item s { color: var(--muted); font-size: 0.78rem; }
.drop-item .ico { color: var(--success); }
.page-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.page-hero h1 { margin: 0; }
.count-pill { padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 0.82rem; font-weight: 600; }
/* Perfil: sem gradiente; avatar em teal suave e texto sobre o creme */
.profile-hero { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; padding: 4px 0; color: var(--text); background: none; }
.profile-hero .avatar { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--teal-light) 22%, var(--surface)); color: var(--teal); }
.profile-hero .avatar .ico { width: 28px; height: 28px; }
.profile-hero h1 { margin: 0; font-size: 1.35rem; font-weight: 700; }
.profile-hero p { margin: 2px 0 0; font-size: 0.88rem; color: var(--muted); }

/* Chips de interesse no perfil */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
label.chip:has(input:checked) { background: var(--teal); color: #fff; border-color: var(--teal); }
label.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.chip:focus-within { outline: 3px solid var(--ring); outline-offset: 2px; }
label.chip:has(input:checked)::before { content: "✓"; font-size: 0.85rem; }

button.primary, button.ghost {
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s var(--ease-out), background-color 0.15s ease;
}
button.primary { background: var(--cta); color: var(--on-cta); border: 0; }
button.primary:active, button.ghost:active { transform: scale(0.97); }
button.ghost { background: var(--surface); border: 1px solid var(--border); }
@media (hover: hover) {
  button.primary:hover:not(:disabled) { background: var(--cta-hover); }
  button.ghost:hover:not(:disabled) { border-color: var(--text); }
}
button.wide { width: 100%; min-height: 52px; font-size: 1rem; }
button:disabled { opacity: 0.5; cursor: default; }

/* Perfil */
.panel {
  display: grid;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.panel > label, .field-row > label, .prefs > label { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field-row, .prefs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.prefs { margin-bottom: 24px; }
.panel input, .panel select, .panel textarea, .prefs select, .target-actions select {
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-field);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 400;
  min-width: 0;
  width: 100%;
  font-size: 1rem;
}
.prefs select { background: var(--surface); }
.panel textarea { resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { color: var(--muted); font-size: 0.85rem; font-weight: 600; padding: 0; margin-bottom: 8px; }
.profile-layout { display: grid; gap: 20px; align-items: start; padding-top: 8px; }
@media (min-width: 900px) {
  .profile-layout { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 32px; }
}

.list { display: grid; gap: 8px; }
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.row-info { display: block; }
.row-info p { margin: 4px 0 0; font-size: 0.85rem; }
button.row-link { width: 100%; min-height: 48px; text-align: left; font-weight: 600; }
button.row-link::after { content: "›"; color: var(--muted); font-size: 1.3rem; }

.empty-state { display: grid; justify-items: center; gap: 4px; padding: 48px 16px; text-align: center; }
.empty-state p { margin: 0; max-width: 40ch; }
.empty-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
  border-radius: 22px;
  background: var(--surface-2);
  color: var(--teal);
}
.empty-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Admin */
.back { margin-bottom: 12px; }
.admin-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin-panel { margin-bottom: 0; align-content: start; }
.panel h3 { margin: 0; }
.error { color: var(--error); font-size: 0.85rem; overflow-wrap: anywhere; }
.big-number { font-size: 2rem; font-weight: 800; }
.row.target { align-items: flex-start; }
.target-info { display: grid; gap: 2px; min-width: 0; }
.target-url { color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.target-actions { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
.target-actions button { min-height: 40px; font-size: 0.85rem; padding: 6px 14px; }
.target-actions select { width: auto; min-height: 40px; font-size: 0.85rem; padding: 6px 10px; }
@media (max-width: 640px) { .row.target { flex-direction: column; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  z-index: 40;
  transform: translate(-50%, 12px);
  opacity: 0;
  visibility: hidden;
  background: var(--text);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-2);
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out), visibility 0.2s;
  max-width: calc(100% - 32px);
}
@media (min-width: 900px) { .toast { bottom: 96px; } }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

@media (max-width: 400px) {
  .field-row, .prefs { grid-template-columns: 1fr; }
  .body { padding: 8px 10px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Admin: cartões, indicadores e painel ao vivo */
.admin { padding-bottom: 120px; }
.admin-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { margin: 0; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 20px; display: grid; gap: 14px; align-content: start; min-width: 0; margin: 0; }
.admin-card > h2, .admin-card > h3, .section-title { margin: 0; font-size: 1.05rem; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-head .small { margin: 4px 0 0; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-actions button { min-height: 44px; }
.small { font-size: 0.85rem; }
.empty { margin: 0; color: var(--muted); }
.filter { width: 100%; }
#targets, #stores { display: grid; gap: 8px; max-height: 480px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.admin-cols { display: grid; gap: 20px; margin-top: 20px; }
.admin-main, .admin-side { display: grid; gap: 20px; align-content: start; min-width: 0; }
@media (min-width: 1024px) { .admin-cols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }
.admin > .admin-card { margin-top: 20px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; display: grid; gap: 2px; }
.kpi strong { font-size: 1.6rem; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 0.8rem; color: var(--muted); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); flex-shrink: 0; animation: live-pulse 2s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(12, 134, 104, 0.45); } 70% { box-shadow: 0 0 0 8px rgba(12, 134, 104, 0); } 100% { box-shadow: 0 0 0 0 rgba(12, 134, 104, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand-2); transition: width 0.4s var(--ease-out); }
.live-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .live-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); } }
.live-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--surface-2); display: grid; gap: 8px; min-width: 0; }
.live-head, .live-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; font-size: 0.9rem; }
.live-head strong, .live-row a { overflow-wrap: anywhere; }
.live-row a { color: var(--brand-2); }
.live-stage { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; color: var(--brand-2); }
.event-log { max-height: 180px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--border); padding-top: 6px; font-size: 0.8rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.event { display: flex; gap: 8px; padding: 2px 0; }
.event time { color: var(--muted); flex-shrink: 0; }
.event.warn { color: var(--accent); }
.event.error { color: var(--error); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat-grid .admin-card { padding: 16px; }
.store-group { border-bottom: 1px solid var(--border); padding: 6px 0; }
.store-group:last-child { border-bottom: 0; }
.store-group > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.store-group > .list { padding: 6px 0 4px; }
details.admin-card { display: block; }
details.admin-card[open] > form { margin-top: 14px; }
.admin-side details.admin-card > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; list-style: none; }
.admin-side details.admin-card > summary::-webkit-details-marker { display: none; }
.form-block { display: grid; gap: 12px; padding: 0; border: 0; box-shadow: none; background: none; }
.form-block h3 { margin: 8px 0 0; font-size: 0.95rem; }
@media (max-width: 640px) { .admin-card { padding: 16px; } .kpi strong { font-size: 1.3rem; } }

/* Admin: coleções e categorias */
.admin-form { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-form label { display: grid; gap: 4px; font-size: 0.8rem; font-weight: 700; color: var(--muted); min-width: 0; }
.admin-form label.wide { grid-column: 1 / -1; }
.admin-form input, .admin-form select { min-height: 42px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font-weight: 500; width: 100%; min-width: 0; }
.admin-form input[type="color"] { padding: 2px; }
.admin-form .check { display: flex; align-items: center; gap: 8px; }
.admin-form .check input { width: 20px; min-height: 20px; }
.admin-form .actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.admin-preview { max-width: 420px; }
.admin-preview .banner { min-height: 104px; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); text-align: left; width: 100%; }
.mini-row .art { width: 44px; height: 44px; flex: none; border-radius: 12px; overflow: hidden; background: var(--surface-2) center / cover; }
.mini-row .art svg { width: 100%; height: 100%; display: block; }
.mini-row .info { display: grid; min-width: 0; flex: 1; }
.mini-row .info strong, .mini-row .info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .info span { font-size: 0.78rem; color: var(--muted); }
.mini-row.off { opacity: 0.55; }
@media (max-width: 480px) { .admin-form { grid-template-columns: 1fr; } }

.detail-cta { display: flex; }
.detail-cta .buy { flex: 1; }
.empty-state h2 { margin: 0 0 4px; }
.empty-state .primary { margin-top: 14px; }
#cat-list, #col-list { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }

.results-head { scroll-margin-top: calc(var(--topbar-h, 120px) + 12px); }
#refine-chips { margin: 4px 0 8px; }
.sub-row { scroll-behavior: auto; }

.back-pill, .title-btn, .fchip { min-height: 44px; }
.header-cats .fchip { min-height: 40px; }

/* Curtir e lista: ícones discretos no rodapé do card, na linha da loja. Ganham cor só quando ligados. */
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; margin-top: auto; }
.card-foot .store { flex: 1; min-width: 0; }
.card-marks { display: flex; gap: 0; margin: -6px -8px -6px 0; }
.card-marks .icon-btn { width: 44px; height: 44px; color: var(--text); }
.card-marks .icon-btn .ico { width: 21px; height: 21px; stroke-width: 1.7; transition: transform 0.2s var(--ease-out); }
@media (hover: hover) {
  .card-marks .icon-btn:hover { background: var(--surface-2); }
  .card-marks .icon-btn:hover .ico { transform: scale(1.12); }
}
.act-like.on, .detail-actions .act-like.on { color: var(--like); opacity: 1; }
.act-save.on, .detail-actions .act-save.on { color: var(--teal); opacity: 1; }
.act-like.on .ico { fill: currentColor; animation: heart-pop 0.45s var(--ease-out); }
.act-save.on .ico { stroke-width: 2.3; animation: save-pop 0.4s var(--ease-out); }
@keyframes heart-pop { 0% { transform: scale(0.7); } 45% { transform: scale(1.35) rotate(-8deg); } 70% { transform: scale(0.92); } 100% { transform: none; } }
@keyframes save-pop { 0% { transform: translateY(4px) scale(0.8); } 50% { transform: translateY(-3px) scale(1.15); } 100% { transform: none; } }
/* Anel que se expande ao curtir */
.card-marks .act-like { position: relative; }
.card-marks .act-like.on::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 2px solid var(--like); opacity: 0; animation: like-ring 0.5s var(--ease-out); pointer-events: none; }
@keyframes like-ring { 0% { transform: scale(0.5); opacity: 0.7; } 100% { transform: scale(1.6); opacity: 0; } }

.brand-title { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
#brand-chips { margin-top: 0; }

/* Conta: entrar com link/código por e-mail */
.account { margin: 0 0 20px; max-width: 560px; }
.account h2 { margin: 0 0 4px; font-size: 1.1rem; }
.account p { margin: 0 0 12px; }
.account form { display: grid; gap: 12px; margin-bottom: 12px; }
.account form[hidden], .account [hidden] { display: none; }
.account #account-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.account #account-in h2 { margin: 0; overflow-wrap: anywhere; font-size: 1rem; }
/* Login social: Apple e Google com a mesma largura (até 320px) e altura (40px); a marca desenha o botão */
.account .social { display: grid; justify-items: center; gap: 12px; margin: 4px 0 8px; }
.account .social[hidden], .account .social [hidden] { display: none; }
.account .social-btn { display: flex; justify-content: center; width: 100%; max-width: 320px; min-height: 40px; }
.account .social-or { display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 0; }
.account .social-or::before, .account .social-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Aceite dos Termos e da Política: caixa com área de toque de 44px, links sublinhados */
.consent { display: flex; align-items: flex-start; gap: 12px; margin: 12px 0; font-size: 0.88rem; line-height: 1.45; color: var(--text); cursor: pointer; }
.consent input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--cta); }
.consent a, .legal-links a { color: var(--cta); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.consent { min-height: 44px; }
.social { position: relative; }
.social-guard { position: absolute; inset: 0; z-index: 3; border: 0; background: color-mix(in srgb, var(--bg) 55%, transparent); cursor: not-allowed; }
.social-guard[hidden] { display: none; }
.legal-links { margin: 16px 0 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ghost.danger { color: var(--error); border-color: color-mix(in srgb, var(--error) 40%, transparent); }
body.admin-page main { padding-bottom: 80px; }

/* Admin: menu lateral e seções */
.admin-shell { display: grid; gap: 16px; max-width: 1400px; margin: 0 auto; padding: 12px 16px 80px; }
.admin-nav { display: grid; gap: 10px; align-content: start; }
.admin-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-brand h1 { margin: 0; font-size: 1.25rem; }
#admin-menu { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
#admin-menu a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: 0.9rem; text-decoration: none; white-space: nowrap; }
#admin-menu a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.admin-content { min-width: 0; }
.admin-view { display: grid; gap: 16px; align-content: start; }
.admin-view[hidden] { display: none; }
.view-title { margin: 4px 0 0; font-size: 1.3rem; }
.view-cols { display: grid; gap: 16px; align-items: start; }
.admin-view .kpis { margin: 0; }
#runs, #col-list, #cat-list, #weights { max-height: 420px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
#targets, #stores { max-height: 65vh; }
@media (min-width: 900px) {
  .admin-shell { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding-top: 24px; }
  .admin-nav { position: sticky; top: 16px; align-self: start; gap: 16px; }
  #admin-menu { flex-direction: column; overflow: visible; }
  #admin-menu a { border-radius: 12px; padding: 0 14px; }
  .view-cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}
.view-cols > *, .form-block, .form-block label { min-width: 0; }
.form-block textarea, .form-block input, .form-block select { width: 100%; box-sizing: border-box; max-width: 100%; }
.stat-grid .list { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }

.variants { margin: 2px 0 0; font-size: 0.72rem; font-weight: 600; color: var(--muted, var(--muted)); }
.new-badge { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }

/* Avisos (Web Push) */
.push-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; margin: 0 0 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.push-card p { margin: 0; }

/* Pastas dos salvos */
.folder-row { margin-bottom: 8px; }
.folder-chip { flex: none; }
.folder-chip .ico { width: 16px; height: 16px; }
.folder-chip-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-chip-count { font-size: 0.78rem; font-weight: 700; opacity: 0.7; }
.folder-chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.folder-new { border-style: dashed; color: var(--brand-2); }
/* Arrastar produto salvo para uma pasta */
#saved .card { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#saved .card[data-offer] img { -webkit-user-drag: none; }
body.is-dragging-saved { cursor: grabbing; overscroll-behavior: contain; }
.drag-source { opacity: 0.35; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 60; margin: 0; pointer-events: none; animation: none;
  box-shadow: 0 18px 40px rgba(36, 37, 35, 0.3); opacity: 0.95; }
.folder-row.lifted { position: fixed; top: 0; left: 0; right: 0; z-index: 50; margin: 0; box-sizing: border-box;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(36, 37, 35, 0.14); }
.folder-chip.drop-over { background: var(--teal); border-color: var(--teal); color: #fff; transform: scale(1.08); }
.folder-tools { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 8px; }
.folder-tools[hidden], .folder-row[hidden] { display: none; }
.folder-tool { color: var(--muted); }
.act-folder[hidden] { display: none; }
.folder-dialog { width: min(420px, calc(100% - 32px)); max-height: min(80dvh, 560px); padding: 20px; border: 0; border-radius: var(--radius-sheet); background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); }
.folder-dialog::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }
.folder-dialog h2 { margin: 0 0 12px; font-size: 1.15rem; overflow-wrap: anywhere; }
.folder-options { display: grid; gap: 4px; max-height: 44dvh; overflow-y: auto; }
.folder-option { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-weight: 600; text-align: left; }
.folder-option span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.folder-option .ico { flex: none; width: 20px; height: 20px; }
.folder-option[aria-pressed="true"] { background: var(--surface-2); color: var(--teal); }
@media (hover: hover) { .folder-option:hover { background: var(--surface-2); } }
.folder-form { display: grid; gap: 8px; }
.folder-form label { font-size: 0.9rem; font-weight: 600; }
.folder-form input { width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-field); background: var(--surface-2); color: var(--text); font: inherit; font-size: 1rem; }
.folder-error { margin: 0; color: var(--error); font-size: 0.9rem; }
.folder-error[hidden] { display: none; }
.folder-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; }
.folder-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.folder-actions .ico { width: 18px; height: 18px; }
.folder-actions .danger { background: var(--error); border-color: var(--error); color: #fff; }
.toast-action { flex: none; margin-left: 12px; padding: 4px 8px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; pointer-events: auto; }

.push-opt { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 14px; }
.push-opt input { width: 20px; height: 20px; accent-color: var(--teal); flex: none; }

/* Cupons */
.coupon-line { display: flex; align-items: center; gap: 4px; margin: 4px 0 0; font-size: 0.74rem; font-weight: 600; color: var(--teal); }
.coupon-line .ico, .coupon-line svg { width: 14px; height: 14px; }
.detail-history:empty { display: none; }
.history-chart { display: block; width: 100%; height: auto; margin: 4px 0; color: var(--brand-2); }
.coupon-box { display: grid; gap: 4px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.coupon-go { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 44px; font-weight: 700; color: var(--brand-2); text-decoration: none; }
.coupon-go code { border: 1px dashed currentColor; border-radius: 6px; padding: 2px 8px; overflow-wrap: anywhere; }
.coupons-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; color: var(--brand-2); }

/* Voltar ao topo e puxar para atualizar */
html { overscroll-behavior-y: contain; }
.to-top {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 25;
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); animation: tab-in 0.2s var(--ease-out) both;
}
.to-top[hidden] { display: none; }
.to-top:active { transform: scale(0.9); }
@media (min-width: 900px) { .to-top { bottom: 96px; right: 24px; } }
.ptr {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 56px); z-index: 22; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 0.8rem; font-weight: 700;
  box-shadow: var(--shadow-2); transform: translate(-50%, calc(var(--pull, 0px) - 40px)); pointer-events: none;
}
.ptr[hidden] { display: none; }
.ptr.settling { transition: transform 0.2s var(--ease-out); }
.ptr-spin { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--brand-2); border-radius: 50%; }
.ptr[data-state="busy"] .ptr-spin { animation: ptr-turn 0.7s linear infinite; }
.ptr[data-state="ready"] .ptr-spin { border-top-color: var(--accent); }
@keyframes ptr-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ptr[data-state="busy"] .ptr-spin { animation-duration: 2s; } .to-top { animation: none; } }

/* Lojas: faixa em Buscar e botão Seguir no detalhe */
.stores-line { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.stores-label { flex: none; font-size: 0.85rem; font-weight: 800; color: var(--muted, var(--muted)); }
.store-row { flex: 1; display: flex; gap: 6px; min-width: 0; overflow-x: auto; margin-right: -16px; padding: 2px 16px 2px 0; scrollbar-width: none; }
.store-row::-webkit-scrollbar { display: none; }
.store-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 5px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.82rem; font-weight: 700; white-space: nowrap;
}
.store-chip.on { border-color: var(--brand-2); }
.store-chip.more { padding: 0 8px 0 12px; color: var(--brand-2); border-style: dashed; }
.store-chip .store-badge { width: 24px; height: 24px; font-size: 0.72rem; }
.store-chip .ico { width: 16px; height: 16px; }

.stores-dialog {
  width: min(520px, 100%); height: min(88dvh, 720px); max-height: 100dvh; padding: 0; border: 0; border-radius: 20px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); overflow: hidden;
}
.stores-dialog[open] { display: flex; flex-direction: column; }
.stores-dialog::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }
@media (max-width: 600px) {
  .stores-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
}
.stores-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; padding-top: max(14px, env(safe-area-inset-top)); }
.stores-head h2 { margin: 0; font-size: 1.2rem; }
.stores-search {
  margin: 6px 16px 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 1rem;
}
.stores-search:focus { outline: 3px solid var(--ring); outline-offset: 1px; }
.stores-body { flex: 1; overflow-y: auto; padding: 0 16px 16px; }
.stores-section { margin: 14px 0 4px; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted, var(--muted)); }
.stores-empty { padding: 24px 0; text-align: center; color: var(--muted, var(--muted)); }
.store-item { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.store-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.store-meta { display: grid; min-width: 0; }
.store-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-meta small { color: var(--muted, var(--muted)); }
.store-item .follow-btn { margin-left: 0; flex: none; }
.detail-store { display: flex; align-items: center; gap: 8px; }
.follow-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--brand-2); background: none; color: var(--brand-2); font-weight: 700; font-size: 0.85rem;
}
.follow-btn .ico { width: 16px; height: 16px; }
.follow-btn.on { background: var(--brand-2); color: #fff; }

/* Filtros: barra em uma linha e folha de filtros */
.filter-bar {
  position: sticky; top: var(--topbar-h, 64px); z-index: 15; display: flex; gap: 8px; align-items: center; overflow-x: auto;
  margin: 0 -16px 10px; padding: 8px 16px; scrollbar-width: none;
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar[hidden] { display: none; }
.fb-main, .fb-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 500; white-space: nowrap;
}
.fb-main { border-color: var(--text); color: var(--text); }
.fb-main.on { background: var(--text); border-color: var(--text); color: #fff; }
.fb-badge { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent-strong); color: #fff; font-size: 0.72rem; font-weight: 600; }
.fb-chip.on { border-color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 12%, var(--surface)); color: var(--brand-2); }
.fb-chip .ico, .fb-main .ico { width: 16px; height: 16px; }
.fb-caret { display: inline-grid; transform: rotate(90deg); }

.sheet {
  width: min(560px, 100%); max-height: 92dvh; padding: 0; border: 0; border-radius: var(--radius-sheet); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-2); overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in 0.28s var(--ease-out); }
.sheet::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) { .sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
.sheet-handle { align-self: center; width: 40px; height: 4px; margin: 8px 0 0; border-radius: 4px; background: var(--border); flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 4px; flex: none; }
.sheet-head h2 { margin: 0; font-size: 1.2rem; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 20px 16px; overscroll-behavior: contain; }
.sheet-sm { max-height: 60dvh; }
.sheet-sec { padding: 14px 0; border-bottom: 1px solid var(--border); }
.sheet-sec:last-child { border-bottom: 0; }
.sheet-sec h3 { margin: 0 0 10px; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted, var(--muted)); }
.sheet-foot { display: flex; gap: 10px; padding: 12px 20px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); flex: none; }
.sheet-foot .ghost { flex: none; min-height: 48px; }
.sheet-apply { flex: 1; min-height: 48px; border-radius: 999px; font-weight: 600; }
.sheet-apply:disabled { opacity: 0.5; }

.opt-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.opt-row.wrap { flex-wrap: wrap; overflow: visible; }
.opt {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 600; white-space: nowrap;
}
.opt small { color: var(--muted, var(--muted)); font-weight: 700; font-variant-numeric: tabular-nums; }
.opt.on { border-color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 12%, var(--surface)); color: var(--brand-2); font-weight: 800; }
.opt.on small { color: inherit; }

.sheet-search {
  width: 100%; min-height: 44px; margin-bottom: 10px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 1rem;
}
.sheet-search:focus { outline: 3px solid var(--ring); outline-offset: 1px; }
.opt svg { width: 14px; height: 14px; }
.link-btn { margin-top: 10px; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--brand-2); font: inherit; font-weight: 700; }

.switch-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.switch-text { flex: 1; display: grid; gap: 2px; }
.switch-text small, .switch-count { color: var(--muted, var(--muted)); font-size: 0.8rem; }
.switch { position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--border); transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform 0.2s var(--ease-out); }
.switch-row.on .switch { background: var(--brand-2); }
.switch-row.on .switch::after { transform: translateX(20px); }

.hist { display: flex; align-items: flex-end; gap: 3px; height: 56px; }
.hist-bar { flex: 1; border-radius: 3px 3px 0 0; background: var(--border); transition: background 0.15s; }
.hist-bar.in { background: color-mix(in srgb, var(--brand-2) 55%, var(--surface)); }
/* Faixa de preço: a área de toque é a faixa inteira (48px de altura); o toque leva o polegar mais próximo */
.dual { position: relative; height: 48px; margin: 2px 0 0; touch-action: none; cursor: pointer; }
.dual-track { position: absolute; left: 14px; right: 14px; top: 22px; height: 4px; border-radius: 4px; background: var(--border); pointer-events: none; }
.dual-fill { position: absolute; top: 22px; height: 4px; border-radius: 4px; background: var(--teal); pointer-events: none; }
.dual input[type="range"] { position: absolute; inset: 0; width: 100%; height: 48px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual input[type="range"]::-webkit-slider-runnable-track { background: none; height: 48px; }
.dual input[type="range"]::-moz-range-track { background: none; }
.dual input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: 10px; border-radius: 50%;
  background: #fff; border: 3px solid var(--teal); box-shadow: var(--shadow-1); cursor: grab;
}
.dual input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); }
.dual input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid color-mix(in srgb, var(--teal) 35%, transparent); outline-offset: 2px; }
.dual.dragging input[type="range"]::-webkit-slider-thumb { cursor: grabbing; }
.price-label { display: block; margin: 4px 0 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sort-opt { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--border); background: none; color: inherit; font: inherit; font-weight: 600; text-align: left; }
.sort-opt.on { color: var(--brand-2); font-weight: 800; }
.sort-opt .ico { width: 20px; height: 20px; }

.saved-tools { display: grid; gap: 8px; margin: 0 0 12px; }
.saved-search {
  min-height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius-field); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 1rem;
}
.saved-search:focus { outline: 3px solid var(--ring); outline-offset: 1px; }
.saved-sorts { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.saved-sorts::-webkit-scrollbar { display: none; }
.sheet-handle { touch-action: none; padding: 0; cursor: grab; }
.sheet-head { touch-action: none; }
.sheet.dragging { transition: none; animation: none; }

/* Salvos: itens | lojas */
.seg-row { display: flex; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 999px; background: var(--surface-2); }
.seg { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-weight: 600; }
.seg.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(36, 37, 35, 0.1); }
.saved-stores { display: grid; gap: 8px; }
.card .store.following { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-2); font-weight: 700; }
.card .store.following svg { width: 12px; height: 12px; }

.sheet-body-pad { padding-bottom: max(20px, env(safe-area-inset-bottom)); display: grid; gap: 12px; align-content: start; }

/* Página da loja e atalho a partir do detalhe */
.store-page-head { padding: 4px 0 10px; }
#store-head .back-pill { position: static; margin: 4px 0 6px; border: 1px solid var(--brand-2); background: none; color: var(--brand-2); }
.store-page-head .store-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#store-page .sub-row { margin-bottom: 8px; }
.chip-count { margin-left: 6px; opacity: 0.65; font-size: 0.78em; }

/* Nome da loja como link, no card e no detalhe */
.store-link { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-link:hover, .store-link:focus-visible { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }
.store-link .ico { width: 14px; height: 14px; flex: none; }
.detail-store-name { font-weight: 800; font-size: 1rem; color: var(--text); }

/* Perfil: lojas bloqueadas e produtos ocultados */
.manage { display: grid; gap: 4px; }
.manage h2 { margin: 0 0 4px; font-size: 1.05rem; }
.manage-row {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--border);
  background: none; color: inherit; font: inherit; font-weight: 600; text-align: left;
}
.manage-row:last-child { border-bottom: 0; }
.manage-row .ico { width: 20px; height: 20px; color: var(--brand-2); }
.manage-row .grow { flex: 1; }
.manage-row small { color: var(--muted, var(--muted)); font-weight: 500; }
.hidden-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.hidden-thumb { flex: none; width: 56px; height: 56px; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; }
.hidden-meta { flex: 1; min-width: 0; display: grid; }
.hidden-meta strong { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hidden-meta small { color: var(--muted, var(--muted)); }
.store-page-head .block-btn { margin-left: 0; }
.stores-search.inline { margin: 0 0 10px; width: 100%; box-sizing: border-box; }

/* O que a loja publica sobre o produto, no detalhe */
.detail-installments { margin: -4px 0 8px; color: var(--muted); font-size: 0.9rem; }
.detail-notes { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; font-size: 0.88rem; color: var(--muted); }
.detail-variants { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.detail-variants li { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border: 1px solid var(--line, rgba(127,127,127,.3)); border-radius: 999px; font-size: 0.88rem; }
.detail-variants li.out { opacity: 0.55; }
.detail-variants em { font-style: normal; font-size: 0.75rem; color: var(--muted); }
.variant-price { font-weight: 700; }
.detail-description { white-space: pre-line; margin: 0 0 4px; font-size: 0.92rem; line-height: 1.5; }
.detail-description.clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.linklike { background: none; border: 0; padding: 4px 0; color: var(--brand, inherit); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.detail-badges { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.detail-badges li { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: 0.78rem; font-weight: 600; }

/* Perfil compacto (Premium Playful): topo, resumo em 4 atalhos e opções em linhas que abrem no lugar */
.profile-hero { margin-bottom: 12px; }
.profile-hero .avatar { width: 48px; height: 48px; }
.profile-hero .avatar-initial { font-size: 1.3rem; }
.profile-hero p { overflow-wrap: anywhere; }
.profile-grid { display: grid; gap: 12px; align-items: start; }
.profile-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.profile-stats .stat { display: grid; justify-items: center; gap: 2px; min-height: 76px; padding: 10px 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; }
.profile-stats .stat .ico { width: 22px; height: 22px; color: var(--brand-2); }
.profile-stats .stat b { font-size: 1.15rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.profile-stats .stat span { font-size: 0.68rem; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
.profile-grid .panel { margin: 0; padding: 16px; border-radius: var(--radius); }
.account #account-in { display: grid; gap: 8px; }
.account-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-list { padding: 4px 16px 12px; gap: 0; }
.pf-opt { border-bottom: 1px solid var(--border); }
.pf-opt summary { display: flex; align-items: center; gap: 12px; min-height: 60px; cursor: pointer; list-style: none; }
.pf-opt summary::-webkit-details-marker { display: none; }
.pf-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); color: var(--brand-2); }
.pf-ico .ico { width: 20px; height: 20px; }
.pf-text { flex: 1; min-width: 0; display: grid; }
.pf-text strong { font-size: 0.98rem; font-weight: 600; }
.pf-text small { color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.pf-opt .chev { width: 18px; height: 18px; color: var(--muted); transition: transform 0.2s var(--ease-out); }
.pf-opt[open] .chev { transform: rotate(90deg); }
.pf-body { display: grid; gap: 12px; padding: 4px 0 16px; }
.profile-list .legal-links { margin: 12px 0 0; }
@media (min-width: 900px) {
  .profile-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "account stats" "account list"; gap: 16px; }
  .profile-grid #account { grid-area: account; max-width: none; }
  .profile-grid .profile-stats { grid-area: stats; }
  .profile-grid .profile-list { grid-area: list; }
}
.profile-grid { grid-template-columns: minmax(0, 1fr); }
.profile-grid > * { min-width: 0; }
.pf-opt summary { border: 0; background: none; border-radius: 0; box-shadow: none; padding: 0; }
@media (min-width: 900px) { .profile-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.pf-body .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pf-body .prefs, .prefs.pf-body { margin-bottom: 0; }

/* Desktop largo: a navegação sobe para o cabeçalho e a barra inferior some */
@media (min-width: 1024px) {
  .topbar.is-hidden { transform: none; }
  .tabs {
    top: 0; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); width: auto; height: 64px; z-index: 30;
    display: flex; gap: 4px; align-items: center; border: 0; border-radius: 0; box-shadow: none; background: transparent; backdrop-filter: none; overflow: visible; padding: 0;
  }
  .tabs button { flex-direction: row; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 0.9rem; overflow: visible; }
  .tabs button.active { background: var(--surface-2); color: var(--teal); }
  .tabs button.active::before { display: none; }
  .tab-dot { top: 6px; left: auto; right: 10px; }
  /* As abas ficam fixas no alto (64 px) por cima do cabeçalho: a linha da busca começa abaixo delas */
  body[data-tab="explore"] .topbar-inner { grid-template-columns: 1fr auto; grid-template-areas: "brand actions" "search search"; row-gap: 12px; padding-bottom: 14px; }
  main { padding-bottom: 48px; }
  .to-top { bottom: 24px; }
}

/* Camada ivitra: ajustes finais dos componentes centrais (card, cabeçalho, loja) */
.card { border-radius: var(--radius); border-color: var(--border); box-shadow: none; }
@media (hover: hover) { .card:hover { box-shadow: var(--shadow-2); transform: none; } }
@media (hover: hover) { .card:hover .media img { transform: scale(1.03); } }
.body { gap: 2px; padding: 10px 12px 6px; }
/* Ordem dos mockups: nome (2 linhas) → loja → preço com selo de desconto → rodapé com ícones à direita */
.card .price-block { margin-top: 4px; }
.card-foot { justify-content: flex-end; margin: auto -8px 0 0; padding-top: 2px; }
.card-marks { margin: 0; gap: 0; }
@media (min-width: 1024px) {
  .top-alerts, .top-profile { display: none; }
}

.store-page-head { gap: 12px; padding: 8px 0 12px; }
.store-page-head .store-meta strong { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.store-page-head .store-meta small { color: var(--muted); font-weight: 400; }
#store-head .back-pill { border: 0; background: none; color: var(--muted); }
.follow-btn { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.follow-btn.on { background: var(--teal); color: #fff; }
/* Nome no máximo 2 linhas: o clamp em <button> deixa a 3ª linha vazar alguns pixels sem o corte da altura */
.card h3 { overflow: hidden; max-height: 2.6em; line-height: 1.3; }
/* Seletor de listas: "Remover dos salvos" é ação secundária, em texto, à esquerda */
.folder-actions .ghost.danger { margin-right: auto; padding-left: 4px; border-color: transparent; background: none; color: var(--error); }

/* Mockups ivitra: foto sem moldura, chips em areia, cabeçalho de categoria compacto */
:root { --media-bg: #F4F0EA; }
/* A foto ocupa o quadro todo, sem respiro branco: nada de faixa nas laterais nem retângulo "solto".
   multiply funde o fundo branco/cinza claro da loja com a areia; fitPhoto() escolhe cover ou contain. */
.media, .detail-media { background: var(--media-bg); }
.media img { padding: 0; object-fit: cover; mix-blend-mode: multiply; }
.media img.fit-contain { object-fit: contain; }
/* Retrato/paisagem: o quadro ganha a cor da borda da foto (fitPhoto), então a foto entra sem multiply */
:is(.media, .detail-media, .gallery-slide).has-edge img { mix-blend-mode: normal; }
/* No detalhe o produto aparece sempre inteiro */
.detail-media img { padding: 0; object-fit: contain; mix-blend-mode: multiply; }
.card { border-color: transparent; box-shadow: 0 0 0 1px rgba(36, 37, 35, 0.05), 0 1px 3px rgba(36, 37, 35, 0.05); }
.body { padding: 10px 12px 6px; }
.card h3 { font-size: 0.88rem; font-weight: 600; }
/* O botão centraliza o texto na altura mínima de toque; nome de 1 linha ficava descolado do topo (a foto também abre o produto) */
.card .title-btn { min-height: 0; }
.card .store { margin: 2px 0 0; font-weight: 400; }
.price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.price-row .deal-off { padding: 2px 8px; border-radius: 999px; font-size: 0.74rem; }
.card .list-price { font-size: 0.7rem; }

/* Chips em areia, sem borda; o ativo é petróleo (seleção, como no mockup) */
.fchip, .fb-chip, .fb-main { border-color: transparent; background: var(--surface-2); color: var(--text); }
@media (hover: hover) {
  .fchip:hover, .fb-chip:hover, .fb-main:hover { border-color: transparent; background: color-mix(in srgb, var(--text) 8%, var(--surface-2)); }
}
.fb-main.on { background: var(--surface-2); color: var(--text); }
.fb-chip.on { border-color: transparent; background: color-mix(in srgb, var(--teal) 14%, var(--surface)); color: var(--teal); }

/* Categoria: [←] título e contagem [filtros] numa linha */
.cat-hero { display: flex; align-items: center; gap: 2px; margin: 0 -10px 6px; }
.cat-back { color: var(--text); }
.cat-hero-text { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.cat-hero-text h1 { min-width: 0; font-size: 1.45rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-hero-text span { flex: none; font-size: 0.8rem; }
.cat-filters { position: relative; color: var(--teal); }
.cat-filters .fb-badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; font-size: 0.68rem; }
#explore-cat:not([hidden]) ~ .results-head { display: none; }

/* Cabeçalho: assinatura um pouco maior e perfil como avatar redondo */
.brand-mark { width: 32px; height: 30px; }
.brand-word { font-size: 1.5rem; }
.top-profile { color: var(--teal); background: radial-gradient(circle, color-mix(in srgb, var(--teal-light) 24%, var(--surface)) 0 18px, transparent 19px); }
@media (hover: hover) { .top-profile:hover { color: var(--teal); background: radial-gradient(circle, color-mix(in srgb, var(--teal-light) 36%, var(--surface)) 0 18px, transparent 19px); } }

/* Callout: o círculo decorativo fica inteiro dentro do cartão, sem ser cortado na borda */
.banner-art { right: 14px; width: 88px; height: 88px; }
.banner-art .ico { margin-right: 0; }

/* Mockup "Descobrir" (tela do celular aprovada): card creme sem branco, foto 4:3, X à esquerda,
   ícones na linha do preço, chips com contorno, busca fixa no Descobrir e barra inferior creme */
.topbar { background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom-color: transparent; }

/* Chips: contorno fino sobre o creme; o ativo é petróleo cheio. No mockup a seleção (categoria, "Todos",
   "Itens") é sempre petróleo; terracota fica para ação (Ver na loja, Explorar) e para o coração. */
.fchip { min-height: 36px; padding: 0 16px; border: 1px solid var(--border); background: var(--bg); font-size: 0.86rem; }
#discover-chips .fchip .ico { display: none; }
@media (hover: hover) { .fchip:hover { border-color: color-mix(in srgb, var(--text) 18%, var(--border)); background: var(--bg); } }
.fchip.on, .fchip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
@media (hover: hover) { .fchip.on:hover, .fchip[aria-pressed="true"]:hover { background: var(--teal-hover); border-color: var(--teal-hover); color: #fff; } }
/* Seletor de duas opções (Itens / Lojas): a opção marcada é petróleo, a outra fica na areia */
.seg.on { background: var(--teal); color: #fff; box-shadow: none; }

/* Card: o corpo é do mesmo creme da página; quem separa o card é a sombra suave */
.card { background: var(--bg); border-color: transparent; border-radius: 14px;
  box-shadow: 0 1px 2px rgba(74, 52, 32, 0.06), 0 6px 16px -6px rgba(74, 52, 32, 0.14); }
.media { aspect-ratio: 4 / 3; }
.media .act-hide { left: 0; right: auto; }
/* X sem fundo, para não cobrir a foto; um halo branco no traço mantém o X legível sobre foto escura */
.media .act-hide::before { display: none; }
.media .act-hide .ico { width: 16px; height: 16px; stroke-width: 2.2; color: var(--text); filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.7)); }
.new-badge { left: auto; right: 8px; }
.body { gap: 2px; padding: 10px 10px 10px 12px; }
.card h3 { font-size: 0.86rem; font-weight: 700; line-height: 1.3; max-height: 2.6em; }
.card .title-btn { font-weight: 700; }
.card .store { margin: 1px 0 0; font-size: 0.76rem; font-weight: 400; color: var(--muted); }
/* Em card estreito (celular de 375) os ícones descem para a linha de baixo, sempre alinhados à direita */
.card .price-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; margin-top: auto; padding-top: 6px; }
.price-group { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.card .price { font-size: 0.98rem; }
.price-row .deal-off { padding: 2px 7px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; }
.card .card-marks { flex: none; margin: 0 -4px 0 auto; border-radius: 999px; background: color-mix(in srgb, var(--text) 4%, var(--bg)); }
.card .card-marks .icon-btn { width: 32px; height: 32px; }
.card .card-marks .icon-btn .ico { width: 19px; height: 19px; }

/* Barra inferior creme; a aba ativa ganha o ícone preenchido em petróleo (seleção), sem a barrinha no topo */
.tabs { background: color-mix(in srgb, var(--bg) 96%, transparent); border-top-color: color-mix(in srgb, var(--border) 70%, transparent); }
.tabs button.active::before { display: none; }
.tabs button.active { font-weight: 600; }
.tabs button.active .ico { color: var(--teal); }
.tabs button.active .ico:not([data-icon="compass"]) { fill: currentColor; }

/* Explorar: categorias em blocos com ícone (escolha do usuário, 2026-11-08). Bloco em areia, ícone
   petróleo num círculo creme; a categoria escolhida fica petróleo cheio com ícone e texto brancos. */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin: 0 0 8px; }
.cat-tile {
  display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 92px; padding: 12px 3px; border: 0; border-radius: var(--radius);
  background: var(--surface-2); color: var(--text); font-size: clamp(0.72rem, 3.1vw, 0.8rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s var(--ease-out);
}
.cat-tile .art { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); color: var(--teal); }
.cat-tile .art .ico { width: 22px; height: 22px; stroke-width: 1.7; }
.cat-tile > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-tile:active { transform: scale(0.96); }
.cat-tile.on, .cat-tile[aria-pressed="true"] { background: var(--teal); color: #fff; }
.cat-tile.on .art, .cat-tile[aria-pressed="true"] .art { background: color-mix(in srgb, #fff 16%, transparent); color: #fff; }
.cat-tile.more { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
@media (hover: hover) {
  .cat-tile:hover { border-color: transparent; background: color-mix(in srgb, var(--text) 7%, var(--surface-2)); }
  .cat-tile.on:hover, .cat-tile[aria-pressed="true"]:hover { background: var(--teal-hover); }
}
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); } .cat-tile { min-height: 104px; font-size: 0.86rem; } }
/* Celular e tablet: uma linha só, rolando para o lado até a borda da tela; o bloco cortado à direita
   mostra que há mais. Sem "Mais": todas as raízes estão na linha. */
@media (max-width: 899px) {
  .cat-grid {
    display: flex; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 8px; padding: 0 16px 2px;
    scroll-snap-type: x proximity; scroll-padding-left: 16px; overscroll-behavior-x: contain; scrollbar-width: none;
  }
  .cat-grid::-webkit-scrollbar { display: none; }
  .cat-tile { flex: none; width: 92px; min-height: 88px; padding: 12px 4px; font-size: 0.76rem; scroll-snap-align: start; }
}

/* Faixa fixa do Explorar: as mesmas categorias dos blocos, em pílula de areia com o ícone no círculo
   creme; a ativa é petróleo cheio, como o bloco escolhido. */
.header-cats .fchip.hcat { gap: 6px; padding: 0 14px 0 6px; border-color: transparent; background: var(--surface-2); font-weight: 600; }
.header-cats .fchip.hcat:not(:has(.hcat-ico)) { padding-left: 14px; }
.hcat-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); color: var(--teal); }
.hcat-ico .ico { width: 16px; height: 16px; stroke-width: 1.8; }
.header-cats .fchip.hcat.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.header-cats .fchip.hcat.on .hcat-ico { background: color-mix(in srgb, #fff 16%, transparent); color: #fff; }
@media (hover: hover) {
  .header-cats .fchip.hcat:hover { border-color: transparent; background: color-mix(in srgb, var(--text) 7%, var(--surface-2)); }
  .header-cats .fchip.hcat.on:hover { background: var(--teal-hover); color: #fff; }
}

/* Fotos editoriais (Unsplash, em /img/editorial): a foto ocupa o lado direito e se dissolve no creme
   à esquerda, onde fica o texto. Mesmo tratamento no hero e nos callouts de coleção. */
.hero.has-photo { min-height: 210px; }
.hero-photo { position: absolute; inset: 0 0 0 auto; width: 62%; height: 100%; object-fit: cover; object-position: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 42%); mask-image: linear-gradient(90deg, transparent, #000 42%); }
.hero.has-photo .hero-text { max-width: 62%; }
.hero.has-photo .hero-text p { max-width: 15em; }
@media (min-width: 900px) { .hero.has-photo { min-height: 260px; } .hero-photo { width: 58%; } .hero.has-photo .hero-text { max-width: 50%; } }
/* Quem volta (perfil feito e segunda sessão em diante): hero baixo, sem subtítulo, para o feed subir */
.hero.has-photo.compact { min-height: 0; margin: 4px 0 12px; padding: 14px 16px; }
.hero.compact .hero-photo { width: 48%; }
.hero.compact .hero-text { gap: 2px; max-width: 64%; }
.hero.compact h1 { font-size: 1.2rem; }
.hero.compact p { display: none; }
.hero.compact .hero-cta { min-height: 36px; margin-top: 6px; padding: 0 14px; font-size: 0.85rem; }
@media (min-width: 900px) { .hero.has-photo.compact { min-height: 0; padding: 18px 28px; } .hero.compact h1 { font-size: 1.5rem; } }
.banner-photo { width: 56%; opacity: 1; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); mask-image: linear-gradient(90deg, transparent, #000 40%); }

/* ---- Abertura (splash): foto inteira, marca branca embaixo; some em fade ---- */
.splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: end center; background: var(--teal); overflow: hidden; transition: opacity 0.35s ease; }
.splash-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.splash::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 22, 20, 0.55), transparent 55%); }
.splash-logo { position: relative; z-index: 1; display: grid; justify-items: center; gap: 4px; margin-bottom: calc(18vh + env(safe-area-inset-bottom)); color: #fff; }
.splash-logo span { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.splash.out { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .splash { transition: none; } }

/* ---- Onboarding: tela cheia por cima do app ---- */
body.onb-open { overflow: hidden; }
.onboard { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; }
.onboard[hidden] { display: none; }
/* Passo 0: boas-vindas sobre a foto, como no mockup */
.onb-welcome { background: #2a2622; color: var(--text); justify-content: space-between; }
.onb-photo { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.onb-welcome::before { content: ""; position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(to bottom, rgba(253, 247, 240, 0.92) 0%, rgba(253, 247, 240, 0.55) 30%, transparent 52%, transparent 70%, rgba(20, 22, 20, 0.45) 100%); }
.onb-top, .onb-bottom { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; padding: 0 24px; }
.onb-top { gap: 18px; padding-top: calc(12vh + env(safe-area-inset-top)); }
.onb-logo { display: flex; align-items: center; gap: 8px; color: var(--teal); }
.onb-logo span { font-size: 3rem; font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.onb-top h1 { margin: 0; max-width: 13em; font-family: var(--font-display); font-size: 1.85rem; font-weight: 500; line-height: 1.18; letter-spacing: -0.01em; color: var(--text); }
.onb-bottom { gap: 14px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.onb-cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: min(100%, 420px); min-height: 58px; border: 0; border-radius: 999px;
  background: var(--cta); color: var(--on-cta); font-size: 1.05rem; font-weight: 600; box-shadow: var(--shadow-2); transition: transform 0.15s var(--ease-out), background-color 0.15s ease; }
.onb-cta .ico { width: 22px; height: 22px; }
.onb-cta:active { transform: scale(0.97); }
@media (hover: hover) { .onb-cta:hover { background: var(--cta-hover); } }
.onb-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.onb-links button { min-height: 44px; padding: 0 6px; border: 0; background: none; color: #fff; font-weight: 600; font-size: 0.95rem; text-decoration: underline; text-underline-offset: 3px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); }
/* Passos 1 e 2 */
.onb-step { width: 100%; }
.onb-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--bg); }
.onb-dots { display: flex; justify-content: center; gap: 6px; }
.onb-dots span { width: 28px; height: 4px; border-radius: 4px; background: var(--border); }
.onb-dots span.on { background: var(--teal); }
.onb-skip { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.onb-body { flex: 1; display: grid; align-content: start; gap: 14px; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 20px 20px; box-sizing: border-box; }
.onb-body h1 { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
.onb-body > p { margin: -6px 0 4px; }
.onb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.onb-tile { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; border: 1.5px solid transparent; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); font-size: 0.92rem; font-weight: 600; text-align: left; transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s var(--ease-out); }
.onb-tile .ico { flex: none; width: 22px; height: 22px; color: var(--teal); }
.onb-tile:active { transform: scale(0.97); }
.onb-tile.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.onb-tile.on .ico { color: #fff; }
.onb-benefits { margin-top: 8px; padding: 16px; border-radius: var(--radius); background: var(--accent-soft); }
.onb-benefits h2 { margin: 0 0 10px; font-size: 0.95rem; font-weight: 700; }
.onb-benefits ul, .onb-benefits-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.onb-benefits li, .onb-benefits-list li { display: flex; align-items: center; gap: 12px; font-size: 0.92rem; }
.onb-bi { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); color: var(--teal); }
.onb-bi .ico { width: 18px; height: 18px; }
.onb-field { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.onb-field input, .onb-field select { min-height: 48px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-field); background: var(--surface-2); color: var(--text); font: inherit; font-size: 1rem; font-weight: 400; width: 100%; min-width: 0; box-sizing: border-box; }
.onb-foot { position: sticky; bottom: 0; display: grid; gap: 8px; width: 100%; max-width: 560px; margin: 0 auto; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); box-sizing: border-box;
  background: linear-gradient(to top, var(--bg) 75%, transparent); }
@media (min-width: 900px) { .onb-top h1 { font-size: 2.4rem; } }

/* Perfil sem perfil: o que se ganha personalizando */
.guest-card { background: var(--accent-soft); border-color: transparent; }
.guest-card h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.guest-card > p { margin: 0; font-size: 0.88rem; }
.guest-card .onb-bi { background: var(--surface); }

/* Sugestões da busca: painel sob o cabeçalho enquanto o campo tem foco */
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-2); }
.suggest[hidden] { display: none; }
@media (min-width: 900px) { .suggest { left: 50%; right: auto; width: min(720px, calc(100% - 32px)); transform: translateX(-50%); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); } }
.sg-group { padding: 6px 0; }
.sg-group + .sg-group { border-top: 1px solid var(--border); }
.sg-title { display: flex; align-items: center; justify-content: space-between; min-height: 32px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.sg-clear { min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--teal); font-size: 0.82rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
.sg-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 4px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-size: 0.95rem; text-align: left; }
.sg-row .ico { flex: none; width: 20px; height: 20px; color: var(--muted); }
.sg-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-row small { flex: none; color: var(--muted); font-size: 0.8rem; }
.sg-row:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
@media (hover: hover) { .sg-row:hover { background: var(--surface-2); } }
.sg-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
/* Dentro da coleção o banner é só o título: o "Explorar →" não leva a lugar nenhum */
#collection-hero .banner-go { display: none; }
