:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --text: #1b1f27;
  --muted: #5f6672;
  --line: #e1e5ec;
  --brand: #0d4fe0;
  --brand-ink: #ffffff;
  --brand-soft: #e7efff;
  --accent: #ff6a00;
  --star: #1b1f27;
  --ok: #15803d;
  --err: #b91c1c;
  --warn: #a16207;
  --radius: 16px;
  --icon-r: 22%;
  --shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 1px 3px rgba(16, 24, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12141a; --surface: #1a1d25; --surface-2: #232733; --text: #e8eaef; --muted: #a3a9b6;
    --line: #2e3340; --brand: #7aa7ff; --brand-ink: #071736; --brand-soft: #1d2b4d; --star: #e8eaef; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12141a; --surface: #1a1d25; --surface-2: #232733; --text: #e8eaef; --muted: #a3a9b6;
  --line: #2e3340; --brand: #7aa7ff; --brand-ink: #071736; --brand-soft: #1d2b4d; --star: #e8eaef; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
h1, h2 { line-height: 1.2; font-weight: 500; }
h2 { font-size: 1.35rem; margin: 0 0 12px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .wrap { padding: 0 32px; } }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.st { font-size: .8em; }
svg { fill: currentColor; }

/* ---------- Barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.brand:hover { text-decoration: none; }
.tabs { display: flex; align-self: stretch; gap: 4px; }
.tabs a { position: relative; display: flex; align-items: center; padding: 0 14px; color: var(--muted); font-weight: 500; font-size: .95rem; }
.tabs a:hover { color: var(--text); background: var(--surface-2); }
.tabs a.on { color: var(--brand); }
.tabs a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.search { flex: 0 1 340px; display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 999px; padding: 0 16px; margin-left: auto; border: 1px solid transparent; }
.search svg { width: 20px; height: 20px; fill: var(--muted); flex: none; }
.search input { border: 0; background: transparent; color: var(--text); font: inherit; padding: 10px 0; width: 100%; outline: none; border-radius: 0; }
.search:focus-within { background: var(--bg); border-color: var(--brand); box-shadow: 0 1px 6px rgba(16,24,40,.12); }
@media (max-width: 760px) {
  .topbar-in { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-top: 10px; }
  .search { order: 2; flex: 1 1 100%; margin: 8px 0 6px; }
  .tabs { order: 3; flex: 1 1 100%; height: 44px; justify-content: space-around; }
  .tabs a { flex: 1; justify-content: center; }
}

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 8px; padding: 9px 20px; font: 500 .95rem Roboto, system-ui, sans-serif; cursor: pointer; text-decoration: none; transition: box-shadow .15s, background .15s; min-height: 40px; }
.btn:hover { box-shadow: 0 1px 3px rgba(16,24,40,.25); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-lg { min-height: 44px; padding: 10px 28px; font-size: 1rem; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-outline, .btn-ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1px var(--line); }
.btn-outline:hover, .btn-ghost:hover { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--line); }
.link-danger { background: none; border: 0; color: var(--err); font: inherit; cursor: pointer; padding: 0; }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--brand); font: 500 .95rem Roboto, system-ui, sans-serif; cursor: pointer; padding: 10px 12px; border-radius: 8px; }
.icon-btn:hover { background: var(--brand-soft); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Portada ---------- */
.store { padding-top: 20px; }
.banner { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 16px; padding: 36px 40px; border-radius: 20px; color: #fff; min-height: 240px;
  background: radial-gradient(70% 120% at 100% 100%, rgba(255,106,0,.55) 0%, transparent 60%), radial-gradient(60% 90% at 90% 0%, rgba(24,180,255,.5) 0%, transparent 60%), linear-gradient(120deg, #06123d 0%, #0a2a8a 55%, #0d4fe0 100%); }
.banner h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 700; margin: 6px 0 10px; letter-spacing: -.01em; }
.banner p { margin: 0 0 20px; max-width: 46ch; opacity: .9; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; opacity: .75; margin: 0 !important; }
.banner-art { display: flex; justify-content: center; align-items: center; }
.icon-stack { display: flex; }
.icon-stack img { width: 92px; height: 92px; border-radius: var(--icon-r); object-fit: cover; margin-left: -18px; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 10px 24px rgba(0,0,0,.35); transform: rotate(calc((var(--i) - 2) * 5deg)) translateY(calc((var(--i) - 2) * (var(--i) - 2) * 4px)); background: #fff; }
.icon-stack img:first-child { margin-left: 0; }
.banner-logo { width: 170px; filter: drop-shadow(0 12px 24px rgba(0,0,0,.35)); }
@media (max-width: 760px) {
  .banner { grid-template-columns: 1fr; padding: 26px 22px; }
  .banner-art { justify-content: flex-start; order: -1; }
  .icon-stack img { width: 56px; height: 56px; margin-left: -10px; border-width: 2px; }
}

.chips { display: flex; gap: 8px; margin: 20px 0 4px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 8px; border: 1px solid var(--line); color: var(--text); font-weight: 500; font-size: .9rem; }
.chip svg { width: 18px; height: 18px; color: var(--muted); }
.chip.on { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.chip.on svg { color: var(--brand); }
.chip:hover { background: var(--surface-2); }

.shelf { margin: 30px 0; }
.shelf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.shelf-head h2 { margin: 0; }
.shelf-head h2 a, .sec-title a { color: var(--text); }
.shelf-head h2 a:hover .arrow, .sec-title a:hover .arrow { background: var(--surface-2); }
.arrow { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); font-size: 1.1rem; vertical-align: middle; transition: background .15s; }
.shelf-sub { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }

.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.pill { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: .88rem; font-weight: 500; }
.pill.on { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.pill:hover { text-decoration: none; background: var(--surface-2); }

/* Estantes horizontales */
.row-wrap { position: relative; }
.row-scroll { display: grid; grid-auto-flow: column; gap: 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -10px; padding: 0 2px 6px; }
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; }
.tiles { grid-auto-columns: 148px; }
@media (max-width: 600px) { .tiles { grid-auto-columns: 112px; } }
.row-arrow { position: absolute; top: 34%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(16,24,40,.22); cursor: pointer; display: grid; place-items: center; }
.row-arrow svg { width: 24px; height: 24px; }
.row-arrow-prev { left: -18px; } .row-arrow-next { right: -18px; }
.features + .row-arrow, .row-wrap:has(.features) .row-arrow { top: 42%; }

/* Tarjeta de app */
.card { position: relative; display: flex; flex-direction: column; gap: 8px; color: var(--text); padding: 10px; border-radius: 12px; min-width: 0; }
.card:hover { background: var(--surface-2); text-decoration: none; }
.card-icon { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--icon-r); background: var(--surface-2); box-shadow: var(--shadow); }
.card-body { display: flex; flex-direction: column; min-width: 0; }
.card-name { font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles .card-sub { display: none; }

/* Ranking y listas: icono a la izquierda */
.ranked { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 16px; grid-auto-flow: row; }
@media (max-width: 1000px) { .ranked { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .ranked { grid-template-columns: 1fr; } }
.ranked .card, .list .card { flex-direction: row; align-items: center; gap: 14px; padding: 8px 10px; }
.ranked .card-icon, .list .card-icon { width: 64px; flex: none; }
.list .card-icon { width: 56px; }
.ranked .card-name, .list .card-name { -webkit-line-clamp: 1; font-size: .95rem; }
.rank { width: 18px; text-align: center; color: var(--muted); font-size: .95rem; flex: none; }
.list { display: grid; gap: 0; }

/* Destacadas */
.features { grid-auto-columns: minmax(280px, 340px); gap: 16px; margin: 0; padding: 0 0 6px; }
.feature { display: flex; flex-direction: column; gap: 10px; color: var(--text); border-radius: 12px; }
.feature:hover { text-decoration: none; }
.feature-art { position: relative; display: block; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--tc), color-mix(in srgb, var(--tc) 40%, #000)); }
.feature-bg { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.feature-big { position: absolute; width: 46%; aspect-ratio: 1; object-fit: cover; border-radius: var(--icon-r); left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-6deg); box-shadow: 0 12px 28px rgba(0,0,0,.35); }
.feature:hover .feature-bg { transform: scale(1.03); }
.feature-in { display: flex; gap: 12px; align-items: center; }
.feature-in img { width: 48px; height: 48px; border-radius: var(--icon-r); object-fit: cover; box-shadow: var(--shadow); }
.feature-in b { display: block; font-weight: 500; } .feature-in small { color: var(--muted); font-size: .82rem; }

.promo { display: flex; align-items: center; gap: 20px; margin: 40px 0 10px; padding: 24px 28px; border-radius: 20px; background: var(--brand-soft); flex-wrap: wrap; }
.promo img { width: 72px; height: 72px; }
.promo div { flex: 1 1 260px; }
.promo h2 { margin: 0 0 4px; font-size: 1.2rem; }
.promo p { margin: 0; color: var(--muted); }

.empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.page-title { margin: 8px 0 4px; font-size: 1.6rem; }
.results { margin-top: 12px; }

/* ---------- Ficha de la app ---------- */
.detail { padding-top: 32px; }
.app-head { display: grid; grid-template-columns: 1fr 240px; grid-template-areas: "id icon" "facts icon" "actions icon" "hint icon" "devices icon"; column-gap: 48px; align-items: start; }
.app-id { grid-area: id; display: flex; gap: 16px; align-items: flex-start; }
.app-id h1 { margin: 0; font-size: clamp(1.7rem, 4.2vw, 3.2rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.1; }
.dev { color: var(--brand); font-weight: 500; margin: 10px 0 0; font-size: 1.05rem; }
.loc { color: var(--muted); margin: 2px 0 0; font-size: .85rem; }
.app-icon { object-fit: cover; border-radius: var(--icon-r); background: var(--surface-2); box-shadow: 0 2px 6px rgba(16,24,40,.18); }
.app-icon-lg { grid-area: icon; width: 240px; height: 240px; }
.app-icon-sm { display: none; width: 72px; height: 72px; flex: none; }
.facts { grid-area: facts; list-style: none; display: flex; padding: 0; margin: 26px 0; }
.facts li { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-width: 96px; padding: 0 18px; position: relative; }
.facts li + li::before { content: ""; position: absolute; left: 0; top: 20%; height: 60%; width: 1px; background: var(--line); }
.facts b { font-weight: 500; font-size: .95rem; display: flex; align-items: center; gap: 2px; min-height: 24px; }
.facts span { color: var(--muted); font-size: .8rem; }
.fact-ico svg { width: 22px; height: 22px; }
.actions { grid-area: actions; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn-install { min-width: 200px; }
.hint { grid-area: hint; background: var(--surface-2); padding: 12px 16px; border-radius: 12px; max-width: 520px; margin: 14px 0 0; }
.devices { grid-area: devices; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; margin: 18px 0 0; }
.devices svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .detail { padding-top: 20px; }
  .app-head { grid-template-columns: 1fr; grid-template-areas: "id" "facts" "actions" "hint" "devices"; }
  .app-icon-lg { display: none; }
  .app-icon-sm { display: block; }
  .app-id h1 { font-size: 1.5rem; }
  .dev { margin-top: 4px; font-size: .95rem; }
  .facts { margin: 20px -8px; overflow-x: auto; }
  .facts li { min-width: 84px; padding: 0 10px; }
  .actions .btn { flex: 1 1 100%; }
  .actions .icon-btn { margin: 0 auto; }
}

.detail-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; margin-top: 28px; }
@media (max-width: 960px) { .detail-cols { grid-template-columns: 1fr; gap: 0; } }
.block { margin: 0 0 36px; }
.sec-title { font-size: 1.3rem; margin: 0 0 14px; }
.desc { color: var(--muted); line-height: 1.6; }

.shots { display: flex; gap: 12px; overflow-x: auto; margin: 0 0 36px; padding-bottom: 4px; scrollbar-width: thin; }
.shot { flex: none; height: 300px; border-radius: 12px; }
.shot-cover { width: auto; max-width: 540px; object-fit: cover; }
.shot-player { width: 170px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; text-align: center; padding: 38px 14px 16px;
  background: radial-gradient(120% 80% at 50% 0%, var(--tc), #0b0f1d 75%); overflow: hidden; }
.shot-player img { width: 92px; height: 92px; border-radius: var(--icon-r); object-fit: cover; box-shadow: 0 8px 18px rgba(0,0,0,.4); margin-bottom: 6px; }
.shot-player b { font-weight: 500; font-size: .9rem; line-height: 1.2; }
.shot-player small { opacity: .7; font-size: .72rem; }
.shot-live { position: absolute; top: 12px; left: 12px; font-size: .58rem; font-weight: 700; letter-spacing: .1em; background: rgba(255,255,255,.14); padding: 3px 7px; border-radius: 99px; }
.shot-live::first-letter { color: #ef4444; }
.shot-play { width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #0b0f1d; display: grid; place-items: center; margin-top: 10px; font-size: .9rem; padding-left: 3px; }
@media (max-width: 600px) { .shot { height: 250px; } .shot-player { width: 140px; } .shot-player img { width: 76px; height: 76px; } }

.tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tagchip { padding: 5px 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
a.tagchip:hover { background: var(--surface-2); text-decoration: none; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 24px; margin: 18px 0 0; }
.meta-grid dt { color: var(--muted); font-size: .8rem; }
.meta-grid dd { margin: 2px 0 0; font-size: .92rem; }

.safety { list-style: none; padding: 18px; margin: 10px 0 0; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 16px; }
.safety li { display: flex; gap: 14px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.safety b { color: var(--text); font-weight: 500; }
.safety svg { width: 22px; height: 22px; flex: none; color: var(--brand); margin-top: 1px; }

.support summary { list-style: none; cursor: pointer; }
.support summary::-webkit-details-marker { display: none; }
.support summary h2 { display: flex; justify-content: space-between; align-items: center; }
.support summary h2::after { content: "⌄"; color: var(--muted); font-size: 1.2rem; transition: transform .2s; }
.support:not([open]) summary h2::after { transform: rotate(-90deg); }
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.links a { display: flex; gap: 16px; align-items: center; color: var(--text); padding: 10px 8px; border-radius: 10px; }
.links a:hover { background: var(--surface-2); text-decoration: none; }
.links svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.links span { display: flex; flex-direction: column; font-size: .92rem; }
.links small { color: var(--muted); font-size: .8rem; }

/* Valoraciones */
.rating-summary { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; margin-bottom: 18px; }
.rating-big { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.rating-big b { font-size: 3.6rem; line-height: 1; font-weight: 400; }
.stars { color: var(--line); letter-spacing: 1px; }
.star.on { color: var(--brand); } .star.half { color: var(--brand); opacity: .5; }
.bars { display: grid; gap: 5px; max-width: 420px; }
.bar { display: grid; grid-template-columns: 12px 1fr; gap: 12px; align-items: center; font-size: .8rem; color: var(--muted); }
.bar i { height: 10px; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.bar em { display: block; height: 100%; background: var(--brand); border-radius: 10px; }
.review-form { margin: 8px 0 20px; }
.review-form summary { list-style: none; }
.review-form summary::-webkit-details-marker { display: none; }
.review-form form { display: grid; gap: 12px; margin-top: 14px; padding: 18px; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); max-width: 560px; }
.review { padding: 16px 0; }
.review header { display: flex; gap: 12px; align-items: center; }
.review header b { font-weight: 500; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .9rem; font-weight: 500; }
.review-meta { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: .85rem; }
.review p { margin: 8px 0 0; color: var(--muted); }
.star-input { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input legend { width: 100%; margin-bottom: 4px; font-weight: 500; float: left; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { font-size: 2rem; color: var(--line); cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--brand); }
.star-input input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }

/* Formularios */
label { display: grid; gap: 6px; font-weight: 500; }
input, textarea, select { font: inherit; color: var(--text); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { width: auto; }
input[type="color"] { width: 64px; height: 40px; padding: 2px; }
small { color: var(--muted); font-weight: 400; }
.notice { padding: 12px 16px; border-radius: 12px; margin: 12px 0; }
.notice-ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.notice-error { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
.notice-warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }

/* Pie */
.footer { margin-top: 60px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-in { display: flex; justify-content: space-between; gap: 24px; padding-top: 28px; padding-bottom: 36px; flex-wrap: wrap; }
.footer p { color: var(--muted); max-width: 52ch; margin: 6px 0 0; }
.footer-links { display: grid; gap: 8px; align-content: start; }

/* Panel */
.admin-main { padding-top: 24px; padding-bottom: 60px; }
.admin-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-head h1 { margin: 0; margin-right: auto; font-size: 1.6rem; }
.inline input { width: 220px; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 14px; white-space: nowrap; }
.wrap-text { max-width: 380px; }
.auth { max-width: 420px; margin: 40px auto; }
.form { display: grid; gap: 14px; }
.form-grid fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 22px; margin: 0 0 18px; background: var(--surface); display: grid; gap: 14px; }
.form-grid legend { font-weight: 700; padding: 0 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.prefix { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.prefix span { padding: 0 4px 0 12px; color: var(--muted); font-weight: 400; white-space: nowrap; font-size: .9rem; }
.prefix input { border: 0; border-radius: 0; padding-left: 0; }
.prefix:focus-within { border-color: var(--brand); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.color { display: flex; align-items: center; gap: 12px; }
.preview-icon { width: 96px; height: 96px; border-radius: 22%; object-fit: cover; }
.preview-cover { max-height: 120px; border-radius: 12px; object-fit: cover; }
.form-actions { display: flex; gap: 18px; align-items: center; }

/* Marca RadioProMedia: logo horizontal en claro; icono + nombre en oscuro (el texto del logo es azul marino) */
.brand-logo { height: 48px; width: auto; }
.brand-dark { display: none; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.brand-dark b { color: #ff6a00; font-weight: 800; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo { display: none; }
  :root:not([data-theme="light"]) .brand-dark { display: inline-flex; }
}
:root[data-theme="dark"] .brand-logo { display: none; }
:root[data-theme="dark"] .brand-dark { display: inline-flex; }
@media (max-width: 420px) { .brand-logo { height: 36px; } }
.brand-logo { height: 40px; }
@media (max-width: 760px) { .brand-logo { height: 34px; } }

/* Pie */
.footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--bg); }

/* Menú del panel */
.topnav { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.topnav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.admin .topbar-in { flex-wrap: wrap; }

/* Ranking numerado por columnas, como en las tiendas de apps */
@media (min-width: 1001px) { .ranked.by-col { grid-auto-flow: column; grid-template-rows: repeat(var(--r3), auto); } }
@media (min-width: 641px) and (max-width: 1000px) { .ranked.by-col { grid-auto-flow: column; grid-template-rows: repeat(var(--r2), auto); } }

/* ---------- Ficha de app estilo tienda (2026-11-21) ---------- */
:root { --install: #0a7f55; --install-ink: #fff; --dev: #0a7f55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --install: #3cc48e; --install-ink: #06231a; --dev: #5ad3a2; } }
:root[data-theme="dark"] { --install: #3cc48e; --install-ink: #06231a; --dev: #5ad3a2; }

.detail { padding-top: 40px; }
.app-head { grid-template-columns: 1fr 240px; grid-template-areas: "id icon" "facts icon" "actions icon" "hint icon" "live icon"; column-gap: 64px; }
.app-id h1 { font-size: clamp(1.7rem, 4.4vw, 3.6rem); font-weight: 500; }
.dev { margin: 14px 0 0; font-size: 1.1rem; }
.dev a { color: var(--dev); }
.ads-note { color: var(--muted); font-size: .8rem; margin: 4px 0 0; }
.facts { margin: 30px 0 34px; }
.facts li { min-width: 0; padding: 0 22px; }
.facts li:first-child { padding-left: 0; align-items: flex-start; }
.facts li:first-child span { text-align: left; }
.facts b { font-size: .92rem; gap: 1px; }
.facts .st { font-size: .85em; }
.facts span { font-size: .78rem; white-space: nowrap; }
.age-badge { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 3px; border: 1.5px solid var(--text); border-radius: 3px; font-size: .66rem; font-weight: 700; line-height: 1; }
.info-i { font-size: .8rem; cursor: help; }
.btn-install { background: var(--install); color: var(--install-ink); min-width: 200px; min-height: 44px; border-radius: 8px; font-weight: 500; letter-spacing: .03em; }
.btn-install:hover { box-shadow: 0 1px 3px rgba(16,24,40,.3); filter: brightness(1.06); }
.actions { gap: 8px 14px; }
.actions .icon-btn { color: var(--dev); padding: 10px 10px; }
.actions .icon-btn:hover { background: color-mix(in srgb, var(--dev) 10%, transparent); }
#wishBtn .wish-on { display: none; }
#wishBtn[aria-pressed="true"] .wish-on { display: inline; }
#wishBtn[aria-pressed="true"] .wish-off { display: none; }
.live-link { grid-area: live; margin: 18px 0 0; font-size: .9rem; }
.live-link a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.live-link a:hover { color: var(--text); }
.live-link svg { width: 18px; height: 18px; }
.app-icon-lg { border-radius: 20%; box-shadow: 0 1px 3px rgba(16,24,40,.12), 0 14px 32px -6px rgba(16,24,40,.28); }

.detail-cols { margin-top: 48px; grid-template-columns: minmax(0, 1fr) 360px; gap: 72px; }
.sec-title { font-size: 1.4rem; font-weight: 500; margin: 0 0 18px; }
.sec-title a, .sec-link { display: inline-flex; align-items: center; gap: 14px; color: var(--text); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.sec-title .arrow { display: inline-grid; place-items: center; width: 36px; height: 36px; margin: -6px 0; border-radius: 50%; color: var(--muted); font-size: 1.1rem; transition: background .15s; }
.sec-title a:hover, .sec-link:hover { text-decoration: none; }
.sec-title a:hover .arrow, .sec-link:hover .arrow { background: var(--surface-2); }
.desc-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.upd { display: flex; flex-direction: column; gap: 4px; margin: 26px 0 22px; font-size: .9rem; }
.upd b { font-weight: 500; }
.upd span { color: var(--muted); }
.tagrow { margin: 0; }
.tagchip { padding: 6px 16px; border-radius: 8px; color: var(--text); font-size: .88rem; }
.safety { padding: 22px; border-radius: 8px; margin-top: 18px; }
.support summary h2::after { content: "⌄"; transform: none; margin-left: 18px; line-height: 0; }
.support:not([open]) summary h2::after { transform: none; }
.support[open] summary h2::after { transform: rotate(180deg); }
.support summary h2 { justify-content: flex-start; }

.info-dlg { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 64px); border: 0; border-radius: 20px; padding: 24px 28px 28px; background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0,0,0,.35); }
.info-dlg::backdrop { background: rgba(10,14,25,.5); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dlg-head h2 { margin: 0; }
.dlg-x { color: var(--muted); font-size: 1.1rem; }

@media (max-width: 960px) { .detail-cols { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 760px) {
  .detail { padding-top: 20px; }
  .app-head { grid-template-columns: 1fr; grid-template-areas: "id" "facts" "actions" "hint" "live"; }
  .app-id h1 { line-height: 1.15; }
  .app-id h1 { font-size: 1.5rem; }
  .dev { margin-top: 4px; font-size: .95rem; }
  .facts { margin: 22px -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .facts li { padding: 0 14px; flex: none; }
  .actions .btn { flex: 1 1 100%; }
  .actions .icon-btn { margin: 0; flex: 1 1 auto; justify-content: center; white-space: nowrap; padding: 10px 6px; font-size: .9rem; }
  .detail-cols { margin-top: 32px; }
}

/* ---------- Banner de venta «APPS PWA» de la portada (2026-11-21) ---------- */
.pwa-banner { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 26%); column-gap: 16px; min-height: 440px; padding: 56px 0 40px 44px; border-radius: 16px; color: #fff;
  background: radial-gradient(55% 80% at 82% 30%, rgba(255, 64, 160, .35) 0%, transparent 70%), radial-gradient(60% 90% at 0% 0%, rgba(110, 40, 200, .45) 0%, transparent 70%), linear-gradient(100deg, #1a0638 0%, #2a0a52 45%, #140428 100%); }
.pwa-swoosh { position: absolute; right: 0; bottom: 0; width: 46%; height: 100%; fill: #19e3b1; z-index: -1; }
.pwa-text { display: flex; flex-direction: column; min-width: 0; }
.pwa-text h1 { margin: 0; font-weight: 400; line-height: 1.12; font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: -.005em; }
.pwa-text h1 b { display: block; font-weight: 700; }
.pwa-text h1 span { display: block; }
.pwa-sub { margin: 26px 0 0; font-size: clamp(1.05rem, 2vw, 1.6rem); opacity: .95; }
.pwa-small { margin: 8px 0 0; max-width: 52ch; font-size: .9rem; opacity: .72; }
.pwa-bottom { margin-top: auto; padding-top: 30px; display: flex; align-items: center; flex-wrap: wrap; gap: 24px 32px; }
.pwa-devs { list-style: none; display: flex; gap: 12px; margin: 0; padding: 0 0 24px; }
.pwa-devs a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; width: 86px; }
.pwa-devs a:hover { text-decoration: none; }
.pwa-devs small { color: rgba(255,255,255,.86); font-size: .66rem; line-height: 1.25; text-align: center; height: 2.5em; overflow: hidden; display: block; }
.pwa-devs small b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 86px; }
.pwa-devs img { width: 86px; height: 86px; border-radius: 12px; object-fit: cover; background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.35); -webkit-box-reflect: below 4px linear-gradient(transparent 62%, rgba(0,0,0,.22)); transition: transform .15s; }
.pwa-devs a:hover img { transform: translateY(-3px); }
.pwa-cta { display: inline-flex; align-items: center; justify-content: center; min-width: 234px; min-height: 60px; padding: 0 32px; border-radius: 14px; background: #19e3b1; color: #0b1a33; font-weight: 700; font-size: 1.45rem; box-shadow: 0 10px 28px rgba(25,227,177,.35); white-space: nowrap; transition: transform .15s, box-shadow .15s; }
.pwa-cta:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(25,227,177,.5); }
.pwa-art { position: relative; margin: -56px 0 -40px; display: flex; align-items: flex-end; justify-content: center; }
.pwa-photo { width: 100%; height: 100%; max-height: 440px; object-fit: contain; object-position: bottom center; }
.pwa-phone { position: relative; width: 190px; height: 340px; margin-bottom: 40px; border-radius: 30px; background: linear-gradient(160deg, #2c0f5c, #0e0420); border: 6px solid #0a0316; box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.12); display: flex; flex-direction: column; align-items: center; padding-top: 54px; gap: 12px; transform: rotate(-8deg); }
.pwa-phone img { width: 92px; height: 92px; border-radius: 22%; background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.4); margin-bottom: 10px; }
.pwa-phone i { display: block; width: 70%; height: 10px; border-radius: 10px; background: rgba(255,255,255,.18); }
.pwa-phone i:last-child { width: 46%; height: 36px; margin-top: 14px; background: #19e3b1; border-radius: 12px; }
.pwa-seal { position: absolute; right: 10%; bottom: 22%; display: flex; flex-direction: column; align-items: center; line-height: .88; font-weight: 800; font-size: clamp(2rem, 3.6vw, 3.1rem); letter-spacing: .02em; color: #ffc928; text-shadow: 0 3px 0 #c0390b, 0 6px 18px rgba(0,0,0,.45); transform: rotate(-4deg); }
.pwa-seal b { font-weight: 900; color: #ffd84a; }

@media (max-width: 1000px) {
  .pwa-banner { padding: 36px 0 30px 30px; min-height: 0; }
  .pwa-art { margin: -36px 0 -30px; }
  .pwa-bottom { gap: 18px 24px; }
  .pwa-devs img { width: 72px; height: 72px; }
  .pwa-devs a, .pwa-devs small b { width: 72px; max-width: 72px; }
  .pwa-cta { min-height: 52px; font-size: 1.2rem; min-width: 200px; }
}
@media (max-width: 640px) {
  .pwa-banner { grid-template-columns: 1fr; padding: 28px 20px 0; border-radius: 14px; }
  .pwa-swoosh { width: 100%; height: 40%; }
  .pwa-sub { margin-top: 16px; }
  .pwa-bottom { padding-top: 20px; gap: 6px; }
  .pwa-devs { gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding-bottom: 22px; }
  .pwa-devs a, .pwa-devs small b { width: 60px; max-width: 60px; flex: none; }
  .pwa-devs img { width: 60px; height: 60px; border-radius: 10px; }
  .pwa-devs small { font-size: .6rem; }
  .pwa-cta { flex: 1 1 100%; }
  .pwa-art { margin: 6px -20px 0; height: 250px; }
  .pwa-phone { width: 140px; height: 250px; margin-bottom: -30px; padding-top: 36px; border-radius: 24px; }
  .pwa-phone img { width: 70px; height: 70px; }
  .pwa-seal { right: 8%; bottom: 30%; font-size: 2.2rem; }
}
