:root {
  /* Escala tonal azul (50–900) */
  --blue-50: #f4f6fb;
  --blue-100: #d1dbf1;
  --blue-200: #abbfeb;
  --blue-300: #82a2e7;
  --blue-400: #5583e8;
  --blue-500: #2563eb;
  --blue-600: #124bc7;
  --blue-700: #0d3794;
  --blue-800: #082462;
  --blue-900: #04112f;

  --ink: var(--blue-900);
  --ink-muted: #47557f;
  --paper: var(--blue-50);
  --paper-deep: var(--blue-100);
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --line: var(--blue-100);
  --line-strong: var(--blue-200);
  --accent: var(--blue-500);
  --accent-strong: var(--blue-600);
  --accent-hot: var(--blue-700);
  --accent-soft: #e4ebfb;
  --danger: #b42318;
  --shadow: 0 18px 40px rgba(8, 36, 98, 0.1);
  --shadow-sm: 0 2px 10px rgba(8, 36, 98, 0.08);
  --radius: 14px;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(37, 99, 235, 0.09), transparent 35%),
    radial-gradient(circle at 88% 0%, rgba(85, 131, 232, 0.11), transparent 32%),
    linear-gradient(165deg, #edf1fa 0%, var(--paper) 45%, #e6ecfa 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.lede {
  margin: 0.4rem 0 0;
  color: var(--ink-muted);
  max-width: 36rem;
}

.flash {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: flash-in 0.35s ease;
}

.flash--notice {
  background: var(--accent-soft);
  color: var(--accent);
}

.flash--alert {
  background: #fde8e8;
  color: var(--danger);
}

@keyframes flash-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand__mark {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.45rem;
  background:
    linear-gradient(135deg, var(--accent) 0%, #5583e8 55%, var(--accent-hot) 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.brand--compact .brand__name {
  font-size: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--blue-400);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.btn--primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 8px 20px rgba(18, 75, 199, 0.32);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--blue-50);
  border-color: var(--line-strong);
}

.btn--sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
}

.btn--block {
  width: 100%;
  margin-top: 0.45rem;
}

.btn.is-active {
  border-color: var(--blue-500);
  background: var(--blue-500);
  color: #fff;
}

.bg-image-controls {
  margin: 0.75rem 0 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid #1b3168;
}

.btn-row {
  display: flex;
  gap: 0.4rem;
}

.btn-row--wrap {
  flex-wrap: wrap;
}

.input,
.select,
input[type="number"],
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.select:focus,
input[type="number"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(85, 131, 232, 0.18);
}

.select--sm,
.size-inline input {
  width: auto;
  min-width: 4.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.shell {
  min-height: 100vh;
}

.shell__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid rgba(209, 219, 241, 0.9);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(8, 36, 98, 0.04);
  position: sticky;
  top: 0;
  z-index: 20;
}

