/* =========================================================
   Popporn — template de vídeos, tema claro, mobile first
   ========================================================= */

:root {
  --bg: #ffffff;
  --surface: #f5f2f7;
  --surface-2: #ece7f0;
  --line: #ebe5ef;
  --line-strong: #d9d0df;
  --ink: #1c1422;
  --ink-2: #4a4152;
  --muted: #6f6677;
  --accent: #e8277f;          /* preenchimentos, ícones, barra do player */
  --accent-strong: #d41a6f;   /* texto e botões sobre branco (contraste AA) */
  --accent-tint: #ffe9f3;
  /* Cores de apoio (as mesmas do logotipo). Cada uma tem um papel fixo:
     rosa = ações e o que está selecionado; laranja = "em alta" e o que está em andamento;
     amarelo = salvos e o que é premium (4K). Texto sobre amarelo sempre em marrom. */
  --orange: #ef6c1f;          /* ícones e preenchimentos */
  --orange-strong: #c4510f;   /* texto e selos com texto branco (contraste AA) */
  --orange-tint: #ffecdf;
  --yellow: #f4b41a;          /* preenchimentos, sempre com texto/contorno marrom */
  --yellow-tint: #fff4d6;
  --brown: #4a2511;

  --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --font-ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --head-h: 56px;
  --radius-media: 8px;
  --gutter: 12px;
  --max: 1440px;
}

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

/* scrollbar-gutter: a largura da página não muda quando a barra de rolagem aparece ou some
   (páginas curtas x longas, pop-ups que travam a rolagem), então nada pula de lugar. */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--head-h); scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.45 var(--font-ui);
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img, video { display: block; max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

.ic { width: 1em; height: 1em; flex: none; fill: currentColor; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Marca ----------
   Logotipo Popporn: o nome em letras groovy (redesenhadas a partir da Sonsie One) no estilo de letreiro
   retrô em camadas: rosa, filete creme, contorno marrom e extrusão laranja/mostarda.
   --logo-h é a altura total do desenho; a largura segue a proporção. Arquivos em assets/brand/, regras em docs/marca.html. */
.brand {
  --logo-h: 30px;
  display: inline-flex; align-items: center;
  line-height: 0;
}
.brand-logo { flex: none; height: var(--logo-h); width: calc(var(--logo-h) * 5.9509); }
.brand-sm { --logo-h: 26px; }

/* ---------- Cabeçalho ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid #e2e0e5;
  transition: transform .25s ease, box-shadow .25s ease;
}
body.is-scrolling-down .site-head { transform: translateY(-100%); }

.head-bar {
  height: var(--head-h);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 6px;
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); /* as laterais nunca invadem o logo */
  column-gap: 8px;
  align-items: center;
  position: relative;
}
.head-left { display: flex; }
.head-right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }

.icon-btn {
  width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  border: 0; background: none; border-radius: 12px;
  color: var(--ink);
  font-size: 25px;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn-user { font-size: 28px; }
.user-initial {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #8a3ffc);
  color: #fff; font: 800 14px/1 var(--font-display);
}

/* Botão Criar: só o "+" no celular, "+ Criar" a partir de 560px */
.btn-create {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600; font-size: 15px;
  color: var(--ink);
  margin-right: 2px;
}
.btn-create .ic { width: 22px; height: 22px; }
.btn-create span { display: none; }
.btn-create:hover { background: var(--surface-2); }

/* Ícone de salvos com contador */
.icon-btn-saved { position: relative; font-size: 24px; }
.head-badge {
  position: absolute; top: 0; right: -3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px;
  background: var(--yellow); color: var(--brown);
  font: 800 10.5px/16px var(--font-ui);
  text-align: center;
  border: 2px solid var(--bg);
  box-sizing: content-box;
}
.head-badge:empty { display: none; }

/* Busca: a página escurece e só o campo fica em destaque */
.search-layer {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(20, 12, 26, .62);
  animation: fade-in .15s ease-out;
}
.search-layer[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.search-wrap { max-width: 760px; margin: 0 auto; padding: 10px 12px; }
.search-field {
  display: flex; align-items: center;
  height: 56px;
  padding: 0 6px 0 18px;
  background: var(--bg);
  border-radius: 999px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .3);
}
.search-ic { display: grid; font-size: 24px; color: var(--ink); }
.search-field input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: none;
  padding: 0 12px;
  font: 500 18px var(--font-ui); color: var(--ink);
}
.search-field input::placeholder { color: var(--muted); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-x { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink); font-size: 26px; }
.search-x:hover { background: var(--surface); }
.search-panel {
  margin-top: 8px;
  padding: 8px 0;
  background: var(--bg);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
  max-height: calc(100svh - 100px);
  overflow-y: auto; scrollbar-width: none;
}
.search-panel[hidden], .search-panel:empty { display: none; }
.sp-head { margin: 0; padding: 12px 22px 8px; font-weight: 700; font-size: 17px; border-bottom: 1px solid var(--line); }
.sp-list { list-style: none; margin: 0; padding: 6px 0; }
.sp-video, .sp-recent { display: flex; align-items: center; gap: 14px; padding: 8px 22px; }
.sp-video:hover, .sp-recent:hover, .sp-video:focus-visible, .sp-recent:focus-visible { background: var(--surface); outline: none; }
.sp-video img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; flex: none; }
.sp-v-text { min-width: 0; display: flex; flex-direction: column; }
.sp-v-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-v-meta { font-size: 13px; color: var(--muted); }
.sp-recent { font-weight: 500; font-size: 15.5px; color: var(--ink); }
.sp-recent .ic { font-size: 20px; color: var(--muted); }
.sp-all { display: block; padding: 12px 22px 10px; border-top: 1px solid var(--line); font-weight: 700; font-size: 15px; color: var(--accent-strong); }
.sp-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.sp-empty { margin: 0; padding: 16px 22px 12px; color: var(--muted); }
@media (max-width: 559px) {
  .search-wrap { padding: 8px; }
  .search-field { height: 50px; }
  .search-field input { font-size: 16px; }
  .sp-video img { width: 80px; }
}

@media (max-width: 559px) {
  /* Thumbnails de ponta a ponta no celular */
  .page .grid { padding: 0; gap: 24px; }
  .page .card-media, .page .sk-media, .page .ad-slot { border-radius: 0 !important; }
  .page .card-title { padding: 0 var(--gutter); }
  .page .card-meta { padding: 0 var(--gutter); }
  .head-bar { padding: 0 4px; }
  .icon-btn { width: 38px; height: 38px; font-size: 23px; }
  .icon-btn-user { font-size: 26px; }
  .btn-create { width: 36px; height: 36px; }
  .btn-create .ic { width: 20px; height: 20px; }
  .brand { --logo-h: 25px; }
}
@media (max-width: 379px) {
  .brand { --logo-h: 22px; }
}

