/* Preview da edição: calm dark editing-suite look, one accent. No external fonts. */

:root {
  --bg: #0c0d10;
  --bg-raise: #111317;
  --panel: #15171c;
  --panel-2: #1a1d23;
  --panel-3: #22262d;
  --well: #0e1014;
  --line: #23272e;
  --line-2: #31363f;
  --text: #e8eaee;
  --text-2: #b3b9c3;
  --muted: #7d8591;
  --accent: #50d6ae;
  --accent-strong: #72e4c2;
  --accent-ink: #062219;
  --accent-soft: rgba(80, 214, 174, 0.14);
  --accent-line: rgba(80, 214, 174, 0.55);
  --danger: #ff8a80;
  --warn-text: #e9c77b;
  --radius: 12px;
  --radius-sm: 8px;
  --topbar-h: 56px;
  --status-h: 36px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

kbd {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  font: 600 11px/17px var(--mono);
  color: var(--text-2);
  text-align: center;
  background: var(--well);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
}

/* ------------------------------------------------------------ top bar */

.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--bg-raise);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark rect { fill: var(--panel-3); }
.brand-mark path { fill: var(--accent); }
.brand-text { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.brand-name { font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; }
.project {
  color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project:not(:empty)::before { content: "/"; margin-right: 10px; color: var(--line-2); }

.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.tab {
  position: relative;
  min-width: 92px;
  padding: 6px 18px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  transition: color .15s, background-color .15s;
}
.tab:hover { color: var(--text-2); }
.tab[aria-selected="true"] { color: var(--text); background: var(--panel-3); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.tab-dot {
  position: absolute; top: 7px; right: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  opacity: 0; transform: scale(.4);
  transition: opacity .2s, transform .2s;
}
.tab.is-awaiting .tab-dot { opacity: 1; transform: none; }

.help-btn { justify-self: end; }

/* ------------------------------------------------------------ status line */

.statusline {
  min-height: var(--status-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 20px;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.status-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--muted); }
.statusline.is-working .status-dot { background: var(--text-2); animation: breathe 1.6s ease-in-out infinite; }
.statusline.is-awaiting .status-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.statusline.is-offline .status-dot { background: var(--danger); }
.statusline.is-offline .status-text { color: var(--danger); }
.status-badge {
  flex: none;
  padding: 1px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 999px;
}
.status-text { min-width: 0; color: var(--text); }
.status-text.flash { animation: flash-text .9s ease-out; }
.status-meta { margin-left: auto; flex: none; color: var(--muted); white-space: nowrap; }

@keyframes breathe { 50% { opacity: .35; } }
@keyframes flash-text { from { color: var(--accent-strong); } }

/* ------------------------------------------------------------ generic pieces */

.main { flex: 1; min-height: 0; padding: 16px 20px 20px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head h3 { font-size: 13px; font-weight: 650; letter-spacing: .01em; }
.count { color: var(--muted); font-weight: 500; }
.hint { font-size: 12.5px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px;
  padding: 0 14px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { background: var(--panel-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
.btn.primary { color: var(--accent-ink); background: var(--accent); border-color: transparent; font-weight: 700; }
.btn.primary:hover:not([disabled]) { background: var(--accent-strong); }
.btn.primary.is-done { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); opacity: 1; }
.btn.secondary { background: transparent; }
.btn.secondary.attention { border-color: var(--accent-line); color: var(--accent-strong); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.accent-soft { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-strong); }
.btn.block { width: 100%; }
.btn kbd { margin-right: -4px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  font-weight: 700;
  color: var(--text-2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.icon-btn:hover { color: var(--text); background: var(--panel-2); }
.icon-btn.small { width: 30px; height: 30px; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.danger:hover { color: var(--danger); }

input[type="text"], textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--well);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"]::placeholder, textarea::placeholder { color: #5d6470; }
input[type="text"]:focus, textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="text"][disabled], textarea[disabled] { opacity: .5; }
input.is-invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(255, 138, 128, .15) !important; }
textarea { resize: vertical; min-height: 72px; }

.save-state { font-size: 12px; color: var(--muted); }
.save-state.is-dirty { color: var(--warn-text); }
.save-state.is-saved::before { content: "✓ "; color: var(--accent); }

/* ------------------------------------------------------------ empty states */

.empty {
  min-height: calc(100vh - var(--topbar-h) - var(--status-h) - 80px);
  display: grid; place-content: center; justify-items: center;
  gap: 10px;
  padding: 40px 16px;
  text-align: center;
}
.empty h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.empty p { max-width: 430px; color: var(--muted); }
.empty-visual { position: relative; width: 72px; height: 72px; margin-bottom: 8px; display: grid; place-items: center; }
.empty-visual::before {
  content: ""; width: 26px; height: 46px;
  border: 2px solid var(--line-2); border-radius: 6px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--accent-line);
  animation: ring 2.2s ease-out infinite;
}
@keyframes ring { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.15); opacity: 0; } }

/* ------------------------------------------------------------ review (Corte / Final) */

.review {
  --player-h: calc(100vh - var(--topbar-h) - var(--status-h) - 36px - 104px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  height: calc(100vh - var(--topbar-h) - var(--status-h) - 36px);
  min-height: 520px;
}
.player-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.player-frame {
  --ar: 9 / 16;
  position: relative;
  align-self: center;
  height: max(360px, var(--player-h));
  aspect-ratio: var(--ar);
  background: #000;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.player-frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; cursor: pointer; }
.big-play {
  position: absolute; left: 50%; top: 50%;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(12, 13, 16, .55);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity .2s, transform .2s;
}
.big-play svg { width: 28px; height: 28px; margin-left: 4px; fill: currentColor; }
.player-frame.is-playing .big-play { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.9); }
.video-msg {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  padding: 10px 12px;
  font-size: 13px;
  background: rgba(12, 13, 16, .85);
  border: 1px solid var(--line-2);
  border-radius: 10px;
}

.transport { display: flex; align-items: center; gap: 10px; }
.play-btn { width: 40px; height: 40px; color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.play-btn:hover { color: var(--accent-ink); background: var(--accent-strong); }
.play-btn svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.play-btn .i-pause { display: none; }
.is-playing .play-btn .i-play { display: none; }
.is-playing .play-btn .i-pause { display: block; }
.timecode { font: 600 13px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.tc-sep { margin: 0 6px; color: var(--line-2); }
.tc-total { color: var(--muted); }
.transport-steps { margin-left: auto; display: flex; gap: 4px; }

.now-playing {
  width: 0;
  min-width: 100%;
  min-height: 36px;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.now-playing b { color: var(--text-2); font-weight: 650; letter-spacing: .04em; font-size: 11px; margin-right: 6px; }

.work-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; overflow: auto; padding-right: 2px; }

/* timeline */

.timeline-card { padding-bottom: 16px; }
.tl-zoom { display: flex; align-items: center; gap: 6px; flex: none; }
.tl-zoom .hint { margin-right: 4px; }
@media (max-width: 1180px) { .tl-zoom .hint { display: none; } }
.zoom-level {
  min-width: 36px; text-align: center;
  font: 600 11px/1 var(--mono); color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.btn.zoom-fit { padding: 0 10px; height: 30px; font-size: 12px; }
.tl-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.tl-scroll::-webkit-scrollbar { height: 9px; }
.tl-scroll::-webkit-scrollbar-track { background: transparent; }
.tl-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; }
.tl-scroll::-webkit-scrollbar-thumb:hover { background: #5a626e; }
.timeline {
  position: relative;
  width: 100%;
  min-width: 100%;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: col-resize;
}
.tl-ruler { position: relative; height: 20px; overflow: hidden; }
.tick {
  position: absolute; top: 0; bottom: 0;
  padding-left: 4px;
  font: 500 10px/14px var(--mono);
  color: var(--muted);
  border-left: 1px solid var(--line-2);
  white-space: nowrap;
}
.tick.minor { border-left-color: var(--line); top: 12px; }

.tl-layers { position: relative; height: 20px; margin-bottom: 4px; }
.layer-pill {
  position: absolute; top: 2px; bottom: 2px;
  padding: 0 6px;
  font-size: 10.5px; font-weight: 600; line-height: 16px;
  color: var(--text-2);
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tl-segments { position: relative; height: 50px; }
.seg-block {
  position: absolute; top: 0; bottom: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 8px;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 7px;
  transition: background-color .15s, border-color .15s;
}
.seg-block.is-current { background: var(--panel-3); border-color: #4a515c; }
.seg-block.is-trimmed { border-color: var(--accent); background: var(--accent-soft); }
.seg-block.is-dragging { border-color: var(--accent); z-index: 4; }
.seg-handle {
  position: absolute; top: 0; bottom: 0; width: 10px;
  cursor: ew-resize;
  opacity: 0;
  transition: opacity .12s;
  z-index: 2;
}
.seg-handle.start { left: -1px; }
.seg-handle.end { right: -1px; }
.seg-handle::before {
  content: ""; position: absolute; top: 6px; bottom: 6px; left: 4px;
  width: 2px; border-radius: 2px;
  background: var(--accent);
}
.seg-block:hover .seg-handle, .seg-handle:focus-visible, .seg-handle.is-on { opacity: 1; }
.seg-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg-delta {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  padding: 1px 6px;
  font: 700 10px/15px var(--mono);
  white-space: nowrap;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 4px;
  pointer-events: none;
  z-index: 5;
}
.trims-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; }
.trim-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 7px;
}
.trim-row .trim-when { font: 600 11px/1 var(--mono); color: var(--muted); flex: none; }
.trim-row .trim-what { font-size: 12.5px; color: var(--text); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trim-row .trim-delta { font: 700 11px/1 var(--mono); color: var(--accent); flex: none; }
.trims-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.seg-beat {
  font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg-block.is-current .seg-beat { color: var(--accent-strong); }
.seg-quote { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tl-strip {
  position: relative;
  height: 64px;
  margin-top: 6px;
  overflow: hidden;
  background: var(--well);
  border-radius: 7px;
}
.tl-strip img { display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; transition: opacity .25s; }
.tl-strip.is-loading img, .tl-strip.is-empty img { opacity: 0; }
.tl-wave {
  position: relative;
  height: 72px;
  margin-top: 6px;
  overflow: hidden;
  background: var(--well);
  border-radius: 7px;
}
.wave-fill {
  position: absolute; inset: 0;
  background: #8c95a3;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  opacity: 0; transition: opacity .25s;
}
.tl-wave.is-ready .wave-fill { opacity: 1; }
.tl-strip.is-loading::after, .tl-wave.is-loading::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  background-size: 40% 100%; background-repeat: no-repeat;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.tl-overlay { position: absolute; left: 0; right: 0; top: 20px; bottom: 0; pointer-events: none; }
.mark-region {
  position: absolute; top: 0; bottom: 0;
  background: var(--accent-soft);
  border-left: 1px solid var(--accent-line);
  border-right: 1px solid var(--accent-line);
}
.mark-region span {
  position: absolute; left: 3px; bottom: 3px;
  min-width: 16px; padding: 0 4px;
  font: 700 10px/15px var(--mono);
  color: var(--accent-ink);
  text-align: center;
  background: var(--accent);
  border-radius: 4px;
}
.tl-selection {
  position: absolute; top: 20px; bottom: 0;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(80,214,174,.10) 0 6px, rgba(80,214,174,.03) 6px 12px);
  border-left: 2px solid var(--accent);
}
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none; z-index: 3; }
.tl-playhead::before {
  content: ""; position: absolute; top: 14px; bottom: -2px; left: -1px;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.ph-knob {
  position: absolute; top: 2px; left: -6px;
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 3px 3px 6px 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* marks */

.marks-card { flex: 1 0 auto; }
.marks-card > .hint { margin-bottom: 10px; }
.mark-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pending { font-size: 12.5px; color: var(--accent-strong); }
.note-box {
  display: grid; gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  animation: pop-in .16s ease-out;
}
.note-range { font: 600 12px/1.3 var(--mono); color: var(--accent-strong); }
.note-range small { font-family: var(--font); font-weight: 500; color: var(--muted); margin-left: 6px; }
.note-actions { display: flex; justify-content: flex-end; gap: 8px; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }

.marks-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.mark-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 5px 5px 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.mark-item.is-current { border-color: var(--accent-line); }
.mark-num {
  min-width: 20px; height: 20px; padding: 0 4px;
  display: grid; place-items: center;
  font: 700 11px/1 var(--mono);
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 5px;
}
.mark-range {
  padding: 4px 6px;
  font: 600 12px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 6px;
  white-space: nowrap;
}
.mark-range:hover { background: var(--panel-3); }
.mark-note { height: 30px; padding: 4px 8px !important; font-size: 13px; background: transparent !important; border-color: transparent !important; }
.mark-note:hover { border-color: var(--line-2) !important; }
.mark-note:focus { background: var(--well) !important; border-color: var(--accent-line) !important; }
.marks-empty { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* actions */

.actions-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  margin-top: auto;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.banner {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
}
.banner.is-approved { background: var(--accent-soft); border-color: var(--accent-line); }
.banner.is-approved::before { content: "✓"; font-weight: 800; color: var(--accent); }
.banner.is-info::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); flex: none; }
.approve-note-wrap { min-width: 0; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* horizontal videos: player on top-left, bigger */
.review.is-horizontal { grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); }
.review.is-horizontal .player-frame { width: 100%; height: auto; max-height: calc(100vh - 260px); }

/* ------------------------------------------------------------ style tab */

.style-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  max-width: 1240px;
  margin: 0 auto;
}
.style-form { min-width: 0; }
.style-section { padding: 18px 0 22px; border-bottom: 1px solid var(--line); }
.style-section:first-child { padding-top: 4px; }
.style-section:last-child { border-bottom: 0; }
.section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.section-head h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.005em; }
.section-head p { font-size: 13px; color: var(--muted); }
.step {
  flex: none;
  width: 24px; height: 24px; margin-top: 1px;
  display: grid; place-items: center;
  font: 700 11px/1 var(--mono);
  color: var(--text-2);
  border: 1px solid var(--line-2);
  border-radius: 50%;
}

.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.type-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s, background-color .15s;
}
.type-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.type-card[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: linear-gradient(180deg, rgba(80,214,174,.06), transparent); }
.tc-text { display: block; min-width: 0; }
.tc-text strong { display: block; font-size: 13.5px; font-weight: 650; }
.tc-desc { display: block; font-size: 12px; color: var(--muted); }
.schema {
  flex: none;
  width: 34px; height: 60px;
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--well);
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
}
.type-card[aria-checked="true"] .schema { border-color: var(--accent-line); }
.schema .band {
  flex: 0 0 46%;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.16) 0 3px, rgba(255,255,255,.05) 3px 6px);
}
.schema .person {
  flex: 1;
  background:
    radial-gradient(circle at 50% 42%, #9aa2ae 0 5px, transparent 5.5px),
    radial-gradient(ellipse 13px 10px at 50% 100%, #9aa2ae 0 99%, transparent 100%);
}
.type-card[aria-checked="true"] .schema .person {
  background:
    radial-gradient(circle at 50% 42%, var(--accent) 0 5px, transparent 5.5px),
    radial-gradient(ellipse 13px 10px at 50% 100%, var(--accent) 0 99%, transparent 100%);
}

.schema.tv {
  justify-content: flex-end;
  align-items: flex-end;
  background: linear-gradient(160deg, rgba(120, 150, 255, .30), rgba(255, 120, 200, .16) 60%, var(--well));
}
.schema.tv .person { flex: 0 0 48%; width: 64%; }
.schema.tv.pos-esquerda { align-items: flex-start; }
.schema.tv.pos-centro { align-items: center; }
.schema.tv.pos-centro .person { flex-basis: 62%; width: 86%; }
.tv-pos { margin-top: 14px; }
.tv-pos .field-label { display: block; margin-bottom: 8px; }
.tv-pos .field-help { margin-top: 8px; }
.tv-note { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--text); font-size: 13px; line-height: 1.4; }
.tv-note:empty { display: none; }
.tv-pos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tv-pos-card .schema { width: 30px; height: 52px; }
@media (max-width: 560px) { .tv-pos-grid { grid-template-columns: 1fr; } }

.noise-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.music-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.music-card { align-items: center; }
.music-mark {
  flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line-2); color: var(--muted); font-size: 17px; line-height: 1;
}
.music-card .tc-text strong, .music-card .tc-desc { overflow-wrap: anywhere; }
.type-card[aria-checked="true"] .music-mark { border-color: var(--accent-line); color: var(--accent); }
.noise-meter {
  flex: none;
  width: 46px; height: 40px;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  background: var(--well);
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
}
.noise-meter i { display: block; width: 3px; border-radius: 2px; background: #9aa2ae; transition: height .15s; }
.noise-meter .vc { height: 15px; }
.noise-meter .vc.tall { height: 24px; }
.noise-meter .nz { height: 12px; opacity: .5; }
.noise-meter.lv-1 .nz { height: 6px; }
.noise-meter.lv-2 .nz { height: 2px; }
.type-card[aria-checked="true"] .noise-meter { border-color: var(--accent-line); }
.type-card[aria-checked="true"] .noise-meter i { background: var(--accent); }

.accent-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.color-well {
  position: relative;
  width: 40px; height: 40px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  cursor: pointer;
}
.color-well input {
  position: absolute; inset: -10px;
  width: 60px; height: 60px;
  padding: 0; border: 0;
  cursor: pointer;
  background: none;
}
.hex-field input { width: 112px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .03em; }
.swatches { display: flex; gap: 6px; margin-left: 4px; }
.swatch {
  width: 26px; height: 26px;
  padding: 0;
  border: 2px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-2);
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.field-help { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.field-help.is-error { color: var(--danger); }

.field { display: block; margin-bottom: 14px; }
.field-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.counter { font: 500 11px var(--mono); color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.style-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 6px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s, background-color .15s, transform .15s;
}
.style-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.style-card[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--well);
  border-radius: 8px;
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 10px;
  font-size: 15px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  text-align: center;
  color: var(--text-2);
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 8px, transparent 8px 16px),
    var(--well);
}
.style-card .meta { padding: 8px 4px 3px; }
.style-card strong { display: block; font-size: 13px; font-weight: 650; }
.style-card .meta span {
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11.5px; color: var(--muted);
}
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 1px 7px;
  font-size: 10.5px; font-weight: 700;
  color: var(--text);
  background: rgba(12,13,16,.72);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.check {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 50%;
  opacity: 0; transform: scale(.6);
  transition: opacity .15s, transform .15s;
}
.check svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
[aria-checked="true"] > .check { opacity: 1; transform: none; }

.toggle-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 12px 11px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.toggle:hover { border-color: var(--line-2); }
.toggle span { font-size: 13.5px; }
.switch {
  appearance: none; -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 38px; height: 22px;
  margin: 0;
  background: var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .15s;
}
.switch::before {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #d9dde3;
  border-radius: 50%;
  transition: transform .15s, background-color .15s;
}
.switch:checked { background: var(--accent); }
.switch:checked::before { transform: translateX(16px); background: var(--accent-ink); }

.style-aside { position: sticky; top: 16px; align-self: start; display: grid; gap: 12px; }
.seg-toggle { display: flex; gap: 2px; padding: 3px; margin-bottom: 10px; background: var(--well); border: 1px solid var(--line); border-radius: 9px; }
.seg { flex: 1; padding: 5px 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: transparent; border: 0; border-radius: 6px; }
.seg.on { color: var(--text); background: var(--panel-3); }
.pv-frame {
  position: relative;
  width: min(100%, calc((100vh - 400px) * 9 / 16));
  min-width: 180px;
  aspect-ratio: 9 / 16;
  margin: 0 auto 10px;
  overflow: hidden;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.pv-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-placeholder {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 6px;
  padding: 16px;
  text-align: center;
}
.pv-placeholder span { font-size: 20px; font-weight: 800; text-transform: uppercase; color: var(--text-2); }
.pv-placeholder small { color: var(--muted); }
.preview-card .hint { text-align: center; }

.summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 14px; margin: 0 0 14px; font-size: 13px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary .chip { display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.save-row { display: grid; gap: 8px; }
.save-row .save-state { text-align: center; min-height: 16px; }

/* ------------------------------------------------------------ toasts & dialogs */

.toasts {
  position: fixed; right: 20px; top: calc(var(--topbar-h) + var(--status-h) + 12px); z-index: 50;
  display: grid; gap: 8px; justify-items: end;
  width: max-content; max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text);
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  animation: toast-in .2s ease-out;
}
.toast.is-error { border-left-color: var(--danger); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }

.dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 22px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.dialog::backdrop { background: rgba(5, 6, 8, .62); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.dialog h2 { font-size: 16px; font-weight: 650; margin-bottom: 12px; }
.dialog p { color: var(--text-2); margin-bottom: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.shortcuts { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 2px; }
.shortcuts li {
  display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px;
  padding: 7px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}
.shortcuts li:last-child { border-bottom: 0; }

/* ------------------------------------------------------------ narrow screens */

@media (max-width: 1100px) {
  .style-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; }
}

@media (max-width: 860px) {
  .topbar {
    height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 16px;
  }
  .tabs { grid-column: 1 / -1; grid-row: 2; }
  .tab { flex: 1; min-width: 0; }
  .help-btn { grid-column: 2; grid-row: 1; }
  .brand-text { flex-direction: column; gap: 0; }
  .project:not(:empty)::before { content: none; }
  .project { font-size: 12.5px; }
  .statusline { padding: 8px 16px; flex-wrap: wrap; row-gap: 2px; }
  .status-meta { margin-left: 18px; flex-basis: calc(100% - 28px); white-space: normal; font-size: 12px; }
  .main { padding: 12px 16px 16px; }

  .review, .review.is-horizontal { display: flex; flex-direction: column; height: auto; min-height: 0; gap: 14px; }
  .player-frame { height: auto; width: min(100%, calc(58vh * 9 / 16)); margin: 0 auto; max-height: none; }
  .review.is-horizontal .player-frame { width: 100%; }
  .transport { justify-content: space-between; }
  .work-col { overflow: visible; padding-right: 0; }
  .timeline-card .card-head .hint { display: none; }
  .mark-tools .btn { flex: 1; }
  .actions-bar {
    position: sticky; bottom: 0; z-index: 10;
    grid-template-columns: 1fr;
    margin: 0 -16px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(12, 13, 16, .94);
    border: 0; border-top: 1px solid var(--line); border-radius: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .actions-bar .banner { padding: 6px 10px; font-size: 12.5px; line-height: 1.35; }
  .actions { flex-wrap: wrap; gap: 6px 8px; }
  .actions .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; }
  .actions .download { order: 3; flex: 1 1 100%; height: 28px; font-size: 13px; }

  .style-layout { display: block; }
  .style-aside { position: sticky; bottom: 0; top: auto; z-index: 10; margin: 0 -16px; }
  .preview-card { display: none; }
  .summary-card {
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(12, 13, 16, .94);
    border: 0; border-top: 1px solid var(--line); border-radius: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .summary { display: none; }
  .save-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .save-row .save-state { text-align: left; }
  .save-row .btn.block { width: auto; padding: 0 22px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
  .toggle-list { grid-template-columns: 1fr; }
  .noise-grid { grid-template-columns: 1fr; gap: 8px; }
  .music-grid { grid-template-columns: 1fr; gap: 8px; }
  .swatches { margin-left: 0; }
  .toasts { top: auto; right: 16px; left: 16px; bottom: 96px; width: auto; max-width: none; justify-items: center; }
  .shortcuts li { grid-template-columns: 110px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* motion: options under the "Animações" switch and the "Motion aqui" marks */
.motion-options { grid-column: 1 / -1; display: grid; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line, #2a2f36);
  border-radius: 12px; background: var(--panel-2, rgba(255,255,255,.03)); }
.motion-options[hidden] { display: none; }
.motion-group { display: grid; gap: 6px; }
.motion-label { font-size: 12px; font-weight: 600; opacity: .75; }
.motion-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; }
.motion-card { padding: 8px 10px; min-height: 0; }
.motion-options .hint { margin: 0; }
.motion-btn { border-color: #c7b7ef; }
.mark-num.is-motion { background: #c7b7ef; color: #352c40; }
.mark-region.is-motion { background: rgba(199,183,239,.35); border-color: #c7b7ef; }
.motion-card { display: flex; gap: 8px; align-items: flex-start; }
.motion-sw { display: flex; flex-direction: column; gap: 3px; padding-top: 2px; flex: none; }
.motion-sw i { display: block; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