.shell__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.shell__user {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.shell__main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.shell__main--narrow {
  width: min(760px, calc(100% - 2rem));
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.folder-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin: -0.8rem 0 1.25rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.folder-breadcrumb__item {
  color: var(--ink-muted);
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.folder-breadcrumb__item:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.folder-breadcrumb__item.is-current {
  color: var(--blue-700);
  background: var(--blue-100);
  font-weight: 700;
  pointer-events: none;
}

.folder-breadcrumb__item.is-drop-target {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.12);
  border-radius: 6px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  padding: 0.1rem 0.35rem;
}

.folder-breadcrumb__sep {
  opacity: 0.55;
}

.folder-toolbar {
  margin-bottom: 1.75rem;
}

.folder-create {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  max-width: 34rem;
}

.folder-create__input {
  flex: 1 1 12rem;
  min-width: 0;
}

.project-card--folder .project-card__preview--folder {
  --ratio: 1.25;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  position: relative;
  background:
    linear-gradient(160deg, rgba(37, 99, 235, 0.16), transparent 55%),
    linear-gradient(145deg, #d1dbf1 0%, #d1dbf1 55%, #e4ebfb 100%);
  color: var(--accent);
}

.project-card--folder .project-card__preview--folder-filled {
  padding: 0.65rem;
  justify-content: stretch;
  align-items: stretch;
}

.folder-icon {
  width: 2.4rem;
  height: 1.85rem;
  border-radius: 4px 4px 3px 3px;
  background: linear-gradient(180deg, #5583e8 0%, var(--accent) 100%);
  position: relative;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
}

.folder-icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: -0.35rem;
  width: 1.05rem;
  height: 0.4rem;
  border-radius: 3px 3px 0 0;
  background: #124bc7;
}

.folder-preview-grid {
  display: grid;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.folder-preview-grid--1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.folder-preview-grid--2 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

.folder-preview-grid--3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.folder-preview-grid--3 .folder-preview-grid__thumb:first-child {
  grid-column: 1 / -1;
}

.folder-preview-grid--4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.folder-preview-grid__thumb {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(8, 36, 98, 0.12);
}

.folder-preview-badge {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 4px rgba(8, 36, 98, 0.12);
}

.project-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}

.project-card {
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, opacity 0.2s ease, outline-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.project-card--draggable {
  cursor: grab;
}

.project-card--draggable:active {
  cursor: grabbing;
}

.project-card.is-dragging {
  opacity: 0.45;
  transform: scale(0.98);
}

.project-card--folder.is-drop-target {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), var(--shadow);
  transform: translateY(-3px);
}

.project-card--folder.is-drop-busy {
  opacity: 0.7;
  pointer-events: none;
}

.is-folder-drop-active .project-card--folder {
  transition: transform 0.15s ease, box-shadow 0.15s ease, outline-color 0.15s ease;
}

.project-card__link {
  display: block;
}

.project-card__preview {
  aspect-ratio: min(var(--ratio), 1.6);
  min-height: 140px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, #2563eb 0%, #124bc7 40%, #0d3794 100%);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
}

.project-card__preview--image {
  background: #e8eefb;
  place-items: stretch;
  padding: 0;
}

.project-card__preview--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card__meta {
  padding: 0.9rem 1rem 1.1rem;
  display: grid;
  gap: 0.25rem;
}

.project-card__meta time {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.section-block {
  margin-bottom: 2.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 1.05em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-400), var(--blue-600));
  flex: 0 0 auto;
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 0.75rem 0.75rem;
}

.project-card__action {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.project-card__action:hover {
  background: var(--blue-50);
  border-color: var(--line-strong);
  color: var(--blue-700);
}

.project-card__action--danger {
  color: var(--danger);
}

.project-card__action--danger:hover {
  background: #fde8e8;
  border-color: #f0b4b4;
  color: var(--danger);
}

.project-card__hint {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.project-card--template .project-card__preview {
  background: linear-gradient(145deg, #5583e8 0%, #2563eb 55%, #0d3794 100%);
}

.project-card__delete {
  display: none;
}

.templates-picker {
  margin-bottom: 1.5rem;
}

.templates-picker .preset-option__body {
  text-decoration: none;
}

.templates-picker--builtin .presets__group {
  margin-bottom: 1rem;
}

.design-template-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.design-template-card__ratio {
  display: block;
  width: 100%;
  max-width: 88px;
  aspect-ratio: var(--ratio, 1);
  border-radius: 6px;
  background:
    linear-gradient(145deg, #2563eb 0%, #124bc7 45%, #0d3794 100%);
  opacity: 0.9;
}

.design-templates-toolbar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.design-templates-list {
  display: grid;
  gap: 0.65rem;
}

.design-template-item {
  border: 1px solid #24407e;
  border-radius: 10px;
  padding: 0.7rem;
  background: #0c1e47;
}

.design-template-item strong {
  display: block;
  margin-bottom: 0.15rem;
}

.design-template-item em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: #93a6d6;
  margin-bottom: 0.55rem;
}

.design-template-item__meta {
  font-size: 0.72rem;
  color: #7286b8;
  margin-bottom: 0.45rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.55rem 0;
  font-size: 0.88rem;
  color: #b9c7ee;
}

.plugins-list {
  display: grid;
  gap: 0.65rem;
}

.plugin-card {
  border: 1px solid #24407e;
  border-radius: 10px;
  padding: 0.7rem;
  background: #0c1e47;
}

.plugin-card strong {
  display: block;
  margin-bottom: 0.25rem;
}

.plugin-card p {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: #93a6d6;
  line-height: 1.35;
}

.batch-list {
  display: grid;
  gap: 0.45rem;
  max-height: 320px;
  overflow: auto;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.batch-item {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}

.batch-item:hover {
  background: rgba(37, 99, 235, 0.08);
}

.batch-item em {
  display: block;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.batch-status {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.batch-log {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.65);
}

.empty-state h2 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.empty-state p {
  color: var(--ink-muted);
  margin-bottom: 1.2rem;
}

.create-form,
.auth-card {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.presets {
  border: 0;
  margin: 1.2rem 0;
  padding: 0;
}

.presets legend {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.presets__group + .presets__group {
  margin-top: 1rem;
}

.presets__group h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.presets__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.55rem;
}

.preset-option {
  cursor: pointer;
}

.preset-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.preset-option__body {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.preset-option__body strong {
  font-size: 0.9rem;
}

.preset-option__body em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.preset-option input:checked + .preset-option__body {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.create-form [data-project-form-target="slideCountFields"][hidden] {
  display: none !important;
}

.form-actions {
  margin-top: 1.2rem;
}

.form-errors {
  background: #fde8e8;
  color: var(--danger);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* Auth */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-shell {
  width: min(420px, 100%);
}

.auth-shell .brand {
  margin-bottom: 1.4rem;
}

.auth-shell .brand__name {
  font-size: 1.8rem;
}

.auth-shell h2 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.auth-shell .lede {
  margin-bottom: 1.2rem;
}

.auth-links {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.auth-links a {
  color: var(--accent);
  font-weight: 600;
}

/* Editor */
.editor-body {
  background: #04112f;
  overflow: hidden;
}

.video-editor-body {
  background: #04112f;
  overflow: hidden;
}

.editor {
  --editor-top: 56px;
  --left-w-min: 280px;
  --left-w: var(--left-w-min);
  --right-w: 260px;
  height: 100vh;
  display: grid;
  grid-template-columns: var(--left-w) 1fr var(--right-w);
  grid-template-rows: var(--editor-top) 1fr;
  grid-template-areas:
    "top top top"
    "left canvas right";
  color: #e8eefb;
}

.editor.is-resizing-left {
  cursor: ew-resize;
  user-select: none;
}

.editor.is-resizing-left .editor__canvas-wrap,
.editor.is-resizing-left .tool-panel {
  pointer-events: none;
}

.editor__workspace {
  grid-area: canvas;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
  min-width: 0;
}

.editor__top {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.75rem;
  background: #071737;
  border-bottom: 1px solid #1b3168;
}

.editor__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.editor__back {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid #24407e;
  color: #b9c7ee;
  background: transparent;
  text-decoration: none;
  font-size: 1.05rem;
  line-height: 1;
}

.editor__back:hover {
  color: #f4f6fb;
  background: #0c1e47;
  border-color: #33519f;
}

.editor .brand__name {
  color: #f4f6fb;
}

.editor__title {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #f4f6fb;
  font: inherit;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  min-width: 8rem;
  max-width: 16rem;
}

.editor__title:hover,
.editor__title:focus {
  border-color: #33519f;
  outline: none;
  background: #0c1e47;
}

.editor__toolbar-center,
.editor__toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tool-btn,
.rail-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid #24407e;
  background: #0c1e47;
  color: #b9c7ee;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rail-btn {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tool-btn:hover,
.rail-btn:hover {
  background: #153473;
  border-color: #5583e8;
  color: #fff;
}

.tool-btn.is-active,
.rail-btn.is-active {
  background: var(--blue-500);
  border-color: var(--blue-400);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(85, 131, 232, 0.35);
}

.toolbar-sep {
  width: 1px;
  height: 1.4rem;
  background: #24407e;
  margin: 0 0.25rem;
}

.zoom-label,
.save-status {
  font-size: 0.8rem;
  color: #93a6d6;
  min-width: 3rem;
  text-align: center;
}

.save-status__link {
  color: #93a6d6;
  text-decoration: none;
  font-weight: 600;
}

.save-status__link:hover {
  text-decoration: underline;
}

.size-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #93a6d6;
}

.size-inline input {
  width: 4.2rem;
  background: #0c1e47;
  border-color: #24407e;
  color: #e8eefb;
}

.editor .select,
.editor .input,
.editor input[type="number"],
.editor input[type="text"],
.editor input[type="search"] {
  background: #0c1e47;
  border-color: #24407e;
  color: #e8eefb;
}

.editor .btn--ghost {
  border-color: #24407e;
  color: #e8eefb;
}

.editor .btn--ghost:hover {
  background: #163071;
}

.export-menu {
  position: relative;
}

.export-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  background: #0c1e47;
  border: 1px solid #24407e;
  border-radius: 10px;
  overflow: hidden;
  min-width: 11.5rem;
  z-index: 30;
}

.export-menu__panel button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #e8eefb;
  padding: 0.55rem 0.8rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.export-menu__panel button:hover {
  background: #153473;
}

.pages-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: #071737;
  border-top: 1px solid #1b3168;
  min-height: 72px;
}

.pages-strip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  padding-bottom: 0.1rem;
}

.pages-strip__page {
  flex: 0 0 auto;
  width: 54px;
  border: 1px solid #24407e;
  border-radius: 8px;
  background: #0c1e47;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  display: grid;
  grid-template-rows: 40px auto;
}

.pages-strip__page.is-active {
  border-color: #5583e8;
  box-shadow: 0 0 0 1px #5583e8;
}

.pages-strip__thumb {
  display: block;
  background: #fff center / cover no-repeat;
  min-height: 40px;
}

.pages-strip__label {
  display: block;
  text-align: center;
  font-size: 0.68rem;
  color: #93a6d6;
  padding: 0.15rem 0;
  background: #0a1c44;
}

.pages-strip__page.is-active .pages-strip__label {
  color: #e8eefb;
}

.pages-strip__add {
  flex: 0 0 auto;
  width: 40px;
  height: 54px;
  border: 1px dashed #2a4494;
  border-radius: 8px;
  background: transparent;
  color: #93a6d6;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.pages-strip__add:hover {
  border-color: #5583e8;
  color: #e8eefb;
  background: #0c1e47;
}

.pages-strip__add:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pages-strip__add:disabled:hover {
  border-color: #2a4494;
  color: #93a6d6;
  background: transparent;
}

.pages-bar__actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.pages-bar__actions[hidden] {
  display: none !important;
}

.export-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 10, 0.72);
  border: 0;
  padding: 1rem;
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
}

.export-modal[hidden] {
  display: none !important;
}

.export-modal__card {
  width: min(420px, 100%);
  background: #0a1c44;
  border: 1px solid #24407e;
  border-radius: 14px;
  padding: 1.15rem 1.2rem 1.1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.export-modal__card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.export-modal__option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0;
  cursor: pointer;
  color: #e8eefb;
}

.export-modal__list {
  display: grid;
  gap: 0.35rem;
  margin: 0.35rem 0 0.75rem;
  padding: 0.55rem;
  background: #071737;
  border-radius: 10px;
  border: 1px solid #1b3168;
  max-height: 180px;
  overflow: auto;
}

.export-modal__page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.export-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.send-page-modal__list {
  max-height: 220px;
}

.send-page-modal__dest {
  padding: 0.3rem 0.15rem;
}

.editor__left {
  grid-area: left;
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  background: #0a1c44;
  border-right: 1px solid #1b3168;
  min-height: 0;
  min-width: var(--left-w-min);
}

.editor__left-resize {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  z-index: 6;
  cursor: ew-resize;
  touch-action: none;
}

.editor__left-resize::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: transparent;
  transition: background 0.15s ease;
}

.editor__left-resize:hover::after,
.editor.is-resizing-left .editor__left-resize::after {
  background: #5583e8;
}

.tool-rail {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.4rem;
  border-right: 1px solid #1b3168;
}

.tool-panel {
  overflow: auto;
  padding: 0.9rem;
  min-height: 0;
}

.panel h2 {
  margin-bottom: 0.55rem;
}

.panel-sub {
  margin: 1rem 0 0.45rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #93a6d6;
  font-family: var(--font-display);
}

.btn--sm {
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 999px;
}

.color-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.color-tools input[type="color"] {
  flex: 1;
  min-height: 2rem;
}

.smart-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(1.55rem, 1fr));
  gap: 0.35rem;
  margin: 0.55rem 0 0.35rem;
}

.smart-palette__swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid #2a4494;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.smart-palette__swatch:hover,
.smart-palette__swatch:focus-visible {
  outline: 2px solid #5583e8;
  outline-offset: 1px;
}

.smart-palette__hint {
  margin: 0.25rem 0 0.45rem;
  font-size: 0.75rem;
  color: #93a6d6;
  line-height: 1.35;
}

.editor.is-eyedropper .editor__canvas-wrap,
.editor.is-eyedropper .editor__canvas-wrap canvas {
  cursor: crosshair !important;
}

.editor.is-erasing .editor__canvas-wrap,
.editor.is-erasing .editor__canvas-wrap canvas {
  cursor: cell !important;
}

.tool-btn.is-eyedropper-active {
  background: #153473;
  border-color: #5583e8;
  color: #fff;
}


.file-btn {
  position: relative;
  overflow: hidden;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.media-library-search {
  width: 100%;
  margin: 0.35rem 0 0.55rem;
  box-sizing: border-box;
}

.icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.45rem;
  margin-top: 0.75rem;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.icon-picker__btn {
  display: grid;
  gap: 0.25rem;
  place-items: center;
  padding: 0.55rem 0.35rem;
  border: 1px solid var(--line, #b9c7ee);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--ink, #04112f);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.icon-picker__btn:hover {
  border-color: var(--accent, #5583e8);
  background: var(--accent-soft, #e4ebfb);
}

.icon-picker__btn svg {
  width: 28px;
  height: 28px;
  display: block;
}

.icon-picker__btn span {
  font-size: 0.65rem;
  line-height: 1.15;
  text-align: center;
  color: var(--ink-muted, #7286b8);
}

.media-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  max-height: 240px;
  overflow: auto;
  padding: 0.15rem 0.1rem 0.35rem;
  margin-bottom: 0.25rem;
}

.media-library__item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.media-library__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #1b3168;
  border-radius: 10px;
  background: #071737;
  overflow: hidden;
  cursor: pointer;
}

.media-library__thumb:hover {
  border-color: #5583e8;
}

.media-library__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-library__meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.media-library__name {
  flex: 1;
  min-width: 0;
  font-size: 0.68rem;
  color: #93a6d6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-library__delete {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #7286b8;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  font-size: 0.7rem;
  line-height: 1;
}

.media-library__delete:hover {
  color: #f0b4b4;
  background: rgba(155, 44, 44, 0.2);
}

.media-library__item--uploading {
  pointer-events: none;
}

.media-library__thumb--uploading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: default;
  border-color: #5583e8;
  background:
    linear-gradient(135deg, rgba(85, 131, 232, 0.18), rgba(4, 17, 47, 0.95)),
    #071737;
  position: relative;
  overflow: hidden;
}

.media-library__thumb--uploading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(130, 162, 231, 0.12) 48%,
    transparent 66%
  );
  animation: media-library-shimmer 1.35s ease-in-out infinite;
}

.media-library__spinner {
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: #82a2e7;
  border-radius: 50%;
  animation: img-process-spin 0.75s linear infinite;
  position: relative;
  z-index: 1;
}

.media-library__progress-label {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 600;
  color: #e8eefb;
  letter-spacing: 0.02em;
}

.media-library__progress-bar {
  position: relative;
  z-index: 1;
  width: 72%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.media-library__progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #5583e8, #82a2e7);
  transition: width 0.18s ease-out;
}

.media-library__item--failed .media-library__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: #8a4040;
  background: rgba(120, 40, 40, 0.35);
}

.media-library__fail-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #f0b4b4;
  text-align: center;
  padding: 0.35rem;
}

.media-library__item--broken .media-library__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: not-allowed;
  opacity: 0.85;
}

