/* ClipZap — tema neón que cambia de color según la plataforma */
:root {
  --bg: #0b0918;
  --bg-2: #13102a;
  --card: rgba(255, 255, 255, .055);
  --card-b: rgba(255, 255, 255, .11);
  --text: #f3f1ff;
  --muted: #a7a2c6;
  --a1: #8b5cf6;            /* acento 1 */
  --a2: #ec4899;            /* acento 2 */
  --a-text: #fff;
  --radius: 18px;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body[data-platform="tiktok"]  { --a1: #25f4ee; --a2: #fe2c55; --a-text: #0b0918; }
body[data-platform="youtube"] { --a1: #ff0033; --a2: #ff7a00; --a-text: #fff; }
body[data-platform="x"]       { --a1: #e7e9ea; --a2: #71767b; --a-text: #0b0918; }
body[data-platform="instagram"] { --a1: #f77737; --a2: #c13584; --a-text: #fff; }
body[data-platform="facebook"]  { --a1: #1877f2; --a2: #00b2ff; --a-text: #fff; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; }
svg { fill: currentColor; }

/* fondo animado */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed; z-index: -1; left: 50%; top: -260px;
  width: 900px; height: 600px; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--a1) 45%, transparent), transparent),
              radial-gradient(closest-side at 70% 60%, color-mix(in srgb, var(--a2) 40%, transparent), transparent);
  filter: blur(40px); opacity: .55;
  transition: background .6s;
  pointer-events: none;
}

/* nav */
.nav {
  max-width: 1100px; margin: 0 auto; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.35rem; letter-spacing: -.02em; }
.brand b { background: linear-gradient(90deg, var(--a1), var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--text); }
.nav-app { display: inline-flex; align-items: center; gap: 6px; }
.nav-app svg { width: 18px; height: 18px; color: #3ddc84; }

/* anuncios */
.ad {
  max-width: 970px; margin: 8px auto; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ad-top { margin: 0 auto 8px; width: calc(100% - 32px); }
.ad-mid { margin-top: 28px; width: 100%; min-height: 250px; }
.ad-wide { display: block; }
.ad-wide { width: calc(100% - 32px); }

/* hero */
main { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.hero { max-width: 820px; margin: 0 auto; padding: 36px 0 20px; text-align: center; }
h1 { font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 14px; }
.grad { background: linear-gradient(90deg, var(--a1), var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; transition: all .4s; }
body[data-platform="none"] .grad { background-image: linear-gradient(90deg, #25f4ee, #8b5cf6, #fe2c55); }
.sub { color: var(--muted); font-size: 1.08rem; margin: 0 auto 26px; max-width: 560px; }

.platforms { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--card-b); color: var(--muted);
  font: 500 .95rem var(--font); transition: all .25s;
}
.chip svg { width: 18px; height: 18px; }
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.chip.on { color: var(--a-text); background: linear-gradient(90deg, var(--a1), var(--a2)); border-color: transparent;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--a1) 35%, transparent); }

.more-sites { margin: -6px auto 18px; color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 6px; align-items: center; max-width: 640px; }
.site { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--card-b); background: transparent;
  color: var(--muted); font: 500 .82rem var(--font); cursor: pointer; }
.site:hover, .site.on { color: var(--text); border-color: color-mix(in srgb, var(--a1) 70%, transparent); }

/* buscador */
.search {
  display: flex; gap: 10px; padding: 8px;
  background: rgba(255,255,255,.07); border: 1px solid var(--card-b); border-radius: calc(var(--radius) + 4px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 0 0 1px color-mix(in srgb, var(--a1) 0%, transparent);
  transition: box-shadow .3s;
}
.search:focus-within { box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 0 0 2px color-mix(in srgb, var(--a1) 70%, transparent); }
.field { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: 12px; }
.field-ico { width: 20px; height: 20px; color: var(--muted); flex: none; }
.field input {
  flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; background: transparent;
  color: var(--text); font: 400 1.05rem var(--font);
}
.field input::placeholder { color: #7d78a0; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 8px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid var(--card-b); color: var(--text);
  font: 500 .9rem var(--font);
}
.btn-ghost svg { width: 16px; height: 16px; }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-main {
  position: relative; flex: none; min-width: 150px; height: 56px; padding: 0 26px;
  border: 0; border-radius: var(--radius); cursor: pointer;
  background: linear-gradient(90deg, var(--a1), var(--a2)); color: var(--a-text);
  font: 700 1.05rem var(--font);
  transition: transform .15s, filter .2s;
}
body[data-platform="none"] .btn-main { background: linear-gradient(90deg, #7c3aed, #ec4899); color: #fff; }
.btn-main:hover { filter: brightness(1.08); }
.btn-main:active { transform: scale(.97); }
.btn-main:disabled { cursor: progress; filter: saturate(.6); }
.spinner {
  display: none; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
.loading .lbl { display: none; }
.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.msg { margin: 14px 0 0; padding: 12px 16px; border-radius: 12px; background: rgba(254,44,85,.12); border: 1px solid rgba(254,44,85,.35); color: #ffb3c1; }

/* resultado */
.result[hidden] { display: none; }
.result {
  margin-top: 24px; display: grid; grid-template-columns: 200px 1fr; gap: 20px; text-align: left;
  padding: 16px; border-radius: calc(var(--radius) + 4px);
  background: var(--card); border: 1px solid var(--card-b); backdrop-filter: blur(10px);
  animation: pop .35s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.thumb { position: relative; border-radius: 14px; overflow: hidden; background: var(--bg-2); aspect-ratio: 9/16; max-height: 360px; align-self: start; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.75); font-size: .8rem; }
.badge { position: absolute; left: 8px; top: 8px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: linear-gradient(90deg, var(--a1), var(--a2)); color: var(--a-text); }
.info h2 { margin: 4px 0 6px; font-size: 1.15rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.author { color: var(--muted); margin: 0 0 16px; }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 13px 16px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid var(--card-b); color: var(--text);
  font: 500 1rem var(--font); text-align: left; transition: all .2s;
}
.opt:hover { border-color: color-mix(in srgb, var(--a1) 70%, transparent); background: rgba(255,255,255,.1); }
.opt.primary { background: linear-gradient(90deg, var(--a1), var(--a2)); color: var(--a-text); border-color: transparent; font-weight: 700; }
.opt svg { width: 20px; height: 20px; flex: none; }
.opt:disabled { opacity: .6; cursor: progress; }
a.opt { position: relative; text-decoration: none; color: inherit; }
a.opt.primary { color: var(--a-text); }
.ad-tag { position: absolute; top: -8px; right: 10px; padding: 1px 7px; border-radius: 999px; font: 700 .68rem/1.5 inherit;
          font-style: normal; letter-spacing: .04em; color: #fff; background: rgba(20,16,40,.85); border: 1px solid rgba(255,255,255,.35); }
.status { margin: 14px 0 0; color: var(--muted); font-size: .95rem; }
.status-text { margin: 0; display: flex; align-items: center; gap: 10px; }
.status .spinner { width: 16px; height: 16px; border-width: 2px; color: var(--a1); flex: none; }
.status.spin .spinner { display: inline-block; }
/* pista del patito */
.track { position: relative; margin-top: 12px; height: 58px; padding-right: 26px; }
.track-line { position: absolute; left: 0; right: 26px; bottom: 6px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.track-fill { display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--a1), var(--a2)); transition: width .6s ease; }
.track .flag { position: absolute; right: 0; bottom: 2px; font-size: 1.25rem; line-height: 1; }
.duck { position: absolute; bottom: 9px; width: 52px; height: 49px; left: calc(var(--p, 0) * (100% - 78px));
  transition: left .6s ease; animation: bob .32s ease-in-out infinite alternate; }
.leg { transform-box: fill-box; transform-origin: 50% 0; animation: run .32s ease-in-out infinite alternate; }
.leg-b { animation-direction: alternate-reverse; }
.track.indeterminate .duck { transition: none; animation: bob .32s ease-in-out infinite alternate, waddle 3.2s linear infinite; }
.track.indeterminate .track-fill { width: 100% !important; opacity: .25; }
.track.done .duck { animation: hop .5s ease-out 3; }
.track.done .leg { animation: none; }
@keyframes bob { from { translate: 0 0; } to { translate: 0 -3px; } }
@keyframes run { from { rotate: 28deg; } to { rotate: -28deg; } }
@keyframes waddle { from { left: 0; } to { left: calc(100% - 78px); } }
@keyframes hop { 0%, 100% { translate: 0 0; } 45% { translate: 0 -14px; } }

/* reproductor MP3 */
.player { margin-top: 14px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--card-b); }
.player[hidden] { display: none; }
.player p { margin: 0 0 8px; font-weight: 500; }
.player audio { width: 100%; height: 40px; color-scheme: dark; }
.player video { display: block; width: 100%; max-height: 60vh; border-radius: 10px; background: #000; }
.player video[hidden], .player audio[hidden], .player [hidden] { display: none; }
.player .saved { margin: 10px 0 0; font-weight: 400; font-size: .92rem; word-break: break-word; }
.player .saved b { color: var(--text, #fff); }
.player-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.player-actions:not(:has(:not([hidden]))) { display: none; }
.status-link[hidden] { display: none; }
.status-link { display: inline-block; margin-top: 10px; color: var(--text); font-size: .9rem; }
.status.ok { color: #6ee7b7; }
.status.err { color: #ffb3c1; }

/* secciones */
section h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); letter-spacing: -.02em; text-align: center; margin: 0 0 24px; }
.steps { padding: 56px 0 24px; }
.steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-b); }
.steps i {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-style: normal; font-weight: 700;
  background: linear-gradient(135deg, #25f4ee, #8b5cf6 55%, #fe2c55); color: #0b0918;
}
.steps h3 { margin: 14px 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 24px 0 32px; }
.feat { padding: 18px; border-radius: var(--radius); border: 1px solid var(--card-b); background: linear-gradient(160deg, rgba(255,255,255,.06), transparent); }
.feat b { font-size: 1.02rem; }
.feat p { color: var(--muted); margin: 6px 0 0; font-size: .93rem; }

.faq { max-width: 760px; margin: 0 auto; padding: 40px 0 56px; }
.faq details { border-bottom: 1px solid var(--card-b); padding: 16px 4px; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); margin: 10px 0 0; }

.foot { text-align: center; color: var(--muted); font-size: .88rem; padding: 28px 16px 40px; border-top: 1px solid var(--card-b); }
.foot p { margin: 6px 0; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; max-width: 900px; margin: 0 auto 18px; font-size: .84rem; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); text-decoration: underline; }

/* páginas simples (legal / error) */
.page { max-width: 760px; margin: 0 auto; padding: 30px 16px 60px; line-height: 1.65; }
.page h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.page p, .page li { color: var(--muted); }
.page .btn-main { display: inline-flex; align-items: center; text-decoration: none; height: 50px; margin-top: 10px; }

/* banner de la app (navegador Android) */
.app-banner {
  display: flex; align-items: center; gap: 12px; margin: 0 16px 10px; padding: 10px 12px;
  border-radius: 16px; text-decoration: none; background: var(--card); border: 1px solid var(--card-b);
}
.app-banner[hidden] { display: none; }
.app-banner img { border-radius: 10px; flex: none; }
.app-banner span { flex: 1; min-width: 0; display: grid; }
.app-banner small { color: var(--muted); font-size: .8rem; }
.app-banner em { font-style: normal; font-weight: 700; padding: 8px 14px; border-radius: 12px; background: #3ddc84; color: #0b0918; }
.app-banner-x { background: none; border: 0; color: var(--muted); font-size: 1.4rem; padding: 0 4px; cursor: pointer; }

/* página de la app */
.app-page { text-align: center; }
.app-page ul, .app-page ol { text-align: left; max-width: 460px; margin: 0 auto; }
.app-page h2 { margin-top: 36px; }
.app-icon { border-radius: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.app-meta { margin-top: -6px; }
.btn-big { gap: 10px; font-size: 1.15rem; height: 60px !important; padding: 0 34px; }
.btn-big svg { width: 24px; height: 24px; }
.install-steps li { margin: 6px 0; }
.app-note { font-size: .9rem; margin-top: 28px; }
.app-page .btn-ghost { text-decoration: none; margin-top: 16px; padding: 12px 18px; }

/* dentro de la app Android */
.app-only { display: none; }
.in-app .app-only { display: inline; }
.in-app .nav-app.app-only { display: inline-flex; }
.in-app .web-only { display: none !important; }
.in-app .nav { padding-top: max(12px, env(safe-area-inset-top)); }


/* ---------- app Android: pestañas de abajo */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; justify-content: space-around;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: #110e24; border-top: 1px solid var(--card-b);
}
.tabbar a { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 4px 0;
  color: var(--muted); text-decoration: none; font-size: .74rem; font-weight: 500; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a.on { color: #25f4ee; }
.has-tabs .foot { padding-bottom: 96px; }
.has-tabs main.yt { padding-bottom: 90px; }

/* celulares sencillos: sin desenfoques (son lo que más pesa al dibujar) */
.in-app .bg-glow { filter: none; opacity: .3; }
.in-app .search, .in-app .result { backdrop-filter: none; }
.in-app .bg-grid { display: none; }

/* ---------- guía "Compartir → Dulce-tap" (solo app) */
.share-help { margin: 28px auto 0; max-width: 560px; padding: 18px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-b); }
.share-help h2 { font-size: 1.3rem; margin-bottom: 14px; }
.share-help ol { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.share-help li { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.share-help li b { color: var(--text); }
.share-help i { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
  font-style: normal; font-weight: 700; background: linear-gradient(135deg, #25f4ee, #fe2c55); color: #0b0918; }
.share-open { display: flex; align-items: center; justify-content: center; width: 100%; text-decoration: none;
  background: #ffd23f !important; color: #1b1530 !important; }

/* botón "Guardar en Fotos" (iPhone) */
.player .gallery-btn { width: 100%; height: 52px; min-width: 0; }
#r-files { text-decoration: none; }

/* ---------- YouTube (solo app) */
main.yt { max-width: 760px; padding-top: 4px; }
.yt-search { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 16px;
  background: rgba(255,255,255,.07); border: 1px solid var(--card-b); position: sticky; top: 6px; z-index: 5; }
.yt-search input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent;
  color: var(--text); font: 400 16px var(--font); }
.yt-search input::-webkit-search-cancel-button { filter: invert(1); }
.yt-go { flex: none; height: 42px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, #ff0033, #ff7a00); color: #fff; font: 700 .95rem var(--font); }
.yt-cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 12px -16px 6px; padding: 2px 16px; }
.yt-cats::-webkit-scrollbar { display: none; }
.yt-cat { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--card-b);
  background: var(--card); color: var(--muted); font: 500 .88rem var(--font); cursor: pointer; }
.yt-cat.on { background: #f3f1ff; color: #0b0918; border-color: transparent; }
.yt-msg { color: var(--muted); text-align: center; padding: 30px 10px; }
.yt-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.yt-item { display: grid; grid-template-columns: 44% 1fr; gap: 12px; align-items: start; }
.yt-thumb { position: relative; display: block; padding: 0; border: 0; border-radius: 12px; overflow: hidden;
  aspect-ratio: 16/9; background: var(--bg-2); cursor: pointer; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-thumb .dur { color: #fff; font: 500 .75rem var(--font); right: 6px; bottom: 6px; }
.yt-info { min-width: 0; }
.yt-info h3 { margin: 0 0 4px; font-size: .95rem; line-height: 1.3; font-weight: 500; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-info p { margin: 0 0 8px; color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-actions { display: flex; gap: 6px; }
.yt-btn { padding: 7px 12px; border-radius: 10px; border: 0; cursor: pointer; font: 700 .82rem var(--font);
  background: linear-gradient(90deg, #ff0033, #ff7a00); color: #fff; }
.yt-btn.alt { background: rgba(255,255,255,.1); color: var(--text); border: 1px solid var(--card-b); }
.yt-item.sk i { display: block; aspect-ratio: 16/9; border-radius: 12px; background: var(--card); }
.yt-item.sk b { display: block; height: 12px; margin: 6px 0 10px; border-radius: 6px; background: var(--card); }
.yt-item.sk b + b { width: 60%; }
@media (min-width: 640px) { .yt-item { grid-template-columns: 240px 1fr; } }


/* YouTube: "Para ti" y reproductor (solo app) */
.yt-cat.fyp { color: #fff; border-color: rgba(139,92,246,.5); }
.yt-cat.fyp.on { background: linear-gradient(90deg, #25f4ee, #8b5cf6, #fe2c55); color: #0b0918; }
.yt-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
.yt-head[hidden] { display: none; }
.yt-head div { flex: 1; min-width: 0; display: grid; }
.yt-head b { font-size: 1.15rem; }
.yt-head small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-refresh { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--card-b);
  background: var(--card); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.yt-refresh:active { transform: rotate(180deg); transition: transform .3s; }
.yt-playicon { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: .8rem; }
.yt-item.seen .yt-thumb::after { content: "Visto"; position: absolute; left: 6px; top: 6px; padding: 1px 6px;
  border-radius: 6px; background: rgba(0,0,0,.7); color: #fff; font: 500 .65rem var(--font); }
.yt-player { position: fixed; inset: 0; z-index: 80; overflow-y: auto; background: var(--bg);
  padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.yt-player[hidden] { display: none; }
body.yt-open { overflow: hidden; }
body.yt-open .tabbar { display: none; }
.yt-top { position: sticky; top: 0; z-index: 2; background: #000; }
.yt-pbar { display: flex; align-items: center; height: 46px; padding: 0 8px; background: var(--bg); }
.yt-frame { background: #000; aspect-ratio: 16/9; width: 100%; max-height: 60vh; }
.yt-frame { position: relative; }
.yt-frame iframe, .yt-frame video, #yt-embed { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.yt-frame video[hidden] { display: none; }
.yt-perr { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 20px; text-align: center;
  color: #ddd; font-size: .9rem; background: #000; }
.yt-perr[hidden] { display: none; }
.yt-close { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 0; background: var(--card); color: var(--text); font: 600 1rem var(--font); cursor: pointer; }
.yt-close span { font-size: .9rem; }
.yt-pinfo { max-width: 760px; margin: 0 auto; padding: 12px 16px; }
.yt-pinfo h2 { font-size: 1.05rem; line-height: 1.35; margin: 0 0 4px; }
.yt-pinfo > p { color: var(--muted); font-size: .85rem; margin: 0 0 12px; }
.yt-pactions { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.yt-pactions::-webkit-scrollbar { display: none; }
.yt-pbtn { flex: none; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--card-b); background: var(--card);
  color: var(--text); font: 600 .88rem var(--font); cursor: pointer; }
.yt-pbtn.main { background: linear-gradient(90deg, #ff0033, #ff7a00); border-color: transparent; color: #fff; }
.yt-pbtn.on { background: #fe2c55; border-color: transparent; color: #fff; }
.yt-rel-title { font-size: 1rem; margin: 20px 0 6px; }


/* hoja "Descargar video como" (YouTube en la app) */
.dl-sheet { position: fixed; inset: 0; z-index: 120; }
.dl-sheet[hidden] { display: none; }
.dl-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .2s; }
.dl-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto;
  background: #1b1a22; border-radius: 22px 22px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .22s ease-out; }
.dl-sheet.open .dl-backdrop { opacity: 1; }
.dl-sheet.open .dl-panel { transform: none; }
.dl-handle { display: block; width: 40px; height: 5px; border-radius: 3px; background: #4a4858; margin: 4px auto 14px; }
.dl-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.dl-head img { width: 72px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #000; flex: none; }
.dl-head div { min-width: 0; display: grid; }
.dl-head b { font-size: 1.1rem; }
.dl-head small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-body h4 { margin: 16px 0 4px; color: #8e8c9c; font-size: .88rem; font-weight: 500; }
.dl-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 4px; border: 0; background: none;
  color: var(--text); font: 500 1rem var(--font); text-align: left; cursor: pointer; border-radius: 12px; }
.dl-row:active { background: rgba(255,255,255,.05); }
.dl-ic { width: 24px; text-align: center; font-size: 1.15rem; color: #d8d6e4; }
.dl-lb { flex: 1; min-width: 0; display: grid; }
.dl-lb small { color: #8e8c9c; font-size: .75rem; font-weight: 400; }
.dl-sz { color: #8e8c9c; font-size: .85rem; }
.dl-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #6b6979; flex: none; }
.dl-row.on .dl-radio { border-color: #25f4ee; background: radial-gradient(circle, #25f4ee 45%, transparent 50%); }
.dl-row.on .dl-lb { color: #25f4ee; }
.dl-more { display: flex; justify-content: space-between; width: 100%; margin-top: 6px; padding: 14px 4px;
  border: 0; border-top: 1px solid #2c2a36; background: none; color: var(--text); font: 500 1rem var(--font); cursor: pointer; }
.dl-more span { color: #8e8c9c; }
.dl-more.on span { color: #25f4ee; }
.dl-more-list[hidden] { display: none; }
.dl-loading { color: var(--muted); padding: 26px 0; text-align: center; display: flex; gap: 10px; justify-content: center; align-items: center; }
.dl-loading .spinner { display: inline-block; width: 18px; height: 18px; border-width: 2px; }
.dl-loading.err { color: #ffb3c1; }
.dl-status { color: var(--muted); font-size: .85rem; text-align: center; margin: 12px 0 0; }
.dl-status b { color: var(--text); }
.dl-status[hidden] { display: none; }
.dl-go { position: relative; overflow: hidden; width: 100%; height: 54px; margin-top: 14px; border: 0; border-radius: 27px;
  background: #2c2a36; color: #77758a; font: 700 1.02rem var(--font); cursor: pointer; }
.dl-go span { position: relative; }
.dl-go i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #25f4ee, #8b5cf6, #fe2c55); transition: width .4s; }
.dl-go.ready { background: linear-gradient(90deg, #25f4ee, #8b5cf6, #fe2c55); color: #0b0918; }
.dl-go.work { color: #fff; cursor: progress; }
.dl-go.unknown i { width: 35% !important; animation: dl-slide 1.2s linear infinite; }
@keyframes dl-slide { from { left: -35%; } to { left: 100%; } }
.dl-pills { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 110;
  display: grid; gap: 8px; pointer-events: none; }
body.yt-open .dl-pills { bottom: calc(14px + env(safe-area-inset-bottom)); }
.dl-pill { position: relative; overflow: hidden; pointer-events: auto; display: grid; text-align: left; padding: 10px 14px;
  border-radius: 14px; border: 1px solid var(--card-b); background: #1b1a22; color: var(--text); font: 600 .9rem var(--font);
  box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.dl-pill small { color: var(--muted); font-weight: 400; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.dl-pill i { position: absolute; left: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #25f4ee, #fe2c55); }
.dl-pill.done { border-color: rgba(37,244,238,.5); color: #25f4ee; cursor: pointer; }


/* cola de descargas (YouTube en la app) */
.dl-fab { position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 90; width: 58px; height: 58px;
  border-radius: 50%; border: 0; overflow: hidden; display: grid; place-items: center; cursor: pointer;
  background: #1b1a22; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.12); }
.dl-fab[hidden] { display: none; }
.dl-fab svg { width: 26px; height: 26px; }
.dl-fab.busy svg { animation: dl-bounce 1s ease-in-out infinite; color: #25f4ee; }
@keyframes dl-bounce { 50% { transform: translateY(3px); } }
.dl-fab b { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: #fe2c55; font: 700 .7rem/18px var(--font); }
.dl-fab b:empty { display: none; }
.dl-fab i { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: linear-gradient(90deg, #25f4ee, #fe2c55); transition: width .4s; }
body.yt-open .dl-fab { bottom: calc(18px + env(safe-area-inset-bottom)); }
.dl-toast { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 130;
  padding: 10px 16px; border-radius: 999px; background: #f3f1ff; color: #0b0918; font: 600 .9rem var(--font);
  box-shadow: 0 8px 24px rgba(0,0,0,.4); white-space: nowrap; }
.dl-toast[hidden] { display: none; }
.dl-qhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dl-qhead b { font-size: 1.15rem; }
.dl-qhead button { border: 0; background: none; color: #8e8c9c; font: 500 .85rem var(--font); cursor: pointer; }
.dl-qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dl-qempty { color: var(--muted); text-align: center; padding: 24px 0; }
.dl-qitem { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #2a2834; }
.dl-qitem img { width: 64px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #000; flex: none; }
.dl-qitem div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dl-qitem b { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-qitem small { color: #8e8c9c; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-qitem.done small { color: #25f4ee; }
.dl-qitem.error small { color: #ffb3c1; }
.dl-qbar { display: block; height: 4px; border-radius: 2px; background: #2c2a36; overflow: hidden; margin-top: 4px; }
.dl-qbar i { display: block; height: 100%; background: linear-gradient(90deg, #25f4ee, #8b5cf6, #fe2c55); transition: width .4s; }
.dl-qbar i.unk { animation: dl-slide2 1.2s linear infinite; }
@keyframes dl-slide2 { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.dl-qbtn { flex: none; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--card-b); background: var(--card);
  color: var(--text); font: 600 .82rem var(--font); cursor: pointer; }
.dl-qbtn.main { background: linear-gradient(90deg, #25f4ee, #8b5cf6); color: #0b0918; border: 0; }


/* Redes (solo app) */
main.redes { max-width: 760px; padding: 8px 16px 110px; text-align: center; }
main.redes h1 { font-size: 1.8rem; margin: 10px 0 6px; }
.redes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.red-card { display: grid; justify-items: center; gap: 4px; padding: 18px 10px; border-radius: 18px; cursor: pointer;
  border: 1px solid var(--card-b); background: var(--card); color: var(--text); font: 500 .95rem var(--font); }
.red-card b { font-size: 1.05rem; }
.red-card small { color: var(--muted); font-size: .75rem; line-height: 1.3; }
.red-ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; font-size: 1.6rem; margin-bottom: 4px; }
.red-ico svg { width: 28px; height: 28px; }
.red-tiktok .red-ico { background: #000; color: #25f4ee; box-shadow: inset 0 0 0 1px #333; }
.red-facebook .red-ico { background: #1877f2; color: #fff; }
.red-instagram .red-ico { background: linear-gradient(135deg, #feda75, #d62976, #4f5bd5); color: #fff; }
.red-youtube .red-ico { background: #ff0033; color: #fff; }
.red-x .red-ico { background: #000; color: #fff; box-shadow: inset 0 0 0 1px #333; }
.red-pinterest .red-ico { background: #e60023; color: #fff; }
.redes-safe { color: var(--muted); font-size: .82rem; margin-top: 20px; text-align: left; padding: 14px 16px;
  border-radius: 16px; background: var(--card); border: 1px solid var(--card-b); }
.redes-safe p { margin: 0 0 8px; }
.redes-safe p:last-child { margin: 0; }
.redes-safe b { color: var(--text); }
.logout-all { margin-top: 14px; padding: 12px 18px; border-radius: 14px; border: 1px solid rgba(254,44,85,.45);
  background: transparent; color: #ffb3c1; font: 600 .9rem var(--font); cursor: pointer; }


/* anuncios dentro de la app (Adsterra): banner chico encima de las pestañas */
.app-ad { position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 45;
  display: flex; justify-content: center; height: 50px; background: #0b0918; pointer-events: auto; }
.app-ad iframe { border: 0; width: 320px; height: 50px; display: block; }
body.yt-open .app-ad { display: none; }   /* nunca encima del video */
.app-ad.pending, .open-ad.pending { opacity: 0; pointer-events: none; }   /* cargando: no se ve ni estorba */
.open-ad { transition: opacity .2s; }
.has-ad .foot { padding-bottom: 150px; }
.has-ad main.yt, .has-ad main.redes { padding-bottom: 150px; }
.has-ad .dl-fab { bottom: calc(136px + env(safe-area-inset-bottom)); }
.has-ad .dl-toast { bottom: calc(206px + env(safe-area-inset-bottom)); }
body.yt-open.has-ad .dl-fab { bottom: calc(18px + env(safe-area-inset-bottom)); }
.open-ad { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(0,0,0,.7); padding: 16px; }
.open-ad[hidden] { display: none; }
.open-ad-card { width: 332px; max-width: 100%; background: #15122b; border: 1px solid var(--card-b); border-radius: 18px; padding: 10px 16px 16px; }
.open-ad-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .75rem; margin-bottom: 8px; }
.open-ad-top button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 1rem; cursor: pointer; }
.open-ad-slot { width: 300px; height: 250px; margin: 0 auto; background: #0b0918; border-radius: 8px; overflow: hidden; }
.open-ad-slot iframe { border: 0; display: block; }
.open-ad-go { width: 100%; margin-top: 12px; height: 46px; border: 0; border-radius: 23px; cursor: pointer;
  background: linear-gradient(90deg, #25f4ee, #8b5cf6, #fe2c55); color: #0b0918; font: 700 .95rem var(--font); }

/* textos de las páginas para Google */
.guide-intro { max-width: 760px; margin: -8px auto 22px; text-align: center; color: var(--muted); line-height: 1.6; }
.popular { padding: 10px 0 30px; }
.popular-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.popular-grid a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--card-b); background: var(--card);
  color: var(--muted); text-decoration: none; font-size: .88rem; }
.popular-grid a:hover { color: var(--text); }

/* responsive */
@media (max-width: 760px) {
  .nav { padding: 12px 16px; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-app) { display: none; }
  .ad-top { min-height: 60px; }
  .hero { padding: 16px 0 12px; }
  .sub { font-size: 1rem; margin-bottom: 18px; }
  /* chips en una fila que se desliza con el dedo */
  .platforms { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none;
    margin: 0 -16px 14px; padding: 2px 16px; scroll-snap-type: x proximity; }
  .platforms::-webkit-scrollbar { display: none; }
  .chip { flex: none; scroll-snap-align: start; padding: 10px 14px; }
  .search { flex-direction: column; padding: 6px; }
  .field input { height: 50px; font-size: 16px; }   /* 16px evita el zoom automático en iPhone */
  .btn-main { width: 100%; }
  .btn-ghost { padding: 10px 12px; }
  .btn-ghost span { display: none; }
  .result { grid-template-columns: 1fr; gap: 14px; padding: 12px; }
  .thumb { max-width: 220px; max-height: 320px; margin: 0 auto; width: 100%; }
  .thumb.wide { max-width: none; }
  .info h2 { font-size: 1.05rem; }
  .opt { padding: 15px 16px; min-height: 52px; }
  .steps { padding-top: 40px; }
  .steps ol { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feat { padding: 14px; }
  .bg-glow { width: 600px; }
}
@media (max-width: 380px) {
  .features { grid-template-columns: 1fr; }
  h1 { font-size: 1.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
