/* Hilo — vitrina de Arte de juego (Etapa 67). Generado por hilo-backend/tools/game-art/build-showcase-pages.js. Colores, tipografía y radios salen de css/tokens.css;
 * el header, los botones y el pie salen de css/landing.css. Aquí solo está lo propio de la vitrina. El ancho lo mide el contenedor (.frame), como en la landing. */
body.ga { --stage-a: #1c2552; --stage-b: #0d1130; --gold: #E8B93A; --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; --pad: 16px; }
.ga main > section { padding: 40px var(--pad); }
.ga .wrap { max-width: 1080px; margin: 0 auto; }
.ga .wrap.narrow { max-width: 760px; }
.ga .wrap.center { text-align: center; }
.ga h2 { margin-bottom: 10px; }
.ga h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.005em; }
.ga .lead { max-width: 64ch; margin: 0 0 22px; }
.ga .center .lead { margin-inline: auto; }
.ga code { font-family: var(--mono); font-size: 12.5px; }
.lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 38px; padding: 0 8px; border-radius: var(--radius-full); color: var(--text-secondary); font: 700 13px var(--font-body); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--bg-surface); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.btn-ghost-solid { color: var(--text-primary); border: 1px solid var(--border-subtle); background: var(--bg-surface); }
.btn.big { min-height: 56px; font-size: 17px; }

/* ---------- héroe: abanico de las tres rarezas ---------- */
.ga-hero { display: grid; gap: 26px; padding-top: 28px !important; padding-bottom: 36px !important; max-width: 1144px; margin: 0 auto; overflow-x: clip; }
.ga-hero h1 { font-size: clamp(2.1rem, 9.2cqw, 3.9rem); line-height: 1.03; font-weight: 800; letter-spacing: -.03em; }
.ga-hero .sub { margin: 12px 0 18px; font-size: 17px; line-height: 1.5; color: var(--text-secondary); max-width: 52ch; }
.ga-hero .fine { margin: 8px 0 0; }
.fan { position: relative; width: min(92%, 400px); aspect-ratio: 1 / 1.12; margin: 6px auto 0; }
.fan img { position: absolute; width: 56%; height: auto; border-radius: 6%; filter: drop-shadow(0 18px 30px rgba(15,18,48,.38)); }
.fan .c1 { left: 3%; top: 14%; transform: rotate(-9deg); }
.fan .c2 { right: 3%; top: 14%; transform: rotate(9deg); }
.fan .c3 { left: 22%; top: 0; z-index: 3; transform: scale(1.04); }
.made { margin: 0; font-size: 13.5px; color: var(--text-muted); }

