/* Gravaê: claro, texto preto, detalhes no laranja do Portal Publicitário (#FDA006).
   Vermelho só para gravação. Poucos padrões: --pad dentro de blocos, --gap entre
   itens, um raio por tamanho de componente, 3 tamanhos de texto. */
:root {
  --bg: #ffffff;
  --s1: #ffffff;
  --s2: #f4f4f5;
  --s3: #e8e8ea;
  --line: rgba(11, 11, 12, 0.08);
  --line-2: rgba(11, 11, 12, 0.14);
  --text: #0b0b0c;
  --muted: #6b6b70;
  --accent: #fda006;
  --accent-hover: #f39500;
  --accent-ink: #9a5b00;
  --accent-soft: #fff3dc;
  --rec: #e5372b;
  --ok: #188a4e;
  --ok-soft: #e4f5ea;
  --warn: #8a5300;
  --warn-soft: #fff1d6;
  --glass: rgba(255, 255, 255, 0.86);
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 8px;
  --pad: 16px;
  --gap: 12px;
  --head: 60px;
  --fs-sm: 12.5px;
  --fs: 14px;
  --fs-lg: 24px;
  /* fundo branco: cartões e painéis ganham um contorno finíssimo para se separar */
  --ring: 0 0 0 1px rgba(11, 11, 12, 0.07);
  --shadow-sm: 0 0 0 1px rgba(11, 11, 12, 0.07), 0 1px 2px rgba(11, 11, 12, 0.05);
  --shadow: 0 0 0 1px rgba(11, 11, 12, 0.06), 0 12px 32px rgba(11, 11, 12, 0.1), 0 2px 6px rgba(11, 11, 12, 0.05);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.2, 0.9, 0.3, 1.15);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 var(--fs)/1.45 var(--font); -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; }
#app, .view { height: 100%; }
.view { animation: viewIn 0.24s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1 { font-size: var(--fs-lg); margin: 0; letter-spacing: -0.025em; font-weight: 700; }
h2 { font-size: 19px; margin: 0; letter-spacing: -0.015em; }
h3 { margin: 0; font-size: 16px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
p { margin: 0; }
b { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.grow { flex: 1; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ic { flex: none; display: block; }
.tip { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }
kbd { font: 600 11px/1 var(--font); padding: 3px 6px; border-radius: 5px; background: var(--s2); box-shadow: inset 0 -1px 0 var(--line-2); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 0;
  background: var(--s2); color: var(--text); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, opacity 0.15s, transform 0.1s var(--ease), box-shadow 0.15s;
}
.btn:hover { background: var(--s3); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn.primary { background: var(--accent); color: var(--text); box-shadow: 0 1px 0 rgba(0,0,0,.06), inset 0 -1px 0 rgba(0,0,0,.08); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--s2); }
.btn.ghost.on { background: var(--accent-soft); color: var(--accent-ink); }
.btn.danger { background: var(--rec); color: #fff; }
.btn.glass { background: var(--glass); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); }
.btn.sm { height: 30px; padding: 0 10px; font-size: var(--fs-sm); }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: var(--r); }
.btn.full { width: 100%; }
.btn.rec-pill { background: var(--text); color: #fff; border-radius: 99px; padding: 0 16px; }
.btn.rec-pill:hover { background: #26262a; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.btn.rec-pill .rec-dot { background: var(--rec); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }

.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: none; transition: background 0.15s, color 0.15s, transform 0.1s; }
.icon-btn:hover { background: var(--s2); color: var(--text); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.on { background: var(--accent-soft); color: var(--accent-ink); }
.icon-btn:disabled { opacity: 0.35; cursor: default; background: none; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.glass { background: var(--glass); color: var(--text); backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; flex: none; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- formulários ---------- */
.input { width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--s1); color: var(--text); font: inherit; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { padding-right: 28px; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.field { display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.row-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); font-size: 13.5px; cursor: pointer; }
.row-toggle > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.row-toggle.off { opacity: 0.5; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: var(--s3); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--s1); margin-top: -6px; box-shadow: 0 0 0 1px var(--line-2), 0 1px 3px rgba(0,0,0,.18); transition: transform 0.12s; }
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 0 0 2px var(--accent), 0 1px 3px rgba(0,0,0,.18); }

.switch { position: relative; width: 36px; height: 21px; flex: none; cursor: pointer; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--s3); transition: background 0.2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform 0.2s var(--spring); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(15px); }

.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--s2); border-radius: 10px; }
.seg.wide { display: flex; width: 100%; }
.seg.wide .seg-btn { flex: 1; }
.seg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; min-width: 34px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--s1); color: var(--text); box-shadow: var(--shadow-sm); }
.seg-btn:disabled { opacity: 0.35; cursor: default; }

.meter { display: block; width: 100%; height: 4px; border-radius: 99px; background: var(--s3); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2bb673 0 70%, var(--accent) 85%, var(--rec)); background-size: 300px 100%; border-radius: 99px; transition: width 0.08s linear; }
.meter.mini { width: 56px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 32px; height: 32px; border-radius: 9px; border: 0; cursor: pointer; padding: 0; position: relative; display: grid; place-items: center; color: var(--muted); background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.12s var(--spring); }
.swatch:hover { transform: scale(1.08); }
.swatch.on { outline: 2px solid var(--text); outline-offset: 2px; }
.swatch.dot { border-radius: 50%; width: 26px; height: 26px; }
.swatch.picker { overflow: hidden; background: conic-gradient(#f43, #fd0, #3c6, #39f, #a3f, #f43); }
.swatch.picker input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* ---------- cabeçalho ---------- */
.st-head { height: var(--head); display: flex; align-items: center; gap: var(--gap); padding: 0 var(--pad); flex: none; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; letter-spacing: -0.02em; }
.logo { width: 26px; height: 26px; flex: none; background: url("/favicon.svg") center / contain no-repeat; border-radius: 7px; box-shadow: 0 2px 8px rgba(253, 160, 6, 0.35); }
.crumb { display: flex; align-items: baseline; gap: 10px; min-width: 0; max-width: 32%; }
.crumb b { font-size: 14.5px; }
.crumb.as-btn { background: none; border: 0; cursor: pointer; align-items: center; color: var(--muted); padding: 6px 8px; border-radius: var(--r-sm); gap: 8px; }
.crumb.as-btn b { color: var(--text); }
.crumb.as-btn:hover { background: var(--s2); }
.head-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.hud { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; padding: 6px 14px; border-radius: 99px; background: var(--s1); box-shadow: var(--shadow-sm); transition: background 0.2s; }
.hud .rec-dot { color: var(--s3); }
.hud .timer { font-size: 15px; font-weight: 650; }
.hud-state { font-size: var(--fs-sm); }
.hud-chips { display: flex; gap: 6px; }
.hud-chips:empty { display: none; }
.hud-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--s2); color: var(--muted); white-space: nowrap; animation: fadeIn 0.2s; }
.hud-chip.warn { background: var(--warn-soft); color: var(--warn); }
.hud.flash { animation: flash 0.6s; }
@keyframes flash { 0% { background: var(--accent-soft); } }
@keyframes fadeIn { from { opacity: 0; } }
[data-rec="recording"] .hud .rec-dot, [data-rec="recording"] .pip-top .rec-dot { color: var(--rec); animation: blink 1.2s infinite; }
[data-rec="paused"] .hud .rec-dot, [data-rec="paused"] .pip-top .rec-dot { color: var(--accent); }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- estúdio ---------- */
.studio { height: 100%; display: flex; flex-direction: column; }
.st-body { flex: 1; min-height: 0; display: flex; }
.st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 var(--pad) var(--pad); gap: var(--gap); position: relative; }
.stage-area { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.stage-wrap { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #111; box-shadow: var(--shadow); transition: box-shadow 0.25s, width 0.25s var(--ease), height 0.25s var(--ease); }
[data-rec="recording"] .stage-wrap { box-shadow: 0 0 0 3px var(--rec), var(--shadow); }
[data-rec="paused"] .stage-wrap { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
#stage { width: 100%; height: 100%; display: block; touch-action: none; }
.stage-wrap[data-tool="pen"] #stage, .stage-wrap[data-tool="marker"] #stage, .stage-wrap[data-tool="crop"] #stage { cursor: crosshair; }
.stage-wrap[data-tool="laser"] #stage, .stage-wrap[data-tool="spot"] #stage { cursor: none; }
.stage-wrap[data-tool="zoom"] #stage { cursor: zoom-in; }
.crop-box { position: absolute; border: 2px dashed #fff; background: rgba(253,160,6,.15); border-radius: 4px; pointer-events: none; }

.tool-rail { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2px; padding: 5px; background: var(--s1); border-radius: 14px; box-shadow: var(--shadow); z-index: 2; }
.rail-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s, transform 0.1s; }
.rail-btn:hover { background: var(--s2); color: var(--text); }
.rail-btn:active { transform: scale(0.92); }
.rail-btn.on { background: var(--accent-soft); color: var(--accent-ink); }
.rail-sep { height: 1px; background: var(--line); margin: 4px 6px; }

.dock { align-self: center; display: flex; align-items: center; gap: 6px; padding: 6px; background: var(--s1); border-radius: 20px; box-shadow: var(--shadow); flex: none; max-width: 100%; flex-wrap: wrap; justify-content: center; }
.dock-sec { display: flex; align-items: center; gap: 2px; }
.dock-sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 4px; }
.dock-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s, transform 0.1s; }
.dock-btn:hover { background: var(--s2); color: var(--text); }
.dock-btn:active { transform: scale(0.92); }
.dock-btn.on { background: var(--accent-soft); color: var(--accent-ink); }
.dock-btn.dim { opacity: 0.5; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 8px 0 10px; border: 0; border-radius: 12px; background: var(--s2); color: var(--text); cursor: pointer; transition: background 0.15s, transform 0.1s; }
.chip:hover, .chip.open { background: var(--s3); }
.chip:active { transform: scale(0.96); }
.chip.off { background: transparent; color: var(--muted); }
.chip .ic:last-child { color: var(--muted); transition: transform 0.2s var(--ease); }
.chip.open .ic:last-child { transform: rotate(180deg); }
.chip-label { font-size: var(--fs-sm); font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-meter { width: 4px; height: 18px; border-radius: 99px; background: var(--s3); display: flex; align-items: flex-end; overflow: hidden; }
.mini-meter i { display: block; width: 100%; height: 0; background: #2bb673; border-radius: 99px; transition: height 0.08s linear; }
.slide-count { min-width: 60px; text-align: center; font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }

.rec-sec { gap: 6px; }
.live-only { display: none; }
[data-rec="recording"] .live-only, [data-rec="paused"] .live-only { display: inline-grid; animation: popIn 0.18s var(--spring); }
.rec-btn { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--s1); box-shadow: inset 0 0 0 3px var(--text); display: grid; place-items: center; cursor: pointer; flex: none; transition: transform 0.12s var(--ease); }
.rec-btn:active { transform: scale(0.92); }
.rec-btn:disabled { opacity: 0.5; cursor: default; }
.rec-core { width: 34px; height: 34px; border-radius: 50%; background: var(--rec); transition: all 0.25s var(--spring); }
.rec-btn:hover .rec-core { transform: scale(0.92); }
[data-rec="recording"] .rec-core, [data-rec="paused"] .rec-core, [data-rec="saving"] .rec-core { width: 18px; height: 18px; border-radius: 5px; }
[data-rec="countdown"] .rec-core { animation: blink 0.8s infinite; }

.pop { position: absolute; z-index: 20; width: 300px; background: var(--s1); border-radius: var(--r-lg); padding: var(--pad); display: grid; gap: var(--gap); box-shadow: 0 0 0 1px var(--line), var(--shadow); animation: popIn 0.18s var(--spring); transform-origin: 50% 100%; }
@keyframes popIn { from { opacity: 0; transform: translateY(6px) scale(0.97); } }
.pop.wide-pop { width: 360px; }
.pop-head { display: flex; align-items: center; justify-content: space-between; }
.pop-label { font-size: var(--fs-sm); color: var(--muted); margin-bottom: -4px; }
.screen-box, .slides-box { display: grid; gap: var(--gap); }
.screen-status { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); min-width: 0; }
.deck-list { display: grid; gap: 2px; max-height: 200px; overflow-y: auto; }
.deck-item { display: flex; align-items: center; gap: 2px; border-radius: var(--r-sm); padding-right: 4px; transition: background 0.15s; }
.deck-item:hover { background: var(--s2); }
.deck-item.on { background: var(--accent-soft); }
.deck-item.on .deck-open { color: var(--accent-ink); }
.deck-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 0; background: none; cursor: pointer; text-align: left; font-size: var(--fs-sm); font-weight: 600; }

.strip { display: flex; gap: 8px; overflow-x: auto; flex: none; padding: 4px 2px 6px; scrollbar-width: thin; scroll-behavior: smooth; }
.strip-item { flex: none; width: 108px; padding: 0; border: 0; border-radius: var(--r-sm); background: var(--s1); cursor: pointer; position: relative; overflow: hidden; opacity: 0.6; box-shadow: var(--shadow-sm); transition: opacity 0.15s, transform 0.15s var(--ease); }
.strip-item canvas { width: 100%; height: auto; display: block; aspect-ratio: 16/9; background: var(--s2); }
.strip-item span { position: absolute; left: 5px; bottom: 4px; font-size: 10.5px; font-weight: 700; background: rgba(255,255,255,.9); padding: 0 5px; border-radius: 4px; }
.strip-item.on { opacity: 1; outline: 2px solid var(--accent); outline-offset: -2px; }
.strip-item:hover { opacity: 1; transform: translateY(-2px); }

