/* =========================================================
   RapidTools · estilo tienda de apps en cada herramienta
   Se carga DESPUÉS de la hoja propia de cada página (tools.css, calc.css, ci.css, qr.css, cv.css, styles.css):
   cambia la paleta a la de la portada y suma el encabezado con el ícono (.apphead).
   ========================================================= */
:root {
  --bg: #ffffff; --bg2: #f0f2f5; --panel: #ffffff; --ink: #1f1f1f; --ink2: #444746; --muted: #5f6368;
  --line: #e3e3e3; --line2: #c4c7c5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .05);
}
:root[data-theme="dark"] {
  --bg: #111318; --bg2: #1e2128; --panel: #181b21; --ink: #e8eaed; --ink2: #bdc1c6; --muted: #9aa0a6;
  --line: #2c3038; --line2: #474c56;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .25);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111318; --bg2: #1e2128; --panel: #181b21; --ink: #e8eaed; --ink2: #bdc1c6; --muted: #9aa0a6;
    --line: #2c3038; --line2: #474c56;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .25);
  }
}
body { background: var(--bg); }
.top, .topbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* encabezado de la herramienta: ícono + nombre + datos */
.apphead { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 22px; row-gap: 0; align-items: center; justify-content: stretch; padding-top: 28px; padding-bottom: 18px; }
.apphead > * { grid-column: 1 / -1; }
.apphead > .apphead__icon, .apphead > .apphead__name { grid-column: auto; grid-row: 1; }
.apphead__icon { width: 96px; height: 96px; border-radius: 22%; box-shadow: 0 1px 3px rgba(0, 0, 0, .2), 0 4px 12px rgba(0, 0, 0, .08); }
.apphead h1 { margin: 0; max-width: none; font-size: clamp(24px, 3.4vw, 38px); font-weight: 750; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
.apphead h1 em { font-style: normal; background: none; -webkit-background-clip: initial; background-clip: initial; color: inherit; }
.apphead__dev { margin: 6px 0 0 !important; font-size: 15px !important; font-weight: 600; color: var(--muted); }
.apphead__dev a { color: var(--acc-text, var(--accent-text, var(--acc, #2f5bea))); text-decoration: none; }
.apphead__dev a:hover { text-decoration: underline; }
.apphead__stats { display: flex; list-style: none; margin: 22px 0 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.apphead__stats::-webkit-scrollbar { display: none; }
.apphead__stats li { flex: none; display: flex; flex-direction: column; align-items: center; padding: 0 24px; border-left: 1px solid var(--line); text-align: center; }
.apphead__stats li:first-child { padding-left: 0; border-left: 0; }
.apphead__stats b { font-size: 15px; font-weight: 650; color: var(--ink); }
.apphead__stats span { font-size: 13px; color: var(--muted); }
.apphead > p { margin: 18px 0 0; max-width: 720px; font-size: 16.5px; color: var(--ink2); }
.apphead > .privacy { justify-self: start; }
.apphead > .hero__actions { margin-top: 16px; }
@media (max-width: 640px) {
  .apphead { column-gap: 16px; padding-top: 20px; }
  .apphead__icon { width: 72px; height: 72px; }
  .apphead__dev { font-size: 14px !important; margin-top: 4px !important; }
  .apphead__stats li { padding: 0 16px; }
  .apphead > p { font-size: 15.5px; }
}

/* botón de Cafecito: contraste suficiente en claro y en oscuro (también con el oscuro automático del sistema) */
:root { --coffee: #9a4915; }
.btn--coffee { color: #fff; }
:root[data-theme="dark"] .btn--coffee { color: #1d1006; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--coffee { color: #1d1006; } }

/* footer del sitio: logo + columnas (lo genera tools/sitefooter.py) */
.sf { margin-top: 56px; border-top: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-size: 14px; }
.sf__in { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 32px 28px; padding-top: 38px; padding-bottom: 30px; }
.sf__logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 20px; color: var(--ink); text-decoration: none; }
.sf__logo img { width: 40px; height: 40px; border-radius: 22%; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.sf__brand p { margin: 12px 0 0; max-width: 34ch; line-height: 1.5; }
.sf__t { margin: 0 0 12px; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.sf ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.sf a { color: var(--ink2); text-decoration: none; }
.sf a:hover { color: var(--ink); text-decoration: underline; }
.sf__bar { border-top: 1px solid var(--line); }
.sf__bar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-top: 16px; padding-bottom: 28px; font-size: 13px; }
@media (max-width: 900px) { .sf__in { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sf__brand { grid-column: 1 / -1; } }

/* página de categoría: encabezado y lista de apps como en la tienda (la genera tools/build_tools.py) */
.storehead h1 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 750; letter-spacing: -.025em; }
.storehead h1 em { background: none; -webkit-background-clip: initial; background-clip: initial; color: inherit; }
.storehead .apphead__stats { margin-top: 18px; }
.store { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 2px 32px; }
.store__app { display: flex; align-items: center; gap: 16px; padding: 12px 10px; margin: 0 -10px; border-radius: 16px; color: var(--ink); text-decoration: none; }
.store__app:hover { background: var(--bg2); }
.store__app img { flex: none; width: 76px; height: 76px; border-radius: 22%; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.store__txt { flex: 1; min-width: 0; }
.store__txt b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.store__txt small { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.store__txt > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; color: var(--ink2); margin-top: 3px; line-height: 1.4; }
.store__go { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); font-size: 14px; font-weight: 600; color: var(--acc-text, var(--acc)); }
.store__app:hover .store__go { background: var(--acc-soft); border-color: var(--acc-soft); }
@media (max-width: 640px) { .store__app { gap: 12px; } .store__app img { width: 64px; height: 64px; } .store__go { padding: 0 12px; } }

/* «También te puede interesar»: fila de apps similares; en el celular se desliza de costado */
.similar { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 22px 18px; }
.sim { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--ink); text-decoration: none; }
.sim img { width: 100%; max-width: 128px; height: auto; aspect-ratio: 1; border-radius: 22%; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); transition: transform .15s ease; }
.sim:hover img { transform: translateY(-2px); }
.sim b { font-size: 14.5px; font-weight: 550; line-height: 1.3; }
.sim small { margin-top: -4px; font-size: 13px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 720px) {
  .similar { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px; margin: 0 -16px; padding: 4px 16px 6px; scrollbar-width: none; }
  .similar::-webkit-scrollbar { display: none; }
  .sim { flex: 0 0 88px; scroll-snap-align: start; }
  .sim img { width: 88px; border-radius: 20px; }
  .sim b { font-size: 13px; font-weight: 500; }
  .sim small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sim img { transition: none; } .sim:hover img { transform: none; } }
.brand > img { border-radius: 22%; flex: none; }

/* ---------- ficha estilo Play Store (la arma tools/ficha.py; la hace funcionar assets/ficha.js) ---------- */
.apphead--store, #opiniones { --fa: var(--acc, var(--accent, #1a73e8)); --fa-ink: var(--acc-ink, var(--accent-ink, #fff)); --fa-text: var(--acc-text, var(--accent-text, var(--fa))); }
@media (min-width: 760px) {
  .apphead--store { grid-template-columns: minmax(0, 1fr) auto; column-gap: 48px; padding-top: 40px; }
  .apphead--store > * { grid-column: 1; }
  .apphead--store > .apphead__icon { grid-column: 2; grid-row: 1 / span 6; align-self: start; width: 184px; height: 184px; box-shadow: 0 2px 6px rgba(0, 0, 0, .16), 0 18px 40px -12px rgba(0, 0, 0, .35); }
  .apphead--store > .apphead__name { grid-column: 1; }
  .apphead--store h1 { font-size: clamp(30px, 4vw, 48px); }
}
.rt-rate b { display: inline-flex; align-items: center; gap: 3px; }
.rt-rate b svg { width: 13px; height: 13px; fill: currentColor; }
.apphead__cta { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 22px; }
.cta-main { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; min-width: 200px; padding: 0 28px; border-radius: 10px; background: var(--fa); color: var(--fa-ink); font-weight: 650; font-size: 15.5px; text-decoration: none; }
.cta-main:hover { filter: brightness(1.07); }
.cta-line { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--fa-text); font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; border-radius: 8px; }
.cta-line:hover { background: color-mix(in srgb, var(--fa) 10%, transparent); }
.cta-line svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; display: grid; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.share-menu a, .share-menu button { display: block; padding: 10px 12px; border: 0; border-radius: 9px; background: none; color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.2; text-align: left; text-decoration: none; cursor: pointer; }
.share-menu a:hover, .share-menu button:hover, .share-menu :focus-visible { background: var(--bg2); outline: none; }
.apphead--store > p { max-width: 640px; }
.usar-anchor { scroll-margin-top: 64px; padding-top: 34px; padding-bottom: 6px; }
.usar-t { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font-size: 21px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.usar-t::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 640px) { .usar-anchor { padding-top: 26px; } .usar-t { font-size: 19px; margin-bottom: 14px; } }
@media (max-width: 640px) { .cta-main { flex: 1 1 100%; min-width: 0; } }

/* tira de capturas: se desliza de costado */
.shots { margin-top: 10px; }
.shots__row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.shot { flex: none; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); cursor: zoom-in; overflow: hidden; scroll-snap-align: start; line-height: 0; }
.shot img { display: block; height: 300px; width: auto; }
.shot:hover { border-color: var(--line2); }
.shot:focus-visible { outline: 3px solid color-mix(in srgb, var(--acc, var(--accent, #1a73e8)) 50%, transparent); outline-offset: 2px; }
@media (max-width: 640px) { .shots__row { margin: 0 -16px; padding: 4px 16px 12px; scroll-padding-inline: 16px; } .shot img { height: 240px; } }
.lb { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; display: none; place-items: center; }
.lb[open] { display: grid; }
.lb::backdrop { background: rgba(0, 0, 0, .86); }
.lb img { max-width: min(92vw, 1200px); max-height: 86vh; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lb button { position: fixed; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.lb button:hover { background: rgba(255, 255, 255, .26); }
.lb__x { top: 16px; right: 16px; }
.lb__p { left: 16px; top: 50%; transform: translateY(-50%); }
.lb__s { right: 16px; top: 50%; transform: translateY(-50%); }
.lb__n { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; opacity: .8; }

/* calificaciones y opiniones */
.op { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 36px; align-items: center; max-width: 720px; margin-top: 18px; }
.op__sum { display: grid; justify-items: start; gap: 4px; min-width: 132px; }
.op__sum b { font-size: 60px; font-weight: 500; line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.op__sum > span:last-child { font-size: 13.5px; color: var(--muted); max-width: 24ch; }
.op__stars, .rev__st { display: inline-flex; gap: 1px; }
.st { position: relative; display: inline-flex; width: 16px; height: 16px; color: var(--line2); }
.st svg { width: 100%; height: 100%; fill: currentColor; }
.st--on { color: var(--fa); }
.st--half::after { content: ""; position: absolute; inset: 0 50% 0 0; overflow: hidden; background: linear-gradient(var(--fa), var(--fa)); -webkit-mask: var(--star-mask) 0 0 / 16px 16px no-repeat; mask: var(--star-mask) 0 0 / 16px 16px no-repeat; }
#opiniones, .rt-rate { --star-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9Z%22/%3E%3C/svg%3E"); }
.op__bars { display: grid; gap: 6px; }
.op__bar { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.op__bar i { height: 10px; border-radius: 99px; background: var(--bg2); overflow: hidden; }
.op__bar s { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--fa); transition: width .4s ease; }
.op__form { max-width: 720px; margin-top: 28px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.op__form h3 { margin: 0; font-size: 18px; }
.op__hint { margin: 4px 0 10px !important; color: var(--muted); font-size: 14.5px; }
.op__pick { display: flex; gap: 6px; }
.op__pick button { width: 48px; height: 48px; padding: 6px; border: 0; border-radius: 50%; background: none; color: var(--line2); cursor: pointer; }
.op__pick button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.op__pick button.is-on { color: var(--fa); }
.op__pick button.is-on svg { fill: currentColor; }
.op__pick button:focus-visible { outline: 3px solid color-mix(in srgb, var(--fa) 45%, transparent); }
.op__more { display: grid; gap: 12px; margin-top: 14px; }
.op__more[hidden] { display: none; }
.op__f { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink2); }
.op__f textarea, .op__f input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font-family: inherit; font-size: 15.5px; font-weight: 400; line-height: 1.5; resize: vertical; }
.op__f textarea:focus, .op__f input:focus { outline: none; border-color: var(--fa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fa) 22%, transparent); }
.op__f small { justify-self: end; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.op__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.op__legal { margin: 0 !important; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.op__legal a { color: inherit; }
.op__send { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.op__btn { min-height: 44px; padding: 0 26px; border: 0; border-radius: 10px; background: var(--fa); color: var(--fa-ink); font-family: inherit; font-size: 15px; font-weight: 650; cursor: pointer; }
.op__btn:disabled { opacity: .6; cursor: default; }
.op__st { font-size: 14px; color: var(--ink2); }
.op__st.is-ok { color: var(--ok, #138a52); }
.op__st.is-bad { color: var(--bad, #c0281b); }
.op__list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 24px; max-width: 720px; }
.op__list:empty { display: none; }
.rev__head { display: flex; align-items: center; gap: 12px; }
.rev__av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--fa) 20%, var(--panel)); color: var(--fa-text); font-weight: 700; font-size: 15px; }
.rev__head b { font-weight: 600; font-size: 15px; }
.rev__meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.rev__st .st { width: 13px; height: 13px; }
.rev p { margin: 6px 0 0; color: var(--ink2); font-size: 15px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 560px) { .op { grid-template-columns: 1fr; } .op__pick button { width: 44px; height: 44px; } }