/* ---------- fichas de piezas: fondo oscuro con cuadrícula de transparencia, siempre igual en claro y oscuro ---------- */
.stage { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 12px; border-radius: var(--radius-md); background: radial-gradient(120% 90% at 50% 20%, var(--stage-a), var(--stage-b)); overflow: hidden; }
.stage::before { content: ""; position: absolute; inset: 0; opacity: .5; background-image: conic-gradient(rgba(255,255,255,.055) 25%, transparent 0 50%, rgba(255,255,255,.055) 0 75%, transparent 0); background-size: 18px 18px; }
.stage img { position: relative; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.asset { margin: 0; }
.asset figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; font-size: 13.5px; color: var(--text-secondary); overflow-wrap: anywhere; }
.asset figcaption code { color: var(--text-muted); }
.asset figcaption b { color: var(--text-primary); font-weight: 600; }
.grid { display: grid; gap: 14px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.loops { display: grid; gap: 16px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }

/* hojas de animación: se recorren con steps(); el ancho de cada cuadro es el real de la hoja */
.anim { position: relative; height: 94%; aspect-ratio: calc(var(--cw)) / calc(var(--ch)); background-repeat: no-repeat; background-size: calc(var(--n) * 100%) 100%; background-position: 0 0; animation: ga-play calc(var(--n) / 12 * 1s) steps(var(--n)) infinite; }
html.js .anim:not(.is-in) { animation-play-state: paused; }
@keyframes ga-play { to { background-position: calc(100% * var(--n) / (var(--n) - 1)) 0; } }
@media (prefers-reduced-motion: reduce) { .anim { animation: none; } }

/* ---------- niveles ---------- */
.series { margin-top: 22px; }
.series h3 { margin-bottom: 10px; }
.lvls { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lvls.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ga section[id] { scroll-margin-top: 72px; }
.lvl { margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.lvl .stage { width: 100%; padding: 8px; }
.lvl .badge { width: 74%; max-width: 92px; height: auto; }

/* ---------- héroes ---------- */
.hcards { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hcard { margin: 0; text-align: center; }
.hcard img { width: 100%; height: auto; border-radius: 6%; filter: drop-shadow(0 12px 22px rgba(15,18,48,.3)); }
.hcard figcaption { margin-top: 8px; font-size: 14px; }

/* ---------- el pack ---------- */
.pack { display: grid; gap: 18px; }
.tree { padding: 16px 16px 14px; border-radius: var(--radius-lg); background: var(--stage-b); color: #E7E9F5; box-shadow: var(--shadow-md); overflow-x: auto; }
.tree .tr { display: grid; grid-template-columns: minmax(0, max-content) 1fr; gap: 0 14px; padding: 3px 0; align-items: baseline; }
.tree .f { color: #fff; font-size: 13.5px; white-space: nowrap; }
.tree .d { color: #A8ADCB; font-size: 13.5px; }
.tree .tr:first-child .f { color: var(--gold); font-weight: 700; }
.pack-dl { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pack-dl .own { margin: 6px 0 0; font-size: 15px; color: var(--text-secondary); }

/* ---------- cómo funciona, lo que es y no es, preguntas ---------- */
.how { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 16px; }
.how li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; align-content: start; }
.how .num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 700 15px var(--font-display); color: #fff; background: var(--accent-gradient); }
.how h3 { margin-bottom: 2px; }
.how p { margin: 0; color: var(--text-secondary); }
.two { display: grid; gap: 14px; margin-top: 14px; }
.col { padding: 16px 18px; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--bg-surface); }
.col h3 { margin-bottom: 8px; }
.col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.col li { position: relative; padding-left: 22px; color: var(--text-secondary); }
.col li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.col.yes li::before { content: "✓"; color: #1E8E5A; }
.col.no li::before { content: "–"; color: var(--text-muted); }
details { padding: 2px 0; border-bottom: 1px solid var(--border-subtle); }
summary { display: flex; align-items: center; min-height: 52px; font: 600 16px var(--font-display); cursor: pointer; }
details p { margin: 0 0 14px; color: var(--text-secondary); }
details a { color: var(--text-accent); font-weight: 600; }
.final { background: var(--bg-sunk); }
.final .cta-row { max-width: 440px; margin: 18px auto 0; }

/* ---------- anchos grandes (mide el contenedor, no la ventana) ---------- */
@container page (min-width: 700px) {
  .ga main > section { padding: 64px 32px; }
  .ga-hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: 30px 40px; padding-top: 52px !important; padding-bottom: 56px !important; }
  .ga-hero .made { grid-column: 1 / -1; }
  .fan { width: min(100%, 460px); }
  .ga-hero .cta-row { flex-direction: row; align-items: center; }
  .ga-hero .cta-row .btn, .final .cta-row .btn { flex: 0 0 auto; padding: 0 26px; }
  .final .cta-row { flex-direction: row; justify-content: center; max-width: none; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; }
  .loops { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
  .lvls.n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lvls.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 720px; }
  .hcards { gap: 24px; max-width: 880px; margin-inline: auto; }
  .pack { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: start; gap: 28px; }
  .how { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .how li { grid-template-columns: 1fr; gap: 10px; }
  .two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
