:root {
  color-scheme: light;
  --bg: #f3f5fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d9dfec;
  --soft: #eef2ff;
  --accent: #667eea;
  --accent-2: #764ba2;
  --danger: #d82027;
  --ok: #0f766e;
  --shadow: 0 14px 38px rgba(31, 41, 55, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.font-montserrat {
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

.font-open-sans {
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

.font-lato {
  font-family: "Lato", "Trebuchet MS", Arial, Helvetica, sans-serif;
}

.font-raleway {
  font-family: "Raleway", "Segoe UI Light", "Trebuchet MS", Arial, Helvetica, sans-serif;
}

.font-playfair-display {
  font-family: Georgia, "Times New Roman", serif;
}

.font-poppins {
  font-family: "Poppins", Arial, Helvetica, sans-serif;
}

.font-roboto {
  font-family: "Roboto", Arial, Helvetica, sans-serif;
}

.font-oswald {
  font-family: "Oswald", Impact, "Arial Narrow", Arial, sans-serif;
}

.font-dancing-script {
  font-family: "Dancing Script", "Segoe Script", "Brush Script MT", cursive;
}

.font-lobster {
  font-family: "Lobster", "Cooper Black", "Brush Script MT", cursive;
}

body.dark {
  --bg: #0f1115;
  --panel: #171a21;
  --text: #f4f6fb;
  --muted: #9ca3af;
  --line: #2a2f3a;
  --soft: #202633;
  color-scheme: dark;
}

body.dark button,
body.dark input,
body.dark textarea,
body.dark select,
body.dark .button-link,
body.dark .share-btn {
  background: #171a21;
  color: var(--text);
  border-color: var(--line);
}

body.dark .panel,
body.dark .form-section,
body.dark .media-search-panel,
body.dark .media-card,
body.dark .stat,
body.dark .item,
body.dark .upload-row {
  background: var(--panel);
}

body.dark .upload-area,
body.dark .media-dropzone,
body.dark .image-timeline,
body.dark .audio-waveform {
  background-color: #111318;
}

body.dark .hero button,
body.dark .hero .button-link.light {
  background: rgba(255, 255, 255, 0.16);
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

body.dark .primary,
body.dark .waveform-play {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

body.dark .primary-audio {
  background: #0f766e;
  color: white;
  border-color: #0f766e;
}

body.dark .upload-audio {
  background: #e11d48;
  color: white;
  border-color: #e11d48;
}

body.theme-color-dark {
  --bg: #090c13;
  --panel: #111827;
  --text: #f8fafc;
  --muted: #bac4d3;
  --line: rgba(148, 163, 184, 0.34);
  --soft: #172033;
  --accent: #38bdf8;
  --accent-2: #f472b6;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

body.theme-color-mid {
  --bg: #e9edf7;
  --panel: #f9fbff;
  --text: #132033;
  --muted: #56657a;
  --line: rgba(88, 101, 124, 0.22);
  --soft: #edf4ff;
  --accent: #2563eb;
  --accent-2: #db2777;
  --shadow: 0 16px 40px rgba(30, 41, 59, 0.13);
  color-scheme: light;
}

body.theme-color-pastel {
  --bg: #fbf7f1;
  --panel: #fffdf8;
  --text: #243044;
  --muted: #667085;
  --line: rgba(120, 113, 108, 0.24);
  --soft: #fff6db;
  --accent: #7c3aed;
  --accent-2: #0f766e;
  --shadow: 0 16px 36px rgba(120, 113, 108, 0.16);
  color-scheme: light;
}

body.theme-color-dark .primary-audio,
body.theme-color-mid .primary-audio,
body.theme-color-pastel .primary-audio {
  background: #0f766e;
  color: white;
  border-color: #0f766e;
}

body.theme-color-dark .upload-audio,
body.theme-color-mid .upload-audio,
body.theme-color-pastel .upload-audio {
  background: #e11d48;
  color: white;
  border-color: #e11d48;
}

.hero {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-inner {
  width: 100%;
  margin: 0 auto;
  padding: 12px 10px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.hero h1 {
  margin: 4px 0 3px;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.1;
}

.hero p,
.section-heading p,
.message,
.upload-area span,
.item small,
.stat span {
  color: var(--muted);
}

.hero p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  min-width: 260px;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.hero-actions span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  text-align: right;
}

.container {
  width: 100%;
  margin: 0 auto;
  padding: 12px 0 18px;
}

.agent-body {
  background: #eef3f8;
}

.agent-container {
  display: grid;
  gap: 14px;
  padding-inline: 12px;
}

.agent-command-panel,
.agent-images-panel {
  width: 100%;
}

.agent-source-grid {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(160px, 0.8fr) minmax(180px, 0.8fr) repeat(2, minmax(110px, 0.45fr));
  gap: 12px;
  align-items: end;
}

.agent-url-field,
.agent-angle-field {
  grid-column: span 2;
}

.agent-actions,
.agent-render-row {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 12px;
}

.agent-workspace {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(320px, 420px);
  gap: 14px;
  align-items: start;
}

.agent-side-panel {
  position: sticky;
  top: 12px;
}

.agent-timeline {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.agent-audio-bar {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.22) var(--audio-progress, 0%), transparent var(--audio-progress, 0%)),
    var(--soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
}

.agent-image-track {
  min-height: 82px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  background: var(--panel);
}

.agent-image-chip {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 7px;
  overflow: hidden;
  background: #111827;
}

.agent-image-chip img,
.agent-upload-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-image-chip span {
  position: absolute;
  left: 5px;
  bottom: 5px;
  min-width: 20px;
  min-height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.64);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.agent-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.agent-upload-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.agent-upload-card img {
  display: block;
  aspect-ratio: 16 / 10;
}

.agent-upload-card figcaption {
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.agent-render-check {
  min-height: 42px;
  align-items: center;
}

.timeline-panel {
  margin-bottom: 10px;
  padding: 10px 12px 12px;
}

.timeline-panel .section-heading {
  margin-bottom: 8px;
}

.timeline-panel .section-heading h2 {
  font-size: 17px;
}

.timeline-panel .section-heading p {
  font-size: 12px;
  line-height: 1.25;
}

.timeline-preview-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(430px, 540px) minmax(220px, 676px) 220px;
  gap: 12px;
  align-items: stretch;
  justify-items: stretch;
  justify-content: center;
  margin-bottom: 6px;
}

.timeline-left-rail {
  grid-column: 1;
  justify-self: stretch;
  align-self: start;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(190px, 1fr);
  gap: 14px;
  align-items: start;
}

.timeline-shortcuts {
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
}

.recent-edit-card:empty {
  display: none;
}

.recent-edit-stack {
  display: grid;
  gap: 6px;
}

.timeline-copy-marker-btn {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #0d9488;
  border-radius: 8px;
  background: #0d9488;
  color: white;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.timeline-copy-marker-btn:hover {
  filter: brightness(0.96);
}

.recent-edit-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.08);
}

.recent-edit-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 104px;
  object-fit: cover;
  border-radius: 6px;
  background: #111827;
}

.recent-edit-item div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.recent-edit-item span,
.recent-edit-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.recent-edit-item strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.15;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.recent-edit-item button {
  grid-column: 1 / -1;
  min-height: 30px;
  padding: 5px 8px;
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  font-size: 12px;
}

.recent-edit-item .recent-save-btn {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

.timeline-shortcuts div {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
}

.timeline-shortcuts span {
  margin-left: auto;
  text-align: right;
}

kbd {
  min-width: 24px;
  min-height: 19px;
  display: inline-grid;
  place-items: center;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--panel);
  color: var(--text);
  font: 800 11px/1 system-ui, sans-serif;
}

.timeline-frame-preview {
  grid-column: 2;
  position: relative;
  container-type: inline-size;
  width: min(var(--preview-width, 320px), 100%, calc(34vh * 16 / 9));
  min-width: 220px;
  max-width: 100%;
  justify-self: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
}

.timeline-frame-preview.empty::after {
  content: "Sin imagen";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
}

.timeline-preview-bg {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #050505;
  transition: transform 0.24s ease, background-position 0.24s ease, background-size 0.24s ease;
}

.timeline-preview-next-bg {
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.12s linear;
  animation: none !important;
}

.timeline-preview-pulse-bg {
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: none;
}

.timeline-preview-pulse-bg-b,
.timeline-preview-pulse-bg-c {
  z-index: 2;
}

.timeline-preview-color-fade {
  position: absolute;
  inset: 0;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s linear;
}

.animated-phrase-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  width: min(94%, 1180px);
  max-width: none;
  padding: 0.08em 0.18em;
  color: #fff;
  font-family: Montserrat, Inter, system-ui, sans-serif;
  font-size: clamp(24px, 6.2vw, 76px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  pointer-events: none;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.9), 0 4px 7px rgba(0, 0, 0, 0.72);
  opacity: 1;
  filter: none;
  clip-path: inset(0 0 0 0);
  contain: layout paint;
  isolation: isolate;
  transform: translate(-50%, -50%);
  will-change: transform, opacity, filter, clip-path;
}

.animated-phrase-overlay[hidden] {
  display: none;
}

.timeline-animated-phrase-overlay {
  font-size: clamp(18px, 6.8cqw, 58px);
}

.porta-animated-phrase-overlay {
  z-index: 8;
}

.phrase-hold-left,
.phrase-hold-right,
.phrase-hold-top,
.phrase-hold-bottom,
.phrase-hold-grow,
.phrase-hold-fade,
.phrase-hold-zoom,
.phrase-hold-pop,
.phrase-hold-bounce,
.phrase-hold-slide,
.phrase-hold-flip,
.phrase-hold-rotate,
.phrase-hold-typewriter,
.phrase-hold-erase,
.phrase-hold-blur,
.phrase-hold-wipe,
.phrase-hold-reveal,
.phrase-hold-scale,
.phrase-hold-shake,
.phrase-hold-swing,
.phrase-hold-skew,
.phrase-hold-drop,
.phrase-hold-rise,
.phrase-hold-roll,
.phrase-hold-elastic {
  opacity: 1;
  filter: none;
  clip-path: inset(0 0 0 0);
  transform: translate(-50%, -50%) scale(1);
  animation: none;
}

.phrase-hold-pulse {
  opacity: 1;
  filter: none;
  clip-path: inset(0 0 0 0);
  animation: phrasePulse 0.82s ease-in-out infinite;
}

.phrase-hold-glow {
  opacity: 1;
  filter: none;
  clip-path: inset(0 0 0 0);
  animation: phraseGlow 1.1s ease-in-out infinite alternate;
}

.phrase-enter-left { animation: phraseEnterLeft 0.56s cubic-bezier(.2, 1.26, .32, 1) both; }
.phrase-exit-left { animation: phraseExitLeft 0.42s ease-in both; }
.phrase-enter-right { animation: phraseEnterRight 0.56s cubic-bezier(.2, 1.26, .32, 1) both; }
.phrase-exit-right { animation: phraseExitRight 0.42s ease-in both; }
.phrase-enter-top,
.phrase-enter-drop { animation: phraseEnterTop 0.58s cubic-bezier(.2, 1.28, .32, 1) both; }
.phrase-exit-top,
.phrase-exit-drop { animation: phraseExitTop 0.42s ease-in both; }
.phrase-enter-bottom,
.phrase-enter-rise { animation: phraseEnterBottom 0.58s cubic-bezier(.2, 1.28, .32, 1) both; }
.phrase-exit-bottom,
.phrase-exit-rise { animation: phraseExitBottom 0.42s ease-in both; }
.phrase-enter-grow,
.phrase-enter-zoom,
.phrase-enter-scale,
.phrase-enter-pop,
.phrase-enter-bounce,
.phrase-enter-elastic { animation: phraseEnterScale 0.58s cubic-bezier(.2, 1.38, .32, 1) both; }
.phrase-exit-grow,
.phrase-exit-zoom,
.phrase-exit-scale,
.phrase-exit-pop,
.phrase-exit-bounce,
.phrase-exit-elastic { animation: phraseExitScale 0.38s ease-in both; }
.phrase-enter-fade { animation: phraseEnterFade 0.45s ease-out both; }
.phrase-exit-fade { animation: phraseExitFade 0.36s ease-in both; }
.phrase-enter-flip { animation: phraseEnterFlip 0.58s cubic-bezier(.2, 1.18, .32, 1) both; }
.phrase-exit-flip { animation: phraseExitFlip 0.36s ease-in both; }
.phrase-enter-rotate,
.phrase-enter-roll { animation: phraseEnterRotate 0.58s cubic-bezier(.2, 1.18, .32, 1) both; }
.phrase-exit-rotate,
.phrase-exit-roll { animation: phraseExitRotate 0.36s ease-in both; }
.phrase-enter-typewriter,
.phrase-enter-wipe,
.phrase-enter-reveal { animation: phraseEnterWipe 0.52s ease-out both; }
.phrase-exit-typewriter,
.phrase-exit-erase,
.phrase-exit-wipe,
.phrase-exit-reveal { animation: phraseExitWipe 0.36s ease-in both; }
.phrase-enter-erase { animation: phraseEnterWipe 0.52s ease-out both; }
.phrase-enter-blur { animation: phraseEnterBlur 0.5s ease-out both; }
.phrase-exit-blur { animation: phraseExitBlur 0.36s ease-in both; }
.phrase-enter-slide { animation: phraseEnterLeft 0.56s cubic-bezier(.2, 1.26, .32, 1) both; }
.phrase-exit-slide { animation: phraseExitRight 0.42s ease-in both; }
.phrase-enter-shake { animation: phraseEnterShake 0.56s ease-out both; }
.phrase-exit-shake { animation: phraseExitFade 0.34s ease-in both; }
.phrase-enter-pulse { animation: phraseEnterScale 0.44s ease-out both, phrasePulse 0.82s ease-in-out 0.44s infinite; }
.phrase-exit-pulse { animation: phraseExitScale 0.34s ease-in both; }
.phrase-enter-glow { animation: phraseEnterFade 0.4s ease-out both, phraseGlow 1.1s ease-in-out 0.4s infinite alternate; }
.phrase-exit-glow { animation: phraseExitFade 0.34s ease-in both; }
.phrase-enter-swing { animation: phraseEnterSwing 0.62s ease-out both; }
.phrase-exit-swing { animation: phraseExitFade 0.34s ease-in both; }
.phrase-enter-skew { animation: phraseEnterSkew 0.52s ease-out both; }
.phrase-exit-skew { animation: phraseExitSkew 0.34s ease-in both; }

@keyframes phraseEnterLeft {
  0% { opacity: 0; transform: translate(-92%, -50%) scale(.96); }
  78% { opacity: 1; transform: translate(-47%, -50%) scale(1.02); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes phraseExitLeft {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-88%, -50%) scale(.96); }
}

@keyframes phraseEnterRight {
  0% { opacity: 0; transform: translate(-8%, -50%) scale(.96); }
  78% { opacity: 1; transform: translate(-53%, -50%) scale(1.02); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes phraseExitRight {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-12%, -50%) scale(.96); }
}

@keyframes phraseEnterTop {
  0% { opacity: 0; transform: translate(-50%, -118%) scale(.96); }
  78% { opacity: 1; transform: translate(-50%, -45%) scale(1.02); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes phraseExitTop {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -112%) scale(.96); }
}

@keyframes phraseEnterBottom {
  0% { opacity: 0; transform: translate(-50%, 24%) scale(.96); }
  78% { opacity: 1; transform: translate(-50%, -55%) scale(1.02); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes phraseExitBottom {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, 18%) scale(.96); }
}

@keyframes phraseEnterScale {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.18); }
  64% { opacity: 1; transform: translate(-50%, -50%) scale(1.13); }
  84% { transform: translate(-50%, -50%) scale(.96); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes phraseExitScale {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(.24); }
}

@keyframes phraseEnterFade {
  from { opacity: 0; transform: translate(-50%, -50%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes phraseExitFade {
  from { opacity: 1; transform: translate(-50%, -50%); }
  to { opacity: 0; transform: translate(-50%, -50%); }
}

@keyframes phraseEnterFlip {
  from { opacity: 0; transform: translate(-50%, -50%) rotateX(80deg) scale(.92); }
  to { opacity: 1; transform: translate(-50%, -50%) rotateX(0deg) scale(1); }
}

@keyframes phraseExitFlip {
  from { opacity: 1; transform: translate(-50%, -50%) rotateX(0deg); }
  to { opacity: 0; transform: translate(-50%, -50%) rotateX(-76deg); }
}

@keyframes phraseEnterRotate {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-18deg) scale(.82); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
}

@keyframes phraseExitRotate {
  from { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  to { opacity: 0; transform: translate(-50%, -50%) rotate(18deg) scale(.82); }
}

@keyframes phraseEnterWipe {
  from { opacity: 1; clip-path: inset(0 100% 0 0); transform: translate(-50%, -50%); }
  to { opacity: 1; clip-path: inset(0 0 0 0); transform: translate(-50%, -50%); }
}

@keyframes phraseExitWipe {
  from { opacity: 1; clip-path: inset(0 0 0 0); transform: translate(-50%, -50%); }
  to { opacity: 1; clip-path: inset(0 0 0 100%); transform: translate(-50%, -50%); }
}

@keyframes phraseEnterBlur {
  from { opacity: 0; filter: blur(18px); transform: translate(-50%, -50%) scale(1.08); }
  to { opacity: 1; filter: blur(0); transform: translate(-50%, -50%) scale(1); }
}

@keyframes phraseExitBlur {
  from { opacity: 1; filter: blur(0); transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; filter: blur(16px); transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes phraseEnterShake {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.96); }
  35% { opacity: 1; transform: translate(calc(-50% - 10px), -50%) scale(1.02); }
  55% { transform: translate(calc(-50% + 8px), -50%) scale(1); }
  74% { transform: translate(calc(-50% - 4px), -50%); }
  100% { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes phrasePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.045); }
}

@keyframes phraseGlow {
  from { text-shadow: 0 2px 3px rgba(0, 0, 0, 0.9), 0 4px 7px rgba(0, 0, 0, 0.72), 0 0 0 rgba(255, 255, 255, 0); }
  to { text-shadow: 0 2px 3px rgba(0, 0, 0, 0.9), 0 4px 7px rgba(0, 0, 0, 0.72), 0 0 10px rgba(255, 255, 255, 0.46); }
}

@keyframes phraseEnterSwing {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-10deg); }
  58% { opacity: 1; transform: translate(-50%, -50%) rotate(5deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }
}

@keyframes phraseEnterSkew {
  from { opacity: 0; transform: translate(-50%, -50%) skewX(-18deg) scale(.94); }
  to { opacity: 1; transform: translate(-50%, -50%) skewX(0) scale(1); }
}

@keyframes phraseExitSkew {
  from { opacity: 1; transform: translate(-50%, -50%) skewX(0) scale(1); }
  to { opacity: 0; transform: translate(-50%, -50%) skewX(18deg) scale(.94); }
}

.timeline-frame-preview .preview-shade {
  z-index: 4;
  pointer-events: none;
}

.timeline-frame-preview[data-zoom="in"] .timeline-preview-bg {
  animation-name: preview-zoom-in;
  animation-duration: var(--motion-duration, 7s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.timeline-frame-preview[data-zoom="out"] .timeline-preview-bg {
  animation-name: preview-zoom-out;
  animation-duration: var(--motion-duration, 7s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.timeline-frame-preview[data-zoom="in25"] .timeline-preview-bg {
  animation-name: preview-zoom-in-25;
  animation-duration: var(--motion-duration, 7s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.timeline-frame-preview[data-zoom="out25"] .timeline-preview-bg {
  animation-name: preview-zoom-out-25;
  animation-duration: var(--motion-duration, 7s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.timeline-frame-preview[data-pan="ltr"] .timeline-preview-bg,
.timeline-frame-preview[data-pan="rtl"] .timeline-preview-bg {
  background-size: auto 100%;
  animation-duration: var(--motion-duration, 7s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.timeline-frame-preview[data-zoom="in"][data-pan="ltr"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in;
}

.timeline-frame-preview[data-zoom="out"][data-pan="ltr"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out;
}

.timeline-frame-preview[data-zoom="in25"][data-pan="ltr"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in-25;
}

.timeline-frame-preview[data-zoom="out25"][data-pan="ltr"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out-25;
}

.timeline-frame-preview[data-zoom="in"][data-pan="rtl"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in;
}

.timeline-frame-preview[data-zoom="out"][data-pan="rtl"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out;
}

.timeline-frame-preview[data-zoom="in25"][data-pan="rtl"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in-25;
}

.timeline-frame-preview[data-zoom="out25"][data-pan="rtl"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out-25;
}

.timeline-frame-preview[data-rotate="left"] .timeline-preview-bg,
.timeline-frame-preview[data-rotate="right"] .timeline-preview-bg {
  animation-duration: var(--motion-duration, 7s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.timeline-frame-preview[data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-rotate-left;
}

.timeline-frame-preview[data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-rotate-right;
}

.timeline-frame-preview[data-zoom="in"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-zoom-in-rotate-left;
}

.timeline-frame-preview[data-zoom="in"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-zoom-in-rotate-right;
}

.timeline-frame-preview[data-zoom="out"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-zoom-out-rotate-left;
}

.timeline-frame-preview[data-zoom="out"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-zoom-out-rotate-right;
}

.timeline-frame-preview[data-zoom="in25"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-zoom-in-25-rotate-left;
}

.timeline-frame-preview[data-zoom="in25"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-zoom-in-25-rotate-right;
}

.timeline-frame-preview[data-zoom="out25"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-zoom-out-25-rotate-left;
}

.timeline-frame-preview[data-zoom="out25"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-zoom-out-25-rotate-right;
}

.timeline-frame-preview[data-pan="ltr"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-rotate-left;
}

.timeline-frame-preview[data-pan="ltr"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-rotate-right;
}

.timeline-frame-preview[data-pan="rtl"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-rotate-left;
}

.timeline-frame-preview[data-pan="rtl"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-rotate-right;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="in"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in-rotate-left;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="in"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in-rotate-right;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="out"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out-rotate-left;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="out"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out-rotate-right;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="in25"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in-25-rotate-left;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="in25"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in-25-rotate-right;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="out25"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out-25-rotate-left;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="out25"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out-25-rotate-right;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="in"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in-rotate-left;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="in"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in-rotate-right;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="out"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out-rotate-left;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="out"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out-rotate-right;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="in25"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in-25-rotate-left;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="in25"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in-25-rotate-right;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="out25"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out-25-rotate-left;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="out25"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out-25-rotate-right;
}

.timeline-frame-preview[data-pan="ltr"] .timeline-preview-bg {
  animation-name: preview-pan-ltr;
}

.timeline-frame-preview[data-pan="rtl"] .timeline-preview-bg {
  animation-name: preview-pan-rtl;
}

.timeline-frame-preview[data-zoom="in"][data-pan="ltr"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in;
}

.timeline-frame-preview[data-zoom="out"][data-pan="ltr"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out;
}

.timeline-frame-preview[data-zoom="in25"][data-pan="ltr"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in-25;
}

.timeline-frame-preview[data-zoom="out25"][data-pan="ltr"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out-25;
}

.timeline-frame-preview[data-zoom="in"][data-pan="rtl"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in;
}

.timeline-frame-preview[data-zoom="out"][data-pan="rtl"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out;
}

.timeline-frame-preview[data-zoom="in25"][data-pan="rtl"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in-25;
}

.timeline-frame-preview[data-zoom="out25"][data-pan="rtl"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out-25;
}

.timeline-frame-preview[data-pan="ltr"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-rotate-left;
}

.timeline-frame-preview[data-pan="ltr"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-rotate-right;
}

.timeline-frame-preview[data-pan="rtl"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-rotate-left;
}

.timeline-frame-preview[data-pan="rtl"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-rotate-right;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="in"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in-rotate-left;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="in"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in-rotate-right;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="out"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out-rotate-left;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="out"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out-rotate-right;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="in25"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in-25-rotate-left;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="in25"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-in-25-rotate-right;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="out25"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out-25-rotate-left;
}

.timeline-frame-preview[data-pan="ltr"][data-zoom="out25"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-ltr, preview-zoom-out-25-rotate-right;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="in"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in-rotate-left;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="in"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in-rotate-right;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="out"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out-rotate-left;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="out"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out-rotate-right;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="in25"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in-25-rotate-left;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="in25"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-in-25-rotate-right;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="out25"][data-rotate="left"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out-25-rotate-left;
}

.timeline-frame-preview[data-pan="rtl"][data-zoom="out25"][data-rotate="right"] .timeline-preview-bg {
  animation-name: preview-pan-rtl, preview-zoom-out-25-rotate-right;
}

@keyframes preview-pan-ltr {
  from { background-position: left center; }
  to { background-position: right center; }
}

@keyframes preview-pan-rtl {
  from { background-position: right center; }
  to { background-position: left center; }
}

@keyframes preview-zoom-in {
  from { transform: scale(1); }
  to { transform: scale(1.10); }
}

@keyframes preview-zoom-out {
  from { transform: scale(1.10); }
  to { transform: scale(1); }
}

@keyframes preview-zoom-in-25 {
  from { transform: scale(1); }
  to { transform: scale(1.25); }
}

@keyframes preview-zoom-out-25 {
  from { transform: scale(1.25); }
  to { transform: scale(1); }
}

@keyframes preview-rotate-left {
  from { transform: rotate(0deg); }
  to { transform: rotate(-15deg); }
}

@keyframes preview-rotate-right {
  from { transform: rotate(0deg); }
  to { transform: rotate(15deg); }
}

@keyframes preview-zoom-in-rotate-left {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1.10) rotate(-15deg); }
}

@keyframes preview-zoom-in-rotate-right {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1.10) rotate(15deg); }
}

@keyframes preview-zoom-out-rotate-left {
  from { transform: scale(1.10) rotate(0deg); }
  to { transform: scale(1) rotate(-15deg); }
}

@keyframes preview-zoom-out-rotate-right {
  from { transform: scale(1.10) rotate(0deg); }
  to { transform: scale(1) rotate(15deg); }
}

@keyframes preview-zoom-in-25-rotate-left {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1.25) rotate(-15deg); }
}

@keyframes preview-zoom-in-25-rotate-right {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1.25) rotate(15deg); }
}

@keyframes preview-zoom-out-25-rotate-left {
  from { transform: scale(1.25) rotate(0deg); }
  to { transform: scale(1) rotate(-15deg); }
}

@keyframes preview-zoom-out-25-rotate-right {
  from { transform: scale(1.25) rotate(0deg); }
  to { transform: scale(1) rotate(15deg); }
}

.timeline-frame-preview span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 5;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.timeline-preview-fullscreen {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.54);
  color: white;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.timeline-preview-fullscreen:hover,
.timeline-preview-fullscreen:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.72);
  outline: 0;
}

.timeline-preview-fullscreen svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.timeline-preview-fullscreen.is-fullscreen svg {
  transform: scale(0.94);
}

.timeline-frame-preview:fullscreen,
.timeline-frame-preview:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  min-width: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: #050505;
}

.timeline-frame-preview:fullscreen .timeline-preview-bg,
.timeline-frame-preview:-webkit-full-screen .timeline-preview-bg {
  background-size: contain;
}

.timeline-frame-preview:fullscreen span,
.timeline-frame-preview:-webkit-full-screen span {
  left: 14px;
  bottom: 14px;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 14px;
}

.timeline-frame-preview:fullscreen .timeline-preview-fullscreen,
.timeline-frame-preview:-webkit-full-screen .timeline-preview-fullscreen {
  right: 16px;
  top: 16px;
  width: 42px;
  min-height: 42px;
}

.timeline-preview-tools {
  grid-column: 3;
  position: static;
  transform: none;
  display: grid;
  gap: 5px;
  align-content: start;
  align-self: start;
  justify-self: start;
  width: 220px;
  min-width: 0;
}

.timeline-motion-panel {
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.timeline-motion-panel .field,
.timeline-size-field {
  gap: 3px;
  font-size: 11px;
  line-height: 1.15;
}

.timeline-motion-panel select {
  min-height: 25px;
  padding: 4px 24px 4px 7px;
  font-size: 11px;
}

.timeline-group-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.timeline-group-actions button {
  min-height: 25px;
  padding: 4px 6px;
  font-size: 11px;
}

.fade-color-field input {
  min-height: 25px;
  padding: 2px;
}

.timeline-size-field input {
  min-height: 26px;
  padding: 0;
}

.timeline-actions {
  display: flex;
  gap: 7px;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.creator-watch-url-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 8px 0 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.creator-watch-url-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.creator-watch-url-bar input {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 13px;
}

.creator-watch-url-bar button {
  min-height: 30px;
  padding: 5px 10px;
}

.compact-check {
  min-height: 32px;
}

.compact-field {
  min-width: 150px;
}

.compact-field input {
  min-height: 32px;
}

.timeline-zoom-field {
  min-width: 100%;
}

.timeline-zoom-field select {
  min-height: 32px;
  padding: 5px 28px 5px 9px;
}

.timeline-scroll-wrap {
  width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
}

.timeline-scroll-wrap.scrollable {
  overflow-x: auto;
}

.timeline-scroll-wrap::-webkit-scrollbar {
  height: 12px;
}

.timeline-scroll-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: var(--soft);
}

.timeline-scroll-wrap::-webkit-scrollbar-thumb {
  border: 3px solid var(--soft);
  border-radius: 999px;
  background: var(--accent);
}

.timeline-zoom-surface {
  width: 100%;
  min-width: 100%;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 28fr) minmax(0, 42fr) minmax(0, 30fr);
  gap: 18px;
  align-items: start;
}

.left-stack,
.middle-stack {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.form-panel {
  min-width: 0;
}

.middle-stack .panel {
  overflow: hidden;
}

.left-stack .panel {
  overflow: hidden;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 15px;
  margin: 0 0 12px;
}

.section-heading {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.section-heading.compact {
  margin-bottom: 8px;
}

.section-heading.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading p,
.message {
  font-size: 13px;
  line-height: 1.35;
}

.message-success-flash {
  color: #166534;
  font-weight: 800;
  animation: saveMessageFlash 1.5s ease both;
}

.message-processing {
  color: var(--accent);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.message-processing::before,
.submit-btn.processing::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: processingSpin 0.72s linear infinite;
}

button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--text);
  min-height: 38px;
  padding: 9px 13px;
  font-weight: 700;
  cursor: pointer;
}

button svg,
.share-btn svg,
.campaign-play svg {
  width: 21px;
  height: 21px;
  display: block;
  margin: auto;
  fill: currentColor;
}

.icon-btn {
  width: 42px;
  min-width: 42px;
  padding: 8px;
  display: inline-grid;
  place-items: center;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.button-link.light {
  background: rgba(255, 255, 255, 0.16);
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

.top-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.submit-btn {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

.submit-btn.processing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.submit-btn.saved-pulse {
  animation: saveButtonPulse 1.2s ease both;
}

.creator-processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.creator-processing-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.creator-processing-overlay[hidden] {
  display: none;
}

.creator-processing-card {
  min-width: min(320px, calc(100vw - 44px));
  max-width: min(420px, calc(100vw - 44px));
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px 28px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  text-align: center;
}

.creator-processing-spinner {
  width: 54px;
  height: 54px;
  border: 5px solid rgba(79, 70, 229, 0.22);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: processingSpin 0.72s linear infinite;
}

.creator-processing-card strong {
  font-size: 18px;
}

.creator-processing-text {
  color: var(--muted);
  font-size: 14px;
}

.editor-public-body {
  background: var(--bg);
}

.public-editor-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.public-editor-nav a {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.public-editor-shell {
  width: min(1400px, calc(100% - 28px));
  margin: 18px auto 60px;
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 16px;
}

.public-editor-session,
.public-editor-main {
  display: grid;
  gap: 16px;
  align-content: start;
}

.public-editor-session {
  position: sticky;
  top: 82px;
  align-self: start;
}

.session-video-card,
.editor-file-actions {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.session-video-card small {
  color: var(--muted);
}

.compact-upload {
  min-height: 132px;
}

.editor-preview-panel,
.public-editor-form {
  display: grid;
  gap: 16px;
}

.editor-timeline {
  min-height: 122px;
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 10px;
}

.editor-timeline-item {
  position: relative;
  min-height: 122px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
}

.editor-timeline-item img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  display: block;
}

.editor-timeline-item strong {
  position: absolute;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: white;
}

.editor-timeline-item div {
  display: flex;
  gap: 4px;
  padding: 5px;
}

.editor-timeline-item button {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 12px;
}

.audio-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.audio-wave-placeholder {
  height: 42px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, rgba(79, 70, 229, 0.24) 0 4px, transparent 4px 10px),
    linear-gradient(180deg, transparent 18px, rgba(79, 70, 229, 0.28) 18px 24px, transparent 24px);
}

.editor-preview-frame {
  position: relative;
  min-height: clamp(260px, 42vw, 560px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #020617;
}

.editor-preview-copy {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 12%;
  z-index: 2;
  color: white;
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.62);
}

.editor-preview-copy strong {
  display: block;
  font-size: clamp(32px, 5vw, 76px);
  line-height: 1.02;
}

.editor-preview-copy p {
  max-width: 720px;
  font-size: clamp(16px, 2vw, 28px);
}

.audio-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.audio-actions audio {
  width: 100%;
}

.editor-media-panel {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.editor-media-grid {
  max-height: 360px;
  overflow: auto;
}

.editor-media-grid .media-card {
  display: grid;
  gap: 8px;
}

.editor-media-grid .media-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
}

@media (max-width: 900px) {
  .public-editor-shell {
    grid-template-columns: 1fr;
  }

  .public-editor-session {
    position: static;
  }

  .editor-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audio-actions {
    grid-template-columns: 1fr;
  }
}

.admin-promotion-list,
.incoming-image-list {
  display: grid;
  gap: 14px;
}

.admin-promotion-card,
.incoming-image-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.admin-promotion-card > img,
.incoming-image-card > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  background: #0f172a;
}

.admin-promotion-fields,
.incoming-image-card {
  min-width: 0;
}

.admin-promotion-fields {
  display: grid;
  gap: 10px;
}

.incoming-image-card {
  align-items: start;
}

@media (max-width: 760px) {
  .admin-promotion-card,
  .incoming-image-card {
    grid-template-columns: 1fr;
  }
}

@keyframes processingSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes saveMessageFlash {
  0% {
    background: rgba(34, 197, 94, 0.22);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.34);
  }
  100% {
    background: transparent;
    box-shadow: 0 0 0 12px rgba(34, 197, 94, 0);
  }
}

@keyframes saveButtonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.42);
    filter: brightness(1.04);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(34, 197, 94, 0);
    filter: none;
  }
}

.upload-area {
  min-height: 172px;
  border: 2px dashed #c7d2fe;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  background: #f8f9ff;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.upload-area:hover,
.upload-area.dragging {
  border-color: var(--accent-2);
  background: var(--soft);
  transform: translateY(-1px);
}

.upload-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 28px;
  font-weight: 700;
}

.selected-images-grid {
  display: grid;
  gap: 9px;
  margin: 12px 0;
}

.upload-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
}

.upload-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--soft);
}

.upload-row small {
  color: var(--muted);
}

.image-timeline {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  padding: 0 12px 5px;
  border: 2px dashed #c7d2fe;
  border-top: 0;
  border-radius: 8px;
  background:
    repeating-linear-gradient(to right, rgba(102, 126, 234, 0.13) 0 1px, transparent 1px 80px),
    #fbfcff;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.image-timeline.dragging {
  border-color: var(--accent);
  background:
    repeating-linear-gradient(to right, rgba(102, 126, 234, 0.18) 0 1px, transparent 1px 80px),
    var(--soft);
}

.image-timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50px;
  height: 3px;
  border-radius: 999px;
  background: #c7d2fe;
}