.media-library__broken-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #93a6d6;
  text-align: center;
  padding: 0.35rem;
}

.file-btn.is-uploading {
  opacity: 0.72;
  pointer-events: none;
}

@keyframes media-library-shimmer {
  0% { transform: translateX(-40%); }
  100% { transform: translateX(40%); }
}

.editor__canvas-wrap {
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(130, 162, 231, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(130, 162, 231, 0.05) 1px, transparent 1px),
    #04112f;
  background-size: 24px 24px;
  display: grid;
  place-items: center;
  min-height: 0;
  position: relative;
}

.editor__canvas-wrap.has-rulers {
  padding-top: 22px;
  padding-left: 22px;
}

.ruler-corner {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  background: #0a1c44;
  border-right: 1px solid #24407e;
  border-bottom: 1px solid #24407e;
  z-index: 12;
  cursor: pointer;
}

.ruler-corner::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid #5e71a4;
  border-radius: 2px;
}

.ruler {
  position: absolute;
  z-index: 11;
  display: block;
  background: #0c1e47;
  cursor: crosshair;
  touch-action: none;
}

.ruler--h {
  top: 0;
  height: 22px;
  border-bottom: 1px solid #24407e;
}

.ruler--v {
  left: 0;
  width: 22px;
  border-right: 1px solid #24407e;
}

