/* Poketario
   Estética: galería limpia, sin cajas; la carta es la única fuente de color. */

@property --mx { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --my { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --rx { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --ry { syntax: '<angle>'; inherits: true; initial-value: 0deg; }

:root {
  --bg: #f4f5f8;
  --bg-2: #e9ecf1;
  --surface: rgba(255, 255, 255, .72);
  --field: #fff;
  --ink: #161a24;
  --ink-2: #4b5365;
  --ink-3: #8a91a1;
  --line: #dde1e8;
  --chip: rgba(22, 26, 36, .055);
  --accent: #2f6f8f;
  --pos: #23845a;
  --neg: #c2413a;
  --tint: #5f8faa;
  --page: #fbfbfd;
  --binder: #e3e6ec;
  --shadow: 0 1px 2px rgba(15, 20, 35, .08), 0 14px 32px -14px rgba(15, 25, 45, .35);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --bg-2: #181b23;
    --surface: rgba(28, 31, 40, .72);
    --field: #1b1e26;
    --ink: #eef0f5;
    --ink-2: #b6bccb;
    --ink-3: #7d8496;
    --line: #272b35;
    --chip: rgba(255, 255, 255, .07);
    --accent: #7fb6d3;
    --pos: #4cc08a;
    --neg: #f07a70;
    --page: #171a22;
    --binder: #22262f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 36px -14px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 15px/1.55 var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 560px at 88% -8%, color-mix(in oklab, var(--tint) 18%, transparent), transparent 70%),
    radial-gradient(700px 520px at -12% 38%, color-mix(in oklab, var(--tint) 9%, transparent), transparent 70%);
  transition: opacity .6s;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; }

.top, main, .site-foot { width: min(1180px, 100% - 48px); margin-inline: auto; }

/* Tipografía */
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -.015em; }
h1 { font-size: clamp(40px, 5.6vw, 68px); font-weight: 300; line-height: 1.03; letter-spacing: -.03em; }
h2 { font-size: 22px; font-weight: 500; }
h3 { font-size: 16px; font-weight: 600; }
.display { font-size: clamp(32px, 4vw, 44px); font-weight: 300; letter-spacing: -.025em; line-height: 1.08; }
.eyebrow { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.eyebrow a { color: inherit; }
.lead { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 34em; font-weight: 400; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.big { display: block; font-size: 34px; font-weight: 300; letter-spacing: -.02em; line-height: 1.15; }
.big small { font-size: 18px; color: var(--ink-3); }
.huge { display: block; font-size: clamp(48px, 7vw, 76px); font-weight: 200; letter-spacing: -.04em; line-height: 1.05; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.note { font-size: 13.5px; color: var(--ink-2); border-left: 2px solid var(--accent); padding-left: 12px; margin: 14px 0; }

/* Cabecera */
.top { padding-top: 22px; }
.top-row { display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { display: block; height: 34px; width: auto; }
.main-nav { display: flex; gap: 6px; }
.main-nav a { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.main-nav a.on { background: var(--chip); color: var(--ink); }
.count-badge:not(:empty) { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--accent); color: var(--bg); font-size: 11px; font-weight: 700; }
.lang { display: flex; background: var(--chip); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: none; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ink-3); cursor: pointer; }
.lang button.on { background: var(--field); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

.search { position: relative; margin-top: 18px; display: flex; align-items: center; }
.search svg { position: absolute; z-index: 1; left: 18px; width: 19px; height: 19px; color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%;
  font: inherit;
  font-size: 15.5px;
  padding: 14px 52px 14px 48px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 20, 35, .05);
  transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; border-color: color-mix(in oklab, var(--accent) 50%, transparent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 14%, transparent); }
.search kbd { position: absolute; right: 18px; font: 600 11px var(--sans); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }

main { padding-top: 8px; min-height: 60vh; }
.loader { padding: 120px 0; text-align: center; color: var(--ink-3); }
body.loading .site-foot { visibility: hidden; }

/* Botones y píldoras */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { background: color-mix(in oklab, var(--ink) 86%, var(--accent)); }
.btn.on { border-color: var(--accent); color: var(--accent); }
.link { border: 0; background: none; padding: 0; cursor: pointer; color: var(--accent); font-size: 13.5px; font-weight: 600; }
.link.danger { color: var(--ink-3); font-weight: 500; }
.link.danger:hover { color: var(--neg); }
.round { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); font-size: 18px; flex: none; }
.round:hover { border-color: var(--ink-3); }
.round.off { opacity: .3; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; background: var(--chip); font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
a.pill:hover { color: var(--ink); background: color-mix(in oklab, var(--chip), var(--ink) 6%); }
.pill.on { background: var(--ink); color: var(--bg); }
.pill.type i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pill .num { color: var(--ink-3); font-weight: 600; }
.pill.on .num { color: inherit; opacity: .7; }
.sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }

.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 12px 0 8px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .6s cubic-bezier(.2, .7, .2, 1); }

/* Carta con brillo holográfico */
.holo { perspective: 1100px; display: block; }
.holo-inner {
  position: relative;
  aspect-ratio: 63 / 88;
  border-radius: 4.6% / 3.3%;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: var(--shadow);
  transform: translateY(var(--lift, 0)) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .6s cubic-bezier(.2, .7, .2, 1), box-shadow .5s;
  will-change: transform;
}
.holo-inner > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.holo.is-active .holo-inner {
  transition: transform .09s linear, box-shadow .3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 26px 50px -20px color-mix(in oklab, var(--tint) 70%, black);
}
.holo-shine, .holo-glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .45s; }
.holo-shine {
  mix-blend-mode: color-dodge;
  background-image: repeating-linear-gradient(115deg,
    hsl(355 85% 62%) 0%, hsl(40 95% 60%) 5%, hsl(120 70% 55%) 10%,
    hsl(190 90% 58%) 15%, hsl(265 80% 66%) 20%, hsl(355 85% 62%) 25%);
  background-size: 320% 320%;
  background-position: var(--mx) var(--my);
  filter: brightness(.62) contrast(1.5) saturate(.95);
}
.holo[data-level="2"] .holo-shine {
  background-image:
    repeating-linear-gradient(115deg,
      hsl(355 85% 62%) 0%, hsl(40 95% 60%) 5%, hsl(120 70% 55%) 10%,
      hsl(190 90% 58%) 15%, hsl(265 80% 66%) 20%, hsl(355 85% 62%) 25%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .22) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .18) 0 1px, transparent 1px 5px);
  background-size: 320% 320%, 100% 100%, 100% 100%;
  filter: brightness(.7) contrast(1.6) saturate(1.1);
}
.holo-glare {
  mix-blend-mode: overlay;
  background: radial-gradient(farthest-corner circle at var(--mx) var(--my), rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, .22) 28%, rgba(0, 0, 0, .3) 95%);
}
.holo.is-active .holo-glare { opacity: .55; }
.holo.is-active[data-level="1"] .holo-shine { opacity: .42; }
.holo.is-active[data-level="2"] .holo-shine { opacity: .62; }
.holo.is-active[data-level="2"] .holo-glare { opacity: .7; }