.timeline-selection-box {
  position: absolute;
  z-index: 4;
  border: 1px solid #0d9488;
  border-radius: 6px;
  background: rgba(13, 148, 136, 0.14);
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.12);
  pointer-events: none;
}

.timeline-selection-box[hidden] {
  display: none;
}

.timeline-frame {
  z-index: 1;
  position: absolute;
  top: 8px;
  width: clamp(96px, var(--frame-width, 14%), 210px);
  height: 68px;
  min-height: 68px;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid white;
  box-shadow: 0 6px 16px rgba(31, 41, 55, 0.18);
  background: #111827;
  cursor: ew-resize;
  touch-action: none;
}

.timeline-frame.moving,
.timeline-frame:active {
  border-color: var(--accent);
  cursor: ew-resize;
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.32);
}

.image-timeline.loop-mode .timeline-frame {
  cursor: default;
}

.timeline-frame.selected {
  border-color: #d82027;
  box-shadow: 0 0 0 3px rgba(216, 32, 39, 0.18), 0 10px 24px rgba(102, 126, 234, 0.24);
}

.timeline-frame.looped-frame {
  opacity: 0.72;
  border-style: dashed;
}

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

.timeline-frame span {
  position: absolute;
  left: 4px;
  bottom: 4px;
  min-width: 20px;
  min-height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  font-size: 12px;
}

