/* =====================================================================
   RetroGames.uy — sistema visual "El Fichín"
   Concepto: los objetos del retro. Carcasa de plástico gris (fondo),
   etiquetas de cartucho (tarjetas), tele de tubo (pantallas de datos),
   botones de joystick (acciones). Modo oscuro = consola negra.
   ===================================================================== */

@font-face { font-family: "Bungee"; src: url(../fonts/bungee-latin.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url(../fonts/archivo-latin.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Archivo"; src: url(../fonts/archivo-italic-latin.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(../fonts/jetbrains-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "VT323"; src: url(../fonts/vt323-latin.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* color */
  --bg: #d9d8d3;          /* plástico gris consola */
  --bg-2: #cdccc6;        /* plástico en sombra */
  --surface: #f4f3ef;     /* papel de etiqueta */
  --surface-2: #e9e8e3;
  --ink: #1c2030;
  --ink-2: #474c60;
  --ink-3: #555a6e;       /* 4.5:1 sobre el plástico gris */
  --line: #b9b7af;
  --line-2: #a6a49c;
  --celeste: #4f9fdc;
  --celeste-ink: #1b5a8c; /* celeste legible sobre claro (4.9:1 sobre el gris) */
  --sol: #f2b705;
  --sol-ink: #8a6500;
  --rojo: #c8372d;
  --rojo-ink: #a52a21;
  --verde: #2f8a57;
  --fosforo: #9ff2b4;
  --screen: #0d1418;
  --screen-2: #13202a;
  --on-dark: #eef0e8;
  --shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 -3px 0 rgba(28,32,48,.12) inset;
  --lift: 0 14px 30px -18px rgba(28,32,48,.45);
  --ridge: rgba(28,32,48,.035);

  /* tipo */
  --f-display: "Bungee", "Arial Black", Impact, sans-serif;
  --f-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --f-crt: "VT323", ui-monospace, Consolas, monospace;
  --t-xs: .75rem; --t-sm: .875rem; --t-md: 1rem; --t-lg: 1.25rem; --t-xl: 1.6rem;
  --t-2xl: clamp(1.75rem, 3.6vw, 2.5rem); --t-3xl: clamp(2.3rem, 6vw, 4.4rem);

  /* espacio */
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --r-sm: 4px; --r-md: 8px; --r-lg: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16181e; --bg-2: #1c1f27; --surface: #22252e; --surface-2: #2a2e38;
    --ink: #ecebe5; --ink-2: #b4b8c6; --ink-3: #8b90a2; --line: #353946; --line-2: #444959;
    --celeste-ink: #7fc0f2; --sol-ink: #f5c84a; --rojo-ink: #f0776c; --verde: #5cc98c;
    --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 -3px 0 rgba(0,0,0,.35) inset;
    --lift: 0 14px 30px -16px rgba(0,0,0,.8); --ridge: rgba(255,255,255,.018);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16181e; --bg-2: #1c1f27; --surface: #22252e; --surface-2: #2a2e38;
  --ink: #ecebe5; --ink-2: #b4b8c6; --ink-3: #8b90a2; --line: #353946; --line-2: #444959;
  --celeste-ink: #7fc0f2; --sol-ink: #f5c84a; --rojo-ink: #f0776c; --verde: #5cc98c;
  --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 -3px 0 rgba(0,0,0,.35) inset;
  --lift: 0 14px 30px -16px rgba(0,0,0,.8); --ridge: rgba(255,255,255,.018);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-body);
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, var(--ridge) 3px 4px);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; display: flex; flex-direction: column; gap: clamp(48px, 7vw, 88px); padding-bottom: 88px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--celeste-ink); text-underline-offset: 3px; }
a:hover { color: var(--rojo-ink); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.05; text-wrap: balance; margin: 0; letter-spacing: .005em; }
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); }
p { margin: 0; }
code { font-family: var(--f-mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 3px; }
:focus-visible { outline: 3px solid var(--sol); outline-offset: 2px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--surface); padding: 10px 14px; z-index: 100; border-radius: var(--r-md); }
.skip:focus { top: 12px; }
.shell { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.narrow { max-width: 820px; }
.muted { color: var(--ink-2); }
.eyebrow { font: 600 var(--t-xs)/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 62ch; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- header: frente de consola ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg-2); z-index: 40; }
.hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg-2); border-bottom: 2px solid var(--line); box-shadow: 0 6px 18px -14px rgba(0,0,0,.5); }
.hdr-in { max-width: 1240px; margin: 0 auto; padding: 10px var(--gutter-r) 10px var(--gutter); display: flex; align-items: center; gap: 22px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.logo img { width: 40px; height: 40px; image-rendering: pixelated; }
.logo-t { font: 400 1.15rem/1 var(--f-display); letter-spacing: .01em; }
.logo-t b { font-weight: 400; color: var(--celeste-ink); }
.nav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 12px; border-radius: var(--r-md); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; line-height: 1.1; }
.nav a small { font: 500 .62rem/1 var(--f-mono); color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--surface); }
.nav a[aria-current="page"] small { color: var(--sol); }
.hdr-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.hdr-search { position: relative; }
.hdr-search input { width: 200px; }
.theme-btn, .menu-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); cursor: pointer; display: grid; place-items: center; padding: 0; color: var(--ink); }
.theme-btn span { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(90deg, var(--ink) 50%, var(--sol) 50%); }
.menu-btn { display: none; gap: 3px; align-content: center; }
.menu-btn i { display: block; width: 18px; height: 2px; background: var(--ink); }
.me { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .9rem; }
.me img { width: 34px; height: 34px; border-radius: 6px; image-rendering: pixelated; border: 2px solid var(--line-2); }
/* franja de anuncio (se maneja desde /admin/ajustes) */
.announce { background: var(--sol); color: #1c2030; font-weight: 700; font-size: .92rem; }
.announce .shell { display: flex; align-items: center; justify-content: center; gap: 10px; padding-block: 8px; text-align: center; }
.announce a { color: inherit; text-decoration: none; }
.announce a:hover { text-decoration: underline; color: inherit; }
.announce .led { flex: none; }

.bell { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); color: var(--ink); display: grid; place-items: center; text-decoration: none; }
.bell:hover { color: var(--rojo-ink); }
.bell b { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--rojo); color: #fff; font: 700 .68rem/19px var(--f-mono); text-align: center; border: 2px solid var(--bg-2); }

