:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #12243d;
  background: #f3f6fb;
  font-synthesis: none;
  --ink: #12243d;
  --muted: #53637a;
  --line: #dbe4ef;
  --accent: #173b6d;
  --accent-wash: #e7effc;
  --accent-line: #a9bfdc;
  --focus: #376cb3;
  --surface: #f8faff;
  --green: #236747;
  --columnas-movil: 3;
}
:root[data-columnas-movil="2"] { --columnas-movil: 2; }
:root[data-columnas-movil="4"] { --columnas-movil: 4; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
body:has(.drawer[open]) { overflow: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 21px; font-weight: 760; letter-spacing: -.8px; }
.wordmark strong { color: var(--accent); }
.brand-icon { display: grid; place-items: center; width: 36px; height: 36px; color: white; background: var(--accent); border-radius: 11px; }
.brand-icon .icon { width: 22px; height: 22px; }
.build { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; color: var(--muted); }
.build span { width: 7px; height: 7px; border-radius: 50%; background: var(--focus); }

.hero { color: #fff; background: linear-gradient(118deg, #0b1e39, #112c50 70%, #1a4073); border-radius: 16px; margin-top: 18px; padding: 14px 12px; text-align: center; font-variant-numeric: tabular-nums; }
.hero h1 { font-size: clamp(25px, 4vw, 33px); font-weight: 800; letter-spacing: -.045em; line-height: 1.1; }
.hero select { min-height: 32px; margin-top: 6px; padding: 0 8px; color: #fff; background: #112c50; border-color: #7492bc; color-scheme: dark; text-align: center; font-weight: 650; }
.hero p { margin-top: 4px; color: #d2e3fb; font-size: 13px; }

.explorar { margin-top: 26px; }
.catalog-heading, .catalog-nav, .results-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.catalog-heading { justify-content: end; }
h2 { font-size: clamp(23px, 3vw, 31px); font-weight: 800; letter-spacing: -.045em; }
.filter-intro p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.tools { display: flex; align-items: center; gap: 8px; }
.search, .button { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.search { padding: 0 10px; color: var(--muted); }
.search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px var(--accent-wash); }
.search input { width: 202px; background: transparent; border: 0; outline: 0; color: var(--ink); font-size: 13px; padding: 7px 0; }
.button { padding: 0 12px; font-size: 13px; font-weight: 680; color: var(--ink); justify-content: center; white-space: nowrap; }
.button:disabled { opacity: .55; }
.button:hover { border-color: var(--accent-line); background: var(--surface); }
.button[aria-expanded="true"] { color: var(--accent); border-color: var(--accent-line); background: var(--accent-wash); }
.filter-count { min-width: 20px; padding: 2px 5px; border-radius: 6px; background: var(--accent); color: white; text-align: center; font-size: 11px; }
.catalog-nav { margin-top: 17px; border-bottom: 1px solid var(--line); padding-bottom: 10px; flex-wrap: wrap; }
.segments, .views, .pills { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.segments button, .views button, .pills button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 11px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 660; }
.segments button[aria-pressed="true"], .pills button[aria-pressed="true"] { background: var(--accent-wash); color: var(--accent); }
.segments button:hover, .views button:hover, .pills button:hover { color: var(--accent); }
.views { background: #e8eef6; padding: 2px; border-radius: 9px; }
.views button { min-height: 32px; }
.views button[aria-pressed="true"] { color: var(--ink); background: #fff; border-color: var(--line); }
.background-filter { display: flex; align-items: center; gap: 12px; padding: 11px 0 0; color: var(--muted); font-size: 13px; font-weight: 650; }
.background-tools { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.background-tools .background-filter { padding: 0; }
.background-explanation { margin: 6px 0 9px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.background-selectors { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.background-selectors .select-label { flex: 0 1 235px; min-width: 0; }
.pills button { min-height: 32px; }
.filter-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 15px; }
.filter-intro { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.filter-intro h3 { font-size: 16px; }
.filter-grid, .record-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 13px 0; }
.filter-grid select, .record-fields select, .background-selectors select { min-width: 0; width: 100%; }
.etiquetas-juego { min-width: 0; margin: 12px 0; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 9px; }
.etiquetas-juego legend { padding: 0 4px; font-size: 12px; font-weight: 700; }
.etiquetas-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.etiquetas-campos input { min-width: 0; width: 100%; min-height: 39px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 500; }
.etiquetas-campos small { color: var(--muted); font-size: 11px; font-weight: 500; }
.filter-footer, .species-settings-link { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.species-settings-link { margin: 12px 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; }
.species-settings-link .badge { margin-left: 4px; }
.species-settings { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.species-settings .record-fields { margin-bottom: 10px; }
.species-settings .check-label { color: var(--ink); font-weight: 700; }
.species-settings .section-note { margin-left: 25px; }
.select-label { display: grid; align-content: start; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 680; }
select { min-height: 39px; max-width: 100%; padding: 0 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.check-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.text-button { border: 0; background: none; color: var(--accent); padding: 4px 0; font-size: 13px; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.filter-summary { margin-top: 9px; color: var(--muted); font-size: 12px; }
.results-line { min-height: 39px; font-size: 12px; color: var(--muted); font-weight: 650; }
.pending-hint { color: #725016; text-align: right; }
.columnas-movil { display: none; }
.pending-explanation { margin-bottom: 11px; padding: 8px 10px; border-radius: 8px; background: #fff4da; color: #63461d; font-size: 12px; }
.confirmacion { width: min(440px, calc(100% - 32px)); padding: 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; }
.confirmacion::backdrop { background: #0b1e3966; }
.confirmacion p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.confirmacion strong { color: var(--ink); }
.confirmacion-botones { display: flex; justify-content: end; gap: 8px; margin-top: 16px; }
.button.button-accent { color: white; border-color: var(--accent); background: var(--accent); }
.button.button-accent:hover { background: #224e86; }

.generation-header { display: flex; align-items: center; gap: 10px; margin: 0 0 11px; padding: 3px 0; }
.generation-group + .generation-group { margin-top: 22px; }
.generation-icon { width: 48px; height: 48px; padding: 4px; object-fit: contain; border-radius: 11px; background: var(--accent-wash); }
.generation-header h3 { font-size: 20px; letter-spacing: -.025em; }
.generation-header p, .release-date { color: var(--muted); font-size: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.card { display: flex; flex-direction: column; text-align: left; min-width: 0; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; color: var(--ink); box-shadow: 0 2px 3px #24202b06; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { border-color: var(--accent-line); box-shadow: 0 7px 16px #12243d14; transform: translateY(-2px); }
.art { position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden; width: 100%; height: 126px; background: var(--art, #f8edcc); color: #353045; }
.art:not(.has-photo)::before { content: ""; position: absolute; z-index: -1; width: 98px; height: 98px; border: 1px solid #fff9; border-radius: 50%; box-shadow: 0 0 0 10px #fff3; }
.art.has-photo { background: #0b1e39; }
.art-background { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.tone-mint { --art: #e0f1e8; }
.tone-rose { --art: #f6e3e2; }
.tone-blue { --art: #e0edf8; }
.tone-violet { --art: #ebe3f8; }
.art-pokemon { width: 97px; height: 97px; object-fit: contain; filter: drop-shadow(0 7px 5px #29223c46); }
.art.has-photo .art-pokemon { filter: drop-shadow(0 4px 5px #2116269c); }
.art-placeholder { color: #63536d; }
.art-placeholder .icon { width: 42px; height: 42px; stroke-width: 1.2; }
.dex-no { position: absolute; z-index: 1; left: 10px; top: 10px; background: #fffc; color: #464153; border-radius: 6px; padding: 3px 6px; font-size: 11px; font-weight: 760; letter-spacing: .5px; }
.pikachu-card .dex-no { display: none; }
.card-info { display: flex; flex-direction: column; flex: 1; gap: 4px; width: 100%; padding: 11px 12px 10px; }
.card-info strong { font-size: 17px; letter-spacing: -.025em; }
.card-info .badge { align-self: start; }
.card-background { color: var(--muted); font-size: 12px; line-height: 1.3; }
.badges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 4px 0 2px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 6px; background: var(--accent-wash); color: var(--accent); font-size: 10.5px; font-weight: 730; line-height: 1.35; }
.badge .icon { width: 12px; height: 12px; }
.badge-costume { color: var(--accent); background: var(--accent-wash); }
.badge-especial { color: #67418b; background: #f0e8fa; }
.badge-lugar { color: #345a80; background: #e8f1f8; }
.badge-pending { color: #73501d; background: #fbf0d9; }
.badge-owned { color: var(--green); background: #e5f2ea; }
.badge-settings { color: var(--accent); background: var(--accent-wash); }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 7px; width: 100%; border-top: 1px solid var(--line); padding: 8px 12px; color: var(--muted); font-size: 12px; font-weight: 680; }
.card-bottom .icon { width: 16px; height: 16px; color: var(--accent); }
.empty { padding: 32px 12px; border: 1px dashed var(--accent-line); border-radius: 14px; text-align: center; }
.empty-icon { display: inline-grid; place-items: center; border-radius: 10px; width: 38px; height: 38px; background: var(--accent-wash); color: var(--accent); margin-bottom: 8px; }
.empty p { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }
footer { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--line); margin-top: 25px; padding: 15px 0; color: var(--muted); font-size: 12px; }

.drawer { width: min(540px, 100%); max-width: 100%; height: 100%; max-height: 100%; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: -12px 0 42px #0b1e3934; }
.drawer::backdrop { background: #0b1e3966; }
.drawer-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 12px 19px; background: #fff; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 720; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 700; }
.back-link .icon { width: 17px; height: 17px; transform: rotate(180deg); }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; }
.icon-button:hover { background: var(--accent-wash); }
.drawer .art { height: 155px; }
.drawer .art.has-photo { height: 225px; }
.drawer .art-background { object-fit: contain; }
.drawer .art-pokemon { width: 124px; height: 124px; }
.drawer .art.has-photo .art-pokemon { width: 144px; height: 144px; }
.drawer-body { padding: 17px 19px 24px; }
.drawer-body h2 { font-size: 28px; }
.drawer-body h3 { font-size: 16px; margin: 16px 0 7px; }
.drawer-body p { line-height: 1.45; }
.drawer-subtitle { font-size: 14px; font-weight: 680; margin: 3px 0; }
.drawer-context, .drawer-note, .section-note { color: var(--muted); font-size: 12px; margin: 5px 0 8px; }
.species-editions h3 span { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.edition-list { display: grid; gap: 6px; }
.edition-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 16px; align-items: center; gap: 8px; width: 100%; min-height: 57px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; text-align: left; }
.edition-row:hover { background: var(--surface); border-color: var(--accent-line); }
.edition-symbol { position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden; width: 48px; height: 44px; border-radius: 7px; }
.preview-background { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.preview-pokemon { width: 35px; height: 35px; object-fit: contain; filter: drop-shadow(0 2px 2px #29223c65); }
.edition-copy { display: grid; gap: 2px; overflow-wrap: anywhere; }
.edition-copy strong { font-size: 13px; }
.edition-copy span, .edition-progress { color: var(--muted); font-size: 11px; }
.edition-progress { font-weight: 650; white-space: nowrap; }
.edition-row > .icon { width: 15px; height: 15px; color: var(--accent); }
.registro-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 9px 0; }
.registro-campos fieldset { min-width: 0; margin: 0; padding: 5px 7px 7px; border: 1px solid var(--line); border-radius: 8px; }
.registro-campos legend { padding: 0 4px; font-size: 12px; font-weight: 700; }
.registro-campos legend small { color: var(--muted); font-size: 10px; font-weight: 500; }
.registro-opciones { display: flex; flex-wrap: wrap; gap: 3px 9px; }
.registro-opcion { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; cursor: pointer; font-size: 12px; }
.registro-opcion input { flex: none; margin: 0; }
.registro-actual > .section-note { margin: 0; }
.registro-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.registro-acciones .section-note { flex-basis: 100%; margin: 0; }
.bingo-grid { display: grid; gap: 7px; }
.bingo-cell { display: flex; flex-direction: column; align-items: stretch; min-height: 55px; background: white; border: 1px solid var(--line); border-radius: 10px; }
.bingo-cell[data-marcada="true"] { background: #eaf5ed; border-color: #b9d6c2; }
.bingo-top { display: flex; flex: 1; flex-wrap: wrap; }
.bingo-mark { display: flex; flex: 1; align-items: center; gap: 7px; padding: 8px; cursor: pointer; }
.bingo-mark input { flex: none; width: 19px; height: 19px; margin: 0; accent-color: var(--green); }
.bingo-mark strong { font-size: 12px; line-height: 1.25; }
.bingo-mark small { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }
.bingo-actions { display: flex; align-items: center; justify-content: end; gap: 5px; margin-left: auto; padding: 6px 7px 6px 0; }
.bingo-actions .icon-button { width: 32px; height: 32px; color: var(--green); }
.bingo-count, .bingo-total { color: var(--green); font-weight: 750; font-variant-numeric: tabular-nums; }
.bingo-count { min-width: 18px; text-align: center; font-size: 13px; }
.bingo-total { font-size: 12px; margin-left: 7px; }
.perfect-mark { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 34px; padding: 4px 8px; color: var(--ink); font-size: 12px; cursor: pointer; }
.bingo-cell .perfect-mark { border-top: 1px solid #b9d6c2; }
.perfect-mark input { flex: none; margin: 0; accent-color: var(--green); }
.perfect-mark select { min-height: 26px; font-size: 12px; }
.perfect-options { border: 1px solid var(--line); border-radius: 10px; background: white; }
.record-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.source-list { padding-left: 19px; margin: 5px 0; font-size: 13px; }
.source-list li { margin: 6px 0; }
.toast { z-index: 3; position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 24px); width: max-content; padding: 7px 10px; border-radius: 11px; background: #112c50; box-shadow: 0 4px 18px #0b1e3943; color: white; font-size: 13px; }
.toast button { border: 0; border-radius: 5px; padding: 6px; background: #fff2; color: #fff; font-weight: 690; }
.toast button.toast-close { display: grid; place-items: center; background: transparent; }
.toast-close .icon { width: 16px; height: 16px; }
.drawer .toast { left: auto; right: 12px; transform: none; }

@media (max-width: 1020px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1020px) {
  .card-grid { grid-template-columns: repeat(var(--columnas-movil), minmax(0, 1fr)); }
  .results-line { flex-wrap: wrap; }
  .columnas-movil { display: flex; align-items: center; gap: 5px; margin-left: auto; }
  .columnas-movil select { min-height: 32px; font-size: 16px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .catalog-heading { align-items: start; flex-direction: column; }
  .tools, .search { width: 100%; }
  .search input { width: 100%; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 24px); }
  .topbar-inner { min-height: 55px; }
  .hero { margin-top: 12px; padding-block: 12px; }
  .catalog-nav { gap: 6px; margin-top: 10px; }
  .segments button, .views button { padding-inline: 8px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { gap: 7px; }
  .art { height: 100px; }
  .art-pokemon { width: min(78px, 100%); height: 78px; }
  .art:not(.has-photo)::before { width: 78px; height: 78px; }
  .card-info { padding: 8px; }
  .card-bottom { padding: 7px 8px; }
  :root:not([data-columnas-movil="2"]) .card-info { padding: 6px; }
  :root:not([data-columnas-movil="2"]) .card-info strong { font-size: 13px; overflow-wrap: anywhere; }
  :root:not([data-columnas-movil="2"]) .card-background,
  :root:not([data-columnas-movil="2"]) .release-date { font-size: 10px; overflow-wrap: anywhere; }
  :root:not([data-columnas-movil="2"]) .card-bottom { padding: 6px; font-size: 10px; }
  :root:not([data-columnas-movil="2"]) .card-bottom > .icon { display: none; }
  :root[data-columnas-movil="4"] .card .art { height: 78px; }
  :root[data-columnas-movil="4"] .card .art-pokemon { height: 62px; }
  :root[data-columnas-movil="4"] .card .dex-no { left: 4px; top: 4px; padding: 2px 4px; font-size: 9px; }
  .drawer { border: 0; }
  .background-tools { padding: 10px; }
  .background-selectors .select-label { flex: 1 1 140px; }
  .edition-row { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .edition-row > .icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
@media (max-width: 420px) {
  .etiquetas-campos { grid-template-columns: 1fr; }
}
@media (max-width: 359px) {
  .species-settings .record-fields { grid-template-columns: 1fr; }
}
