/* Mobile primeiro: estilos base valem para o celular; @media (min-width) amplia para tablet e desktop. */
:root {
  --bg: #fbf5e7;
  --surface: #ffffff;
  --surface-2: #f5ead0;
  --border: #e8d9b8;
  --amber: #f2b01e;
  --accent: #9a6d0b;
  --ink: #2b1d10;
  --cream: #f3ecdd;
  --muted: #6f5f46;
  --danger: #8f2424;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --abas: 62px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.logado { padding-bottom: calc(var(--abas) + env(safe-area-inset-bottom)); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; }
button { font: inherit; color: inherit; }
svg.ic { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.carregando { padding: 80px 16px; text-align: center; color: var(--muted); }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--amber); color: #1a130b; font-weight: 700; padding: 12px 22px; border-radius: 8px; text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; border: 2px solid var(--amber); cursor: pointer; text-align: center; }
.btn:hover { background: #ffc94a; border-color: #ffc94a; color: #1a130b; }
.btn--linha { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--linha:hover { background: var(--surface-2); border-color: var(--amber); }
.btn--perigo { background: transparent; color: var(--danger); border-color: #d9b3b3; }
.btn--perigo:hover { background: #fbeaea; border-color: var(--danger); color: var(--danger); }
.btn--peq { padding: 6px 12px; font-size: .74rem; }
.btn:disabled { opacity: .5; cursor: wait; }

/* Sem foto: logo Quinkas esmaecido + câmera */
.sem-foto { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8%; background: linear-gradient(160deg, #f8eed6, #efe0bb); color: #a8926a; overflow: hidden; }
.sem-foto::before { content: ""; width: 54%; aspect-ratio: 778 / 536; background: url(quinkas.svg) center / contain no-repeat; opacity: .13; }
.sem-foto span { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.sem-foto.mini { background: #f6ecd3; border: 1px solid var(--border); border-radius: inherit; color: #b49a6c; }
.sem-foto.mini::before { display: none; }
.sem-foto.mini svg.ic { width: 22px; height: 22px; }

/* Porta (senha) */
.porta { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.porta-caixa { max-width: 400px; width: 100%; }
.selo { display: inline-block; background: var(--amber); padding: 18px 22px 13px; border-radius: 16px; transform: rotate(-2deg); box-shadow: 0 10px 26px rgba(43,29,16,.25); margin-bottom: 24px; }
.selo img { width: 130px; height: auto; }
.porta h1 { font-size: 1.5rem; margin-bottom: 8px; }
.porta p { color: var(--muted); margin-bottom: 22px; font-size: .95rem; }
.porta input { width: 100%; padding: 14px 16px; border: 2px solid var(--border); border-radius: 10px; font-size: 1.05rem; text-align: center; background: #fff; color: var(--ink); margin-bottom: 12px; }
.porta input:focus { outline: none; border-color: var(--amber); }
.porta .btn { width: 100%; padding: 14px; }
.porta .erro { color: var(--danger); margin-top: 12px; min-height: 1.4em; }

/* Barra de edição e cabeçalho */
.barra-edicao { background: var(--ink); color: var(--cream); font-size: .85rem; }
.barra-edicao .container { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.barra-edicao strong { color: var(--amber); width: 100%; }
.barra-edicao .btn--linha { color: var(--cream); border-color: #5a4630; }
.barra-edicao .btn--linha:hover { background: #3a2a18; color: #fff; }
.cabecalho { position: sticky; top: 0; z-index: 40; background: rgba(255,252,244,.96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 2px solid var(--amber); }
.cabecalho .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.marca { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.marca img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.nav a:hover, .nav a.ativo { color: var(--ink); }
.nav a.ativo { box-shadow: inset 0 -2px 0 var(--amber); }
.nav .so-desktop { display: none; }
.sair { display: inline-flex; align-items: center; gap: 4px; }

/* Abas inferiores (celular) */
.abas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; background: rgba(255,252,244,.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgba(43,29,16,.08); }
.abas a { flex: 1; height: var(--abas); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .03em; }
.abas a svg.ic { width: 24px; height: 24px; }
.abas a.ativo { color: var(--ink); }
.abas a.ativo svg.ic { color: var(--accent); stroke-width: 2.2; }

/* Hero e total */
.hero { position: relative; padding: 40px 16px 36px; text-align: center; background: #1a120b center 35% / cover no-repeat; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,10,6,.82), rgba(15,10,6,.6) 55%, rgba(22,17,12,.93)); }
.hero > * { position: relative; }
.hero .selo { box-shadow: 0 10px 30px rgba(0,0,0,.5); margin-bottom: 20px; }
.hero .selo img { width: 110px; }
.kicker { display: inline-block; color: var(--amber); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .22em; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--amber); }
.hero h1 { color: var(--cream); font-size: 1.9rem; max-width: 800px; margin: 0 auto 10px; }
.hero p { color: #ddd0ba; font-size: .95rem; max-width: 660px; margin: 0 auto; }

.total { background: var(--amber); color: #1a130b; border-bottom: 2px solid #d99a10; }
.total .container { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; padding-bottom: 20px; }
.total-rotulo { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .2em; }
.total-valor { font-family: var(--serif); font-size: 2.15rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.total-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .9rem; flex-wrap: wrap; }
.total-aviso { font-size: .8rem; background: rgba(255,255,255,.55); border-radius: 6px; padding: 4px 10px; margin-top: 6px; display: inline-block; }

/* Seções */
.secao { padding: 28px 0 48px; }
.secao-topo { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.secao-topo h2 { font-size: 1.6rem; }
.secao-topo p { color: var(--muted); font-size: .92rem; }
.busca-caixa { position: relative; }
.busca-caixa svg.ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.busca { width: 100%; padding: 12px 14px 12px 40px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 1rem; color: var(--ink); }
.busca:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(242,176,30,.2); }

.destaque { display: grid; background: var(--surface); border: 2px solid var(--amber); border-radius: 14px; overflow: hidden; margin-bottom: 36px; color: var(--ink); transition: transform .2s; }
.destaque:hover { transform: translateY(-3px); color: var(--ink); }
.destaque-img { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.destaque-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.destaque-corpo { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.rotulo { color: var(--accent); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .2em; }
.destaque-corpo h2 { font-size: 1.6rem; }
.destaque-corpo p { color: var(--muted); font-size: .95rem; }
.link-seta { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }

/* Cards: foto sempre no mesmo formato (imagem cobre a área, como fundo) */
.grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); border-color: var(--amber); box-shadow: 0 8px 22px rgba(43,29,16,.1); color: var(--ink); }
.card-link { display: flex; flex-direction: column; flex: 1; color: inherit; }
.card-link:hover { color: inherit; }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; flex: none; }
.card-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.selo-qtd { position: absolute; top: 8px; right: 8px; z-index: 2; background: var(--amber); color: #1a130b; font-size: .68rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.selo-video { position: absolute; bottom: 8px; left: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; background: rgba(20,14,8,.78); color: #fff; font-size: .66rem; padding: 2px 8px; border-radius: 999px; }
.selo-video svg.ic { width: 11px; height: 11px; fill: currentColor; stroke: none; }
.card-corpo { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-corpo h3 { font-size: .95rem; line-height: 1.25; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; }
.chips li { font-size: .7rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 999px; }
.chips li + li { display: none; }
.card-valor { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border); }
.card-valor small { display: none; }
.card-valor strong { display: block; font-family: var(--serif); font-size: 1.02rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-valor .un { display: block; font-family: var(--sans); font-size: .7rem; color: var(--muted); font-weight: 500; white-space: normal; }
.a-informar { font-family: var(--sans) !important; font-size: .8rem !important; color: var(--muted); font-weight: 500; white-space: normal !important; }
.card-ctrl { display: flex; gap: 4px; padding: 0 10px 10px; }
.card-ctrl .btn { flex: 1; padding: 6px 4px; }
.card-novo { border: 2px dashed var(--border); background: none; align-items: center; justify-content: center; min-height: 200px; color: var(--muted); font-size: .95rem; cursor: pointer; gap: 6px; }
.card-novo:hover { border-color: var(--amber); color: var(--accent); }
.card-novo span { font-size: 2rem; line-height: 1; }
.vazio { color: var(--muted); padding: 30px 0; grid-column: 1 / -1; }

/* Página de ativo */
.pagina { padding: 18px 0 48px; }
.trilha { color: var(--muted); font-size: .84rem; margin-bottom: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ativo-grade { display: grid; gap: 22px; }
.galeria { position: relative; margin: 0 -16px; }
.carrossel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; background: var(--surface-2); }
.carrossel::-webkit-scrollbar { display: none; }
.carrossel > * { position: relative; flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.carrossel img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.contador { position: absolute; right: 26px; bottom: 12px; z-index: 2; background: rgba(20,14,8,.72); color: #fff; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; pointer-events: none; }
.seta { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--ink); display: none; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.seta:hover { background: #fff; }
.seta.ant { left: 12px; }
.seta.prox { right: 12px; }
.miniaturas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.miniaturas button { position: relative; aspect-ratio: 4 / 3; border: 2px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-2); cursor: pointer; padding: 0; }
.miniaturas button img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.miniaturas button.atual { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.ativo-info h1 { font-size: 1.6rem; margin-bottom: 10px; }
.descricao { color: var(--muted); margin-bottom: 20px; white-space: pre-line; }
.ficha { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 18px; font-size: .95rem; }
.ficha caption { text-align: left; font-family: var(--serif); font-size: 1.05rem; font-weight: 700; color: var(--accent); padding: 0 0 8px; }
.ficha th, .ficha td { padding: 11px 14px; text-align: left; vertical-align: middle; }
.ficha tr + tr th, .ficha tr + tr td { border-top: 1px solid var(--border); }
.ficha th { color: var(--muted); font-weight: 500; width: 46%; }
.ficha td { font-weight: 600; }
.ficha tr.linha-valor td { font-family: var(--serif); font-size: 1.1rem; }
.ficha tr.linha-total th, .ficha tr.linha-total td { background: #fff8e3; }
.ficha tr.linha-total td { font-family: var(--serif); font-size: 1.25rem; }
.acoes-ativo { display: flex; gap: 8px; flex-wrap: wrap; }
.acoes-ativo .btn { width: 100%; }
.navegacao { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 32px; }
.navegacao a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: var(--ink); font-size: .85rem; font-weight: 600; line-height: 1.3; min-width: 0; }
.navegacao a:hover { border-color: var(--amber); }
.navegacao a small { color: var(--muted); font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.navegacao a.prox { text-align: right; grid-column: 2; }
.videos { margin-top: 32px; }
.videos h2 { font-size: 1.35rem; margin-bottom: 12px; }
.video { border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 16px; }
.video iframe, .video video { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; }

/* Cervejaria */
.cerv-titulo { font-size: 1.9rem; margin-bottom: 12px; }
.cerv-texto { color: var(--muted); }
.cerv-texto p + p { margin-top: .9em; }
.cerv-galeria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
.cerv-galeria button { position: relative; aspect-ratio: 4 / 3; border: 0; border-radius: 10px; overflow: hidden; padding: 0; cursor: zoom-in; background: var(--surface-2); }
.cerv-galeria img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cerv-galeria button:hover img { transform: scale(1.04); }

/* Relatório: lista expansível no celular, tabela no desktop */
.relatorio-topo { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.relatorio-topo h1 { font-size: 1.6rem; }
.relatorio-topo p { color: var(--muted); font-size: .9rem; }
.relatorio-acoes { display: flex; gap: 8px; }
.relatorio-acoes .btn { flex: 1; white-space: nowrap; padding: 12px 10px; }
.rel-total { display: flex; flex-direction: column; gap: 2px; background: var(--amber); color: #1a130b; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.rel-total span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.rel-total strong { font-family: var(--serif); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.rel-total.secundario { background: var(--surface-2); }
.rel-lista { display: grid; gap: 8px; }
.rel-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.rel-item[open] { border-color: var(--amber); }
.rel-item summary { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 18px; gap: 10px; align-items: center; padding: 8px 10px 8px 8px; cursor: pointer; list-style: none; }
.rel-item summary::-webkit-details-marker { display: none; }
.rel-thumb { position: relative; display: block; flex: none; width: 56px; height: 42px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.rel-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rel-nome { font-weight: 600; font-size: .88rem; line-height: 1.25; }
.rel-nome small { display: block; color: var(--muted); font-weight: 500; font-size: .74rem; margin-top: 1px; }
.rel-valor { font-family: var(--serif); font-weight: 700; font-size: .92rem; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rel-valor.a-informar { font-weight: 500; }
.rel-item summary svg.ic { color: var(--muted); transition: transform .2s; }
.rel-item[open] summary svg.ic { transform: rotate(180deg); }
.rel-detalhe { border-top: 1px dashed var(--border); padding: 4px 14px 12px; }
.rel-detalhe dl { display: grid; grid-template-columns: auto 1fr; font-size: .88rem; }
.rel-detalhe dt { color: var(--muted); padding: 6px 12px 6px 0; }
.rel-detalhe dd { text-align: right; font-weight: 600; padding: 6px 0; font-variant-numeric: tabular-nums; }
.rel-detalhe dt:not(:first-of-type), .rel-detalhe dd:not(:first-of-type) { border-top: 1px solid #f1e7d1; }
.rel-detalhe .btn { width: 100%; margin-top: 8px; }
.tabela-rolagem { display: none; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.relatorio { width: 100%; border-collapse: collapse; font-size: .9rem; }
.relatorio th, .relatorio td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.relatorio thead th { background: var(--surface-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.relatorio .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.relatorio .rel-thumb { width: 60px; height: 45px; }
.relatorio tfoot td { font-weight: 700; font-family: var(--serif); font-size: 1.1rem; background: #fff8e3; border-bottom: 0; }
.relatorio a { color: var(--ink); font-weight: 600; }

.rodape { border-top: 1px solid var(--border); padding: 26px 16px; text-align: center; color: var(--muted); font-size: .85rem; }
.rodape .marca-txt { font-family: var(--serif); color: var(--ink); font-size: 1.05rem; }

/* Visualizador de fotos */
.lightbox { position: fixed; inset: 0; z-index: 100; background: #0d0906; display: none; touch-action: pan-y; }
.lightbox.aberto { display: block; }
.lb-palco { position: absolute; inset: 56px 0 64px; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.lb-palco img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .2s, opacity .2s; }
.lb-topo { position: absolute; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 18px; color: #eadfc9; font-size: .9rem; font-variant-numeric: tabular-nums; }
.lb-fechar, .lb-seta { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lb-fechar:hover, .lb-seta:hover { background: rgba(255,255,255,.24); }
.lb-fechar svg.ic, .lb-seta svg.ic { width: 22px; height: 22px; }
.lb-base { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; align-items: center; justify-content: center; gap: 40px; padding-bottom: env(safe-area-inset-bottom); }
.lb-seta:disabled { opacity: .25; cursor: default; }

/* Diálogos de edição */
dialog { border: 0; border-radius: 0; padding: 0; margin: 0; inset: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgba(20,14,8,.6); }
.dlg-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ink); color: var(--cream); padding: 12px 16px; flex: none; }
.dlg-topo h2 { font-size: 1.1rem; }
.dlg-topo button { background: none; border: 0; color: var(--cream); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.dlg-corpo { padding: 16px; display: grid; gap: 14px; overflow-y: auto; flex: 1; align-content: start; }
.dlg-rodape { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface-2); border-top: 1px solid var(--border); flex: none; }
.dlg-rodape .btn { flex: 1; padding: 12px 8px; }
.dlg-rodape .btn--perigo { margin-right: auto; }
.campos { display: grid; grid-template-columns: 1fr; gap: 12px 14px; align-items: start; }
.campo { display: grid; gap: 4px; align-content: start; }
.campo.largo { grid-column: 1 / -1; }
.campo label, .campo .lbl { font-size: .76rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.campo input, .campo textarea, .campo select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 1rem; background: #fff; color: var(--ink); }
.campo textarea { min-height: 110px; resize: vertical; }
.campo input:focus, .campo textarea:focus, .campo select:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(242,176,30,.2); }
.dica { font-size: .8rem; color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.slots.livre { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.slot { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot .slot-acoes { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.slot .slot-acoes button { background: rgba(255,255,255,.92); border: 0; border-radius: 4px; font-size: .75rem; padding: 4px 8px; cursor: pointer; color: var(--ink); }
.slot .slot-acoes button.x { background: var(--danger); color: #fff; }
.slot-vazio { border: 2px dashed var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; font-size: .85rem; text-align: center; padding: 6px; background: transparent; }
.slot-vazio:hover { border-color: var(--amber); color: var(--accent); }
.video-edit { display: grid; gap: 8px; }
.video-edit-linha { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.video-edit-linha input { flex: 1; min-width: 200px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; }
.video-atual { font-size: .88rem; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; display: flex; justify-content: space-between; gap: 8px; align-items: center; word-break: break-all; }
.progresso { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; display: none; }
.progresso.ativo { display: block; }
.progresso div { height: 100%; width: 0; background: var(--amber); transition: width .2s; }

.aviso { position: fixed; left: 50%; bottom: calc(var(--abas) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; background: var(--ink); color: var(--cream); padding: 12px 20px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.3); font-size: .92rem; width: max-content; max-width: calc(100vw - 32px); }
.aviso.erro { background: var(--danger); color: #fff; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .container { padding: 0 24px; }
  .grade { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
  .card-corpo { padding: 16px 16px 18px; gap: 10px; }
  .card-corpo h3 { font-size: 1.12rem; }
  .chips li + li { display: list-item; }
  .chips li { font-size: .74rem; padding: 2px 10px; }
  .card-valor { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .card-valor small { display: inline; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
  .card-valor strong { font-size: 1.18rem; text-align: right; }
  .card-ctrl { padding: 0 16px 14px; }
  .card-ctrl .btn { flex: none; padding: 6px 12px; }
  .selo-qtd { font-size: .74rem; padding: 3px 11px; top: 10px; right: 10px; }
  .cerv-galeria { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .galeria { margin: 0; }
  .carrossel { border-radius: 12px; border: 1px solid var(--border); }
  .contador { right: 12px; }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .campos { grid-template-columns: 1fr 1fr; }
  dialog { margin: auto; width: min(760px, calc(100vw - 32px)); height: auto; max-height: calc(100dvh - 32px); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
  .dlg-rodape .btn { flex: none; padding: 12px 22px; }
  .acoes-ativo .btn { width: auto; }
  .relatorio-acoes .btn { flex: none; padding: 12px 22px; }
  .rel-total { flex-direction: row; justify-content: space-between; align-items: baseline; }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  body { font-size: 17px; }
  body.logado { padding-bottom: 0; }
  .abas { display: none; }
  .nav .so-desktop { display: inline; }
  .marca { font-size: 1.2rem; }
  .barra-edicao strong { width: auto; margin-right: auto; }
  .hero { padding: 76px 24px 60px; }
  .hero .selo { margin-bottom: 26px; }
  .hero .selo img { width: 170px; }
  .kicker { font-size: .82rem; margin-bottom: 16px; }
  .hero h1 { font-size: 3.2rem; margin-bottom: 16px; }
  .hero p { font-size: 1.08rem; }
  .total .container { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 26px; padding-bottom: 26px; }
  .total-valor { font-size: 3.2rem; }
  .total-info { flex-direction: column; align-items: flex-end; text-align: right; }
  .secao { padding: 52px 0 72px; }
  .secao-topo { flex-direction: row; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; }
  .secao-topo h2 { font-size: 2.3rem; }
  .busca-caixa { width: 300px; }
  .destaque { grid-template-columns: 1.2fr 1fr; margin-bottom: 56px; }
  .destaque-img { aspect-ratio: auto; min-height: 320px; }
  .destaque-corpo { padding: 36px; gap: 14px; }
  .destaque-corpo h2 { font-size: 2.4rem; }
  .pagina { padding: 36px 0 80px; }
  .trilha { margin-bottom: 22px; }
  .ativo-grade { grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: start; }
  .seta { display: inline-flex; }
  .ativo-info h1 { font-size: 2.3rem; margin-bottom: 14px; }
  .navegacao { margin-top: 44px; }
  .videos { margin-top: 48px; }
  .videos h2 { font-size: 1.6rem; }
  .cerv-titulo { font-size: 2.7rem; margin-bottom: 16px; }
  .cerv-galeria { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 32px; }
  .relatorio-topo { flex-direction: row; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
  .relatorio-topo h1 { font-size: 2.3rem; }
  .rel-lista, .rel-total, .so-celular { display: none !important; }
  .tabela-rolagem { display: block; }
  .aviso { bottom: 24px; }
}

@media print {
  body { background: #fff; font-size: 10pt; padding: 0 !important; }
  .barra-edicao, .cabecalho, .abas, .rodape, .nao-imprimir, .card-ctrl, .rel-lista, .rel-total, .so-celular { display: none !important; }
  .pagina { padding: 0; }
  .tabela-rolagem { display: block; border: 0; }
  .relatorio { font-size: 9pt; }
  .relatorio tr { break-inside: avoid; }
  .relatorio thead { display: table-header-group; }
  a { color: inherit; }
}
