/* =====================================================================
   REAL ENGLISH — estilo "sala de cine"
   negro calido, dorado de marquesina, titulos con serifa, grano de pelicula
   ===================================================================== */
:root {
  --bg: #0b0a09;
  --bg2: #110f0d;
  --panel: #161411;
  --panel2: #1e1b17;
  --line: #2c2721;
  --line2: #3a332b;
  --text: #f4eee4;
  --muted: #a1958a;
  --dim: #6f665c;
  --gold: #f2b544;
  --gold2: #ffd27a;
  --ember: #e5553b;
  --sky: #8ecbff;
  --good: #7fd49a;
  --warn: #f2b544;
  --bad: #ff6b57;
  /* nombres antiguos que usa el codigo */
  --accent: var(--gold);
  --accent2: var(--sky);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--text); font: 15px/1.55 var(--sans);
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(226, 170, 214, .07), transparent 70%),
    var(--bg);
  min-height: 100vh;
}
/* grano de pelicula muy suave */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(226, 170, 214, .35); }
.hidden { display: none !important; }
kbd { background: var(--panel2); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; font: 600 11px var(--sans); color: var(--text); }
.eyebrow { font: 700 11.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0; }

/* ---------------------------------------------------------- cabecera */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 22px;
  padding: 12px 32px; background: rgba(10, 8, 13, .78); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.logo { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.logo .reel {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background:
    radial-gradient(circle at 50% 50%, var(--bg) 0 3px, transparent 3.5px),
    radial-gradient(circle at 50% 22%, var(--bg) 0 3.2px, transparent 3.7px),
    radial-gradient(circle at 50% 78%, var(--bg) 0 3.2px, transparent 3.7px),
    radial-gradient(circle at 22% 50%, var(--bg) 0 3.2px, transparent 3.7px),
    radial-gradient(circle at 78% 50%, var(--bg) 0 3.2px, transparent 3.7px),
    var(--gold);
  box-shadow: 0 0 18px rgba(226, 170, 214, .45);
}
.logo .lr { font: 800 12px var(--sans); letter-spacing: .3em; color: var(--muted); }
.logo b { font: italic 600 23px/1 var(--serif); color: var(--text); letter-spacing: -.01em; }
.nav { display: flex; gap: 2px; }
.nav a {
  position: relative; padding: 8px 13px; border-radius: 99px; font-size: 13.5px; font-weight: 500; color: var(--muted);
  display: flex; align-items: center; gap: 6px; white-space: nowrap; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav a.on { color: var(--text); }
.nav a.on::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--gold); }
.pill { background: var(--ember); color: #fff; border-radius: 99px; font-size: 10.5px; font-weight: 800; padding: 0 6px; line-height: 17px; }
.pill.fire { background: var(--gold); color: #fff; }
.topsearch { margin-left: auto; flex: 0 1 340px; }
.topsearch input {
  width: 100%; padding: 9px 15px 9px 36px; border-radius: 99px; border: 1px solid var(--line); outline: none;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a1958a' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") 13px 50% no-repeat;
  transition: border-color .15s, background-color .15s;
}
.topsearch input:focus { border-color: var(--gold); background-color: var(--panel2); }

/* ---------------------------------------------------------- vistas */
.view { max-width: 1320px; margin: 0 auto; padding: 32px; }
.back { color: var(--muted); font-size: 13.5px; font-weight: 500; transition: color .15s; }
.back:hover { color: var(--gold); }
.ptitle { font: 600 34px/1.15 var(--serif); letter-spacing: -.01em; margin: 6px 0 20px; }
.sub { color: var(--muted); margin: -8px 0 22px; max-width: 760px; }
.msg { min-height: 22px; font-size: 14px; margin: 10px 0 0 !important; color: var(--muted); }
.msg.err { color: var(--bad); } .msg.ok { color: var(--good); }
.msg a { color: var(--gold) !important; text-decoration: underline; text-underline-offset: 3px; }
.empty { color: var(--muted); }

/* ---------------------------------------------------------- cartelera (inicio) */
.hero { position: relative; padding: 36px 0 18px; max-width: 900px; }
.hero h1 { font: 500 clamp(36px, 6vw, 66px)/1.02 var(--serif); letter-spacing: -.025em; margin: 14px 0 18px; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero > p:not(.eyebrow):not(.msg) { color: var(--muted); font-size: 17px; margin: 0 0 26px; max-width: 640px; }
.add { display: flex; gap: 10px; max-width: 820px; }
.add input {
  flex: 1; min-width: 0; padding: 15px 18px; border-radius: 14px; border: 1px solid var(--line); outline: none;
  background: var(--panel); transition: border-color .15s;
}
.add input:focus { border-color: var(--gold); }
.add button, .upload {
  padding: 0 22px; border-radius: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; display: flex; align-items: center;
}
.add button { border: 0; background: var(--gold); color: #fff; box-shadow: 0 8px 26px rgba(226, 170, 214, .22); transition: transform .12s, box-shadow .15s; }
.add button:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(226, 170, 214, .35); }
.upload { border: 1px solid var(--line2); background: transparent; color: var(--text); }
.upload:hover { border-color: var(--gold); }

.section { display: flex; align-items: center; gap: 16px; margin: 44px 0 18px; font: 700 12px var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.section::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }
.sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 30px; color: var(--muted); font-size: 13px; }
.sortbar button { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 6px 13px; cursor: pointer; font-size: 13px; color: var(--muted); transition: all .15s; }
.sortbar button:hover { color: var(--text); border-color: var(--line2); }
.sortbar button.on { border-color: var(--gold); color: var(--gold); background: rgba(226, 170, 214, .08); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.card {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--panel);
  border: 1px solid var(--line); transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .2s, box-shadow .25s;
}
.card:hover { transform: translateY(-5px); border-color: rgba(226, 170, 214, .55); box-shadow: var(--shadow), 0 0 0 1px rgba(226, 170, 214, .15); }
.card .thumb { aspect-ratio: 16/10; background: #000 center/cover; position: relative; transition: transform .5s; }
.card:hover .thumb { transform: scale(1.04); }
.card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 30%, transparent 45%, rgba(11,10,9,.95) 100%); }
.card .badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 2; flex-wrap: wrap; }
.badge { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(0, 0, 0, .62); backdrop-filter: blur(6px); letter-spacing: .02em; }
.badge.youtube { color: #ff8a80; } .badge.tiktok { color: #7ff3ff; } .badge.instagram { color: #ff9ee0; } .badge.archivo { color: var(--gold2); }
.badge.spd-Tranquilo { color: var(--good); } .badge.spd-Normal { color: var(--gold2); } .badge.spd-Rápido { color: var(--bad); }
.card .dur { position: absolute; right: 10px; top: 10px; z-index: 2; font-size: 11.5px; font-weight: 600; background: rgba(0, 0, 0, .62); padding: 2px 8px; border-radius: 99px; }
.card .body { position: relative; padding: 0 16px 15px; margin-top: -52px; z-index: 2; }
.card h3 { font: 600 18px/1.22 var(--serif); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.card .meta { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.card .state { font-size: 12.5px; margin-top: 8px; color: var(--gold); }
.card .state.err { color: var(--bad); }
.card .del, .card .retry { position: absolute; z-index: 3; top: 40px; right: 10px; border: 0; background: rgba(0, 0, 0, .7); border-radius: 99px; padding: 3px 9px; cursor: pointer; font-size: 11.5px; opacity: 0; transition: opacity .15s; }
.card:hover .del, .card:hover .retry, .card .retry { opacity: 1; }
.card .retry { right: 44px; color: var(--gold); }
.bar { height: 4px; background: var(--line); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); transition: width .4s; }

/* cola de la IA */
.queue { margin-top: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.qhead { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.qhead h2 { font: 600 19px var(--serif); margin: 0; }
.qhead span { color: var(--muted); font-size: 13px; }
#queueList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.qi { display: grid; grid-template-columns: 26px 92px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid transparent; }
.qi.working { border-color: rgba(226, 170, 214, .6); }
.qi.paused { opacity: .55; }
.qi .pos { color: var(--dim); font: 600 18px var(--serif); text-align: center; }
.qi .th { width: 92px; aspect-ratio: 16/9; border-radius: 8px; background: #000 center/cover; }
.qi .nm { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi .st { font-size: 12.5px; color: var(--muted); }
.qi.working .st { color: var(--gold); }
.qi .bar { margin-top: 6px; }
.qi .acts { display: flex; gap: 6px; }
.qi .acts button { border: 1px solid var(--line2); background: transparent; border-radius: 9px; padding: 5px 10px; cursor: pointer; font-size: 13px; }
.qi .acts button:hover { border-color: var(--gold); }
.qi .acts button.now { border-color: var(--gold); color: var(--gold); font-weight: 700; }
.qi .acts button:disabled { opacity: .3; cursor: default; }

/* ---------------------------------------------------------- REPRODUCTOR: la sala */
.view.cinema-view { max-width: none; padding: 0; }
.cinema { background: #000; padding-bottom: 6px; }
.stage {
  position: relative; background: #000; width: 100%; height: min(82vh, 56.25vw); min-height: 260px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer;
}
.stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.stage::after { /* vineta de sala */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 60%, rgba(0, 0, 0, .55) 100%);
}
.stage-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3; padding: 18px 32px 50px; cursor: default;
  background: linear-gradient(180deg, rgba(0, 0, 0, .78), transparent); transition: opacity .5s;
}
.stage.playing .stage-top { opacity: 0; }
.stage:hover .stage-top { opacity: 1; }
.stage-top .back { color: rgba(255, 255, 255, .75); }
.stitle { font: 500 clamp(19px, 2.4vw, 30px)/1.2 var(--serif); margin: 4px 0 0; max-width: 900px; text-shadow: 0 2px 16px #000; }
.bigplay {
  position: absolute; z-index: 3; width: 92px; height: 92px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .55);
  background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); font-size: 32px; padding-left: 7px; cursor: pointer;
  color: #fff; transition: transform .2s, background .2s, border-color .2s, opacity .3s;
}
.bigplay:hover { transform: scale(1.06); background: rgba(226, 170, 214, .9); border-color: var(--gold); color: #fff; }
.stage.playing .bigplay { opacity: 0; pointer-events: none; }

/* subtitulos de pelicula */
.subs {
  position: absolute; z-index: 4; left: 50%; bottom: 7%; transform: translate(-50%, 10px); width: min(92%, 1100px);
  text-align: center; pointer-events: none; opacity: 0; transition: opacity .25s, transform .25s;
}
.subs.on { opacity: 1; transform: translate(-50%, 0); }
/* estilo letras de Spotify: tipografia gruesa, palabras por cantar atenuadas, la actual brilla */
.subtext {
  display: inline-block; max-width: 100%; margin: 0; font: 800 clamp(20px, 2.6vw, 40px)/1.28 var(--sans); letter-spacing: -.022em; color: #fff;
  padding: .32em .7em .38em; border-radius: 18px; text-wrap: balance;
  background: linear-gradient(160deg, rgba(20, 20, 24, .62), rgba(8, 8, 10, .48));
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .07);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
.subtext:empty { display: none; }
.subtext .sw {
  display: inline-block; color: rgba(255, 255, 255, .38); transform-origin: 50% 70%;
  transition: color .22s ease, transform .22s cubic-bezier(.3, 1.6, .5, 1), text-shadow .22s ease;
}
.subtext .sw.said { color: #fff; }
.subtext .sw.now { color: #fff; transform: scale(1.06); text-shadow: 0 0 18px rgba(255, 255, 255, .55), 0 2px 10px rgba(0, 0, 0, .45); }
.subtext .sw.looping { color: var(--sky); }
.subtext .sw.looping.now { text-shadow: 0 0 18px rgba(142, 203, 255, .7); }
.subes {
  margin: 8px auto 0; max-width: 90%; font: 600 clamp(14px, 1.4vw, 20px)/1.35 var(--sans); letter-spacing: -.005em;
  color: rgba(255, 255, 255, .72); text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 14px rgba(0, 0, 0, .8);
}
.subs.es-off .subes { display: none; }
.stage.full .subs { bottom: 9%; }
.stage.full .subtext { font-size: clamp(26px, 3vw, 52px); }
.clipbar {
  position: absolute; z-index: 5; top: 18px; right: 22px; display: flex; align-items: center; gap: 8px; cursor: default;
  background: rgba(0, 0, 0, .7); border: 1px solid rgba(142, 203, 255, .6); color: var(--sky); padding: 7px 8px 7px 14px; border-radius: 99px; font-size: 13px;
}
.clipbar b { color: #fff; font-size: 15px; }
.clipbar button { border: 0; background: var(--sky); color: #001523; font-weight: 700; border-radius: 99px; padding: 4px 11px; cursor: pointer; font-size: 12px; }

/* consola de control */
.deck { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.scrub { position: relative; height: 22px; cursor: pointer; touch-action: none; }
.scrub::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 4px; background: #2a2521; }
.scrub-marks { position: absolute; left: 0; right: 0; top: 9px; height: 4px; }
.scrub-marks i { position: absolute; top: 0; height: 4px; background: #4a4239; border-radius: 1px; }
.scrub-marks i.cur { background: var(--sky); top: -2px; height: 8px; border-radius: 3px; }
.scrub-fill { position: absolute; left: 0; top: 9px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #b48be0, var(--gold)); pointer-events: none; mix-blend-mode: screen; }
.scrub-knob { position: absolute; top: 5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--gold2); box-shadow: 0 0 0 4px rgba(226, 170, 214, .2); pointer-events: none; transition: transform .15s; }
.scrub:hover .scrub-knob { transform: scale(1.3); }
.deck-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 4px 0 6px; }
.deck-left { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.time { font-variant-numeric: tabular-nums; }
.time b { color: var(--text); font-weight: 600; }
.pnum { color: var(--muted); font-size: 12.5px; }
.loopinfo { color: var(--sky); font-weight: 600; font-size: 12.5px; }
.deck-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.controls { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.controls button {
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 66px; padding: 7px 8px; border-radius: 12px;
  border: 0; background: transparent; cursor: pointer; font-size: 19px; color: var(--text); transition: background .15s, color .15s;
}
.controls button span { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.controls button:hover { background: rgba(255, 255, 255, .06); }
.controls .main {
  width: 58px; height: 58px; min-width: 0; border-radius: 50%; background: var(--gold); color: #fff; font-size: 22px;
  justify-content: center; margin: 0 6px; box-shadow: 0 8px 28px rgba(226, 170, 214, .3);
}
.controls .main:hover { background: var(--gold2); }
.controls .toggle.on { background: rgba(142, 203, 255, .12); }
.controls .toggle.on span { color: var(--sky); }
.controls .main.wide { width: auto; height: auto; border-radius: 12px; padding: 12px 22px; font-size: 15px; font-weight: 700; }
.speeds { display: flex; border: 1px solid var(--line2); border-radius: 99px; overflow: hidden; }
.speeds button { border: 0; background: transparent; padding: 5px 10px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); }
.speeds button.on { background: var(--gold); color: #fff; }
.iconbtn { border: 1px solid var(--line2); background: transparent; border-radius: 9px; height: 30px; min-width: 36px; padding: 0 8px; cursor: pointer; font-size: 13px; font-weight: 800; color: var(--text); }
.iconbtn:hover { border-color: var(--gold); }
.iconbtn.on { color: var(--dim); text-decoration: line-through; }
.options { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; font-size: 12.5px; color: var(--muted); padding: 2px 0 10px; }
.options label { display: flex; align-items: center; gap: 7px; }
.options select, .lvl select { background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 3px 7px; color: var(--text); }
.options input[type=checkbox] { accent-color: var(--gold); }

/* dictado */
.dictbox { max-width: 1000px; margin: 8px auto 4px; padding: 18px 22px; background: linear-gradient(180deg, #17140f, #12100d); border: 1px solid rgba(226, 170, 214, .35); border-radius: var(--radius); }
.dict-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; }
.dict-title { font: 600 19px var(--serif); }
.dict-title span { color: var(--muted); font: 500 13px var(--sans); }
.dict-help { color: var(--muted); font-size: 13px; }
.dictbox form { display: flex; gap: 8px; }
.dictbox input { flex: 1; min-width: 0; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line2); background: #0d0b09; font-size: 17px; outline: none; }
.dictbox input:focus { border-color: var(--gold); }
.dictbtn { border: 1px solid var(--line2); background: transparent; border-radius: 12px; padding: 0 14px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.dictbtn:hover, .dictbtn.on { border-color: var(--sky); color: var(--sky); }
.dictgo { border: 0; background: var(--gold); color: #fff; font-weight: 800; border-radius: 12px; padding: 0 18px; cursor: pointer; }
.dictres { margin-top: 12px; font-size: 19px; line-height: 1.6; }
.dictres:empty { display: none; }
.dictres .ok { color: var(--good); } .dictres .no { color: var(--bad); text-decoration: line-through; }
.dictres .fix { color: var(--gold); font-weight: 700; } .dictres .miss { color: var(--gold); border-bottom: 2px dashed var(--gold); }
.dictres .sc { font: 700 24px var(--serif); margin-right: 10px; }

/* ---------------------------------------------------------- estudio de la frase (debajo de la pantalla) */
.study { max-width: 1320px; margin: 0 auto; padding: 26px 32px 60px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; }
.phrase { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.phead { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.mini { border: 1px solid var(--line2); background: transparent; border-radius: 99px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--text); transition: border-color .15s, color .15s; }
.mini:hover { border-color: var(--gold); }
.mini:disabled { opacity: .35; cursor: default; }
.mini.on { color: var(--gold); border-color: var(--gold); }
.mini.tiny { padding: 1px 8px; font-size: 11px; margin-left: 4px; }
#bSave { margin-left: auto; }
.ptext { font: 500 clamp(22px, 2.3vw, 32px)/1.35 var(--serif); margin: 12px 0 10px; min-height: 36px; letter-spacing: -.005em; }
.ptext .w { transition: color .08s; color: var(--dim); cursor: pointer; border-radius: 5px; }
.ptext .w.said { color: var(--text); }
.ptext .w.now { color: var(--gold); }
.ptext .w:hover { text-decoration: underline dotted var(--gold); text-underline-offset: 5px; }
.ptext .w.looping { color: var(--sky) !important; background: rgba(142, 203, 255, .14); }
.ptext.static .w, .ptext.static { color: var(--text); }
.ptext.blur .w { filter: blur(8px); }
.ptext .hit, .plist .hit { color: var(--gold); }
.sounds, .es { margin: 0 0 10px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.sounds > span, .es > span { font: 700 10.5px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); min-width: 84px; }
.sounds b { color: var(--good); font-weight: 600; font-size: 17px; }
.es i { font: italic 400 17px var(--serif); color: #ece0f0; }
.es.off #pEs, .phrase.blurred .es #pEs, .phrase.blurred .sounds b, .phrase.blurred .tips { filter: blur(7px); }
.tips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tip { position: relative; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: 13px; max-width: 100%; }
.tip b { color: var(--text); }
.tip .k { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; margin-right: 6px; }
.tip .k.reduccion { color: var(--ember); } .tip .k.union, .tip .k.enlace { color: var(--sky); }
.tip .k.t { color: var(--gold); } .tip .k.h, .tip .k.forma { color: #c9a7ff; } .tip .k.consonante { color: var(--good); }
.tip small { display: block; color: var(--muted); margin-top: 3px; }
.tbtns { float: right; display: flex; gap: 4px; margin: -2px -4px 0 10px; }
.tplay { border: 1px solid var(--line2); background: var(--panel); border-radius: 8px; padding: 2px 8px; cursor: pointer; font-size: 12px; }
.tplay:hover { border-color: var(--gold); }
.tplay.on { background: rgba(142, 203, 255, .18); border-color: var(--sky); }

/* menu de palabra */
.wordpop { position: absolute; z-index: 10; background: #1d1624; border: 1px solid var(--line2); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 2px; min-width: 210px; box-shadow: var(--shadow); }
.wordpop .wp-h { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.wordpop .wp-h b { font: 600 20px var(--serif); color: var(--gold); }
.wordpop button { border: 0; background: transparent; text-align: left; padding: 8px 9px; border-radius: 9px; cursor: pointer; font-size: 13.5px; }
.wordpop button:hover { background: rgba(255, 255, 255, .05); }
.wordpop button.on { background: rgba(142, 203, 255, .15); color: var(--sky); }
.wordpop .wp-h button { padding: 2px 6px; color: var(--muted); }
.wp-es { padding: 8px 9px 3px; color: #ece0f0; font: italic 15px var(--serif); border-top: 1px solid var(--line); margin-top: 4px; }

/* grabarme y nota */
.rec { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.recbtn { border: 0; background: var(--ember); color: #fff; border-radius: 99px; padding: 9px 18px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(229, 85, 59, .3); }
.recbtn.on { background: #a32a17; animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(229, 85, 59, .22); } }
.recinfo { font-size: 13px; color: var(--muted); }
.lvl { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-left: auto; }
.recres { margin-top: 14px; background: var(--panel2); border-radius: 14px; padding: 16px 18px; }
.recres .sc { font: 700 34px var(--serif); margin-right: 12px; vertical-align: -4px; }
.recres .sc.good { color: var(--good); } .recres .sc.mid { color: var(--gold); } .recres .sc.bad { color: var(--bad); }
.parts { display: grid; gap: 7px; margin: 12px 0 10px; }
.part { display: grid; grid-template-columns: 110px 1fr 34px; gap: 3px 12px; align-items: center; font-size: 13px; }
.part .bar { margin: 0; height: 7px; }
.part .bar i.good { background: var(--good); } .part .bar i.mid { background: var(--gold); } .part .bar i.bad { background: var(--bad); }
.part small { grid-column: 2 / -1; margin: -2px 0 2px; color: var(--muted); }
.lks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lk { font-size: 12.5px; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line2); }
.lk.ok { color: var(--good); } .lk.no { color: var(--bad); }
.recres .ws { font: 500 20px var(--serif); margin: 8px 0; }
.recres .ws span { cursor: pointer; }
.recres .ws .ok { color: var(--good); } .recres .ws .meh { color: var(--gold); }
.recres .ws .bad { color: var(--bad); text-decoration: underline wavy; } .recres .ws .skip { color: var(--dim); }
.recres small { color: var(--muted); display: block; }
.pitch { margin: 12px 0 4px; background: var(--panel); border-radius: 12px; padding: 10px 12px 6px; }
.pitch .ph { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; gap: 6px; }
.pitch svg { width: 100%; height: 110px; display: block; }
.pitch .lg i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin: 0 4px 0 10px; }
.keys { color: var(--dim); font-size: 12px; margin: 18px 0 0; line-height: 2; }

/* guion (lista de frases) */
.right { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: 76px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; }
.listHead { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 12.5px; }
.listHead b { font: 600 18px var(--serif); color: var(--text); }
.plist { position: relative; list-style: none; margin: 0; padding: 8px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.plist li { padding: 9px 11px; border-radius: 10px; cursor: pointer; font-size: 14px; display: flex; gap: 12px; color: #cbbfd4; transition: background .12s; }
.plist li:hover { background: var(--panel2); }
.plist li.cur { background: rgba(226, 170, 214, .1); color: var(--text); box-shadow: inset 2px 0 0 var(--gold); }
.plist li .t { color: var(--dim); font-size: 11.5px; font-variant-numeric: tabular-nums; padding-top: 2px; min-width: 36px; }
.plist li .n { color: var(--sky); font-size: 10.5px; }
.plist li .src { display: block; color: var(--dim); font-size: 11.5px; margin-top: 2px; }
.pstatus { position: fixed; inset: auto 0 0 0; z-index: 40; text-align: center; padding: 13px; background: rgba(22, 20, 17, .95); border-top: 1px solid var(--line); color: var(--gold); }

/* ---------------------------------------------------------- buscador / repaso (reproductores pequenos) */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; }
.videoWrap { background: #000; border-radius: var(--radius); overflow: hidden; display: flex; justify-content: center; max-height: 60vh; box-shadow: var(--shadow); }
.videoWrap video { width: 100%; max-height: 60vh; display: block; }
.videoWrap.small, .videoWrap.small video { max-height: 40vh; }
#search .controls, #review .controls { margin: 14px 0 6px; }
#search .controls button, #review .controls button:not(.main) { border: 1px solid var(--line); }
#search .phrase, #review .phrase { margin-top: 12px; }
.bigsearch { margin: 16px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { border: 1px solid var(--line2); background: transparent; border-radius: 99px; padding: 6px 14px; cursor: pointer; font: italic 15px var(--serif); color: var(--text); transition: all .15s; }
.chip:hover { border-color: var(--gold); color: var(--gold); }

.rvcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; max-width: 820px; }
.rvtop { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.rvtop .pnum:first-child { color: var(--gold); font-weight: 700; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.grades button { border: 1px solid var(--line2); background: var(--panel2); border-radius: 12px; padding: 11px 4px; cursor: pointer; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .12s, border-color .15s; }
.grades button:hover { transform: translateY(-2px); border-color: currentColor; }
.grades small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.grades .g0 { color: var(--bad); } .grades .g1 { color: var(--gold); } .grades .g2 { color: var(--good); } .grades .g3 { color: var(--sky); }
#rvEs { margin-top: 4px; font: italic 17px var(--serif); color: #ece0f0; display: block; }
.rvdone { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; max-width: 820px; font: 18px/1.5 var(--serif); }
.savedlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 920px; }
.savedlist li { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.savedlist li .tx { flex: 1; min-width: 0; }
.savedlist li .tx small { display: block; color: var(--muted); font-size: 12px; }
.savedlist li .wd { color: var(--gold); font-weight: 700; }
.savedlist li button { border: 1px solid var(--line2); background: transparent; border-radius: 9px; padding: 4px 10px; cursor: pointer; }

/* ---------------------------------------------------------- progreso */
.pgcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.pgcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.pgcard:first-child { background: linear-gradient(160deg, rgba(226, 170, 214, .16), var(--panel) 70%); border-color: rgba(226, 170, 214, .35); }
.pgcard b { display: block; font: 600 32px/1.1 var(--serif); letter-spacing: -.01em; }
.pgcard span { color: var(--muted); font-size: 13px; }
.pgcard span a { color: var(--gold) !important; }
.pgbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 20px; }
.pgbox h2 { font: 600 20px var(--serif); margin: 0 0 14px; }
#pgChart svg { width: 100%; height: 170px; display: block; }
.sounds-list { display: flex; flex-direction: column; gap: 8px; }
.snd { display: grid; grid-template-columns: 170px 1fr 80px auto; gap: 14px; align-items: center; background: var(--panel2); border: 1px solid transparent; border-radius: 12px; padding: 11px 14px; }
.snd b { font: 600 16px var(--serif); } .snd small { display: block; color: var(--muted); font-size: 12px; }
.snd .bar { margin: 0; height: 8px; }
.snd .pct { font-weight: 700; text-align: right; font-size: 13.5px; }
.snd button { border: 1px solid var(--gold); color: var(--gold); background: transparent; border-radius: 99px; padding: 5px 13px; cursor: pointer; font-weight: 600; }
.snd button:hover { background: var(--gold); color: #fff; }
.snd.weak { border-color: rgba(255, 107, 87, .5); }

/* ---------------------------------------------------------- moviles y tablets */
@media (max-width: 1000px) {
  .study, .layout { grid-template-columns: 1fr; }
  .right { position: static; max-height: 380px; }
  .deck-row { grid-template-columns: 1fr; justify-items: center; gap: 8px; }
  .deck-left, .deck-right { justify-content: center; }
}
@media (max-width: 760px) {
  .top { gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
  .logo .lr { display: none; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .topsearch { flex: 1 1 140px; }
  .view { padding: 20px 16px; }
  .deck, .study { padding-left: 16px; padding-right: 16px; }
  .stage { height: 56.25vw; min-height: 210px; }
  .stage-top { padding: 10px 16px 34px; }
  .stitle { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stage.started .stitle { display: none; }
  .subtext { font-size: 17px; border-radius: 12px; }
  .subes { font-size: 13px; margin-top: 5px; }
  .bigplay { width: 64px; height: 64px; font-size: 22px; }
  .subs { bottom: 5%; }
  .add { flex-direction: column; } .add button, .upload { padding: 13px; justify-content: center; }
  .controls button { min-width: 52px; }
  .controls .main { width: 50px; height: 50px; }
  .dictbox { margin: 8px 16px; padding: 14px; }
  .dictbox form { flex-wrap: wrap; }
  .dictbox input { flex-basis: 100%; order: -1; }
  .qi { grid-template-columns: 22px minmax(0, 1fr); }
  .qi .th { display: none; }
  .qi .acts { grid-column: 1 / -1; justify-content: flex-end; }
  .snd { grid-template-columns: 1fr 70px; } .snd .bar { grid-column: 1 / -1; }
  .grades { grid-template-columns: repeat(2, 1fr); }
  .lvl { margin-left: 0; }
}

/* =====================================================================
   LANDING "CRISTOPHER ENGLISH" — negro profundo + oro champán
   ===================================================================== */
:root {
  --gold: #d9ae5f;
  --gold2: #f3d9a0;
  --gold3: #a9802f;
  --goldgrad: linear-gradient(120deg, #8a6424 0%, #d9ae5f 28%, #f7e2ad 50%, #d9ae5f 72%, #8a6424 100%);
  --ink: #070605;
  --glass: rgba(16, 12, 20, .58);
  --hair: rgba(226, 170, 214, .22);
  --ease: cubic-bezier(.22, .8, .2, 1);
}
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(226, 170, 214, .10), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(226, 170, 214, .07), transparent 60%),
    var(--ink);
}
/* foto de fondo fija en toda la app, muy apagada fuera de la portada */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 6, 11, .80), rgba(8, 6, 11, .94) 55%, var(--ink)),
    url("bg.jpg") center/cover no-repeat;
  filter: saturate(.85);
}
.top { background: rgba(8, 6, 11, .55); border-bottom: 1px solid var(--hair); }
.logo .lr { color: var(--gold2); opacity: .8; letter-spacing: .26em; font-size: 11px; }
.logo .reel { background-color: var(--gold); box-shadow: 0 0 22px rgba(226, 170, 214, .55); }
.nav a.on::after { background: var(--goldgrad); }
.topsearch input { background-color: rgba(16, 12, 20, .6); border-color: var(--hair); }

.view.landing { max-width: none; padding: 0; }

/* ---------- héroe */
.landing .hero {
  position: relative; max-width: none; min-height: min(88vh, 820px); padding: 0;
  display: flex; align-items: center; overflow: hidden; isolation: isolate;
}
.hero-bg {
  position: absolute; inset: -4%; z-index: -2;
  background: url("bg.jpg") center 40%/cover no-repeat;
  filter: saturate(.9) brightness(.85);
  animation: kenburns 28s ease-in-out infinite alternate;
}
.landing .hero::before { /* velo dorado + negro */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 60% at 70% 30%, rgba(226, 170, 214, .22), transparent 70%),
    linear-gradient(90deg, rgba(8, 6, 11, .94) 0%, rgba(8, 6, 11, .70) 42%, rgba(8, 6, 11, .25) 100%),
    linear-gradient(180deg, rgba(8, 6, 11, .35) 0%, transparent 35%, rgba(8, 6, 11, .65) 78%, var(--ink) 100%);
}
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.08) translate(-1.5%, -1%); } }
.hero-in { width: 100%; max-width: 1240px; margin: 0 auto; padding: 90px 40px 120px; }
.landing .eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--gold2); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(226, 170, 214, .18), 0 0 16px var(--gold); }
.landing .hero h1 {
  font: 400 clamp(44px, 7.4vw, 104px)/.98 var(--serif); letter-spacing: -.035em; margin: 22px 0 26px; max-width: 900px;
  color: #fbf5fb; text-shadow: 0 6px 40px rgba(0, 0, 0, .55);
}
.landing .hero h1 em {
  font-style: italic; font-weight: 500;
  background: var(--goldgrad); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s ease-in-out infinite; text-shadow: none;
}
@keyframes sheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.lede { color: rgba(244, 238, 228, .74); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.65; max-width: 560px; margin: 0 0 36px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-gold, .btn-ghost {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 28px; border-radius: 99px; font-weight: 700; font-size: 14.5px;
  letter-spacing: .02em; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s, border-color .35s, color .35s;
}
.btn-gold { color: #fff; background: var(--goldgrad); background-size: 200% 100%; box-shadow: 0 14px 40px rgba(226, 170, 214, .28), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn-gold:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 20px 50px rgba(226, 170, 214, .42), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-ghost { color: var(--gold2); border: 1px solid rgba(226, 170, 214, .45); background: rgba(8, 6, 11, .35); backdrop-filter: blur(10px); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--gold2); background: rgba(226, 170, 214, .12); }
.scrollhint { position: absolute; left: 50%; bottom: 30px; width: 24px; height: 38px; border: 1px solid rgba(240, 205, 232, .45); border-radius: 14px; transform: translateX(-50%); }
.scrollhint i { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--gold2); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- los 3 segmentos */
.segs {
  position: relative; z-index: 2; max-width: 1240px; margin: -64px auto 0; padding: 0 40px; scroll-margin-top: 80px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.seg {
  position: relative; text-align: left; cursor: pointer; padding: 26px 26px 24px; border-radius: 22px; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; column-gap: 12px;
  background: linear-gradient(160deg, rgba(28, 20, 34, .78), rgba(10, 8, 13, .82));
  border: 1px solid var(--hair); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s var(--ease), background .5s;
}
.seg::before { /* brillo que sigue al hover */
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .5s;
  background: radial-gradient(120% 90% at 0% 0%, rgba(226, 170, 214, .20), transparent 55%);
}
.seg::after { /* línea dorada inferior */
  content: ""; position: absolute; left: 26px; right: 26px; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--goldgrad); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.seg:hover { transform: translateY(-6px); border-color: rgba(226, 170, 214, .5); box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 40px rgba(226, 170, 214, .10); }
.seg:hover::before, .seg.on::before { opacity: 1; }
.seg.on { border-color: rgba(240, 205, 232, .65); background: linear-gradient(160deg, rgba(52, 34, 60, .85), rgba(12, 9, 16, .88)); }
.seg.on::after { transform: scaleX(1); }
.seg-n { grid-column: 1; font: italic 400 15px var(--serif); color: var(--gold); letter-spacing: .08em; }
.seg-c { grid-column: 2; grid-row: 1; justify-self: end; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--gold2);
  padding: 4px 11px; border-radius: 99px; border: 1px solid var(--hair); background: rgba(8, 6, 11, .5); }
.seg-t { grid-column: 1 / -1; position: relative; font: 500 clamp(21px, 2vw, 27px)/1.15 var(--serif); color: #fbf5fb; margin: 16px 0 6px; letter-spacing: -.01em; }
.seg.on .seg-t { background: var(--goldgrad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.seg-d { grid-column: 1 / -1; position: relative; font-size: 13.5px; color: var(--muted); }

/* ---------- panel de contenido */
.panel { max-width: 1240px; margin: 0 auto; padding: 70px 40px 10px; animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 30px;
  padding-bottom: 22px; border-bottom: 1px solid; border-image: linear-gradient(90deg, rgba(226, 170, 214, .45), rgba(226, 170, 214, .05)) 1; }
.panel-head h2 { font: 400 clamp(30px, 3.4vw, 46px)/1.05 var(--serif); letter-spacing: -.02em; margin: 10px 0 0; color: #fbf5fb; }
.landing .sortbar { margin: 0; }
.sortbar button { border-color: var(--hair); background: rgba(8, 6, 11, .4); backdrop-filter: blur(8px); }
.sortbar button.on { border-color: var(--gold); color: var(--gold2); background: rgba(226, 170, 214, .12); }

/* tarjetas de video */
.landing .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.landing .card {
  border-radius: 20px; background: linear-gradient(170deg, rgba(24, 18, 30, .9), rgba(10, 8, 13, .95)); border: 1px solid var(--hair);
  animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms);
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s var(--ease);
}
.landing .card:hover { transform: translateY(-8px); border-color: rgba(240, 205, 232, .6); box-shadow: 0 30px 60px rgba(0, 0, 0, .6), 0 0 50px rgba(226, 170, 214, .12); }
.landing .card .thumb { aspect-ratio: 16/10; transition: transform .9s var(--ease), filter .6s; filter: saturate(.9); }
.landing .card:hover .thumb { transform: scale(1.06); filter: saturate(1.05); }
.landing .card .thumb::after { background: linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, transparent 30%, transparent 40%, rgba(10, 8, 13, .97) 100%); }
.playico {
  position: absolute; z-index: 2; left: 50%; top: 44%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  display: grid; place-items: center; padding-left: 4px; font-size: 18px; color: #fff; background: var(--goldgrad);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 30px rgba(226, 170, 214, .4);
  opacity: 0; transform: scale(.7); transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.landing .card:hover .playico { opacity: 1; transform: scale(1); }
.landing .card h3 { font-size: 19px; font-weight: 500; }
.landing .card .meta { align-items: center; }
.mv { border: 1px solid var(--hair); background: rgba(8, 6, 11, .55); color: var(--gold2); border-radius: 99px; padding: 3px 10px; font-size: 11px; font-weight: 600;
  cursor: pointer; opacity: 0; transition: opacity .3s, border-color .3s, background .3s; }
.landing .card:hover .mv { opacity: 1; }
.mv:hover { border-color: var(--gold); background: rgba(226, 170, 214, .15); }
.badge.archivo { color: var(--gold2); }
.bar i { background: var(--goldgrad); }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 70px 20px; border-radius: 22px; border: 1px dashed rgba(226, 170, 214, .3); background: rgba(10, 8, 13, .5); }
.empty-state span { display: block; font-size: 26px; color: var(--gold); margin-bottom: 10px; }
.empty-state p { margin: 0; color: var(--muted); }
.empty-state b { color: var(--gold2); font-weight: 600; }

/* subir video */
.addbox { padding: 34px; border-radius: 24px; background: linear-gradient(160deg, rgba(28, 20, 34, .72), rgba(10, 8, 13, .82)); border: 1px solid var(--hair); backdrop-filter: blur(16px); }
.dest-l { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.dest { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; border: 1px solid var(--hair); background: rgba(8, 6, 11, .5); margin-bottom: 22px; flex-wrap: wrap; }
.dest button { border: 0; background: transparent; color: var(--muted); padding: 9px 18px; border-radius: 99px; cursor: pointer; font-size: 13.5px; font-weight: 600; transition: background .35s var(--ease), color .35s; }
.dest button.on { background: var(--goldgrad); color: #fff; box-shadow: 0 6px 20px rgba(226, 170, 214, .3); }
.landing .add { max-width: none; }
.landing .add input { background: rgba(8, 6, 11, .6); border-color: var(--hair); padding: 17px 20px; border-radius: 16px; }
.landing .add input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(226, 170, 214, .12); }
.landing .add button { background: var(--goldgrad); background-size: 200% 100%; color: #fff; border-radius: 16px; transition: background-position .5s, transform .3s var(--ease), box-shadow .3s; }
.landing .add button:hover { background-position: 100% 0; }
.landing .upload { border-color: rgba(226, 170, 214, .4); color: var(--gold2); border-radius: 16px; transition: border-color .3s, background .3s; }
.landing .upload:hover { border-color: var(--gold2); background: rgba(226, 170, 214, .1); }
.landing .msg a { color: var(--gold2) !important; }

.landing .queue { max-width: 1160px; margin: 50px auto 0; background: rgba(14, 10, 18, .75); border-color: var(--hair); backdrop-filter: blur(14px); }
.foot { max-width: 1240px; margin: 90px auto 0; padding: 26px 40px 40px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); border-top: 1px solid var(--hair); }
.foot span:first-child { font: italic 500 15px var(--serif); letter-spacing: .02em; text-transform: none; color: var(--gold); }

@media (max-width: 900px) {
  .segs { grid-template-columns: 1fr; margin-top: -40px; }
  .hero-in { padding: 70px 24px 100px; }
  .segs, .panel, .foot { padding-left: 20px; padding-right: 20px; }
  .landing .add { flex-wrap: wrap; }
  .landing .add input { flex-basis: 100%; }
  .landing .add button, .landing .upload { padding: 14px 20px; }
}
@media (hover: none) { .mv, .playico { opacity: 1; } .playico { transform: scale(.85); } }
@media (prefers-reduced-motion: reduce) { .hero-bg, .landing .hero h1 em, .scrollhint i { animation: none; } }
/* ajustes móviles */
html, body { overflow-x: clip; }
.topsearch { min-width: 0; }
.landing .grid { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.seg { min-width: 0; }
@media (max-width: 900px) {
  .segs { grid-template-columns: minmax(0, 1fr); }
  .scrollhint { display: none; }
  .landing .hero { min-height: 0; }
}
.scrollhint { bottom: 92px; }

/* =====================================================================
   PALETA PASTEL — rosado · lila · negro (minimalista, suave)
   ===================================================================== */
:root {
  --ink: #0b0910;
  --bg: #0b0910; --bg2: #110d16;
  --panel: #17121d; --panel2: #1f1826;
  --line: #2d2436; --line2: #3b2f47;
  --text: #f6f0f8; --muted: #a99db4; --dim: #6f6479;
  --gold: #eeb3d8;            /* acento principal: rosado pastel */
  --gold2: #f8d9ec;
  --gold3: #b9a0ee;
  --lilac: #c6b4f4;
  --violet: #a58be6;
  --sky: #c6b4f4;
  --good: #a5e3c0; --warn: #f3d29a; --bad: #ff9bb0; --ember: #ff9bb0;
  --goldgrad: linear-gradient(120deg, #a58be6 0%, #d3a9f0 30%, #f6c4e1 55%, #c6b4f4 82%, #a58be6 100%);
  --hair: rgba(226, 170, 214, .20);
  --glass: rgba(18, 13, 24, .62);
}
html { background: var(--ink); }
body { background: transparent; }
/* la foto cubre TODA la landing (fija detrás de todo) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(238, 179, 216, .16), transparent 70%),
    radial-gradient(55% 55% at 0% 100%, rgba(165, 139, 230, .18), transparent 70%),
    linear-gradient(180deg, rgba(11, 9, 16, .50) 0%, rgba(11, 9, 16, .68) 45%, rgba(11, 9, 16, .80) 100%),
    url("bg.jpg") center/cover no-repeat;
  filter: saturate(.75) hue-rotate(-8deg);
}
.hero-bg { display: none; }
.landing .hero { min-height: min(86vh, 800px); }
.landing .hero::before {
  background: linear-gradient(90deg, rgba(11, 9, 16, .72) 0%, rgba(11, 9, 16, .35) 50%, transparent 100%);
}
.top { background: rgba(11, 9, 16, .45); }
.logo .reel { background-color: var(--gold); box-shadow: 0 0 22px rgba(238, 179, 216, .5); }
.landing .hero h1 { color: #fbf5fb; }
.lede { color: rgba(246, 240, 248, .78); }
.btn-gold { box-shadow: 0 14px 40px rgba(198, 180, 244, .28), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold:hover { box-shadow: 0 20px 50px rgba(238, 179, 216, .4), inset 0 1px 0 rgba(255, 255, 255, .55); }
.eyebrow .dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(238, 179, 216, .18), 0 0 16px var(--gold); }
.seg { background: linear-gradient(160deg, rgba(30, 22, 38, .62), rgba(12, 9, 16, .70)); }
.seg.on { background: linear-gradient(160deg, rgba(70, 46, 82, .70), rgba(20, 14, 26, .78)); }
.seg::before { background: radial-gradient(120% 90% at 0% 0%, rgba(238, 179, 216, .18), transparent 55%); }
.seg-n { color: var(--lilac); }
.landing .card { background: linear-gradient(170deg, rgba(26, 19, 32, .82), rgba(12, 9, 16, .9)); }
.landing .card:hover { box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 50px rgba(198, 180, 244, .14); }
.playico { color: #fff; }
.queue, .pgbox, .rvcard { backdrop-filter: blur(14px); }

/* cabecera del panel */
.panel-sub { margin: 10px 0 0; color: var(--muted); max-width: 620px; font-size: 14.5px; }
.panel-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.addtoggle { border: 0; border-radius: 99px; padding: 8px 16px; font-weight: 700; font-size: 13px; cursor: pointer; color: #fff; background: var(--goldgrad); background-size: 200% 100%; transition: background-position .5s, transform .3s var(--ease); }
.addtoggle:hover { background-position: 100% 0; transform: translateY(-1px); }
.panel .addbox { margin: -8px 0 30px; padding: 22px; animation: rise .5s var(--ease) both; }

/* ---------------- Word by word */
.wb-modes { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; border: 1px solid var(--hair); background: rgba(11, 9, 16, .5); }
.wb-modes button { border: 0; background: transparent; color: var(--muted); padding: 9px 18px; border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 13.5px; transition: background .35s var(--ease), color .35s; }
.wb-modes button.on { background: var(--goldgrad); color: #fff; }
.wb { max-width: 760px; margin: 0 auto; }
.wb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.wb-stats div { text-align: center; padding: 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--hair); backdrop-filter: blur(12px); }
.wb-stats b { display: block; font: 500 30px/1.1 var(--serif); background: var(--goldgrad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wb-stats span { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.wb-card { position: relative; padding: 34px; border-radius: 28px; text-align: center; background: linear-gradient(160deg, rgba(34, 24, 44, .72), rgba(12, 9, 16, .82)); border: 1px solid var(--hair); backdrop-filter: blur(18px); box-shadow: 0 30px 70px rgba(0, 0, 0, .45); }
.wb-play { width: 104px; height: 104px; border-radius: 50%; border: 0; cursor: pointer; font-size: 34px; color: #fff; padding-left: 8px; background: var(--goldgrad); background-size: 200% 100%;
  box-shadow: 0 0 0 10px rgba(238, 179, 216, .08), 0 18px 50px rgba(198, 180, 244, .35); transition: transform .4s var(--ease), box-shadow .4s, background-position .6s; }
.wb-play:hover { transform: scale(1.05); background-position: 100% 0; }
.wb-play.on { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 18px rgba(238, 179, 216, .12), 0 18px 50px rgba(198, 180, 244, .45); } }
/* personita con micrófono */
.wb-speaker { position: relative; display: block; margin: -8px auto 0; width: 200px; height: 200px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wb-speaker::before { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: radial-gradient(circle, rgba(227, 36, 63, .22), rgba(143, 60, 224, .08) 60%, transparent 72%); transition: transform .4s var(--ease); }
.wb-speaker svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.wb-speaker:hover::before { transform: scale(1.08); }
.wb-speaker:focus-visible { outline: 2px solid var(--lilac); outline-offset: 4px; border-radius: 24px; }
.spk-badge { position: absolute; right: 26px; bottom: 26px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; padding-left: 3px; font-size: 15px; color: #fff; background: var(--goldgrad); box-shadow: 0 6px 18px rgba(143, 60, 224, .45); transition: transform .3s var(--ease), opacity .3s; }
.wb-speaker:hover .spk-badge { transform: scale(1.12); }
.wb-speaker.talking .spk-badge { opacity: 0; transform: scale(.6); }
.wb-hint { margin: 2px 0 18px; font-size: 13px; color: var(--muted); }
.spk-body { transform-origin: 100px 200px; animation: spk-idle 3.2s ease-in-out infinite; }
.spk-head { transform-origin: 100px 120px; }
.spk-eyes { transform-origin: 100px 84px; animation: spk-blink 4.5s infinite; }
.spk-mouth { transform-origin: 100px 106px; transform: scaleY(0); }
.spk-waves path { opacity: 0; }
.wb-speaker.talking .spk-smile { opacity: 0; }
.wb-speaker.talking .spk-mouth { animation: spk-talk .26s ease-in-out infinite alternate; }
.wb-speaker.talking .spk-head { animation: spk-nod .5s ease-in-out infinite alternate; }
.wb-speaker.talking .spk-waves path { animation: spk-wave 1s ease-out infinite; }
.wb-speaker.talking .spk-waves .w2 { animation-delay: .18s; }
.wb-speaker.talking .spk-waves .w3 { animation-delay: .36s; }
@keyframes spk-idle { 50% { transform: translateY(-3px); } }
@keyframes spk-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes spk-talk { 0% { transform: scaleY(.25); } 40% { transform: scaleY(1); } 70% { transform: scaleY(.55); } 100% { transform: scaleY(.9); } }
@keyframes spk-nod { from { transform: rotate(-2deg); } to { transform: rotate(2deg) translateY(1px); } }
@keyframes spk-wave { 0% { opacity: 0; transform: translateX(-4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .spk-body, .spk-eyes, .wb-speaker.talking .spk-head { animation: none; } }
.wb-side { display: flex; justify-content: center; gap: 8px; margin: 18px 0 20px; flex-wrap: wrap; }
.chip { border: 1px solid var(--hair); background: rgba(11, 9, 16, .5); color: var(--gold2); border-radius: 99px; padding: 7px 15px; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .3s, background .3s; }
.chip:hover { border-color: var(--gold); } .chip.on { background: rgba(198, 180, 244, .2); border-color: var(--lilac); }
.chip.strong { background: var(--goldgrad); color: #fff; border: 0; }
.chip:disabled { opacity: .35; cursor: default; }
.wb-form { display: flex; gap: 10px; }
.wb-form input { flex: 1; min-width: 0; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--hair); background: rgba(11, 9, 16, .6); outline: none; font-size: 17px; text-align: center; }
.wb-form input:focus { border-color: var(--lilac); box-shadow: 0 0 0 4px rgba(198, 180, 244, .14); }
.wb-form button { border: 0; border-radius: 16px; padding: 0 22px; font-weight: 700; cursor: pointer; color: #fff; background: var(--goldgrad); }
.wb-res { min-height: 74px; margin: 18px 0 8px; }
.wbr { font-size: 17px; } .wbr b { font: 500 22px var(--serif); margin-left: 6px; }
.wbr.ok { color: var(--good); } .wbr.no { color: var(--bad); } .wbr.no b { color: var(--gold2); }
.wbctx { margin: 8px 0 2px; color: var(--muted); font-size: 14px; } .wbctx b { color: var(--gold2); }
.wb-actions { display: flex; justify-content: center; gap: 10px; }
.wb-empty { text-align: center; color: var(--muted); padding: 50px 20px; border: 1px dashed var(--hair); border-radius: 22px; background: var(--glass); }
.muted { color: var(--muted); font-size: 13px; }

/* ---------------- reproductor: shadowing */
.legacy { display: none !important; }
.loopnote { font-size: 13px; color: var(--muted); }
.loophint {
  position: absolute; z-index: 5; left: 50%; top: 22px; transform: translateX(-50%); padding: 9px 18px; border-radius: 99px;
  background: rgba(20, 14, 26, .78); border: 1px solid var(--hair); backdrop-filter: blur(10px); font-size: 13.5px; color: var(--gold2);
  animation: rise .4s var(--ease) both; white-space: nowrap;
}
.modebadge { font-size: 12px; font-weight: 600; padding: 3px 11px; border-radius: 99px; border: 1px solid var(--hair); color: var(--gold2); }
.modebadge.music { color: var(--lilac); border-color: rgba(198, 180, 244, .4); }
.linkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.linkhelp { font-size: 12.5px; color: var(--muted); }
#bLink.on { background: var(--goldgrad); color: #fff; border-color: transparent; }
#pText.linking .w { cursor: cell; }
#pText .w.picked { background: rgba(198, 180, 244, .28); color: #fff; border-radius: 6px; box-shadow: 0 0 0 3px rgba(198, 180, 244, .28); }
.linkbox { margin: 0 0 14px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(160deg, rgba(48, 32, 60, .55), rgba(16, 12, 22, .7)); border: 1px solid rgba(198, 180, 244, .3); animation: rise .4s var(--ease) both; }
.lk-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lk-h > b { font: italic 500 19px var(--serif); color: var(--gold2); }
.lk-btns { display: flex; gap: 6px; }
.lk-btns button { border: 1px solid var(--hair); background: rgba(11, 9, 16, .5); color: var(--text); border-radius: 99px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; }
.lk-btns button:hover { border-color: var(--lilac); }
.lk-sound { display: flex; align-items: baseline; gap: 12px; margin-top: 10px; }
.lk-sound span { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); min-width: 64px; }
.lk-sound b { font: 600 20px var(--sans); color: var(--lilac); letter-spacing: .01em; }
.lk-sound.say b { color: var(--gold); }
.lk-tips { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.lk-tips li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: rgba(11, 9, 16, .45); }
.lk-tips small { display: block; color: var(--muted); margin-top: 2px; }
.lk-tips p { margin: 6px 0 0; font-size: 13.5px; color: var(--gold2); }
.lk-tips .k { font-size: 10.5px; padding: 2px 8px; border-radius: 99px; background: rgba(198, 180, 244, .18); color: var(--lilac); white-space: nowrap; }
.slang { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px; }
.slg { font-size: 12.5px; padding: 4px 11px; border-radius: 99px; background: rgba(238, 179, 216, .12); border: 1px solid var(--hair); color: var(--gold2); }
.slg b { color: var(--gold); font-weight: 700; }
.wp-ex { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; max-width: 360px; }
.wp-exh { margin: 0 0 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.exrow { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 5px 0; font-size: 13px; line-height: 1.35; }
.exrow b { color: var(--gold); }
.exrow button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--hair); background: rgba(11, 9, 16, .5); color: var(--gold2); cursor: pointer; font-size: 11px; padding: 0; }
.exrow button.on, .exrow button:hover { background: var(--goldgrad); color: #fff; border-color: transparent; }
.exrow .exopen { border: 0; background: transparent; }
@media (max-width: 760px) {
  .wb-card { padding: 24px 16px; } .wb-form { flex-direction: column; } .wb-form button { padding: 13px; }
  .panel-tools { width: 100%; }
}
.wb .chip, .wb-modes button, .addtoggle, .wb-form button { font-family: var(--sans); font-style: normal; }
.landing .hero::before { -webkit-mask-image: linear-gradient(180deg, #000 65%, transparent); mask-image: linear-gradient(180deg, #000 65%, transparent); }

/* =====================================================================
   ROSAS · NEGRO · ESTILO NETFLIX
   ===================================================================== */
:root {
  --ink: #000;
  --bg: #000; --bg2: #070507;
  --panel: #121014; --panel2: #1a171d;
  --line: #262229; --line2: #35303a;
  --text: #f5f2f6; --muted: #a39fa8; --dim: #6b6670;
  --rose: #e3243f; --rose2: #ff8fa3; --violet: #8f3ce0; --violet2: #c49bff;
  --gold: #ff4d67; --gold2: #ffc2cd; --gold3: #b07cf0; --lilac: #c49bff;
  --good: #7be0a6; --bad: #ff6f86; --ember: #e3243f;
  --goldgrad: linear-gradient(120deg, #6d1fb8 0%, #b0164f 42%, #e3243f 62%, #8f3ce0 100%);
  --hair: rgba(255, 255, 255, .10);
  --glass: rgba(14, 12, 16, .78);
}
html, body { background: #000; }
body::before { display: none; }
.top { background: linear-gradient(180deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .35)); border-bottom: 0; backdrop-filter: blur(8px); }
.logo .reel { background-color: var(--rose); box-shadow: 0 0 22px rgba(227, 36, 63, .55); }
.logo .lr { color: #fff; opacity: .7; }
.nav a.on::after { background: var(--rose); }

/* ---------- marco de rosas */
.rose-frame { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.rt {
  position: absolute; overflow: hidden; pointer-events: auto; will-change: transform; border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 18px 46px rgba(0, 0, 0, .65);
  transition: box-shadow .9s var(--ease);
}
.rt i { position: absolute; inset: -6%; background: center/cover no-repeat; will-change: transform; transform: scale(1.08); }
.rt::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 120% at 50% 50%, transparent 60%, rgba(0, 0, 0, .28)); transition: opacity .9s; }
.rt:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 26px 70px rgba(0, 0, 0, .7), 0 0 60px rgba(143, 60, 224, .28); }
.rt:hover::after { opacity: 0; }


/* ---------- lienzo negro del centro */
.view.landing { max-width: none; padding: 0; }
.canvas { position: relative; z-index: 10; padding: 25vh 14vw 34vh; }
.intro { display: grid; grid-template-columns: minmax(150px, 15.5vw) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: center; min-height: 52vh; max-width: 1100px; margin: 0 auto; }
.me { margin: 0; position: relative; aspect-ratio: 1 / 2; border-radius: 4px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06); transform: rotate(-1.2deg); transition: transform 1.2s var(--ease); }
.me:hover { transform: rotate(0deg) scale(1.02); }
.me img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.6s var(--ease); }
.me:hover img { transform: scale(1.05); }
.bb { min-width: 0; }
.bb-box {
  position: relative; aspect-ratio: 16 / 9; max-width: 620px; border: 3px solid #fff; border-radius: 2px; overflow: hidden; cursor: pointer; background: #000;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .9), 0 30px 90px rgba(0, 0, 0, .8); transition: transform .8s var(--ease), box-shadow .8s var(--ease);
}
.bb-box:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(0, 0, 0, .9), 0 40px 100px rgba(0, 0, 0, .85), 0 0 70px rgba(227, 36, 63, .22); }
.bb-box video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; transition: transform 1.4s var(--ease); }
.bb-box:hover video { transform: scale(1.035); }
.bb-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .7)); pointer-events: none; }
.bb-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; letter-spacing: .08em; }
.bb-tag { position: absolute; left: 14px; bottom: 12px; font-size: 12px; font-weight: 600; color: #fff; max-width: calc(100% - 28px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 10px #000; }
.bb-title { font: 800 clamp(34px, 4.6vw, 68px)/.92 var(--sans); letter-spacing: -.04em; margin: 22px 0 12px; color: #fff; }
.bb-title span { background: linear-gradient(100deg, #ff3d5a 0%, #e3243f 35%, #a33be6 75%, #c49bff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bb-sub { color: #cfcad3; font-size: 15px; line-height: 1.55; max-width: 520px; margin: 0 0 22px; }
.bb-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.nf-btn { border: 0; border-radius: 6px; padding: 12px 24px; font: 700 15px var(--sans); cursor: pointer; display: inline-flex; align-items: center; transition: transform .35s var(--ease), background .35s, opacity .35s; }
.nf-btn.white { background: #fff; color: #000; }
.nf-btn.white:hover { background: rgba(255, 255, 255, .82); transform: translateY(-1px); }
.nf-btn.ghost { background: rgba(109, 109, 110, .55); color: #fff; backdrop-filter: blur(6px); }
.nf-btn.ghost:hover { background: rgba(109, 109, 110, .38); transform: translateY(-1px); }

/* ---------- filas tipo Netflix */
.nf { margin: 6vh auto 0; max-width: 1240px; }
.nf-row { margin-bottom: 1.2vh; }
.nf-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 0 2px; }
.nf-head h2 { font: 700 clamp(17px, 1.5vw, 22px) var(--sans); margin: 0; color: #e8e5ea; letter-spacing: -.01em; }
.nf-head span { font-size: 12.5px; color: var(--dim); }
.nf-wrap { position: relative; }
.nf-track {
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; scrollbar-width: none;
  padding: 74px 4px 96px; margin: -60px -4px -84px; scroll-snap-type: x proximity;
}
.nf-track::-webkit-scrollbar { display: none; }
.nf-arrow {
  position: absolute; top: 14px; bottom: 12px; z-index: 6; width: 44px; border: 0; cursor: pointer; color: #fff; font-size: 40px; line-height: 1;
  background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .35s, background .35s;
}
.nf-arrow.l { left: -4px; border-radius: 0 6px 6px 0; } .nf-arrow.r { right: -4px; border-radius: 6px 0 0 6px; }
.nf-wrap:hover .nf-arrow:not(.off) { opacity: 1; }
.nf-arrow:hover { background: rgba(0, 0, 0, .78); }
.nf-arrow.off { pointer-events: none; }
.nf-card {
  position: relative; flex: 0 0 clamp(190px, 17.5vw, 260px); aspect-ratio: 16 / 9; border-radius: 6px; cursor: pointer; scroll-snap-align: start;
  background: #141216; border: 0; padding: 0; color: #fff; text-align: left;
  transition: transform .45s var(--ease) .0s, box-shadow .45s var(--ease), z-index 0s .45s; z-index: 1;
}
.nf-card:hover, .nf-card:focus-visible { transform: scale(1.32) translateY(-14%); z-index: 8; box-shadow: 0 22px 50px rgba(0, 0, 0, .85); transition: transform .5s var(--ease) .28s, box-shadow .5s var(--ease) .28s, z-index 0s .28s; outline: none; }
.nf-track > .nf-card:first-child:hover { transform-origin: left center; }
.nf-track > .nf-card:last-child:hover { transform-origin: right center; }
.nf-thumb { position: absolute; inset: 0; border-radius: 6px; background: #1b181e center/cover no-repeat; }
.nf-card.vid .nf-thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .78)); }
.nf-card .dur { position: absolute; top: 7px; right: 7px; z-index: 2; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; background: rgba(0, 0, 0, .66); }
.nf-title { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 2; font: 700 13.5px/1.2 var(--sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 10px #000; transition: opacity .3s .28s; }
.nf-info {
  position: absolute; left: 0; right: 0; top: 100%; margin-top: -6px; padding: 10px 11px 11px; border-radius: 0 0 6px 6px; background: #181619;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease);
  box-shadow: 0 22px 40px rgba(0, 0, 0, .8);
}
.nf-card:hover .nf-info, .nf-card:focus-visible .nf-info { opacity: 1; transform: none; pointer-events: auto; transition-delay: .32s; }
.nf-card:hover .nf-thumb { border-radius: 6px 6px 0 0; }
.nf-actions { display: flex; gap: 6px; align-items: center; }
.nf-circle { height: 26px; min-width: 26px; border-radius: 99px; border: 1.5px solid rgba(255, 255, 255, .55); background: rgba(30, 30, 30, .7); color: #fff; font-size: 10.5px; font-weight: 700; cursor: pointer; padding: 0 8px; transition: border-color .25s, background .25s; }
.nf-circle:hover { border-color: #fff; }
.nf-circle.main { background: #fff; color: #000; border-color: #fff; padding: 0; width: 26px; font-size: 10px; }
.nf-circle.end { margin-left: auto; padding: 0; width: 26px; }
.nf-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; font-size: 10.5px; color: #bcb8c0; }
.nf-meta .hot { color: #46d369; font-weight: 700; }
.nf-meta .plat { border: 1px solid rgba(255, 255, 255, .35); padding: 0 5px; border-radius: 3px; }
.nf-info .state { font-size: 11px; margin-top: 6px; color: var(--gold2); }
.nf-card.add { display: grid; place-items: center; align-content: center; gap: 6px; background: transparent; border: 1.5px dashed rgba(255, 255, 255, .22); color: #cfcad3; }
.nf-card.add span { font-size: 30px; line-height: 1; color: #fff; }
.nf-card.add b { font-size: 12.5px; font-weight: 600; }
.nf-card.add:hover { transform: scale(1.06); border-color: var(--rose); color: #fff; transition-delay: 0s; }
.nf-card.game { display: grid; align-content: center; justify-items: start; gap: 2px; padding: 0 18px; overflow: hidden;
  background: linear-gradient(135deg, #2a0b17 0%, #120914 50%, #1d0b2c 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.nf-card.game::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: url("roses/r1.jpg") center/cover; opacity: .16; transition: opacity .6s var(--ease); }
.nf-card.game:hover::before { opacity: .32; }
.gm-n { position: relative; font: 800 48px/.9 var(--sans); background: linear-gradient(120deg, #ff3d5a, #a33be6); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.04em; }
.gm-t { position: relative; font: 700 15px var(--sans); }
.gm-d { position: relative; font-size: 11.5px; color: #bcb8c0; max-width: 92%; }

/* ---------- juego y paneles sobre negro */
.canvas .panel { max-width: 1000px; padding: 40px 0 10px; }
.panel-head { border-image: linear-gradient(90deg, rgba(227, 36, 63, .55), rgba(143, 60, 224, .08)) 1; }
.wb-card, .wb-stats div, .queue, .wb-empty { background: #0e0c10; border-color: rgba(255, 255, 255, .08); backdrop-filter: none; }
.wb-modes { background: #0e0c10; border-color: rgba(255, 255, 255, .1); }
.wb-play { box-shadow: 0 0 0 10px rgba(227, 36, 63, .10), 0 18px 50px rgba(143, 60, 224, .35); }
.canvas .queue { max-width: 1000px; margin: 30px auto 0; }
.foot { margin-top: 60px; border-top-color: rgba(255, 255, 255, .08); }
.foot span:first-child { color: var(--rose2); }

/* ---------- ventana añadir */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .72); backdrop-filter: blur(8px); animation: fadein .35s var(--ease) both; }
@keyframes fadein { from { opacity: 0; } }
.modal-card { position: relative; width: min(640px, 100%); padding: 30px; border-radius: 14px; background: #121014; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 40px 120px rgba(0, 0, 0, .9); animation: rise .45s var(--ease) both; }
.modal-card h2 { font: 700 24px var(--sans); margin: 8px 0 18px; letter-spacing: -.02em; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #232026; color: #fff; cursor: pointer; }
.modal .dest { margin-bottom: 16px; }
.modal .add { flex-wrap: wrap; }
.modal .add input { flex: 1 1 260px; background: #0a090b; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; padding: 14px 16px; }
.modal .add button { background: var(--rose); color: #fff; border-radius: 8px; padding: 0 20px; box-shadow: none; }
.modal .add button:hover { background: #f03552; }
.modal .upload { border-radius: 8px; border-color: rgba(255, 255, 255, .2); color: #fff; }
.dest button.on { background: var(--rose); color: #fff; box-shadow: none; }

/* reproductor sobre negro */
.addtoggle, .wb-form button, .chip.strong, .wb-modes button.on, .wb-play, #bLink.on { color: #fff; }

@media (max-width: 760px) {
  .canvas { padding: 15vh 9vw 20vh; }
  .intro { grid-template-columns: 1fr; justify-items: center; text-align: center; min-height: 0; }
  .me { width: 42vw; aspect-ratio: 3 / 4; }
  .bb-box { margin: 0 auto; }
  .bb-sub { margin-left: auto; margin-right: auto; }
  .bb-cta { justify-content: center; }
  .nf-card { flex-basis: 62vw; }
  .nf-card:hover { transform: none; }
  .nf-card .nf-info { position: static; opacity: 1; transform: none; pointer-events: auto; border-radius: 0 0 6px 6px; margin: 0; }
  .nf-card.vid { aspect-ratio: auto; }
  .nf-card.vid .nf-thumb { position: relative; aspect-ratio: 16 / 9; }
  .nf-track { padding: 70px 4px 70px; margin: -56px -4px -60px; }
}
@media (prefers-reduced-motion: reduce) { .nf-card, .nf-card:hover { transition: none; } }
/* intro compacta dentro del hueco negro (foto por encima de las rosas, como en el boceto) */
.canvas { z-index: auto; padding: 0 14vw 34vh; }
.intro { position: relative; height: 100vh; min-height: 560px; max-width: none; display: grid; align-items: center;
  grid-template-columns: 13.5vw minmax(0, 31vw) minmax(0, 1fr); gap: 2.2vw; padding: 27vh 0 0; margin: 0; align-content: start; }
.me { position: relative; z-index: 25; width: 100%; margin-top: 2vh; }
.bb { display: contents; }
.bb-box { grid-column: 2; max-width: none; align-self: start; margin-top: 6vh; }
.bb-text { grid-column: 3; align-self: start; margin-top: 5vh; }
.bb-title { margin: 0 0 12px; font-size: clamp(30px, 3.6vw, 58px); }
.bb-sub { font-size: 14px; margin-bottom: 18px; }
.bb-cta .nf-btn { padding: 11px 20px; font-size: 14px; }
.nf { margin-top: 0; position: relative; }
@media (max-width: 760px) {
  .canvas { padding: 0 8vw 20vh; }
  .intro { height: auto; min-height: 0; grid-template-columns: 1fr; padding: 17vh 0 4vh; gap: 18px; justify-items: center; text-align: center; }
  .me { width: 38vw; aspect-ratio: 3 / 4; margin: 0; }
  .bb-box, .bb-text { grid-column: 1; margin-top: 0; width: 100%; }
  .nf { margin-top: 2vh; }
}
@media (max-width: 760px) { .me { width: 30vw; } .intro { padding-top: 6vh; } }

/* =====================================================================
   PORTADA "¿QUIÉN ESTÁ VIENDO?": 3 capas (fondo, hojas, rosas) con parallax y balanceo
   ===================================================================== */
.who { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; overflow: clip; isolation: isolate; display: grid; place-items: center; margin-top: calc(-1 * var(--hdr, 67px)); background: transparent; }
@keyframes sway { from { transform: rotate(-1.6deg) translateY(1px); } to { transform: rotate(1.6deg) translateY(-1.5px); } }

/* ---------- fondo: 3 capas de la portada original (fondo -> hojas -> rosas), sin filtros.
   .who-stage es una caja 1376x768 que cubre la pantalla igual que object-fit:cover,
   escalada x1.06: parallax (max 18px) + balanceo (4px, 0.8deg) nunca muestran bordes. */
/* fijo detras de todas las secciones; el body va transparente para que se vea (html sigue negro) */
.who-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; container-type: size; }
body { background: transparent !important; }
.who-stage { position: absolute; left: 50%; top: 50%; aspect-ratio: 1376 / 768;
  width: max(100cqw, calc(100cqh * 1376 / 768)); transform: translate(-50%, -50%) scale(1.06); }
.who-stage .pl { position: absolute; inset: 0; will-change: transform; transform: translate3d(0, 0, 0); }
.who-stage img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; }
/* hojas: 7 agrupaciones (regiones conectadas del alpha), cada una con su balanceo y origen en su borde del marco.
   Se mecen algo mas que las rosas. */
.who-stage .sw { will-change: transform; animation: swayLeaf var(--d) ease-in-out var(--dl) infinite; }
@keyframes swayLeaf {
  0%, 100% { transform: rotate(-0.8deg) translate3d(-4px, 2px, 0); }
  50%      { transform: rotate(0.8deg) translate3d(4px, -2px, 0); } }
/* agrupaciones (hojas y rosas): caja en % de la portada; .rg-push se aparta del mouse (JS) */
.who-stage .rg { position: absolute; }
.who-stage .rg-push { position: absolute; inset: 0; will-change: transform; }
.who-stage .rg-sway { will-change: transform; animation: swayRose var(--d) ease-in-out var(--dl) infinite; }
@keyframes swayRose {
  0%, 100% { transform: rotate(-0.55deg) translate3d(-3px, 2px, 0); }
  50%      { transform: rotate(0.55deg) translate3d(3px, -2px, 0); } }
@media (prefers-reduced-motion: reduce) { .who-stage .sw, .who-stage .rg-sway { animation: none; } }

/* ---------- tema gotico: negro y gris, con un toque de rojo solo en las rosas
   (sin capa de color encima: antes una superposicion roja teñia todo de rosado) */
.who-bg img { transition: filter .7s ease; }
html[data-theme="gothic"] .pl-fondo img { filter: grayscale(1) contrast(1.3) brightness(.32); }
html[data-theme="gothic"] .pl-hojas img { filter: grayscale(1) contrast(1.45) brightness(.48); }
html[data-theme="gothic"] .pl-rosas img { filter: grayscale(1) sepia(.55) hue-rotate(-56deg) saturate(4.4) contrast(1.6) brightness(.5); }

/* ---------- selector de tema: cristal liquido + glitter */
.theme-pick { display: flex; gap: 14px; justify-content: center; margin-bottom: clamp(16px, 2.2vw, 28px); }
.tp { position: relative; width: 46px; height: 46px; padding: 0; border-radius: 12px; cursor: pointer; overflow: hidden; isolation: isolate;
  background: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 55%, rgba(255, 255, 255, .08));
  -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -8px 14px rgba(0, 0, 0, .25), 0 8px 22px rgba(0, 0, 0, .5);
  transition: transform .45s cubic-bezier(.2, .9, .25, 1.2), border-color .4s, box-shadow .4s; -webkit-tap-highlight-color: transparent; }
/* reflejo especular tipo gota de agua */
.tp::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  background: radial-gradient(40% 26% at 30% 18%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%),
              radial-gradient(14% 10% at 74% 78%, rgba(255, 255, 255, .28), transparent 70%); }
/* brillo liquido que recorre el cristal al pasar el mouse */
.tp::after { content: ""; position: absolute; inset: -40%; z-index: 4; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .45) 48%, rgba(255, 255, 255, .08) 54%, transparent 62%);
  transform: translateX(-60%) rotate(0deg); }
.tp:hover::after, .tp:focus-visible::after { animation: tpSheen 1.1s cubic-bezier(.3, .7, .2, 1) both; }
@keyframes tpSheen { 0% { opacity: 0; transform: translateX(-60%); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateX(60%); } }
.tp:hover { transform: translateY(-2px) scale(1.06); border-color: rgba(255, 255, 255, .4); }
.tp:focus-visible { outline: none; border-color: #fff; }
.tp.is-on { border-color: rgba(255, 255, 255, .6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -8px 14px rgba(0, 0, 0, .25), 0 0 0 3px rgba(255, 255, 255, .08), 0 0 22px var(--glow, rgba(214, 138, 166, .45)), 0 8px 22px rgba(0, 0, 0, .5); }
/* esfera de color */
.tp-orb { position: absolute; inset: 10px; z-index: 1; border-radius: 50%; box-shadow: inset -3px -4px 8px rgba(0, 0, 0, .55), inset 2px 2px 5px rgba(255, 255, 255, .25), 0 3px 8px rgba(0, 0, 0, .5); }
.tp[data-theme="romantic"] { --glow: rgba(214, 138, 166, .5); }
.tp[data-theme="romantic"] .tp-orb { background: radial-gradient(circle at 34% 30%, #f3bfd2 0%, #c77a99 24%, #8c3d5e 48%, #2a0d1a 74%, #0a0508 100%),
  radial-gradient(circle at 70% 78%, #2f6a39, transparent 40%); background-blend-mode: screen; }
.tp[data-theme="gothic"] { --glow: rgba(200, 16, 40, .55); }
.tp[data-theme="gothic"] .tp-orb { background: radial-gradient(circle at 66% 70%, rgba(220, 20, 45, .95) 0%, rgba(140, 0, 20, .6) 20%, transparent 42%),
  radial-gradient(circle at 34% 30%, #8a8a8f 0%, #3b3b40 28%, #151517 60%, #000 100%); }
/* micro destellos glitter */
.tp-glitter { position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; mix-blend-mode: screen; opacity: .9;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .95) 0 .55px, transparent 1.1px),
    radial-gradient(circle, rgba(255, 228, 240, .8) 0 .5px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, .7) 0 .45px, transparent .9px);
  background-size: 7px 9px, 11px 7px, 5px 13px; background-position: 0 0, 3px 4px, 2px 1px;
  -webkit-mask: linear-gradient(120deg, transparent 20%, #000 45%, transparent 70%) 0 0 / 300% 300%, radial-gradient(circle, transparent 52%, #000 64%);
  mask: linear-gradient(120deg, transparent 20%, #000 45%, transparent 70%) 0 0 / 300% 300%, radial-gradient(circle, transparent 52%, #000 64%);
  -webkit-mask-composite: source-over; mask-composite: add;
  animation: glitter 4.5s linear infinite, twinkle 1.7s steps(2, jump-none) infinite; }
.tp[data-theme="gothic"] .tp-glitter { background-image: radial-gradient(circle, rgba(255, 255, 255, .9) 0 .55px, transparent 1.1px), radial-gradient(circle, rgba(255, 70, 90, .85) 0 .5px, transparent 1px), radial-gradient(circle, rgba(200, 200, 210, .7) 0 .45px, transparent .9px); animation-delay: -2s, -.6s; }
@keyframes glitter { to { -webkit-mask-position: 100% 100%, 0 0; mask-position: 100% 100%, 0 0; background-position: 7px 9px, -8px 11px, 2px -12px; } }
@keyframes twinkle { 50% { opacity: .55; } }

@media (max-width: 600px) and (orientation: portrait) { .tp { width: 42px; height: 42px; } }
@media (prefers-reduced-motion: reduce) { .tp-glitter { animation: none; } .tp:hover::after { animation: none; } }

.who-center { position: relative; z-index: 400; display: flex; flex-direction: column; align-items: center; padding: 24px; text-align: center; animation: whoIn .9s var(--ease) both; }
@keyframes whoIn { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
.who-title { margin: 0 0 clamp(18px, 2.4vw, 34px); font: 500 clamp(26px, 3.4vw, 56px)/1.1 var(--sans); color: #fff; letter-spacing: -.01em; }
.who-list { display: flex; justify-content: center; gap: clamp(14px, 2vw, 30px); }
.who-card { display: flex; flex-direction: column; align-items: center; gap: 12px; border: 0; background: none; cursor: pointer; color: inherit; padding: 0; width: clamp(84px, 10vw, 180px); -webkit-tap-highlight-color: transparent; }
.who-av {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); transform: scale(1);
  transition: transform .45s cubic-bezier(.2, .9, .25, 1.15), box-shadow .35s cubic-bezier(.2, .8, .2, 1);
}
.who-card:hover .who-av, .who-card:focus-visible .who-av {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px #fff, 0 0 26px rgba(255, 255, 255, .28), 0 18px 40px rgba(0, 0, 0, .6);
}
.who-card:focus-visible { outline: none; }
.who-card:active .who-av { transform: scale(1.02); }
.who-name { font: 400 clamp(13px, 1.25vw, 20px) var(--sans); color: #808080; transition: color .3s; white-space: nowrap; }
.who-card:hover .who-name, .who-card:focus-visible .who-name { color: #fff; }
.av-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.who-card:hover .av-photo img { transform: scale(1.06); }
.av-red { background: radial-gradient(120% 120% at 30% 20%, #e8384c 0%, #c91429 40%, #9e0b1c 75%, #5e0610 100%); }
.av-violet { background: radial-gradient(120% 120% at 30% 20%, #9145cc 0%, #6b1d9c 45%, #4a126b 80%, #26083a 100%); }
.av-red svg { width: 46%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.av-aa { font: 800 clamp(26px, 3.3vw, 58px)/1 var(--sans); color: #fff; letter-spacing: -.04em; text-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.who-manage {
  margin-top: clamp(26px, 3.6vw, 54px); border: 1px solid #808080; background: transparent; color: #808080; cursor: pointer;
  padding: .55em 1.6em; font: 500 clamp(12px, 1.05vw, 16px) var(--sans); letter-spacing: .18em; text-transform: uppercase;
  transition: color .3s, border-color .3s;
}
.who-manage:hover { color: #fff; border-color: #fff; }

/* contenido debajo de la portada */
.canvas { padding: 7vh 5vw 12vh; z-index: auto; }
.nf { margin-top: 0; }
.nf-row.flash .nf-head h2 { animation: flash 1.6s ease; }
@keyframes flash { 0%, 100% { color: #e8e5ea; } 30% { color: #ff4d67; } }
.top { position: sticky; z-index: 500; }

@media (max-width: 600px) {
  .who { min-height: 620px; }
  .who-list { gap: 12px; }
  .who-card { width: 23vw; }
  .who-name { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) { .who-center { animation: none; } }

/* =====================================================================
   PANTALLA DE BIENVENIDA: un solo perfil + iniciar sesión con Google
   ===================================================================== */
body.welcome .top { display: none; }
body.welcome .who { margin-top: 0; }
#library.browse .who { display: none; }
#library:not(.browse) .canvas { display: none; }
#library.browse .canvas { padding-top: 5vh; }

.who-card { width: clamp(120px, 12vw, 200px); }
.av-user { background: linear-gradient(160deg, #2a2530 0%, #141216 100%); }
.av-user .av-ghost { width: 62%; opacity: .5; transition: opacity .4s; }
.who-card:hover .av-ghost { opacity: .75; }
.av-user.signed { background: #1b181e; }
.av-user img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.who-card:hover .av-user img { transform: scale(1.06); }
.av-initial { font: 800 clamp(48px, 5vw, 84px)/1 var(--sans); color: #fff; background: linear-gradient(120deg, #ff3d5a, #a33be6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.who-card.locked .who-av::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.who-name { font-size: clamp(15px, 1.35vw, 21px); }

.who-login { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: clamp(26px, 3.4vw, 46px); min-height: 44px; animation: rise .6s var(--ease) both .15s; }
.gbtn { min-height: 44px; display: flex; justify-content: center; }
.gbtn iframe { border-radius: 99px !important; }
.who-hint { margin: 0; max-width: 360px; font-size: 13.5px; line-height: 1.6; color: #8c8890; }
.who-hint code { font-size: 12.5px; color: #cfcad3; background: #1b181e; padding: 1px 6px; border-radius: 4px; }
.linkbtn { margin-top: 10px; border: 1px solid #808080; background: transparent; color: #cfcad3; padding: .55em 1.4em; cursor: pointer; font: 500 12.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; transition: color .3s, border-color .3s; }
.linkbtn:hover { color: #fff; border-color: #fff; }

.hdr-user { order: 5; width: 34px; height: 34px; border-radius: 6px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); transition: box-shadow .3s; }
.hdr-user:hover { box-shadow: 0 0 0 2px #fff; }
.hdr-user img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topsearch { order: 4; }
@media (max-width: 760px) { .hdr-user { order: 2; margin-left: auto; } .topsearch { order: 2; } }

/* entrada suave: nada se ve hasta que las rosas estan listas; florecen desde las esquinas */
.who .who-center { opacity: 0; animation: none; }
.who.ready .who-center { animation: whoIn 1s var(--ease) .45s both; }
@media (prefers-reduced-motion: reduce) { .who.ready .who-center { animation: none; opacity: 1; } }
/* menu mas compacto para que el marco tenga sitio arriba y abajo */
.who-login { margin-top: clamp(18px, 2.4vw, 32px); gap: 10px; }
.who-hint { font-size: 13px; }

/* =====================================================================
   SECCIONES: selector de 3 opciones + una pagina por seccion
   ===================================================================== */
body.bare .top { display: none; }
#library.browse .canvas { padding: 0; min-height: 100vh; }
#library .pick, #library .page-head, #library .nf-row, #library #panelWords, #library .foot { display: none; }
#library[data-mode="pick"] .pick { display: flex; }
#library[data-mode="english"] .page-head, #library[data-mode="music"] .page-head, #library[data-mode="words"] .page-head { display: flex; }
#library[data-mode="english"] .nf-row[data-row="english"], #library[data-mode="music"] .nf-row[data-row="music"] { display: block; }
#library[data-mode="words"] #panelWords { display: block !important; }
#library:not([data-mode="english"]):not([data-mode="music"]) .queue { display: none; }

/* selector */
.pick { min-height: 100vh; min-height: 100svh; align-items: center; justify-content: center; gap: clamp(18px, 3vw, 48px); padding: 24px; flex-wrap: wrap; animation: whoIn .9s var(--ease) both; }
.pick-card { display: flex; flex-direction: column; align-items: center; gap: 16px; width: clamp(150px, 19vw, 300px); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.pick-art {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  background: radial-gradient(120% 120% at 30% 15%, #26222b 0%, #141216 55%, #0b0a0c 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 60px rgba(0, 0, 0, .6);
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.15), box-shadow .4s cubic-bezier(.2, .8, .2, 1);
}
.pick-art svg { width: 46%; height: auto; overflow: visible; transition: transform .7s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)); }
.pick-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity .5s; pointer-events: none; }
.art-tiktok::after { background: radial-gradient(70% 70% at 50% 45%, rgba(37, 244, 238, .14), transparent 70%); }
.art-music::after { background: radial-gradient(70% 70% at 50% 45%, rgba(255, 77, 103, .16), transparent 70%); }
.art-word::after { background: radial-gradient(70% 70% at 50% 45%, rgba(163, 59, 230, .18), transparent 70%); }
.pick-card:hover .pick-art, .pick-card:focus-visible .pick-art { transform: scale(1.06); box-shadow: 0 0 0 3px #fff, 0 0 30px rgba(255, 255, 255, .22), 0 30px 70px rgba(0, 0, 0, .7); }
.pick-card:hover .pick-art::after, .pick-card:focus-visible .pick-art::after { opacity: 1; }
.pick-card:hover .pick-art svg { transform: scale(1.08) rotate(-3deg); }
.pick-card:focus-visible { outline: none; }
.pick-name { font: 500 clamp(15px, 1.4vw, 22px) var(--sans); color: #808080; transition: color .3s; white-space: nowrap; }
.pick-card:hover .pick-name, .pick-card:focus-visible .pick-name { color: #fff; }
.caret { animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* paginas de cada seccion */
.page-head { align-items: baseline; gap: 18px; flex-wrap: wrap; max-width: 1240px; margin: 0 auto; padding: 5vh 5vw 3vh; }
.page-head h1 { margin: 0; font: 700 clamp(26px, 3vw, 44px) var(--sans); letter-spacing: -.02em; color: #fff; }
#library[data-mode="english"] .nf, #library[data-mode="music"] .nf { max-width: 1240px; margin: 0 auto; padding: 0 5vw 10vh; }
#library.browse .nf-head { display: none; }
#library.browse .nf-arrow { display: none; }
#library.browse .nf-track { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; gap: 14px 10px; }
#library.browse .nf-card { flex: 0 0 clamp(200px, 22vw, 280px); }
#library.browse .nf-card:hover, #library.browse .nf-card:focus-visible { transform: scale(1.12) translateY(-6%); }
#library[data-mode="words"] .panel { padding: 0 5vw 10vh; margin: 0 auto; }
#library[data-mode="words"] .panel-head > div:first-child, #library[data-mode="words"] #wbClose { display: none; }
#library[data-mode="words"] .panel-head { justify-content: center; border: 0; padding-bottom: 0; margin-bottom: 18px; }
#library[data-mode="words"] .wb-modes { display: inline-flex; }
@media (max-width: 760px) {
  .pick { flex-direction: column; gap: 22px; padding: 40px 24px; }
  .pick-card { width: min(46vw, 200px); }
  #library.browse .nf-card { flex-basis: 100%; }
}

/* =====================================================================
   REPRODUCTOR: video a toda la ventana + estudio por pestañas
   ===================================================================== */
.cinema-view .cinema { display: flex; flex-direction: column; height: calc(100vh - var(--hdr, 67px)); height: calc(100svh - var(--hdr, 67px)); min-height: 420px; }
.cinema-view .stage { flex: 1 1 auto; height: auto; min-height: 0; }
.cinema-view .stage video { width: 100%; height: 100%; object-fit: contain; }
.cinema-view .deck, .cinema-view .dictbox { flex: none; }

.study.tabbed { display: block; max-width: 960px; margin: 0 auto; padding: 22px 24px 60px; }
.study.tabbed .phrase { width: 100%; }
.stabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.stabs button {
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03); color: #bcb8c0; border-radius: 99px;
  padding: 8px 15px; font: 600 13px var(--sans); cursor: pointer; transition: background .25s, color .25s, border-color .25s;
}
.stabs button:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
.stabs button.on { background: #fff; color: #000; border-color: #fff; }
.stabs #pCount { opacity: .55; font-weight: 500; margin-left: 2px; }
.spanel { display: none; margin-top: 14px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .07); }
.spanel.open { display: block; animation: rise .35s var(--ease) both; }
.spanel .sounds { margin-top: 0; }
.cs-note { margin: 4px 0 14px !important; font-size: 12.5px; }
#pSounds { letter-spacing: .02em; }
.spanel .plist { max-height: 46vh; overflow-y: auto; margin: 0; }
.spanel .keys { margin: 0; }
.spanel .linkbar { margin-top: 14px; }
.tip small { line-height: 1.45; }
.spanel[data-panel="cs"] .linkbar { margin-top: 0; }
.spanel[data-panel="cs"] .linkhelp { font-size: 13.5px; color: #bcb8c0; }
#pText.linking { user-select: none; -webkit-user-select: none; touch-action: pan-y; }
#pText.linking .w { cursor: pointer; border-radius: 6px; transition: background .15s, box-shadow .15s; }
#pText.linking .w:hover { background: rgba(255, 255, 255, .08); }
.lk-note { margin: 10px 0 0; font-size: 12.5px; color: #8c8890; }
.lk-sound.heard b { color: #7be0a6; }
.ok-heard { font-style: normal; font-size: 11.5px; font-weight: 700; color: #7be0a6; margin-left: 6px; }
.lk-skip { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); font-size: 13px; color: #bcb8c0; }
.lk-skip b { color: #fff; }

/* =====================================================================
   REPRODUCTOR v2: controles flotantes dentro del video + guion lateral
   ===================================================================== */
.cinema-view .cinema { background: #000; padding: 0; }
.stage { --ease2: cubic-bezier(.22, .9, .24, 1); }
.stage .ctrl {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 70px clamp(16px, 2.4vw, 34px) 18px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .82) 100%);
  transition: opacity .6s var(--ease2), transform .6s var(--ease2); cursor: default;
}
.stage.idle { cursor: none; }
.stage.idle .ctrl, .stage.idle .stage-top { opacity: 0; transform: translateY(12px); pointer-events: none; }
.stage .stage-top { transition: opacity .6s var(--ease2), transform .6s var(--ease2); }
.stage .subs { bottom: 120px; transition: bottom .6s var(--ease2), opacity .25s, transform .25s; }
.stage.idle .subs { bottom: 6%; }
.stage .bigplay { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(10px); transition: transform .4s var(--ease2), background .3s, opacity .4s; }
.stage .bigplay:hover { background: #fff; color: #000; border-color: #fff; transform: scale(1.06); }

/* barra de progreso */
.ctrl .scrub { position: relative; height: 18px; margin: 0 0 6px; cursor: pointer; }
.ctrl .scrub::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); transition: height .25s, top .25s; }
.ctrl .scrub:hover::before { top: 6px; height: 6px; }
.ctrl .scrub-fill { top: 7px; height: 4px; background: linear-gradient(90deg, #a33be6, #ff3d5a); mix-blend-mode: normal; transition: height .25s, top .25s; }
.ctrl .scrub:hover .scrub-fill { top: 6px; height: 6px; }
.ctrl .scrub-knob { width: 14px; height: 14px; top: 2px; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); transform: translateX(-50%) scale(0); transition: transform .25s var(--ease2); }
.ctrl .scrub:hover .scrub-knob { transform: translateX(-50%) scale(1); }
.ctrl .scrub-marks i { background: rgba(255, 255, 255, .12); }
.ctrl .scrub-marks i.cur { background: rgba(255, 255, 255, .35); }

.ctrl-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ctrl-left, .ctrl-right { display: flex; align-items: center; gap: 10px; }
.cbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border: 0; border-radius: 99px;
  background: rgba(255, 255, 255, .12); color: #fff; font: 600 14px var(--sans); cursor: pointer; backdrop-filter: blur(12px);
  transition: background .3s var(--ease2), color .3s, transform .3s var(--ease2), box-shadow .3s;
}
.cbtn svg { width: 18px; height: 18px; }
.cbtn:hover { background: rgba(255, 255, 255, .22); transform: translateY(-1px); }
.cbtn:active { transform: scale(.96); }
.cbtn.on { background: #fff; color: #000; }
.cbtn.play { width: 54px; height: 54px; padding: 0 0 0 3px; background: #fff; color: #000; font-size: 19px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.cbtn.play:hover { transform: scale(1.06); background: #fff; }
.ctrl .time { margin-left: 6px; font: 600 13px var(--sans); color: rgba(255, 255, 255, .85); font-variant-numeric: tabular-nums; }
.ctrl .time i { font-style: normal; opacity: .45; margin: 0 5px; }
.ctrl .speeds { display: inline-flex; gap: 2px; padding: 4px; border-radius: 99px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(12px); border: 0; }
.ctrl .speeds button { border: 0; background: transparent; color: rgba(255, 255, 255, .78); padding: 8px 12px; border-radius: 99px; font: 600 13px var(--sans); cursor: pointer; transition: background .3s var(--ease2), color .3s; }
.ctrl .speeds button:hover { color: #fff; }
.ctrl .speeds button.on { background: #fff; color: #000; }

/* guion dentro del video */
.script {
  position: absolute; z-index: 7; top: 74px; right: 18px; bottom: 112px; width: min(380px, calc(100% - 36px));
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: rgba(12, 10, 14, .74); backdrop-filter: blur(20px) saturate(1.2); border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateX(24px) scale(.98); pointer-events: none;
  transition: opacity .45s var(--ease2), transform .55s var(--ease2);
}
.stage.script-open .script { opacity: 1; transform: none; pointer-events: auto; }
.stage.idle.script-open .script { opacity: 1; }
.script-h { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.script-h b { font: 700 15px var(--sans); color: #fff; }
.script-h span { font-size: 12.5px; color: #8c8890; }
.script-h button { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; transition: background .25s; }
.script-h button:hover { background: rgba(255, 255, 255, .18); }
.script .plist { flex: 1; overflow-y: auto; margin: 0; padding: 8px; max-height: none; scroll-behavior: smooth; }
.script .plist li { color: #cfcad3; border-radius: 12px; transition: background .25s, color .25s; }
.script .plist li:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.script .plist li.cur { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 #ff3d5a; }
.stage.dict .subs { display: none; }
/* el guion siempre esta abierto: los subtitulos se centran en el hueco libre a su izquierda */
.stage.script-open .subs { left: calc((100% - 398px) / 2); width: min(calc(100% - 440px), 1100px); }

/* modo de practica en la pagina de videos */
.modesw { display: none; }
#library[data-mode="english"] .modesw { display: inline-flex; margin-left: auto; gap: 4px; padding: 5px; border-radius: 99px; background: #0f0d11; border: 1px solid rgba(255, 255, 255, .08); align-self: center; }
.modesw button { border: 0; background: transparent; color: #a39fa8; padding: 10px 18px; border-radius: 99px; font: 600 14px var(--sans); cursor: pointer; transition: background .35s cubic-bezier(.22, .9, .24, 1), color .35s; white-space: nowrap; }
.modesw button small { font-weight: 500; opacity: .7; margin-left: 4px; font-size: 12px; }
.modesw button:hover { color: #fff; }
.modesw button.on { background: #fff; color: #000; }
.modesw button.on small { opacity: .6; }

@media (max-width: 760px) {
  .stage .ctrl { padding: 50px 12px 12px; }
  .cbtn span { display: none; }
  .cbtn { padding: 0 12px; }
  .ctrl .speeds button { padding: 7px 9px; font-size: 12px; }
  .ctrl .time { display: none; }
  .script { top: 60px; right: 10px; bottom: 96px; width: 46%; }
  .script .plist li { font-size: 12.5px; padding: 7px 8px; gap: 8px; }
  .script .plist li .t { min-width: 28px; }
  .stage.script-open .subs { left: calc(27% - 5px); width: 50%; }
  #library[data-mode="english"] .modesw { margin-left: 0; width: 100%; }
  .modesw button { flex: 1; padding: 10px 8px; font-size: 13px; }
  .modesw button small { display: none; }
}
.ctrl .scrub-knob { margin-left: 0; }
/* dictado: barra limpia bajo el video */
.cinema-view .dictbox { margin: 0; padding: 16px clamp(16px, 4vw, 48px) 18px; border: 0; border-top: 1px solid rgba(255, 255, 255, .07); border-radius: 0; background: #09080b; }
.dictbox .dict-head { max-width: 980px; margin: 0 auto 10px; }
.dictbox .dict-title { font: 700 15px var(--sans); color: #fff; }
.dictbox .dict-title #dictNum { font-weight: 500; color: #8c8890; }
.dictbox .dict-help { color: #8c8890; font-size: 12.5px; }
.dictbox form { max-width: 980px; margin: 0 auto; display: flex; gap: 8px; }
.dictbox .dictbtn { height: 48px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .08); color: #fff; padding: 0 18px; font: 600 14px var(--sans); cursor: pointer; transition: background .3s; }
.dictbox .dictbtn:hover { background: rgba(255, 255, 255, .16); }
.dictbox .dictbtn.on { background: #fff; color: #000; }
.dictbox input { flex: 1; min-width: 0; height: 48px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .1); background: #121014; color: #fff; padding: 0 20px; font-size: 15px; outline: none; transition: border-color .3s, box-shadow .3s; }
.dictbox input:focus { border-color: rgba(255, 255, 255, .35); box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }
.dictbox .dictgo { height: 48px; border-radius: 99px; border: 0; background: #fff; color: #000; padding: 0 22px; font: 700 14px var(--sans); cursor: pointer; transition: transform .3s cubic-bezier(.22, .9, .24, 1); }
.dictbox .dictgo:hover { transform: translateY(-1px); }
.dictbox .dictres { max-width: 980px; margin: 10px auto 0; }
@media (max-width: 760px) { .dictbox form { flex-wrap: wrap; } .dictbox input { flex-basis: 100%; order: -1; } }
.cinema-view .dictbox { width: 100%; max-width: none; align-self: stretch; box-sizing: border-box; }

/* =====================================================================
   CABECERA DE SECCION CENTRADA: titulo entre rosas + modos en tarjetas
   ===================================================================== */
#library[data-mode="english"] .page-head, #library[data-mode="music"] .page-head, #library[data-mode="words"] .page-head {
  position: relative; flex-direction: column; align-items: center; text-align: center; gap: clamp(20px, 3vh, 34px); padding: 7vh 5vw 5vh; }
.page-head .back { position: absolute; left: 5vw; top: 4vh; padding: 8px 14px; border-radius: 99px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); color: #bdb8c2; transition: background .3s, color .3s; }
.page-head .back:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.ph-title { display: flex; align-items: center; justify-content: center; gap: clamp(4px, 1vw, 14px); animation: whoIn .9s var(--ease) both; }
.page-head h1 { font-size: clamp(32px, 4.2vw, 60px); }
.ph-rose { width: clamp(110px, 11vw, 160px); margin: 0 -18px; height: auto; overflow: visible; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .6)); }
.ph-rose .ph-sway { transform-box: view-box; transform-origin: 50% 60%; animation: sway 5.5s ease-in-out infinite alternate; }
.ph-rose.r .ph-sway { animation-duration: 6.3s; animation-delay: -2s; }
.ph-rose { animation: phBloom 1.3s cubic-bezier(.2, .9, .25, 1.1) both; }
.ph-rose.r { animation-delay: .12s; }
@keyframes phBloom { from { opacity: 0; transform: scale(.4) rotate(-30deg); } to { opacity: 1; transform: none; } }

/* selector de modo: dos tarjetas grandes */
#library[data-mode="english"] .modesw { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; gap: clamp(14px, 2vw, 24px);
  margin: 0; padding: 0; background: none; border: 0; border-radius: 0; width: 100%; }
.modesw .mcard { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; white-space: normal;
  padding: 26px 26px 22px; border-radius: 22px; min-height: 172px; color: #a39fa8;
  background: radial-gradient(120% 140% at 0% 0%, #1d1a21 0%, #121014 55%, #0b0a0c 100%);
  border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.15), border-color .4s, box-shadow .4s, background .4s; }
.modesw .mcard:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .2); color: #fff; background: radial-gradient(120% 140% at 0% 0%, #1d1a21 0%, #121014 55%, #0b0a0c 100%); }
.modesw .mcard.on { background: radial-gradient(120% 140% at 0% 0%, #2a1018 0%, #160b10 55%, #0b0a0c 100%); color: #fff;
  border-color: rgba(243, 122, 135, .55); box-shadow: 0 0 0 1px rgba(243, 122, 135, .25), 0 0 40px rgba(201, 20, 41, .22), 0 24px 60px rgba(0, 0, 0, .7); }
.modesw .mcard[data-mode="dict"].on { background: radial-gradient(120% 140% at 0% 0%, #1f1029 0%, #120b17 55%, #0b0a0c 100%);
  border-color: rgba(187, 140, 232, .55); box-shadow: 0 0 0 1px rgba(187, 140, 232, .25), 0 0 40px rgba(107, 29, 156, .28), 0 24px 60px rgba(0, 0, 0, .7); }
.mc-ico { font-size: 34px; line-height: 1; margin-bottom: 6px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .5)); }
.mc-t { font: 700 clamp(19px, 1.6vw, 23px) var(--sans); color: #fff; letter-spacing: -.01em; }
.mc-d { font: 500 14px/1.45 var(--sans); color: #8c8890; max-width: 24ch; }
.mcard.on .mc-d { color: #cfc8d4; }
.mc-ok { margin-top: auto; padding-top: 8px; font: 700 11.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #f37a87; opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s; }
.mcard[data-mode="dict"] .mc-ok { color: #bb8ce8; }
.mcard.on .mc-ok { opacity: 1; transform: none; }
/* la rosa de cada tarjeta: apagada y cerrada; florece al elegirla */
.mc-rose { position: absolute; right: -22px; top: -22px; width: 150px; height: 150px; overflow: visible; pointer-events: none;
  opacity: .18; filter: grayscale(1) drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); transform: scale(.72) rotate(-25deg);
  transition: opacity .6s, filter .6s, transform .9s cubic-bezier(.2, .9, .25, 1.15); }
.mcard:hover .mc-rose { opacity: .45; transform: scale(.8) rotate(-10deg); }
.mcard.on .mc-rose { opacity: 1; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); transform: scale(1) rotate(8deg); }

/* videos centrados */
#library.browse .nf-track { justify-content: center; }

@media (max-width: 760px) {
  #library[data-mode="english"] .page-head, #library[data-mode="music"] .page-head, #library[data-mode="words"] .page-head { padding-top: 64px; }
  .page-head .back { left: 16px; top: 16px; }
  .ph-rose { width: 74px; margin: 0 -12px; }
  #library[data-mode="english"] .modesw { grid-template-columns: 1fr; }
  .modesw .mcard { min-height: 0; padding: 20px; flex: none; }
  .modesw .mcard small { display: inline; }
  .mc-rose { width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) { .ph-rose, .ph-rose .ph-sway { animation: none; } }

/* ===================== dictado como minijuego ===================== */
.cinema-view .dictbox.dgame { position: relative; overflow: hidden; padding-top: 14px;
  background: radial-gradient(90% 140% at 50% -20%, rgba(143, 60, 224, .16), transparent 60%), #09080b; }
.dgame .dg-hud { max-width: 980px; margin: 0 auto 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.dgame .dg-stats { display: flex; gap: 8px; }
.dg-stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.dg-stat b { font: 800 17px var(--sans); color: #fff; font-variant-numeric: tabular-nums; }
.dg-stat small { font: 600 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #8c8890; }
.dg-stat.fire.hot { border-color: rgba(255, 140, 60, .6); background: rgba(255, 110, 40, .14); box-shadow: 0 0 18px rgba(255, 120, 40, .25); }
.dg-stat.fire.hot b { color: #ffb067; }
.dg-stat.bump { animation: dgBump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes dgBump { 40% { transform: scale(1.18); } }
.dgame .dg-bar { max-width: 980px; height: 6px; margin: 0 auto 16px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.dgame .dg-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #e3243f, #a33be6); transition: width .6s cubic-bezier(.22, .9, .24, 1); }

.dgame .dg-slots { max-width: 980px; margin: 0 auto 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 42px; }
.dg-slot { height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 10px; box-sizing: border-box;
  background: rgba(255, 255, 255, .04); border: 1px dashed rgba(255, 255, 255, .18); color: #fff; font: 600 16px var(--sans); transition: background .2s, border-color .2s, transform .2s; }
.dg-slot.fill { border-style: solid; border-color: rgba(198, 160, 244, .55); background: rgba(163, 59, 230, .14); transform: translateY(-2px); }
.dg-slot.rev { border-style: solid; animation: dgFlip .5s both cubic-bezier(.3, 1.4, .5, 1); }
.dg-slot.rev.ok { background: rgba(127, 212, 154, .16); border-color: rgba(127, 212, 154, .7); color: #9ff0b6; }
.dg-slot.rev.fix { background: rgba(242, 181, 68, .16); border-color: rgba(242, 181, 68, .7); color: #ffd27a; }
.dg-slot.rev.miss { background: rgba(255, 107, 87, .14); border-color: rgba(255, 107, 87, .7); color: #ff9d8f; }
@keyframes dgFlip { from { transform: rotateX(90deg); opacity: 0; } to { transform: none; opacity: 1; } }

.dgame .dictbtn.dg-play { width: 48px; padding: 0; border-radius: 50%; font-size: 17px; background: linear-gradient(135deg, #e3243f, #a33be6); box-shadow: 0 6px 20px rgba(163, 59, 230, .35); transition: transform .2s; }
.dgame .dictbtn.dg-play:hover { transform: scale(1.08); background: linear-gradient(135deg, #e3243f, #a33be6); }

.dgame .dictres { text-align: center; font-size: 15px; }
.dgame .dictres .sc { display: inline-block; font: 800 22px var(--sans); margin-right: 10px; vertical-align: middle; }
.dgame .dg-typed { color: #8c8890; vertical-align: middle; }
.dgame .dg-legend { margin-top: 8px; font-size: 12.5px; color: #8c8890; display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; }
.dgame .dg-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.dgame .dg-legend i.ok { background: #7fd49a; } .dgame .dg-legend i.fix { background: #f2b544; } .dgame .dg-legend i.miss { background: #ff6b57; }
.dgame .dg-legend kbd { margin-left: 8px; }

.dg-pop { position: absolute; top: 12px; left: 50%; transform: translate(-50%, -20px) scale(.9); opacity: 0; pointer-events: none; z-index: 3;
  display: flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 99px; background: #17121d; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
  transition: opacity .3s, transform .4s cubic-bezier(.3, 1.5, .5, 1); white-space: nowrap; }
.dg-pop.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.dg-pop b { font: 800 15px var(--sans); color: #fff; }
.dg-pop em { font: 800 15px var(--sans); font-style: normal; color: #9ff0b6; }
.dg-pop em.z { color: #8c8890; font-weight: 600; }
.dg-pop.meh em { color: #ffd27a; }
.dg-stars i { font-style: normal; font-size: 18px; color: rgba(255, 255, 255, .15); display: inline-block; }
.dg-pop.show .dg-stars i.on { color: #ffd24a; text-shadow: 0 0 10px rgba(255, 200, 60, .6); animation: dgStar .5s both cubic-bezier(.3, 1.8, .5, 1); }
@keyframes dgStar { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }

.dictbox.dgame.win { animation: dgWin .7s ease-out; }
@keyframes dgWin { 30% { box-shadow: inset 0 0 0 2px rgba(127, 212, 154, .5), inset 0 0 60px rgba(127, 212, 154, .12); } }
.dictbox.dgame.shake form { animation: dgShake .4s; }
@keyframes dgShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

@media (max-width: 760px) {
  .dgame .dg-stats { width: 100%; justify-content: space-between; }
  .dg-stat { padding: 5px 10px; } .dg-stat small { font-size: 10px; }
  .dg-slot { height: 34px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .dg-slot.rev, .dg-stat.bump, .dictbox.dgame.win, .dictbox.dgame.shake form, .dg-stars i { animation: none !important; } }

/* =====================================================================
   ELEGIR MODO AL ABRIR UN VIDEO: botones redondos estilo mando
   ===================================================================== */
.modepick {
  position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .35), rgba(0, 0, 0, .72)); backdrop-filter: blur(3px);
  animation: pkIn .45s cubic-bezier(.22, .9, .24, 1);
}
.modepick.hidden { display: none; }
@keyframes pkIn { from { opacity: 0; } to { opacity: 1; } }
.pk-title { margin: 0; font: 700 clamp(15px, 1.6vw, 22px) var(--sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .85); text-shadow: 0 2px 12px #000; }
.pk-row { display: flex; gap: clamp(28px, 7vw, 110px); }
.pk { display: flex; flex-direction: column; align-items: center; gap: 14px; border: 0; background: none; color: #fff; cursor: pointer; padding: 0; font: inherit; outline: none; }
.pk-ring {
  display: grid; place-items: center; width: clamp(96px, 13vw, 176px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(70, 64, 60, .55), rgba(20, 18, 18, .7));
  border: 3px solid rgba(255, 255, 255, .85); backdrop-filter: blur(10px);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .1), 0 0 22px rgba(255, 255, 255, .35), inset 0 0 22px rgba(255, 255, 255, .18), 0 18px 40px rgba(0, 0, 0, .5);
  transition: transform .35s cubic-bezier(.3, 1.5, .5, 1), box-shadow .35s, border-color .35s;
}
.pk-ring svg { width: 46%; height: 46%; color: rgba(255, 255, 255, .92); filter: drop-shadow(0 0 6px rgba(255, 255, 255, .45)); }
.pk-lb { font: 600 clamp(13px, 1.45vw, 20px) var(--sans); letter-spacing: .04em; color: #fff; text-shadow: 0 2px 10px #000; white-space: nowrap; }
.pk-lb i { font-style: normal; display: inline-flex; align-items: center; gap: 1px; margin-right: 4px; }
.pk-lb i svg { width: .9em; height: .9em; }
.pk-lb i.tri svg { color: #3fe0c5; }
.pk-lb i.sq svg { color: #f59ad1; }
.pk small { font: 500 clamp(11px, 1vw, 13.5px) var(--sans); color: rgba(255, 255, 255, .6); margin-top: -6px; text-shadow: 0 1px 6px #000; }
.pk:hover .pk-ring, .pk:focus-visible .pk-ring, .pk:focus .pk-ring {
  transform: scale(1.07); border-color: #fff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .16), 0 0 38px rgba(255, 255, 255, .6), inset 0 0 28px rgba(255, 255, 255, .28), 0 18px 40px rgba(0, 0, 0, .5);
}
.pk[data-mode="manual"]:focus .pk-ring svg { color: #3fe0c5; filter: drop-shadow(0 0 10px rgba(63, 224, 197, .8)); }
.pk[data-mode="auto"]:focus .pk-ring svg { color: #f59ad1; filter: drop-shadow(0 0 10px rgba(245, 154, 209, .8)); }
.pk:active .pk-ring { transform: scale(.95); }
.pk-off { border: 0; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .75); padding: 8px 18px; border-radius: 99px; font: 600 13px var(--sans); cursor: pointer; transition: background .25s, color .25s; }
.pk-off:hover, .pk-off:focus { background: rgba(255, 255, 255, .22); color: #fff; outline: none; }
.stage .modepick ~ .script { z-index: 7; }
@media (max-width: 760px) {
  .modepick { gap: 12px; }
  .pk-row { gap: 22px; }
  .pk small { display: none; }
  .pk-lb { font-size: 11.5px; }
}
.stage:has(.modepick:not(.hidden)) .bigplay, .stage:has(.modepick:not(.hidden)) .subs, .stage:has(.modepick:not(.hidden)) .loophint { opacity: 0 !important; pointer-events: none; }

/* las rosas dibujadas en SVG (junto a los titulos y en las tarjetas) se retiran:
   ahora el marco de rosas real (#roseBg) esta detras de todas las secciones y sigue el tema elegido */
.ph-rose, .mc-rose { display: none !important; }

/* barra superior sin enlaces de secciones (Inicio, Buscar, Repaso, Progreso): solo logo, buscador y perfil */
.top .nav { display: none !important; }
/* boton "← Secciones" mas grande */
.page-head .back { font-size: clamp(16px, 1.35vw, 20px); font-weight: 600; padding: 12px 24px; color: #fff;
  background: rgba(0, 0, 0, .55); border-color: rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.page-head .back:hover { background: rgba(0, 0, 0, .75); border-color: #fff; }

/* selector de modo: iconos = teclas L (manual) y K (automatico), explicacion mas clara */
.pk-key { font: 800 clamp(44px, 5.4vw, 82px)/1 var(--sans); color: rgba(255, 255, 255, .92); text-shadow: 0 0 14px rgba(255, 255, 255, .35); transition: color .3s, text-shadow .3s; }
.pk[data-mode="manual"] .pk-key { color: #3fe0c5; text-shadow: 0 0 16px rgba(63, 224, 197, .55); }
.pk[data-mode="auto"] .pk-key { color: #f59ad1; text-shadow: 0 0 16px rgba(245, 154, 209, .55); }
.pk-kbd { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; margin-right: 6px; padding: 0 .3em; border-radius: 6px;
  font: 800 .85em var(--sans); color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); box-shadow: 0 2px 0 rgba(255, 255, 255, .2); vertical-align: middle; }
.pk[data-mode="manual"] .pk-kbd { border-color: #3fe0c5; }
.pk[data-mode="auto"] .pk-kbd { border-color: #f59ad1; }
.pk small { max-width: 300px; line-height: 1.5; text-align: center; white-space: normal; color: rgba(255, 255, 255, .85); font-size: clamp(12px, 1.05vw, 14.5px); }
.pk small kbd, .pk-sub kbd { font: 700 .92em var(--sans); padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); color: #fff; }
.pk-sub { margin: -6px 0 4px; font: 500 clamp(12px, 1.1vw, 15px) var(--sans); color: rgba(255, 255, 255, .75); text-shadow: 0 2px 10px #000; }

/* =====================================================================
   SECCION PREMIUM (Cristopher Videos / Music / Word by word)
   cabecera editorial + modos con borde vivo + tarjetas de video cinematograficas
   ===================================================================== */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
:root { --acc1: #ff5d7a; --acc2: #ffb3c7; --acc3: #f2c27a; --accRgb: 255, 93, 122; }
html[data-theme="gothic"] { --acc1: #e3132f; --acc2: #ff6a7d; --acc3: #d9d2d6; --accRgb: 227, 19, 47; }

/* velo oscuro + grano: las rosas quedan como marco y el centro se lee limpio */
#library.browse:not([data-mode="pick"]):not([data-mode=""]) .canvas::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 62% 70% at 50% 42%, rgba(4, 2, 4, .9) 0%, rgba(4, 2, 4, .72) 45%, rgba(4, 2, 4, .12) 78%, transparent 100%),
    radial-gradient(ellipse 40% 30% at 50% 0%, rgba(var(--accRgb), .16), transparent 70%); }
#library.browse:not([data-mode="pick"]):not([data-mode=""]) .canvas::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- boton volver: cristal con flecha que se desliza */
.page-head .back { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px 10px 14px; font: 600 15px var(--sans); letter-spacing: .01em;
  color: #fff; border-radius: 99px; background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 30px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); transition: border-color .35s, box-shadow .35s, transform .35s var(--ease); }
.page-head .back svg { width: 18px; height: 18px; transition: transform .45s var(--ease); }
.page-head .back:hover { color: #fff; border-color: rgba(var(--accRgb), .6); background: linear-gradient(135deg, rgba(var(--accRgb), .22), rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 24px rgba(var(--accRgb), .3), 0 10px 30px rgba(0, 0, 0, .45); }
.page-head .back:hover svg { transform: translateX(-4px); }

/* ---------- cabecera editorial */
#library[data-mode="english"] .page-head, #library[data-mode="music"] .page-head, #library[data-mode="words"] .page-head { gap: 0; padding-top: 9vh; padding-bottom: 4vh; }
.ph-eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 700 11.5px var(--sans); letter-spacing: .34em; text-transform: uppercase;
  color: var(--acc2); animation: phUp .9s var(--ease) both; }
.ph-eyebrow::before, .ph-eyebrow::after { content: ""; width: 38px; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.ph-eyebrow::after { transform: scaleX(-1); }
.ph-eyebrow:empty { display: none; }
.page-head h1#pageTitle { margin: 0; font: 800 clamp(44px, 7vw, 104px)/.95 var(--sans); letter-spacing: -.045em; color: #fff;
  text-shadow: 0 10px 50px rgba(0, 0, 0, .6); animation: phUp 1s var(--ease) .08s both; }
#pageTitle em { font: italic 500 1.06em/1 var(--serif); letter-spacing: -.03em; padding: 0 .06em 0 .02em;
  background: linear-gradient(100deg, var(--acc1) 0%, var(--acc2) 30%, #fff 46%, var(--acc3) 60%, var(--acc1) 100%); background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: phShine 7s linear infinite; filter: drop-shadow(0 4px 30px rgba(var(--accRgb), .35)); }
@keyframes phShine { to { background-position: -240% 0; } }
@keyframes phUp { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.ph-stats { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; margin: 18px 0 0; font: 500 14.5px var(--sans); color: #b9b2bd;
  animation: phUp 1s var(--ease) .16s both; }
.ph-stats b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.ph-stats i { width: 4px; height: 4px; border-radius: 50%; background: var(--acc1); box-shadow: 0 0 10px var(--acc1); }
.ph-stats:empty { display: none; }

/* ---------- selector de modo: tarjetas con borde vivo y luz que sigue al mouse */
#library[data-mode="english"] .modesw { margin-top: clamp(28px, 5vh, 48px); grid-template-columns: repeat(2, minmax(0, 380px)); gap: 18px; animation: phUp 1s var(--ease) .24s both; }
.modesw .mcard { --mx: 30%; --my: 0%; isolation: isolate; gap: 6px; padding: 26px 28px 24px; min-height: 190px; border-radius: 24px; color: #a39fa8;
  background: linear-gradient(160deg, rgba(28, 22, 30, .78), rgba(10, 8, 12, .86)); border: 1px solid rgba(255, 255, 255, .09);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 60px rgba(0, 0, 0, .55); }
.modesw .mcard::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(var(--accRgb), .16), transparent 65%); }
.modesw .mcard:hover::before { opacity: 1; }
.modesw .mcard::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: conic-gradient(from var(--ang), transparent 0 55%, var(--acc1) 70%, var(--acc2) 80%, var(--acc3) 86%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: mcSpin 4.5s linear infinite; }
@keyframes mcSpin { to { --ang: 360deg; } }
.modesw .mcard:hover { transform: translateY(-5px); background: linear-gradient(160deg, rgba(34, 26, 36, .82), rgba(12, 9, 14, .9)); border-color: rgba(255, 255, 255, .16); }
.modesw .mcard.on, .modesw .mcard[data-mode="dict"].on { color: #fff; border-color: rgba(var(--accRgb), .25);
  background: radial-gradient(130% 120% at 0% 0%, rgba(var(--accRgb), .2) 0%, rgba(24, 10, 16, .88) 45%, rgba(10, 7, 10, .92) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 60px rgba(var(--accRgb), .18), 0 28px 70px rgba(0, 0, 0, .7); }
.modesw .mcard.on::after { opacity: 1; }
.mc-num { position: absolute; right: 22px; top: 14px; font: italic 500 64px/1 var(--serif); letter-spacing: -.04em; color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .14); transition: -webkit-text-stroke-color .5s, transform .6s var(--ease); }
.mcard:hover .mc-num { transform: translateY(-3px) rotate(-4deg); }
.mcard.on .mc-num { -webkit-text-stroke-color: rgba(var(--accRgb), .55); }
.mc-ico { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; border-radius: 14px; font-size: 0; color: #d8d2dc;
  background: linear-gradient(145deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); filter: none; transition: color .4s, background .4s, box-shadow .4s, transform .6s cubic-bezier(.3, 1.5, .5, 1); }
.mc-ico svg { width: 24px; height: 24px; }
.mcard:hover .mc-ico { transform: rotate(-6deg) scale(1.06); }
.mcard.on .mc-ico { color: #fff; background: linear-gradient(145deg, var(--acc1), color-mix(in srgb, var(--acc1) 45%, #2a0610));
  border-color: rgba(255, 255, 255, .25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 26px rgba(var(--accRgb), .45); }
.mc-t { font: 700 clamp(19px, 1.6vw, 23px) var(--sans); letter-spacing: -.015em; }
.mc-d { color: #8f8994; max-width: 28ch; }
.mc-ok, .mcard[data-mode="dict"] .mc-ok { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding: 5px 11px 5px 9px; border-radius: 99px;
  font: 700 10.5px var(--sans); letter-spacing: .14em; color: #fff; background: rgba(var(--accRgb), .16); border: 1px solid rgba(var(--accRgb), .4); }
.mc-ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--acc1); box-shadow: 0 0 0 0 rgba(var(--accRgb), .7); animation: mcPulse 1.8s infinite; }
@keyframes mcPulse { 70% { box-shadow: 0 0 0 7px rgba(var(--accRgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accRgb), 0); } }

/* ---------- cabecera de la biblioteca */
#library.browse .nf-head { display: flex; align-items: center; gap: 12px; max-width: 1120px; margin: 0 auto 22px; padding: 0; }
#library.browse .nf-head h2 { font: 700 12px var(--sans); letter-spacing: .28em; text-transform: uppercase; color: #fff; }
#library.browse .nf-head .nf-count { font: 700 11.5px var(--sans); color: var(--acc2); padding: 3px 10px; border-radius: 99px; background: rgba(var(--accRgb), .12); border: 1px solid rgba(var(--accRgb), .3); }
#library.browse .nf-head span { order: 3; margin-left: auto; font-size: 12.5px; color: #8a838e; }
#library.browse .nf-head::after { content: ""; order: 2; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, .18), transparent); }

/* ---------- rejilla */
#library.browse .nf-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 350px)); justify-content: center; gap: 22px; max-width: 1120px; margin: 0 auto; padding: 0; overflow: visible; }

/* ---------- tarjeta de video */
.vc { --mx: 50%; --my: 0%; position: relative; aspect-ratio: 16 / 11; border-radius: 22px; overflow: hidden; cursor: pointer; isolation: isolate; outline: none;
  background: #0e0b0f; border: 1px solid rgba(255, 255, 255, .1); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 24px 60px rgba(0, 0, 0, .55);
  animation: vcIn .9s var(--ease) both; animation-delay: calc(.3s + var(--i, 0) * 80ms);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .5s; }
@keyframes vcIn { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }
.vc-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.vc-img { position: absolute; inset: 0; background: #1b181e center/cover no-repeat; transform: scale(1.02); filter: saturate(1.05) brightness(.92);
  transition: transform 1.2s var(--ease), filter .8s; }
.vc-media::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, transparent 26%, transparent 42%, rgba(6, 3, 6, .82) 78%, rgba(6, 3, 6, .96) 100%); }
/* reflejo diagonal + luz de mouse */
.vc::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(255, 255, 255, .13), transparent 60%); }
.vc::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; padding: 1.5px; opacity: 0; transition: opacity .5s;
  background: conic-gradient(from var(--ang), transparent 0 60%, var(--acc1) 74%, var(--acc2) 82%, var(--acc3) 87%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: mcSpin 4s linear infinite; }
.vc:hover, .vc:focus-visible { transform: translateY(-8px); border-color: rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 70px rgba(var(--accRgb), .22), 0 40px 80px rgba(0, 0, 0, .7); }
.vc:hover::before, .vc:hover::after, .vc:focus-visible::after { opacity: 1; }
.vc:hover .vc-img, .vc:focus-visible .vc-img { transform: scale(1.09); filter: saturate(1.15) brightness(1); }

.vc-top { position: absolute; left: 14px; right: 14px; top: 14px; z-index: 2; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.vc-plat, .vc-dur { font: 700 11px var(--sans); letter-spacing: .06em; padding: 5px 10px; border-radius: 99px; color: #fff;
  background: rgba(10, 8, 12, .55); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.vc-plat { text-transform: uppercase; letter-spacing: .16em; font-size: 10px; }
.vc-dur { font-variant-numeric: tabular-nums; transition: opacity .35s; }
.vc:hover .vc-dur { opacity: 0; }

.vc-tools { position: absolute; top: 12px; right: 12px; z-index: 4; display: flex; gap: 6px; opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .45s var(--ease); }
.vc:hover .vc-tools, .vc:focus-within .vc-tools { opacity: 1; transform: none; }
.vc-tools button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; cursor: pointer; color: #fff;
  background: rgba(10, 8, 12, .6); border: 1px solid rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background .25s, border-color .25s, transform .25s; }
.vc-tools button svg { width: 15px; height: 15px; }
.vc-tools button:hover { transform: scale(1.1); border-color: #fff; background: rgba(255, 255, 255, .16); }
.vc-tools button[data-del]:hover { background: #e3243f; border-color: #e3243f; }

.vc-play { position: absolute; left: 50%; top: 44%; z-index: 2; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: #fff;
  background: linear-gradient(145deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .06)); border: 1px solid rgba(255, 255, 255, .35);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 12px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .4);
  opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: opacity .4s, transform .6s cubic-bezier(.3, 1.5, .5, 1), background .3s; }
.vc-play svg { width: 26px; height: 26px; margin-left: 3px; }
.vc:hover .vc-play, .vc:focus-visible .vc-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.vc-play:hover, .vc:hover .vc-play:hover { background: var(--acc1); }

.vc-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 18px 16px; transition: transform .6s var(--ease); }
.vc:hover .vc-body { transform: translateY(-2px); }
.vc-title { margin: 0; font: 700 17px/1.25 var(--sans); letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; text-shadow: 0 2px 14px rgba(0, 0, 0, .8); }
.vc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; font: 500 12px var(--sans); color: #c9c2cc; }
.vc-meta:empty { display: none; }
.vc-hot { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; }
.vc-hot i { width: 6px; height: 6px; border-radius: 50%; background: var(--acc1); box-shadow: 0 0 10px var(--acc1); }
.vc .state { margin-top: 8px; font-size: 12px; color: var(--acc2); }
.vc .state.err { color: #ff8a7a; }
.vc .bar { height: 3px; margin-top: 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.vc .bar i { background: linear-gradient(90deg, var(--acc1), var(--acc3)); box-shadow: 0 0 12px var(--acc1); }
.vc.busy .vc-img { filter: grayscale(.6) brightness(.6); }

/* ---------- tarjeta para añadir */
.vc-add { --mx: 50%; --my: 50%; position: relative; aspect-ratio: 16 / 11; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border-radius: 22px; cursor: pointer; color: #fff; font: inherit; overflow: hidden; isolation: isolate;
  background: radial-gradient(300px circle at var(--mx) var(--my), rgba(var(--accRgb), .14), transparent 65%), rgba(12, 9, 13, .55);
  border: 1.5px dashed rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  animation: vcIn .9s var(--ease) both; animation-delay: .45s; transition: border-color .4s, transform .6s var(--ease), box-shadow .6s; }
.vc-add:hover, .vc-add:focus-visible { outline: none; border-color: rgba(var(--accRgb), .75); transform: translateY(-8px); box-shadow: 0 0 60px rgba(var(--accRgb), .2), 0 30px 70px rgba(0, 0, 0, .6); }
.vc-add-ring { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 6px; border-radius: 50%; color: #fff;
  background: linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .22);
  transition: transform .7s cubic-bezier(.3, 1.5, .5, 1), background .4s, box-shadow .4s; }
.vc-add-ring svg { width: 26px; height: 26px; }
.vc-add:hover .vc-add-ring { transform: rotate(90deg) scale(1.08); background: linear-gradient(145deg, var(--acc1), color-mix(in srgb, var(--acc1) 45%, #2a0610)); box-shadow: 0 12px 30px rgba(var(--accRgb), .45); }
.vc-add b { font: 700 16px var(--sans); letter-spacing: -.01em; }
.vc-add small { font: 500 12px var(--sans); color: #8f8994; letter-spacing: .02em; }

@media (max-width: 760px) {
  #library[data-mode="english"] .page-head, #library[data-mode="music"] .page-head, #library[data-mode="words"] .page-head { padding-top: 76px; }
  .page-head .back { padding: 8px 16px 8px 10px; font-size: 14px; }
  .ph-eyebrow { font-size: 10px; letter-spacing: .24em; }
  .ph-eyebrow::before, .ph-eyebrow::after { width: 20px; }
  #library[data-mode="english"] .modesw { grid-template-columns: 1fr; }
  .modesw .mcard { min-height: 0; }
  .mc-num { font-size: 48px; }
  #library.browse .nf-head span { display: none; }
  .vc-tools, .vc-play { opacity: 1; transform: none; }
  .vc-play { transform: translate(-50%, -50%); width: 52px; height: 52px; }
  .vc-dur { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vc, .vc-add, .ph-eyebrow, .page-head h1#pageTitle, .ph-stats, #library[data-mode="english"] .modesw, #pageTitle em, .modesw .mcard::after, .vc::after, .mc-ok::before { animation: none !important; }
}

/* =====================================================================
   DICTADO v3: video limpio arriba, barra de progreso justo debajo,
   play/loop/tiempo a la izquierda y guion + velocidades a la derecha
   ===================================================================== */
.dictdock { display: contents; }
#player.docked .dictdock {
  display: grid; flex: none; align-items: stretch;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 1000px) minmax(280px, 1fr);
  background: radial-gradient(90% 140% at 50% -20%, rgba(143, 60, 224, .12), transparent 60%), #09080b;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
#player.docked .dictdock .dictbox { border-top: 0; background: transparent; min-width: 0; }

/* barra de progreso: franja propia bajo el video, no lo tapa */
#player.docked .scrubslot { position: relative; flex: none; padding: 2px clamp(16px, 2.4vw, 34px) 6px; background: #09080b; opacity: .55; transition: opacity .3s; }
#player.docked .scrubslot:hover { opacity: 1; }
#player.docked .scrubslot .scrub { margin: 0; }

/* columna izquierda: play, loop y tiempo */
#player.docked .dock-l { padding: clamp(10px, 1.6vh, 16px) 12px 16px clamp(16px, 2.4vw, 34px); }
#player.docked .dock-l .ctrl-left { flex-wrap: wrap; gap: 10px; }

/* columna derecha: velocidades arriba y el guion ocupando el resto (con scroll) */
#player.docked .dock-r { display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: clamp(10px, 1.6vh, 16px) clamp(16px, 2.4vw, 34px) 16px 12px; }
#player.docked .dock-r .ctrl-right { justify-content: flex-end; }
#player.docked .dock-script { position: relative; flex: 1 1 auto; min-height: 140px; }
#player.docked .dock-script .script {
  position: absolute; inset: 0; width: auto; opacity: 1; transform: none; pointer-events: auto;
  background: rgba(255, 255, 255, .03); backdrop-filter: none; box-shadow: none;
}

@media (max-width: 1180px) {
  #player.docked .dictdock { grid-template-columns: minmax(0, 1fr); }
  #player.docked .dock-l { padding: 10px 16px 0; }
  #player.docked .dock-l .ctrl-left { justify-content: center; }
  #player.docked .dock-r { padding: 0 16px 16px; }
  #player.docked .dock-r .ctrl-right { justify-content: center; }
  #player.docked .dock-script { flex: none; height: 240px; }
  #player.docked .cinema { height: auto; }
  #player.docked .stage { flex: none; height: 56.25vw; max-height: 62vh; }
}
@media (max-width: 760px) { #player.docked .cbtn span { display: inline; } }

/* toda la barra (play/loop/tiempo + marcador del dictado + velocidades) abajo, debajo del teclado */
#player.docked .dictbox.dgame { display: flex; flex-direction: column; }
#player.docked .dictbox.dgame > :not(.dg-pop) { width: 100%; box-sizing: border-box; }
#player.docked .dictbox.dgame .dg-hud { order: 10; margin: clamp(8px, 1.4vh, 14px) auto 0; }
#player.docked .dictbox.dgame .dg-bar { order: 11; margin: 8px auto 0; }
#player.docked .dock-l { display: flex; flex-direction: column; justify-content: flex-end; }
#player.docked .dock-r .ctrl-right { order: 2; }

/* video más grande en dictado: teclado y casillas más compactos (se ajustan al alto de la ventana) */
#player.docked .stage { min-height: 46vh; }
#player.docked .vkb { max-width: 780px; margin-top: clamp(4px, .8vh, 10px); }
#player.docked .kb-row { --kh: min(calc(var(--u) * .92), clamp(24px, 3.8vh, 40px)); }
#player.docked .kb-plate { padding: clamp(6px, .9vh, 10px) clamp(8px, 1vw, 12px); }
#player.docked .dictbox.dgame { padding-top: clamp(6px, 1vh, 12px); padding-bottom: clamp(6px, 1vh, 12px); }
#player.docked .dgame .dg-slots { margin-bottom: clamp(4px, .9vh, 10px); }
#player.docked .dg-slot { height: clamp(24px, 3.4vh, 36px); }
#player.docked .dictbox.dgame .dictbtn, #player.docked .dictbox.dgame input, #player.docked .dictbox.dgame .dictgo { height: clamp(36px, 4.6vh, 44px); }
#player.docked .dgame .dictbtn.dg-play { width: clamp(36px, 4.6vh, 44px); }
#player.docked .dictbox.dgame form { max-width: 780px; }
#player.docked .dictbox.dgame .dg-hud { margin-top: clamp(6px, 1vh, 12px); }
#player.docked .cbtn.play { width: 48px; height: 48px; }

/* en dictado se quita la barra de arriba (logo + buscador) para darle ese alto al video; "← Inicio" sigue en el video */
body:has(#player.docked:not(.hidden)) .top { display: none; }

/* guion: traduccion de cada frase + guardar palabras / expresiones */
.script-h .g-esbtn { width: auto; height: 26px; padding: 0 10px; border-radius: 99px; font: 700 11px var(--sans); letter-spacing: .06em; color: #8c8890; }
.script-h .g-esbtn.on { background: rgba(255, 255, 255, .9); color: #000; }
.g-hint { margin: 0; padding: 6px 18px 0; font-size: 11px; color: #77727c; }
.script .plist li { align-items: flex-start; position: relative; }
.plist li .gx { flex: 1; min-width: 0; }
.plist li .gen { user-select: text; }
.plist li .gw { border-radius: 4px; transition: background .15s; }
.plist li .gw:hover { background: rgba(255, 255, 255, .1); }
.plist li .gw.sv { box-shadow: inset 0 -2px 0 var(--gold); color: #fff; }
.plist li .ges { display: block; margin-top: 3px; font-size: 12.5px; font-style: italic; color: #a59fb0; line-height: 1.35; }
.plist li .ges:empty { display: none; }
.plist.no-es li .ges { display: none; }
.plist li .gsave { flex: none; border: 0; background: transparent; color: #8c8890; font-size: 16px; line-height: 1; padding: 2px 2px; cursor: pointer; opacity: 0; transition: opacity .2s, color .2s; }
.plist li:hover .gsave, .plist li.cur .gsave, .plist li .gsave.on { opacity: 1; }
.plist li .gsave:hover { color: #fff; }
.plist li .gsave.on { color: var(--gold); }
.gpop { position: fixed; z-index: 2147483000; width: max-content; max-width: min(320px, calc(100vw - 16px)); background: #1d1624; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 10px 10px 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); color: var(--text, #fff); }
.gpop .gp-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.gpop .gp-h b { font: 600 18px var(--serif); color: var(--gold); overflow-wrap: anywhere; }
.gpop .gp-h button { border: 0; background: transparent; color: #8c8890; cursor: pointer; padding: 2px 4px; }
.gpop .gp-es { margin: 6px 2px 8px; font-size: 14px; color: #e5dfe9; }
.gpop .gp-row { display: flex; gap: 6px; }
.gpop .gp-row button { flex: 1; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .05); color: #fff; border-radius: 9px; padding: 7px 10px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.gpop .gp-row button:hover { background: rgba(255, 255, 255, .12); }
.gpop .gp-row button.on { color: var(--gold); border-color: var(--gold); }
.savedlist .wes { color: var(--dim); font-style: italic; }
.savedlist .wes.blk { display: block; margin-top: 2px; }

/* nota de contexto (por que lo dice: dobles sentidos, referencias, chistes) */
.plist li .gnote { display: block; margin-top: 5px; font-size: 12px; line-height: 1.4; color: #e9c46a; opacity: .9; }
.plist li .gnote:empty { display: none; }
.plist.no-es li .gnote { display: none; }
.gpop .gp-note { margin: -2px 2px 10px; font-size: 13px; line-height: 1.45; color: #e9c46a; }
.gpop .gp-note:empty { display: none; }
.slg.nota { display: block; color: #e9c46a; }
.savedlist .wes.nota { color: #e9c46a; font-style: normal; }
.wb-hint kbd, .wb-res kbd { font: 600 11.5px var(--sans); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--hair); background: rgba(255, 255, 255, .06); color: var(--gold2); }