.countdown { position: absolute; inset: 0; display: none; place-items: center; background: rgba(0,0,0,.35); font-size: 120px; font-weight: 800; color: #fff; pointer-events: none; }
.countdown.on { display: grid; animation: count 1s infinite; }
@keyframes count { 0% { transform: scale(1.15); opacity: 0.3; } 30% { transform: scale(1); opacity: 1; } }

.take-done { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; pointer-events: none; opacity: 0; transform: translateY(12px); transition: 0.25s var(--spring); }
.take-done.on { opacity: 1; transform: none; pointer-events: auto; }
.td-card { background: var(--glass); backdrop-filter: blur(14px); border-radius: 14px; padding: 10px 10px 10px 14px; display: flex; align-items: center; gap: var(--gap); box-shadow: var(--shadow); }
.td-ok { width: 28px; height: 28px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.td-text { display: grid; font-size: var(--fs-sm); margin-right: 8px; }
.td-text b { font-size: 13.5px; }
.td-path { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11.5px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-path .ic { display: inline-block; }

.prompter { position: absolute; top: 14px; left: 50%; width: min(66%, 760px); height: 30%; transform: translateX(-50%); background: rgba(8,9,11,.78); border-radius: var(--r); overflow: hidden; display: none; backdrop-filter: blur(8px); -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.prompter.on { display: block; animation: fadeIn 0.2s; }
.prompter-text { padding: 24px 28px 60% 28px; font-weight: 600; line-height: 1.4; color: #fff; will-change: transform; }
.prompter-ctrl { position: absolute; right: 10px; bottom: 14px; display: flex; gap: 6px; opacity: 0; transition: opacity 0.15s; }
.prompter:hover .prompter-ctrl { opacity: 1; }

/* gaveta de ajustes */
.drawer { width: 360px; flex: none; background: var(--s1); border-radius: var(--r-lg); margin: 0 var(--pad) var(--pad) 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-shadow: var(--shadow); animation: drawerIn 0.26s var(--ease); }
@keyframes drawerIn { from { opacity: 0; transform: translateX(18px); } }
.drawer-head { display: flex; align-items: center; gap: 4px; padding: 10px 8px 0 12px; }
.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tab { height: 32px; padding: 0 9px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: background 0.15s, color 0.15s; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--s2); color: var(--text); }
.pane { flex: 1; overflow-y: auto; padding: 6px var(--pad) var(--pad); display: grid; align-content: start; animation: fadeIn 0.18s; }
.sec { display: grid; gap: var(--gap); padding: var(--pad) 0; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.script { min-height: 240px; }
.stat-list { display: grid; gap: 8px; }
.stat { display: flex; align-items: center; gap: 10px; font-size: 13.5px; min-width: 0; }
.stat b { margin-left: auto; font-weight: 600; font-size: var(--fs-sm); max-width: 55%; }
.stat-ic { width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: var(--fs-sm); color: var(--muted); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { display: inline-flex; align-items: center; background: var(--s2); border-radius: 99px; padding-right: 2px; transition: background 0.15s; }
.preset-apply { border: 0; background: none; cursor: pointer; font-weight: 600; font-size: var(--fs-sm); padding: 6px 4px 6px 12px; }
.preset:hover { background: var(--accent-soft); }

/* ---------- páginas ---------- */
.page { min-height: 100%; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1180px; margin: 0 auto; padding: 20px var(--pad) 48px; }
.page-head { display: flex; align-items: baseline; gap: var(--gap); margin-bottom: 20px; }
.folder-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); background: var(--s1); padding: 5px 10px; border-radius: 99px; box-shadow: var(--shadow-sm); }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r-sm); background: var(--s1); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.search input { background: none; border: 0; outline: none; color: var(--text); font: inherit; width: 100%; min-width: 120px; }
.grid { display: grid; gap: 40px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px var(--pad); }
.course { display: grid; gap: 14px; }
.course-head { display: flex; align-items: center; gap: 10px; }
.course-head h2 { font-size: 17px; }
.course-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.card { cursor: pointer; animation: cardIn 0.35s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }
.thumb { aspect-ratio: 16/9; background: var(--s2); border-radius: var(--r); overflow: hidden; position: relative; display: grid; place-items: center; color: var(--muted); box-shadow: var(--shadow-sm); transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.card:hover .thumb { transform: translateY(-3px); box-shadow: var(--shadow); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; right: 8px; bottom: 8px; background: rgba(11,11,12,.72); color: #fff; padding: 2px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card-actions { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; opacity: 0; transform: translateY(-4px); transition: 0.15s; }
.card:hover .card-actions { opacity: 1; transform: none; }
.card-body { padding: 10px 2px 0; display: grid; gap: 2px; }
.skeleton { aspect-ratio: 16/11; background: var(--s2); border-radius: var(--r); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
.empty { display: grid; justify-items: center; gap: 40px; padding: 40px 0; }
.empty-hero { display: grid; justify-items: center; gap: 10px; text-align: center; }
.empty-hero .btn { margin-top: 10px; }
.empty-ic { width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; margin-bottom: 6px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); width: 100%; max-width: 820px; }
.step { background: var(--s1); border-radius: var(--r); padding: var(--pad); display: grid; gap: 4px; align-content: start; box-shadow: var(--shadow-sm); }
.step-n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.backups { background: var(--s1); border-radius: var(--r); padding: var(--pad); display: grid; gap: 10px; margin-bottom: 24px; box-shadow: var(--shadow-sm); animation: cardIn 0.3s var(--ease); }
.bk-head { display: flex; gap: var(--gap); align-items: flex-start; }
.bk-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; flex: none; }
.bk-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--s2); }
.bk-row > span { flex: 1; }
.gate { max-width: 520px; margin: 8vh auto 0; padding: 0 var(--pad); display: grid; justify-items: center; text-align: center; gap: 12px; }
.gate-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.acc-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.acc-row .grow { color: var(--text); }
.saved-list { display: grid; gap: 6px; background: var(--s2); border-radius: var(--r-sm); padding: 10px 12px; font-size: var(--fs-sm); }
.saved-list div { display: flex; align-items: center; gap: 8px; min-width: 0; }

/* login */
.login-body { display: grid; place-items: center; min-height: 100vh; }
.login { width: min(380px, calc(100% - 32px)); background: var(--s1); border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow); display: grid; gap: 10px; animation: popIn 0.3s var(--spring); }
.login .brand { margin-bottom: 14px; }
.login-form { display: grid; gap: 14px; margin-top: 12px; }
.login-form .btn { margin-top: 6px; }
.login-error { color: var(--rec); font-size: var(--fs-sm); font-weight: 600; }

/* ---------- aula (editor) ---------- */
.project-page { height: 100%; }
.project { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--pad); padding: 0 var(--pad) var(--pad); }
.editor { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }
.player { flex: 1; min-height: 0; background: #111; border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; position: relative; box-shadow: var(--shadow); }
.player video { width: 100%; height: 100%; object-fit: contain; }
.cc-line { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); max-width: 80%; text-align: center; background: rgba(0,0,0,.72); color: #fff; font-weight: 600; font-size: 17px; line-height: 1.35; padding: 6px 12px; border-radius: 8px; pointer-events: none; }
.player-empty { position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: 8px; background: var(--s1); text-align: center; }
.player-empty .btn { margin-top: 10px; }
.player.empty .player-empty { display: grid; }
.player.empty video { display: none; }
.edit-bar { background: var(--s1); border-radius: var(--r-lg); padding: var(--gap) var(--pad); display: grid; gap: 10px; box-shadow: var(--shadow-sm); }
.edit-row { display: flex; align-items: center; gap: var(--gap); min-width: 0; }
.edit-row.hint { gap: 8px; }
#trimInfo { white-space: nowrap; }
.tool-group { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--text); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; transition: transform 0.12s var(--spring); }
.round-btn:hover { transform: scale(1.06); }
.round-btn:active { transform: scale(0.94); }
.time { font-variant-numeric: tabular-nums; font-size: 13.5px; white-space: nowrap; }
.tl { --a: 0%; --b: 100%; --p: 0%; --wave: rgba(11, 11, 12, 0.3); position: relative; height: 68px; border-radius: 10px; background: var(--s2); cursor: text; touch-action: none; overflow: hidden; user-select: none; }
.tl-wave { position: absolute; inset: 0; width: 100%; height: 100%; }
.tl-layer { position: absolute; inset: 0; }
.tl-out { position: absolute; top: 0; bottom: 0; background: rgba(247,246,243,.8); pointer-events: none; }
.tl-cut { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(229,55,43,.24) 0 6px, rgba(229,55,43,.08) 6px 12px); cursor: pointer; transition: background 0.15s; }
.tl-cut:hover { background: repeating-linear-gradient(135deg, rgba(229,55,43,.36) 0 6px, rgba(229,55,43,.14) 6px 12px); }
.tl-mark { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); cursor: pointer; }
.tl-mark::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top: 7px solid var(--accent); }
.tl-mark::after { content: ""; position: absolute; inset: 0 -6px; }
.tl-sel { position: absolute; top: 0; bottom: 0; background: rgba(253,160,6,.22); box-shadow: inset 0 0 0 1.5px var(--accent); pointer-events: none; border-radius: 4px; }
.tl-h { position: absolute; top: 0; bottom: 0; width: 10px; background: var(--text); cursor: ew-resize; z-index: 2; }
.tl-h.in { left: var(--a); border-radius: 10px 3px 3px 10px; }
.tl-h.out { left: calc(var(--b) - 10px); border-radius: 3px 10px 10px 3px; }
.tl-h::after { content: ""; position: absolute; left: 4px; top: 24px; bottom: 24px; width: 2px; background: rgba(255,255,255,.7); border-radius: 2px; }
.tl-play { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: var(--rec); pointer-events: none; z-index: 3; }
.side-col { background: var(--s1); border-radius: var(--r-lg); padding: var(--gap); display: flex; flex-direction: column; gap: var(--gap); min-height: 0; box-shadow: var(--shadow-sm); }
.side-tabs { display: flex; gap: 2px; background: var(--s2); padding: 3px; border-radius: 10px; }
.side-tabs .tab { flex: 1; justify-content: center; }
.side-tabs .tab.on { background: var(--s1); box-shadow: var(--shadow-sm); }
.side-pane { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; flex: 1; overflow-y: auto; animation: fadeIn 0.18s; }
.takes { display: grid; gap: 4px; align-content: start; }
.take { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; cursor: pointer; transition: background 0.15s; }
.take:hover { background: var(--s2); }
.take.on { background: var(--accent-soft); }
.take.dragging { opacity: 0.4; }
.take-thumb { width: 76px; aspect-ratio: 16/9; border-radius: 6px; background: var(--s2); overflow: hidden; display: grid; place-items: center; color: var(--muted); position: relative; flex: none; }
.take-thumb img { width: 100%; height: 100%; object-fit: cover; }
.take-thumb .n { position: absolute; left: 4px; top: 3px; font-size: 10px; font-weight: 700; background: rgba(255,255,255,.9); padding: 0 4px; border-radius: 4px; }
.take-info { flex: 1; min-width: 0; display: grid; gap: 1px; font-size: 13.5px; }
.take-info .ic { display: inline-block; vertical-align: -1px; }
.take-actions { display: flex; align-items: center; opacity: 0; transition: opacity 0.15s; }
.take:hover .take-actions, .take.on .take-actions { opacity: 1; }
.tx-empty { display: grid; gap: 10px; justify-items: start; padding: 6px 2px; }
.tx-empty .empty-ic { width: 44px; height: 44px; border-radius: 14px; margin: 0; }
.tx-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tx-bar .search { flex: 1; height: 32px; }
.tx { font-size: 15px; line-height: 1.75; padding: 4px 2px; }
.w { border-radius: 4px; padding: 1px 1px; cursor: pointer; transition: background 0.12s; }
.w:hover { background: var(--s2); }
.w.now { background: var(--accent); color: var(--text); }
.w.cut { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rec); opacity: 0.6; }
.w.hit { box-shadow: 0 0 0 2px var(--accent); }
.progress { height: 6px; border-radius: 99px; background: var(--s3); overflow: hidden; width: 100%; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width 0.25s var(--ease); }
.chapters { display: grid; gap: 4px; }
.chapter { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: var(--r-sm); }
.chapter:hover { background: var(--s2); }
.ch-time { border: 0; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.ch-title { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 13.5px; padding: 6px; border-radius: 6px; outline: none; }
.ch-title:focus { background: var(--s1); box-shadow: inset 0 0 0 1px var(--accent); }

/* ---------- toasts, modais ---------- */
.toasts { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; justify-items: center; pointer-events: none; }
.toast { background: var(--text); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; font-size: 13.5px; max-width: 560px; opacity: 0; transform: translateY(-8px) scale(0.98); transition: 0.22s var(--spring); }
.toast.in { opacity: 1; transform: none; }
.toast.ok::before { content: "●"; color: #2bb673; margin-right: 8px; }
.toast.warn { background: var(--warn-soft); color: var(--warn); box-shadow: 0 0 0 1px rgba(154,91,0,.15), var(--shadow); }
.toast.error { background: #b42318; }
.modal-back { position: fixed; inset: 0; background: rgba(20,18,12,.32); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 90; padding: var(--pad); animation: fadeIn 0.18s; }
.modal { width: min(440px, 100%); background: var(--s1); border-radius: 18px; padding: 22px; display: grid; gap: var(--gap); box-shadow: var(--shadow); animation: popIn 0.22s var(--spring); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.browser-bar { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 8px var(--pad); font-size: var(--fs-sm); font-weight: 600; }

/* ---------- janela flutuante ---------- */
.pip-body { margin: 0; background: var(--bg); height: 100vh; overflow: hidden; }
.pip { display: flex; flex-direction: column; gap: 10px; padding: 12px; height: 100%; }
.pip-top { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.pip-top .rec-dot { color: var(--s3); }
.pip-top .timer { font-size: 18px; }
.pip-top .meter { margin-left: auto; }
.pip-preview { width: 100%; aspect-ratio: 16/9; background: #111; border-radius: var(--r-sm); object-fit: contain; flex: none; }
.pip-row { display: flex; align-items: center; justify-content: center; gap: 4px; }
.pip-prompter { flex: 1; min-height: 60px; background: var(--s1); border-radius: var(--r-sm); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-sm); }
.pip-prompter-bar { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 2px 12px; font-size: var(--fs-sm); }
.pip-prompter-bar .dock-btn { width: 30px; height: 30px; }
.pip-prompter-view { flex: 1; overflow: hidden; }
.pip-prompter-text { padding: 4px 12px 200px; font-weight: 600; line-height: 1.4; }

@media (max-width: 1100px) {
  .crumb { max-width: 22%; }
  .hud-chips { display: none; }
}
@media (max-width: 900px) {
  .st-body { flex-direction: column; overflow-y: auto; }
  .st-main { min-height: 70vh; }
  .drawer { width: auto; margin: 0 var(--pad) var(--pad); max-height: 60vh; }
  .project { grid-template-columns: 1fr; }
  .player { min-height: 240px; }
  .steps { grid-template-columns: 1fr; }
  .hud { position: static; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- ilha de edição ---------- */
.top-nav { margin-left: 8px; }
.top-nav .seg-btn { text-decoration: none; }
.ed-page { height: 100vh; overflow: hidden; background: var(--bg); }
.ed-head { background: var(--s1); box-shadow: 0 1px 0 var(--line); z-index: 3; }
.ed-title { display: grid; line-height: 1.25; min-width: 0; max-width: 40vw; }
.ed-title b { font-size: 15px; }
.ed-title .small { font-size: 11.5px; }
.ed-redo svg { transform: scaleX(-1); }
.ed-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.ed-head .rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); display: inline-block; }
.ed-body { flex: 1; min-height: 0; display: flex; gap: var(--gap); padding: var(--gap) var(--pad) 0; }

.ed-rail { display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--s1); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); align-self: flex-start; }
.ed-rail-btn { width: 62px; padding: 8px 2px 6px; display: grid; justify-items: center; gap: 4px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font: 600 10.5px/1.1 var(--font); transition: background 0.15s, color 0.15s; }
.ed-rail-btn:hover { background: var(--s2); color: var(--text); }
.ed-rail-btn.on { background: var(--accent-soft); color: var(--accent-ink); }

.ed-panel { width: 340px; flex: none; background: var(--s1); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ed-panel-head { padding: 14px var(--pad) 0; font-size: 15px; }
.ed-panel-body { flex: 1; overflow-y: auto; padding: 0 var(--pad) var(--pad); animation: fadeIn 0.18s; scrollbar-width: thin; }
.ed-panel .sec { padding: 14px 0; }
.sec-title.sub { margin-top: 6px; font-size: 10.5px; }
.ed-field { display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.ed-field > span { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ed-field > span b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ed-field select.input, .input.sm, select.input.sm { height: 34px; }
select.input { padding-right: 28px; cursor: pointer; }
textarea.input { height: auto; padding: 8px 12px; resize: vertical; line-height: 1.4; }
.row-toggle small { display: block; font-size: 11.5px; margin-top: 2px; }
.row-toggle > span:first-child { display: grid; gap: 0; }
.ed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ed-row.between { flex-wrap: nowrap; }
.ed-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.ed-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 0 4px; }
.ed-stats > div { background: var(--s2); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 2px; }
.ed-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }
.ed-tool { display: grid; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--s2); }
.ed-tool > div:first-child { display: grid; gap: 2px; }
.ed-tool > div:first-child b { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.ed-tool .seg { background: var(--s3); }
.ed-tool.ai { background: var(--accent-soft); }
.ed-tool.ai b .ic, .ed-tool.ai b svg { color: var(--accent-ink); }
.ed-tool .btn { justify-self: start; }
.ed-list { display: grid; gap: 4px; max-height: 280px; overflow-y: auto; }
.ed-check { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: var(--r-sm); background: var(--s1); font-size: 12.5px; line-height: 1.4; cursor: pointer; }
.ed-check input { margin-top: 2px; accent-color: var(--accent); }
.ed-check small { display: block; margin-top: 2px; }
.ed-callout { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-ink); margin-top: 14px; }
.ed-callout b { color: var(--text); }
.ed-callout p { margin: 2px 0 0; }
.ed-callout .btn { margin-left: auto; }
.ed-warn { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--warn); background: var(--warn-soft); padding: 8px 10px; border-radius: var(--r-sm); margin: 0; }
.ed-takes { display: grid; gap: 4px; }
.ed-take { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 8px; border: 0; border-radius: var(--r-sm); background: var(--s2); cursor: pointer; text-align: left; font: inherit; font-size: 13px; color: var(--text); }
.ed-take:hover { background: var(--s3); }
.ed-take .n { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--s1); font-size: 11px; font-weight: 700; }
.ed-job { display: grid; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--s2); font-size: 12.5px; margin-top: 14px; }
.ed-file { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r); background: var(--s2); font-size: 13px; min-width: 0; }
.ed-file b { flex: 1; min-width: 0; }
.ed-drop { display: grid; justify-items: center; gap: 4px; padding: 18px; border: 0; border-radius: var(--r); background: var(--s2); cursor: pointer; font: inherit; color: var(--text); transition: background 0.15s, border-color 0.15s; }
.ed-drop:hover { background: var(--accent-soft); }
.ed-drop svg { color: var(--accent-ink); }
.ed-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-chip { height: 30px; padding: 0 11px; border: 0; border-radius: 99px; background: var(--s2); color: var(--text); font: 600 12px var(--font); cursor: pointer; transition: background 0.15s, transform 0.1s; }
.ed-chip:hover { background: var(--s3); }
.ed-chip:active { transform: scale(0.95); }
.ed-chip.on { background: var(--text); color: #fff; }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill { background: var(--s2); }

/* modelos de legenda */
.ed-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ed-tpl { position: relative; display: grid; gap: 5px; padding: 0; border: 0; background: none; cursor: pointer; font: 600 12px var(--font); color: var(--text); text-align: left; }
.ed-tpl canvas { width: 100%; aspect-ratio: 2 / 1; border-radius: 10px; display: block; transition: transform 0.15s var(--ease), box-shadow 0.15s; }
.ed-tpl:hover canvas { transform: translateY(-1px); box-shadow: var(--shadow); }
.ed-tpl.on canvas { outline: 2px solid var(--accent); outline-offset: 2px; }
.ed-tpl.mine .ed-tpl-hit { display: grid; gap: 5px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.ed-tpl.mine [data-mine-del] { position: absolute; top: 5px; right: 5px; opacity: 0; transition: opacity 0.15s; }
.ed-tpl.mine:hover [data-mine-del] { opacity: 1; }

/* formatos */
.ed-formats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ed-format { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; border: 0; border-radius: var(--r); background: var(--s2); cursor: pointer; font: inherit; color: var(--text); font-size: 12.5px; }
.ed-format:hover { background: var(--s3); }
.ed-format.on { background: var(--accent-soft); color: var(--accent-ink); }
.ed-format .small { font-size: 10.5px; }
.ed-ratio { display: inline-block; width: calc(var(--w) / max(var(--w), var(--h)) * 12px); height: calc(var(--h) / max(var(--w), var(--h)) * 12px); border: 1.6px solid currentColor; border-radius: 2.5px; flex: none; }
.ed-ratio.big { width: calc(var(--w) / max(var(--w), var(--h)) * 26px); height: calc(var(--h) / max(var(--w), var(--h)) * 26px); border-radius: 4px; }

/* textos */
.ed-text-card { display: grid; gap: 8px; padding: 10px; border-radius: var(--r); background: var(--s2); transition: box-shadow 0.15s; }
.ed-text-card.on { box-shadow: 0 0 0 2px var(--accent); }
.ed-text-card .seg { background: var(--s3); }

/* transcrição */
.ed-words-tools { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 14px; }
.ed-words-tools .input { flex: 1 1 100%; }
.ed-words { font-size: 14px; line-height: 1.75; user-select: text; }
.ed-words p { margin: 0 0 10px; }
.ed-words .w { cursor: pointer; border-radius: 4px; padding: 1px 0; transition: background 0.1s; }
.ed-words .w:hover { background: var(--s2); }
.ed-words .w.on { background: var(--accent-soft); color: var(--accent-ink); }
.ed-words .w.hit { background: #ffe9a8; }
.ed-wt { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--s2); border-radius: 5px; padding: 0 5px; margin-right: 6px; cursor: pointer; font-variant-numeric: tabular-nums; }

/* IA */
.ed-ai { display: grid; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--s2); margin-top: 10px; }
.ed-ai-head { display: flex; gap: 10px; align-items: center; }
.ed-ai-head > div { display: grid; gap: 1px; }
.ed-ai-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.ed-ai .btn { justify-self: start; }
.ed-ai-out { display: grid; gap: 6px; padding-top: 4px; }
.ed-ai-out .btn { justify-self: start; }
.ed-ai-line { display: flex; gap: 8px; align-items: center; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: var(--s1); cursor: pointer; font: inherit; font-size: 13px; color: var(--text); width: 100%; }
.ed-ai-line:hover { background: var(--accent-soft); }
.ed-ai-text { margin: 0; font-size: 13px; line-height: 1.5; background: var(--s1); padding: 8px 10px; border-radius: var(--r-sm); }
.ed-ai-text.pre { white-space: pre-wrap; }
.ed-ai-more { display: grid; gap: 6px; padding-top: 16px; }
.ed-ai-more .ed-ai-line { background: var(--s2); }
.btn.loading { pointer-events: none; }
.spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* palco */
.ed-stage { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.ed-canvas-wrap { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; container-type: size; }
.ed-canvas-wrap canvas { aspect-ratio: var(--ar, 16 / 9); width: min(100cqw, 100cqh * var(--arn, 1.7778)); height: auto; border-radius: var(--r-lg); background: #000; box-shadow: var(--shadow); cursor: pointer; }
.ed-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; background: var(--bg); }
.ed-empty p { margin: 0 0 8px; }
.ed-transport { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--s1); border-radius: 14px; box-shadow: var(--shadow-sm); }
.ed-transport .time { font-variant-numeric: tabular-nums; font-size: 13.5px; margin-left: 4px; }
.ed-transport .seg-btn { gap: 6px; }

/* linha do tempo */
.ed-timeline { flex: none; margin: var(--gap) var(--pad) var(--pad); background: var(--s1); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.ed-tl-tools { display: flex; align-items: center; gap: 4px; padding: 6px 10px; box-shadow: 0 1px 0 var(--line); }
.ed-tl-tools input[type="range"] { width: 110px; }
.ed-zm { font-size: 11px; margin-left: -3px; }
.ed-tl-tools .icon-btn.sm { width: 32px; }
.ed-tl-body { display: flex; }
.ed-tl-labels { flex: none; width: 36px; display: flex; flex-direction: column; box-shadow: 1px 0 0 var(--line); }
.ed-lab { height: 30px; margin-bottom: 2px; display: grid; place-items: center; color: var(--muted); }
.ed-lab.ruler { height: 24px; }
.ed-lab.ruler { margin-bottom: 0; }
.ed-lab.video { height: 50px; }
.ed-tl-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.ed-tl-inner { position: relative; min-width: 100%; padding-right: 24px; user-select: none; touch-action: none; }
.ed-ruler { height: 24px; position: relative; cursor: ew-resize; background: var(--s1); }
.ed-tick { position: absolute; top: 0; height: 100%; padding-left: 5px; font-size: 10.5px; color: var(--muted); line-height: 24px; font-variant-numeric: tabular-nums; box-shadow: inset 1px 0 0 var(--line-2); white-space: nowrap; }
.ed-track { position: relative; height: 30px; margin: 0 0 2px; cursor: crosshair; }
.ed-track.video { height: 50px; }
.ed-track-hint { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ed-seg { position: absolute; top: 2px; bottom: 2px; border-radius: 7px; overflow: hidden; background: #f3e6cf; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.ed-seg.c1 { background: #e6ebf1; }
.ed-seg.c2 { background: #e5efe6; }
.ed-seg.c3 { background: #efe6ef; }
.ed-seg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed-seg span { position: absolute; left: 6px; top: 3px; font-size: 10.5px; font-weight: 700; color: rgba(11,11,12,.7); white-space: nowrap; }
.ed-cap { position: absolute; top: 4px; bottom: 4px; border-radius: 6px; background: var(--text); color: #fff; font-size: 10.5px; line-height: 22px; padding: 0 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.ed-cap:hover { background: #2a2a2e; }
.ed-txt { position: absolute; top: 3px; bottom: 3px; border-radius: 7px; background: var(--accent); color: var(--text); font-size: 11px; font-weight: 700; display: flex; align-items: center; overflow: hidden; cursor: grab; }
.ed-txt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 3px; }
.ed-txt i { width: 7px; align-self: stretch; cursor: ew-resize; flex: none; background: rgba(0,0,0,.08); }
.ed-txt.on { box-shadow: 0 0 0 2px var(--text); }
.ed-bed { position: absolute; top: 4px; bottom: 4px; border-radius: 7px; display: flex; align-items: center; gap: 5px; padding: 0 8px; font-size: 10.5px; font-weight: 700; white-space: nowrap; overflow: hidden; background: #dff1e6; color: var(--ok); }
.ed-bed.dub { background: #e8e6fa; color: #4b3fb3; top: 4px; }


.ed-bed.off { opacity: 0.45; }
.ed-sel { position: absolute; top: 24px; bottom: 0; background: rgba(253,160,6,.18); box-shadow: inset 0 0 0 1.5px var(--accent); border-radius: 4px; pointer-events: none; }
.ed-playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 0; pointer-events: none; z-index: 2; will-change: transform; }
.ed-playhead::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--text); }
.ed-playhead i { position: absolute; top: 0; left: -6px; width: 12px; height: 12px; border-radius: 3px 3px 6px 6px; background: var(--text); }

/* exportação */
.modal.wide { width: min(520px, 100%); }
.ed-export { display: grid; gap: 14px; }
.ed-export h3 { margin: 0; }
.ed-export p { margin: 0; }
.ed-checks { display: grid; gap: 10px; padding: 12px; background: var(--s2); border-radius: var(--r); }
.progress.lg { height: 10px; }
.ed-xprog { display: grid; gap: 8px; }
.ed-xdone { display: grid; justify-items: center; gap: 6px; text-align: center; }
.ed-xok { width: 52px; height: 52px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.ed-xdone .td-path { white-space: normal; display: block; max-width: none; line-height: 1.6; }
.ed-split { position: absolute; top: 2px; bottom: 2px; width: 2px; margin-left: -1px; background: var(--s1); pointer-events: none; }
.ed-kbd kbd { font-size: 12px; padding: 2px 7px; }
.ed-keys { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 13px; max-height: 60vh; overflow-y: auto; align-items: center; }
.ed-keys span:nth-child(even) { text-align: right; white-space: nowrap; color: var(--muted); }
.ed-keys kbd { margin: 0 1px; }
.ed-tl-tools { overflow-x: auto; scrollbar-width: none; }
.ed-tl-tools > * { flex: none; }
@media (max-width: 1280px) { .ed-tl-tools .btn span { display: none; } .ed-tl-tools .btn.sm { padding: 0 8px; } }
@media (max-width: 1100px) { .ed-panel { width: 300px; } .ed-rail-btn { width: 54px; } }

/* ---------- conta e segurança ---------- */
.acc { display: grid; gap: 10px; }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); }
.acc-head h3 { margin: 0; }
.acc-head .pill { gap: 4px; }
.acc .sec-title { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.acc .sec-title .link-btn { margin-left: auto; text-transform: none; letter-spacing: 0; }
.acc-row .grow, .acc-item .grow { display: grid; gap: 1px; min-width: 0; }
.acc-row small, .acc-item small { font-size: 11.5px; font-weight: 400; }
.acc-list { display: grid; gap: 4px; max-height: 190px; overflow-y: auto; }
.acc-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--s2); font-size: 13px; }
.acc-item .pill { height: 18px; font-size: 10.5px; }
.acc-activity .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.acc-activity .bad .dot { background: var(--rec); }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: -6px; }
.pw-meter i { height: 4px; border-radius: 99px; background: var(--s3); transition: background 0.2s; }
.pw-meter i[data-on="1"] { background: var(--rec); }
.pw-meter i[data-on="2"] { background: var(--accent); }
.pw-meter i[data-on="3"], .pw-meter i[data-on="4"] { background: var(--ok); }
.pw-meter span { grid-column: 1 / -1; }
.code-input { font: 600 20px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.3em; text-align: center; height: 46px; }
.tfa { display: grid; gap: 12px; }
.tfa h3, .tfa p { margin: 0; }
.tfa-qr { justify-self: center; width: 200px; height: 200px; padding: 8px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow-sm); }
.tfa-qr svg { width: 100%; height: 100%; display: block; }
.tfa-manual { font-size: var(--fs-sm); color: var(--muted); }
.tfa-manual summary { cursor: pointer; }
.tfa-manual code { display: block; margin-top: 6px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--s2); color: var(--text); font: 600 14px/1.4 ui-monospace, Menlo, monospace; letter-spacing: 0.06em; user-select: all; }
.tfa-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px; border-radius: var(--r); background: var(--s2); }
.tfa-codes code { font: 600 14px/1.6 ui-monospace, Menlo, monospace; text-align: center; user-select: all; }
.login-form .link-btn { justify-self: center; margin-top: -2px; }
.acc-name { display: flex; align-items: center; gap: 6px; }