/* Balanceo en reposo de las cartas grandes */
.holo.is-idle .holo-inner { animation: sway 8s ease-in-out infinite; }
.holo.is-idle[data-level="1"] .holo-shine { opacity: .28; }
.holo.is-idle[data-level="2"] .holo-shine { opacity: .45; }
.holo.is-idle .holo-glare { opacity: .38; }
@keyframes sway {
  0%, 100% { --rx: 5deg; --ry: -9deg; --mx: 22%; --my: 28%; }
  50% { --rx: -4deg; --ry: 10deg; --mx: 78%; --my: 72%; }
}
@media (prefers-reduced-motion: reduce) {
  .holo.is-idle .holo-inner { animation: none; }
  .holo-inner, .holo.is-active .holo-inner { transition: none; }
}

/* Hueco cuando la fuente no tiene imagen */
.ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 12%;
  text-align: center;
  background: repeating-linear-gradient(135deg, var(--bg-2) 0 10px, color-mix(in oklab, var(--bg-2), var(--ink) 3%) 10px 20px);
}
.ph-num { font: 500 clamp(26px, 5cqw, 46px)/1 var(--serif); color: var(--ink-2); }
.ph-name { font-weight: 600; font-size: 14px; }
.ph-set { font-size: 11.5px; color: var(--ink-3); }
.ph-note { margin-top: 8px; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

/* Rejilla de cartas */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 34px 22px; }
.tile { display: flex; flex-direction: column; gap: 12px; }
.tile:hover { color: inherit; --lift: -5px; }
.tile-meta { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 0 2px; }
.tile-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.tile-sub { grid-column: 1; font-size: 12px; color: var(--ink-3); }
.tile-price { grid-row: 1 / span 2; grid-column: 2; font-size: 13.5px; color: var(--ink-2); align-self: start; }
.flag { margin-left: 6px; font-size: 10px; vertical-align: 2px; }
.flag.own { color: var(--accent); }
.flag.wish { color: #d4577b; }
.tile.is-compared .holo-inner { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Bandas y cabeceras de página */
.band { margin-top: 96px; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.more { font-size: 14px; font-weight: 600; color: var(--accent); }
.page-head { padding: 48px 0 36px; }
.page-head h1 { margin-top: 10px; }
.page-head .lead, .page-head .muted { margin-top: 14px; }
.count { margin: 10px 0 22px; font-size: 13px; }
.empty { padding: 64px 0; color: var(--ink-3); }
.empty-big { padding: 56px 0 24px; text-align: center; max-width: 560px; margin-inline: auto; }
.empty-big .display { margin-bottom: 10px; }
.empty-big .btn, .empty-big .lead { margin-top: 20px; }
.empty-big .lead { margin-inline: auto; }

/* Inicio */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding: 56px 0 24px; }
.hero h1 { margin: 16px 0 22px; }
.hero-card { justify-self: center; width: min(380px, 100%); }
.hero-value { margin-top: 44px; }
.hero-value .big { margin: 4px 0; }

.sets-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 48px; }
.set-cover { display: flex; flex-direction: column; }
.set-cover:hover { color: inherit; }
.set-cover:hover .set-logo img { transform: translateY(-4px) scale(1.02); }
.set-logo { height: 120px; display: flex; align-items: flex-end; margin-bottom: 22px; }
.set-logo img { max-height: 100%; max-width: 78%; object-fit: contain; object-position: left bottom; transition: transform .4s cubic-bezier(.2, .7, .2, 1); filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .12)); }
.set-word { font: 500 40px/1.02 var(--serif); letter-spacing: -.01em; }
.set-name { font-size: 20px; font-weight: 500; margin-top: 6px; }
.set-have { font-size: 13px; color: var(--ink-3); }

