/* Clipador — tema escuro, mobile-first, alvos de toque grandes. */

:root {
  --bg: #0e1014;
  --surface: #171a21;
  --surface-2: #1f232c;
  --border: #2b303b;
  --text: #e9eaee;
  --muted: #9aa1ad;
  --accent: #22c55e;
  --accent-strong: #16a34a;
  --danger: #ef4444;
  --warn: #f59e0b;
  --info: #60a5fa;
  --radius: 14px;
  --tap: 48px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--info); }
a:hover { text-decoration: none; }

h1 { font-size: 1.45rem; margin: 0 0 .5rem; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 .3em;
  font-size: .9em;
  word-break: break-all;
}

/* ---------- Topo ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  padding-top: max(.5rem, env(safe-area-inset-top));
  background: rgba(14, 16, 20, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.nav {
  display: flex;
  gap: .25rem;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: .65rem .8rem;
  border-radius: 10px;
  white-space: nowrap;
  font-weight: 600;
}
.nav a.active { color: var(--text); background: var(--surface-2); }
.logout { margin: 0; }
.btn-link {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  min-height: var(--tap);
  padding: 0 .5rem;
  cursor: pointer;
}

/* ---------- Estrutura ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem .85rem 2rem;
  flex: 1;
}
.footer {
  display: flex;
  justify-content: center;
  gap: .6rem;
  padding: 1.25rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: .85rem;
}
.footer a { color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .5rem;
}
.back {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: .25rem;
}
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.center { text-align: center; }
.empty {
  color: var(--muted);
  text-align: center;
  padding: 2.5rem 1rem;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.actions form { margin: 0; }

/* ---------- Mensagens ---------- */
.flash {
  border-radius: 12px;
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.flash-ok { border-color: rgba(34, 197, 94, .5); background: rgba(34, 197, 94, .12); }
.flash-erro { border-color: rgba(239, 68, 68, .55); background: rgba(239, 68, 68, .12); }
.flash-aviso { border-color: rgba(245, 158, 11, .55); background: rgba(245, 158, 11, .12); }
.notice {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: .8rem 1rem;
  background: var(--surface-2);
}
.notice .btn { margin-top: .6rem; }
.error-text { color: #fca5a5; white-space: pre-wrap; word-break: break-word; }

/* ---------- Formulários ---------- */
.stack { display: flex; flex-direction: column; gap: .5rem; }
.stack > label:not(.check) { font-weight: 600; margin-top: .35rem; }
input, select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: .7rem .8rem;
  font: inherit;
  font-size: 16px; /* evita zoom automático no iOS */
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
textarea { resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--info);
  outline-offset: 1px;
  border-color: transparent;
}
input[type="checkbox"] {
  width: 24px;
  height: 24px;
  min-height: 0;
  margin: 0;
  flex: none;
  accent-color: var(--accent);
}
fieldset.box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem .9rem .9rem;
  margin: .5rem 0 0;
  min-width: 0;
}
legend { font-weight: 700; padding: 0 .35rem; }
.check {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  min-height: var(--tap);
  padding: .55rem 0;
  cursor: pointer;
}
.check > span { padding-top: .1rem; }
.check-big { font-size: 1.05rem; font-weight: 600; }
.checks { display: flex; flex-direction: column; margin-top: .25rem; }
.legal { color: var(--muted); margin: .75rem 0 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: var(--tap);
  padding: .6rem 1.1rem;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-small { min-height: 42px; padding: .45rem .9rem; font-size: .92rem; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-danger { background: transparent; border-color: rgba(239, 68, 68, .6); color: #fca5a5; }
.btn-approve {
  min-height: 62px;
  margin-top: .75rem;
  font-size: 1.2rem;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
  box-shadow: 0 6px 18px rgba(22, 163, 74, .35);
}
.btn-approve:hover { background: var(--accent); }

/* ---------- Badges e etiquetas ---------- */
.tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  padding: .1rem .5rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  vertical-align: middle;
}
.badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}
.badge-live { background: rgba(239, 68, 68, .18); color: #fca5a5; }
.badge-rec { background: rgba(239, 68, 68, .9); color: #fff; }
.badge-warn { background: rgba(245, 158, 11, .2); color: #fcd34d; }
.badge-ok { background: rgba(34, 197, 94, .18); color: #86efac; }
.status {
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
}
.status-ready, .status-published, .status-pub-published, .status-pub-sent_to_inbox { color: #86efac; }
.status-approved, .status-pub-queued, .status-pub-uploading, .status-pub-processing,
.status-pending_render, .status-rendering { color: #93c5fd; }
.status-render_failed, .status-failed, .status-pub-failed { color: #fca5a5; }
.status-rejected { color: var(--muted); }

/* ---------- Canais ao vivo ---------- */
.live-strip {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  margin-bottom: .75rem;
}
.live-item {
  flex: none;
  max-width: 85vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .6rem .8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .25);
}
.live-title {
  flex-basis: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Abas de filtro ---------- */
.tabs {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  margin-bottom: .75rem;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 42px;
  padding: .4rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
}
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.count {
  font-size: .78rem;
  background: rgba(127, 127, 127, .25);
  border-radius: 999px;
  padding: 0 .45rem;
}

/* ---------- Grade de clipes ---------- */
.clip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
}
.clip-card {
  padding: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #000;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
  padding: .5rem;
}
.score {
  position: absolute;
  top: .45rem;
  left: .45rem;
  min-width: 2.2rem;
  text-align: center;
  font-weight: 800;
  font-size: .9rem;
  padding: .15rem .45rem;
  border-radius: 8px;
  color: #0b0d10;
}
.score-inline { position: static; display: inline-block; }
.score-high { background: var(--accent); }
.score-mid { background: var(--warn); }
.score-low { background: #9ca3af; }
.duration {
  position: absolute;
  bottom: .45rem;
  right: .45rem;
  background: rgba(0, 0, 0, .75);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 6px;
}
.clip-meta { padding: .6rem .7rem .75rem; }
.clip-title {
  font-weight: 600;
  font-size: .95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .2rem;
}

/* ---------- Página do clipe ---------- */
.clip-layout { display: flex; flex-direction: column; gap: 1rem; }
.player {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 9 / 16;
  max-height: 72vh;
  margin: 0 auto;
  width: 100%;
  max-width: calc(72vh * 9 / 16);
}
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.clip-heading { font-size: 1.2rem; margin: .6rem 0 .3rem; }
.hook-preview { margin-top: .5rem; font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.reason { color: var(--muted); margin: .75rem 0 0; }

.creator {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.creator .badge { margin-left: auto; }
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}
.commercial {
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}
.commercial p { margin: 0 0 .25rem; }
.commercial-options {
  display: none;
  flex-direction: column;
  padding-left: .25rem;
}
.commercial:has(input[name="tt_commercial"]:checked) .commercial-options { display: flex; }
.branded-policy { display: none; }
.branded-policy.show,
.tiktok-box:has(input[name="tt_commercial"]:checked):has(input[name="tt_brand_content"]:checked) .branded-policy {
  display: inline;
}
@supports not selector(:has(*)) {
  .commercial-options { display: flex; }
  .branded-policy { display: inline; }
}

.pub-list { list-style: none; margin: 0; padding: 0; }
.pub { padding: .75rem 0; border-top: 1px solid var(--border); }
.pub:first-child { border-top: 0; padding-top: 0; }
.pub form { margin-top: .5rem; }

details > summary {
  cursor: pointer;
  font-weight: 700;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  list-style-position: inside;
}
details[open] > summary { margin-bottom: .5rem; }
.danger-zone > summary { color: #fca5a5; }

/* ---------- Listas (lives, canais) ---------- */
.list { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1rem; }
.list-item { margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.list-item.disabled { opacity: .6; }
.list-item .btn { align-self: flex-start; margin-top: .35rem; }
.list-title { font-weight: 600; }
.strategy { color: var(--muted); white-space: pre-wrap; }

/* ---------- Login, textos e erro ---------- */
.login-card { max-width: 420px; margin: 8vh auto 0; }
.login-title { font-size: 1.8rem; }
.prose { max-width: 760px; margin: 0 auto 1rem; }
.prose h2 { margin-top: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.error-card { max-width: 520px; margin: 6vh auto 0; text-align: center; }
.error-card .actions { justify-content: center; }

/* ---------- Telas maiores ---------- */
@media (min-width: 640px) {
  .clip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .container { padding: 1.25rem 1.25rem 2.5rem; }
}
@media (min-width: 900px) {
  .clip-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .clip-layout {
    display: grid;
    grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
    align-items: start;
  }
  .clip-media { position: sticky; top: 76px; }
  .player { max-width: none; max-height: 80vh; }
}

/* ---------- Editor de estilo, layout e pré-visualização ---------- */
.btn-ghost { background: transparent; }
.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 0 -.85rem 1rem;
  padding: .6rem .85rem;
  padding-bottom: max(.6rem, env(safe-area-inset-bottom));
  background: rgba(14, 16, 20, .94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}
.channel-form, .clip-style-form { display: block; }
.clip-style-form > .btn { margin-top: .5rem; }
.editor-grid { display: flex; flex-direction: column; gap: 0; }
.editor-main { min-width: 0; }
.editor-main > .field { margin-bottom: .75rem; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field > label { font-weight: 600; }
.field-bool { flex-direction: row; font-weight: 600; }
.range-label { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.range-label output { font-weight: 700; color: var(--info); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem 1rem; }
fieldset.group { margin-top: .75rem; }
.mode-wrap > .field { margin-bottom: .5rem; }
.preset-row { margin-top: .25rem; }
.mode-wrap[data-mode="channel"] .preset-row,
.mode-wrap[data-mode="channel"] .custom-only,
.mode-wrap[data-mode="preset"] .custom-only { display: none; }
.mode-wrap + .mode-wrap { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--border); }
input[type="range"] {
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--info);
}
input[type="range"]:focus { outline-offset: 2px; }
input[type="range"]:disabled { opacity: .4; }
input[type="color"] {
  width: 100%;
  min-height: 44px;
  padding: .25rem;
  cursor: pointer;
}

/* Pré-visualização: grudada no topo no celular, coluna lateral em telas largas. */
.preview-pane {
  position: sticky;
  top: 66px;
  z-index: 4;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: .6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.preview-frame {
  position: relative;
  flex: none;
  width: 92px;
  aspect-ratio: 9 / 16;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: repeating-linear-gradient(45deg, #111318 0 10px, #161920 10px 20px);
  cursor: zoom-in;
  transition: width .2s ease;
}
.preview-pane.big .preview-frame { width: min(62vw, 300px); cursor: zoom-out; }
.preview-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-frame img[hidden] { display: none; }
.preview-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .4rem;
  text-align: center;
  font-size: .75rem;
  line-height: 1.25;
  color: var(--muted);
  background: rgba(14, 16, 20, .55);
}
.preview-status[hidden] { display: none; }
.preview-pane.error .preview-status { color: #fca5a5; background: rgba(14, 16, 20, .85); align-items: flex-start; overflow: auto; }
.preview-pane.loading .preview-frame img { opacity: .55; }
.preview-pane.loading .preview-status { color: var(--text); }
.preview-controls { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.preview-controls .check { min-height: 40px; padding: .3rem 0; }
.preview-note { margin: 0; }
.preview-pane.big .preview-note { display: none; }

/* ---------- Calibração ---------- */
.calib-tools { display: flex; flex-wrap: wrap; gap: .5rem; }
.tool[aria-pressed="true"].tool-cam { background: rgba(239, 68, 68, .25); border-color: #ef4444; }
.tool[aria-pressed="true"].tool-game { background: rgba(59, 130, 246, .25); border-color: #3b82f6; }
.txt-cam { color: #f87171; }
.txt-game { color: #60a5fa; }
.calib-stage {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 10px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
.calib-stage img { width: 100%; height: 100%; display: block; border-radius: 10px; pointer-events: none; -webkit-user-drag: none; }
.calib-rect {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid;
  cursor: move;
  touch-action: none;
}
.calib-rect[hidden] { display: none; }
.rect-cam { border-color: #ef4444; background: rgba(239, 68, 68, .16); }
.rect-game { border-color: #3b82f6; background: rgba(59, 130, 246, .14); }
.calib-rect.current { box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); z-index: 2; }
.rect-label {
  position: absolute;
  top: 0;
  left: 0;
  padding: .05rem .35rem;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.rect-cam .rect-label { background: #ef4444; }
.rect-game .rect-label { background: #2563eb; top: auto; bottom: 0; }
.handle {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2px solid currentColor;
  border-radius: 50%;
  touch-action: none;
}
.handle::after { content: ""; position: absolute; inset: -14px; }
.rect-cam .handle { color: #ef4444; }
.rect-game .handle { color: #3b82f6; }
.h-nw { left: -9px; top: -9px; cursor: nwse-resize; }
.h-ne { right: -9px; top: -9px; cursor: nesw-resize; }
.h-sw { left: -9px; bottom: -9px; cursor: nesw-resize; }
.h-se { right: -9px; bottom: -9px; cursor: nwse-resize; }
.rect-field { display: flex; flex-direction: column; gap: .3rem; }
.rect-field > label { font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.input-row { display: flex; gap: .5rem; }
.input-row input { flex: 1; min-width: 0; }
.dot { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.dot-cam { background: #ef4444; }
.dot-game { background: #3b82f6; }

/* ---------- Corte e transcrição ---------- */
.trim-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.trim-col { display: flex; flex-direction: column; gap: .35rem; }
.trim-col > label { font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
.trim-clock { color: var(--info); font-variant-numeric: tabular-nums; }
.trim-col input { font-variant-numeric: tabular-nums; }
.nudges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
.nudges .btn { padding: .4rem .2rem; font-variant-numeric: tabular-nums; }
.trim-summary { margin: .25rem 0 0; }
.tap-target { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .5rem; }
.pill { position: relative; display: inline-flex; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  padding: .35rem .8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
}
.pill input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill input:focus-visible + span { outline: 2px solid var(--info); }
.transcript {
  position: relative;
  max-height: 46vh;
  overflow-y: auto;
  padding-right: .25rem;
  line-height: 1.9;
  overscroll-behavior: contain;
}
.tline { margin: 0 0 .35rem; }
.tline-time {
  display: inline-block;
  min-width: 3.4rem;
  margin-right: .2rem;
  color: var(--muted);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.word {
  display: inline;
  padding: .2rem .15rem;
  margin: 0;
  font: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(96, 165, 250, .3);
}
button.word:hover { background: var(--surface-2); color: var(--text); }
.word.in { color: var(--text); background: rgba(34, 197, 94, .14); }
button.word:disabled { cursor: default; }

@media (min-width: 640px) {
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-wide { grid-column: 1 / -1; }
  .trim-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .save-bar { margin: 0 -1.25rem 1rem; padding-left: 1.25rem; padding-right: 1.25rem; }
}
@media (min-width: 900px) {
  .editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1rem;
    align-items: start;
  }
  .editor-grid > .preview-pane {
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    top: 76px;
  }
  .editor-grid > .editor-main { grid-column: 1; grid-row: 1; }
  .editor-grid > .preview-pane .preview-frame,
  .editor-grid > .preview-pane.big .preview-frame { width: 100%; cursor: default; }
  .editor-grid-compact { grid-template-columns: minmax(0, 1fr) 210px; }
  .editor-grid-compact .fields { grid-template-columns: minmax(0, 1fr); }
  .calibrate { max-width: 960px; }
}

/* Clipe com menos de 1 minuto (não monetiza no TikTok). */
.duration.short { background: #b42318; color: #fff; }
