/* Views Styles: Dashboard, Crear, Proyectos, Biblioteca, Plantillas, Studio, CapCut Editor, Ajustes */

/* 1. Dashboard */
.hero-dash {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: radial-gradient(circle at 92% 12%, rgba(255, 213, 0, 0.16) 0%, rgba(255, 213, 0, 0) 46%), var(--panel);
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.art-wide {
  width: 136px;
  height: 82px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: linear-gradient(135deg, #252936, #141720);
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.art-arrow {
  color: var(--accent);
  display: flex;
  align-items: center;
}

.art-reels {
  display: flex;
  gap: 8px;
}

.art-reel {
  width: 44px;
  height: 78px;
  border-radius: 8px;
  border: 1px solid rgba(255, 213, 0, 0.45);
  background: linear-gradient(180deg, #212530, #12141B);
  padding: 5px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
}

.art-reel span {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: var(--accent);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}

.stat.featured {
  background: linear-gradient(145deg, rgba(255, 213, 0, 0.16), rgba(255, 213, 0, 0.04));
  border-color: rgba(255, 213, 0, 0.35);
}

.stat-label {
  font-size: 12.5px;
  color: var(--muted);
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.stat.featured .stat-num {
  color: var(--accent);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 960px) {
  .hero-dash { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}

/* 2. Projects Grid / List & Clip Cards */
.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 16px;
}

.pcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.pcard:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.pcard-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1F232C, #12141A);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pcard-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.plist {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.plist-row {
  display: grid;
  grid-template-columns: 2fr 1fr 0.8fr 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.plist-row:last-child {
  border-bottom: none;
}

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

.ccard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ccard-media {
  position: relative;
  background: #000;
  aspect-ratio: 9 / 16;
  max-height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ccard-media.r-1-1 { aspect-ratio: 1 / 1; }
.ccard-media.r-16-9 { aspect-ratio: 16 / 9; }

.ccard-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.score-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(9, 9, 11, 0.86);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* 3. Create View */
.create-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 20px;
  align-items: start;
}

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

.dropzone {
  border: 2px dashed var(--line-2);
  border-radius: var(--r-lg);
  padding: 38px 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.ratio-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ratio-card {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--r);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.ratio-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.ratio-box {
  border: 2px solid currentColor;
  border-radius: 3px;
}

.tpl-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.tpl-pill {
  padding: 9px 10px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
}

.tpl-pill.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* 4. Templates Catalog */
.tpl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tpl-card {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tpl-banner {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

/* 5. Subtitle Studio & Shared Phone Preview */
.studio-split {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 980px) {
  .studio-split { grid-template-columns: 1fr; }
}

.phone-stage {
  background: #060709;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 540px;
}

.preview-frame {
  position: relative;
  background: #0E1015;
  border-radius: 18px;
  border: 3px solid #262A34;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  user-select: none;
}

.preview-frame.ar-9-16 { width: 288px; height: 512px; }
.preview-frame.ar-1-1 { width: 380px; height: 380px; }
.preview-frame.ar-16-9 { width: 480px; height: 270px; }

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

.preview-fade-layer {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.sub-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sub-banner {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #111111;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.25;
  padding: 5px 11px;
  border-radius: 7px;
  max-width: 82%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.sub-block {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  text-align: center;
  line-height: 1.15;
  font-weight: 900;
  word-break: break-word;
}

.sub-block.anim-pop { animation: subPop 0.14s var(--ease); }
.sub-block.anim-fade { animation: subFade 0.16s var(--ease); }
.sub-block.anim-slide { animation: subSlide 0.16s var(--ease); }

@keyframes subPop {
  from { transform: translate(-50%, -50%) scale(0.88); }
  to { transform: translate(-50%, -50%) scale(1); }
}
@keyframes subFade {
  from { opacity: 0.25; }
  to { opacity: 1; }
}
@keyframes subSlide {
  from { opacity: 0.2; transform: translate(-50%, calc(-50% + 12px)); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.sub-word {
  display: inline-block;
  margin: 0 3px;
}

.custom-overlay-item {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  pointer-events: auto;
  cursor: move;
  border: 1px dashed rgba(255, 213, 0, 0.45);
}

/* 6. CapCut-Style Wide Editor */
.editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.editor-main-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.editor-main-grid.ed-main-default {
  grid-template-columns: 1.25fr 6px 0.75fr;
}

@media (max-width: 1120px) {
  .editor-main-grid,
  .editor-main-grid.ed-main-default {
    grid-template-columns: 1fr !important;
  }
  .ed-resizer {
    display: none;
  }
}

.timeline-dock {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
}

.tl-ruler {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  padding: 0 4px 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.tl-lanes {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  cursor: pointer;
}

.tl-lane {
  position: relative;
  height: 36px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
}

.tl-seg {
  height: 100%;
  border-radius: 5px;
  background: rgba(255, 213, 0, 0.14);
  border: 1px solid rgba(255, 213, 0, 0.45);
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
}

.tl-seg.selected {
  background: rgba(255, 213, 0, 0.28);
  border-color: var(--accent);
}

.tl-sub-pill {
  position: absolute;
  top: 5px;
  bottom: 5px;
  border-radius: 4px;
  background: rgba(110, 168, 254, 0.22);
  border: 1px solid rgba(110, 168, 254, 0.5);
  font-size: 10px;
  padding: 0 4px;
  overflow: hidden;
  white-space: nowrap;
  color: #D9E8FF;
  display: flex;
  align-items: center;
}

.tl-audio-wave {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: repeating-linear-gradient(
    90deg,
    rgba(61, 220, 151, 0.35) 0px,
    rgba(61, 220, 151, 0.35) 3px,
    transparent 3px,
    transparent 7px
  );
}

.tl-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #FFFFFF;
  box-shadow: 0 0 10px var(--accent);
  pointer-events: none;
  z-index: 5;
}

.word-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr auto;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.word-row.active {
  border-color: var(--accent);
}

/* 7. Toggle Switch, Hardware Cards, Settings Two-Column Rows, and Phone Template Cards */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #2C313B;
  cursor: pointer;
  transition: background 0.18s var(--ease);
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.18s var(--ease);
}

.switch input:checked + .switch-slider {
  background: var(--accent);
}

.switch input:checked + .switch-slider::before {
  background: #111111;
  transform: translateX(18px);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--bg);
  border: 1px solid var(--line);
}

.hw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hw-cell {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 12px;
}

.hw-cell-k {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hw-cell-v {
  font-size: 13px;
  font-weight: 700;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-phone-hero {
  height: 165px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.tpl-phone-mock {
  width: 82px;
  height: 134px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: rgba(11, 13, 18, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 8px 14px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

.tpl-phone-mock.square {
  width: 112px;
  height: 112px;
}

.preset-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.preset-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r);
  background: rgba(110, 168, 254, 0.08);
  border: 1px solid rgba(110, 168, 254, 0.25);
  color: var(--text-2);
  font-size: 12.5px;
}

.settings-row {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.settings-row:last-of-type {
  border-bottom: none;
}

@media (max-width: 900px) {
  .settings-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 3px;
  gap: 3px;
}

.seg-btn {
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  padding: 7px 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}

.seg-btn.active {
  background: var(--card-2);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.seg-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
}

/* 8. CapCut 4-Tab Editor Polish */
.ed-transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-top: 10px;
}

.play-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #111111;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 213, 0, 0.28);
}

.exact-pill {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ok);
  background: rgba(12, 14, 20, 0.88);
  border: 1px solid rgba(61, 220, 151, 0.4);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  pointer-events: none;
}

.ed-inspector {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 640px;
}

.ed-tab-bar {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 8px;
  gap: 2px;
  background: var(--bg);
  overflow-x: auto;
  scrollbar-width: none;
}

.ed-tab-btn {
  flex: 1 0 auto;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 11px 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.ed-tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.ed-tab-btn.active svg {
  color: var(--accent);
}

.ed-inspector-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.ed-sec-lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.color-preset-card {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--r);
  padding: 6px;
  text-align: center;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}

.color-preset-card.active {
  border-color: var(--accent);
  color: var(--text);
}

.color-swatch-bar {
  height: 28px;
  border-radius: 6px;
  margin-bottom: 5px;
}

.accordion-btn {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  margin-top: 8px;
  text-align: left;
}

.tl-filmstrip {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: repeating-linear-gradient(
    90deg,
    #1A1E28 0px,
    #1A1E28 48px,
    #12151C 48px,
    #12151C 50px
  );
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* 9. KLYPT-style Project Detail & Pipeline Bar */
.pdetail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 10px;
  cursor: pointer;
}
.pdetail-back:hover { color: var(--text); }

.pdetail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.pdetail-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.pdetail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pipe-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px 16px;
  margin-bottom: 22px;
  overflow: hidden;
}

.pipe-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pipe-steps {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.pipe-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--faint);
}

.pipe-step.done {
  color: var(--ok);
}

.pipe-step.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 213, 0, 0.32);
  border-radius: 999px;
  padding: 4px 12px;
}

.pipe-spinner {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  display: inline-block;
  animation: kspin 0.8s linear infinite;
}

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

.pipe-bar-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.pipe-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFB800, #FFD500);
  transition: width 0.35s var(--ease);
}

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

.skel-card {
  aspect-ratio: 9 / 15.5;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(100deg, #12151C 25%, #191D28 50%, #12151C 75%);
  background-size: 200% 100%;
  animation: kshimmer 1.6s infinite linear;
}

@keyframes kshimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.ccard-v2 {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ccard-v2-media {
  position: relative;
  background: #06070A;
  aspect-ratio: 9 / 16;
  max-height: 380px;
  overflow: hidden;
  cursor: pointer;
}

.ccard-v2-media.r-1-1 { aspect-ratio: 1 / 1; }
.ccard-v2-media.r-16-9 { aspect-ratio: 16 / 9; }

.ccard-v2-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ccard-score-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent);
  color: #111111;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

.ccard-play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #111111;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  z-index: 2;
  transition: transform 0.15s var(--ease), opacity 0.15s var(--ease);
}

.ccard-v2-media.playing .ccard-play-circle {
  opacity: 0;
  pointer-events: none;
}

.ccard-dur-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(9, 9, 11, 0.85);
  color: #FFFFFF;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

.dropdown-wrap {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.72);
  padding: 6px;
  z-index: 500;
}

.ed-resizer {
  width: 6px;
  cursor: col-resize;
  background: transparent;
  border-radius: 4px;
  transition: background 0.15s var(--ease);
}

.ed-resizer:hover {
  background: rgba(255, 213, 0, 0.45);
}

/* Create view: KLYPT dropzone badges, Font Picker & Step Strip */
.dropzone-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent);
  color: #111111;
  display: inline-grid;
  place-items: center;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(255, 213, 0, 0.28);
}

.fmt-chips {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 14px 0 10px;
}

.fmt-chip {
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.font-picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: #0B0C10;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s var(--ease);
}

.font-picker-trigger.open,
.font-picker-trigger:hover {
  border-color: var(--accent);
}

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

.font-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0B0C10;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.font-card:hover {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.03);
}

.font-card.active {
  border: 1.5px solid var(--accent);
  background: rgba(255, 213, 0, 0.04);
}

.font-card-sample {
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #FFFFFF;
}

.font-card-sample em {
  font-style: normal;
  color: var(--accent);
}

.font-card-name {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.create-steps-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12.5px;
  color: var(--text-2);
}

.create-step-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.create-step-item svg {
  color: var(--accent);
}

/* Reacciones con Webcam Studio */
.rx-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 1120px) {
  .rx-grid { grid-template-columns: 1fr; }
}

.rx-stage {
  min-height: 460px;
  padding: 12px;
  position: relative;
}

.rx-canvas {
  position: relative;
  overflow: hidden;
  background: #09090B;
}

.rx-canvas.ar-9-16 { width: 288px; height: 512px; }
.rx-canvas.ar-1-1 { width: 380px; height: 380px; max-width: 100%; }
.rx-canvas.ar-16-9 { width: 100%; max-width: 520px; height: auto; aspect-ratio: 16 / 9; }

.rx-src-vid,
.rx-cam-vid {
  position: absolute;
  display: block;
}

.rx-src-vid {
  background: #09090B;
  object-fit: contain;
}

.rx-cam-vid {
  background: #111318;
  object-fit: cover;
}

.rx-cam-empty {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: rgba(9, 9, 11, 0.84);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-2);
}