/* menú del usuario */
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; position: relative; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary::after { content: "▾"; font-size: .8rem; color: var(--ink-3); }
.usermenu .dot { position: absolute; left: 26px; top: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--rojo); border: 2px solid var(--bg-2); }
.usermenu-box { position: absolute; right: 0; top: calc(100% + 10px); min-width: 250px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--lift), 0 0 0 2px var(--line); padding: 6px; display: flex; flex-direction: column; z-index: 60; }
.usermenu-box a, .usermenu-box button { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font: 600 .93rem/1.2 var(--f-body); background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.usermenu-box a:hover, .usermenu-box button:hover { background: var(--surface-2); color: var(--ink); }
.usermenu-box a.staff { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; }
.usermenu-box form { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.pill { background: var(--sol); color: #1c2030; font: 700 .68rem/1 var(--f-mono); padding: 3px 7px; border-radius: 999px; white-space: nowrap; }
.nav-search { display: none; }

.led-strip { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: -18px; font: 600 .55rem/1 var(--f-mono); letter-spacing: .2em; color: var(--ink-3); display: flex; align-items: center; gap: 6px; pointer-events: none; }
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--rojo); box-shadow: 0 0 6px var(--rojo), 0 0 1px #fff inset; }

/* ---------- botones: de joystick ---------- */
.btn {
  --b: var(--rojo); --bt: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 .95rem/1 var(--f-body); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  background: var(--b); color: var(--bt); border: 0; border-radius: 999px; padding: 13px 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 -4px 0 rgba(0,0,0,.25) inset, 0 3px 0 rgba(28,32,48,.25);
  transition: transform .06s, box-shadow .06s, filter .15s;
}
.btn:hover { color: var(--bt); filter: brightness(1.08); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 -2px 0 rgba(0,0,0,.25) inset, 0 1px 0 rgba(28,32,48,.25); }
.btn-sol { --b: var(--sol); --bt: #1c2030; }
.btn-celeste { --b: var(--celeste); --bt: #0c2236; }
.btn-ink { --b: var(--ink); --bt: var(--surface); }
.btn-ghost { --b: transparent; --bt: var(--ink); box-shadow: inset 0 0 0 2px var(--line-2); }
.btn-ghost:hover { --bt: var(--ink); background: var(--surface-2); }
.btn-fb { --b: #1d4f9a; --bt: #fff; font-size: .85rem; padding: 11px 16px; }
.btn-sm { padding: 9px 16px; font-size: .85rem; }
.share-wa svg { color: #1fa855; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow::after { content: "›"; font-size: 1.3em; line-height: 0; }

/* ---------- formularios ---------- */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=url], input[type=tel], input[type=datetime-local], select, textarea {
  width: 100%; font: 500 1rem/1.3 var(--f-body); color: var(--ink); background: var(--surface);
  border: 2px solid var(--line-2); border-radius: var(--r-md); padding: 11px 13px; min-width: 0;
  box-shadow: 0 2px 0 rgba(28,32,48,.06) inset;
}
textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--celeste); box-shadow: 0 0 0 3px color-mix(in srgb, var(--celeste) 30%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-weight: 700; font-size: .92rem; }
.field .hint { font-size: .84rem; color: var(--ink-3); }
.field .err { font-size: .86rem; color: var(--rojo-ink); font-weight: 600; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.fields .full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--rojo); flex: none; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radios label { position: relative; }
.radios input { position: absolute; opacity: 0; }
.radios span { display: block; padding: 9px 14px; border: 2px solid var(--line-2); border-radius: 999px; font-weight: 700; font-size: .9rem; cursor: pointer; background: var(--surface); }
.radios input:checked + span { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.radios input:focus-visible + span { outline: 3px solid var(--sol); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.form-card { background: var(--surface); border-radius: var(--r-lg); padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow), var(--lift); display: flex; flex-direction: column; gap: 22px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* autocompletar */
.ac { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-md); z-index: 50; overflow: hidden; box-shadow: var(--lift); min-width: 280px; }
.ac a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.ac a:last-child { border-bottom: 0; }
.ac a { align-items: center; }
.ac a img { width: 34px; height: 44px; object-fit: cover; border-radius: 3px; flex: none; background: var(--screen); }
.ac a img.ac-con { object-fit: contain; background: transparent; }
.ac a .ac-t { flex: 1; min-width: 0; }
.ac a small { color: var(--ink-3); font-family: var(--f-mono); font-size: .72rem; white-space: nowrap; }
.ac a[aria-selected="true"], .ac a:hover { background: var(--ink); color: var(--surface); }
.ac a[aria-selected="true"] small, .ac a:hover small { color: var(--sol); }

/* ---------- avisos ---------- */
.flashes { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; margin-bottom: -40px; }
.flash { padding: 12px 16px; border-radius: var(--r-md); font-weight: 600; background: var(--surface); border-left: 6px solid var(--celeste); }
.flash-ok { border-color: var(--verde); }
.flash-error { border-color: var(--rojo); }
.flash-info { border-color: var(--sol); }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 500 var(--t-xs)/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-top: 22px; margin-bottom: calc(-1 * clamp(28px, 5vw, 60px)); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--rojo-ink); }

/* ---------- encabezados de sección ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 26px; }
.sec-head > div { display: flex; flex-direction: column; gap: 10px; max-width: 70ch; }
.sec-head p { color: var(--ink-2); }
.page-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-top: clamp(28px, 4vw, 48px); }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 18px; }
.page-head .art { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--lift); aspect-ratio: 3 / 2; background: var(--screen); }
.page-head .art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }

/* ---------- la tele (pantalla CRT) ---------- */
.tv { background: linear-gradient(180deg, #3a342d, #2a2520); border-radius: 26px; padding: clamp(12px, 2vw, 22px); box-shadow: 0 30px 50px -30px rgba(0,0,0,.7), 0 2px 0 rgba(255,255,255,.08) inset; position: relative; }
.tv-screen { position: relative; background: var(--screen); border-radius: 30px / 24px; overflow: hidden; box-shadow: inset 0 0 0 4px #0a0a0a, inset 0 0 70px rgba(0,0,0,.9); isolation: isolate; }
.tv-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 58%, rgba(0,0,0,.6)); }
.tv-screen img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.tv-brand { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); font: 400 .6rem/1 var(--f-display); color: #8e8476; letter-spacing: .2em; }
.crt { font-family: var(--f-crt); color: var(--fosforo); font-size: 1.35rem; line-height: 1.15; text-shadow: 0 0 6px rgba(159,242,180,.45); }
.crt .y { color: #f5c84a; text-shadow: 0 0 6px rgba(245,200,74,.5); }
.crt .c { color: #8fd0ff; }
.crt .r { color: #ff8f80; }

/* ---------- portada ---------- */
.hero { position: relative; overflow: hidden; background: var(--screen); color: var(--on-dark); isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; image-rendering: pixelated; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(13,20,24,.94) 0%, rgba(13,20,24,.82) 38%, rgba(13,20,24,.15) 70%, rgba(13,20,24,0) 100%), linear-gradient(0deg, rgba(13,20,24,.7), transparent 30%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); }
.hero-in { padding-block: clamp(56px, 9vw, 120px) clamp(48px, 7vw, 96px); display: flex; flex-direction: column; gap: 24px; max-width: 1240px; }
.hero h1 { max-width: 13ch; color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.hero h1 em { font-style: normal; color: var(--sol); }
.hero .lead { color: #cdd3d6; max-width: 46ch; }
.hero .eyebrow { color: var(--fosforo); }
.hero-search { position: relative; max-width: 560px; display: flex; flex-direction: column; gap: 10px; }
.hero-search label { font: 400 1rem/1 var(--f-display); color: #fff; }
.hero-search .row { display: flex; flex-wrap: nowrap; gap: 8px; background: #f4f3ef; border-radius: 999px; padding: 6px; box-shadow: 0 0 0 4px rgba(242,183,5,.35); }
.hero-search input { border: 0; background: transparent; box-shadow: none; font-size: 1.08rem; padding: 10px 14px; color: #1c2030; }
.hero-search input:focus { box-shadow: none; }
.hero-search .hint { font-size: .85rem; color: #aeb7bb; }
.hero-search .hint a { color: var(--fosforo); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; font: 500 var(--t-sm)/1.3 var(--f-mono); color: #aeb7bb; }
.hero-stats b { display: block; font: 400 1.6rem/1 var(--f-display); color: #fff; }

/* canales */
.channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.channel { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow), var(--lift); transition: transform .18s; }
.channel:hover { transform: translateY(-4px); color: var(--ink); }
.channel .pic { aspect-ratio: 3 / 2; background: var(--screen); position: relative; overflow: hidden; }
.channel .pic img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transition: transform .5s; }
.channel:hover .pic img { transform: scale(1.04); }
.channel .ch { position: absolute; top: 12px; right: 12px; font: 400 1.4rem/1 var(--f-crt); color: #fff; background: rgba(13,20,24,.65); padding: 3px 8px; border-radius: 4px; letter-spacing: .05em; }
.channel .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.channel h3 { font-size: 1.3rem; }
.channel p { color: var(--ink-2); font-size: .97rem; }
.channel .go { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--celeste-ink); }
.channel.big { grid-column: span 2; flex-direction: row; }
.channel.big .pic { flex: 1.3; aspect-ratio: auto; min-height: 280px; }
.channel.big .body { flex: 1; justify-content: center; padding: 28px; }
.channel.big h3 { font-size: 1.8rem; }

/* tira "últimas ventas" como marquesina */
.ticker { background: var(--screen); color: var(--fosforo); border-block: 3px solid #000; overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 48px; padding: 12px 0; animation: tick 60s linear infinite; font: 400 1.3rem/1 var(--f-crt); }
.ticker-track span b { color: #f5c84a; font-weight: 400; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- cartuchos (tarjetas de juego) ---------- */
.carts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 18px; }
.cart { --c: var(--celeste); position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.cart-shell { background: linear-gradient(180deg, #bcbab3, #a9a79f); border-radius: 10px 10px 4px 4px; padding: 16px 10px 12px; position: relative; box-shadow: 0 -3px 0 rgba(0,0,0,.18) inset, 0 10px 20px -14px rgba(0,0,0,.6); transition: transform .15s; }
:root[data-theme="dark"] .cart-shell { background: linear-gradient(180deg, #3b3f4b, #2f323c); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cart-shell { background: linear-gradient(180deg, #3b3f4b, #2f323c); } }
.cart-shell::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 38%; height: 4px; border-radius: 2px; background: rgba(0,0,0,.18); }
.cart-shell::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 4px; background: repeating-linear-gradient(90deg, rgba(0,0,0,.2) 0 3px, transparent 3px 7px); }
.cart:hover .cart-shell { transform: translateY(-4px) rotate(-.6deg); }
.cart-label { background: var(--c); border-radius: 3px; min-height: 150px; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; position: relative; overflow: hidden; }
.cart-label::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 15%, rgba(255,255,255,.35), transparent 45%), repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 6px, transparent 6px 12px); pointer-events: none; }
.cart-plat { font: 600 .62rem/1 var(--f-mono); letter-spacing: .12em; color: rgba(255,255,255,.95); background: rgba(0,0,0,.28); align-self: flex-start; padding: 3px 6px; border-radius: 2px; position: relative; }
.cart-title { font: 400 1.02rem/1.08 var(--f-display); color: var(--ct, #fff); text-shadow: 0 2px 0 var(--cs, rgba(0,0,0,.35)); position: relative; overflow-wrap: anywhere; }
.cart-year { font: 600 .66rem/1 var(--f-mono); color: var(--ct, #fff); opacity: .85; position: relative; }
/* Con carátula: la caja original hace de etiqueta */
.cart-label.has-cover { padding: 0; min-height: 0; aspect-ratio: 3 / 4; background: #14161d; }
.cart-label.has-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cart-label.has-cover::before { z-index: 1; background: radial-gradient(circle at 80% 10%, rgba(255,255,255,.22), transparent 40%); }
.cart-label.has-cover .cart-plat { position: absolute; top: 6px; left: 6px; z-index: 2; background: rgba(0,0,0,.62); }
.cart-cap { font-weight: 700; font-size: .9rem; line-height: 1.25; padding: 10px 2px 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-cap small { font: 600 .68rem/1 var(--f-mono); color: var(--ink-3); margin-left: 4px; }
.cart-covered .cart-meta { padding-top: 4px; }
.cart-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 2px 0; font-size: .88rem; }
.cart-meta .price { font-weight: 800; font-variant-numeric: tabular-nums; }
.cart-meta .nodata { color: var(--ink-3); font-size: .8rem; }
.cart-meta small { color: var(--ink-3); font-family: var(--f-mono); font-size: .68rem; }

/* fichas de consola */
.consoles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.console { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px 14px 18px; background: var(--surface); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border-bottom: 5px solid var(--c, var(--celeste)); transition: transform .15s; }
.console:hover { transform: translateY(-3px); color: var(--ink); }
.console img { width: 128px; height: 128px; object-fit: contain; image-rendering: pixelated; }
.console img.is-photo { width: 100%; max-width: 170px; height: 110px; image-rendering: auto; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.console b { font: 400 1rem/1.1 var(--f-display); }
.console small { font: 500 .72rem/1.3 var(--f-mono); color: var(--ink-3); letter-spacing: .05em; }

/* ---------- tablero de precios ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; background: #000; padding: 3px; border-radius: var(--r-md); }
.board > div { background: var(--screen); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.board .k { font: 600 .7rem/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #8fa3ad; }
.board .v { font: 400 clamp(2rem, 4vw, 2.8rem)/1 var(--f-crt); color: #f5c84a; text-shadow: 0 0 10px rgba(245,200,74,.4); font-variant-numeric: tabular-nums; }
.board .v.none { color: #4f6470; text-shadow: none; font-size: 1.6rem; }
.board .range { font: 400 1.15rem/1.2 var(--f-crt); color: var(--fosforo); }
.board .n { font: 500 .72rem/1.3 var(--f-mono); color: #8fa3ad; }
.answer { background: var(--surface); border-left: 6px solid var(--sol); padding: 16px 20px; border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 1.08rem; max-width: 75ch; }
.answer strong { font-weight: 800; }
.spark { width: 100%; height: auto; display: block; background: var(--surface); border-radius: var(--r-lg); padding: 10px 6px 4px; box-shadow: var(--shadow); }
.spark .pt { fill: var(--celeste-ink); }
.spark .grid line { stroke: var(--line); stroke-width: 1; }
.spark .area { fill: color-mix(in srgb, var(--celeste) 22%, transparent); }
.spark .ln { fill: none; stroke: var(--celeste-ink); stroke-width: 2.5; stroke-linejoin: round; }
.spark .dot { fill: var(--rojo); }
.spark text { fill: var(--ink-3); font: 500 10px var(--f-mono); }

/* estantes de la comunidad */
.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.scards.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scard { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow), var(--lift); transition: transform .18s; }
.scard:hover { transform: translateY(-4px) rotate(-.4deg); color: var(--ink); }
.scard .pic { aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; overflow: hidden; }
.scard .pic img { width: 100%; height: 100%; object-fit: cover; }
.scard .count { position: absolute; right: 8px; bottom: 8px; background: rgba(13,20,24,.75); color: #fff; font: 600 .72rem/1 var(--f-mono); padding: 5px 7px; border-radius: 4px; }
.scard .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.scard h3 { font: 700 1rem/1.25 var(--f-body); }
.scard .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .82rem; color: var(--ink-2); }
.scard .who { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.scard .who img { border-radius: 5px; image-rendering: pixelated; flex: none; }
.scard .stats { display: flex; gap: 10px; color: var(--rojo-ink); font-weight: 700; white-space: nowrap; }
.scards.mini .body { padding: 8px 10px; }
.scards.mini h3 { font-size: .85rem; }
.scards.mini .meta { display: none; }
.shelf-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.shelf-gallery a { border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); aspect-ratio: 1; display: block; }
.shelf-gallery a.first { grid-column: 1 / -1; aspect-ratio: auto; max-height: 72vh; display: grid; place-items: center; background: var(--screen); }
.shelf-gallery img { width: 100%; height: 100%; object-fit: cover; }
.shelf-gallery a.first img { object-fit: contain; max-height: 72vh; }
.like-btn[aria-pressed="true"] { --b: var(--rojo); }
.report summary { cursor: pointer; font-size: .85rem; color: var(--ink-3); padding: 4px 0; }
.report[open] { background: var(--surface); padding: 12px 14px; border-radius: var(--r-md); }
.lightbox[hidden] { display: none !important; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5,8,12,.92); display: grid; place-items: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 6px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.lightbox .lb-close { top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; }
.lightbox .lb-next { right: 16px; top: 50%; }
@media (max-width: 640px) { .shelf-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } .scards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .scard .meta .who { display: none; } }

/* alertas de precio y notificaciones */
.alert-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface); padding: 6px 8px 6px 14px; border-radius: 999px; box-shadow: var(--shadow); font-size: .9rem; font-weight: 600; }
.alert-form .money { display: inline-flex; align-items: center; gap: 4px; }
.alert-form input { width: 130px; padding: 6px 10px; border-radius: 999px; }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notif-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow); }
.notif-list li.new { border-left: 5px solid var(--sol); }
.notif-list .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: var(--sol); display: grid; place-items: center; font-size: 1.1rem; }
.notif-list a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); min-width: 0; }
.notif-list a span { color: var(--ink-2); font-size: .92rem; }
.notif-list time { font: 500 .75rem/1.2 var(--f-mono); color: var(--ink-3); white-space: nowrap; }
@media (max-width: 640px) { .notif-list li { grid-template-columns: 34px minmax(0, 1fr); } .notif-list time { grid-column: 2; } }

/* MercadoLibre */
.ml-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 24px; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); border-left: 6px solid #f5d000; }
.ml-num { display: flex; flex-direction: column; gap: 4px; }
.ml-num .k { font: 600 .7rem/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.ml-num .v { font: 400 2rem/1 var(--f-display); }
.ml-num .n { font: 500 .78rem/1.3 var(--f-mono); color: var(--ink-3); }
.ml-text { color: var(--ink-2); font-size: .97rem; }
.ml-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ml-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: .93rem; }
.ml-list a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .ml-box { grid-template-columns: minmax(0, 1fr); } .ml-list .chip { display: none; } .ml-list li { grid-template-columns: minmax(0, 1fr) auto; } }

table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; font: 600 .7rem/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 2px solid var(--line-2); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-lg); padding: 6px 10px; box-shadow: var(--shadow); }

.chip { display: inline-flex; align-items: center; gap: 5px; font: 600 .68rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 3px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip-loose { background: color-mix(in srgb, var(--celeste) 22%, var(--surface)); color: var(--celeste-ink); }
.chip-cib { background: color-mix(in srgb, var(--sol) 28%, var(--surface)); color: var(--sol-ink); }
.chip-sealed { background: color-mix(in srgb, var(--rojo) 18%, var(--surface)); color: var(--rojo-ink); }
.chip-ok { background: color-mix(in srgb, var(--verde) 20%, var(--surface)); color: var(--verde); }
.chip-ink { background: var(--ink); color: var(--surface); }
.rarity { display: inline-flex; gap: 2px; vertical-align: middle; }
.rarity i { width: 8px; height: 12px; background: var(--line); }
.rarity i.on { background: var(--sol); }

/* filtros */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; background: var(--surface); padding: 14px; border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 26px; }
.filters .field { flex: 1 1 160px; }
.filters .field label { font-size: .78rem; font-family: var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .9rem; border: 2px solid var(--line-2); background: var(--surface); }
.tabs a[aria-current="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; padding: 9px 12px; text-align: center; border-radius: var(--r-md); text-decoration: none; font-weight: 700; background: var(--surface); color: var(--ink); }
.pager span[aria-current] { background: var(--ink); color: var(--surface); }
.res-item { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.res-item img { width: 40px; height: 52px; object-fit: cover; border-radius: 3px; flex: none; background: var(--screen); }
.res-item img.is-con { object-fit: contain; background: transparent; }
.pager .pager-gap { background: none; min-width: 0; padding: 9px 4px; color: var(--ink-3); }
.console-photo { filter: drop-shadow(0 14px 18px rgba(0,0,0,.55)); }

/* ---------- layout de detalle ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(24px, 4vw, 48px); align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 36px; min-width: 0; }
.aside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 100px; }
.panel { background: var(--surface); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.panel h2, .panel h3 { font-size: 1.05rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: .93rem; }
.facts dt { font: 600 .7rem/1.6 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 600; }
.block { display: flex; flex-direction: column; gap: 16px; }
.block > h2 { font-size: 1.45rem; }

.game-hero { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: center; padding-top: clamp(24px, 4vw, 40px); }
.game-hero .cart { pointer-events: none; }
.game-hero .cart-label { min-height: 230px; padding: 16px; }
.game-hero .cart-label.has-cover { min-height: 0; padding: 0; }
.game-hero .cart-title { font-size: 1.5rem; }
.game-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.game-hero > div:last-child { display: flex; flex-direction: column; gap: 14px; }

/* ---------- artículos ---------- */
.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.acard { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow), var(--lift); transition: transform .18s; }
.acard:hover { transform: translateY(-4px); color: var(--ink); }
.acard .pic { aspect-ratio: 3 / 2; background: var(--screen); overflow: hidden; }
.acard .pic img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.acard .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.acard h3 { font-size: 1.2rem; line-height: 1.12; }
.acard p { color: var(--ink-2); font-size: .95rem; }
.acard .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }

.article-hero { display: flex; flex-direction: column; gap: 18px; padding-top: clamp(28px, 4vw, 48px); }
.article-hero h1 { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 22ch; }
.article-hero .art { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--lift); aspect-ratio: 21 / 9; background: var(--screen); }
.article-hero .art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.byline { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 500 var(--t-sm)/1.4 var(--f-mono); color: var(--ink-3); }
.prose { font-size: 1.1rem; line-height: 1.75; max-width: 70ch; display: flex; flex-direction: column; gap: 1.1em; }
.prose h2 { font-size: 1.6rem; margin-top: .9em; scroll-margin-top: 100px; }
.prose h3 { font-size: 1.2rem; margin-top: .5em; }
.prose ul, .prose ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: .45em; }
.prose ol { counter-reset: step; list-style: none; padding-left: 0; }
.prose ol > li { counter-increment: step; position: relative; padding-left: 52px; min-height: 36px; }
.prose ol > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: grid; place-items: center; background: var(--rojo); color: #fff; font: 400 .95rem/1 var(--f-display); border-radius: 50%; box-shadow: 0 -3px 0 rgba(0,0,0,.25) inset; }
.prose .note { background: var(--surface); border-left: 6px solid var(--celeste); padding: 14px 18px; border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 1rem; }
.prose .warn { background: color-mix(in srgb, var(--sol) 18%, var(--surface)); border-left: 6px solid var(--sol); padding: 14px 18px; border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 1rem; }
.prose figure { margin: .4em 0; display: flex; flex-direction: column; gap: 8px; }
.prose figure img { border-radius: var(--r-md); box-shadow: var(--lift); }
.prose figcaption { font-size: .88rem; color: var(--ink-3); }
.toc { display: flex; flex-direction: column; gap: 4px; font-size: .93rem; }
.toc a { text-decoration: none; color: var(--ink-2); padding: 5px 0 5px 12px; border-left: 3px solid var(--line); }
.toc a:hover { color: var(--ink); border-color: var(--rojo); }
.materials { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; font-size: .95rem; }
.difficulty { display: inline-flex; gap: 3px; }
.difficulty i { width: 14px; height: 14px; border-radius: 3px; background: var(--line); }
.difficulty i.on { background: var(--rojo); }

/* ---------- comentarios ---------- */
.comments { display: flex; flex-direction: column; gap: 14px; }
.comment { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
.comment img { width: 44px; height: 44px; border-radius: 8px; image-rendering: pixelated; }
.comment .bubble { background: var(--surface); border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg); padding: 12px 16px; }
.comment .who { font-weight: 800; font-size: .92rem; display: flex; gap: 10px; align-items: baseline; }
.comment .who small { font: 500 .72rem/1 var(--f-mono); color: var(--ink-3); }
.comment p { white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- mapa ---------- */
.map-wrap { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(22px, 4vw, 48px); align-items: start; }
.uy-map { background: var(--screen); border-radius: var(--r-lg); padding: 16px; position: sticky; top: 100px; max-width: 380px; width: 100%; }
.uy-map::after { content: "Tocá un departamento para filtrar"; display: block; text-align: center; font: 400 1.05rem/1.2 var(--f-crt); color: var(--fosforo); margin-top: 8px; }
@media (max-width: 960px) { .uy-map { position: static; margin-inline: auto; } }
.uy-map svg { width: 100%; height: auto; display: block; }
.uy-map .dep { fill: #1f3442; stroke: #4f9fdc; stroke-width: 1.2; transition: fill .15s; cursor: pointer; }
.uy-map .dep:hover, .uy-map .dep.on { fill: #2c5674; }
.uy-map .dep.has { fill: #23495f; }
.uy-map .pin { fill: var(--rojo); stroke: #fff; stroke-width: 1.5; }
.uy-map .lbl { fill: #b9cad2; font: 600 14px var(--f-mono); pointer-events: none; text-anchor: middle; }
.place-list { display: flex; flex-direction: column; gap: 12px; }
.place { background: var(--surface); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.place:hover { color: var(--ink); outline: 2px solid var(--celeste); }
.place h3 { font-size: 1.05rem; }
.place p { font-size: .92rem; color: var(--ink-2); }
.events { display: flex; flex-direction: column; gap: 12px; }
.event { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 16px; background: var(--surface); border-radius: var(--r-lg); padding: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); align-items: center; }
.event:hover { color: var(--ink); outline: 2px solid var(--sol); }
.event .date { background: var(--ink); color: var(--surface); border-radius: var(--r-md); text-align: center; padding: 10px 4px; font: 400 1.6rem/1 var(--f-display); }
.event .date small { display: block; font: 600 .7rem/1.4 var(--f-mono); letter-spacing: .12em; color: var(--sol); }
.event h3 { font-size: 1.05rem; }
.event p { font-size: .9rem; color: var(--ink-2); }

/* ---------- fichín ---------- */
.arcade { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.cabinet { background: linear-gradient(180deg, #2a2f5a, #1b1e3b); border-radius: 20px 20px 8px 8px; padding: 16px 16px 22px; box-shadow: var(--lift), 0 2px 0 rgba(255,255,255,.1) inset; display: flex; flex-direction: column; gap: 14px; }
.marquee { background: linear-gradient(180deg, #f2b705, #e08a00); border-radius: 8px; padding: 10px; text-align: center; font: 400 clamp(1.1rem, 3vw, 1.7rem)/1 var(--f-display); color: #1c2030; text-shadow: 0 2px 0 rgba(255,255,255,.4); box-shadow: 0 0 24px rgba(242,183,5,.35); }
.game-screen { position: relative; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; box-shadow: inset 0 0 0 4px #000; }
.game-screen canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; touch-action: none; }
.game-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.5)); }
.controls-hint { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font: 500 .78rem/1.3 var(--f-mono); color: #b9bfe0; }
.controls-hint kbd { font: inherit; background: #3a4078; color: #fff; padding: 2px 7px; border-radius: 4px; box-shadow: 0 -2px 0 rgba(0,0,0,.35) inset; }
.scores { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; background: var(--screen); border-radius: var(--r-md); padding: 10px; }
.scores li { display: grid; grid-template-columns: 32px 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; font: 400 1.3rem/1 var(--f-crt); color: var(--fosforo); }
.scores li:nth-child(1) { color: #f5c84a; }
.scores li img { width: 28px; height: 28px; border-radius: 4px; image-rendering: pixelated; }
.scores li .s { color: #fff; font-variant-numeric: tabular-nums; }
.scores .empty { color: #6f8590; font-size: 1.15rem; padding: 14px 8px; }

/* ---------- colección / perfiles ---------- */
.profile-head { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding-top: clamp(24px, 4vw, 44px); }
.profile-head img.av { width: 120px; height: 120px; border-radius: 16px; image-rendering: pixelated; border: 4px solid var(--surface); box-shadow: var(--lift); }
.profile-head > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.statline { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { background: var(--screen); color: var(--fosforo); border-radius: var(--r-md); padding: 10px 14px; font: 400 1.1rem/1.1 var(--f-crt); }
.stat b { display: block; font: 400 1.9rem/1 var(--f-crt); color: #f5c84a; font-variant-numeric: tabular-nums; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 16px; padding: 22px 18px 0; background: linear-gradient(180deg, transparent calc(100% - 16px), #8a5a35 calc(100% - 16px)); border-radius: var(--r-md); }
.shelf-item { position: relative; display: flex; flex-direction: column; gap: 6px; padding-bottom: 22px; }
.shelf-item .cart-label { min-height: 120px; }
.shelf-item form { position: absolute; top: -8px; right: -8px; }
.shelf-item .x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--ink); color: var(--surface); cursor: pointer; font-weight: 800; line-height: 1; }
.shelf-item .meta { font-size: .8rem; display: flex; justify-content: space-between; gap: 6px; }
.avatars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.avatars label { position: relative; cursor: pointer; }
.avatars input { position: absolute; opacity: 0; }
.avatars img { width: 100%; aspect-ratio: 1; border-radius: 10px; image-rendering: pixelated; border: 3px solid transparent; }
.avatars input:checked + img { border-color: var(--rojo); }
.avatars input:focus-visible + img { outline: 3px solid var(--sol); }
.add-box { position: relative; }

/* ---------- vitrina ---------- */
.listings { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.listing { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow), var(--lift); transition: transform .18s; }
.listing:hover { transform: translateY(-4px); color: var(--ink); }
.listing .pic { aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; overflow: hidden; display: grid; place-items: center; }
.listing .pic img { width: 100%; height: 100%; object-fit: cover; }
.listing .pic img.sprite { width: 60%; height: auto; object-fit: contain; image-rendering: pixelated; }
.listing .pic .tag { position: absolute; left: 10px; bottom: 10px; background: var(--sol); color: #1c2030; font: 400 1.1rem/1 var(--f-display); padding: 7px 10px; border-radius: 4px; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.listing .pic .sold { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(13,20,24,.6); color: #fff; font: 400 1.6rem/1 var(--f-display); transform: rotate(-8deg); }
.listing .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.listing h3 { font: 700 1.05rem/1.25 var(--f-body); }
.listing .meta { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; color: var(--ink-3); margin-top: auto; }
.gallery { display: grid; gap: 10px; }
.gallery .main { aspect-ratio: 4 / 3; background: var(--surface-2); border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery .thumbs button { width: 74px; height: 74px; padding: 0; border: 3px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--surface-2); }
.gallery .thumbs button[aria-pressed="true"] { border-color: var(--rojo); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.seller { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.seller img { width: 52px; height: 52px; border-radius: 10px; image-rendering: pixelated; }
.stars { color: var(--sol-ink); letter-spacing: 2px; }
.price-check { border-radius: var(--r-md); padding: 12px 14px; font-size: .92rem; background: var(--surface-2); }
.price-check.good { background: color-mix(in srgb, var(--verde) 16%, var(--surface)); }
.price-check.high { background: color-mix(in srgb, var(--rojo) 14%, var(--surface)); }

/* ---------- estados vacíos y error ---------- */
.empty { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.empty img { border-radius: var(--r-md); image-rendering: pixelated; }
.empty > div { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.err-page { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 48px; }
.err-page > div:last-child { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

/* ---------- comunidad ---------- */
.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.group { background: var(--ink); color: var(--surface); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.group h3 { color: var(--sol); font-size: 1.4rem; }
.group p { color: color-mix(in srgb, var(--surface) 80%, transparent); }
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 80ch; }
.faq details { background: var(--surface); border-radius: var(--r-md); padding: 4px 18px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 800; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font: 400 1.2rem/1 var(--f-display); color: var(--rojo-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 14px; color: var(--ink-2); }
.rules { counter-reset: r; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rules li { counter-increment: r; background: var(--surface); padding: 16px 18px 16px 62px; border-radius: var(--r-md); position: relative; box-shadow: var(--shadow); }
.rules li::before { content: counter(r); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; display: grid; place-items: center; background: var(--celeste); color: #0c2236; border-radius: 50%; font: 400 .9rem/1 var(--f-display); }

/* ---------- admin ---------- */
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.queue { display: flex; flex-direction: column; gap: 10px; }
.qitem { background: var(--surface); border-radius: var(--r-md); padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.qitem .acts { display: flex; gap: 6px; }

/* ---------- footer: parte de abajo de la consola ---------- */
.ftr { background: var(--ink); color: color-mix(in srgb, var(--surface) 78%, var(--ink)); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
:root[data-theme="dark"] .ftr { background: #0e1014; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ftr { background: #0e1014; } }
.vents { height: 18px; background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.07) 14px 46px); border-bottom: 2px solid rgba(255,255,255,.05); }
.ftr-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr); gap: 40px; padding-block: 48px 32px; }
.ftr .logo { color: #fff; }
.ftr .logo-t b { color: var(--celeste); }
.ftr-brand { display: flex; flex-direction: column; gap: 16px; }
.ftr-brand p { max-width: 46ch; font-size: .95rem; }
.ftr-groups { display: flex; flex-wrap: wrap; gap: 8px; }
.ftr-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ftr-cols div { display: flex; flex-direction: column; gap: 8px; }
.ftr-cols h2 { font-size: .85rem; color: var(--sol); letter-spacing: .06em; margin-bottom: 4px; }
.ftr-cols a, .ftr-legal a { color: inherit; text-decoration: none; font-size: .95rem; }
.ftr-cols a:hover, .ftr-legal a:hover { color: #fff; text-decoration: underline; }
.ftr-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; }
.ftr-legal .tm { flex-basis: 100%; opacity: .7; }

/* ---------- utilidades ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); align-items: center; }
.band { background: var(--bg-2); border-block: 2px solid var(--line); padding-block: clamp(40px, 6vw, 72px); }
.cta-band { background: var(--celeste); color: #0c2236; border-radius: var(--r-lg); padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #0c2236; }
.cta-band p { max-width: 60ch; }
.cta-band::after { content: ""; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; background: url(../img/art/opt/sol-sm.webp) center / contain no-repeat; opacity: .25; image-rendering: pixelated; pointer-events: none; }
.demo-note { font: 500 .75rem/1.4 var(--f-mono); color: var(--rojo-ink); background: color-mix(in srgb, var(--rojo) 10%, var(--surface)); padding: 6px 10px; border-radius: 4px; display: inline-block; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .hdr-search input { width: 150px; }
  .nav a { padding: 6px 7px; font-size: .9rem; }
  .hdr-in { gap: 14px; }
}
@media (max-width: 1080px) {
  .hdr-search { display: none; }
}
@media (max-width: 960px) {
  .menu-btn { display: grid; }
  .hdr-search { display: none; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--bg-2); padding: 10px var(--gutter-r) 16px var(--gutter); border-bottom: 2px solid var(--line); gap: 4px; }
  .nav.open { display: flex; }
  .nav-search { display: block; margin-bottom: 6px; }
  .nav a { flex-direction: row; justify-content: space-between; padding: 12px 14px; font-size: 1.05rem; }
  .hdr-in { justify-content: space-between; }
  .me span { display: none; }
  .channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel.big { grid-column: 1 / -1; }
  .detail, .arcade, .map-wrap { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
  .page-head, .split, .err-page { grid-template-columns: minmax(0, 1fr); }
  .ftr-in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .channels { grid-template-columns: minmax(0, 1fr); }
  .channel.big { flex-direction: column; }
  .channel.big .pic { min-height: 0; aspect-ratio: 3 / 2; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .fields, .groups, .rules { grid-template-columns: minmax(0, 1fr); }
  .game-hero { grid-template-columns: minmax(0, 1fr); }
  .game-hero .cart { max-width: 200px; }
  .carts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .consoles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console img { width: 96px; height: 96px; }
  .console img.is-photo { width: 100%; height: 80px; }
  .empty { grid-template-columns: minmax(0, 1fr); }
  .profile-head { grid-template-columns: 80px minmax(0, 1fr); }
  .profile-head img.av { width: 80px; height: 80px; }
  .profile-head > :last-child { grid-column: 1 / -1; }
  .cta-band { grid-template-columns: minmax(0, 1fr); }
  .ftr-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avatars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .logo-t { font-size: 1rem; }
  .hdr-in { gap: 8px; }
  .hdr-tools { gap: 6px; }
  .theme-btn, .menu-btn, .bell { width: 36px; height: 36px; }
  .usermenu summary::after { display: none; }
  .hero-search .row { flex-direction: column; border-radius: 16px; }
}
@media (max-width: 420px) {
  /* En celulares chicos el tema sigue al del teléfono; así entran logo, campanita, avatar y menú */
  .hdr-tools .theme-btn { display: none; }
  .logo img { width: 32px; height: 32px; }
  .logo-t { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ticker-track { animation: none; }
}