/* ---------- Chips com rolagem horizontal ---------- */
.chips-wrap { position: relative; max-width: var(--max); margin: 0 auto; padding-top: 12px; }
.chips {
  display: flex; gap: 8px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  padding: 4px var(--gutter) 6px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 17px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  font-weight: 600; font-size: 14.5px;
  white-space: nowrap;
  transition: border-color .15s, background-color .15s, color .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.chip.is-active { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.chip.is-active:hover { color: #fff; }
.chip .ic-chip { width: 17px; height: 17px; margin-left: -2px; }
.chip:not(.is-active) .ic-chip { color: var(--orange); }
.chip-sm { height: 32px; padding: 0 13px; font-size: 13.5px; border-width: 1px; background: var(--surface); border-color: var(--line); }

.chips-arrow {
  display: none;
  position: absolute; top: 16px; bottom: 6px; z-index: 2;
  width: 64px; border: 0;
  font-size: 20px; color: var(--ink);
  align-items: center;
}
.chips-arrow-l { left: 0; justify-content: flex-start; padding-left: 8px; background: linear-gradient(90deg, var(--bg) 45%, transparent); }
.chips-arrow-l .ic { transform: rotate(90deg); }
.chips-arrow-r { right: 0; justify-content: flex-end; padding-right: 8px; background: linear-gradient(270deg, var(--bg) 45%, transparent); }
.chips-arrow-r .ic { transform: rotate(-90deg); }
@media (hover: hover) and (pointer: fine) {
  .chips-arrow { display: flex; }
  .chips-wrap.at-start .chips-arrow-l, .chips-wrap.at-end .chips-arrow-r { display: none; }
}

/* ---------- Títulos de seção ---------- */
.section-title {
  margin: 18px 16px 14px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 25px;
  font-stretch: 78%;
  font-variation-settings: 'wdth' 78, 'opsz' 36;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* ---------- Grade e cards ---------- */
.page { max-width: var(--max); margin: 0 auto; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px 16px;
  padding: 0 var(--gutter);
}

.card { min-width: 0; text-align: center; }
.card-thumb { position: relative; }

.card-media {
  position: relative; display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-media);
  overflow: hidden;
  background: var(--surface);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media { -webkit-user-select: none; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* Coração ao curtir com dois toques */
.card-heart {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
  color: #fff;
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(232, 39, 127, .55));
  animation: heart-burst .8s cubic-bezier(.2, .9, .3, 1.2) forwards;
}
.card-heart .ic { width: 100%; height: 100%; }
.card-heart.is-unlike { filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .35)); animation-name: heart-out; }
@keyframes heart-out {
  0% { transform: scale(1); opacity: 0; }
  20% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(.4); opacity: 0; }
}
@keyframes heart-burst {
  0% { transform: scale(.2); opacity: 0; }
  25% { transform: scale(1.12); opacity: 1; }
  45% { transform: scale(.95); }
  75% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.15) translateY(-14px); opacity: 0; }
}
.card-preview {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .2s;
}
.card-media.is-previewing .card-preview { opacity: 1; }
.card-media.is-previewing .card-badges { z-index: 1; }