.guides-list {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.guides-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #0c1e47;
  border: 1px solid #24407e;
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  font-size: 0.82rem;
  color: #b9c7ee;
}

.canvas-stage {
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  background: #fff;
  line-height: 0;
}

.img-process-overlay {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
  border-radius: 4px;
  will-change: transform, width, height;
}

.img-process-overlay__veil {
  position: absolute;
  inset: 0;
  background: rgba(4, 17, 47, 0.38);
}

.img-process-overlay__shine {
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.28) 48%,
    rgba(130, 162, 231, 0.22) 52%,
    transparent 70%
  );
  animation: img-process-shine 1.6s ease-in-out infinite;
}

.img-process-overlay__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.6rem;
  text-align: center;
}

.img-process-overlay__spinner {
  width: 1.55rem;
  height: 1.55rem;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #82a2e7;
  border-radius: 50%;
  animation: img-process-spin 0.75s linear infinite;
}

.img-process-overlay__label {
  max-width: 100%;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(4, 17, 47, 0.78);
  color: #e8eefb;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

@keyframes img-process-shine {
  0% { transform: translateX(-35%) rotate(8deg); }
  100% { transform: translateX(35%) rotate(8deg); }
}

@keyframes img-process-spin {
  to { transform: rotate(360deg); }
}

/* —— Canvas page loader (multipage open / page switch) —— */
.canvas-stage__placeholder {
  position: absolute;
  inset: 0;
  background: #fff center / cover no-repeat;
  filter: blur(2px) saturate(0.85);
  opacity: 0.85;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.18s ease;
}

.canvas-loader {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(4, 17, 47, 0.3);
  border-radius: 4px;
}

.canvas-loader__spinner {
  width: 2rem;
  height: 2rem;
  border: 2.5px solid rgba(255, 255, 255, 0.25);
  border-top-color: #82a2e7;
  border-radius: 50%;
  animation: img-process-spin 0.75s linear infinite;
}

.canvas-loader__label {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(4, 17, 47, 0.78);
  color: #e8eefb;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.canvas-loader__bar {
  width: 120px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.canvas-loader__bar::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5583e8, #82a2e7);
  animation: canvas-loader-slide 1.1s ease-in-out infinite;
}

@keyframes canvas-loader-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}

.editor__right {
  grid-area: right;
  background: #0a1c44;
  border-left: 1px solid #1b3168;
  overflow: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.props,
.layers {
  padding: 0.9rem;
}

.props {
  border-bottom: 1px solid #1b3168;
}

.layers__list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.layers__actions {
  margin-top: 0.65rem;
}

.layers__item {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto auto;
  gap: 0.15rem;
  align-items: center;
  background: #0c1e47;
  border: 1px solid #24407e;
  border-radius: 8px;
  padding: 0.2rem;
  cursor: grab;
}

.layers__item.is-active {
  border-color: #5583e8;
  background: #10275e;
}

.layers__item.is-dragging {
  opacity: 0.45;
}

.layers__item.is-drop-target {
  border-color: #82a2e7;
  box-shadow: inset 0 0 0 1px #82a2e7;
}

.layers__handle {
  color: #5e71a4;
  font-size: 0.7rem;
  letter-spacing: -0.12em;
  padding: 0 0.2rem;
  user-select: none;
  cursor: grab;
}

.layers__select {
  border: 0;
  background: transparent;
  color: #e8eefb;
  text-align: left;
  padding: 0.4rem 0.35rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.layers__order {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.layers__icon {
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 1.7rem;
  height: 1.35rem;
  color: #93a6d6;
  font-size: 0.75rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.layers__icon:hover {
  color: #fff;
}

@media (max-width: 960px) {
  .editor {
    --left-w: 100%;
    --right-w: 100%;
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(50vh, 1fr) auto;
    grid-template-areas:
      "top"
      "left"
      "canvas"
      "right";
  }

  .editor__left {
    grid-template-columns: 52px 1fr;
    max-height: 280px;
  }

  .editor__left-resize {
    display: none;
  }

  .editor__toolbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .page-head {
    flex-direction: column;
    align-items: start;
  }
}

/* —— Redes sociales: mockup, legibilidad, export multi —— */
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #a8b8e4;
  white-space: nowrap;
}

.check-inline input {
  accent-color: #2563eb;
}

.export-modal__card--wide {
  max-width: 28rem;
  max-height: min(90vh, 40rem);
  overflow: auto;
}

.legibility-report {
  margin-top: 0.6rem;
  font-size: 0.8rem;
}

.legibility-ok {
  color: #82a2e7;
  margin: 0;
}

.legibility-summary {
  color: #e8eefb;
  margin: 0 0 0.35rem;
}

.legibility-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #b9c7ee;
}

.legibility-list__error {
  color: #f07178;
}

.legibility-list__warn {
  color: #f4d35e;
}

.social-mockup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
}

.social-mockup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 8, 0.72);
}

