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

:root {
  --bg: #0a0a0c;
  --bg-elevated: #111114;
  --bg-panel: #131316;
  --bg-hover: #1a1a1f;
  --surface: #16161a;
  --surface-2: #1c1c22;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.11);
  --text: #f0f0ee;
  --text-muted: #6b6b76;
  --accent: #e8e8ea;
  --accent-warm: #9a9590;
  --accent-dim: rgba(232, 232, 234, 0.06);
  --gold: #c4a35a;
  --gold-dim: rgba(196, 163, 90, 0.1);
  --gold-glow: rgba(196, 163, 90, 0.25);
  --copper: #c4a35a;
  --copper-dim: rgba(196, 163, 90, 0.1);
  --red: #c44;
  --red-dim: rgba(204, 68, 68, 0.12);
  --green: #5cb87a;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --nav-h: 56px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196, 163, 90, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 255, 255, 0.02), transparent);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 0.9375rem;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.oculto,
.input-oculto {
  display: none !important;
}

.noscript-seo {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1.5rem;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}

.noscript-seo h1 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.nav-logo-tag {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-glow);
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.15rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}

.nav-logo-icon,
.nav-logo-mark {
  color: var(--copper);
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.nav-logo-text em {
  display: none;
}

.nav-links {
  display: flex;
  gap: 0.35rem;
}

.nav-acciones {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo-text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.nav-share {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.nav-share:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--accent-dim);
}

.nav-link {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover,
.nav-link.activo {
  color: var(--text);
  background: var(--accent-dim);
}

.nav-link.activo {
  box-shadow: inset 0 -1px 0 var(--gold);
}

.nav-badge {
  background: var(--copper-dim);
  color: var(--copper);
  border: 1px solid rgba(176, 141, 87, 0.25);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  min-width: 1.25rem;
  text-align: center;
}

/* Hero */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem clamp(1rem, 4vw, 2.5rem) 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-etiqueta,
.seccion-etiqueta {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  color: var(--text-muted);
}

.hero-destacado {
  color: var(--accent);
  font-style: italic;
}

.hero-desc {
  margin-top: 1.15rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: 520px;
  line-height: 1.65;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--border-strong);
}

.stat {
  text-align: left;
}

.stat-num {
  display: block;
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
  font-weight: 500;
}

/* Workflow */
.workflow {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.workflow-paso {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.workflow-num {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.workflow-nombre {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.workflow-sep {
  width: 24px;
  height: 1px;
  background: var(--border-strong);
  flex-shrink: 0;
  margin: 0 0.35rem;
}

/* Layout */
.estudio {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 3rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  align-items: start;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.panel-cabecera {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.panel-num {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.85;
  padding-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.panel h2 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Visor cámara */
.visor {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-strong);
}

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

.visor-esquinas span {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(255, 255, 255, 0.5);
  border-style: solid;
  pointer-events: none;
}

.visor-esquinas span:nth-child(1) { top: 12px; left: 12px; border-width: 2px 0 0 2px; }
.visor-esquinas span:nth-child(2) { top: 12px; right: 12px; border-width: 2px 2px 0 0; }
.visor-esquinas span:nth-child(3) { bottom: 12px; left: 12px; border-width: 0 0 2px 2px; }
.visor-esquinas span:nth-child(4) { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; }

.visor-rec {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--red);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.rec-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulso 1.2s ease infinite;
}

@keyframes pulso {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.visor-flash {
  position: absolute;
  inset: 0;
  background: white;
  animation: flash 0.35s ease-out forwards;
  pointer-events: none;
}

@keyframes flash {
  from { opacity: 0.85; }
  to { opacity: 0; }
}

.visor-aviso {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.8);
  line-height: 1.6;
}

/* Captura */
.campo {
  margin-bottom: 1rem;
}

.campo label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.campo input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.campo input:focus {
  outline: none;
  border-color: rgba(201, 162, 39, 0.5);
  box-shadow: 0 0 0 3px var(--copper-dim);
}

.campo-ayuda {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

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

.duracion-control input[type="range"] {
  flex: 1;
  accent-color: var(--copper);
  height: 4px;
}

.duracion-control span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--copper);
  min-width: 2.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.captura-botones {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn-captura {
  position: relative;
  width: 72px;
  height: 72px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.btn-captura-anillo {
  position: absolute;
  inset: 0;
  border: 3px solid var(--text);
  border-radius: 50%;
  transition: border-color 0.2s, transform 0.15s;
}

.btn-captura::after {
  content: '';
  position: absolute;
  inset: 10px;
  background: var(--red);
  border-radius: 50%;
  transition: transform 0.15s, background 0.2s;
}

.btn-captura:hover .btn-captura-anillo {
  border-color: var(--accent);
}

.btn-captura:active::after {
  transform: scale(0.88);
}

.btn-importar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.btn-importar:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* Proyecto lateral */
.proyecto-meta {
  margin-bottom: 1rem;
}

.panel-musica {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.panel-musica-cabecera {
  margin-bottom: 0.75rem;
}

.panel-musica-cabecera h3 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.panel-musica-sub {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.musica-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.musica-fuentes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.btn-musica-subir,
.btn-musica-grabar {
  width: 100%;
  justify-content: center;
  gap: 0.45rem;
}

.musica-grabando {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: rgba(220, 76, 76, 0.08);
  border: 1px solid rgba(220, 76, 76, 0.25);
  border-radius: var(--radius-sm);
}

.musica-grabando-estado {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--text);
}

.musica-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e74c4c;
  animation: pulso 1.2s ease infinite;
  flex-shrink: 0;
}

.btn-musica-parar {
  flex-shrink: 0;
}

.musica-pendiente {
  padding: 0.65rem 0.75rem;
  background: var(--surface);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: var(--radius-sm);
}

.musica-pendiente-texto {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-musica-pegar {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--copper);
  border: 1px solid var(--copper);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.65rem;
  cursor: pointer;
}

.btn-musica-pegar:hover {
  filter: brightness(1.05);
}

.btn-musica-subir {
  width: 100%;
  justify-content: center;
  gap: 0.45rem;
}

.musica-info {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.musica-nombre {
  font-size: 0.84rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.musica-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-musica-preview,
.btn-musica-cambiar,
.btn-musica-quitar {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}

.btn-musica-preview {
  color: var(--copper);
  border-color: rgba(201, 162, 39, 0.35);
}

.btn-musica-preview:hover,
.btn-musica-cambiar:hover,
.btn-musica-quitar:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.panel-musica .campo-ayuda {
  margin-top: 0.6rem;
  margin-bottom: 0;
}

.proyecto-estado {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--copper);
  background: var(--copper-dim);
  border: 1px solid rgba(201, 162, 39, 0.25);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.estado-punto {
  width: 6px;
  height: 6px;
  background: var(--copper);
  border-radius: 50%;
  animation: pulso 1.5s ease infinite;
}

.proyecto-acciones {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.btn {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-ghost {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-primary {
  flex: 1.4;
  background: var(--gold);
  color: #0a0a0c;
  border: 1px solid var(--gold);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-danger {
  flex: 1 1 100%;
  margin-top: 0.25rem;
  background: transparent;
  border: 1px solid rgba(220, 76, 76, 0.35);
  color: #e88;
}

.btn-danger:hover {
  background: rgba(220, 76, 76, 0.1);
  border-color: var(--red);
  color: var(--red);
}

.btn-accent {
  padding: 0.45rem 0.85rem;
  background: var(--text);
  color: var(--bg);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--text);
}

.btn-share {
  padding: 0.45rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.btn-share:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--gold-glow);
  background: var(--gold-dim);
}

.btn-share:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-accent:hover:not(:disabled) {
  background: #fff;
}

.btn-accent:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-danger-outline {
  padding: 0.45rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(220, 76, 76, 0.3);
  color: #c99;
  font-size: 0.78rem;
}

.btn-danger-outline:hover {
  background: rgba(220, 76, 76, 0.08);
  border-color: var(--red);
  color: var(--red);
}

/* Timeline */
.timeline-seccion {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.timeline-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timeline-acciones {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-borrar-fotos {
  padding: 0.45rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(230, 57, 70, 0.45);
  color: #ff6b7a;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-borrar-fotos:hover {
  background: rgba(230, 57, 70, 0.12);
  border-color: var(--red);
  color: var(--red);
}

.timeline-cabecera h3 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.timeline-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.filmstrip-vacio {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.empty-icon {
  display: block;
  margin: 0 auto 0.75rem;
  opacity: 0.25;
  color: var(--text-muted);
}

.empty-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

.filmstrip-vacio-icon {
  display: none;
}

.filmstrip {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 10px 8px 14px;
  margin-bottom: 0.75rem;
  background:
    linear-gradient(180deg, var(--surface) 0%, var(--bg-elevated) 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 47px,
      rgba(255, 255, 255, 0.04) 47px,
      rgba(255, 255, 255, 0.04) 48px
    );
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
  position: relative;
}

.filmstrip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
  opacity: 0.5;
}

.filmstrip-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 44px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--border-strong);
  opacity: 0.9;
  cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.filmstrip-thumb:hover {
  border-color: var(--gold);
  opacity: 1;
  box-shadow: 0 0 0 1px var(--gold-glow);
}

.filmstrip-thumb.activo {
  border-color: var(--accent);
  opacity: 1;
}

.lista-fotos {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: min(50vh, 480px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.foto-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.foto-item:hover {
  border-color: var(--border-strong);
}

.foto-thumb {
  width: 52px;
  height: 34px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.foto-item-info {
  flex: 1;
  min-width: 0;
}

.foto-item-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--copper);
  letter-spacing: 0.05em;
}

.foto-item-texto {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foto-item-dur {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.foto-item-acciones {
  display: flex;
  gap: 0.2rem;
}

.btn-foto-accion {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.btn-foto-accion:hover:not(:disabled) {
  background: var(--copper-dim);
  color: var(--copper);
}

.btn-foto-accion.quitar {
  width: auto;
  padding: 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-foto-accion.quitar:hover:not(:disabled) {
  background: rgba(230, 57, 70, 0.15);
  color: var(--red);
}

.btn-foto-accion:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Biblioteca */
.biblioteca {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 4rem;
  border-top: 1px solid var(--border);
}

.biblioteca-cabecera h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.biblioteca-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 480px;
}

.biblioteca-vacio {
  margin-top: 2rem;
}

.biblioteca-vacio-inner {
  text-align: center;
  padding: 3.5rem 2rem;
  background: var(--bg-panel);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.biblioteca-vacio-icon {
  font-size: 2.5rem;
  opacity: 0.35;
  display: block;
  margin-bottom: 0.75rem;
}

.biblioteca-vacio p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.biblioteca-vacio-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.biblioteca-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.pelicula-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.pelicula-card:hover {
  transform: translateY(-4px);
  border-color: rgba(176, 141, 87, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.pelicula-card-portada {
  position: relative;
  aspect-ratio: 2.35 / 1;
  background: #000;
  overflow: hidden;
}

.pelicula-card-portada img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.pelicula-card:hover .pelicula-card-portada img {
  transform: scale(1.04);
}

.pelicula-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.pelicula-card:hover .pelicula-card-overlay {
  opacity: 1;
}

.btn-overlay-play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid white;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}

.btn-overlay-play:hover {
  transform: scale(1.08);
  background: var(--copper);
  border-color: var(--copper);
  color: #0a0800;
}

.sin-portada {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  color: var(--text-muted);
}

.pelicula-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: white;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
}

.pelicula-card-info {
  padding: 1rem 1.1rem 1.1rem;
}

.pelicula-card-info h3 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
}

.pelicula-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.pelicula-card-acciones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.btn-card-exportar {
  color: var(--text-muted);
  border-color: var(--border-strong);
}

.btn-card-exportar:hover {
  color: var(--gold);
  border-color: var(--gold-glow);
  background: var(--gold-dim);
}

.btn-card-ver {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0a0c;
}

.btn-card-ver:hover {
  filter: brightness(1.08);
}

.btn-card {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-card-abrir:hover {
  border-color: var(--gold-glow);
  color: var(--gold);
  background: var(--gold-dim);
}

.btn-card-borrar {
  flex: 1;
  border-color: rgba(230, 57, 70, 0.35);
  color: #ff6b7a;
}

.btn-card-borrar:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(230, 57, 70, 0.1);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 200;
  padding: 0.75rem 1.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: toastIn 0.35s ease;
}

.toast.exito {
  border-color: rgba(92, 184, 122, 0.4);
  color: var(--green);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Reproductor */
.reproductor {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #000;
  display: flex;
  flex-direction: column;
}

.reproductor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.8), transparent);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
}

.reproductor-titulo {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.btn-cerrar-rep {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.btn-cerrar-rep:hover {
  background: rgba(255,255,255,0.15);
}

.reproductor-escena {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.letterbox {
  background: #000;
  flex-shrink: 0;
}

.letterbox-top,
.letterbox-bottom {
  height: clamp(24px, 5vh, 60px);
}

.reproductor-marco {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.rep-imagen {
  max-width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  display: block;
}

.reproductor-marco.entrando .rep-imagen {
  animation: kenBurns 0.28s ease;
}

.reproductor-marco.transicion-rapida .rep-imagen {
  animation: kenBurns 0.2s ease;
}

@keyframes kenBurns {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

.rep-texto {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 2rem 1.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: white;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.8vw, 1.6rem);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
}

.reproductor-barra {
  padding: 1rem 1.5rem 1.5rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.95), transparent);
}

.reproductor-progreso {
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.reproductor-progreso-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--copper), var(--accent-warm));
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 999px;
}

.reproductor-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.reproductor-controles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-rep-velocidad {
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-rep-velocidad.activo {
  background: var(--copper-dim);
  border-color: rgba(201, 162, 39, 0.5);
  color: var(--copper);
}

.btn-rep-velocidad:hover {
  color: var(--text);
}

.btn-rep {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.btn-rep:hover {
  background: rgba(255,255,255,0.18);
}

.btn-rep-grande {
  width: 56px;
  height: 56px;
  background: white;
  color: #000;
}

.btn-rep-grande:hover {
  background: var(--copper);
}

.btn-rep-grande .icon-play.oculto,
.btn-rep-grande.pausado .icon-pausa {
  display: none;
}

.btn-rep-grande.pausado .icon-play {
  display: block !important;
}

.biblioteca-vacio-icon {
  display: none;
}

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 2rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.footer-marca {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.footer-titulo {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.footer-texto {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.site-footer kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.72rem;
  background: var(--bg-elevated);
  color: var(--accent-warm);
}

/* Responsive */
@media (max-width: 900px) {
  .estudio {
    grid-template-columns: 1fr;
  }

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

  .hero-stats {
    width: 100%;
    justify-content: flex-start;
  }

  .stat {
    text-align: left;
  }
}

@media (max-width: 540px) {
  .nav-link {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }

  .nav-share {
    padding: 0.4rem 0.55rem;
  }

  .nav-share-text {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .workflow {
    gap: 0.35rem;
  }

  .workflow-sep {
    width: 12px;
    margin: 0 0.15rem;
  }

  .captura-botones {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-captura {
    align-self: center;
  }

  .btn-importar {
    justify-content: center;
  }

  .proyecto-acciones {
    flex-direction: column;
  }
}