.rx-countdown {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 8;
  background: rgba(9, 9, 11, 0.68);
  place-items: center;
  font-size: 56px;
  font-weight: 900;
  color: var(--accent);
}

.rx-file-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--line-2);
  background: var(--bg);
}

.rx-grid .select {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rx-picker {
  position: relative;
  flex: 1;
  min-width: 0;
}

.rx-picker-trigger {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.rx-picker-trigger:hover {
  border-color: var(--line-2);
}

.rx-picker-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.78);
  padding: 8px;
  z-index: 500;
  max-width: 100%;
}

.rx-picker-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
}

.rx-picker-group {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 6px 2px;
}

.rx-picker-item {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  padding: 7px 9px;
  color: var(--text-2);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.rx-picker-item:hover,
.rx-picker-item.active {
  background: var(--card-2);
  color: var(--text);
}

.rx-picker-item-t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.rx-src-box,
.rx-cam-box {
  position: absolute;
  overflow: hidden;
}

.rx-cam-box.draggable {
  cursor: grab;
}

.rx-cam-box.dragging {
  cursor: grabbing;
  box-shadow: 0 0 0 3px rgba(255, 213, 0, 0.55);
}

.rx-src-vid,
.rx-cam-vid,
.rx-cam-native {
  width: 100%;
  height: 100%;
  display: block;
}

.rx-cam-vid,
.rx-cam-native {
  object-fit: cover;
}

.rx-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(235, 32, 54, 0.22);
  border: 1px solid rgba(255, 72, 92, 0.65);
  color: #FF7885;
  font-size: 11px;
  font-weight: 800;
}