.social-mockup__dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 94vw);
  background: #071737;
  border: 1px solid #24407e;
  border-radius: 16px;
  padding: 1rem 1rem 0.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.social-mockup__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.social-mockup__header h2 {
  margin: 0;
  font-size: 1rem;
  flex: 1 1 auto;
}

.social-mockup__modes {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.social-mockup__modes .btn.is-active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.social-mockup__stage {
  display: grid;
  place-items: center;
  padding: 0.5rem 0 0.75rem;
}

.social-mockup__phone {
  width: min(280px, 72vw);
  aspect-ratio: 9 / 19.5;
  border-radius: 28px;
  padding: 10px;
  background: linear-gradient(160deg, #1b3168, #04112f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.social-mockup__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
}

.social-mockup__art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.social-mockup__chrome {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: #fff;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.social-mockup__hint {
  margin: 0;
  text-align: center;
}

.mock-ig-story__progress {
  display: flex;
  gap: 3px;
  padding: 10px 10px 0;
}

.mock-ig-story__progress i {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
}

.mock-ig-story__progress i.is-active {
  background: #fff;
}

.mock-ig-story__top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
}

.mock-ig-story__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f77737, #fe2c55);
}

.mock-ig-story__close {
  margin-left: auto;
  font-size: 14px;
}

.mock-ig-story__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}

.mock-ig-story__reply {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.85);
}

.mock-ig-feed__top,
.mock-ig-feed__bottom {
  position: absolute;
  left: 0;
  right: 0;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent);
}

.mock-ig-feed__top {
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-ig-feed__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2563eb;
}

.mock-ig-feed__more {
  margin-left: auto;
}

.mock-ig-feed__bottom {
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent);
}

.mock-ig-feed__actions {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.mock-ig-feed__save {
  margin-left: auto;
}

.mock-tt__top {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 18px;
  font-weight: 600;
  opacity: 0.85;
}

.mock-tt__top .is-on {
  opacity: 1;
  border-bottom: 2px solid #fff;
}

.mock-tt__side {
  position: absolute;
  right: 8px;
  bottom: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 16px;
}

.mock-tt__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #fe2c55;
}

.mock-tt__bottom {
  position: absolute;
  left: 10px;
  right: 56px;
  bottom: 18px;
}

.mock-tt__bottom p {
  margin: 4px 0 0;
  opacity: 0.9;
}

/* ============ Editor de video (módulo local, aislado bajo .ved) ============ */

.ved {
  --ved-ruler-h: 30px;
  --ved-track-h: 56px;
  --ved-tracks-pad-y: 28px;
  --ved-visible-tracks: 4;
  --ved-timeline-max-h: calc(
    var(--ved-ruler-h) + var(--ved-tracks-pad-y) + (var(--ved-visible-tracks) * var(--ved-track-h))
  );

  --ved-bg: #04112f;
  --ved-surface: #071737;
  --ved-surface-2: #04112f;
  --ved-border: #1b3168;
  --ved-border-soft: #16306b;
  --ved-text: #e8eefb;
  --ved-text-dim: #93a6d6;
  --ved-text-faint: #7286b8;
  --ved-accent-soft: #10275e;
  --ved-radius: 12px;
  --ved-radius-sm: 8px;

  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--ved-bg);
  color: var(--ved-text);
  font-family: var(--font-body);
}

.ved :focus-visible {
  outline: 2px solid #82a2e7;
  outline-offset: 2px;
}

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

.ved__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #1b3168;
  background: #0a1c44;
}

.ved__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.ved__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  border: 1px solid #1f3672;
  color: #e8eefb;
  font-size: 1rem;
}

.ved__back:hover {
  background: #10275e;
}

.ved__title {
  border: 1px solid transparent;
  background: transparent;
  color: #e8eefb;
  font: inherit;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  min-width: 14rem;
}

.ved__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ved-save-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #93a6d6;
}

.ved-save-status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #5583e8;
  flex: 0 0 auto;
}

.ved-actions-sep {
  width: 1px;
  height: 1.4rem;
  background: var(--ved-border);
}

.ved-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid #1f3672;
  background: transparent;
  color: #e8eefb;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.ved-btn:hover {
  background: #10275e;
}

.ved-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #e8eefb;
}

.ved-btn--primary:hover {
  background: #124bc7;
}

.ved-btn--danger {
  border-color: #7c2f2f;
  color: #f2b8b8;
}

.ved-btn--danger:hover {
  background: #3a1d1d;
}

.ved-btn--warn {
  border-color: #8a6a2f;
  color: #ecd9a8;
}

.ved-btn--block {
  width: 100%;
  margin-top: 0.5rem;
}

.ved-btn--sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
}

.ved-btn--icon {
  padding: 0.3rem 0.55rem;
  line-height: 1.2;
}

.ved-btn--import {
  margin-top: 0.25rem;
}

.ved-btn--toggle.is-active {
  background: #10275e;
  border-color: var(--accent);
  color: #e8eefb;
}

.ved__main {
  display: grid;
  grid-template-columns: 300px 1fr 280px;
  flex: 1;
  min-height: 0;
}

.ved__left,
.ved__right {
  overflow-y: auto;
  padding: 0.875rem;
  background: var(--ved-surface);
  scrollbar-width: thin;
  scrollbar-color: #1f3672 transparent;
}

.ved__left::-webkit-scrollbar,
.ved__right::-webkit-scrollbar {
  width: 8px;
}

.ved__left::-webkit-scrollbar-thumb,
.ved__right::-webkit-scrollbar-thumb {
  background: #1f3672;
  border-radius: 999px;
}

.ved__right {
  border-left: 1px solid #1b3168;
}

.ved__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1rem;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.ved-monitor {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
}

.ved-monitor canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #000;
  border-radius: 10px;
  border: 1px solid var(--ved-border-soft);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.ved-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

.ved-transport {
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  background: rgba(4, 17, 47, 0.85);
  border: 1px solid var(--ved-border-soft);
  border-radius: 999px;
}

.ved-transport__spacer {
  flex: 1 1 auto;
}