.daily { display: grid; grid-template-columns: 280px 1fr; gap: 64px; align-items: center; }
.daily h2 { margin: 12px 0 8px; }
.daily .big { margin: 18px 0 22px; }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
.how p { color: var(--ink-2); margin: 8px 0 0; }
.step { display: block; font: 500 44px/1 var(--serif); color: var(--accent); margin-bottom: 12px; }

/* Set */
.set-head { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: center; padding: 48px 0 40px; }
.set-head-logo img { max-width: 100%; max-height: 150px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .12)); }
.set-head h1 { margin: 10px 0 6px; }
.set-stats { display: flex; gap: 56px; margin: 26px 0 8px; flex-wrap: wrap; }
.set-stats .muted { font-size: 13px; }
.filters { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--line); }
.selects { display: flex; gap: 18px; }
.selects label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
select, input[type="number"], input[type="text"] {
  font: inherit; font-size: 14.5px; color: var(--ink);
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--field);
}
.selects select { padding: 7px 10px; font-size: 13.5px; }

/* Ficha de carta */
.card-page { display: grid; grid-template-columns: 1fr minmax(300px, 420px); gap: 80px; align-items: start; padding: 48px 0 0; }
.card-visual { position: sticky; top: 24px; }
.card-stage { width: min(420px, 100%); margin-inline: auto; }
.card-title { margin: 14px 0 10px; font-size: clamp(44px, 6vw, 76px); }
.subtitle { font-size: 20px; font-weight: 300; color: var(--ink-2); margin: 0 0 22px; }
.price-block { margin-top: 44px; }
.price-main .price { display: block; font-size: 52px; font-weight: 300; letter-spacing: -.03em; line-height: 1.1; margin-top: 6px; }
.chg { font-size: 13.5px; font-weight: 600; }
.price-mini { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 44px; margin: 22px 0 6px; }
.price-mini dt { font-size: 12px; color: var(--ink-3); }
.price-mini dd { margin: 2px 0 0; font-size: 16px; }
.pline { width: 100%; max-width: 360px; height: auto; margin-top: 10px; overflow: visible; }
.pline path { stroke: var(--accent); }
.pline.up path, .pline.up circle { stroke: var(--pos); fill: var(--pos); }
.pline.down path, .pline.down circle { stroke: var(--neg); fill: var(--neg); }
.pline path { fill: none !important; }
.pline text { font-size: 10px; fill: var(--ink-3); font-family: var(--sans); }
.fine { font-size: 12px; color: var(--ink-3); margin-top: 8px; max-width: 44em; }