.timeline-frame small {
  position: absolute;
  right: 5px;
  bottom: 5px;
  min-height: 20px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #172033;
  font-size: 12px;
  font-weight: 800;
}

.timeline-motion-badge {
  position: absolute;
  left: 5px;
  top: 5px;
  z-index: 2;
  min-width: 22px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(102, 126, 234, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.28);
}

.timeline-motion-badge.pan-badge {
  left: 31px;
}

.timeline-motion-badge.rotate-badge {
  left: 57px;
  background: rgba(217, 119, 6, 0.94);
}

.timeline-motion-badge.zoom-badge {
  background: rgba(22, 163, 74, 0.94);
}

.timeline-motion-badge.group-badge {
  left: 83px;
  background: rgba(14, 116, 144, 0.94);
}

.timeline-motion-badge.color-badge {
  left: 109px;
  color: white;
  background: var(--badge-color, #111827);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.timeline-marker {
  position: absolute;
  top: 9px;
  bottom: 9px;
  z-index: 2;
  width: 32px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d82027;
  transform: translateX(-50%);
  cursor: pointer;
}

.timeline-marker span {
  position: absolute;
  top: 0;
  bottom: 18px;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(216, 32, 39, 0.12);
}

.timeline-marker b {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  padding: 2px 5px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(216, 32, 39, 0.28);
  font-size: 10px;
  white-space: nowrap;
}

.animated-phrase-marker {
  position: absolute;
  top: -2px;
  z-index: 4;
  width: 22px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7f1d1d !important;
  transform: translateX(-50%);
  cursor: grab;
}

.animated-phrase-marker span {
  position: absolute;
  left: 50%;
  top: 3px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 12px solid #7f1d1d;
  filter: drop-shadow(0 2px 4px rgba(127, 29, 29, 0.28));
}

.animated-phrase-marker.selected span {
  border-top-color: #2563eb;
  filter: drop-shadow(0 2px 5px rgba(37, 99, 235, 0.45));
}

.animated-phrase-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 15px;
  bottom: -66px;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.62);
}

.animated-phrase-marker.selected::after {
  width: 3px;
  background: rgba(37, 99, 235, 0.78);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.animated-phrase-marker.moving {
  cursor: grabbing;
  color: #450a0a !important;
}

.waveform-row {
  display: block;
  margin-top: 5px;
}

.waveform-play {
  min-width: 100%;
  min-height: 34px;
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.waveform-area {
  position: relative;
  min-height: 42px;
  cursor: crosshair;
}

.audio-waveform {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  display: block;
}

.waveform-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(216, 32, 39, 0.12);
  pointer-events: none;
}

.time-ruler {
  position: relative;
  height: 20px;
  border-bottom: 1px solid var(--line);
}

.time-mark {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.time-mark i {
  width: 1px;
  height: 7px;
  background: var(--line);
}

.time-mark.minor {
  opacity: 0.7;
}

.time-mark.minor i {
  height: 4px;
}

.time-mark.minor b {
  display: none;
}

.time-mark b {
  font-weight: 700;
}

.field {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 92px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(102, 126, 234, 0.2);
  border-color: var(--accent);
}

.form-panel form,
.form-section {
  display: grid;
  gap: 13px;
}

.form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
}

.collapsible-form-section {
  gap: 0;
}

.collapsible-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.collapsible-section-heading h3 {
  margin: 0;
}

.draggable-section-heading {
  cursor: grab;
  user-select: none;
}

.draggable-section-heading:active {
  cursor: grabbing;
}

.collapsible-form-section.is-dragging {
  opacity: 0.72;
  box-shadow: 0 14px 34px rgba(45, 55, 72, 0.18);
}

.collapsible-form-section.drag-over-before,
.collapsible-form-section.drag-over-after {
  position: relative;
}

.collapsible-form-section.drag-over-before::before,
.collapsible-form-section.drag-over-after::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.14);
}

.collapsible-form-section.drag-over-before::before {
  top: -8px;
}

.collapsible-form-section.drag-over-after::after {
  bottom: -8px;
}

.collapsible-section-body {
  display: grid;
  gap: 13px;
  margin-top: 13px;
}

.collapsible-section-body[hidden] {
  display: none !important;
}

.collapse-section-btn {
  width: 34px;
  height: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(102, 126, 234, 0.28);
  background: white;
  color: var(--accent);
}

.collapse-section-btn span {
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.18s ease;
}

.collapsible-form-section.is-collapsed {
  background: #f7f8fc;
}

.collapsible-form-section.is-collapsed .collapse-section-btn span {
  transform: rotate(-45deg) translate(-1px, 1px);
}

body.theme-color-dark .form-panel .collapsible-form-section,
body.theme-color-mid .form-panel .collapsible-form-section,
body.theme-color-pastel .form-panel .collapsible-form-section {
  background: linear-gradient(135deg, var(--section-bg), var(--section-bg-2));
  border-color: var(--section-line);
  box-shadow: 0 10px 26px var(--section-shadow);
  overflow: hidden;
}

body.theme-color-dark .form-panel .collapsible-section-heading,
body.theme-color-mid .form-panel .collapsible-section-heading,
body.theme-color-pastel .form-panel .collapsible-section-heading {
  margin: -14px -14px 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--section-head), var(--section-head-2));
  border-bottom: 1px solid var(--section-line);
}

body.theme-color-dark .form-panel .collapsible-section-heading h3,
body.theme-color-mid .form-panel .collapsible-section-heading h3,
body.theme-color-pastel .form-panel .collapsible-section-heading h3 {
  color: var(--section-title);
}

body.theme-color-dark .form-panel .collapsible-section-body,
body.theme-color-mid .form-panel .collapsible-section-body,
body.theme-color-pastel .form-panel .collapsible-section-body {
  padding-top: 13px;
  margin-top: 0;
}

body.theme-color-dark .form-panel .collapsible-form-section.is-collapsed,
body.theme-color-mid .form-panel .collapsible-form-section.is-collapsed,
body.theme-color-pastel .form-panel .collapsible-form-section.is-collapsed {
  background: var(--section-bg);
}

body.theme-color-dark .form-panel .collapse-section-btn,
body.theme-color-mid .form-panel .collapse-section-btn,
body.theme-color-pastel .form-panel .collapse-section-btn {
  background: var(--section-button-bg);
  border-color: var(--section-button-line);
  color: var(--section-button-text);
}

body.theme-color-dark .form-panel .animated-phrases-editor,
body.theme-color-mid .form-panel .animated-phrases-editor,
body.theme-color-pastel .form-panel .animated-phrases-editor {
  background: color-mix(in srgb, var(--section-bg) 72%, white 28%);
  border-color: var(--section-line);
}

body.theme-color-dark .form-panel .nested-form-subsection,
body.theme-color-mid .form-panel .nested-form-subsection,
body.theme-color-pastel .form-panel .nested-form-subsection {
  border-top-color: var(--section-line);
}

body.theme-color-dark .left-stack > .panel,
body.theme-color-mid .left-stack > .panel,
body.theme-color-pastel .left-stack > .panel {
  background: linear-gradient(135deg, var(--section-bg), var(--section-bg-2));
  border-color: var(--section-line);
  box-shadow: 0 10px 26px var(--section-shadow);
  overflow: hidden;
}

body.theme-color-dark .left-stack > .panel > .section-heading,
body.theme-color-mid .left-stack > .panel > .section-heading,
body.theme-color-pastel .left-stack > .panel > .section-heading {
  margin: -18px -18px 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--section-head), var(--section-head-2));
  border-bottom: 1px solid var(--section-line);
}

body.theme-color-dark .left-stack > .panel > .section-heading h2,
body.theme-color-mid .left-stack > .panel > .section-heading h2,
body.theme-color-pastel .left-stack > .panel > .section-heading h2 {
  color: var(--section-title);
}

body.theme-color-dark .left-stack > .panel > .section-heading p,
body.theme-color-mid .left-stack > .panel > .section-heading p,
body.theme-color-pastel .left-stack > .panel > .section-heading p {
  color: color-mix(in srgb, var(--section-title) 78%, transparent);
}

body.theme-color-dark .left-stack .media-search-panel,
body.theme-color-mid .left-stack .media-search-panel,
body.theme-color-pastel .left-stack .media-search-panel {
  background: linear-gradient(135deg, var(--media-search-bg), var(--media-search-bg-2));
  border-color: var(--media-search-line);
  box-shadow: 0 8px 18px var(--media-search-shadow);
}