/* ---------- tela de login ---------- */
.login-body { background: radial-gradient(900px 500px at 12% 0%, #ffe7bd 0%, transparent 60%), radial-gradient(700px 500px at 100% 100%, #fff0d6 0%, transparent 55%), var(--bg); padding: 24px 16px; }
.auth { width: min(960px, 100%); display: grid; grid-template-columns: 1.05fr 1fr; background: var(--s1); border-radius: 26px; box-shadow: 0 30px 80px rgba(24, 20, 12, 0.14), 0 2px 8px rgba(24, 20, 12, 0.05); overflow: hidden; animation: popIn 0.4s var(--spring); }
.auth-show { background: #0b0b0c; color: #fff; padding: 36px; display: grid; align-content: space-between; gap: 26px; min-height: 540px; position: relative; overflow: hidden; }
.auth-show::after { content: ""; position: absolute; width: 380px; height: 380px; right: -140px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(253, 160, 6, 0.35), transparent 65%); pointer-events: none; }
.brand.light b { color: rgba(255, 255, 255, 0.9); font-size: 15px; }
.auth-foot svg, .two-step svg, .pw-eye svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* marca: título, etiqueta e pontos principais */
.auth-hero { display: grid; justify-items: start; gap: 14px; position: relative; z-index: 1; }
.auth-mark { position: relative; width: 64px; height: 64px; display: grid; place-items: center; margin: 4px 0 14px; }
.auth-mark .mark { width: 64px; height: 64px; background: url("/favicon.svg") center / contain no-repeat; border-radius: 19px; box-shadow: 0 12px 34px rgba(253, 160, 6, 0.42); position: relative; }
.auth-mark .ring { position: absolute; inset: -14px; border-radius: 26px; border: 1px solid rgba(253, 160, 6, 0.26); animation: ringPulse 4s ease-in-out infinite; }
.auth-mark .r2 { inset: -30px; border-radius: 34px; border-color: rgba(253, 160, 6, 0.12); animation-delay: -2s; }
@keyframes ringPulse { 50% { transform: scale(1.05); opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .auth-mark .ring { animation: none; } }
.auth-eyebrow { margin-bottom: 2px; font: 700 11px/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); background: rgba(253, 160, 6, 0.12); padding: 6px 10px; border-radius: 99px; }
.auth-show h2 { margin: 0; font-size: 32px; line-height: 1.12; letter-spacing: -0.03em; font-weight: 750; max-width: 360px; }
.auth-show h2 em { font-style: normal; color: var(--accent); }
.auth-hero p { margin: 0; max-width: 330px; color: rgba(255, 255, 255, 0.58); font-size: 14.5px; line-height: 1.55; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; position: relative; z-index: 1; }
.auth-points li { display: flex; align-items: center; gap: 14px; padding: 11px 12px; margin: 0 -12px; border-radius: 14px; transition: background 0.2s; }
.auth-points li:hover { background: rgba(255, 255, 255, 0.04); }
.auth-points li > span:last-child { display: grid; gap: 3px; }
.auth-points b { font-size: 14px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.auth-points small { font-size: 12.5px; color: rgba(255, 255, 255, 0.5); line-height: 1.4; }
.ap-ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: linear-gradient(180deg, rgba(253, 160, 6, 0.2), rgba(253, 160, 6, 0.08)); box-shadow: inset 0 0 0 1px rgba(253, 160, 6, 0.22); }
.ap-ic svg { width: 19px; height: 19px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* formulário */
.auth-form { padding: 44px 40px 28px; display: grid; align-content: center; gap: 6px; }
.auth-form h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.auth-form > .muted { margin: 0 0 8px; }
.auth-form .login-form { gap: 14px; }
.input.lg { height: 46px; font-size: 15px; border-radius: 11px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover { background: var(--s2); color: var(--text); }
.pw-eye.on { color: var(--accent-ink); }
.two-step { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--accent-soft); }
.two-step span { width: 38px; height: 38px; border-radius: 11px; background: var(--s1); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.two-step p { margin: 0; color: var(--text); }
.muted-link { color: var(--muted); }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; font-size: 11.5px; color: var(--muted); }
.auth-foot svg { width: 14px; height: 14px; color: var(--ok); }
.mobile-only { display: none; }
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; max-width: 420px; }
  .auth-show { display: none; }
  .auth-form { padding: 32px 24px 22px; }
  .mobile-only { display: flex; margin-bottom: 12px; }
}

/* ---------- estúdio: transições e avisos ---------- */
.trans-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pop[data-popup="trans"] { width: 340px; max-width: calc(100vw - 24px); }
.trans-opt { display: grid; justify-items: center; gap: 6px; min-width: 0; padding: 8px 4px; border: 0; border-radius: 10px; background: var(--s2); cursor: pointer; font: 600 11.5px var(--font); color: var(--text); transition: background 0.15s; }
.trans-opt:hover { background: var(--s3); }
.trans-opt.on { background: var(--accent-soft); color: var(--accent-ink); }
.tv { position: relative; width: 44px; height: 28px; border-radius: 6px; overflow: hidden; background: #fda006; display: block; }
.tv::before { content: ""; position: absolute; inset: 0; background: #0b0b0c; }
.tv b { position: absolute; inset: 0; background: #fda006; }
.trans-opt:hover .tv b, .trans-opt.on .tv b { animation-duration: 1.6s; animation-iteration-count: infinite; animation-timing-function: cubic-bezier(0.3, 0, 0.2, 1); }
.tv-suave b { inset: 6px 14px 6px 6px; border-radius: 4px; }
.trans-opt:hover .tv-suave b, .trans-opt.on .tv-suave b { animation-name: tvMorph; }
@keyframes tvMorph { 50% { inset: 0; border-radius: 0; } }
.tv-rapida b { inset: 6px 14px 6px 6px; border-radius: 4px; }
.trans-opt:hover .tv-rapida b, .trans-opt.on .tv-rapida b { animation-name: tvMorph; animation-duration: 0.8s; }
.trans-opt:hover .tv-corte b, .trans-opt.on .tv-corte b { animation-name: tvCut; animation-timing-function: steps(1); }
@keyframes tvCut { 50% { opacity: 0; } }
.trans-opt:hover .tv-dissolver b, .trans-opt.on .tv-dissolver b { animation-name: tvFade; }
@keyframes tvFade { 50% { opacity: 0; } }
.trans-opt:hover .tv-zoom b, .trans-opt.on .tv-zoom b { animation-name: tvZoom; }
@keyframes tvZoom { 50% { transform: scale(1.5); opacity: 0; } }
.trans-opt:hover .tv-deslizar b, .trans-opt.on .tv-deslizar b { animation-name: tvSlide; }
@keyframes tvSlide { 50% { transform: translateX(-100%); } 50.01% { transform: translateX(100%); } }
.trans-opt:hover .tv-desfoque b, .trans-opt.on .tv-desfoque b { animation-name: tvBlur; }
@keyframes tvBlur { 50% { filter: blur(6px); opacity: 0; } }
.trans-opt span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* cada transição com um desenho próprio parado (anima ao passar o mouse) */
.tv-corte b { inset: 0 50% 0 0; }
.tv-dissolver b { inset: 6px; border-radius: 4px; background: linear-gradient(90deg, #fda006 20%, rgba(253, 160, 6, 0.15)); }
.tv-zoom b { inset: 9px 15px; border-radius: 3px; box-shadow: 0 0 0 4px rgba(253, 160, 6, 0.35); }
.tv-deslizar b { inset: 6px 4px 6px 18px; border-radius: 4px; }
.tv-desfoque b { inset: 6px; border-radius: 4px; filter: blur(2px); }
@media (prefers-reduced-motion: reduce) { .tv b { animation: none !important; } }

.notice-quick, .notice-list { display: grid; gap: 4px; }
.pop[data-popup="notice"] { width: 320px; }
.notice-quick { max-height: 280px; overflow-y: auto; }
.n-item { display: flex; align-items: center; gap: 2px; border-radius: 10px; background: var(--s2); padding-right: 4px; transition: background 0.15s; }
.n-item:hover { background: var(--s3); }
.n-item.on { background: var(--accent-soft); }
.n-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; cursor: pointer; font: inherit; color: var(--text); text-align: left; }
.n-main .ellipsis { display: grid; min-width: 0; font-size: 13px; }
.n-main small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.n-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: #fda006; color: #0b0b0c; }
.n-ic.c-preto { background: #0b0b0c; color: #fff; }
.n-ic.c-branco { background: #fff; color: #9a5b00; box-shadow: inset 0 0 0 1px var(--line-2); }
.n-ic.c-vermelho { background: #e5372b; color: #fff; }
.n-ic.c-verde { background: #16a34a; color: #fff; }
.n-ic.c-azul { background: #2563eb; color: #fff; }
.n-preview { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); display: block; }
.n-icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.n-icon { display: grid; justify-items: center; gap: 3px; padding: 7px 2px; border: 0; border-radius: 9px; background: var(--s2); cursor: pointer; font: 600 10.5px var(--font); color: var(--muted); }
.n-icon:hover { color: var(--text); }
.n-icon.on { background: var(--accent-soft); color: var(--accent-ink); }
[data-n-group="color"] .swatch.on { outline: 2px solid var(--text); outline-offset: 2px; }

/* ---------- biblioteca: pastas coloridas ---------- */
.lib { height: 100vh; overflow: hidden; }
.lib .st-head { box-shadow: 0 1px 0 var(--line); }
.lib-body { flex: 1; min-height: 0; display: flex; }
.lib-side { width: 256px; flex: none; padding: 18px 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: 1px 0 0 var(--line); overflow-y: auto; }
.lib-side-list { display: grid; gap: 2px; }
.lib-side-title { display: flex; align-items: center; justify-content: space-between; margin: 14px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lib-side-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.lib-side .tip { padding: 0 8px; }
.lib-folder { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; font: 500 13.5px var(--font); color: var(--text); text-align: left; transition: background 0.15s; }
.lib-folder:hover { background: var(--s2); }
.lib-folder.on { background: color-mix(in srgb, var(--c) 12%, white); font-weight: 650; }
.lib-folder .ellipsis { flex: 1; min-width: 0; }
.fold-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); }
.lib-folder.on .fold-ic { background: var(--c); color: #fff; }
.fold-n { font-size: 11.5px; font-weight: 600; color: var(--muted); min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.lib-side .folder-chip { margin-top: auto; box-shadow: none; background: var(--s2); max-width: 100%; }
.lib-main { flex: 1; min-width: 0; overflow-y: auto; padding: 26px 32px 56px; display: flex; flex-direction: column; gap: 22px; }
.lib-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lib-head-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); }
.lib-head-t { display: grid; gap: 2px; min-width: 0; }
.lib-head-t h1 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.lib-head .search { width: 220px; }
.color-pick { position: relative; }
.color-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: grid; grid-template-columns: repeat(5, 26px); gap: 8px; padding: 12px; border-radius: 14px; background: var(--s1); box-shadow: var(--shadow); }
.color-pop .swatch.on { outline: 2px solid var(--text); outline-offset: 2px; }
.lib-empty { display: grid; justify-items: center; gap: 8px; padding: 60px 20px; text-align: center; border-radius: 18px; background: var(--s2); }
.lib-empty p { margin: 0 0 6px; }
.lib .grid { display: grid; gap: 30px; }
.lib .course { gap: 12px; }
.lib .course-head { width: fit-content; padding: 4px 10px 4px 4px; border: 0; border-radius: 10px; background: none; cursor: pointer; font: inherit; color: var(--text); transition: background 0.15s; }
.lib .course-head:hover { background: var(--s2); }
.lib .course-head h2 { margin: 0; font-size: 16px; }
.lib .course-head .ic, .lib .course-head svg:last-child { color: var(--muted); }
.lib .course-ic { width: 28px; height: 28px; border-radius: 8px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); }
.lib .cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px 20px; }
.lib .thumb { border-radius: 14px; }
.card-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-course { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px 0 6px; border-radius: 99px; font-size: 11px; font-weight: 650; color: color-mix(in srgb, var(--c) 70%, black); background: color-mix(in srgb, var(--c) 13%, white); white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; flex: none; }
.card-course i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.card-meta .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib .card-body { padding-top: 12px; gap: 6px; }
@media (max-width: 860px) {
  .lib-side { width: 210px; }
  .lib-main { padding: 20px 18px 40px; }
}

/* ---------- ilha de edição: acabamento (fundo branco) ---------- */
.ed-page { background: #fff; }
.ed-head { box-shadow: 0 1px 0 var(--line); }
.ed-body { padding: 14px 16px 0; gap: 14px; }
.ed-rail { box-shadow: var(--ring); border-radius: 18px; padding: 6px; }
.ed-rail-btn { border-radius: 12px; }
.ed-rail-btn.on { background: var(--text); color: #fff; }
.ed-panel { box-shadow: var(--ring); border-radius: 18px; }
.ed-panel-head { padding: 16px 18px 2px; font-size: 16px; letter-spacing: -0.01em; }
.ed-panel-body { padding: 0 18px 18px; }
.ed-stage { background: var(--s2); border-radius: 20px; padding: 16px 16px 12px; }
.ed-canvas-wrap canvas { border-radius: 14px; box-shadow: 0 18px 40px rgba(11, 11, 12, 0.16), 0 0 0 1px rgba(11, 11, 12, 0.06); }
.ed-transport { background: #fff; box-shadow: var(--ring); border-radius: 14px; }
.ed-transport .round-btn { background: var(--accent); color: var(--text); }
.ed-timeline { margin: 14px 16px 16px; box-shadow: var(--ring); border-radius: 18px; }
.ed-tl-tools { padding: 8px 12px; }
.ed-tl-labels { width: 92px; }
.ed-lab { justify-content: flex-start; display: flex; align-items: center; gap: 7px; padding-left: 12px; font-size: 11.5px; color: var(--muted); }
.ed-lab b { font-weight: 600; }
.ed-track { background: var(--s2); border-radius: 8px; margin: 0 6px 4px 0; }
.ed-track.video { height: 56px; }
.ed-lab.video { height: 56px; }
.ed-lab { height: 30px; margin-bottom: 4px; }
.ed-lab.ruler { height: 26px; margin-bottom: 0; }
.ed-ruler { height: 26px; }
.ed-tick { line-height: 26px; font-size: 10.5px; }
.ed-minor { position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--line-2); }
/* blocos de vídeo: tons claros acinzentados com a onda em cinza (como antes, mais neutro) */
.ed-seg { top: 3px; bottom: 3px; border-radius: 9px; background: #e9e9ec; box-shadow: inset 0 0 0 1px rgba(11, 11, 12, 0.07); }
.ed-seg.c1, .ed-seg.c3 { background: #dfdfe3; }
.ed-seg canvas { top: 0; bottom: 0; height: 100%; opacity: 1; }
.ed-seg span { z-index: 1; color: #3f3f46; background: rgba(255, 255, 255, 0.85); padding: 2px 6px; border-radius: 5px; top: 4px; left: 5px; font-size: 10px; font-weight: 700; }
.ed-seg:hover { box-shadow: inset 0 0 0 1.5px rgba(11, 11, 12, 0.22); }
.ed-split { background: #fff; width: 2px; z-index: 2; box-shadow: 0 0 0 0.5px rgba(11, 11, 12, 0.15); }

.ed-cap { background: #fff; color: var(--text); box-shadow: var(--ring); font-weight: 600; }
.ed-cap:hover { background: var(--accent-soft); }
.ed-txt { background: var(--accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.ed-sel { top: 26px; background: rgba(253, 160, 6, 0.16); box-shadow: inset 0 0 0 2px var(--accent); border-radius: 8px; }
/* cursor laranja com o tempo */
.ed-playhead::before { background: var(--accent); width: 2px; }
.ed-playhead i { top: 2px; left: -7px; width: 14px; height: 14px; border-radius: 4px 4px 7px 7px; background: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.ed-ph-t { position: absolute; top: 2px; left: 10px; font: 700 10px/16px var(--font); color: var(--accent-ink); background: var(--accent-soft); padding: 0 5px; border-radius: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ed-hover { position: absolute; top: 0; bottom: 0; left: 0; width: 0; pointer-events: none; z-index: 1; }
.ed-hover::before { content: ""; position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: rgba(11, 11, 12, 0.25); }
.ed-hover span { position: absolute; top: 5px; left: 5px; font: 600 10px/1 var(--font); color: var(--muted); background: #fff; padding: 2px 4px; border-radius: 4px; box-shadow: var(--ring); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ed-stats > div, .ed-tool, .ed-take, .ed-text-card, .ed-ai, .ed-file, .ed-job { background: var(--s2); }
.ed-tool.ai { background: var(--accent-soft); }
/* estúdio no fundo branco: palco em bancada cinza, controles com contorno */
.stage-area { background: var(--s2); border-radius: 20px; }
.dock, .tool-rail { box-shadow: 0 0 0 1px rgba(11, 11, 12, 0.07), 0 10px 30px rgba(11, 11, 12, 0.1); }
.studio .st-head { box-shadow: 0 1px 0 var(--line); }
@media (max-width: 1180px) {
  #edFormats .seg-btn { font-size: 0; gap: 0; min-width: 34px; padding: 0 9px; }
  #edFormats .ed-ratio { font-size: 12px; }
}

/* legenda na prévia: caixa para mover e redimensionar */
.ed-capbox { position: absolute; z-index: 3; border-radius: 10px; box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 4px rgba(253, 160, 6, 0.18); cursor: move; touch-action: none; }
.ed-capbox:hover { box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px rgba(253, 160, 6, 0.22); }
.ed-capbox .h { position: absolute; width: 12px; height: 12px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1.5px var(--accent), 0 1px 3px rgba(0, 0, 0, 0.25); }
.ed-capbox .tl { left: -6px; top: -6px; cursor: nwse-resize; }
.ed-capbox .br { right: -6px; bottom: -6px; cursor: nwse-resize; }
.ed-capbox .tr { right: -6px; top: -6px; cursor: nesw-resize; }
.ed-capbox .bl { left: -6px; bottom: -6px; cursor: nesw-resize; }
.ed-capbar { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 10px; background: #0b0b0c; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); white-space: nowrap; cursor: default; }
.ed-capbar button { height: 28px; min-width: 30px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: #fff; font: 700 13px var(--font); cursor: pointer; display: grid; place-items: center; }
.ed-capbar button:hover { background: rgba(255, 255, 255, 0.14); }
.ed-capsz { color: var(--accent); font-size: 12px; min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.ed-capsep { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.18); margin: 0 3px; }

/* ajustes avançados recolhíveis */
.ed-adv { border-radius: 12px; background: var(--s2); }
.ed-adv summary { list-style: none; display: flex; align-items: center; gap: 7px; padding: 10px 12px; cursor: pointer; font-size: 12.5px; font-weight: 650; color: var(--muted); user-select: none; }
.ed-adv summary::-webkit-details-marker { display: none; }
.ed-adv summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.2s var(--ease); }
.ed-adv[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.ed-adv summary:hover { color: var(--text); }
.ed-adv[open] summary { color: var(--text); }
.ed-adv-body { display: grid; gap: 12px; padding: 2px 12px 14px; }
.ed-tool .ed-adv, .ed-text-card .ed-adv { background: var(--s1); }

/* ---------- estúdio: aba Marca (galerias) ---------- */
.asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.asset-grid.logo-grid { grid-template-columns: repeat(3, 1fr); }
.asset-wrap { position: relative; }
.asset-tile { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; display: grid; place-items: center; background: var(--s2); color: var(--muted); padding: 0; box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.12s var(--ease), box-shadow 0.15s; }
.asset-tile:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--line-2), 0 4px 12px rgba(0, 0, 0, 0.08); }
.asset-tile.on { box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px rgba(253, 160, 6, 0.2); }
.asset-tile canvas, .asset-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-grid .asset-tile img { object-fit: contain; padding: 10px 12px; }
.asset-tile.checker { background-color: #e9e9ec; background-image: linear-gradient(45deg, #dcdce0 25%, transparent 25%), linear-gradient(-45deg, #dcdce0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #dcdce0 75%), linear-gradient(-45deg, transparent 75%, #dcdce0 75%); background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0; }
.asset-tile.checker.dark { background-color: #26272c; background-image: linear-gradient(45deg, #1c1d21 25%, transparent 25%), linear-gradient(-45deg, #1c1d21 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #1c1d21 75%), linear-gradient(-45deg, transparent 75%, #1c1d21 75%); }
.asset-tile.none { display: grid; gap: 2px; font: 600 11px var(--font); align-content: center; }
.asset-tile.add { background: var(--s2); color: var(--text); }
.asset-tile.add:hover { background: var(--accent-soft); color: var(--accent-ink); }
.asset-badge { position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; border-radius: 5px; background: rgba(11, 11, 12, 0.6); color: #fff; display: grid; place-items: center; }
.asset-name { display: flex; align-items: center; gap: 5px; padding: 0 8px; font-size: 11px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.asset-wrap:hover .asset-del { opacity: 1; }
.lt-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lt-theme { display: grid; gap: 5px; padding: 0; border: 0; background: none; cursor: pointer; font: 600 11.5px var(--font); color: var(--text); }
.lt-theme canvas { width: 100%; aspect-ratio: 8 / 3; border-radius: 10px; display: block; transition: box-shadow 0.15s; }
.lt-theme.on canvas { box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px rgba(253, 160, 6, 0.2); }
.lt-theme.on span { color: var(--accent-ink); }

/* menu lateral do editor: nada vaza (rótulo cabe sempre) */
.ed-rail { width: 84px; flex: none; align-items: stretch; }
.ed-rail-btn { width: 100%; min-width: 0; padding: 9px 4px 7px; gap: 5px; overflow: hidden; }
.ed-rail-btn span { display: block; max-width: 100%; font-size: 10.5px; letter-spacing: -0.01em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* painel Clipe */
.ed-empty-panel { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 26px 10px 18px; color: var(--muted); }
.ed-empty-panel b { color: var(--text); }
.ed-empty-panel p { margin: 0; }
.ed-clip-head { display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; }
.ed-clip-head > div { display: grid; min-width: 0; }
.ed-clip-n { width: 34px; height: 34px; border-radius: 10px; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.ed-clip-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding-bottom: 6px; }
.ed-cact { display: grid; justify-items: center; gap: 4px; padding: 9px 2px 7px; border: 0; border-radius: 10px; background: var(--s2); color: var(--text); cursor: pointer; font: 600 10.5px var(--font); transition: background 0.15s; }
.ed-cact:hover { background: var(--s3); }
.ed-cact:disabled { opacity: 0.35; cursor: default; }
.ed-cact.danger:hover { background: #fde8e6; color: var(--rec); }
.ed-seg.on { box-shadow: 0 0 0 2px var(--accent), inset 0 0 0 1px rgba(253, 160, 6, 0.4); z-index: 1; }
.ed-seg.fx::before { content: "fx"; position: absolute; right: 5px; top: 4px; z-index: 2; font: 800 9px/14px var(--font); padding: 0 4px; border-radius: 4px; background: var(--accent); color: #0b0b0c; }
/* segmentos com muitas opções quebram linha em vez de cortar o texto */
.ed-panel .seg.wide { flex-wrap: wrap; }
.ed-panel .seg.wide .seg-btn { flex: 1 1 auto; min-width: 0; }

/* barra de cenas do estúdio */
.scene-bar { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 0; flex: none; }
.scene-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; flex: none; }
.scene-wrap { position: relative; flex: none; }
.scene { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--s2); color: var(--text); cursor: pointer; font: 600 12.5px var(--font); white-space: nowrap; transition: background 0.15s, transform 0.1s; }
.scene:hover { background: var(--s3); }
.scene:active { transform: scale(0.97); }
.scene.on { background: var(--text); color: #fff; }
.scene.on kbd { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none; }
.scene kbd { font-size: 10px; padding: 2px 5px; }
.scene.add { background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.scene.add:hover { color: var(--text); background: var(--s2); }
.scene-del { position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.scene-wrap:hover .scene-del { opacity: 1; }
.slide-count { border: 0; background: none; font: 600 13px var(--font); color: var(--text); cursor: pointer; padding: 4px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.slide-count:hover { background: var(--s2); }
.pip-scenes { flex-wrap: wrap; justify-content: center; }

/* editor: ações rápidas, modelos de exportação, marcações da gravação */
.ed-quick { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 14px; border: 0; border-radius: 14px; background: var(--text); color: #fff; cursor: pointer; text-align: left; font: inherit; transition: transform 0.12s var(--ease), background 0.15s; }
.ed-quick:hover { background: #1f2023; transform: translateY(-1px); }
.ed-quick:disabled { opacity: 0.6; cursor: default; transform: none; }
.ed-quick > svg, .ed-quick > .ic { color: var(--accent); flex: none; }
.ed-quick span { display: grid; gap: 2px; }
.ed-quick b { font-size: 14px; }
.ed-quick small { font-size: 12px; color: rgba(255, 255, 255, 0.65); }
.x-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.x-preset { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border: 0; border-radius: 12px; background: var(--s2); cursor: pointer; font: inherit; color: var(--text); text-align: center; }
.x-preset:hover { background: var(--s3); }
.x-preset.on { background: var(--accent-soft); color: var(--accent-ink); }
.x-preset b { font-size: 11.5px; line-height: 1.2; }
.x-preset small { font-size: 10.5px; color: var(--muted); }
.ed-mark { position: absolute; top: 3px; width: 18px; height: 18px; margin-left: -9px; border: 0; border-radius: 5px; background: #fde68a; color: #92400e; display: grid; place-items: center; cursor: pointer; z-index: 2; padding: 0; }
.ed-mark:hover { background: #fcd34d; }

/* estúdio em tela cheia: fundo escuro, palco grande */
.studio.full { background: #0b0b0c; }
.studio.full .st-head { background: #0b0b0c; box-shadow: none; }
.studio.full .st-head .crumb b, .studio.full .timer { color: #fff; }
.studio.full .stage-area { background: #141417; }
.studio.full .scene-label { color: rgba(255, 255, 255, 0.5); }
.studio.full .scene { background: #1f2024; color: #fff; }
.studio.full .scene.on { background: var(--accent); color: #0b0b0c; }
.studio.full .scene.add { color: rgba(255, 255, 255, 0.6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }

/* biblioteca de músicas e efeitos */
.lib-box { display: grid; gap: 10px; }
.lib-search { display: flex; align-items: center; gap: 6px; padding-left: 10px; border-radius: 10px; background: var(--s2); color: var(--muted); }
.lib-search .input { flex: 1; border: 0; background: transparent; box-shadow: none; padding-left: 2px; }
.lib-search .input:focus { box-shadow: none; }
.lib-list { display: grid; gap: 4px; max-height: 320px; overflow-y: auto; }
.lib-row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; background: var(--s2); }
.lib-row.playing { background: var(--accent-soft); }
.lib-play { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.lib-row.playing .lib-play { background: var(--accent); color: #0b0b0c; }
.lib-info { flex: 1; min-width: 0; display: grid; }
.lib-info b { font-size: 12.5px; }
.lib-info small { font-size: 11px; color: var(--muted); }
.lib-lic { flex: none; font: 700 9.5px/18px var(--font); padding: 0 6px; border-radius: 5px; }
.lib-lic.free { background: var(--ok-soft); color: var(--ok); }
.lib-lic.by { background: var(--warn-soft); color: var(--warn); }
.lib-empty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border-radius: 10px; background: var(--s2); color: var(--muted); font-size: 12.5px; }
.ed-drop.slim { padding: 10px; gap: 2px; }
.sfx-list { display: grid; gap: 4px; }
.sfx-item { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 10px; background: var(--s2); font-size: 12.5px; }
.sfx-item b { flex: 1; min-width: 0; }
.sfx-item input[type="range"] { width: 70px; flex: none; }
.sfx-go { border: 0; border-radius: 6px; background: var(--s1); padding: 3px 6px; font: 700 10.5px var(--font); cursor: pointer; font-variant-numeric: tabular-nums; box-shadow: var(--ring); }
.ed-sfx { position: absolute; top: 4px; bottom: 4px; display: flex; align-items: center; gap: 3px; padding: 0 5px; border: 0; border-radius: 6px; background: #fde68a; color: #92400e; font: 700 9.5px var(--font); overflow: hidden; white-space: nowrap; cursor: pointer; z-index: 1; }
.ed-sfx span { overflow: hidden; text-overflow: ellipsis; }
/* trilha de áudio em três faixas: música em cima, efeitos no meio, dublagem embaixo */
.ed-track[data-track="audio"] { height: 52px; }
.ed-tl-labels .ed-lab:last-child { height: 52px; }
.ed-track[data-track="audio"] .ed-bed { height: 13px; top: 3px; bottom: auto; font-size: 9.5px; padding: 0 6px; }
.ed-track[data-track="audio"] .ed-bed.dub { top: auto; bottom: 3px; }
.ed-track[data-track="audio"] .ed-sfx { top: 18px; bottom: 18px; }

/* ---------- salvar na pasta editaê (depois de gravar/exportar) ---------- */
.lib-side .folder-chip:has(.folder-save) { background: none; padding: 0; width: 100%; }
.folder-save { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); cursor: pointer; font: inherit; transition: background 0.15s; }
.folder-save:hover { background: #ffe9c2; }
.folder-save span { display: flex; flex-direction: column; min-width: 0; }
.folder-save b { font-size: var(--fs-sm); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-save small { font-size: 11.5px; opacity: 0.85; }
.ov-fields { display: flex; flex-direction: column; gap: 8px; }
.ov-fields[hidden], .input[data-ov-field][hidden] { display: none; }
.size-pop { width: 280px; }
.size-row { display: grid; grid-template-columns: 1fr 34px 56px 34px; align-items: center; gap: 6px; }
.size-row span { font-weight: 600; font-size: var(--fs-sm); }
.size-row b { text-align: center; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.size-row .icon-btn { width: 34px; height: 34px; border-radius: 10px; background: var(--s2); font-size: 18px; font-weight: 600; justify-content: center; }
.size-pop kbd { font: 600 11px var(--font); background: var(--s2); border-radius: 5px; padding: 1px 5px; }
/* barra do estúdio numa linha só em telas médias */
@media (max-width: 1180px) {
  .dock { gap: 3px; padding: 5px; }
  .dock-btn { width: 35px; height: 36px; }
  .dock-sep { margin: 0 2px; }
}

/* modelos */
.models-pop { width: 320px; }
.models-list { display: grid; gap: 4px; max-height: 240px; overflow: auto; }
.model-row { display: flex; align-items: center; gap: 2px; }
.model-apply { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; border-radius: 10px; background: var(--s2); color: var(--text); font: 600 var(--fs-sm) var(--font); cursor: pointer; text-align: left; transition: background 0.15s; }
.model-apply:hover { background: var(--accent-soft); color: var(--accent-ink); }
.model-apply svg { color: var(--accent); flex: none; }
.models-actions { display: flex; gap: 6px; }
.models-actions .btn.primary { flex: 1; justify-content: center; }

/* ferramentas (caneta, laser...): num botão da barra, sem ocupar a imagem */
.tools-pop { width: 340px; }
.tools-pop .pop-head { display: flex; align-items: baseline; gap: 8px; }
.tools-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tools-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.tool-opt { position: relative; display: grid; justify-items: center; gap: 4px; min-width: 0; padding: 9px 4px 7px; border: 0; border-radius: 10px; background: var(--s2); color: var(--text); cursor: pointer; font: 600 11.5px var(--font); transition: background 0.15s; }
.tool-opt:hover { background: var(--s3); }
.tool-opt.on { background: var(--accent-soft); color: var(--accent-ink); }
.tool-opt span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-opt kbd { position: absolute; top: 4px; right: 5px; font: 600 9.5px var(--font); color: var(--muted); }
.dock-btn.active-tool { background: var(--accent-soft); color: var(--accent-ink); }
.tools-actions .tool-opt kbd { display: none; }

/* =====================================================================
   CELULAR (até 760 px). Regra do projeto: nada de menu embaixo; barras de
   navegação e de controle ficam sempre no topo.
   ===================================================================== */
@media (max-width: 760px) {
  :root { --pad: 16px; --head: 56px; }
  html, body { overflow-x: hidden; }

  /* cabeçalho: marca, ações; a navegação Gravar/Editar desce para uma linha própria */
  .st-head { flex-wrap: wrap; height: auto; min-height: var(--head); padding: 8px var(--pad); row-gap: 8px; }
  .st-head .brand b { font-size: 15px; }
  .st-head .top-nav { order: 10; width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .st-head .top-nav .seg-btn { justify-content: center; }
  #btnNew { padding: 0 12px; }
  #btnNew .ic + * , #btnNew { font-size: 0; }
  #btnNew .ic { width: 18px; height: 18px; }

  /* biblioteca: pastas viram fileira de chips rolável, logo abaixo do topo */
  .lib-body { flex-direction: column; }
  .lib-side { width: auto; flex-direction: row; align-items: center; gap: 8px; padding: 8px var(--pad) 10px; overflow-x: auto; overflow-y: hidden; box-shadow: 0 1px 0 var(--line); scrollbar-width: none; }
  .lib-side::-webkit-scrollbar { display: none; }
  .lib-side-list { display: flex; gap: 6px; flex: none; }
  .lib-side-title { order: 5; margin: 0; }
  .lib-side-title span, .lib-side-sep, .lib-side .tip { display: none; }
  .lib-folder { width: auto; height: 34px; padding: 0 12px 0 8px; border-radius: 99px; background: var(--s2); white-space: nowrap; flex: none; font-size: 13px; }
  .lib-folder .ellipsis { flex: none; max-width: 160px; }
  .lib-side .folder-chip { margin: 0; flex: none; max-width: 70vw; }
  .folder-save { padding: 6px 10px; }
  .folder-save small { display: none; }
  .lib-main { padding: 16px var(--pad) 40px; gap: 16px; overflow: visible; }
  .lib-head { gap: 10px; }
  .lib-head-ic { width: 40px; height: 40px; border-radius: 12px; }
  .lib-head-t h1 { font-size: 20px; }
  .lib-head .grow { display: none; }
  .lib-head .search { order: 10; width: 100%; }
  .lib-head .search input { width: 100%; }
  .cards { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
  .grid { gap: 24px; }

  /* janelas: ocupam a largura toda, com rolagem */
  .modal-back { padding: 12px; align-items: flex-start; }
  .modal, .modal.wide { width: 100%; max-width: none; max-height: calc(100dvh - 24px); overflow-y: auto; }
  .toasts { left: 12px; right: 12px; top: 12px; bottom: auto; }
}
@media (max-width: 420px) {
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  /* página da aula: título em cima, ações numa fileira, player e lista empilhados */
  .project-page { height: auto; min-height: 100%; }
  .project-page .st-head .crumb { max-width: none; flex: 1; }
  .project-page .st-head .grow, .project-page #total { display: none; }
  .project-page .st-head > .btn { order: 10; flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 6px; font-size: 12.5px; gap: 5px; }
  .project-page .st-head > .btn .ic { width: 14px; height: 14px; }
  .project { display: flex; flex-direction: column; padding: 0 var(--pad) var(--pad); }
  .player { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .edit-bar { padding: 12px; }
  .edit-row { flex-wrap: wrap; }
  .edit-row .tool-group { width: 100%; justify-content: space-between; }
  .edit-row.hint { display: none; }
  .tl { height: 56px; }
  .side-col { min-height: 320px; }
}
@media (max-width: 760px) {
  .project-page .st-head .crumb { flex: 1 1 calc(100% - 60px); }
  .project-page .st-head > .btn { flex: 1 1 20%; height: 38px; }
}
@media (max-width: 760px) {
  /* estúdio: topo com título e tempo; barra de controles logo abaixo (nunca embaixo) */
  .studio .st-head { flex-wrap: nowrap; gap: 6px; }
  .studio .crumb { max-width: none; flex: 1; min-width: 0; }
  .studio .crumb .st-take { display: none; }
  .studio .hud { position: static; transform: none; padding: 4px 10px; flex: none; }
  .studio .hud-state { display: none; }
  .studio .head-actions { gap: 0; }
  .studio #btnPip { display: none; }
  .st-body { overflow-y: auto; }
  .st-main { padding: 0 var(--pad) var(--pad); min-height: 0; gap: 10px; }
  .dock { order: -1; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; max-width: 100%; width: 100%; align-self: stretch; border-radius: 16px; scrollbar-width: none; padding: 5px; }
  .dock::-webkit-scrollbar { display: none; }
  .dock-sec { flex: none; }
  .dock .rec-sec { position: sticky; right: -5px; background: var(--s1); padding: 0 4px 0 6px; box-shadow: -10px 0 12px -6px rgba(0, 0, 0, 0.12); }
  .rec-btn { width: 44px; height: 44px; }
  .stage-area { flex: none; background: none; border-radius: 0; }
  .stage-wrap { border-radius: 14px; }
  .scene-bar { order: 2; }
  .pop, .pop[data-popup], .tools-pop, .models-pop, .size-pop { left: 8px !important; right: 8px; width: auto !important; max-width: none; transform-origin: 50% 0; max-height: 60dvh; overflow-y: auto; }
  .drawer { margin: 0 var(--pad) var(--pad); max-height: none; }
  .drawer-head { overflow-x: auto; scrollbar-width: none; }
  .drawer-head::-webkit-scrollbar { display: none; }
  .drawer-head .tab { flex: none; }
}
@media (max-width: 760px) {
  .st-main { flex: none; min-height: auto; }
  .drawer { flex: none; }
}
@media (max-width: 760px) {
  /* edição no celular (estilo CapCut): abas no topo, prévia, linha do tempo e o painel embaixo delas */
  .ed-page { height: auto; min-height: 100dvh; overflow: visible; display: flex; flex-direction: column; }
  .ed-head { flex-wrap: nowrap; gap: 4px; position: sticky; top: 0; }
  .ed-head .ed-title { min-width: 0; flex: 1; }
  .ed-head .grow, .ed-head .ed-kbd, .ed-head .ed-sep { display: none; }
  .ed-head .btn { padding: 0 10px; height: 36px; font-size: 13px; }
  .ed-head .btn.ghost { font-size: 0; gap: 0; }
  .ed-head .btn.ghost .rec-dot { width: 12px; height: 12px; }
  .ed-body { display: contents; }
  .ed-rail { order: 1; width: auto; margin: 10px var(--pad) 0; flex-direction: row; align-self: stretch; overflow-x: auto; scrollbar-width: none; padding: 4px; gap: 2px; }
  .ed-rail::-webkit-scrollbar { display: none; }
  .ed-rail-btn { width: auto !important; flex: none; flex-direction: row; display: flex; gap: 6px; padding: 8px 12px; }
  .ed-rail-btn span { font-size: 12.5px !important; }
  .ed-stage { order: 2; margin: 10px var(--pad) 0; padding: 10px; flex: none; }
  .ed-canvas-wrap { flex: none; height: 36vh; }
  .ed-transport { flex-wrap: wrap; row-gap: 6px; }
  .ed-transport .grow { display: none; }
  .ed-transport #edFormats { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .ed-transport #edFormats .seg-btn { justify-content: center; padding: 0 4px; font-size: 12px; }
  .ed-timeline { order: 3; margin: 10px var(--pad) 0; }
  .ed-tl-labels { width: 40px !important; }
  .ed-tl-labels .ed-lab b { display: none; }
  .ed-tl-tools .btn span { display: none; }
  .ed-panel { order: 4; width: auto !important; margin: 10px var(--pad) var(--pad); overflow: visible; }
  .ed-panel-body { overflow: visible; }
}
@media (max-width: 760px) { #edPanel { scroll-margin-top: 72px; } }
@media (max-width: 760px) {
  .ed-head { z-index: 6; }
  .ed-rail { position: sticky; top: 60px; z-index: 5; background: #fff; }
  #edPanel { scroll-margin-top: 124px; }
}
@media (max-width: 760px) {
  .ed-rail { box-shadow: 0 -8px 0 6px #fff, var(--ring); }
}

/* ---------- editor: peças só do celular (no computador não aparecem) ---------- */
.ed-mbar, .ed-sheet-bar { display: none; }
.ed-sheet { display: contents; }

@media (max-width: 760px) {
  /* topo enxuto: voltar, nome, desfazer e exportar */
  .ed-head .ed-redo, .ed-head a.btn.ghost { display: none; }
  .ed-rail { display: none !important; }

  /* ações rápidas logo abaixo do topo (fixas ao rolar) */
  .ed-mbar { order: 1; display: flex; gap: 6px; padding: 8px var(--pad); overflow-x: auto; scrollbar-width: none; position: sticky; top: 56px; z-index: 5; background: #fff; box-shadow: 0 1px 0 var(--line); }
  .ed-mbar::-webkit-scrollbar { display: none; }
  .ed-mchip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px 0 11px; border: 0; border-radius: 99px; background: var(--s2); color: var(--text); font: 600 13px var(--font); cursor: pointer; }
  .ed-mchip:active { transform: scale(0.96); }
  .ed-mchip.accent { background: var(--text); color: #fff; }
  .ed-mchip.ghost { background: none; box-shadow: inset 0 0 0 1px var(--line); padding: 0 11px; }
  .ed-mchip[disabled] { opacity: 0.55; }

  /* prévia grande e limpa: um toque toca/pausa */
  .ed-stage { order: 2; margin: 10px var(--pad) 0; padding: 0; background: none; }
  .ed-canvas-wrap { height: 46vh; }
  .ed-transport { background: none; box-shadow: none; padding: 4px 0 0; justify-content: center; gap: 10px; }
  .ed-transport #edBack5, .ed-transport #edFwd5, .ed-transport #edFormats { display: none; }

  /* linha do tempo: só as trilhas; arrastar rola, dois dedos dão zoom */
  .ed-timeline { order: 3; margin: 10px var(--pad) var(--pad); }
  .ed-tl-tools { display: none !important; }
  .ed-tl-labels { display: none !important; }
  .ed-tl-inner { touch-action: pan-x; }

  /* painel: por cima de tudo, em tela cheia, com "Pronto" no topo */
  .ed-page.sheet-open .ed-sheet { display: flex; position: fixed; inset: 0; z-index: 60; flex-direction: column; background: #fff; animation: fadeIn 0.16s; }
  .ed-page:not(.sheet-open) .ed-sheet { display: none; }
  .ed-sheet-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; box-shadow: 0 1px 0 var(--line); flex: none; }
  .ed-sheet-bar b { font-size: 16px; }
  .ed-sheet .ed-panel { order: 0; flex: 1; margin: 0; width: auto !important; border-radius: 0; box-shadow: none; overflow-y: auto; }
  .ed-sheet .ed-panel-head { display: none; }
  .ed-sheet .ed-panel-body { overflow: visible; padding: 4px var(--pad) calc(var(--pad) + env(safe-area-inset-bottom)); }
  .ed-menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: var(--pad); }
  .ed-menu-grid button { display: grid; justify-items: center; gap: 8px; padding: 18px 6px; border: 0; border-radius: 16px; background: var(--s2); color: var(--text); font: 600 13px var(--font); cursor: pointer; }
}
@media (max-width: 760px) {
  /* altura da prévia acompanha o formato (sem faixas vazias); vertical vai até 58% da tela */
  .ed-canvas-wrap { height: min(58vh, calc((100vw - 2 * var(--pad)) / var(--arn, 1.7778))); }
}
@media (max-width: 760px) {
  .ed-page.sheet-open .ed-sheet { inset: auto 0 0 0; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(11, 11, 12, 0.16); animation: sheetIn 0.22s var(--ease); }
  .ed-page.sheet-open .ed-transport { visibility: hidden; }
  @keyframes sheetIn { from { transform: translateY(24px); opacity: 0; } }
}
/* estúdio: peças só do celular / só do computador */
.m-only { display: none !important; }
@media (max-width: 760px) {
  .m-only { display: flex !important; }
  .d-only { display: none !important; }
  .scene-bar { opacity: 0.9; }
  .mlist-pop { gap: 8px; }
  .mlist { display: grid; gap: 4px; }
  .mlist button { display: grid; grid-template-columns: 24px 1fr; align-items: center; column-gap: 12px; padding: 12px; border: 0; border-radius: 12px; background: var(--s2); color: var(--text); font: 600 14px var(--font); text-align: left; cursor: pointer; }
  .mlist button small { grid-column: 2; font-weight: 500; font-size: 12px; color: var(--muted); }
  .mlist button.on { background: var(--accent-soft); color: var(--accent-ink); }
}
@media (max-width: 760px) {
  .dock .chip .chip-label, .dock .chip > .ic:last-child { display: none; }
  .dock .chip { padding: 0 8px; gap: 4px; }
  .dock { justify-content: space-between; }
  .dock .rec-sec { position: static; box-shadow: none; padding: 0; }
}
@media (max-width: 760px) {
  .dock .dock-sep { display: none !important; }
  .scene-bar .scene-label, .scene-bar > .muted:first-child { display: none; }
}
@media (max-width: 760px) {
  /* aulas em linhas compactas: miniatura à esquerda, título e dados ao lado */
  .cards, .cards:has(.card) { grid-template-columns: 1fr !important; gap: 10px; }
  .card { display: grid; grid-template-columns: 124px minmax(0, 1fr); align-items: center; gap: 12px; }
  .card .thumb { border-radius: 10px; box-shadow: none; }
  .card:hover .thumb { transform: none; }
  .card .card-actions { display: none; }
  .lib .card-body { padding: 0; gap: 4px; }
  .card-body b { font-size: 14px; }
  .card-meta { flex-wrap: wrap; row-gap: 3px; }
  .card-course { max-width: 100%; }
  /* menos botões no topo da pasta */
  .lib-head .color-pick { display: none; }
  .lib-head [data-new-in] { padding: 0 10px; }

  /* página da aula: assistir e ajustar; os cortes finos ficam no editor */
  .project-page #btnPlayAll { display: none; }
  .project-page #btnExport { flex: 0 0 auto; font-size: 0; gap: 0; width: 42px; padding: 0; }
  .project-page #btnExport .ic { width: 18px; height: 18px; }
  .edit-row .tool-group { display: none; }
  .edit-bar { gap: 8px; }
}
@media (max-width: 760px) {
  /* iPhone: campo com letra menor que 16px faz o Safari dar zoom ao tocar */
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea { font-size: 16px !important; }
  /* respeita a barrinha do iPhone e o entalhe */
  .page, .ed-page, .studio { padding-bottom: env(safe-area-inset-bottom); }
  .st-head { padding-left: max(var(--pad), env(safe-area-inset-left)); padding-right: max(var(--pad), env(safe-area-inset-right)); }
  /* toques sem atraso e sem o destaque cinza do navegador */
  button, a, .card, [data-open] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
}
@media (max-width: 760px) {
  /* o que se arrasta com o dedo não rola a página nem a linha do tempo */
  .ed-ruler, .ed-txt, .ed-capbox, .ed-capbox *, .stage-wrap canvas { touch-action: none; }
  .ed-txt { min-height: 30px; }
}

/* ---------- celular: revisão de fluidez ---------- */
@media (max-width: 760px) {
  /* a página rola (e a barra de endereço do iPhone recolhe); nada vaza para o lado */
  html, body { overflow-x: clip; }
  .lib { height: auto; min-height: 100dvh; overflow: visible; }
  .lib-body { overflow: visible; }

  /* estúdio: arrastar na imagem rola a página, a menos que haja ferramenta de desenho ativa */
  .stage-wrap canvas, .stage-wrap #stage { touch-action: pan-y; }
  .stage-wrap:is([data-tool="pen"], [data-tool="marker"], [data-tool="crop"], [data-tool="laser"], [data-tool="spot"], [data-tool="zoom"]) #stage { touch-action: none; }

  /* textos da linha do tempo: tocar seleciona; já selecionado, arrastar move */
  .ed-txt { touch-action: pan-x; }
  .ed-txt.on { touch-action: none; }

  /* painel: a rolagem não "vaza" para a página de trás */
  .ed-sheet .ed-panel, .pop, .modal { overscroll-behavior: contain; }

  /* alvos de toque do tamanho do dedo */
  .ed-chip, .btn.sm { min-height: 36px; }
  .icon-btn.sm { width: 36px; height: 36px; }
  input[type="range"] { height: 28px; }
  input[type="range"]::-webkit-slider-thumb { width: 24px; height: 24px; }
  input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; }
  .ed-capbox .h { width: 22px; height: 22px; }
  .ed-capbox .h::before { content: ""; position: absolute; inset: -10px; }
  .ed-capbar button { min-width: 36px; height: 36px; }

  /* ações de cada aula: visíveis no celular, num canto da miniatura */
  .card .card-actions { display: flex; opacity: 1; transform: none; right: 4px; top: 4px; gap: 2px; }
  .card .card-actions .icon-btn.sm { width: 28px; height: 28px; }
  .card .card-actions [data-rename] { display: none; }
}
/* sem mouse (celular e tablet): o que só aparecia com o mouse por cima fica visível */
@media (hover: none) {
  .prompter-ctrl, .scene-del, .asset-del, .ed-tpl.mine [data-mine-del], .take-actions { opacity: 1 !important; transform: none !important; }
  .scene-del, .asset-del { width: 28px; height: 28px; }
}

/* =====================================================================
   EDITOR NO CELULAR, no estilo do Edits (Instagram): escuro, prévia no
   centro, agulha fixa no meio e clipes em tira de quadros. Ferramentas
   ficam no topo (regra do projeto: nada de menu embaixo no celular).
   ===================================================================== */
@media (max-width: 760px) {
  .ed-page {
    --bg: #000; --s1: #121214; --s2: #1f1f22; --s3: #2a2a2e;
    --text: #f5f5f7; --muted: #8e8e95; --line: rgba(255, 255, 255, 0.09); --line-2: rgba(255, 255, 255, 0.14);
    --ring: 0 0 0 1px rgba(255, 255, 255, 0.08); --shadow: none; --shadow-sm: none;
    --accent-soft: rgba(253, 160, 6, 0.16); --accent-ink: #fdb43a;
    background: #000 !important; color: var(--text); color-scheme: dark;
  }
  .ed-page .ed-head { background: #000; box-shadow: none; }
  .ed-page .ed-head .ed-title .muted { color: var(--muted); }
  .ed-page .ed-head #edExport { border-radius: 99px; height: 34px; padding: 0 14px; }

  /* ferramentas: ícone com o nome embaixo, sem caixas */
  .ed-mbar { background: #000; box-shadow: 0 1px 0 var(--line); gap: 2px; padding: 6px 8px 8px; justify-content: space-between; }
  .ed-mchip { flex-direction: column; height: auto; min-width: 58px; padding: 6px 4px; gap: 5px; background: none !important; color: var(--text); font: 600 11px var(--font); border-radius: 12px; }
  .ed-mchip svg { width: 22px; height: 22px; }
  .ed-mchip.accent { color: #fdb43a; }
  .ed-mchip.ghost { box-shadow: none; color: var(--muted); }
  .ed-mchip:active { background: var(--s2) !important; }

  /* prévia grande no centro, sem moldura */
  .ed-stage { background: none !important; margin: 12px var(--pad) 0; }
  .ed-canvas-wrap canvas { border-radius: 12px; box-shadow: none !important; }
  .ed-canvas-wrap { height: min(52vh, calc((100vw - 2 * var(--pad)) / var(--arn, 1.7778))); }
  .ed-transport { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 2px 2px; background: none !important; box-shadow: none !important; }
  .ed-transport .time { grid-column: 1; grid-row: 1; margin: 0; font-size: 12.5px; color: var(--text); }
  .ed-transport .time .muted { color: var(--muted); }
  .ed-transport #edPlay { grid-column: 2; grid-row: 1; width: 44px; height: 44px; background: #fff !important; color: #000 !important; }

  /* linha do tempo: agulha branca fixa no meio; os clipes correm por baixo */
  .ed-timeline { background: none !important; box-shadow: none !important; border-radius: 0; margin: 8px 0 var(--pad); position: relative; }
  .ed-tl-scroll { padding-inline: 50%; scrollbar-width: none; }
  .ed-tl-scroll::-webkit-scrollbar { display: none; }
  .ed-tl-body { position: relative; }
  .ed-tl-body::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); pointer-events: none; z-index: 4; }
  .ed-playhead, .ed-hover { display: none !important; }
  .ed-ruler { opacity: 0.6; }
  .ed-seg { background: #26262a var(--th) left center / auto 100% repeat-x !important; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important; }
  .ed-seg canvas { display: none; }
  .ed-seg span { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
  .ed-seg.on { box-shadow: inset 0 0 0 2.5px #fff !important; }
  .ed-track[data-track="video"] { height: 58px; }

  /* painel escuro também */
  .ed-page.sheet-open .ed-sheet, .ed-sheet .ed-panel { background: #121214 !important; }
  .ed-sheet-bar { box-shadow: 0 1px 0 var(--line); }
  .ed-page .input, .ed-page select, .ed-page textarea { background: var(--s2); color: var(--text); border-color: transparent; }
}
@media (max-width: 760px) {
  .ed-mbar { justify-content: space-around; padding-inline: 2px; }
  .ed-mchip { min-width: 0; flex: 1 1 0; padding-inline: 2px; }
  .ed-mchip span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ed-page .ed-track { background: #111113; }
  .ed-page .ed-cap { background: #2c2c31 !important; color: #e8e8ec !important; box-shadow: none !important; }
  .ed-page .ed-txt { background: #fdb43a; color: #111; }
  .ed-page .ed-track-hint { color: var(--muted); }
}

/* ---------- celular: proporções mais sutis (nem grandão, nem miúdo) ---------- */
@media (max-width: 760px) {
  /* topo do editor */
  .ed-page .ed-head { min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
  .ed-page .ed-head .ed-title b { font-size: 14px; }
  .ed-page .ed-head .ed-title .small { font-size: 11px; }
  .ed-page .ed-head #edExport { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
  .ed-page .ed-head #edExport .ic { width: 14px; height: 14px; }
  .ed-mbar { top: 52px; padding: 4px 4px 6px; }
  .ed-mchip { gap: 4px; padding: 5px 2px; font-size: 10.5px; font-weight: 550; }
  .ed-mchip svg { width: 19px; height: 19px; }

  /* prévia e reprodução */
  .ed-transport { padding-top: 8px; }
  .ed-transport .time { font-size: 12px; }
  .ed-transport #edPlay { width: 40px; height: 40px; }
  .ed-transport #edPlay .ic { width: 16px; height: 16px; }

  /* trilhas: vídeo em destaque, as outras finas */
  .ed-track[data-track="video"] { height: 50px; }
  .ed-page .ed-track:not([data-track="video"]) { height: 24px; }
  .ed-track[data-track="audio"] { height: 34px !important; }
  .ed-seg { border-radius: 7px; }
  .ed-seg span { font-size: 9.5px; }
  .ed-page .ed-cap { font-size: 9.5px; }
  .ed-ruler { height: 18px; font-size: 9.5px; }
  .ed-tl-body::after { width: 1.5px; }

  /* painéis e controles */
  .ed-sheet-bar { padding: 6px 10px; }
  .ed-sheet-bar b { font-size: 15px; }
  .ed-sheet-bar .btn.sm { height: 32px; padding: 0 14px; }
  .ed-sheet .ed-panel-body { font-size: 13.5px; }
  .ed-chip, .btn.sm { min-height: 34px; }
  .icon-btn.sm { width: 34px; height: 34px; }
  input[type="range"] { height: 26px; }
  input[type="range"]::-webkit-slider-thumb { width: 20px; height: 20px; }
  input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; }
  .ed-menu-grid { gap: 8px; }
  .ed-menu-grid button { padding: 14px 6px; font-size: 12.5px; border-radius: 14px; gap: 6px; }
  .ed-menu-grid button svg { width: 20px; height: 20px; }

  /* estúdio e listas: um pouco mais contidos */
  .rec-btn { width: 42px; height: 42px; }
  .dock-btn { width: 38px; height: 38px; }
  .mlist button { padding: 10px 12px; font-size: 13.5px; }
  .lib-folder { height: 32px; font-size: 12.5px; }
  .lib-head-t h1 { font-size: 18px; }
  .card { grid-template-columns: 112px minmax(0, 1fr); }
  .card-body b { font-size: 13.5px; }
}
@media (max-width: 760px) {
  .ed-track[data-track="audio"] { height: 44px !important; }
  .ed-track[data-track="audio"] .ed-bed { height: 11px; font-size: 9px; }
  .ed-track[data-track="audio"] .ed-sfx { top: 16px; bottom: 16px; }
}
@media (max-width: 760px) {
  .ed-capbox .h { width: 14px; height: 14px; }
  .ed-capbox .h::before { inset: -12px; }
  .ed-capbar button { min-width: 32px; height: 32px; }
}

/* editor no celular: ferramentas embaixo, como no Edits (exceção pedida pelo usuário) */
@media (max-width: 760px) {
  .ed-mbar { order: 9; position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 20; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(0, 0, 0, 0.94); box-shadow: 0 -1px 0 var(--line); backdrop-filter: blur(12px); }
  .ed-page { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .ed-timeline { margin-bottom: 12px; }
}

/* =====================================================================
   ESTÚDIO NO CELULAR, no estilo do Edits: escuro, imagem grande, gravar
   no centro da barra de baixo (exceção à regra do menu no topo, pedida).
   ===================================================================== */
@media (max-width: 760px) {
  .studio {
    --bg: #000; --s1: #121214; --s2: #1f1f22; --s3: #2a2a2e;
    --text: #f5f5f7; --muted: #8e8e95; --line: rgba(255, 255, 255, 0.09); --line-2: rgba(255, 255, 255, 0.14);
    --ring: 0 0 0 1px rgba(255, 255, 255, 0.08); --shadow: 0 10px 30px rgba(0, 0, 0, 0.5); --shadow-sm: none;
    --accent-soft: rgba(253, 160, 6, 0.16); --accent-ink: #fdb43a;
    background: #000; color: var(--text); color-scheme: dark; min-height: 100dvh;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .studio .st-head { background: #000; min-height: 52px; }
  .studio .hud { background: var(--s2); box-shadow: none; }
  .studio .crumb b { font-size: 14px; }
  .studio .stage-area { background: none; }
  .studio .stage-wrap { border-radius: 16px; box-shadow: none; }
  .studio .scene-bar { order: 3; padding: 0 2px; }
  .studio .scene-bar button { background: var(--s2); color: var(--text); box-shadow: none; }

  /* barra de baixo: fontes à esquerda, gravar no centro, layout e Mais à direita */
  .studio .dock {
    order: 9; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; width: auto; max-width: none;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; row-gap: 6px; overflow: visible;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); border-radius: 0;
    background: rgba(0, 0, 0, 0.92); backdrop-filter: blur(14px); box-shadow: 0 -1px 0 var(--line);
  }
  .studio .dock > .dock-sec { grid-row: 2; }
  .studio .dock > .dock-sec:first-child { grid-column: 1; justify-self: start; gap: 0; }
  .studio .dock > .rec-sec { grid-column: 2; justify-self: center; position: static; background: none; box-shadow: none; padding: 0; gap: 10px; }
  .studio .dock > .m-only { grid-column: 3; justify-self: end; gap: 2px; }
  .studio .dock > .slide-part { grid-column: 1 / -1; grid-row: 1; justify-self: center; background: var(--s2); border-radius: 99px; padding: 2px 6px; }
  .studio .dock .chip { background: none; color: var(--text); height: 38px; padding: 0 6px; }
  .studio .dock .chip .mini-meter { display: none; }
  .studio .dock-btn { color: var(--text); }
  .studio .rec-btn { width: 64px; height: 64px; background: transparent; box-shadow: inset 0 0 0 4px #fff; }
  .studio .rec-btn .rec-core { width: 50px; height: 50px; }
  .studio .dock .live-only { width: 34px; height: 34px; }

  /* janelinhas e ajustes sobem de baixo, por cima da imagem */
  .studio .pop { position: fixed; top: auto; max-height: 55dvh; background: #161618; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6); transform-origin: 50% 100%; }
  .studio .drawer:not([hidden]) { position: fixed; left: 0; right: 0; bottom: 0; top: 34dvh; z-index: 40; margin: 0; border-radius: 20px 20px 0 0; background: #161618; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6); overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); animation: sheetIn 0.22s var(--ease); }
  .studio .drawer .input, .studio .drawer select, .studio .pop .input, .studio .pop select { background: var(--s2); color: var(--text); }
}
@media (max-width: 760px) {
  [data-rec="recording"] .studio .rec-btn .rec-core, [data-rec="paused"] .studio .rec-btn .rec-core, [data-rec="saving"] .studio .rec-btn .rec-core,
  .studio[data-rec="recording"] .rec-btn .rec-core, .studio[data-rec="paused"] .rec-btn .rec-core, .studio[data-rec="saving"] .rec-btn .rec-core { width: 26px; height: 26px; border-radius: 7px; }
}
@media (max-width: 760px) {
  .studio .st-body { display: flex; flex-direction: column; min-height: calc(100dvh - 52px - 100px - env(safe-area-inset-bottom)); overflow: visible; }
  .studio .st-main { flex: 1; justify-content: center; gap: 14px; }
  .studio .scene-bar { justify-content: center; }
  .studio .scene-del { display: none !important; }
}
@media (max-width: 760px) {
  .studio.drawer-open .st-main { justify-content: flex-start; }
  .studio.drawer-open .scene-bar { display: none; }
}

/* =====================================================================
   LISTA DE AULAS NO CELULAR, no estilo do Edits: escura, aulas em grade,
   navegação embaixo com "+" grande no centro (confirmado pelo usuário).
   ===================================================================== */
@media (max-width: 760px) {
  .lib {
    --bg: #000; --s1: #121214; --s2: #1f1f22; --s3: #2a2a2e;
    --text: #f5f5f7; --muted: #8e8e95; --line: rgba(255, 255, 255, 0.09); --line-2: rgba(255, 255, 255, 0.14);
    --ring: 0 0 0 1px rgba(255, 255, 255, 0.08); --shadow: none; --shadow-sm: none;
    --accent-soft: rgba(253, 160, 6, 0.16); --accent-ink: #fdb43a;
    background: #000; color: var(--text); color-scheme: dark;
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }
  .lib .st-head { background: #000; flex-wrap: nowrap; }
  .lib .st-head .brand b { font-size: 17px; letter-spacing: -0.02em; }
  .lib .st-head .icon-btn { color: var(--text); }

  /* navegação embaixo: Gravar | + | Editar */
  .lib .st-head .top-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; width: auto; margin: 0; order: 0;
    display: grid; grid-template-columns: 1fr 84px 1fr; align-items: center; gap: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-radius: 0;
    background: rgba(0, 0, 0, 0.94); backdrop-filter: blur(14px); box-shadow: 0 -1px 0 var(--line);
  }
  .lib .st-head .top-nav .seg-btn { flex-direction: column; height: auto; gap: 3px; padding: 6px 0; background: none !important; box-shadow: none !important; color: var(--muted); font-size: 10.5px; font-weight: 600; }
  .lib .st-head .top-nav .seg-btn.on { color: #fff; }
  .lib .st-head .top-nav .seg-btn .ic { width: 21px; height: 21px; }
  .lib .st-head .top-nav .seg-btn:first-child { grid-column: 1; }
  .lib .st-head .top-nav .seg-btn:last-child { grid-column: 3; }
  .lib #btnNew {
    position: fixed; z-index: 31; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    width: 54px; height: 54px; padding: 0; border-radius: 50%; display: grid; place-items: center;
    background: #fff; color: #000; box-shadow: 0 6px 18px rgba(253, 160, 6, 0.25);
  }
  .lib #btnNew .ic { width: 22px; height: 22px; }

  /* pastas: chips escuros */
  .lib .lib-side { box-shadow: none; padding-top: 4px; }
  .lib .lib-folder { background: var(--s2); color: var(--text); }
  .lib .lib-folder.on { background: #fff; color: #000; }
  .lib .lib-folder .fold-n { color: inherit; opacity: 0.6; }
  .lib .lib-folder .fold-ic { background: none !important; }

  /* cabeçalho da pasta mais discreto */
  .lib .lib-head-ic { display: none; }
  .lib .lib-head-t h1 { font-size: 22px; }
  .lib .lib-head .search { background: var(--s2); box-shadow: none; border-radius: 12px; }
  .lib .lib-head .search input { color: var(--text); background: none; }
  .lib .lib-head [data-new-in] { color: var(--text); background: var(--s2); border-radius: 99px; }

  /* aulas em grade de 2, miniatura em cima e título embaixo */
  .lib .cards, .lib .cards:has(.card) { grid-template-columns: 1fr 1fr !important; gap: 16px 10px; }
  .lib .card { display: block; }
  .lib .card .thumb { border-radius: 12px; background: var(--s2); color: var(--muted); }
  .lib .card-body { padding: 7px 2px 0 !important; gap: 2px; }
  .lib .card-body b { font-size: 13px; color: var(--text); }
  .lib .card-meta .card-course { display: none; }
  .lib .card-meta .muted { font-size: 11px; color: var(--muted); }
  .lib .card .card-actions .icon-btn { background: rgba(0, 0, 0, 0.55); color: #fff; }
  .lib .folder-save { background: var(--accent-soft); color: var(--accent-ink); }
  .lib .folder-save b { color: #fff; }
  .lib .backups { color: var(--text); }
}
@media (max-width: 760px) {
  /* ações da aula só depois de segurar o dedo */
  .lib .card .card-actions { opacity: 0; pointer-events: none; transform: scale(0.9); transition: opacity 0.15s, transform 0.15s; }
  .lib .card.show-actions .card-actions { opacity: 1; pointer-events: auto; transform: none; }
  .lib .card.show-actions .thumb { outline: 2px solid #fff; outline-offset: 2px; }
  .lib .card { -webkit-touch-callout: none; user-select: none; }
  /* título dos grupos de curso */
  .lib .course-head { gap: 8px; padding: 0; background: none; color: var(--text); }
  .lib .course-head .course-ic { width: 8px; height: 8px; border-radius: 50%; background: var(--c) !important; font-size: 0; }
  .lib .course-head .course-ic .ic { display: none; }
  .lib .course-head h2 { font-size: 16px; text-align: left; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lib .course-head .muted { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
}