.own-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); animation: rise .35s ease; }
.own-form[hidden] { display: none; }
.own-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }
.own-form .wide { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 6px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.copies { margin-top: 30px; }
.copies ul { list-style: none; margin: 10px 0 0; padding: 0; }
.copies li { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.copies li .num { color: var(--ink-2); margin-left: auto; }

.card-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }

.details { display: grid; grid-template-columns: 1.1fr .9fr; gap: 80px; padding-top: 48px; border-top: 1px solid var(--line); }
.details h2 { margin-bottom: 14px; }
.details h2 + .versions { margin-top: 0; }
.details > div > h2:not(:first-child) { margin-top: 40px; }
.attack { padding: 16px 0; border-top: 1px solid var(--line); }
.attack:first-of-type { border-top: 0; padding-top: 4px; }
.attack-head { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.attack p { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; }
.dmg { margin-left: auto; font-size: 24px; font-weight: 300; }
.tag { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #c0392b; }
.cost { display: inline-flex; gap: 4px; vertical-align: -2px; }
.cost i { width: 15px; height: 15px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), 0 0 0 1px color-mix(in oklab, var(--c) 70%, black); }
.flavor { font: italic 500 20px/1.5 var(--serif); color: var(--ink-2); margin-top: 28px; max-width: 30em; }
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; }
.facts a { color: var(--accent); }
.versions { width: 100%; border-collapse: collapse; font-size: 14px; }
.versions td { padding: 11px 0; border-bottom: 1px solid var(--line); }
.versions td.num { text-align: right; }

/* Colección */
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; padding-bottom: 12px; }
.summary-value .huge { margin: 6px 0; }
.set-line { display: grid; grid-template-columns: 1fr auto; padding: 8px 0 0; font-size: 14px; font-weight: 500; }
.set-line .progress { grid-column: 1 / -1; margin: 8px 0 4px; }
.tabs { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 48px 0 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.tabs + .lead { margin-bottom: 28px; }

.binder { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.binder-spread { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--binder); padding: 16px; border-radius: 20px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04); }
.binder-page { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 16px 30px; background: var(--page); border-radius: 12px; }
.binder-page.blank { background: color-mix(in oklab, var(--page), transparent 40%); }
.page-num { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--ink-3); }
.pocket { aspect-ratio: 63 / 88; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; text-align: center; border: 1.5px dashed var(--line); font-size: 11px; color: var(--ink-3); line-height: 1.25; overflow: hidden; }
.pocket .num { font: 500 20px/1 var(--serif); color: var(--ink-2); }
.pocket.has { border: 0; padding: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 6px 14px -8px rgba(0, 0, 0, .4); transition: transform .25s; }
.pocket.has:hover { transform: translateY(-3px); }
.pocket.has img { width: 100%; height: 100%; object-fit: cover; }
.pocket.has .ph { position: static; height: 100%; }