body.theme-color-dark .form-panel [data-collapsible-section="campaign-2"] {
  --section-bg: #1a1830;
  --section-bg-2: #26143a;
  --section-head: #3b1d76;
  --section-head-2: #7e22ce;
  --section-line: rgba(216, 180, 254, 0.34);
  --section-title: #f5f3ff;
  --section-shadow: rgba(126, 34, 206, 0.24);
  --section-button-bg: rgba(245, 243, 255, 0.1);
  --section-button-line: rgba(245, 243, 255, 0.32);
  --section-button-text: #f5f3ff;
}

body.theme-color-dark .left-stack .upload-panel {
  --section-bg: #1a1830;
  --section-bg-2: #26143a;
  --section-head: #3b1d76;
  --section-head-2: #7e22ce;
  --section-line: rgba(216, 180, 254, 0.34);
  --section-title: #f5f3ff;
  --section-shadow: rgba(126, 34, 206, 0.24);
  --media-search-bg: #231216;
  --media-search-bg-2: #32131e;
  --media-search-line: rgba(253, 164, 175, 0.34);
  --media-search-shadow: rgba(190, 18, 60, 0.18);
}

body.theme-color-dark .form-panel [data-collapsible-section="campaign-3"] {
  --section-bg: #231216;
  --section-bg-2: #32131e;
  --section-head: #7f1d1d;
  --section-head-2: #be123c;
  --section-line: rgba(253, 164, 175, 0.34);
  --section-title: #fff1f2;
  --section-shadow: rgba(190, 18, 60, 0.24);
  --section-button-bg: rgba(255, 241, 242, 0.1);
  --section-button-line: rgba(255, 241, 242, 0.32);
  --section-button-text: #fff1f2;
}

body.theme-color-dark .left-stack .result-panel {
  --section-bg: #0b2224;
  --section-bg-2: #0f2f33;
  --section-head: #0f766e;
  --section-head-2: #0891b2;
  --section-line: rgba(103, 232, 249, 0.32);
  --section-title: #ecfeff;
  --section-shadow: rgba(8, 145, 178, 0.22);
}

body.theme-color-dark .form-panel [data-collapsible-section="campaign-4"] {
  --section-bg: #0b2224;
  --section-bg-2: #0f2f33;
  --section-head: #0f766e;
  --section-head-2: #0891b2;
  --section-line: rgba(103, 232, 249, 0.32);
  --section-title: #ecfeff;
  --section-shadow: rgba(8, 145, 178, 0.22);
  --section-button-bg: rgba(236, 254, 255, 0.1);
  --section-button-line: rgba(236, 254, 255, 0.32);
  --section-button-text: #ecfeff;
}

body.theme-color-dark .form-panel [data-collapsible-section="campaign-5"] {
  --section-bg: #241b0d;
  --section-bg-2: #30240c;
  --section-head: #b45309;
  --section-head-2: #d97706;
  --section-line: rgba(252, 211, 77, 0.34);
  --section-title: #fffbeb;
  --section-shadow: rgba(217, 119, 6, 0.2);
  --section-button-bg: rgba(255, 251, 235, 0.1);
  --section-button-line: rgba(255, 251, 235, 0.32);
  --section-button-text: #fffbeb;
}

body.theme-color-mid .form-panel [data-collapsible-section="campaign-2"] {
  --section-bg: #f4f0ff;
  --section-bg-2: #ebe4ff;
  --section-head: #ddd6fe;
  --section-head-2: #c4b5fd;
  --section-line: rgba(124, 58, 237, 0.28);
  --section-title: #3b0764;
  --section-shadow: rgba(124, 58, 237, 0.13);
  --section-button-bg: #ffffff;
  --section-button-line: rgba(124, 58, 237, 0.35);
  --section-button-text: #6d28d9;
}

body.theme-color-mid .left-stack .upload-panel {
  --section-bg: #f4f0ff;
  --section-bg-2: #ebe4ff;
  --section-head: #ddd6fe;
  --section-head-2: #c4b5fd;
  --section-line: rgba(124, 58, 237, 0.28);
  --section-title: #3b0764;
  --section-shadow: rgba(124, 58, 237, 0.13);
  --media-search-bg: #fff1f2;
  --media-search-bg-2: #ffe4e6;
  --media-search-line: rgba(190, 18, 60, 0.25);
  --media-search-shadow: rgba(190, 18, 60, 0.1);
}

body.theme-color-mid .form-panel [data-collapsible-section="campaign-3"] {
  --section-bg: #fff1f2;
  --section-bg-2: #ffe4e6;
  --section-head: #fecdd3;
  --section-head-2: #fda4af;
  --section-line: rgba(190, 18, 60, 0.25);
  --section-title: #7f1d1d;
  --section-shadow: rgba(190, 18, 60, 0.12);
  --section-button-bg: #ffffff;
  --section-button-line: rgba(190, 18, 60, 0.32);
  --section-button-text: #be123c;
}

body.theme-color-mid .left-stack .result-panel {
  --section-bg: #ecfeff;
  --section-bg-2: #cffafe;
  --section-head: #a5f3fc;
  --section-head-2: #67e8f9;
  --section-line: rgba(8, 145, 178, 0.28);
  --section-title: #164e63;
  --section-shadow: rgba(8, 145, 178, 0.12);
}

body.theme-color-mid .form-panel [data-collapsible-section="campaign-4"] {
  --section-bg: #ecfeff;
  --section-bg-2: #cffafe;
  --section-head: #a5f3fc;
  --section-head-2: #67e8f9;
  --section-line: rgba(8, 145, 178, 0.28);
  --section-title: #164e63;
  --section-shadow: rgba(8, 145, 178, 0.12);
  --section-button-bg: #ffffff;
  --section-button-line: rgba(8, 145, 178, 0.32);
  --section-button-text: #0e7490;
}

body.theme-color-mid .form-panel [data-collapsible-section="campaign-5"] {
  --section-bg: #fffbeb;
  --section-bg-2: #fef3c7;
  --section-head: #fde68a;
  --section-head-2: #fbbf24;
  --section-line: rgba(180, 83, 9, 0.26);
  --section-title: #78350f;
  --section-shadow: rgba(180, 83, 9, 0.1);
  --section-button-bg: #ffffff;
  --section-button-line: rgba(180, 83, 9, 0.32);
  --section-button-text: #b45309;
}

body.theme-color-pastel .form-panel [data-collapsible-section="campaign-2"] {
  --section-bg: #faf5ff;
  --section-bg-2: #f3e8ff;
  --section-head: #f3e8ff;
  --section-head-2: #e9d5ff;
  --section-line: rgba(168, 85, 247, 0.22);
  --section-title: #5b21b6;
  --section-shadow: rgba(168, 85, 247, 0.09);
  --section-button-bg: #fff;
  --section-button-line: rgba(168, 85, 247, 0.28);
  --section-button-text: #7e22ce;
}

body.theme-color-pastel .left-stack .upload-panel {
  --section-bg: #faf5ff;
  --section-bg-2: #f3e8ff;
  --section-head: #f3e8ff;
  --section-head-2: #e9d5ff;
  --section-line: rgba(168, 85, 247, 0.22);
  --section-title: #5b21b6;
  --section-shadow: rgba(168, 85, 247, 0.09);
  --media-search-bg: #fff7ed;
  --media-search-bg-2: #ffedd5;
  --media-search-line: rgba(234, 88, 12, 0.2);
  --media-search-shadow: rgba(234, 88, 12, 0.08);
}

body.theme-color-pastel .form-panel [data-collapsible-section="campaign-3"] {
  --section-bg: #fff7ed;
  --section-bg-2: #ffedd5;
  --section-head: #fed7aa;
  --section-head-2: #fdba74;
  --section-line: rgba(234, 88, 12, 0.2);
  --section-title: #9a3412;
  --section-shadow: rgba(234, 88, 12, 0.08);
  --section-button-bg: #fff;
  --section-button-line: rgba(234, 88, 12, 0.26);
  --section-button-text: #c2410c;
}

body.theme-color-pastel .left-stack .result-panel {
  --section-bg: #f0fdfa;
  --section-bg-2: #ccfbf1;
  --section-head: #99f6e4;
  --section-head-2: #5eead4;
  --section-line: rgba(13, 148, 136, 0.22);
  --section-title: #115e59;
  --section-shadow: rgba(13, 148, 136, 0.09);
}

body.theme-color-pastel .form-panel [data-collapsible-section="campaign-4"] {
  --section-bg: #f0fdfa;
  --section-bg-2: #ccfbf1;
  --section-head: #99f6e4;
  --section-head-2: #5eead4;
  --section-line: rgba(13, 148, 136, 0.22);
  --section-title: #115e59;
  --section-shadow: rgba(13, 148, 136, 0.09);
  --section-button-bg: #fff;
  --section-button-line: rgba(13, 148, 136, 0.28);
  --section-button-text: #0f766e;
}

body.theme-color-pastel .form-panel [data-collapsible-section="campaign-5"] {
  --section-bg: #f0f9ff;
  --section-bg-2: #e0f2fe;
  --section-head: #bae6fd;
  --section-head-2: #93c5fd;
  --section-line: rgba(37, 99, 235, 0.22);
  --section-title: #1e3a8a;
  --section-shadow: rgba(37, 99, 235, 0.09);
  --section-button-bg: #fff;
  --section-button-line: rgba(37, 99, 235, 0.28);
  --section-button-text: #2563eb;
}

.nested-form-subsection {
  display: grid;
  gap: 13px;
  margin-top: 4px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.nested-form-subsection h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.animated-phrases-editor {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(127, 29, 29, 0.18);
  border-radius: 8px;
  background: #fff7f7;
}

.animated-phrases-srt-editor {
  width: 100%;
  min-height: 220px;
  min-width: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  tab-size: 2;
  white-space: pre;
}

.standalone-phrases-editor .compact-heading {
  grid-template-columns: minmax(0, 1fr) minmax(132px, 0.45fr) auto;
}

.compact-heading {
  gap: 10px;
  margin-bottom: 10px;
}

.promotion-link-editor {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
}

.promotion-links-list {
  display: grid;
  gap: 10px;
}

.promotion-link-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1.1fr) minmax(0, 1.35fr);
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.promotion-link-row .field {
  gap: 5px;
}