.rx-overlay-item,
.rx-logo-box {
  position: absolute;
  transform: translate(-50%, -50%);
  user-select: none;
  cursor: grab;
  z-index: 7;
}

.rx-overlay-item.selected,
.rx-logo-box.selected {
  outline: 1.5px dashed var(--accent);
  outline-offset: 2px;
}

.rx-resize-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #111;
  cursor: nwse-resize;
}

.rx-subtabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}

.rx-sfx-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.rx-sfx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease), transform 0.1s var(--ease);
}

.rx-sfx-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.rx-sfx-card.playing {
  border-color: var(--accent);
  background: rgba(255, 213, 0, 0.22);
  transform: scale(0.97);
}

.rx-sfx-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 7px 26px 7px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  text-align: left;
  min-width: 0;
}

.rx-sfx-btn:hover {
  color: var(--text);
}

.rx-sfx-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 2px;
}

.rx-sfx-mini {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(9, 9, 11, 0.72);
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.rx-sfx-mini:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.rx-asset-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg);
}

.rx-asset-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: contain;
  background: repeating-conic-gradient(#1f222c 0% 25%, #15171e 0% 50%) 50% / 10px 10px;
  flex-shrink: 0;
}

.rx-bg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.rx-bg-swatch {
  padding: 8px 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.rx-bg-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

@media (max-width: 900px) {
  .ana-split,
  .usr-form-grid {
    grid-template-columns: 1fr !important;
  }
}
