/* Pirimpo: portal de juegos. Concepto: caja de juguetes ordenada. Wordmark redondeado con tres "pirimpines" de color; tarjetas de juego como cartuchos. */
:root {
  --bg: #f2f4f8;
  --paper: #ffffff;
  --paper-2: #eaedf4;
  --ink: #1c1a2e;
  --muted: #5d6279;
  --line: #d8dce8;
  --coral: #ff5a4e;
  --teal: #12a594;
  --sun: #ffc23d;
  --accent-ink: #ffffff;
  --shadow: 0 1px 0 rgba(28,26,46,.05), 0 18px 34px -22px rgba(28,26,46,.55);
  --f-marca: 'Fredoka', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --f-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #12111c; --paper: #1b1a29; --paper-2: #242337; --ink: #eceaf6; --muted: #a2a3bb; --line: #2f2e45;
  --coral: #ff6f63; --teal: #2cc5b2; --sun: #ffcd57; --accent-ink: #1a0f0e; --shadow: 0 18px 34px -22px rgba(0,0,0,.9); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #12111c; --paper: #1b1a29; --paper-2: #242337; --ink: #eceaf6; --muted: #a2a3bb; --line: #2f2e45;
  --coral: #ff6f63; --teal: #2cc5b2; --sun: #ffcd57; --accent-ink: #1a0f0e; --shadow: 0 18px 34px -22px rgba(0,0,0,.9); 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(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.wrap { max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 18px 48px; }

/* Marca */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 6px 6px; }
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-marca); font-weight: 700; font-size: 34px; letter-spacing: -.01em; line-height: 1; }
.puntos { display: inline-flex; gap: 4px; }
.puntos i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.puntos i:nth-child(1) { background: var(--coral); }
.puntos i:nth-child(2) { background: var(--sun); transform: translateY(-5px); }
.puntos i:nth-child(3) { background: var(--teal); }
.top nav a { font-weight: 700; font-size: 15px; text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }

/* Portada */
.hero { padding-block: 36px 26px; max-width: 680px; }
.hero h1 { font-family: var(--f-marca); font-weight: 700; font-size: clamp(40px, 8vw, 68px); line-height: .98; letter-spacing: -.02em; }
.hero h1 span { color: var(--coral); }
.hero p { font-size: 19px; color: var(--muted); margin: 14px 0 0; max-width: 52ch; }
.seccion { font-family: var(--f-marca); font-weight: 700; font-size: 26px; margin: 22px 0 14px; display: flex; align-items: baseline; gap: 10px; }
.seccion small { font-family: var(--f-body); font-weight: 600; font-size: 14px; color: var(--muted); }
.juegos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.juego { display: grid; grid-template-rows: auto 1fr; background: var(--paper); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; min-width: 0; }
.juego:hover { transform: translateY(-3px); }
.juego .portadilla { aspect-ratio: 1200 / 630; background: #0f1d2b; overflow: hidden; }
.juego .portadilla img { width: 100%; height: 100%; object-fit: cover; }
.juego .info { padding: 16px 18px 18px; display: grid; gap: 8px; align-content: start; }
.juego h3 { font-family: var(--f-marca); font-weight: 700; font-size: 26px; line-height: 1.05; }
.juego p { margin: 0; color: var(--muted); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink); }
.chips span.nuevo { background: var(--coral); color: var(--accent-ink); }
.jugar { justify-self: start; margin-top: 6px; font-family: var(--f-marca); font-weight: 700; font-size: 17px; background: var(--ink); color: var(--bg); padding: 9px 18px; border-radius: 999px; }
.juego.pronto { border-style: dashed; box-shadow: none; background: transparent; place-content: center; text-align: center; min-height: 150px; padding: 24px; }
.juego.pronto h3 { color: var(--muted); }
.juego.pronto:hover { transform: none; }
.cajas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 30px; }
.caja { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.caja b { font-family: var(--f-marca); font-size: 19px; display: block; margin-bottom: 4px; }
.caja p { margin: 0; color: var(--muted); font-size: 15px; }
.ad { margin: 26px 0 0; min-height: 100px; display: grid; gap: 4px; }
.ad-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; }

/* Páginas legales */
.legal { max-width: 720px; }
.legal h1 { font-family: var(--f-marca); font-weight: 700; font-size: clamp(34px, 7vw, 48px); line-height: 1; margin: 18px 0 14px; }
.legal h2 { font-family: var(--f-marca); font-weight: 700; font-size: 22px; margin: 26px 0 6px; }
.legal p, .legal li { font-size: 15.5px; max-width: 68ch; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.legal th, .legal td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal .wrap-t { overflow-x: auto; }
.legal a { text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pending { background: var(--sun); color: #1a1400; padding: 0 4px; border-radius: 3px; }
.volver { display: inline-block; margin-top: 24px; font-weight: 800; }

/* Pie */
footer { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); text-align: center; }
footer ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
footer a { color: var(--muted); text-underline-offset: 3px; }
footer a:hover { color: var(--ink); }

/* Banner de cookies (compartido con los juegos) */
.btn { display: inline-block; text-align: center; border: 2px solid var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 800; font-size: 14.5px; cursor: pointer; background: var(--paper); color: var(--ink); font-family: var(--f-body); }
.btn.main { background: var(--ink); color: var(--bg); }
.btn.small { padding: 7px 14px; }
.cookies { position: fixed; z-index: 100; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: 3px solid var(--ink); box-shadow: 0 -10px 30px -12px rgba(0,0,0,.35);
  padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.cookies > * { max-width: 620px; margin-left: auto; margin-right: auto; }
.cookies p { margin: 0 auto 10px; font-size: 14.5px; }
.cookies-cfg { display: grid; gap: 6px; margin-bottom: 10px; font-size: 14.5px; }
.cookies-cfg input { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; accent-color: var(--teal); }
.cookies-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.mini-links { margin-top: 0; }
a.caja { text-decoration: none; transition: transform .15s ease; }
a.caja:hover { transform: translateY(-2px); }
.sobre { margin-top: 30px; max-width: 70ch; }
.sobre p { color: var(--muted); }