.promotion-link-row .danger-btn {
  min-height: 40px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checks,
.check {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.audio-tools {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.audio-action {
  min-height: 44px;
}

.primary-audio {
  border-color: #0f766e;
  background: #0f766e;
  color: white;
}

.upload-audio {
  border-color: #e11d48;
  background: #e11d48;
  color: white;
}

.audio-player {
  width: 100%;
  min-height: 40px;
}

.checks label,
.check {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.font-sample-box {
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #8b8b8b;
  color: white;
  font-size: 48px;
  line-height: 1;
  text-align: center;
  overflow: hidden;
}

.font-sample-box.compact {
  min-height: 48px;
  font-size: 24px;
}

.checks input,
.check input {
  width: 18px;
  height: 18px;
}

.checks select {
  width: auto;
  min-width: 110px;
  padding: 7px 10px;
  font-size: 13px;
}

.poster-typewriter-option {
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 5%, transparent);
  line-height: 1.35;
}

.range-field {
  gap: 8px;
}

.range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.range-label strong {
  color: var(--text);
  font-size: 13px;
}

.range-field input[type="range"] {
  width: 100%;
}

.og-preview,
.desktop-preview,
.phone-preview {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #111827;
  border: 1px solid var(--line);
}

.og-preview {
  aspect-ratio: 1200 / 630;
}

.mobile-og-preview {
  position: relative;
  width: min(260px, 100%);
  margin: 0 auto;
  min-height: 290px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 7px solid #10131a;
  border-radius: 24px;
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.mobile-og-preview::before,
.phone-preview::before {
  content: '';
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 50%;
  width: 34%;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(10, 12, 18, .92);
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.desktop-preview {
  min-height: 290px;
  aspect-ratio: 16 / 9;
}

.phone-preview {
  width: min(260px, 100%);
  margin: 0 auto;
  min-height: 290px;
  aspect-ratio: 9 / 16;
  border: 7px solid #10131a;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.mobile-preview-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.mobile-device-preview {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.phone-preview-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mobile-thumb-heading {
  width: min(260px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mobile-thumb-heading button {
  min-height: 34px;
  padding: 6px 10px;
}

.video-preview-config {
  display: grid;
  gap: 12px;
}

@media (max-width: 980px) {
  .mobile-preview-row {
    grid-template-columns: 1fr;
  }
}

.preview-bg,
.preview-shade {
  position: absolute;
  inset: 0;
}

.preview-bg {
  background:
    linear-gradient(135deg, #667eea, #111827),
    url("https://via.placeholder.com/1280x720/667eea/ffffff?text=Portafolio");
  background-size: cover;
  background-position: center;
}

.preview-shade {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.56));
}

.og-text {
  position: absolute;
  inset: auto 7% 12% 7%;
  color: white;
  font-size: 62px;
  font-weight: 800;
  line-height: 1.08;
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.55);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.og-text.og-text-mobile {
  inset: 7% 12% auto 12%;
  width: auto;
  min-height: 74%;
  transform: none;
  padding: 4% 2%;
  text-align: center;
  line-height: 1.08;
}

.og-text-typewriter-active::after {
  content: '';
  display: inline-block;
  width: 0.08em;
  height: 0.92em;
  margin-left: 0.08em;
  vertical-align: -0.08em;
  background: currentColor;
  animation: typewriterCaretBlink 0.72s steps(1, end) infinite;
}

@keyframes typewriterCaretBlink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

.desktop-copy,
.phone-copy {
  position: absolute;
  inset: auto 8% 9% 8%;
  color: white;
  display: grid;
  gap: 8px;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55);
}

.desktop-copy strong {
  font-size: clamp(24px, 3vw, 42px);
}

.desktop-copy p,
.phone-copy p {
  line-height: 1.35;
}

.phone-copy strong {
  font-size: 23px;
}

.phone-copy p,
.phone-copy span {
  font-size: 13px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat,
.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
}

.stat strong {
  display: block;
  font-size: 22px;
}

.list {
  display: grid;
  gap: 9px;
}

.item {
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.job-item {
  position: relative;
  overflow: hidden;
}

.job-item.is-queued,
.job-item.is-processing {
  border-color: rgba(102, 126, 234, 0.45);
  animation: jobProcessingGlow 2.2s ease-in-out infinite;
}

.job-item.is-processing .status-badge {
  animation: statusProcessingPulse 1.6s ease-in-out infinite;
}

.video-thumb-small {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #111827;
}

.item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-badge {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  color: white;
  background: var(--muted);
}

.status-badge.completed {
  background: var(--ok);
}

.status-badge.failed {
  background: var(--danger);
}

.status-badge.processing {
  background: #b45309;
}

.job-error {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
  border-left: 3px solid var(--danger);
  background: #fff1f2;
  color: #991b1b;
  padding: 8px 10px;
  border-radius: 6px;
  line-height: 1.35;
  word-break: break-word;
}

.copy-error-btn {
  width: 30px;
  min-height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border-color: #fecdd3;
  color: #991b1b;
  background: white;
  font-size: 17px;
  line-height: 1;
}

.copy-error-btn.copied {
  border-color: var(--ok);
  color: var(--ok);
}

.job-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.share-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.share-btn.whatsapp {
  border-color: #16a34a;
  background: #16a34a;
  color: white;
}

.share-btn.copied {
  border-color: var(--ok);
  color: var(--ok);
}

.retry-btn {
  min-height: 32px;
  padding: 6px 10px;
  border-color: var(--danger);
  color: var(--danger);
}

.retry-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

a {
  color: var(--accent);
}

.watch-body {
  background: #f7f7f8;
}

.watch-body.dark {
  --bg: #0f1115;
  --panel: #171a21;
  --text: #f4f6fb;
  --muted: #9ca3af;
  --line: #2a2f3a;
  --soft: #202633;
  color-scheme: dark;
  background: var(--bg);
}

.watch-body.theme-blue {
  --bg: #0d2440;
  --panel: #15365e;
  --text: #e7f0ff;
  --muted: #b4c8e8;
  --line: #2d5c91;
  --soft: #1b4775;
  --accent: #38bdf8;
  --accent-2: #60a5fa;
  color-scheme: dark;
  background: var(--bg);
}

.watch-body.theme-olive {
  --bg: #20270f;
  --panel: #303a18;
  --text: #f0f5dc;
  --muted: #c5d09a;
  --line: #56652a;
  --soft: #40511f;
  --accent: #bef264;
  --accent-2: #84cc16;
  color-scheme: dark;
  background: var(--bg);
}

.watch-body.theme-red {
  --bg: #331018;
  --panel: #4a1724;
  --text: #fff1f2;
  --muted: #efb4bd;
  --line: #7a2a3a;
  --soft: #5c1d2b;
  --accent: #fb7185;
  --accent-2: #f43f5e;
  color-scheme: dark;
  background: var(--bg);
}

.watch-body.theme-violet {
  --bg: #22133f;
  --panel: #34205c;
  --text: #f4edff;
  --muted: #d1b7f5;
  --line: #5a3a86;
  --soft: #44276f;
  --accent: #d8b4fe;
  --accent-2: #a855f7;
  color-scheme: dark;
  background: var(--bg);
}

.watch-body.theme-gray {
  --bg: #24272b;
  --panel: #343941;
  --text: #f3f4f6;
  --muted: #c2c8d1;
  --line: #565f6b;
  --soft: #464d57;
  --accent: #e5e7eb;
  --accent-2: #9ca3af;
  color-scheme: dark;
  background: var(--bg);
}

.watch-body.theme-turquoise {
  --bg: #0b2d2b;
  --panel: #10413d;
  --text: #e6fffb;
  --muted: #a7ddd6;
  --line: #24716a;
  --soft: #17554f;
  --accent: #5eead4;
  --accent-2: #14b8a6;
  color-scheme: dark;
  background: var(--bg);
}

.watch-body.dark button,
.watch-body.dark input,
.watch-body.dark .button-link,
.watch-body.dark .share-btn,
.watch-body.theme-blue button,
.watch-body.theme-blue input,
.watch-body.theme-blue .button-link,
.watch-body.theme-blue .share-btn,
.watch-body.theme-olive button,
.watch-body.theme-olive input,
.watch-body.theme-olive .button-link,
.watch-body.theme-olive .share-btn,
.watch-body.theme-red button,
.watch-body.theme-red input,
.watch-body.theme-red .button-link,
.watch-body.theme-red .share-btn,
.watch-body.theme-violet button,
.watch-body.theme-violet input,
.watch-body.theme-violet .button-link,
.watch-body.theme-violet .share-btn,
.watch-body.theme-gray button,
.watch-body.theme-gray input,
.watch-body.theme-gray .button-link,
.watch-body.theme-gray .share-btn,
.watch-body.theme-turquoise button,
.watch-body.theme-turquoise input,
.watch-body.theme-turquoise .button-link,
.watch-body.theme-turquoise .share-btn {
  background: #171a21;
  color: var(--text);
  border-color: var(--line);
}

.watch-body.dark .share-btn.whatsapp {
  background: rgba(34, 197, 94, 0.34);
  color: rgba(255, 255, 255, 0.88);
}

.watch-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 62px;
  display: grid;
  grid-template-columns: 44px 180px minmax(220px, 680px) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(12px);
}

.sidebar-toggle {
  width: 40px;
  min-height: 40px;
  padding: 8px;
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
  color: var(--text);
}

.sidebar-toggle:hover {
  background: var(--soft);
}

.sidebar-toggle svg {
  display: block;
  width: 100%;
  height: 100%;
  color: currentColor;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e11d48;
  color: white;
  font-weight: 800;
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding-left: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 999px 999px 0;
}

.search-box input:focus {
  outline: 0;
}

.watch-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 18px 18px 36px;
}

.watch-body.sidebar-open .watch-layout {
  grid-template-columns: 210px 1fr;
}

.watch-sidebar {
  position: sticky;
  top: 80px;
  display: none;
  gap: 4px;
  align-content: start;
  height: calc(100vh - 100px);
  padding-right: 8px;
}

.watch-body.sidebar-open .watch-sidebar {
  display: grid;
}

.watch-sidebar a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.watch-sidebar a.active,
.watch-sidebar a:hover {
  background: var(--soft);
}

.sidebar-music-menu { min-width: 0; }
.sidebar-music-menu summary { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 13px; border-radius: 8px; color: var(--muted); cursor: pointer; font-weight: 700; list-style: none; }
.sidebar-music-menu summary::-webkit-details-marker, .music-menu summary::-webkit-details-marker { display: none; }
.sidebar-music-menu summary:hover, .sidebar-music-menu[open] summary { background: var(--soft); color: var(--text); }
.sidebar-music-submenu { display: grid; gap: 2px; margin: 2px 0 5px 12px; padding-left: 8px; border-left: 1px solid var(--line); }
.watch-sidebar .sidebar-music-submenu a { min-height: 34px; padding: 0 9px; font-size: 13px; }

.watch-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.seo-video-article {
  display: none !important;
  gap: 12px;
  width: min(980px, 100%);
  margin: 0 auto 18px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.home-index-page .seo-video-article {
  display: none;
}

.seo-video-article h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.08;
}

.seo-video-article p {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.68;
}

.seo-video-article .seo-kicker {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seo-video-article .seo-summary {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

.seo-video-article .seo-keywords {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 821px) {
  .watch-body.home-index-page.home-layout-youtube3 .player-section,
  .watch-body.home-index-page.home-layout-compact4 .player-section,
  .watch-body.home-index-page.home-layout-editorial .player-section {
    display: none;
  }

  .watch-body.home-index-page.home-layout-youtube3 .youtube-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 18px;
  }

  .watch-body.home-index-page.home-layout-compact4 .youtube-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 14px;
  }

  .watch-body.home-index-page.home-layout-compact4 .video-card-body {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .watch-body.home-index-page.home-layout-compact4 .avatar {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .watch-body.home-index-page.home-layout-compact4 .video-card-body h2 {
    font-size: 14px;
  }

  .watch-body.home-index-page.home-layout-compact4 .video-card-body p {
    font-size: 12px;
  }

  .watch-body.home-index-page.home-layout-editorial .youtube-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: dense;
  }

  .watch-body.home-index-page.home-layout-editorial .youtube-card.editorial-featured {
    grid-column: span 2;
  }

  .watch-body.home-index-page.home-layout-editorial .youtube-card.editorial-featured .video-card-body h2 {
    font-size: 18px;
  }

  .watch-body.home-index-page.home-layout-editorial .youtube-card:not(.editorial-featured) .video-card-body {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .watch-body.home-index-page.home-layout-editorial .youtube-card:not(.editorial-featured) .avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .grid-ad-card {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 96px;
    display: block;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
  }
}

.player-section {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(300px, 410px);
  gap: 18px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: visible;
  border-radius: 8px;
  background: #050505;
  aspect-ratio: 16 / 9;
  margin-bottom: 78px;
}

.player-fullscreen-btn {
  position: absolute;
  z-index: 20;
  top: 12px;
  right: 12px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  display: none;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  color: #fff;
  background: rgba(5, 5, 5, 0.54);
  backdrop-filter: blur(8px);
}

.player-fullscreen-btn:not([hidden]) {
  display: grid;
}

.player-fullscreen-btn:hover,
.player-fullscreen-btn:focus-visible {
  background: rgba(22, 119, 255, 0.74);
  border-color: #fff;
  outline: 0;
}

.player-shell:fullscreen,
.player-shell:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  aspect-ratio: auto;
  overflow: hidden;
  border-radius: 0;
  background: #050505;
}

.player-shell:fullscreen video,
.player-shell:-webkit-full-screen video,
.player-shell:fullscreen .porta-stage,
.player-shell:-webkit-full-screen .porta-stage {
  width: 100%;
  height: 100%;
}

@media (max-width: 820px) {
  .player-fullscreen-btn {
    display: none !important;
  }

  .player-shell:fullscreen .player-fullscreen-btn:not([hidden]),
  .player-shell:-webkit-full-screen .player-fullscreen-btn:not([hidden]) {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    display: grid !important;
  }
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #050505;
}

.player-poster-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  background-color: #050505;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
}

.player-poster-overlay[hidden] {
  display: none;
}

.player-poster-typewriter {
  position: absolute;
  left: 7%;
  right: 7%;
  z-index: 6;
  color: white;
  font-weight: 800;
  line-height: 1.08;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.player-poster-typewriter[hidden] {
  display: none;
}

.player-poster-typewriter.is-typing::after {
  content: '';
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  margin-left: 0.08em;
  vertical-align: -0.08em;
  background: currentColor;
  animation: typewriterCaretBlink 0.72s steps(1, end) infinite;
}

.porta-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  overflow: hidden;
  background: #050505;
}

.porta-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: #050505;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  will-change: transform, background-position;
}

.porta-static-visual {
  z-index: 0;
  background-size: cover;
  background-position: center;
  transform: none !important;
  will-change: auto;
}

.porta-previous-visual {
  z-index: 1;
  opacity: 0;
}

.porta-stage > .porta-visual:not(.porta-static-visual):not(.porta-previous-visual) {
  z-index: 2;
}

.porta-pulse-visual {
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.porta-pulse-visual-b,
.porta-pulse-visual-c {
  z-index: 3;
}

.porta-color-fade {
  position: absolute;
  inset: 0;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
}

.player-shell.porta-player video {
  opacity: 0;
}

.player-shell.porta-player .porta-stage {
  display: block;
}

.fullscreen-toggle-btn:not([hidden]) {
  display: inline-grid;
}

.music-visualizer-canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.music-visualizer-canvas[hidden] {
  display: none;
}

.music-visualizer-picker {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 65;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 5px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(10, 12, 18, 0.66);
  backdrop-filter: blur(8px);
}

.music-visualizer-picker[hidden] {
  display: none;
}

.music-visualizer-picker button {
  display: inline-grid;
  width: 31px;
  min-width: 31px;
  min-height: 31px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1;
}

.music-visualizer-picker button.active {
  background: rgba(59, 130, 246, 0.88);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  color: #fff;
}

.player-text-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-items: end;
  overflow: hidden;
  pointer-events: none;
  padding: 8% 8% 9%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.28), transparent 46%);
}

.player-text-scroll {
  max-width: min(760px, 92%);
  color: white;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.72);
  transform: translateY(56%);
  will-change: transform;
}

.player-text-scroll strong {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(26px, 4vw, 54px);
  line-height: 1.05;
}

.player-text-scroll p {
  margin: 12px 0 0;
  color: white;
  font-size: clamp(16px, 2vw, 26px);
  line-height: 1.38;
  white-space: pre-line;
}

.player-shell.text-overlay-off .player-text-overlay {
  display: none;
}

.campaign-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  transform: translate(-50%, -50%);
  width: clamp(82px, 10vw, 112px);
  min-height: clamp(82px, 10vw, 112px);
  padding: 0;
  border-radius: 50%;
  border: 6px solid transparent;
  background:
    radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08) 31%, transparent 32%) padding-box,
    linear-gradient(180deg, #f6050d 0%, #d50007 47%, #960006 100%) padding-box,
    linear-gradient(135deg, #f3f4f6 0%, #a1a1aa 44%, #27272a 100%) border-box;
  color: white;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.48),
    inset 0 2px 0 rgba(255, 255, 255, 0.44),
    inset 0 -12px 24px rgba(78, 0, 0, 0.34);
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.campaign-play::before {
  content: "";
  position: absolute;
  inset: 10% 12% 48%;
  z-index: -1;
  border-radius: 999px 999px 48% 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.04));
  opacity: 0.72;
  transform: rotate(-4deg);
}

.campaign-play:hover,
.campaign-play:focus-visible {
  transform: translate(-50%, -50%) scale(1.045);
  filter: saturate(1.08);
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.52),
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -12px 24px rgba(78, 0, 0, 0.34);
}

.campaign-play:active {
  transform: translate(-50%, -50%) scale(0.98);
}

.campaign-play svg {
  width: 44%;
  height: 44%;
  transform: translateX(7%);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.18));
}

.campaign-play[hidden] {
  display: none;
}