.ved-btn--play {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-radius: 999px;
  font-size: 0.95rem;
}

.ved-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: #93a6d6;
}

.ved-panel {
  margin-bottom: 0.875rem;
  background: var(--ved-surface-2);
  border: 1px solid var(--ved-border-soft);
  border-radius: var(--ved-radius);
  padding: 0.8rem 0.85rem;
}

.ved-panel:last-child {
  margin-bottom: 0;
}

.ved-panel h2 {
  font-size: 0.92rem;
  margin: 0;
}

.ved-panel__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.ved-panel__header h2 {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ved-panel.is-collapsed .ved-panel__body {
  display: none;
}

.ved-panel.is-collapsed .ved-panel__header {
  margin-bottom: 0;
}

.ved-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-left: auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--ved-text-faint);
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.ved-collapse:hover {
  background: var(--ved-accent-soft);
  color: var(--ved-text);
}

.ved-panel.is-collapsed .ved-collapse {
  transform: rotate(-90deg);
}

.ved-count {
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ved-text-dim);
  background: var(--ved-accent-soft);
  border: 1px solid var(--ved-border);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  white-space: nowrap;
}

.ved-panel-sub {
  margin: 1rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #b9c7ee;
}

.ved-panel-sub--first {
  margin-top: 0.25rem;
}

.ved-hint {
  margin: 0.25rem 0 0.6rem;
  font-size: 0.78rem;
  color: #7286b8;
}

.ved-field {
  margin-bottom: 0.75rem;
}

.ved-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.ved-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #93a6d6;
}

.ved-scale-value {
  float: right;
  font-weight: 500;
  color: #b9c7ee;
}

.ved-field--inline label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ved-field input[type="number"],
.ved-field input[type="text"],
.ved-field textarea,
.ved-field select {
  width: 100%;
  background: #04112f;
  border: 1px solid #1f3672;
  border-radius: 8px;
  color: #e8eefb;
  padding: 0.45rem 0.6rem;
  font: inherit;
}

.ved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.ved-panel--media.is-dropping {
  border-color: #5583e8;
  box-shadow: 0 0 0 2px rgba(85, 131, 232, 0.35);
}

.ved-hint--drop {
  margin-top: 0.35rem;
  text-align: center;
}

.ved-alt-import {
  margin-top: 0.5rem;
}

.ved-alt-import summary {
  font-size: 0.74rem;
  color: var(--ved-text-faint);
  cursor: pointer;
  text-align: center;
}

.ved-alt-import summary:hover {
  color: var(--ved-text-dim);
}

.ved-search {
  position: relative;
  margin-top: 0.65rem;
}

.ved-search__icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ved-text-faint);
  font-size: 0.9rem;
  pointer-events: none;
}

.ved-search__input {
  width: 100%;
  background: #071737;
  border: 1px solid var(--ved-border);
  border-radius: var(--ved-radius-sm);
  color: var(--ved-text);
  font: inherit;
  font-size: 0.8rem;
  padding: 0.42rem 0.6rem 0.42rem 1.9rem;
}

.ved-search__input::placeholder {
  color: var(--ved-text-faint);
}

.ved-search__input:focus {
  outline: none;
  border-color: #33519f;
  background: #0d2153;
}

.ved-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.ved-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--ved-border);
  background: transparent;
  color: var(--ved-text-dim);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.ved-filter:hover {
  background: var(--ved-accent-soft);
  color: var(--ved-text);
}

.ved-filter.is-active {
  background: var(--ved-accent-soft);
  border-color: var(--accent);
  color: #e8eefb;
}

.ved-filter b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.ved-media-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.ved-media-card {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--ved-border);
  border-radius: 10px;
  background: #071737;
}

.ved-media-card[draggable="true"] {
  cursor: grab;
}

.ved-media-card[draggable="true"]:hover {
  border-color: #33519f;
  background: #0d2153;
}

.ved-media-card.is-disconnected {
  border-style: dashed;
  border-color: #8a6a2f;
  background: #171408;
}

.ved-media-card__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  overflow: hidden;
  background: #0d2153;
  color: #93a6d6;
}

.ved-media-card__thumb svg {
  width: 1.35rem;
  height: 1.35rem;
}

.ved-media-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ved-media-card__thumb--video {
  background: #0d3794;
  color: #d1dbf1;
}

.ved-media-card__thumb--audio {
  background: #12306e;
  color: #abbfeb;
}

.ved-media-card__thumb--image {
  background: #3a2f14;
  color: #ecd9a8;
}

.ved-media-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ved-media-card__name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ved-media-card__meta {
  font-size: 0.7rem;
  color: var(--ved-text-faint);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ved-media-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.1rem;
}

.ved-media-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}

.ved-tag {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.ved-tag--video {
  background: #0d3794;
  color: #d1dbf1;
}

.ved-tag--audio {
  background: #12306e;
  color: #abbfeb;
}

.ved-tag--image {
  background: #3a2f14;
  color: #ecd9a8;
}

.ved-tag--ok {
  background: #12306e;
  color: #abbfeb;
}

.ved-tag--warn {
  background: #3a2c12;
  color: #ecd9a8;
}

.ved-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  padding: 1.2rem 0.8rem;
  border: 1px dashed var(--ved-border);
  border-radius: 10px;
  background: rgba(4, 17, 47, 0.5);
}

.ved-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  background: var(--ved-accent-soft);
  color: var(--ved-text-dim);
}

.ved-empty__icon svg {
  width: 1.3rem;
  height: 1.3rem;
}

.ved-empty__title {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  font-weight: 700;
}

.ved-empty__text {
  margin: 0 0 0.4rem;
  font-size: 0.76rem;
  color: var(--ved-text-faint);
  line-height: 1.45;
}

.ved.is-dragging-source .ved-track__lane[data-track-kind="video"],
.ved.is-dragging-source .ved-track__lane[data-track-kind="audio"] {
  outline: 1px dashed rgba(130, 162, 231, 0.4);
  outline-offset: -1px;
}

.ved__timeline {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: 0;
  border-top: 1px solid #1b3168;
  background: #04112f;
}

.ved-timeline-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #16306b;
}

.ved-timeline-toolbar__group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ved-timeline-toolbar__group + .ved-timeline-toolbar__group {
  border-left: 1px solid var(--ved-border-soft);
  padding-left: 0.75rem;
}

.ved-timeline-toolbar__group--time {
  flex: 1 1 auto;
  justify-content: center;
}

.ved-time-field {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: #7286b8;
}