.table-wrap { overflow-x: auto; }
.coll-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.coll-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.coll-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.coll-table .r { text-align: right; }
.coll-table .thumb { width: 52px; }
.coll-table .thumb a { display: block; position: relative; width: 40px; aspect-ratio: 63 / 88; border-radius: 3px; overflow: hidden; }
.coll-table .thumb img { width: 100%; display: block; }
.coll-table .thumb .ph-num { font-size: 12px; }
.coll-table .thumb .ph-name, .coll-table .thumb .ph-set, .coll-table .thumb .ph-note { display: none; }

.data-tools { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); }
.data-tools label { cursor: pointer; }

/* Comparador */
.compare { overflow-x: auto; padding-bottom: 8px; }
.cmp-row { display: grid; grid-template-columns: 150px repeat(var(--cols), minmax(150px, 220px)); gap: 24px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: center; }
.cmp-head { border-bottom: 0; align-items: end; }
.cmp-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cmp-card .holo { width: 100%; }
.cmp-name { font-weight: 600; }
.cmp-label { color: var(--ink-3); font-size: 13px; }
.best { color: var(--accent); font-weight: 700; }

.ideas { padding: 8px 0; }
.ideas .pills { margin-top: 12px; }

/* Pie y avisos */
.site-foot { margin-top: 120px; padding: 28px 0 56px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.site-foot p { margin: 0 0 6px; max-width: 70em; }
.site-foot a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
#toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 40;
  transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5);
  max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Cuenta en la cabecera */
.account-link { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.account-link[hidden] { display: none; }
.account-link svg { width: 19px; height: 19px; }
.account-link.on { background: var(--chip); color: var(--ink); }
.account-link.in svg { color: var(--accent); }
.account-link.pending::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--neg); }

/* Sets por serie */
.serie { margin-top: 64px; scroll-margin-top: 24px; }
.serie .band-head { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 32px; }
.sets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 44px 36px; }
.sets-grid .set-logo { height: 84px; margin-bottom: 16px; }
.sets-grid .set-name { font-size: 16.5px; }
.sets-grid .set-word { font-size: 28px; }
.series-jump { margin-top: 10px; }
.series-jump .pill { border: 0; font: inherit; font-size: 13px; cursor: pointer; }

/* Cuenta */
.narrow { max-width: 620px; }
.auth { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.auth form { display: flex; flex-direction: column; gap: 10px; }
.auth input, .profile input:not([type=checkbox]) { font: inherit; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); color: var(--ink); }
.auth input:focus, .profile input:focus { outline: none; border-color: var(--accent); }
.btn.wide { width: 100%; justify-content: center; }
.btn svg { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: 12.5px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sent { padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sync.ok { color: var(--pos); }
.sync.offline { color: var(--neg); }
.account-stats { display: flex; gap: 48px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.account-stats div, .set-stats div { display: flex; flex-direction: column; }
.profile { display: flex; flex-direction: column; gap: 16px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.profile label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }
.profile label small { font-weight: 400; }
.profile label.check { flex-direction: row; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink); font-weight: 500; letter-spacing: 0; }
.profile .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.prefix-field { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--field); padding-left: 18px; }
.prefix-field span { color: var(--ink-3); font-size: 15px; font-weight: 500; letter-spacing: 0; }
.prefix-field input { border: 0 !important; padding-left: 2px !important; flex: 1; min-width: 0; background: none !important; }
.prefix-field:focus-within { border-color: var(--accent); }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.account-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; }