.watch-body .campaign-play,
.watch-body.dark .campaign-play,
.watch-body.theme-blue .campaign-play,
.watch-body.theme-olive .campaign-play,
.watch-body.theme-red .campaign-play,
.watch-body.theme-violet .campaign-play,
.watch-body.theme-gray .campaign-play,
.watch-body.theme-turquoise .campaign-play,
.thumb-play-badge {
  border-color: transparent !important;
  background:
    radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08) 31%, transparent 32%) padding-box,
    linear-gradient(180deg, #f6050d 0%, #d50007 47%, #960006 100%) padding-box,
    linear-gradient(135deg, #f3f4f6 0%, #a1a1aa 44%, #27272a 100%) border-box !important;
  color: white !important;
}

.swipe-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.swipe-hint.show {
  opacity: 1;
  animation: swipePulse 1.4s ease-in-out infinite;
}

.swipe-hint strong {
  font-size: 13px;
}

.swipe-hint span {
  font-size: 20px;
  line-height: 1;
}

.player-meta {
  display: grid;
  gap: 16px;
  padding-top: 4px;
}

.player-meta h1 {
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.player-meta p {
  color: var(--muted);
  line-height: 1.4;
}

.watch-url-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.watch-url-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.watch-url-row input {
  min-height: 34px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

.player-actions {
  position: static;
  z-index: 25;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  pointer-events: auto;
}

.player-actions button,
.player-actions a,
.volume-control {
  position: relative;
  z-index: 26;
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-height: 40px;
  padding: 8px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(0, 0, 0, 0.24) !important;
  color: rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(8px);
  transition: opacity 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.player-actions svg {
  position: relative;
  z-index: 27;
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
  pointer-events: none;
}

.volume-control {
  position: relative;
  overflow: visible;
}

.volume-control button {
  width: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none;
}

.volume-control input {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: 96px;
  min-height: 26px;
  padding: 0;
  transform: translateX(-50%) rotate(-90deg);
  transform-origin: center;
  opacity: 0;
  pointer-events: none;
  accent-color: #e11d48;
  transition: opacity 0.16s ease;
}

.volume-control:hover input,
.volume-control:focus-within input {
  opacity: 1;
  pointer-events: auto;
}

.playlist-btn {
  min-width: 42px;
  font-size: 20px;
  line-height: 1;
}

.playlist-btn.active {
  border-color: rgba(251, 146, 60, 0.42) !important;
  background: rgba(251, 146, 60, 0.42) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.player-actions .playlist-btn {
  position: relative;
}

#captionsBtn.active {
  border-color: rgba(14, 165, 233, 0.42) !important;
  background: rgba(14, 165, 233, 0.58) !important;
  color: rgba(255, 255, 255, 0.95) !important;
}

.campaign-meta {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 4;
  display: grid;
  gap: 10px;
  padding: 56px 16px 14px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.28), transparent);
  color: white;
  opacity: 1;
  transition: opacity 0.22s ease;
}

.campaign-meta > div:first-child {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 12px);
  padding: 0 2px;
  color: var(--text);
}

.watch-body.player-playing:not(.player-controls-visible) .campaign-meta > div:first-child {
  opacity: 1;
  pointer-events: auto;
}

.player-progress-wrap {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 30px;
  padding-top: 16px;
}

.player-time-readout {
  position: absolute;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
}

.player-time-readout span:first-child {
  justify-self: start;
}

.player-time-readout strong {
  justify-self: center;
  color: white;
  font-weight: 800;
}

.player-time-readout span:last-child {
  justify-self: end;
}

.player-progress-tooltip {
  position: absolute;
  left: 0;
  bottom: 14px;
  z-index: 2;
  transform: translateX(-50%);
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.76);
  color: white;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.player-progress-wrap:hover .player-progress-tooltip {
  opacity: 1;
}

.player-progress {
  --progress: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  min-height: 14px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  accent-color: #e11d48;
  transition: height 0.14s ease, min-height 0.14s ease, opacity 0.14s ease;
  opacity: 0.7;
  box-shadow: none;
}

.watch-body .player-progress,
.watch-body.dark .player-progress,
.watch-body.theme-blue .player-progress,
.watch-body.theme-olive .player-progress,
.watch-body.theme-red .player-progress,
.watch-body.theme-violet .player-progress,
.watch-body.theme-gray .player-progress,
.watch-body.theme-turquoise .player-progress {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.player-progress:hover {
  opacity: 1;
}

.player-progress:focus,
.player-progress:focus-visible {
  outline: 0;
  border-color: transparent;
  box-shadow: none;
}

.player-progress::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: #e11d48;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  transition: transform 0.14s ease;
}

.player-progress:hover::-webkit-slider-thumb {
  transform: scale(1.65);
}

.player-progress::-webkit-slider-runnable-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(to right, rgba(225, 29, 72, 0.86) var(--progress), rgba(255, 255, 255, 0.24) var(--progress));
  box-shadow: none;
}

.player-progress::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #e11d48;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.14s ease;
}

.player-progress:hover::-moz-range-thumb {
  transform: scale(1.65);
}

.player-progress::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(to right, rgba(225, 29, 72, 0.86) var(--progress), rgba(255, 255, 255, 0.24) var(--progress));
  box-shadow: none;
}

.player-progress::-moz-focus-outer {
  border: 0;
}

.watch-body.player-playing:not(.player-controls-visible) .campaign-meta .player-progress-wrap,
.watch-body.player-playing:not(.player-controls-visible) .campaign-meta .player-actions {
  opacity: 0;
  pointer-events: none;
}

.watch-body.player-playing:not(.player-controls-visible) .campaign-play {
  opacity: 0;
  pointer-events: none;
}

.campaign-meta h1 {
  color: var(--text);
}

.campaign-meta p {
  color: var(--muted);
}

.share-btn.info {
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.86);
}

.share-btn.copy-failed {
  border-color: var(--danger);
  color: var(--danger);
}

.campaign-expiry {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.campaign-meta .campaign-expiry {
  color: rgba(255, 255, 255, 0.72);
}

.campaign-expiry a {
  color: white;
  text-decoration: none;
  font-weight: 800;
}

.campaign-expiry b {
  color: #e11d48;
}

.player-promo-banner {
  width: 100%;
  margin: 0px 0 8px;
  pointer-events: auto;
}

.player-promo-banner[hidden] {
  display: none !important;
}

.player-promo-banner:not([hidden]) {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.promo-banner-link {
  display: block;
  aspect-ratio: 1900 / 500;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.38);
  border-radius: 8px;
  background: #111827;
  color: white;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.promo-banner-link img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: inherit;
  object-fit: contain;
  background: #111827;
}

.promo-banner-link div {
  display: none;
}

.promo-banner-link small {
  display: block;
  margin-bottom: 3px;
  color: #fdba74;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.promo-banner-link strong {
  display: block;
  min-width: 0;
  color: white;
  font-size: 15px;
  line-height: 1.2;
}

.promo-banner-link p {
  margin: 0;
  color: #fed7aa;
  font-size: 13px;
}

.promo-banner-link span {
  display: none;
}

.player-promo-compact {
  position: absolute;
  right: 14px;
  bottom: 24px;
  z-index: 6;
  width: min(420px, 44%);
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.player-promo-compact[hidden] {
  display: none !important;
}

.player-promo-compact:not([hidden]) {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.promo-compact-link {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 70px;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 8px 11px;
  padding: 0px 8px;
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.38);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.92);
  color: white;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
}

.promo-compact-link img {
  width: 126px;
  height: 46px;
  border-radius: 6px;
  object-fit: contain;
  background: #111827;

  width: 240px;
  height: 70px;
}

.promo-compact-link div {
  min-width: 0;
}

.promo-compact-link small {
  display: block;
  color: #fdba74;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.promo-compact-link strong {
  overflow: hidden;
  color: white;
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-compact-link span {
  display: block;
  color: #fed7aa;
  font-size: 13px;
  font-weight: 800;
}

.player-actions .share-btn.whatsapp,
.player-actions .share-btn.info,
.player-actions .share-btn {
  background: rgba(0, 0, 0, 0.24) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.78) !important;
}

.player-actions .share-btn.whatsapp {
  background: rgba(34, 197, 94, 0.34) !important;
  border-color: rgba(187, 247, 208, 0.24) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.player-actions .portafolio-home {
  display: none;
  background: rgba(225, 29, 72, 0.48) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}

.suggested-videos {
  display: grid;
  gap: 10px;
  align-content: start;
}

.suggested-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  align-items: start;
}

.suggested-thumb {
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #111;
  aspect-ratio: 16 / 9;
}

.suggested-thumb img,
.suggested-thumb video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.suggested-thumb span {
  display: grid;
  place-items: center;
  height: 100%;
  color: white;
  font-size: 30px;
  font-weight: 900;
}

.suggested-thumb b {
  position: absolute;
  right: 6px;
  bottom: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.84);
  color: white;
  font-size: 11px;
}

.suggested-card h3 {
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.25;
}

.suggested-title-link {
  color: inherit;
  text-decoration: none;
}

.suggested-title-link:hover,
.suggested-title-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.suggested-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.watch-ad-section {
  width: 100%;
  min-height: 96px;
  display: block;
  overflow: hidden;
  margin: 4px 0 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.watch-ad-section > ins.adsbygoogle ~ ins.adsbygoogle,
.watch-ad-section > ins.adsbygoogle ~ iframe,
.watch-ad-section > iframe ~ iframe,
.watch-ad-section > [id^="google_ads_"]:not(:first-child),
.watch-ad-section > [id^="aswift_"]:not(:first-child) {
  display: none !important;
}

.watch-ad-section + ins.adsbygoogle,
.watch-ad-section + iframe,
.watch-ad-section + .adsbygoogle,
.watch-ad-section + .google-auto-placed {
  display: none !important;
}

.watch-main > ins.adsbygoogle,
.watch-main > iframe[id^="google_ads_iframe"],
.watch-main > [id^="aswift_"],
.watch-main > .google-auto-placed,
.watch-main > .adsbygoogle,
.watch-main > .watch-ad-section ~ .watch-ad-section {
  display: none !important;
}

.feed-toolbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.music-menu { position: relative; flex: 0 0 auto; z-index: 20; }
.music-menu[open] { z-index: 90; }
.music-menu summary { list-style: none; }
.music-menu summary span { margin-left: 4px; font-size: 11px; }
.music-menu[open] summary { border-color: var(--text); background: var(--soft); }
.music-submenu { position: absolute; top: calc(100% + 6px); left: 0; display: grid; min-width: 158px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25); }
.music-submenu a { padding: 8px 10px; border-radius: 4px; color: var(--text); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.music-submenu a:hover { background: var(--soft); }

@media (min-width: 821px) {
  .feed-toolbar { overflow: visible; }
}

.mobile-bottom-nav {
  display: none;
}

.player-ad-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: block;
  padding: 0;
  background: #050505;
  isolation: isolate;
}

.player-ad-overlay[hidden] {
  display: none;
}

.watch-body.player-playing .player-ad-overlay {
  display: none !important;
  pointer-events: none !important;
}

.watch-body.player-playing .player-shell ins.adsbygoogle,
.watch-body.player-playing .player-shell iframe[id^="google_ads_iframe"],
.watch-body.player-playing .player-shell [id^="aswift_"] {
  display: none !important;
  pointer-events: none !important;
}

.player-ad-box {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  overflow: hidden;
  padding: 0;
  border-radius: inherit;
  background: #050505;
  color: var(--text);
  box-shadow: none;
}

.player-ad-box span {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 100;
  max-width: calc(100% - 180px);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  pointer-events: none;
}

.player-ad-container,
.player-ad-container .adsbygoogle {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.player-ad-container {
  position: relative;
  z-index: 1;
  display: block;
  height: 100%;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.08), transparent 42%),
    #050505;
}

.player-ad-container::before {
  content: "Cargando anuncio...";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  z-index: 0;
}

.player-mobile-ad {
  width: min(336px, 100%) !important;
  height: 280px !important;
  min-height: 280px !important;
  margin: auto;
}

.player-ad-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.12), transparent 38%),
    linear-gradient(135deg, rgba(20, 20, 20, 0.98), rgba(0, 0, 0, 0.98));
}

.player-ad-placeholder strong {
  font-size: clamp(20px, 6vw, 34px);
  color: white;
}

.player-ad-placeholder span {
  font-size: 13px;
  font-weight: 800;
}

.player-ad-box button {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 101;
  min-width: 120px;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(0, 0, 0, 0.72);
  color: white;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
}

.player-ad-box button:disabled {
  opacity: 1;
  cursor: wait;
}

.publish-mode-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  min-height: 34px;
  padding: 7px 13px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.chip.active {
  background: var(--text);
  color: var(--panel);
  border-color: var(--text);
}

.youtube-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px 16px;
}

.youtube-card {
  position: relative;
  display: grid;
  gap: 10px;
}

.card-actions {
  position: relative;
  justify-self: end;
  align-self: start;
}

.card-menu-btn {
  position: relative;
  z-index: 8;
  width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 7px 0;
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.card-menu-btn:hover,
.card-menu-btn[aria-expanded="true"] {
  background: var(--soft);
  color: var(--text);
}

.card-menu-btn span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.card-share-menu {
  position: absolute;
  top: 38px;
  right: 0;
  z-index: 9;
  width: 170px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.card-share-menu.menu-up {
  top: auto;
  bottom: 38px;
}

.card-share-menu.menu-down {
  top: 38px;
  bottom: auto;
}

.card-share-menu[hidden] {
  display: none;
}

.card-share-menu button,
.card-share-menu a {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  background: transparent;
  border-color: transparent;
  text-align: left;
}

.card-share-menu button:hover,
.card-share-menu a:hover {
  background: var(--soft);
}

.menu-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-block;
  background-color: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.link-icon {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.9 12a5 5 0 0 1 5-5h4v2h-4a3 3 0 0 0 0 6h4v2h-4a5 5 0 0 1-5-5Zm6.1 1v-2h4v2h-4Zm1-6h4a5 5 0 0 1 0 10h-4v-2h4a3 3 0 0 0 0-6h-4V7Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.9 12a5 5 0 0 1 5-5h4v2h-4a3 3 0 0 0 0 6h4v2h-4a5 5 0 0 1-5-5Zm6.1 1v-2h4v2h-4Zm1-6h4a5 5 0 0 1 0 10h-4v-2h4a3 3 0 0 0 0-6h-4V7Z'/%3E%3C/svg%3E");
}

.text-icon {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 3h12v2H6V3Zm0 4h12v2H6V7Zm0 4h8v2H6v-2Zm0 4h12v2H6v-2Zm0 4h8v2H6v-2Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 3h12v2H6V3Zm0 4h12v2H6V7Zm0 4h8v2H6v-2Zm0 4h12v2H6v-2Zm0 4h8v2H6v-2Z'/%3E%3C/svg%3E");
}

.whatsapp-icon {
  background-color: #25d366;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.04 2a9.88 9.88 0 0 0-8.5 14.9L2.3 22l5.22-1.22A9.91 9.91 0 1 0 12.04 2Zm0 1.95a7.96 7.96 0 0 1 6.72 12.22 7.94 7.94 0 0 1-10.83 2.52l-.35-.2-2.56.6.6-2.5-.22-.37a7.92 7.92 0 0 1 6.64-12.27Zm-3.55 3.9c-.2 0-.53.07-.8.37-.28.3-1.05 1.02-1.05 2.5s1.07 2.9 1.22 3.1c.15.2 2.08 3.34 5.12 4.55 2.53 1 3.05.8 3.6.75.55-.05 1.76-.72 2-1.42.25-.7.25-1.3.18-1.42-.08-.13-.27-.2-.57-.35-.3-.15-1.76-.87-2.03-.97-.27-.1-.47-.15-.67.15-.2.3-.77.97-.95 1.17-.17.2-.35.22-.65.08-.3-.15-1.27-.47-2.42-1.5-.9-.8-1.5-1.78-1.67-2.08-.18-.3-.02-.47.13-.62.13-.13.3-.35.45-.52.15-.18.2-.3.3-.5.1-.2.05-.38-.03-.53-.07-.15-.67-1.62-.92-2.22-.24-.58-.48-.5-.67-.5h-.58Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.04 2a9.88 9.88 0 0 0-8.5 14.9L2.3 22l5.22-1.22A9.91 9.91 0 1 0 12.04 2Zm0 1.95a7.96 7.96 0 0 1 6.72 12.22 7.94 7.94 0 0 1-10.83 2.52l-.35-.2-2.56.6.6-2.5-.22-.37a7.92 7.92 0 0 1 6.64-12.27Zm-3.55 3.9c-.2 0-.53.07-.8.37-.28.3-1.05 1.02-1.05 2.5s1.07 2.9 1.22 3.1c.15.2 2.08 3.34 5.12 4.55 2.53 1 3.05.8 3.6.75.55-.05 1.76-.72 2-1.42.25-.7.25-1.3.18-1.42-.08-.13-.27-.2-.57-.35-.3-.15-1.76-.87-2.03-.97-.27-.1-.47-.15-.67.15-.2.3-.77.97-.95 1.17-.17.2-.35.22-.65.08-.3-.15-1.27-.47-2.42-1.5-.9-.8-1.5-1.78-1.67-2.08-.18-.3-.02-.47.13-.62.13-.13.3-.35.45-.52.15-.18.2-.3.3-.5.1-.2.05-.38-.03-.53-.07-.15-.67-1.62-.92-2.22-.24-.58-.48-.5-.67-.5h-.58Z'/%3E%3C/svg%3E");
}

.thumb-button {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #111;
  aspect-ratio: 16 / 9;
}

.thumb-button video,
.thumb-button img,
.empty-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.empty-thumb {
  display: grid;
  place-items: center;
  color: white;
  background: #111827;
}

.thumb-play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: none;
  width: 82px;
  height: 82px;
  transform: translate(-50%, -50%);
  border: 5px solid transparent;
  border-radius: 50%;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.44),
    inset 0 -12px 24px rgba(78, 0, 0, 0.34);
  isolation: isolate;
  overflow: hidden;
  pointer-events: none;
}