.card-badges { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 5px; }
.badge {
  font: 700 12.5px/1 var(--font-ui);
  padding: 5px 7px;
  border-radius: 0;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.badge-time { background: rgba(20, 12, 26, .78); }
.badge-q { background: var(--orange-strong); }
.badge-q-4k { background: var(--yellow); color: var(--brown); }

/* Salvar direto na thumbnail */
.card-save {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0; padding: 0;
  background: none;
  color: #fff;
  font-size: 24px;
  transition: color .15s, transform .15s;
}
.card-save:hover { transform: scale(1.1); }
.card-save:active { transform: scale(.92); }
/* Salvo: o ícone fica preenchido (branco funciona sobre qualquer thumbnail) */
.card-save[aria-pressed="true"] { color: #fff; }

.card-title {
  margin: 10px 0 5px;
  padding: 0 6px;
  font: 700 16px/1.3 var(--font-ui);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a:hover { color: var(--accent-strong); }

.card-meta {
  margin: 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 2px 13px;
  font-size: 13.5px; font-weight: 500;
  color: var(--muted);
}
.creator { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-strong); font-weight: 600; }
.creator:hover { text-decoration: underline; text-underline-offset: 3px; }
.stat { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.stat .ic { width: 15px; height: 15px; opacity: .8; }
.stat-likes.is-liked { color: var(--accent-strong); }
.stat-likes.is-liked .ic { color: var(--accent); opacity: 1; }

/* Esqueleto de carregamento */
.card-skeleton .sk { background: var(--surface); border-radius: 6px; }
.sk-media { aspect-ratio: 16 / 9; border-radius: var(--radius-media) !important; }
.sk-line { height: 14px; width: 82%; margin: 12px auto 0; }
.sk-short { width: 48%; margin-top: 8px; }
.card-skeleton .sk {
  background: linear-gradient(100deg, var(--surface) 30%, #faf8fb 50%, var(--surface) 70%) var(--surface);
  background-size: 300% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Espaço de anúncio no feed */
.ad-slot {
  display: grid; place-items: center;
  min-height: 200px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-media);
  color: var(--muted); font-size: 13px;
  background: var(--surface);
}

.feed-status { text-align: center; padding: 22px 16px 8px; color: var(--muted); }
.btn-more {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 220px; height: 52px; padding: 0 32px;
  border: 2px solid var(--brown); border-radius: 999px;
  background: var(--yellow); color: var(--brown);
  font-weight: 800; font-size: 17px;
  box-shadow: 4px 5px 0 var(--orange);
  transition: transform .1s ease, box-shadow .1s ease, background-color .15s ease;
}
.btn-more:hover { background: #ffc53d; transform: translate(-1px, -1px); box-shadow: 5px 6px 0 var(--orange); }
.btn-more:active { transform: translate(4px, 5px); box-shadow: 0 0 0 var(--orange); }
.btn-more:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.btn-more[disabled] { cursor: progress; transform: translate(4px, 5px); box-shadow: 0 0 0 var(--orange); }
.btn-more .spinner { border-color: rgba(74, 37, 17, .3); border-top-color: var(--brown); }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card.is-new { animation: card-in .45s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.feed-status p { margin: 0 0 12px; }
.feed-end { font-size: 14px; }
.feed-sentinel { height: 1px; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-2); }
.empty p { max-width: 36ch; margin: 0 auto 16px; }
.empty-page { padding: 80px 20px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px;
}
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: #bd1462; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--line-strong); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }

/* ---------- Menu lateral ---------- */
.drawer {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(28, 20, 34, 0);
  transition: background-color .22s;
}
.drawer.is-open { background: rgba(28, 20, 34, .38); }
.drawer-panel {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: min(84vw, 320px);
  background: var(--bg);
  padding: 8px 10px 24px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .22s ease;
  box-shadow: 8px 0 30px rgba(28, 20, 34, .12);
}
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 2px 0 8px; margin-bottom: 6px; }
.drawer-link {
  display: flex; align-items: center; gap: 14px;
  height: 48px; padding: 0 12px;
  border-radius: 10px;
  font-weight: 600; font-size: 15.5px;
}
.drawer-link .ic { font-size: 21px; color: var(--ink-2); }
.drawer-link:hover { background: var(--surface); }
.drawer-count {
  margin-left: auto; min-width: 22px; padding: 2px 7px;
  border-radius: 999px; background: var(--accent-tint); color: var(--accent-strong);
  font-size: 12.5px; font-weight: 700; text-align: center;
}
.drawer-count:empty { display: none; }
.drawer-count[data-count="saved"] { background: var(--yellow-tint); color: var(--brown); }
.drawer-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 12px; font-size: 13.5px; color: var(--muted); }
.drawer-legal a:hover { color: var(--ink); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; z-index: 90;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Aviso 18+ (folha inferior no celular, cartão no desktop) ---------- */
.age-gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(58, 26, 50, .62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.age-sheet {
  position: relative;
  width: 100%; max-width: 520px;
  background: var(--bg);
  border-radius: 34px 34px 0 0;
  padding: 70px 24px calc(18px + env(safe-area-inset-bottom));
  text-align: center;
  animation: sheet-up .38s cubic-bezier(.2, .9, .3, 1);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.age-art {
  position: absolute; left: 50%; top: 0;
  width: 116px; height: 116px;
  margin-left: -58px; margin-top: -62px;
  border-radius: 50%;
  background: var(--bg);
  display: grid; place-items: center;
  box-shadow: 0 -6px 24px rgba(58, 26, 50, .18);
}
.age-art .ic-mark { width: 70px; height: 70px; }
.age-art img { width: 100%; height: 100%; object-fit: contain; }
.age-badge {
  position: absolute; top: 22px; left: 22px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  font: 800 17px/1 var(--font-display);
  clip-path: polygon(29% 0, 71% 0, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0 71%, 0 29%);
}
.age-sheet h2 {
  margin: 0 auto 10px;
  max-width: 21ch;
  font-family: var(--font-display); font-weight: 800; font-size: 27px; line-height: 1.14;
  font-variation-settings: 'wdth' 84, 'opsz' 36;
  letter-spacing: -0.01em;
}
.age-sheet p { margin: 0 auto 24px; max-width: 38ch; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.age-leave {
  display: inline-block; margin-top: 12px; padding: 10px 18px;
  color: var(--accent-strong); font-weight: 600; font-size: 17px;
}
.age-leave:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 560px) {
  .age-gate { align-items: center; padding: 70px 24px 24px; }
  .age-sheet { border-radius: 34px; padding-bottom: 22px; box-shadow: 0 30px 80px rgba(58, 26, 50, .3); }
}

/* ---------- Aviso de bloqueador de anúncios ---------- */
.adb-overlay {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(20, 12, 26, .6);
  animation: fade-in .2s ease-out;
}
.adb-card {
  position: relative;
  width: 100%; max-width: 520px;
  padding: 34px 32px 28px;
  border-radius: 28px;
  background: var(--bg);
  text-align: center;
  box-shadow: 0 30px 80px rgba(20, 12, 26, .35);
  animation: modal-in .25s cubic-bezier(.2, .9, .3, 1);
}
.adb-view[hidden] { display: none; }
.adb-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: #5b5560; color: #fff; font-size: 18px;
}
.adb-close:hover { background: var(--ink); }
.adb-brand { --logo-h: 38px; justify-content: center; margin-bottom: 20px; }
.adb-card h2 {
  margin: 0 0 12px;
  padding: 0 26px;
  font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.15;
  font-variation-settings: 'wdth' 86, 'opsz' 36;
}
.adb-card p { margin: 0 auto 24px; max-width: 38ch; color: var(--ink-2); font-size: 17px; line-height: 1.55; }
.adb-steps { margin: 0 0 22px; padding: 0 0 0 1.4em; text-align: left; display: grid; gap: 10px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.adb-steps li::marker { color: var(--accent-strong); font-weight: 800; }
.adb-steps strong { color: var(--ink); }
.adb-link { margin-top: 12px; padding: 8px 14px; border: 0; background: none; color: var(--accent-strong); font-weight: 600; font-size: 15px; }
.adb-link:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 480px) {
  .adb-card { padding: 30px 20px 22px; border-radius: 24px; }
  .adb-brand { --logo-h: 32px; }
  .adb-card h2 { font-size: 23px; }
  .adb-card p { font-size: 15.5px; }
}

/* Botão grande em pílula (aviso 18+, login, cadastro) */
.btn-pill {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 54px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 19px;
}
.btn-pill-primary { background: var(--accent); color: #fff; }
.btn-pill-primary:hover { background: var(--accent-strong); }
.btn-pill[disabled] { opacity: .6; cursor: progress; }
.btn-pill-soft { background: var(--surface); color: var(--ink); margin-top: 10px; }
.btn-pill-soft:hover { background: var(--surface-2); }

/* ---------- Pop-up de login e cadastro ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(58, 26, 50, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative;
  width: 100%; max-width: 420px;
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;          /* rola, mas sem barra visível */
  background: var(--bg);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(58, 26, 50, .35);
  animation: modal-in .25s cubic-bezier(.2, .9, .3, 1);
}
.modal-card::-webkit-scrollbar { display: none; }
@keyframes modal-in { from { transform: translateY(16px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 1;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none;
  color: var(--muted); font-size: 26px;
}
.modal-close:hover { background: var(--surface); color: var(--ink); }

.auth-form { padding: 30px 24px 22px; }
.auth-form[hidden] { display: none; }
.modal-title {
  margin: 4px 0 20px;
  font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.1;
  font-variation-settings: 'wdth' 84, 'opsz' 36;
}
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; margin-bottom: 7px; font-weight: 700; font-size: 15px; }
.field-label .req { color: var(--muted); font-weight: 500; }
.field-input { position: relative; display: block; }
.field input {
  width: 100%; height: 50px;
  padding: 0 18px;
  border: 2px solid #b5a8b3; border-radius: 999px;
  background: var(--bg);
  font: 500 16px var(--font-ui); color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #9a8f9e; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.field.has-error input { border-color: #d1243f; }
.field-input.has-toggle input { padding-right: 54px; }
.pass-toggle {
  position: absolute; right: 6px; top: 50%; margin-top: -20px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none;
  color: var(--ink-2); font-size: 21px;
}
.pass-toggle:hover { background: var(--surface); }
.field-date { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.field-date legend { padding: 0; }
.date-row { display: grid; grid-template-columns: 1fr 1.6fr 1.15fr; gap: 8px; }
.select-wrap { position: relative; display: block; }
.select-wrap::after {
  content: ''; position: absolute; right: 16px; top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border: solid var(--ink-2); border-width: 0 2px 2px 0;
  transform: rotate(45deg); pointer-events: none;
}
.field select {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 50px;
  padding: 0 34px 0 16px;
  border: 2px solid #b5a8b3; border-radius: 999px;
  background: var(--bg);
  font: 500 16px var(--font-ui); color: var(--ink);
  outline: none; cursor: pointer;
}
.field select:invalid { color: #9a8f9e; }
.field select option { color: var(--ink); }
.field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.field.has-error select { border-color: #d1243f; }
.field-date .field-error { margin-left: 18px; }
.field-help { display: block; margin: 6px 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.field-error { display: block; margin: 6px 0 0 18px; color: #c41e3a; font-size: 13.5px; font-weight: 600; }
.field-error:empty { display: none; }

.check { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 20px; cursor: pointer; font-size: 14.5px; line-height: 1.45; }
.check input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 22px; height: 22px;
  /* centraliza a caixa na primeira linha do texto */
  margin: calc((1.45em - 22px) / 2) 0 0;
  border: 2px solid #b5a8b3; border-radius: 6px;
  display: grid; place-items: center; cursor: pointer;
}
.check input::after { content: ''; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.4px 2.4px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { opacity: 1; }
.check small { display: block; color: var(--muted); font-size: 13px; }
.check.has-error input { border-color: #d1243f; }
.check + .field-error { margin: -12px 0 16px 34px; }

.captcha-slot {
  margin: 0 0 18px;
  min-height: 78px;
  display: grid; place-items: center;
  border: 1.5px dashed var(--line-strong); border-radius: 12px;
  color: var(--muted); font-size: 13px;
}
.form-error { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: #fde8ec; color: #a3172f; font-size: 14px; font-weight: 600; }
.form-error[hidden] { display: none; }
.auth-terms { margin: 0 0 16px; text-align: center; font-size: 14px; color: var(--ink-2); }
.auth-terms a, .auth-switch button, .modal-foot a { color: var(--accent-strong); font-weight: 700; }
.auth-switch { margin: 18px 0 0; text-align: center; font-weight: 700; font-size: 15px; }
.auth-switch button { border: 0; background: none; padding: 4px; font-size: 15px; }
.auth-switch button:hover, .modal-foot a:hover, .auth-terms a:hover { text-decoration: underline; text-underline-offset: 3px; }
.modal-foot { margin: 22px -24px -22px; padding: 16px 24px 18px; border-top: 1px solid var(--line); text-align: center; font-size: 14px; }

.account-box { padding: 34px 24px 26px; text-align: center; }
.account-box .avatar { width: 64px; height: 64px; margin: 0 auto 12px; font-size: 26px; }
.account-box p { margin: 0 0 20px; color: var(--ink-2); }

/* ---------- Pop-up de envio de vídeos ---------- */
.btn-solid {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: 16px;
  transition: background-color .15s;
}
.btn-solid:hover { background: var(--accent-strong); }
.btn-solid[disabled] { opacity: .45; cursor: not-allowed; }

.upload-card {
  max-width: 960px;
  height: min(680px, calc(100svh - 32px));
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
}
.upload-head {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 16px 12px 28px;
  border-bottom: 1px solid var(--line);
}
.upload-head h2 {
  flex: 1; margin: 0;
  font-family: var(--font-display); font-weight: 800; font-size: 24px;
  font-variation-settings: 'wdth' 88, 'opsz' 32;
}
.upload-head .icon-btn { font-size: 24px; color: var(--ink-2); }

.upload-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 20px 24px;
  overflow-y: auto; scrollbar-width: none;
}
.upload-body::-webkit-scrollbar { display: none; }

.dropzone {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
  text-align: center;
  border: 2px dashed transparent;
  border-radius: 20px;
  transition: border-color .15s, background-color .15s;
}
.dz-circle {
  width: 168px; height: 168px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-tint);
  color: var(--accent);
  transition: transform .2s ease;
}
.dz-circle .ic { width: 66px; height: 66px; }
.dz-text { margin: 26px 0 24px; font-size: 19px; font-weight: 500; color: var(--ink); }
.is-dragging .dropzone { border-color: var(--accent); background: color-mix(in srgb, var(--accent-tint) 70%, transparent); }
.is-dragging .dz-circle { transform: translateY(-6px) scale(1.05); }

/* Depois do primeiro arquivo a área de soltar vira uma faixa compacta */
.has-files .dropzone {
  flex: none;
  flex-direction: row; flex-wrap: wrap; gap: 12px 16px;
  padding: 14px 18px;
  border-color: var(--line-strong);
}
.has-files .dz-circle { width: 52px; height: 52px; }
.has-files .dz-circle .ic { width: 24px; height: 24px; }
.has-files .dz-text { margin: 0; font-size: 16px; }
.has-files .dropzone .btn-solid { height: 42px; padding: 0 20px; font-size: 15px; }

.upload-body .form-error { margin: 14px 0 0; }
.upload-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.upload-list:empty { display: none; }
.up-item {
  display: grid; grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 14px; align-items: center;
  padding: 10px;
  border: 1px solid var(--line); border-radius: 16px;
}
.up-thumb {
  width: 128px; height: 72px; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center;
  background: #2a1f30; color: rgba(255, 255, 255, .7); font-size: 26px;
}
.up-thumb canvas { width: 100%; height: 100%; display: block; }
.up-title {
  width: 100%; height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--line-strong); border-radius: 10px;
  font: 600 15px var(--font-ui); color: var(--ink);
  outline: none;
}
.up-title:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.up-meta { display: flex; justify-content: space-between; gap: 10px; margin: 7px 0 6px; font-size: 13px; color: var(--muted); }
.up-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-status { flex: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.up-status .ic { width: 15px; height: 15px; }
.up-item[data-state="done"] .up-status { color: var(--accent-strong); }
.up-item[data-state="error"] .up-status { color: #c41e3a; }
.up-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.up-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .2s linear; }
.up-item[data-state="error"] .up-bar span { background: #c41e3a; }
.up-cancel { font-size: 20px; color: var(--muted); }

.upload-foot {
  padding: 6px 28px 20px;
  text-align: center;
  font-size: 13.5px; line-height: 1.55; color: var(--muted);
}
.upload-foot p { margin: 0 auto; max-width: 78ch; }
.upload-foot a { color: var(--accent-strong); font-weight: 600; }
.upload-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.upload-foot[hidden], .upload-bar[hidden], .upload-body[hidden] { display: none; }
.up-back .ic { transform: rotate(90deg); }
.up-back[hidden] { display: none; }

/* Barra inferior (lista e detalhes) */
.upload-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
}
.ub-icon { color: var(--ink-2); font-size: 22px; display: grid; }
.ub-status { flex: 1; min-width: 0; font-size: 14.5px; color: var(--ink-2); }
.upload-bar .btn-soft { height: 48px; }

/* Fila de vários arquivos */
.up-title-text { margin: 0; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-actions { display: flex; align-items: center; gap: 2px; }
.btn-ghost-sm {
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--bg); font-weight: 600; font-size: 14px;
}
.btn-ghost-sm:hover { border-color: var(--accent); color: var(--accent-strong); }
.up-item[data-state="published"] .up-status { color: var(--accent-strong); }
.up-item[data-state="published"] .up-bar span { background: var(--accent); }

/* Detalhes: título, descrição e miniatura */
.upload-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-auto-rows: max-content;   /* evita que a coluna da prévia encolha dentro da área rolável */
  gap: 28px;
  align-content: start;
  padding: 22px 32px 26px;
}
.upload-details[hidden] { display: none; }
.ud-h {
  margin: 0 0 16px;
  font-family: var(--font-display); font-weight: 800; font-size: 28px;
  font-variation-settings: 'wdth' 88, 'opsz' 36;
}
.ud-box {
  position: relative;
  padding: 10px 14px 26px;
  border: 1.5px solid var(--line-strong); border-radius: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.ud-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.ud-box.has-error { border-color: #d1243f; }
.ud-label { display: block; margin-bottom: 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.ud-box textarea {
  display: block; width: 100%;
  padding: 0; border: 0; outline: 0; background: none; resize: none;
  font: 500 16px/1.45 var(--font-ui); color: var(--ink);
}
.ud-box textarea::placeholder { color: #9a8f9e; }
.ud-box-tall textarea { min-height: 150px; resize: vertical; }
.ud-count { position: absolute; right: 14px; bottom: 7px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ud-error { min-height: 18px; margin: 4px 0 8px 4px; color: #c41e3a; font-size: 13px; font-weight: 600; }
.ud-sub { margin: 10px 0 2px; font-size: 17px; font-weight: 700; }
.ud-help { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.ud-people { border: 0; margin: 4px 0 14px; padding: 0; min-width: 0; }
.ud-people legend { padding: 0; }
.ud-people .req { font-weight: 500; font-size: 13.5px; color: var(--muted); }
.ud-people .seg-btn[aria-checked="true"] { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.ud-docs { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface); }
.ud-docs[hidden] { display: none; }
.ud-docs .ud-help { margin-bottom: 10px; }
.ud-doclist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.ud-doclist li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ud-doclist li > .ic { width: 16px; height: 16px; color: #1a7f45; flex: none; }
.ud-doclist li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-doclist .icon-btn { width: 32px; height: 32px; font-size: 16px; }

.thumb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.thumb-opt {
  position: relative;
  aspect-ratio: 16 / 9;
  padding: 0;
  display: grid; place-items: center;
  border: 2px solid transparent; border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}
.thumb-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.thumb-opt:not(.thumb-upload):hover { border-color: var(--line-strong); }
.thumb-opt[aria-checked="true"]:hover { border-color: var(--accent); }
.thumb-upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1.5px dashed var(--line-strong);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 12.5px; font-weight: 600;
}
.thumb-upload .ic { width: 24px; height: 24px; }
.thumb-upload:hover { border-color: var(--accent); color: var(--accent-strong); }
.thumb-check {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
}
.thumb-check .ic { width: 14px; height: 14px; }
.thumb-loading {
  cursor: default;
  background: linear-gradient(100deg, var(--surface) 30%, #faf8fb 50%, var(--surface) 70%) var(--surface);
  background-size: 300% 100%;
  animation: shimmer 1.3s linear infinite;
}

.ud-side { align-self: start; position: sticky; top: 0; border-radius: 16px; overflow: hidden; background: var(--surface); }
.ud-preview { aspect-ratio: 16 / 9; background: #000; }
.ud-preview video, .ud-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ud-preview [hidden] { display: none; }
.ud-file { margin: 0; padding: 14px 16px 16px; }
.ud-file dt { font-size: 13px; color: var(--muted); }
.ud-file dd { margin: 0 0 10px; font-size: 15px; font-weight: 600; word-break: break-all; }
.ud-file dd:last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .upload-details { grid-template-columns: 1fr; gap: 18px; padding: 16px; }
  .ud-side { order: -1; position: static; }
  .ud-h { font-size: 24px; margin-bottom: 12px; }
  .thumb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upload-bar { flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .upload-bar .ub-status { flex-basis: calc(100% - 40px); font-size: 13.5px; }
  .upload-bar .btn-soft, .upload-bar .btn-solid { flex: 1; height: 46px; }
  .up-actions .btn-ghost-sm { padding: 0 12px; }
}

@media (max-width: 640px) {
  .modal-upload { padding: 0; }
  .upload-card { max-width: none; height: 100svh; max-height: 100svh; border-radius: 0; }
  .upload-head { padding: 8px 6px 8px 18px; }
  .upload-head h2 { font-size: 21px; }
  .upload-body { padding: 16px; }
  .dz-circle { width: 128px; height: 128px; }
  .dz-circle .ic { width: 52px; height: 52px; }
  .dz-text { font-size: 17px; }
  .has-files .dz-text { display: none; }
  .up-item { grid-template-columns: 88px minmax(0, 1fr) auto; gap: 10px; padding: 8px; }
  .up-thumb { width: 88px; height: 50px; }
  .upload-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); font-size: 12.5px; }
}

/* =========================================================
   Painel do criador (painel.html)
   ========================================================= */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
table.sr-only { display: block; left: 0; top: 0; }

.studio { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); }

/* Faixa de abas do painel, logo abaixo do cabeçalho (acompanha o cabeçalho ao rolar) */
.studio-bar {
  position: sticky; top: var(--head-h); z-index: 30;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: top .25s ease;
}
.studio-bar[hidden] { display: none; }
body.is-scrolling-down .studio-bar { top: 0; }
.studio-nav {
  display: flex; align-items: stretch; gap: 2px;
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
}
.studio-nav::-webkit-scrollbar { display: none; }
.studio-nav.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.studio-nav.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.studio-nav.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.studio-nav a {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 50px; padding: 0 12px;
  font-weight: 600; font-size: 15px; color: var(--ink-2);
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.studio-nav a .ic { width: 20px; height: 20px; }
.studio-nav a:hover { color: var(--ink); }
.studio-nav a[aria-current="page"] { color: var(--accent-strong); border-bottom-color: var(--accent); }
.studio-nav-sep { flex: none; align-self: center; width: 1px; height: 24px; margin: 0 10px; background: var(--line-strong); }
.studio-nav [hidden] { display: none !important; }
@media (max-width: 1099px) {
  .studio-nav a .ic { display: none; }
  .studio-nav a { padding: 0 11px; }
}
@media (max-width: 899px) {
  .studio-nav a { padding: 0 9px; height: 46px; }
  .studio-nav-sep { margin: 0 6px; }
}
.studio-main { min-width: 0; padding: 0 var(--gutter) 40px; container: studio / inline-size; }

.studio-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 22px 0 18px; }
/* O título ocupa sempre uma faixa de 48px (a altura dos botões ao lado), então fica na mesma
   altura em todas as abas, com ou sem botão e com ou sem subtítulo. */
.studio-head h1 {
  margin: 0; min-height: 48px; display: flex; align-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.1;
  font-variation-settings: 'wdth' 86, 'opsz' 40;
}
.round-btn {
  width: 48px; height: 48px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: var(--bg); color: var(--ink); font-size: 24px;
}
.round-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-solid-sm { height: 42px; padding: 0 18px; font-size: 15px; white-space: nowrap; flex: none; }
.studio-head > .btn-solid, .studio-head > .round-btn { flex: none; height: 48px; }
.btn-solid .ic { font-size: 20px; }
.btn-soft {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 0; border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 15px;
}
.btn-soft:hover { background: var(--surface-2); }
.btn-soft .ic { font-size: 19px; }
.btn-soft-danger { color: #b3122f; }
.btn-soft[hidden] { display: none; }
.btn-soft-sm { height: 36px; padding: 0 14px; font-size: 14px; white-space: nowrap; vertical-align: middle; }

.studio-gate { max-width: 460px; margin: 60px auto; text-align: center; }
.studio-gate .dz-circle, .studio-empty .dz-circle, .dash-empty .dz-circle { width: 120px; height: 120px; margin: 0 auto 18px; }
.studio-gate .dz-circle .ic, .studio-empty .dz-circle .ic, .dash-empty .dz-circle .ic { width: 48px; height: 48px; }
.studio-gate h1 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 26px; font-variation-settings: 'wdth' 86, 'opsz' 36; }
.studio-gate p { margin: 0 0 22px; color: var(--ink-2); }

/* Cartões do painel */
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
.dash-card {
  container-type: inline-size;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--bg);
}
.dash-card hr { width: 100%; margin: 20px 0; }
.dash-card > .btn-soft { margin-top: 18px; }
.dash-title { margin: 0 0 14px; font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.2; font-variation-settings: 'wdth' 88, 'opsz' 32; }
.dash-label { margin: 0; font-size: 15px; color: var(--ink-2); }
.dash-hero { margin: 2px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dash-sub { margin: 0; font-size: 17px; font-weight: 700; }
.dash-note { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-rows { width: 100%; margin: 12px 0 0; display: grid; gap: 10px; }
.dash-rows > div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.dash-rows dt { color: var(--ink-2); }
.dash-rows dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-top { width: 100%; list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.dash-top li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.dash-top-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-top-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-top-empty { color: var(--muted); font-size: 14px; }
.dash-empty { width: 100%; padding: 30px 8px; text-align: center; border: 1.5px dashed var(--line-strong); border-radius: 14px; }
.dash-empty p { margin: 0 0 20px; color: var(--ink-2); line-height: 1.5; }
.dash-latest .st-thumb-lg { width: 100%; height: auto; aspect-ratio: 16 / 9; margin-bottom: 12px; }
.dash-latest-title { margin: 0 0 4px; font-weight: 700; font-size: 16.5px; }

/* Miniatura com duração (painel e conteúdo) */
.st-thumb {
  position: relative; flex: none;
  width: 128px; aspect-ratio: 16 / 9;
  border-radius: 10px; overflow: hidden;
  display: grid; place-items: center;
  background: #2a1f30; color: rgba(255, 255, 255, .7);
}
.st-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-thumb .badge { position: absolute; right: 6px; bottom: 6px; font-size: 11.5px; padding: 3px 5px; }

.status-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.status-chip .ic { width: 16px; height: 16px; }
.status-chip.is-public .ic { color: #1f8a4c; }
.status-chip.is-review .ic { color: #b26a00; }
.status-chip.is-draft .ic { color: var(--orange-strong); }
.status-chip.is-error { color: #b3122f; }

/* Gráfico */
.dash-chart-card { overflow: visible; }
.chart { position: relative; width: 100%; margin-top: 14px; }
.chart svg { display: block; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-tick { fill: var(--muted); font: 500 11.5px var(--font-ui); }
.ch-bar { fill: var(--accent); transition: opacity .12s; }
.ch-bar.is-dim { opacity: .35; }
.ch-hit { fill: transparent; cursor: pointer; }
.ch-tip {
  position: absolute; z-index: 2; pointer-events: none;
  padding: 7px 10px; border-radius: 10px;
  background: var(--ink); color: #fff;
  font-size: 13px; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(28, 20, 34, .25);
}
.ch-tip strong { font-size: 14px; margin-right: 3px; }
.ch-tip span { display: block; color: rgba(255, 255, 255, .7); font-size: 12px; }

/* Lista de conteúdo */
.content-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.filter-field {
  flex: 1 1 260px; max-width: 420px;
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px;
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  color: var(--muted); font-size: 20px;
}
.filter-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.filter-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 15px var(--font-ui); color: var(--ink); }
.bulk-bar { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14.5px; }
.bulk-bar[hidden] { display: none; }

.content-table-wrap[hidden] { display: none; }
.content-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.content-table th { padding: 12px 10px; text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.content-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.content-table tr.is-selected td { background: #fff5f9; }
.content-table tbody tr:hover td { background: var(--surface); }
.col-check { width: 44px; }
.col-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.col-date span { display: block; white-space: nowrap; }
.col-date small { color: var(--muted); font-size: 12.5px; }
.col-act { text-align: right; white-space: nowrap; }
.col-act .icon-btn { width: 40px; height: 40px; font-size: 21px; color: var(--ink-2); }
.icon-btn-danger:hover { color: #b3122f; background: #fde8ec; }
.row-check {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; margin: 0;
  border: 2px solid #b5a8b3; border-radius: 5px;
  display: grid; place-items: center; cursor: pointer;
}
.row-check::after { content: ''; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2.2px 2.2px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.row-check:checked, .row-check:indeterminate { background: var(--accent); border-color: var(--accent); }
.row-check:checked::after { opacity: 1; }
.row-check:indeterminate::after { opacity: 1; width: 9px; height: 0; border-width: 0 0 2.2px 0; transform: none; }
.st-video { display: flex; align-items: center; gap: 14px; min-width: 0; }
.st-video-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.st-desc { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36ch; }
.st-desc-error { color: #b3122f; }
.studio-empty { padding: 50px 16px; text-align: center; color: var(--ink-2); }
.studio-empty[hidden] { display: none; }
.studio-empty p { margin: 0 0 18px; font-size: 17px; }

/* Modal de exclusão */
.del-card { max-width: 560px; padding: 30px 30px 24px; }
.del-title { margin: 0 0 20px; font-family: var(--font-display); font-weight: 800; font-size: 23px; line-height: 1.2; font-variation-settings: 'wdth' 88, 'opsz' 32; }
.del-preview { display: grid; gap: 10px; padding: 16px; border-radius: 14px; background: var(--surface); margin-bottom: 20px; }
.del-item { display: flex; align-items: center; gap: 16px; }
.del-item .st-thumb { width: 150px; }
.del-item-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.del-more { margin: 0; }
.del-check { font-size: 15.5px; color: var(--ink); }
.del-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.del-spacer { flex: 1; }
.del-actions .btn-solid { height: 44px; }

/* A tabela de conteúdo vira lista de cartões quando a área do painel fica estreita */
@container studio (max-width: 860px) {
  .content-table thead { display: none; }
  .content-table, .content-table tbody, .content-table tr, .content-table td { display: block; }
  .content-table tr {
    position: relative;
    display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 6px 10px;
    padding: 12px 0; border-bottom: 1px solid var(--line);
  }
  .content-table td { padding: 0; border: 0; background: none !important; }
  .content-table .col-check { grid-row: 1; padding-top: 2px; }
  .content-table .col-video { grid-column: 2 / 4; grid-row: 1; padding-right: 0; }
  .content-table .col-status, .content-table .col-date, .content-table .col-num { grid-column: 2 / 3; display: inline-flex; gap: 6px; font-size: 13px; color: var(--ink-2); text-align: left !important; }
  .content-table .col-date small { display: none; }
  .content-table .col-num::before { content: attr(data-label) ':'; color: var(--muted); }
  .content-table tr.is-draft .col-num { display: none; }
  .content-table .col-act { grid-column: 3; grid-row: 2 / 6; align-self: center; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
  .content-table .st-thumb { width: 112px; }
  .content-table .st-desc { display: none; }
}
@media (max-width: 760px) {
  .st-thumb { width: 112px; }
  .del-card { padding: 24px 18px 18px; }
  .del-item .st-thumb { width: 112px; }
  .del-spacer { display: none; }
  .del-actions { justify-content: flex-end; }
  .del-actions [data-del-download] { flex-basis: 100%; }
  .hide-sm { display: none; }
}

@media (min-width: 900px) {
  .studio-head h1 { font-size: 34px; }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1240px) {
  .dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =========================================================
   Administração (dentro do painel)
   ========================================================= */
.role-chip {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 4px; padding: 3px 10px;
  border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 700;
}
.role-chip[hidden] { display: none; }
.account-box .role-chip { margin: -8px auto 16px; }
.nav-count {
  margin-left: 2px; min-width: 22px; padding: 1px 7px;
  border-radius: 999px; background: var(--accent-strong); color: #fff;
  font-size: 12px; font-weight: 700; text-align: center;
}
.nav-count:empty { display: none; }
.nav-count[data-nav-count="revisao"] { background: var(--yellow); color: var(--brown); }
.studio-sub { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; max-width: 70ch; }

.adm-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 16px; }
.adm-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg-btn {
  height: 38px; padding: 0 15px;
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  background: var(--bg); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.seg-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.seg-btn[aria-pressed="true"] { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.select-sm select, .select-sm.select-wrap select {
  appearance: none; -webkit-appearance: none;
  height: 40px; padding: 0 34px 0 14px;
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  background: var(--bg); font: 500 14px var(--font-ui); color: var(--ink); cursor: pointer;
}
.select-sm select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.select-sm::after { right: 14px; width: 7px; height: 7px; margin-top: -5px; }
.select-inline select { height: 34px; font-size: 13.5px; }
.select-inline select:disabled { opacity: .6; cursor: not-allowed; }
.filter-sm { height: 40px; flex: 0 1 240px; }

/* Tabela genérica (vira cartões no celular) */
.data-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.data-table th { padding: 11px 10px; text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:hover td { background: var(--surface); }
.data-table tr.is-urgent td { background: #fff6f8; }
.data-table tr.is-urgent td:first-child { box-shadow: inset 3px 0 0 #c8102e; }
.data-table tr.is-muted .st-title, .data-table tr.is-muted .user-avatar { opacity: .55; }
.data-table .col-act { text-align: right; white-space: nowrap; }
.data-table .col-date, .data-table td[data-label="Cadastro"], .data-table td[data-label="Última"] { white-space: nowrap; }
.user-cell .st-desc { max-width: 30ch; }
.data-table .col-act > * + * { margin-left: 6px; }
.data-table-compact td { padding: 9px 8px; }
.st-thumb-sm { width: 88px; }
.adm-count { margin: 0 0 6px; }

.reason-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.reason-chip .ic { width: 15px; height: 15px; }
.reason-chip.is-high { background: #fde6ea; color: #a3112b; }
.btn-danger, .btn-solid.btn-danger { background: #c8102e; }
.btn-danger:hover, .btn-solid.btn-danger:hover { background: #a50d26; }

.adm-card { max-width: 620px; padding: 30px 28px 24px; }
.adm-alert { display: flex; gap: 10px; align-items: flex-start; margin: -6px 0 16px; padding: 12px 14px; border-radius: 12px; background: #fde6ea; color: #8a0f25; font-size: 14px; line-height: 1.45; }
.adm-alert .ic { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.adm-notes { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.adm-notes li { padding: 10px 12px; border-radius: 10px; background: var(--surface); color: var(--ink-2); font-size: 14.5px; }
.adm-gap { margin-top: 18px; }
.adm-textarea {
  display: block; width: 100%; padding: 10px 14px;
  border: 2px solid #b5a8b3; border-radius: 14px; resize: vertical;
  font: 500 15px/1.45 var(--font-ui); color: var(--ink); outline: none;
}
.adm-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.adm-outcome { display: flex; align-items: center; gap: 6px; margin: 18px 0 0; font-weight: 700; color: var(--accent-strong); }
.adm-outcome .ic { width: 18px; height: 18px; }
.adm-dlg-text { margin: -8px 0 16px; color: var(--ink-2); line-height: 1.5; }
.adm-dlg-field { margin-bottom: 18px; }
.adm-loading { display: grid; gap: 12px; max-width: 520px; padding: 10px 0; }
.adm-loading .sk { display: block; height: 16px; margin: 0; background: var(--surface); border-radius: 6px; animation: shimmer 1.3s linear infinite; background-image: linear-gradient(100deg, var(--surface) 30%, #faf8fb 50%, var(--surface) 70%); background-size: 300% 100%; }

/* Indicadores */
.kpi-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--bg); text-align: left; min-width: 0;
}
.kpi-btn { cursor: pointer; font: inherit; color: inherit; position: relative; }
.kpi-btn:hover { border-color: var(--line-strong); }
.kpi-btn[aria-selected="true"] { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); background: #fff8fb; }
.kpi-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.kpi-value { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 18px; }
.kpi-note { font-size: 12.5px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta .ic { width: 14px; height: 14px; }
.delta.is-up { color: #1a7f45; }
.delta.is-down { color: #b3122f; }
.delta.is-down .ic { transform: rotate(180deg); }

.adm-chart-card { margin-bottom: 16px; align-items: stretch; }
.adm-two { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.adm-two .dash-card { align-items: stretch; }

/* Barras horizontais */
.hbars { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 11.5em) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.hb-label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 12px; }
.hb-fill { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.hb-value { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }

/* Linha */
.ln-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ln-area { fill: var(--accent); opacity: .1; }
.ln-dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.ln-cross { stroke: var(--line-strong); stroke-width: 1; }
.ln-cross[hidden], .ln-hover[hidden] { display: none; }

/* Mapa de calor */
.heat { position: relative; margin-top: 14px; width: 100%; }
.heat-grid { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; }
.heat-day, .heat-hour { font-size: 11.5px; color: var(--muted); }
.heat-day { align-self: center; }
.heat-hour { padding-top: 4px; white-space: nowrap; }
.heat-cell { height: clamp(9px, 2.6cqi, 26px); border-radius: 3px; min-width: 0; }
.heat-cell:hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.heat-legend i { width: 16px; height: 12px; border-radius: 2px; display: block; }
.heat-legend span { margin: 0 4px; }
.heat-tip { white-space: nowrap; }

/* Revisão: fila + detalhe */
.rv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rv-item {
  width: 100%; display: flex; align-items: flex-start; gap: 12px;
  padding: 10px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); text-align: left; cursor: pointer;
}
.rv-item:hover { border-color: var(--line-strong); }
.rv-item[aria-current="true"] { border-color: var(--accent); background: #fff8fb; box-shadow: inset 3px 0 0 var(--accent); }
.rv-item-text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.rv-item .st-title { font-size: 14.5px; -webkit-line-clamp: 2; }
.rv-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.rv-badge .ic { width: 13px; height: 13px; }
.rv-badge.is-ok { background: #e3f6ec; color: #136b3a; }
.rv-badge.is-warn { background: #fff3db; color: #8a5a00; }
.rv-badge.is-block { background: #fde6ea; color: #a3112b; }
.rv-badge.is-wait { background: var(--surface); color: var(--ink-2); }

.rv-detail { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 20px; }
.rv-detail:empty { display: none; }
.rv-back { display: none; align-items: center; gap: 6px; margin: -4px 0 12px; padding: 6px 0; border: 0; background: none; color: var(--accent-strong); font-weight: 700; font-size: 15px; }
.rv-back .ic { transform: rotate(90deg); width: 18px; height: 18px; }
.rv-preview { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.rv-preview video, .rv-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-title { margin: 14px 0 2px; font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.2; font-variation-settings: 'wdth' 90, 'opsz' 32; }
.rv-checks { list-style: none; margin: 16px 0 18px; padding: 0; display: grid; gap: 8px; }
.rv-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface); font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.rv-check strong { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 1px; }
.rv-check-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.rv-check-ic .ic { width: 16px; height: 16px; }
.rv-check.is-ok .rv-check-ic { background: #1a7f45; }
.rv-check.is-warn .rv-check-ic { background: #c27a00; }
.rv-check.is-block { background: #fff1f3; }
.rv-check.is-block .rv-check-ic { background: #c8102e; }
.rv-check.is-info .rv-check-ic { background: var(--muted); }
.rv-people { list-style: none; margin: 10px 0 16px; padding: 0; display: grid; gap: 8px; }
.rv-people li { display: flex; align-items: center; gap: 12px; }
.rv-person { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; color: var(--ink-2); }
.rv-person strong { color: var(--ink); font-size: 14.5px; }
.rv-blocked { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #fff3db; color: #6b4600; font-size: 14px; line-height: 1.45; }
.rv-blocked .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.rv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.rv-actions .btn-solid { height: 46px; }
.rv-actions .btn-solid[disabled] { background: var(--line-strong); color: #fff; opacity: 1; }

@container studio (min-width: 860px) {
  .rv { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
  .rv-detail { position: sticky; top: calc(var(--head-h) + 12px); }
}
@container studio (max-width: 859px) {
  .rv.has-selection .rv-list { display: none; }
  .rv-back { display: inline-flex; }
  .rv-actions .del-spacer { display: none; }
  .rv-actions .btn-solid { flex: 1 1 100%; order: -1; }
}

/* Usuários */
.user-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-avatar { width: 38px; height: 38px; font-size: 16px; flex: none; }
.user-cell .st-title { display: inline-flex; align-items: center; gap: 4px; -webkit-line-clamp: 1; }

/* Tabelas viram cartões quando não cabem (nunca rolam para o lado) */
@container (max-width: 1000px) {
  .data-table:not(.data-table-compact) thead { display: none; }
  .data-table:not(.data-table-compact), .data-table:not(.data-table-compact) tbody { display: block; }
  .data-table:not(.data-table-compact) tr {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px 18px;
    padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .data-table:not(.data-table-compact) td {
    display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
    padding: 0; border: 0; background: none !important; box-shadow: none !important;
    font-size: 14px; text-align: left !important; min-width: 0;
  }
  .data-table:not(.data-table-compact) td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; font-weight: 600; }
  .data-table:not(.data-table-compact) td.cell-main { grid-column: 1 / -1; display: block; }
  .data-table:not(.data-table-compact) td.col-act { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .data-table:not(.data-table-compact) td.col-act > * + * { margin-left: 0; }
  .data-table:not(.data-table-compact) tr.is-urgent { box-shadow: inset 3px 0 0 #c8102e; padding-left: 12px; }
  .data-table:not(.data-table-compact) td[data-label="Motivo"] { grid-column: 1 / -1; }
  .data-table:not(.data-table-compact) td[data-label="Motivo"]::before { display: none; }
}
@container (max-width: 380px) {
  .data-table-compact thead { display: none; }
  .data-table-compact, .data-table-compact tbody { display: block; }
  .data-table-compact tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .data-table-compact td { display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; text-align: left !important; }
  .data-table-compact td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; }
  .data-table-compact td.cell-main { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .data-table .st-thumb { width: 104px; }
  .adm-card { padding: 24px 18px 18px; }
  .seg { flex-wrap: wrap; max-width: 100%; }
  .adm-filters, .adm-filters > *, .adm-toolbar .filter-field { flex: 1 1 100%; max-width: none; }
  .adm-filters .select-wrap select { width: 100%; }
  .hbars li { grid-template-columns: minmax(80px, 7.5em) minmax(0, 1fr) auto; }
  .heat-grid { grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 1.5px; }
  .heat-cell { min-height: 0; border-radius: 2px; }
}
@container studio (min-width: 640px) {
  .kpi-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .adm-filters { flex-wrap: nowrap; }
}
@container studio (min-width: 760px) {
  .adm-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
   Gráficos de insights (charts.js)
   ========================================================= */
.hbars-rank li { grid-template-columns: 1.6em minmax(90px, 11.5em) minmax(0, 1fr) auto; }
.hb-rank { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.hb-extra { color: var(--muted); font-weight: 500; font-size: 12.5px; }

.ln-mark { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.ln-dot-mark { fill: #fff; stroke: var(--ink-2); stroke-width: 1.5; }
.ch-mark { fill: var(--ink-2); font: 600 11px var(--font-ui); }
.ch-tip .tip-note { margin-top: 2px; color: #ffc2dc; font-weight: 600; }

.col-bar { fill: #f28ab6; }
.col-bar.is-hi { fill: var(--accent); }
.ch-val { fill: var(--ink); font: 700 12px var(--font-ui); font-variant-numeric: tabular-nums; }

/* Barras divergentes (afinidade) */
.dvg { margin-top: 14px; width: 100%; }
.dvg-legend { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding-left: calc(min(9em, 34%) + 10px); padding-right: calc(3.4em + 10px); font-size: 12px; color: var(--muted); }
.dvg-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dvg-legend i { width: 10px; height: 10px; border-radius: 2px; display: block; }
.dvg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dvg-list li { display: grid; grid-template-columns: minmax(70px, min(9em, 34%)) minmax(0, 1fr) 3.4em; align-items: center; gap: 10px; font-size: 14px; }
.dvg-label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dvg-track { position: relative; height: 14px; }
.dvg-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--ink-2); }
.dvg-fill { position: absolute; top: 0; height: 100%; }
.dvg-fill.is-pos { background: #e8277f; border-radius: 0 4px 4px 0; }
.dvg-fill.is-neg { background: #4255c9; border-radius: 4px 0 0 4px; }
.dvg-val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

/* Matriz de índice: no estreito, vira de lado (gêneros nas linhas) para nunca rolar */
.ixh { position: relative; margin-top: 14px; width: 100%; }
.ixh-grid { display: grid; grid-template-columns: minmax(84px, 9em) repeat(var(--c), minmax(0, 1fr)); gap: 3px; }
.ixh-corner { font-size: 12px; color: var(--muted); align-self: end; padding-bottom: 4px; }
.ixh-col { font-size: 11.5px; color: var(--ink-2); text-align: center; align-self: end; padding-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ixh-row { font-size: 13px; color: var(--ink-2); align-self: center; white-space: nowrap; }
.ixh-cell { display: grid; place-items: center; min-height: 34px; border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ixh-cell.is-strong { color: #fff; font-weight: 700; }
.ixh-cell:hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.ixh-legend { flex-wrap: wrap; }
.ixh-note { color: var(--ink-2); font-weight: 600; }
@container (max-width: 640px) {
  .ixh-grid { grid-auto-flow: column; grid-template-columns: minmax(72px, 7em) repeat(var(--r), minmax(0, 1fr)); grid-template-rows: repeat(var(--c1), auto); gap: 2px; }
  .ixh-col { text-align: left; align-self: center; padding: 0; font-size: 13px; }
  .ixh-row { text-align: center; align-self: end; padding-bottom: 4px; font-size: 10.5px; letter-spacing: -.02em; overflow: hidden; }
  .ixh-cell { font-size: 11px; }
  .ixh-cell { min-height: 30px; }
}

/* Mapa do Brasil em quadradinhos */
.tmap { position: relative; margin: 14px auto 0; width: 100%; max-width: 380px; }
.tmap-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(8, auto); gap: 4px; }
.tmap-tile { display: grid; place-items: center; aspect-ratio: 1; border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.tmap-tile.is-dark { color: #fff; }
.tmap-tile.is-empty { background: var(--bg); border: 1px dashed var(--line-strong); color: var(--muted); font-weight: 600; }
.tmap-tile:hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.tmap .heat-legend { justify-content: center; }

/* =========================================================
   Insights (painel do administrador e página pública)
   ========================================================= */
.ins-toolbar { margin-bottom: 10px; }
.ins-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; }
.ins-actions .btn-soft .ic { width: 18px; height: 18px; }
.ins-report { transition: opacity .15s; }
.ins-report.is-updating { opacity: .45; pointer-events: none; }
.ins-suppressed p { max-width: 460px; margin-left: auto; margin-right: auto; }

.ins-sec { margin: 0 0 40px; }
.ins-sec-head { margin: 0 0 16px; }
.ins-sec-head h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.15; font-variation-settings: 'wdth' 86, 'opsz' 36; }
.ins-sec-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 15.5px; max-width: 62ch; }
.ins-sec > .dash-card, .ins-sec .adm-two + .dash-card, .ins-sec .dash-card + .adm-two { margin-top: 16px; }
.ins-sec .adm-two { align-items: stretch; }
.ins-card { align-items: stretch; min-width: 0; }
.ins-card .dash-title { margin-bottom: 4px; font-size: 19px; }
.ins-card .dash-note { margin-bottom: 4px; }
.ins-card .seg { margin-top: 12px; }
.ins-kpis { margin-bottom: 0; }
.ins-kpis .kpi-value { font-size: 24px; }

/* Destaques escritos automaticamente */
.ins-highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.ins-hl { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); min-width: 0; }
.ins-hl-ic { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 8px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-strong); }
.ins-hl-ic .ic { width: 20px; height: 20px; }
.ins-hl.is-orange .ins-hl-ic { background: var(--orange-tint); color: var(--orange-strong); }
.ins-hl.is-yellow .ins-hl-ic { background: var(--yellow-tint); color: var(--brown); }
.ins-hl-kind { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ins-hl h3 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.2; font-variation-settings: 'wdth' 88, 'opsz' 28; overflow-wrap: anywhere; }
.ins-hl p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }

/* Ranking de buscas */
.ins-rank { list-style: none; margin: 12px 0 0; padding: 0; }
.ins-rank li { display: grid; grid-template-columns: 1.8em minmax(0, 1fr) auto 3.6em; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; break-inside: avoid; }
.ins-rank li:first-child .ins-rank-term { font-weight: 700; }
.ins-rank-pos { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.ins-rank-term { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-rank-n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.mv { display: inline-flex; align-items: center; gap: 1px; min-width: 2.4em; justify-content: flex-end; font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mv .ic { width: 13px; height: 13px; }
.mv-up { color: #1a7f45; }
.mv-down { color: #b3122f; }
.mv-down .ic { transform: rotate(180deg); }
.mv-new { padding: 1px 7px; border-radius: 999px; background: var(--yellow-tint); color: var(--brown); min-width: 0; }

.ins-sub { margin: 26px 0 0; }
.ins-more { margin-top: 14px; align-self: flex-start; }
.ins-states tr[hidden] { display: none !important; }
.ins-method { margin: 8px 0 0; padding: 20px; border-radius: 18px; background: var(--surface); color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.ins-method h2 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.ins-method p { margin: 0; max-width: 80ch; }

@container (min-width: 380px) {
  .ins-rank { columns: 2; column-gap: 24px; }
}
@container studio (min-width: 1000px) {
  .ins-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container studio (max-width: 559px) {
  .ins-highlights { gap: 8px; }
  .ins-hl { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; padding: 14px; }
  .ins-hl-ic { grid-row: span 3; margin: 0; }
  .ins-hl h3 { font-size: 17px; }
  .ins-actions .del-spacer { flex-basis: 100%; height: 0; }
  .ins-actions [data-ins-scope] { flex-basis: 100%; }
  .ins-sec-head h2 { font-size: 21px; }
}

/* =========================================================
   Página do vídeo
   ========================================================= */
.watch {
  /* Vídeo centralizado; em telas baixas encolhe para caber inteiro na altura */
  max-width: clamp(480px, calc((100svh - 150px) * 16 / 9), 1120px);
  margin: 0 auto;
}
.watch-main { min-width: 0; }

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.player-shell > video, .player-shell .fluid_video_wrapper { width: 100% !important; height: 100% !important; }
.player-shell .fluid_video_wrapper { vertical-align: top; }

.watch-info { padding: 14px var(--gutter) 0; }
.watch-head { display: flex; flex-direction: column; gap: 8px; }
.watch-heading { min-width: 0; }
.watch-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 21px;
  line-height: 1.22;
  font-variation-settings: 'wdth' 92, 'opsz' 32;
  letter-spacing: -0.01em;
}
.watch-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.watch-stats span { display: inline-flex; align-items: center; gap: 5px; }
.watch-stats .ic { width: 16px; height: 16px; }

/* Ações minimalistas: só ícone (e o número de curtidas) */
.watch-actions { display: flex; align-items: center; gap: 2px; margin-left: -8px; flex: none; }
.act {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; min-width: 40px; padding: 0 8px;
  border: 0; border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-weight: 600; font-size: 15px;
  font-variant-numeric: tabular-nums;
  transition: background-color .15s, color .15s;
}
.act .ic { width: 24px; height: 24px; }
.act:hover { background: var(--surface); color: var(--ink); }
.act[aria-pressed="true"] { color: var(--accent-strong); }
.act[aria-pressed="true"] .ic { color: var(--accent); }
.act-save[aria-pressed="true"] { color: var(--brown); }

/* Curtida: o coração pula e solta um anel */
.act-like { position: relative; }
.act-like.pop .ic { animation: heart-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.act-like.pop::after {
  content: ''; position: absolute; left: 5px; top: 50%;
  width: 30px; height: 30px; margin-top: -15px;
  border-radius: 50%; border: 2px solid var(--accent);
  animation: heart-ring .5s ease-out forwards;
  pointer-events: none;
}
@keyframes heart-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes heart-ring { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }

.creator-row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px; padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #8a3ffc);
  color: #fff;
  font: 800 19px/1 var(--font-display);
}
.creator-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.creator-info .creator { font-size: 15.5px; }
.creator-sub { font-size: 13px; color: var(--muted); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tag-row:empty { display: none; }

.desc-box { background: var(--surface); border-radius: 12px; padding: 12px 14px; }
.desc {
  margin: 0; white-space: pre-line; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.desc-box.is-open .desc { display: block; }
.desc-more { margin-top: 6px; padding: 0; border: 0; background: none; font-weight: 700; color: var(--accent-strong); }

/* ---------- Fluid Player: ajustes ---------- */

/* Ondas do som acima da barra de tempo */
.fp-wave {
  position: absolute; left: 0; right: 0;
  bottom: calc(100% - 5px);
  pointer-events: none;
}
.fp-wave canvas { display: block; }
.fluid_video_wrapper.has-wave .fluid_controls_container::before {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 100%;
  height: calc(var(--fp-wave-h, 30px) + 20px);
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .38));
  pointer-events: none;
}
.fluid_video_wrapper.is-ad-playing .fp-wave,
.fluid_video_wrapper.is-ad-playing .fluid_controls_container::before { display: none !important; }

/* Miniatura da barra de tempo fica acima das ondas */
.fluid_video_wrapper.has-wave .fluid_timeline_preview_container,
.fluid_video_wrapper.has-wave .fluid_timeline_preview_container_shadow {
  bottom: calc(var(--fp-wave-h, 0px) + 12px) !important;
}
.fluid_video_wrapper .fluid_timeline_preview_container { border-radius: 6px; overflow: hidden; border: 2px solid #fff !important; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }

/* =========================================================
   Telas maiores
   ========================================================= */
@media (min-width: 560px) {
  :root { --gutter: 16px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-title { font-size: 28px; }
  .btn-create { width: auto; padding: 0 16px 0 12px; }
  .btn-create span { display: inline; }
}

@media (min-width: 760px) {
  .watch { padding: 16px var(--gutter) 0; }
  .player-shell { border-radius: 12px; overflow: hidden; }
  .watch-info { padding: 16px 0 0; }
  .watch-title { font-size: 25px; }
  .watch-head { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 24px; }
  .watch-actions { margin: 0 -8px 0 0; }
}

@media (min-width: 900px) {
  :root { --gutter: 22px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 20px; }
}

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