/* Vitrina */
.showcase-head { padding: 48px 0 8px; }
.showcase-head h1 { margin: 10px 0 24px; }
.showcase-head .set-stats { display: flex; gap: 48px; flex-wrap: wrap; }
.showcase-head .actions { margin-top: 24px; }
.showcase-featured { display: grid; grid-template-columns: repeat(min(var(--n), 3), minmax(0, 260px)); justify-content: center; gap: 40px; margin-top: 56px; }
.summary-sets.wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 40px; }

/* Ficha: copias e historial */
.copies-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.copies-head .link.on { color: var(--accent); }
.hchart { width: 100%; max-width: 400px; height: auto; margin-top: 14px; overflow: visible; }
.hchart .line { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.hchart .area { fill: var(--accent); opacity: .08; }
.hchart.up .line { stroke: var(--pos); } .hchart.up .area { fill: var(--pos); } .hchart.up circle { fill: var(--pos); }
.hchart.down .line { stroke: var(--neg); } .hchart.down .area { fill: var(--neg); } .hchart.down circle { fill: var(--neg); }
.hchart text { font: 600 10.5px var(--sans); fill: var(--ink-2); }
.hchart text.axis { font-weight: 400; fill: var(--ink-3); }

/* Binder: elegir set */
.binder-sets { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.binder-sets select { max-width: 220px; }

.bottom-nav { display: none; }

/* Tableta */
@media (max-width: 980px) {
  .card-page { gap: 48px; }
  .details { gap: 48px; }
  .hero { gap: 32px; }
}

/* Móvil */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .top, main, .site-foot { width: calc(100% - 32px); }
  .top { padding-top: 16px; }
  .main-nav { display: none; }
  .top-row { gap: 10px; }
  .brand img { height: 28px; }
  .account-link span { display: none; }
  .account-link { padding: 7px; }
  .search { margin-top: 14px; }
  .search kbd { display: none; }
  .search input { padding-right: 18px; }

  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .hero-card { order: -1; width: min(250px, 72%); }
  .hero h1 { font-size: 42px; }
  .band { margin-top: 72px; }
  .sets-row { gap: 40px; }
  .sets-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
  .sets-grid .set-logo { height: 64px; }
  .series-jump { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px; scrollbar-width: none; }
  .showcase-featured { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .account-stats, .showcase-head .set-stats { gap: 28px; }
  .daily { grid-template-columns: 1fr; gap: 28px; }
  .daily-card { width: min(240px, 70%); }
  .how { grid-template-columns: 1fr; gap: 28px; }

  .set-head { grid-template-columns: 1fr; gap: 20px; padding-top: 28px; }
  .set-head-logo img { max-height: 90px; }
  .filters .pills { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px; scrollbar-width: none; }
  .filters .pills::-webkit-scrollbar { display: none; }
  .filters { flex-direction: column; align-items: stretch; }
  .selects { justify-content: space-between; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 26px 16px; }

  .card-page { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; }
  .card-visual { position: static; order: -1; }
  .card-stage { width: min(300px, 82%); }
  .card-title { font-size: 44px; }
  .price-main .price { font-size: 42px; }
  .price-mini { gap: 8px 24px; }
  .own-form { grid-template-columns: 1fr 1fr; }
  .details { grid-template-columns: 1fr; gap: 40px; }

  .summary { grid-template-columns: 1fr; gap: 28px; }
  .binder { gap: 8px; }
  .binder .round { width: 36px; height: 36px; }
  .binder-spread { grid-template-columns: 1fr; padding: 8px; }
  .binder-page { gap: 6px; padding: 10px 10px 26px; }

  .site-foot { padding-bottom: 110px; }
  #toast { bottom: 92px; }
  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: var(--surface);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
  }
  .bottom-nav a { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 8px 2px; border-radius: 12px; }
  .bottom-nav a.on { color: var(--ink); background: var(--chip); }
  .bottom-nav a { position: relative; }
  .bottom-nav .count-badge:not(:empty) { position: absolute; top: 0; right: 4px; min-width: 16px; height: 16px; font-size: 10px; margin: 0; }
}