.thumb-play-badge::before {
  content: "";
  position: absolute;
  inset: 10% 12% 48%;
  z-index: -1;
  border-radius: 999px 999px 48% 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.04));
  opacity: 0.72;
  transform: rotate(-4deg);
}

.thumb-play-badge::after {
  content: "";
  position: absolute;
  left: 54%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 27px solid white;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.18));
}

.duration-pill {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.84);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.duration-pill.porta-pill {
  left: 7px;
  right: auto;
  background: rgba(37, 99, 235, 0.88);
}

.thumb-time-pill {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 4;
  display: none;
  min-height: 24px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.thumb-button:hover .thumb-time-pill,
.thumb-button:focus-visible .thumb-time-pill {
  display: inline-flex;
}

.thumb-button:hover .duration-pill,
.thumb-button:focus-visible .duration-pill {
  display: none;
}

.video-card-body {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e11d48;
  color: white;
  font-weight: 800;
}

.video-card-body h2 {
  font-size: 15px;
  line-height: 1.25;
  margin-bottom: 5px;
}

.video-title-link {
  color: inherit;
  text-decoration: none;
}

.video-title-link:hover,
.video-title-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-card-body p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.media-upload-grid {
  display: grid;
  gap: 10px;
}

.media-dropzone {
  min-height: 126px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border: 2px dashed #99f6e4;
  border-radius: 8px;
  background: #f0fdfa;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.media-dropzone:hover,
.media-dropzone.dragging {
  border-color: #0f766e;
  background: #ccfbf1;
  transform: translateY(-1px);
}

.media-dropzone span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.media-search-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.media-search-main input {
  min-height: 44px;
  font-size: 15px;
}

.media-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.media-quick-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-height: 86px;
  overflow: auto;
}

.media-quick-filters button {
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.media-quick-filters span {
  color: var(--muted);
  font-weight: 800;
}

.media-library-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.media-pagination {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.media-pagination .field {
  width: 128px;
}

.media-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.media-pagination-actions button {
  min-height: 34px;
  padding: 7px 10px;
}

.media-pagination-actions span {
  min-width: 92px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.media-pagination-bottom {
  justify-content: center;
  margin-top: 18px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.media-pagination-compact .field {
  width: 116px;
}

#mediaSearchBtn {
  border-color: #16a34a;
  background: #16a34a;
  color: white;
}

.media-semantic-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.media-semantic-tools button {
  width: 100%;
  min-height: 38px;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
  line-height: 1.15;
  white-space: normal;
}

.media-semantic-tools .field {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#semanticIntervalSeconds {
  width: 72px;
  min-width: 72px;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

#semanticSearchBtn {
  border-color: #f97316;
  background: #f97316;
  color: white;
}

#useVisibleMediaBtn {
  border-color: #f97316;
  background: #f97316;
  color: white;
}

#semanticTimelineBtn {
  border-color: #0d9488;
  background: #0d9488;
  color: white;
}

.semantic-missing-list {
  display: grid;
  gap: 6px;
}

.semantic-missing-item {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid #facc15;
  border-radius: 8px;
  background: #fefce8;
  color: #713f12;
  font-size: 12px;
  line-height: 1.35;
}

.semantic-missing-item strong,
.media-vector-score {
  font-weight: 900;
}

.media-vector-score {
  color: #0f766e;
}

.media-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: 560px;
  overflow: auto;
  padding-right: 2px;
}

.media-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcff;
}

.media-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: #111827;
}

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

.media-card-body {
  display: grid;
  gap: 6px;
}

.media-card-body input {
  min-height: 32px;
  padding: 7px 8px;
  font-size: 12px;
}

.media-card-body select {
  min-height: 32px;
  padding: 7px 8px;
  font-size: 12px;
}

.media-card-body small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.media-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.media-card-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.media-card-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.media-card-actions button {
  flex: 1;
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

.media-page-body {
  background: #f7f7f8;
  height: 100vh;
  overflow: hidden;
}

.media-page-body.dark {
  --bg: #0f1115;
  --panel: #171a21;
  --text: #f4f6fb;
  --muted: #9ca3af;
  --line: #2a2f3a;
  --soft: #202633;
  color-scheme: dark;
  background: var(--bg);
}

.media-page-body.dark button,
.media-page-body.dark input,
.media-page-body.dark textarea,
.media-page-body.dark select,
.media-page-body.dark .button-link {
  background: #171a21;
  color: var(--text);
  border-color: var(--line);
}

.media-page-layout {
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 18px 22px 36px;
  display: grid;
  grid-template-columns: minmax(720px, 1fr) minmax(300px, 365px);
  gap: 18px;
  align-items: stretch;
  height: calc(100vh - 64px);
  min-height: 0;
  overflow: hidden;
}

.media-page-main {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.media-page-layout .admin-side {
  position: static;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  align-content: start;
}

.media-size-control {
  min-width: 170px;
}

.media-page-grid {
  display: grid;
  gap: 12px;
  align-items: start;
}

.media-page-grid.thumb-micro {
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

.media-page-grid.thumb-mini {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.media-page-grid.thumb-medium {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.media-page-grid.thumb-large {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.media-page-grid.thumb-xlarge {
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
}

.media-page-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.media-page-card.selected {
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.13);
}

.media-select-check {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.media-select-check input {
  width: 17px;
  height: 17px;
}

.media-page-thumb {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111827;
}

.media-page-thumb img,
.pending-preview-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.media-page-dropzone {
  width: 50%;
  min-width: 180px;
  min-height: 80px;
}

.pending-upload-box.hidden {
  display: none;
}

.pending-upload-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.pending-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.pending-primary-actions {
  margin: 4px 0 8px;
}

.pending-primary-actions button {
  flex: 1;
}

.pending-preview-item {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.pending-preview-item img {
  aspect-ratio: 1;
  border-radius: 6px;
  background: #111827;
}

.media-page-body.dark .media-search-panel,
.media-page-body.dark .media-page-card,
.media-page-body.dark .media-dropzone {
  background: #111318;
}

.admin-body {
  background: #f7f7f8;
}

.admin-body.dark {
  --bg: #0f1115;
  --panel: #171a21;
  --text: #f4f6fb;
  --muted: #9ca3af;
  --line: #2a2f3a;
  --soft: #202633;
  color-scheme: dark;
  background: var(--bg);
}

.admin-body.dark button,
.admin-body.dark input,
.admin-body.dark textarea,
.admin-body.dark select,
.admin-body.dark .button-link {
  background: #171a21;
  color: var(--text);
  border-color: var(--line);
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  backdrop-filter: blur(12px);
}

.admin-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: var(--soft);
}

.admin-layout {
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 18px 22px 36px;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(360px, 480px);
  gap: 18px;
  align-items: start;
}

.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.admin-home-layout-card {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-home-layout-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-side {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 18px;
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.admin-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 170px 150px;
  gap: 10px;
}

.admin-video-list,
.admin-form,
.category-admin-list {
  display: grid;
  gap: 10px;
}

.bulk-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.bulk-actions select {
  width: auto;
  min-width: 180px;
}

.bulk-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-video-row {
  display: grid;
  grid-template-columns: 34px 132px minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.admin-select-box {
  display: grid;
  place-items: center;
}

.admin-select-box input {
  width: 18px;
  height: 18px;
}

.admin-video-row.selected {
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.admin-video-row.hidden-video-row {
  border-color: #e11d48;
  background: #fff1f2;
  box-shadow: inset 4px 0 0 #e11d48;
}

.admin-video-row:has(.pin-badge) {
  border-color: #f59e0b;
}

.admin-video-row.hidden-video-row:has(.pin-badge) {
  border-color: #e11d48;
}

.pin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f59e0b;
  color: #111827;
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
}

.hidden-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
}

.pin-btn.active {
  background: #f59e0b;
  border-color: #d97706;
  color: #111827;
}

.hide-video-btn.active {
  background: #e11d48;
  border-color: #be123c;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.16);
}

.admin-thumb {
  position: relative;
  width: 132px;
  min-height: 74px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: #111827;
  color: white;
}

.admin-thumb img {
  width: 100%;
  height: 74px;
  object-fit: cover;
  display: block;
}

.admin-thumb span {
  display: grid;
  place-items: center;
  min-height: 74px;
  font-size: 28px;
  font-weight: 800;
}

.admin-thumb.hidden-thumb img,
.admin-thumb.hidden-thumb span {
  opacity: 0.45;
  filter: grayscale(1);
}

.hidden-thumb-badge {
  position: absolute;
  left: 7px;
  top: 7px;
  z-index: 1;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.admin-video-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-video-info h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.admin-video-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-video-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.admin-video-info p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row-actions,
.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.danger-btn {
  border-color: #fecdd3;
  color: #991b1b;
  background: #fff1f2;
}

.category-admin-item {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.admin-body.dark .bulk-actions,
.admin-body.dark .admin-video-row,
.admin-body.dark .category-admin-item {
  background: #111318;
}

.admin-body.dark .admin-video-stats span {
  border-color: #1d4ed8;
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

.admin-body.dark .danger-btn {
  background: #2a1217;
  border-color: #7f1d1d;
  color: #fecdd3;
}

.category-admin-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .form-panel {
    grid-column: auto;
  }

  .watch-header {
    grid-template-columns: auto 1fr;
  }

  .watch-header .top-actions {
    grid-column: 1 / -1;
    justify-content: start;
  }

  .watch-layout,
  .player-section {
    grid-template-columns: 1fr;
  }

  .watch-sidebar {
    position: static;
    height: auto;
    grid-auto-flow: column;
    overflow-x: auto;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-side,
  .media-page-layout .admin-side {
    position: static;
  }

  .media-page-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .media-page-body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .media-page-main,
  .media-page-layout .admin-side {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 980px) {
  .agent-source-grid,
  .agent-workspace {
    grid-template-columns: 1fr;
  }

  .agent-url-field,
  .agent-angle-field {
    grid-column: auto;
  }

  .agent-side-panel {
    position: static;
  }

  .agent-actions,
  .agent-render-row {
    align-items: stretch;
  }

  .agent-actions button,
  .agent-render-row button,
  .agent-render-row .field {
    width: 100%;
  }
}

@media (max-width: 820px), (max-height: 520px) and (orientation: landscape) and (pointer: coarse) {
  .hero-inner,
  .section-heading.row {
    align-items: start;
    flex-direction: column;
  }

  .hero-actions {
    justify-items: start;
    min-width: 0;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .workspace,
  .grid-2,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .creator-watch-url-bar {
    grid-template-columns: 1fr auto;
  }

  .creator-watch-url-bar span {
    grid-column: 1 / -1;
  }

  .promotion-link-row {
    grid-template-columns: 1fr;
  }

  .standalone-phrases-editor .compact-heading {
    grid-template-columns: 1fr;
  }

  .timeline-preview-row {
    grid-template-columns: 1fr;
  }

  .timeline-left-rail {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .timeline-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-shortcuts div {
    min-width: 0;
  }

  .timeline-frame-preview {
    grid-column: 1;
    width: 100%;
    min-width: 0;
  }

  .timeline-preview-tools {
    grid-column: 1;
    position: static;
    transform: none;
    width: 100%;
    grid-template-columns: 110px 1fr;
    align-items: center;
  }

  .phone-preview {
    width: min(260px, 100%);
    margin: 0 auto;
  }

  .waveform-row {
    display: block;
  }

  .waveform-play {
    min-height: 40px;
  }

  .time-ruler {
    margin-left: 0;
  }

  .container {
    padding: 10px 0 14px;
  }

  .admin-header,
  .admin-layout {
    padding-left: 14px;
    padding-right: 14px;
  }

  .admin-header {
    grid-template-columns: 1fr;
  }

  .admin-nav,
  .admin-tools {
    overflow-x: auto;
  }

  .admin-tools,
  .admin-home-layout-controls,
  .admin-video-row {
    grid-template-columns: 1fr;
  }

  .bulk-actions,
  .bulk-actions select {
    width: 100%;
  }

  .media-filter-grid {
    grid-template-columns: 1fr;
  }

  .media-page-layout {
    padding-left: 14px;
    padding-right: 14px;
  }

  .media-page-grid.thumb-large,
  .media-page-grid.thumb-xlarge {
    grid-template-columns: 1fr;
  }

  .admin-thumb {
    width: 100%;
  }

  .admin-thumb img,
  .admin-thumb span {
    height: auto;
    min-height: 150px;
  }

  .watch-sidebar {
    display: none;
  }

  .watch-header {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    padding: 8px 10px;
  }

  .watch-header .sidebar-toggle {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    color: #eef6ff;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(96, 165, 250, 0.55);
  }

  .watch-header .sidebar-toggle svg {
    color: #eef6ff;
  }

  .watch-header .brand {
    min-width: 0;
    gap: 7px;
    flex: 0 0 auto;
  }

  .watch-header .brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .watch-header .brand strong {
    font-size: 18px;
    line-height: 1;
  }

  .watch-header .search-box {
    display: none;
  }

  .watch-header .top-actions {
    display: flex;
    margin-left: auto;
    justify-content: flex-end;
  }

  .watch-header #themeBtn,
  .watch-header #fullscreenBtn {
    width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(96, 165, 250, 0.45);
  }

  .watch-ad-section {
    min-height: 0;
    margin: 0;
    border-radius: 10px;
    background: transparent;
    overflow: visible;
  }

  .feed-toolbar {
    display: none;
  }

  .feed-toolbar::-webkit-scrollbar {
    display: none;
  }

  .feed-toolbar .chip {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 6px 9px;
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    background: #111827;
    color: #f7f7f7;
    font-size: 14px;
    font-weight: 800;
  }

  .feed-toolbar .chip.active {
    background: #f5f5f5;
    color: #111;
    border-color: #f5f5f5;
  }

  .youtube-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 116px 14px 88px;
    background: #050505;
  }

  .watch-ad-section + .youtube-grid {
    padding-top: 12px;
  }

  .youtube-card {
    min-width: 0;
    display: block;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #151515;
    box-shadow: none;
  }

  .youtube-card .thumb-button {
    width: 100%;
    min-height: 0;
    border-radius: 8px;
    border: 0;
    aspect-ratio: 2 / 3;
  }

  .youtube-card .thumb-button img,
  .youtube-card .thumb-button video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .youtube-card .thumb-play-badge {
    display: none;
  }

  .youtube-card .duration-pill,
  .youtube-card .thumb-time-pill {
    display: none;
  }

  .youtube-card .video-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 6px;
    align-items: end;
    padding: 34px 9px 10px;
    color: white;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.76), transparent);
  }

  .youtube-card .avatar,
  .youtube-card .video-card-body p {
    display: none;
  }

  .youtube-card .video-card-body h2 {
    margin: 0;
    color: white;
    font-size: clamp(15px, 4.2vw, 20px);
    line-height: 1.18;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.78);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .youtube-card .video-title-link {
    color: white;
    pointer-events: auto;
  }

  .youtube-card .card-actions {
    align-self: start;
    justify-self: end;
    pointer-events: auto;
  }

  .youtube-card .card-menu-btn {
    width: 28px;
    min-height: 28px;
    padding: 5px 0;
    color: white;
    background: rgba(0, 0, 0, 0.12);
  }

  .youtube-card .card-menu-btn span {
    width: 3px;
    height: 3px;
  }

  .youtube-card .card-share-menu {
    right: 0;
    bottom: 34px;
    top: auto;
    pointer-events: auto;
  }

  .watch-body {
    background: #050505;
  }

  .watch-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 8px;
    min-height: 56px;
    padding: 8px 10px;
    border-bottom: 0;
    background: #050505;
    backdrop-filter: none;
  }

  .watch-header .top-actions .button-link,
  .search-box {
    display: none;
  }

  .watch-header .brand {
    color: white;
  }

  .watch-header .brand strong {
    display: block;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 800;
  }

  .watch-header .top-actions {
    grid-column: 3;
    grid-row: 1;
    justify-content: end;
    align-self: center;
    align-items: center;
  }

  .watch-header #themeBtn {
    width: 40px;
    min-height: 40px;
    padding: 8px;
    border-radius: 999px;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.28);
    color: white;
    align-self: center;
  }

  .watch-layout {
    display: block;
    width: 100%;
    height: auto;
    padding: 0 0 24px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    min-height: 68px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 7px 10px max(7px, env(safe-area-inset-bottom));
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-bottom-nav a {
    min-width: 0;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    color: white;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
  }

  .mobile-bottom-nav span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 25px;
    line-height: 1;
  }

  .mobile-bottom-nav a:nth-child(3) span {
    width: 44px;
    height: 44px;
    margin-top: -8px;
    background: #222;
    font-size: 31px;
  }

  .mobile-bottom-nav b {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
  }

  .watch-body.sidebar-open .watch-layout {
    grid-template-columns: 1fr;
  }

  .watch-body.sidebar-open .watch-sidebar {
    position: fixed;
    top: 56px;
    left: 10px;
    z-index: 80;
    display: grid;
    grid-auto-flow: row;
    width: min(230px, calc(100vw - 20px));
    height: auto;
    max-height: calc(100dvh - 70px);
    padding: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel) 96%, transparent);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  }

  .watch-body.sidebar-open .watch-sidebar a {
    min-height: 40px;
  }

  .watch-main,
  .player-section {
    display: grid;
    width: 100%;
    height: auto;
    gap: 12px;
  }

  .player-section {
    display: none;
  }

  .watch-body.mobile-viewing {
    overflow: hidden;
  }

  .watch-body.mobile-viewing .youtube-grid {
    display: none;
  }

  .watch-body.mobile-viewing .watch-ad-section {
    display: none;
  }

  .watch-body.mobile-viewing .watch-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .watch-body.mobile-viewing .player-section {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    width: 100%;
    height: 100dvh;
    background: #050505;
  }

  .player-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    aspect-ratio: auto;
    touch-action: manipulation;
    overflow: hidden;
    margin-bottom: 0;
  }

  .watch-body.mobile-viewing .player-shell {
    position: absolute;
    inset: 0;
  }

  .player-ad-overlay {
    padding: 0;
  }

  .player-ad-box {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
  }

  .player-ad-box span {
    left: max(10px, env(safe-area-inset-left));
    top: max(10px, env(safe-area-inset-top));
    max-width: calc(100% - 150px);
    font-size: 11px;
  }

  .player-ad-box button {
    right: max(10px, env(safe-area-inset-right));
    top: max(10px, env(safe-area-inset-top));
    min-width: 118px;
  }

  .player-shell video {
    object-fit: cover;
  }

  .player-poster-overlay {
    background-size: cover;
  }

  .watch-body.mobile-viewing .porta-animated-phrase-overlay {
    z-index: 12;
    width: min(92vw, 860px);
    font-size: clamp(28px, 10.5vw, 62px);
    line-height: 0.98;
  }

  .watch-body.mobile-viewing .music-visualizer-picker {
    top: 70px;
  z-index: 72;
  transition: opacity 0.22s ease;
}

  .campaign-play {
    width: clamp(82px, 24vw, 104px);
    min-height: clamp(82px, 24vw, 104px);
    border-width: 5px;
  }

  .player-shell.swipe-up video,
  .player-shell.swipe-up .porta-stage,
  .player-shell.swipe-up .player-text-overlay,
  .player-shell.swipe-up .player-poster-overlay,
  .player-shell.swipe-up .player-poster-typewriter {
    animation: mobileSwipeUp 0.36s ease both;
  }

  .player-shell.swipe-down video,
  .player-shell.swipe-down .porta-stage,
  .player-shell.swipe-down .player-text-overlay,
  .player-shell.swipe-down .player-poster-overlay,
  .player-shell.swipe-down .player-poster-typewriter {
    animation: mobileSwipeDown 0.36s ease both;
  }

  .player-text-overlay {
    padding: 12% 5% 32%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.36), transparent 54%);
  }

  .player-text-scroll {
    max-width: 100%;
  }

  .player-text-scroll strong {
    font-size: 25px;
  }

  .player-text-scroll p {
    font-size: 15px;
    line-height: 1.35;
  }

  .campaign-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    overflow: visible;
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 42px 10px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.46), transparent);
    color: white;
    pointer-events: none;
  }

  .player-promo-banner {
    display: none !important;
  }

  .player-promo-compact {
    left: 10px;
    right: 62px;
    bottom: 48px;
    width: auto;
    z-index: 7;
    pointer-events: auto;
  }

  .promo-compact-link {
    grid-template-columns: min(189px, 58vw) minmax(0, 1fr);
    gap: 8px;
    min-height: 42px;
    padding: 7px 10px;
    background: rgba(0, 0, 0, 0.76);
  }

  .promo-compact-link img {
    width: min(189px, 58vw);
    height: 42px;
    object-fit: contain;
  }

  .promo-compact-link strong {
    font-size: 12px;
  }

  .player-progress-wrap,
  .player-progress {
    min-width: 0;
    max-width: 100%;
    pointer-events: auto;
  }

  .watch-body.dark .campaign-meta {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.5), transparent);
  }

  .campaign-meta h1 {
    color: white;
    font-size: 15px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .campaign-meta p {
    display: none;
  }

  .campaign-meta > div:first-child {
    position: static;
    padding: 0;
    color: white;
  }

  .watch-body.player-playing:not(.player-controls-visible) .campaign-meta .player-progress-wrap,
  .watch-body.player-playing:not(.player-controls-visible) .campaign-meta .player-actions {
    opacity: 0;
    pointer-events: none;
  }

  .watch-body.player-playing:not(.player-controls-visible) .music-visualizer-picker {
    opacity: 0;
    pointer-events: none;
  }

  .campaign-expiry {
    display: none;
  }

  .suggested-videos {
    display: none;
  }

  .watch-url-row {
    display: none;
  }

  .player-progress {
    display: block;
    width: 100%;
    height: 30px;
    min-height: 30px;
    padding: 0 2px;
    margin: 0;
    opacity: 1;
    touch-action: pan-x;
  }

  .player-progress-wrap {
    z-index: 6;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    overflow: hidden;
    min-height: 46px;
    padding: 16px 0 0;
  }

  .player-progress::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    margin-top: -7px;
  }

  .player-progress::-moz-range-thumb {
    width: 18px;
    height: 18px;
  }

  .player-actions {
    position: absolute;
    right: 10px;
    bottom: 88px;
    z-index: 90;
    width: 44px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    align-items: center;
    flex-wrap: nowrap;
    pointer-events: auto;
    overflow: visible;
  }

  .player-actions #playBtn {
    display: none;
  }

  .player-actions #previousBtn,
  .player-actions #nextBtn {
    display: inline-grid;
  }

  .player-actions button,
  .player-actions a,
  .volume-control {
    position: relative;
    z-index: 91;
    width: 42px;
    min-width: 42px;
    min-height: 38px;
    padding: 6px;
    border-radius: 999px;
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: rgba(0, 0, 0, 0.28) !important;
    color: rgba(255, 255, 255, 0.84) !important;
    font-size: 11px;
    text-align: center;
  }

  .player-actions button svg,
  .player-actions a svg {
    position: relative;
    z-index: 92;
    width: 22px;
    height: 22px;
  }

  .volume-control input {
    display: none;
  }

  .player-actions .share-btn.whatsapp,
  .player-actions .share-btn.info {
    background: rgba(0, 0, 0, 0.28) !important;
    color: rgba(255, 255, 255, 0.84) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
  }

  .player-actions .share-btn.whatsapp {
    background: rgba(34, 197, 94, 0.34) !important;
    border-color: rgba(187, 247, 208, 0.22) !important;
  }

  .player-actions .portafolio-home {
    display: inline-grid;
  }

  .player-actions .playlist-btn.active {
    background: rgba(251, 146, 60, 0.42) !important;
    border-color: rgba(251, 146, 60, 0.42) !important;
    color: rgba(255, 255, 255, 0.95) !important;
  }

  .player-actions #captionsBtn.active {
    background: rgba(14, 165, 233, 0.58) !important;
    border-color: rgba(14, 165, 233, 0.42) !important;
    color: rgba(255, 255, 255, 0.95) !important;
  }

  .player-actions .portafolio-home {
    display: inline-grid;
    background: rgba(225, 29, 72, 0.48) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.95) !important;
  }

  .campaign-play {
    z-index: 6;
    width: 82px;
    min-height: 82px;
    font-size: 13px;
  }
}