.ved-time-input {
  width: 72px;
  padding: 0.28rem 0.45rem;
  background: #071737;
  border: 1px solid #1b3168;
  border-radius: 6px;
  color: #b9c7ee;
  font: inherit;
  font-size: 0.78rem;
  text-align: center;
}

.ved-time-input:focus {
  outline: none;
  border-color: #33519f;
  background: #0d2153;
}

.ved-zoom-slider {
  width: 100px;
  accent-color: #5583e8;
}

.ved-zoom-label {
  min-width: 42px;
  font-size: 0.72rem;
  color: #7286b8;
  text-align: right;
}

.ved-timeline {
  position: relative;
  flex: 0 1 auto;
  max-height: var(--ved-timeline-max-h);
  overflow: auto;
  overscroll-behavior: contain;
}

.ved-timeline__inner {
  position: relative;
  min-width: 100%;
}

.ved-ruler {
  position: sticky;
  top: 0;
  z-index: 8;
  height: var(--ved-ruler-h);
  margin-left: 178px;
  border-bottom: 1px solid #16306b;
  background: #020b22;
  cursor: ew-resize;
  user-select: none;
}

.ved-tick {
  position: absolute;
  top: 5px;
  bottom: 0;
  font-size: 0.66rem;
  color: #7286b8;
  padding-left: 5px;
  border-left: 1px solid #1f3672;
}

.ved-tracks {
  position: relative;
  padding: 10px 0 18px;
  box-sizing: border-box;
}

.ved-track {
  display: grid;
  grid-template-columns: 178px 1fr;
  align-items: stretch;
  min-height: var(--ved-track-h);
  height: var(--ved-track-h);
  border-bottom: 1px solid #0a1c44;
}

.ved-track.is-active .ved-track__label {
  background: #0a1c44;
  color: #b9c7ee;
}

.ved-track__label {
  font-size: 0.72rem;
  color: #7286b8;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.4rem;
  border-right: 1px solid #16306b;
  background: #04112f;
  cursor: pointer;
}

.ved-track__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ved-track__layer {
  flex: 0 0 auto;
  font-size: 0.58rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #5e71a4;
  background: #0a1c44;
  border: 1px solid #1b3168;
  border-radius: 3px;
  padding: 0.15rem 0.28rem;
  white-space: nowrap;
}

.ved-track__layer--audio {
  color: #5e71a4;
  background: transparent;
  border-color: transparent;
  padding-inline: 0.1rem;
}

.ved-track__actions {
  display: inline-flex;
  gap: 2px;
  flex: 0 0 auto;
}

.ved-track__btn {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid #1b3168;
  border-radius: 4px;
  background: #071737;
  color: #93a6d6;
  font-size: 0.65rem;
  line-height: 1;
  cursor: pointer;
}

.ved-track__btn:hover:not(:disabled) {
  background: #10275e;
  color: #e8eefb;
}

.ved-track__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.ved-track__btn--danger:hover:not(:disabled) {
  border-color: #6a3030;
  background: #2a1616;
  color: #ffb4b4;
}

.ved-track__btn svg {
  display: block;
  width: 11px;
  height: 11px;
  margin: 0 auto;
}

.ved-track__btn--mute.is-muted {
  border-color: #6a3030;
  background: #2a1616;
  color: #ffb4b4;
}

.ved-track.is-muted .ved-track__name {
  opacity: 0.55;
}

.ved-track__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 0.7rem;
  background: #0d2153;
  flex: 0 0 auto;
}

.ved-track__icon--video { background: #124bc7; }
.ved-track__icon--audio { background: #0d3794; }
.ved-track__icon--text { background: #4a3a16; }

.ved-track__lane {
  position: relative;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 59px, rgba(255, 255, 255, 0.03) 59px, rgba(255, 255, 255, 0.03) 60px);
}

.ved-track__lane.is-drop-target {
  outline: 1px solid rgba(130, 162, 231, 0.55);
  outline-offset: -1px;
  background:
    linear-gradient(180deg, rgba(85, 131, 232, 0.16), rgba(85, 131, 232, 0.05)),
    repeating-linear-gradient(90deg, transparent 0, transparent 59px, rgba(255, 255, 255, 0.03) 59px, rgba(255, 255, 255, 0.03) 60px);
}

.ved-clip {
  position: absolute;
  top: 7px;
  height: 42px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, #5583e8 0%, #124bc7 100%);
  color: #e8eefb;
  font-size: 0.7rem;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 6px rgba(0, 0, 0, 0.35);
}

.ved-clip:hover {
  filter: brightness(1.12);
}

.ved-clip--audio {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #5583e8, #124bc7);
  color: #e8eefb;
}

.ved-clip--text {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #d99a3d, #b0731f);
  color: #fff8ea;
}

.ved-clip.is-selected {
  box-shadow:
    0 0 0 2px #ffffff,
    0 0 14px rgba(255, 255, 255, 0.35);
  z-index: 2;
}

.ved-clip.is-disconnected {
  border: 1px dashed #8a6a2f;
  background:
    repeating-linear-gradient(45deg, rgba(138, 106, 47, 0.25) 0 8px, transparent 8px 16px), #2a2414;
}

.ved-clip__label {
  flex: 1;
  align-self: center;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.ved-clip__handle {
  width: 10px;
  align-self: stretch;
  cursor: ew-resize;
  background: transparent;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  flex: 0 0 auto;
  position: relative;
}

.ved-clip__handle[data-edge="end"] {
  border-left: none;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.ved-clip__transition {
  align-self: center;
  flex: 0 0 auto;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.62rem;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
}

.ved-transitions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.ved-transition {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.55rem 0.4rem;
  background: #071737;
  border: 1px solid #1b3168;
  border-radius: 10px;
  color: #b9c7ee;
  font: inherit;
  font-size: 0.72rem;
  cursor: grab;
}

.ved-transition:hover {
  border-color: #33519f;
  background: #0d2153;
}

.ved-transition.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.ved-transition__icon {
  font-size: 1.05rem;
  line-height: 1;
}

.ved-transition__label {
  text-align: center;
  line-height: 1.2;
}

.ved-junction {
  position: absolute;
  top: 0;
  width: 40px;
  height: 56px;
  margin-left: -20px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ved-junction__diamond {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: rgba(4, 17, 47, 0.9);
  border-radius: 2px;
  transform: rotate(45deg);
  opacity: 0.35;
  transition: opacity 0.12s ease, transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.ved-junction.has-transition .ved-junction__diamond {
  opacity: 0.95;
  border-color: #82a2e7;
  background: #153473;
}

.ved.is-dragging-transition .ved-junction {
  pointer-events: auto;
  cursor: copy;
}

.ved.is-dragging-transition .ved-junction__diamond {
  opacity: 1;
  border-color: #abbfeb;
  box-shadow: 0 0 0 3px rgba(130, 162, 231, 0.28);
}

.ved-junction.is-drop-target .ved-junction__diamond {
  transform: rotate(45deg) scale(1.4);
  border-color: #ffffff;
  background: #5583e8;
  box-shadow: 0 0 0 4px rgba(85, 131, 232, 0.35);
}

.ved-clip__drop {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 5;
  pointer-events: none;
}

.ved-clip__drop--start {
  left: 0;
}

.ved-clip__drop--end {
  right: 0;
}

.ved.is-dragging-transition .ved-clip__drop {
  pointer-events: auto;
  cursor: copy;
  background: rgba(130, 162, 231, 0.12);
}

.ved-clip__drop.is-drop-target,
.ved.is-dragging-transition .ved-clip__drop.is-drop-target {
  background: rgba(85, 131, 232, 0.4);
  box-shadow: inset 0 0 0 2px #5583e8;
}

.ved-clip__handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.75);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.ved-clip:hover .ved-clip__handle::after,
.ved-clip.is-selected .ved-clip__handle::after {
  opacity: 1;
}

.ved-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #ff5c3d;
  box-shadow: 0 0 0 1px rgba(255, 92, 61, 0.25);
  pointer-events: auto;
  cursor: ew-resize;
  z-index: 9;
}

.ved-playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top: 9px solid #ff5c3a;
  border-bottom: none;
  pointer-events: none;
}

/* Zona de arrastre más ancha que la línea visible */
.ved-playhead::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -7px;
  width: 16px;
}

.ved-monitor canvas {
  cursor: grab;
}

.ved-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 17, 47, 0.72);
  z-index: 60;
}

