:root {
  --brand: #6d28d9;
  --brand-2: #8b5cf6;
  --ok: #16a34a;
  --bg: #f5f5f7;
  --card: #fff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #dc2626;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f14;
    --card: #1a1a22;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #2d2d38;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
code { background: rgba(127,127,127,.15); padding: 1px 6px; border-radius: 4px; }

.topbar { background: var(--card); border-bottom: 1px solid var(--border); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 26px; font-weight: 800; text-decoration: none; color: var(--text); letter-spacing: -1px; }
.logo span { color: var(--brand); }
.badge { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(139,92,246,.15); color: var(--brand-2); font-weight: 600; }

.menu { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { position: relative; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; }
.menu a:hover { color: var(--text); background: rgba(127,127,127,.12); }
.menu a.active { color: var(--text); }
.menu a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px; background: var(--c); }
.error a { color: #fff; font-weight: 700; }

.hero { background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); padding: 48px 0; color: #fff; text-align: center; }
.hero h1 { margin: 0 0 24px; font-size: clamp(22px, 4vw, 34px); }
.search { display: flex; gap: 8px; background: #fff; padding: 6px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 16px; padding: 12px; color: #111; background: transparent; }
.search button { border: 0; border-radius: 10px; font-weight: 700; font-size: 16px; cursor: pointer; }
.search #go { background: var(--ok); color: #fff; padding: 0 22px; }
.search #go:disabled { opacity: .6; cursor: wait; }
.search .ghost { background: transparent; color: #999; padding: 0 10px; }
.error { background: rgba(0,0,0,.25); padding: 10px 14px; border-radius: 10px; margin: 14px 0 0; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; margin: 24px 0; }
.loading { text-align: center; }
.spinner { width: 36px; height: 36px; margin: 0 auto 8px; border: 4px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.media { display: flex; gap: 16px; align-items: flex-start; }
.media img { width: 160px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; background: var(--border); flex-shrink: 0; }
.media h2 { margin: 6px 0 4px; font-size: 17px; line-height: 1.35; word-break: break-word; }
.media p { margin: 0; font-size: 14px; }
.pill { font-size: 12px; font-weight: 700; background: rgba(139,92,246,.15); color: var(--brand-2); padding: 3px 8px; border-radius: 6px; }

.result h3 { margin: 22px 0 12px; font-size: 15px; }
.options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; border-radius: 12px; padding: 14px 18px; background: #0b84e3; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; text-align: left; }
.opt:hover { filter: brightness(1.08); }
.opt:disabled { opacity: .6; cursor: wait; }
.opt.hd { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.opt small { font-weight: 500; opacity: .9; }
.opt .ad-mark { font-size: 11px; border: 1.5px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 6px; }
.opt .variant { display: block; font-size: 12px; font-weight: 500; opacity: .9; margin-top: 2px; }
.opt.fast { background: #0f766e; }

.progress { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; }
.progress-head, .progress-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.progress-foot { font-size: 13px; margin-top: 8px; }
.progress-track { height: 10px; margin-top: 10px; border-radius: 99px; background: var(--border); overflow: hidden; }
.progress-track div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .4s ease; }
.progress-track.indeterminate div { width: 35% !important; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

.status { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: rgba(22,163,74,.12); color: var(--ok); font-weight: 600; }
.status.err { background: rgba(220,38,38,.12); color: var(--danger); }

.info { margin: 32px 0 48px; }
.info h2 { font-size: 20px; }
.info li { margin: 6px 0; }

.ad-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.ad-overlay[hidden] { display: none; }
.ad-box { background: #fff; color: #111; width: min(640px, 100%); border-radius: 12px; overflow: hidden; }
.ad-progress { height: 4px; background: #eee; }
.ad-progress div { height: 100%; width: 0; background: #fbbf24; transition: width 1s linear; }
.ad-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; }
.ad-tag { font-size: 12px; font-weight: 700; background: #fde68a; padding: 2px 8px; border-radius: 4px; }
.ad-close { border: 0; background: #111; color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.ad-close:disabled { background: #9ca3af; cursor: not-allowed; }
.ad-body { display: flex; gap: 20px; padding: 10px 24px 32px; align-items: center; }
.ad-art { width: 160px; aspect-ratio: 16/9; flex-shrink: 0; border-radius: 10px; background: linear-gradient(135deg, #6d28d9, #ec4899); color: #fff; font-size: 40px; display: grid; place-items: center; }
.ad-body h3 { margin: 0 0 6px; }
.ad-body p { margin: 0; color: #555; }

@media (max-width: 560px) {
  .media { flex-direction: column; }
  .media img { width: 100%; }
  .ad-body { flex-direction: column; text-align: center; }
  .search #go { padding: 0 14px; }
  /* En móvil el menú baja a su propia fila, a todo lo ancho. */
  .topbar .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; }
  .logo { font-size: 22px; }
  .menu { width: 100%; justify-content: space-between; margin: 4px -6px 0; width: calc(100% + 12px); }
  .menu a { padding: 8px 6px 10px; font-size: 14px; }
  .menu a.active::after { left: 6px; right: 6px; }
}

/* ---------- Landing ---------- */
.center { text-align: center; }
.hero-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 12px; border-radius: 16px; background: rgba(255,255,255,.18); }
.hero-icon svg { width: 30px; height: 30px; }

.landing-hero { padding: 56px 0 44px; }
.landing-hero .wrap, .landing { max-width: 1040px; }
.landing-hero h1 { margin-bottom: 10px; font-size: clamp(26px, 5vw, 44px); letter-spacing: -.5px; }
.lead { margin: 0 auto 28px; max-width: 620px; font-size: clamp(16px, 2.2vw, 19px); opacity: .92; }

.platform-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.platform-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 12px 18px;
  border-radius: 18px; background: var(--card); color: var(--text); text-decoration: none;
  box-shadow: 0 12px 30px rgba(0,0,0,.18); transition: transform .15s ease, box-shadow .15s ease;
}
.platform-card:hover, .platform-card:focus-visible { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.28); }
.platform-card strong { font-size: 18px; }
.platform-card small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.platform-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.platform-icon svg { width: 30px; height: 30px; }
.platform-icon.small { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; }
.platform-icon.small svg { width: 22px; height: 22px; }

.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; font-weight: 600; font-size: 15px; }

.block { margin: 56px 0; }
.block h2, .cta h2 { margin: 0 0 6px; font-size: clamp(22px, 3.4vw, 30px); text-align: center; }
.section-lead { margin: 0 0 24px; text-align: center; color: var(--muted); }
.block > h2 + .steps, .block > h2 + .features, .block > h2 + .faq { margin-top: 24px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.steps li { padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: #fff; font-weight: 800; }
.steps h3, .feature h3 { margin: 12px 0 6px; font-size: 17px; }
.steps p, .feature p { margin: 0; color: var(--muted); line-height: 1.5; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.feature-icon { font-size: 26px; }

.howto { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.howto-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); text-decoration: none; }
.howto-item:hover { border-color: var(--c2); }
.howto-item p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; font-size: 14px; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { position: relative; padding: 18px 36px 18px 0; font-weight: 700; font-size: 16px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--muted); line-height: 1.6; }

.cta { margin: 56px 0 64px; padding: 36px 20px; border-radius: 20px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); }
.cta p { margin: 0 0 18px; opacity: .9; }
.cta-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cta-links a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: #fff; color: #111; font-weight: 700; text-decoration: none; }
.cta-links a svg { width: 20px; height: 20px; color: var(--c1); }
.cta-links a:hover { transform: translateY(-2px); }

.footer { border-top: 1px solid var(--border); background: var(--card); padding: 28px 0; font-size: 14px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-bottom: 12px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer nav a { color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--text); }
.footer p { margin: 8px 0 0; line-height: 1.5; }

@media (max-width: 900px) {
  .platform-grid { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .platform-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .platform-grid .platform-card:last-child { grid-column: 1 / -1; }
  .platform-card { padding: 16px 10px 14px; }
  .steps, .features, .howto { grid-template-columns: 1fr; }
  .block { margin: 40px 0; }
}

/* ---------- Pestañas de herramientas y fotos ---------- */
.tool-tabs { display: inline-flex; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.18); }
.tool-tabs a { padding: 9px 22px; border-radius: 9px; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; opacity: .85; }
.tool-tabs a:hover { opacity: 1; background: rgba(255,255,255,.12); }
.tool-tabs a.active { opacity: 1; background: #fff; color: var(--hero-1); }

.photos-head h2 { margin: 8px 0 4px; font-size: 17px; line-height: 1.35; word-break: break-word; }
.photos-head p { margin: 0 0 16px; font-size: 14px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.photo-item { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.photo-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; background: var(--border); display: block; }
.photo-dl { justify-content: center; text-decoration: none; }
#photosNote { margin: 16px 0 0; }
@media (max-width: 560px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-tabs a { padding: 8px 16px; }
}

/* ---------- Aviso del sitio y espacios de anuncios (se configuran en el panel) ---------- */
.announcement { background: #fef3c7; color: #78350f; font-size: 14px; font-weight: 600; text-align: center; padding: 10px 0; }
.ad-slot { margin: 24px auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad-slot img { max-width: 100%; height: auto; border-radius: 10px; display: inline-block; }
.ad-body img { max-width: 100%; height: auto; border-radius: 10px; }

/* ---------- Contenido SEO de cada red ---------- */
.seo-intro { max-width: 760px; margin-left: auto; margin-right: auto; }
.seo-intro p { font-size: 17px; line-height: 1.7; color: var(--text); margin: 0 0 14px; }
.cta-links.related a { background: var(--card); color: var(--text); border: 1px solid var(--border); font-weight: 600; }
.cta-links.related a svg { color: var(--c2); }

/* ---------- Guías ---------- */
.guide-hero { padding: 40px 0 36px; }
.guide-hero h1 { max-width: 820px; margin: 8px auto 12px; }
.guide-hero .lead { margin-bottom: 10px; }
.crumbs { font-size: 14px; opacity: .9; }
.crumbs a { color: #fff; }
.crumbs span { opacity: .85; }
.guide-meta { margin: 0; font-size: 14px; opacity: .85; }

.guide { max-width: 760px; margin: 40px auto; font-size: 17px; line-height: 1.75; }
.guide h2 { margin: 36px 0 12px; font-size: clamp(20px, 3vw, 26px); line-height: 1.3; }
.guide p { margin: 0 0 16px; }
.guide ul, .guide ol { margin: 0 0 18px; padding-left: 24px; }
.guide li { margin: 8px 0; }
.guide a { color: var(--brand-2); font-weight: 600; }
.guide-steps { list-style: none; padding: 0 !important; counter-reset: step; }
.guide-steps li { position: relative; padding: 12px 14px 12px 56px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); counter-increment: step; }
.guide-steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 800; font-size: 14px; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); }
.guide-tip { padding: 14px 16px; border-radius: 12px; background: rgba(139,92,246,.1); border-left: 4px solid var(--brand-2); }
.guide-cta { text-align: center; margin: 24px 0 !important; }
.btn-cta { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 14px; color: #fff !important; text-decoration: none; font-weight: 800; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.btn-cta svg { width: 22px; height: 22px; }
.btn-cta:hover { transform: translateY(-2px); }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.guide-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); text-decoration: none; }
.guide-card:hover { border-color: var(--c2); transform: translateY(-2px); }
.guide-card strong { font-size: 15px; line-height: 1.35; }
.guide-card small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.guide-card .platform-icon.small { font-weight: 800; font-size: 18px; }
.guide-min { margin-top: auto; font-size: 12px; color: var(--muted); }
.guide-grid.big .guide-card { padding: 20px; }