@keyframes mobileSwipeUp {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  55% {
    transform: translate3d(0, -22%, 0) scale(1.015);
    opacity: 0.55;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

@keyframes mobileSwipeDown {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  55% {
    transform: translate3d(0, 22%, 0) scale(1.015);
    opacity: 0.55;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

@keyframes swipePulse {
  0%, 100% {
    transform: translate(-50%, -54%);
  }
  50% {
    transform: translate(-50%, -46%);
  }
}

@keyframes jobProcessingGlow {
  0%, 100% {
    background: var(--panel);
    box-shadow: 0 0 0 rgba(102, 126, 234, 0);
  }
  50% {
    background: color-mix(in srgb, var(--accent) 12%, var(--panel));
    box-shadow: 0 0 24px rgba(102, 126, 234, 0.28);
  }
}

@keyframes statusProcessingPulse {
  0%, 100% {
    background: #b45309;
  }
  50% {
    background: #667eea;
  }
}

body.job-finished-flash::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: rgba(255, 255, 255, 0);
  animation: finishedFlash 0.65s ease-out;
}

@keyframes finishedFlash {
  0% {
    background: rgba(255, 255, 255, 0);
  }
  18% {
    background: rgba(255, 255, 255, 0.68);
  }
  100% {
    background: rgba(255, 255, 255, 0);
  }
}
/* Weather videos section */
.weather-body .watch-main {
  display: grid;
  gap: 18px;
}

.weather-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 2px 0;
}

.weather-heading span {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.weather-heading h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
}

.weather-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.weather-player-section {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.75fr);
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.weather-player-section[hidden] {
  display: none;
}

.weather-player-shell {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  background: #050505;
}

.weather-player-shell iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.weather-player-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.weather-player-meta h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.12;
}

.weather-player-meta p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.weather-player-meta .button-link {
  align-self: start;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 900;
  text-decoration: none;
}

.weather-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.weather-share-actions .button-link {
  position: relative;
  isolation: isolate;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.weather-share-actions svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.weather-share-actions .weather-3d-button {
  min-height: 46px;
  padding: 12px 18px;
  transform: translateY(0);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.16),
    0 10px 0 rgba(62, 73, 160, 0.45),
    0 18px 30px rgba(19, 28, 66, 0.22);
  overflow: hidden;
}

.weather-share-actions .weather-3d-button::after {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  z-index: -1;
  height: 48%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent);
  pointer-events: none;
}

.weather-share-actions .weather-3d-button:hover,
.weather-share-actions .weather-3d-button:focus-visible {
  transform: translateY(-3px);
  filter: saturate(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 13px 0 rgba(62, 73, 160, 0.45),
    0 24px 36px rgba(19, 28, 66, 0.26);
}

.weather-share-actions .weather-3d-button:active {
  transform: translateY(6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 4px 0 rgba(62, 73, 160, 0.42),
    0 10px 18px rgba(19, 28, 66, 0.2);
}

.weather-share-actions .whatsapp-link {
  background: linear-gradient(180deg, #28d366 0%, #18a84f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -2px 0 rgba(0, 0, 0, 0.16),
    0 10px 0 #0f7f3a,
    0 18px 30px rgba(10, 119, 58, 0.24);
}

.weather-share-actions .whatsapp-link:hover,
.weather-share-actions .whatsapp-link:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 13px 0 #0f7f3a,
    0 24px 36px rgba(10, 119, 58, 0.3);
}

.weather-share-actions .whatsapp-link:active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 4px 0 #0f7f3a,
    0 10px 18px rgba(10, 119, 58, 0.22);
}

.weather-grid-ad {
  min-height: 180px;
}

.usdebt-article {
  max-width: 980px;
  display: grid;
  gap: 18px;
  margin: 2px 0 40px;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.usdebt-article h2 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.08;
}

.usdebt-article p {
  max-width: 860px;
  margin: 0;
  color: var(--text);
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.72;
}

.usdebt-figure {
  width: 100%;
  max-width: none;
  margin: 4px 0 10px;
  overflow: hidden;
  border-radius: 12px;
  background: #050505;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.usdebt-figure img {
  width: 100%;
  display: block;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.usdebt-article-ad {
  width: 100%;
  min-height: 120px;
  display: block;
  overflow: hidden;
  margin: 2px 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.usdebt-article .usdebt-source-note {
  max-width: none;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 700;
}

.weather-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.weather-grid .weather-grid-ad {
  grid-column: 1 / -1;
}

.weather-youtube-btn {
  text-decoration: none;
}

@media (max-width: 760px) {
  .weather-body .watch-main {
    gap: 12px;
  }

  .weather-heading {
    padding: 12px 14px 0;
  }

  .weather-heading h1 {
    font-size: 30px;
  }

  .weather-body .watch-ad-section {
    margin: 0 14px;
  }

  .weather-player-section {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0 14px;
    padding: 10px;
    border-radius: 10px;
  }

  .weather-player-meta {
    justify-content: start;
  }

  .weather-player-meta h2 {
    font-size: 21px;
  }

  .weather-player-meta p {
    margin-bottom: 12px;
  }

  .weather-body .youtube-grid {
    padding-top: 8px;
  }

  .weather-grid-ad {
    grid-column: 1 / -1;
    min-height: 120px;
    border-radius: 8px;
  }

  .usdebt-article {
    margin: 0 14px 88px;
    padding: 18px;
    border-radius: 10px;
  }

  .usdebt-article h2 {
    font-size: 25px;
  }

  .usdebt-article p {
    font-size: 16px;
    line-height: 1.62;
  }

  .usdebt-figure {
    border-radius: 8px;
    margin: 0 0 6px;
  }

  .usdebt-figure img {
    aspect-ratio: 16 / 9;
  }

  .usdebt-article-ad {
    min-height: 90px;
    border-radius: 8px;
  }
}