.ved-modal[hidden] {
  display: none;
}

.ved-modal__card {
  width: min(460px, calc(100% - 2rem));
  background: #0a1c44;
  border: 1px solid #1f3672;
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.ved-progress {
  height: 10px;
  border-radius: 999px;
  background: #04112f;
  overflow: hidden;
  margin: 0.9rem 0 0.5rem;
}

.ved-progress__bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.ved-cloud-result a {
  color: #abbfeb;
  text-decoration: underline;
}

/* Overlay de revinculación automática de medios locales */
.ved-relink-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(21, 52, 115, 0.45), transparent 55%),
    rgba(3, 11, 34, 0.72);
  backdrop-filter: blur(4px);
}

.ved-relink-overlay[hidden] {
  display: none;
}

.ved-relink-overlay__card {
  position: relative;
  width: min(380px, 100%);
  overflow: hidden;
  padding: 1.6rem 1.4rem 1.35rem;
  border-radius: 18px;
  border: 1px solid #2a4494;
  background: linear-gradient(160deg, #10275e 0%, #071737 100%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.ved-relink-overlay__shine {
  position: absolute;
  inset: -40% -60%;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.08) 48%,
    rgba(130, 162, 231, 0.14) 52%,
    transparent 70%
  );
  opacity: 0;
}

.ved-relink-overlay.is-busy .ved-relink-overlay__shine {
  opacity: 1;
  animation: ved-relink-shine 1.55s ease-in-out infinite;
}

.ved-relink-overlay__spinner {
  width: 2.35rem;
  height: 2.35rem;
  margin: 0 auto 0.95rem;
  border: 2.5px solid rgba(255, 255, 255, 0.18);
  border-top-color: #82a2e7;
  border-radius: 50%;
  opacity: 0;
}

.ved-relink-overlay.is-busy .ved-relink-overlay__spinner {
  opacity: 1;
  animation: ved-relink-spin 0.75s linear infinite;
}

.ved-relink-overlay.is-permission .ved-relink-overlay__spinner {
  display: none;
}

.ved-relink-overlay__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #e8eefb;
}

.ved-relink-overlay__status {
  margin: 0;
  color: #93a6d6;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ved-relink-overlay__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 1.1rem;
}

@keyframes ved-relink-spin {
  to { transform: rotate(360deg); }
}

@keyframes ved-relink-shine {
  0% { transform: translateX(-35%) rotate(8deg); }
  100% { transform: translateX(35%) rotate(8deg); }
}

.ved-insertion-hint {
  display: none;
  margin-top: 0.5rem;
  color: #b9c7ee;
  background: rgba(85, 131, 232, 0.14);
  border: 1px solid rgba(85, 131, 232, 0.35);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
}

.ved.is-inserting-text .ved-insertion-hint {
  display: block;
}

.ved.is-inserting-text .ved-track__lane[data-track-kind="text"] {
  cursor: crosshair;
}

.ved-text-clip-ghost {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 2px;
  background: rgba(217, 154, 61, 0.55);
  border: 2px dashed rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  pointer-events: none;
  z-index: 5;
  display: none;
}

@media (max-width: 1100px) {
  .ved__main {
    grid-template-columns: 220px 1fr;
  }

  .ved__right {
    display: none;
  }
}

.ved-graphic-modal__card {
  max-width: min(94vw, 1200px);
  width: min(94vw, 1200px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ved-graphic-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ved-graphic-toolbar .ved-btn {
  min-width: 2.2rem;
  padding: 0.35rem 0.55rem;
}

.ved-graphic-color {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #b9c7ee;
  font-size: 0.85rem;
}

.ved-graphic-color input[type="color"] {
  width: 2.2rem;
  height: 1.8rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.ved-graphic-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #04112f;
  border: 1px solid rgba(171, 191, 235, 0.14);
  border-radius: 8px;
  overflow: auto;
  max-height: 70vh;
}

.ved-graphic-stage canvas {
  max-width: 100%;
  max-height: 70vh;
  background-image:
    linear-gradient(45deg, #0d2153 25%, transparent 25%),
    linear-gradient(-45deg, #0d2153 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #0d2153 75%),
    linear-gradient(-45deg, transparent 75%, #0d2153 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.ved-field--color-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ved-field--color-row label {
  flex: 1 1 auto;
  margin-bottom: 0;
}

.ved-field--color-row input[type="color"] {
  width: 2.4rem;
  height: 1.9rem;
  padding: 0;
  border: none;
  background: none;
  flex: 0 0 auto;
}

.ved-field-row--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ved-field-row--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ved-actions--presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.ved-actions--presets .ved-btn {
  flex: 1 1 auto;
  min-width: 3.5rem;
}
