/* Paleta provisoria: gris azulado oscuro como la subasta del juego + rojo de rareza 6 */
:root {
  --bg1: #1b242b;
  --bg2: #0d1216;
  --panel: #131a1f;
  --panel-2: #1a232a;
  --tile: #222d35;
  --tile-hover: #2a3740;
  --line: #2c3a44;
  --track: #0b0f12;
  --text: #e4ebf0;
  --text-dim: #8b9ba6;
  --red: #e94b3c;
  --red-dim: #8f2f27;
  --red-glow: rgba(233, 75, 60, 0.22);
  /* Etiqueta del nombre, como en la subasta del juego */
  --tag: rgba(135, 52, 52, 0.85);
  --missing: #c9a26a;
  --locked-overlay: rgba(9, 12, 15, 0.55);
  /* Color de marca del autor. Solo para el logo y la firma */
  --brand: #D4F53C;
  /* Tipografía condensada parecida a la del juego (Bahnschrift viene con Windows) */
  --font-ui: Bahnschrift, 'DIN Alternate', 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(ellipse at top, var(--bg1) 0%, var(--bg2) 65%);
  color: var(--text);
  font-family: var(--font-ui);
  min-height: 100vh;
  padding: 0;
}

.modal {
  max-width: 1080px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 100vh;
}

/* El sprite de íconos ocupa 0px y no se ve (estilo acá y no inline: lo exige la CSP) */
.sprite {
  position: absolute;
}

.modal-head {
  padding: 16px 26px;
  border-bottom: 1px solid var(--line);
}

/* Barra superior: logo del dev a la izquierda, switch de idioma a la derecha */
.head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

/* ===== LOGO / FIRMA ===== */
/* Space Grotesk — Copyright 2020 The Space Grotesk Project Authors (Florian Karsten).
   SIL Open Font License 1.1: https://openfontlicense.org */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/space-grotesk-latin.woff2) format('woff2');
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo .ico {
  width: 22px;
  height: 22px;
  color: var(--brand);
  transition: transform .25s ease;
}

.logo:hover .ico {
  transform: rotate(-8deg) scale(1.08);
}

/* ===== SELECTOR DE IDIOMA ES | EN | PT =====
   Un botón por idioma. La "pastilla" es el ::before del contenedor:
   se desliza 32px por cada posición según data-active. */
.lang-switch {
  position: relative;
  flex: none;
  display: flex;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  transition: border-color .2s;
}

.lang-switch:hover {
  border-color: var(--red);
}

.lang-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 30px;
  height: 22px;
  border-radius: 999px;
  background: var(--red);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}

.lang-switch[data-active="en"]::before {
  transform: translateX(32px);
}

.lang-switch[data-active="pt"]::before {
  transform: translateX(64px);
}

.lang-switch button {
  position: relative;
  width: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  transition: color .25s;
}

.lang-switch button:hover {
  color: var(--text);
}

.lang-switch button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

/* El idioma activo, en blanco sobre la pastilla roja */
.lang-switch button[aria-pressed="true"] {
  color: #fff;
}

.modal-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ===== AVISO (link compartido) ===== */
.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 26px;
  background: var(--red-glow);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.notice[hidden] {
  display: none;
}

.notice p {
  margin: 0;
  flex: 1 1 260px;
  line-height: 1.45;
}

.notice .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===== BOTONES ===== */
.btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.btn:hover {
  border-color: var(--red);
  color: var(--text);
}

.btn.primary {
  border-color: var(--red-dim);
  color: var(--text);
  background: rgba(233, 75, 60, 0.12);
}

.btn.primary:hover {
  background: var(--red-glow);
  border-color: var(--red);
}

.btn:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.btn.danger:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.btn:disabled:hover {
  border-color: var(--line);
  color: var(--text-dim);
}

/* ===== BARRA DE ACCIONES (backup y link) ===== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 26px;
  border-bottom: 1px solid var(--line);
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Mensaje de estado ("Guardado ✓", "Link copiado ✓"...): aparece y se desvanece solo */
.save-note {
  flex: 1 1 140px;
  min-height: 16px;
  font-size: 13px;
  color: var(--red);
  opacity: 0;
  transition: opacity .3s ease;
}

.save-note.show {
  opacity: 1;
}

/* En pantallas angostas los botones van primero y el mensaje debajo, para no dejar un renglón vacío arriba */
@media (max-width: 600px) {
  .save-note {
    order: 2;
    flex-basis: 100%;
    min-height: 14px;
  }
}

/* ===== SECCIÓN: COMÚN / LIMITADO ===== */
.section-bar {
  padding: 16px 26px 0;
}

.section-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.section-switch button {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: var(--panel-2);
  color: var(--text-dim);
  font-family: var(--font-ui);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .5px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.section-switch button + button {
  border-left: 1px solid var(--line);
}

.section-switch button:hover {
  color: var(--text);
}

.section-switch button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

/* la sección activa: fondo rojizo y línea roja abajo, como el tab activo del juego */
.section-switch button[aria-pressed="true"] {
  background: rgba(233, 75, 60, 0.14);
  border-bottom-color: var(--red);
  color: var(--text);
}

.section-switch .sec-count {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--text-dim);
}

.section-switch button[aria-pressed="true"] .sec-count {
  color: var(--red);
}

/* ===== PROGRESO ===== */
.progress-section {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.circle-wrap {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--track);
  flex-shrink: 0;
}

.circle-bar {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-inner {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.circle-inner .count {
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
  line-height: 1.1;
}

/* números al mismo tamaño que la barra "/": solo cambian color y grosor */
.circle-inner .count span {
  font-size: inherit;
  color: var(--text-dim);
  font-weight: 400;
}

.circle-inner .count #ownedCount {
  margin-right: 3px;
  color: var(--text);
  font-weight: 700;
}

.circle-inner .count #totalCount {
  margin-left: 3px;
}

.circle-inner .label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  text-align: center;
  line-height: 1.25;
  padding: 0 12px;
}

.stat-boxes {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.stat-box {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 20px;
  text-align: center;
  min-width: 100px;
}

.stat-box .num {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.stat-box.unowned .num {
  color: var(--missing);
}

.stat-box.value .num {
  color: var(--red);
}

.stat-box p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

/* Cuadro "No adquirido" funciona como filtro de faltantes */
.stat-box.clickable {
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.stat-box.clickable:hover {
  border-color: var(--missing);
}

.stat-box.clickable:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.stat-box.clickable.active {
  border-color: var(--missing);
  background: rgba(201, 162, 106, 0.14);
}

.filter-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--missing);
}

.filter-note .btn {
  padding: 4px 10px;
  font-size: 12px;
}

/* ===== BUSCADOR ===== */
/* Contenedor pegajoso: al hacer scroll el buscador queda arriba de la pantalla.
   Lleva el fondo del panel para que las tarjetas no se vean por detrás al pasar. */
.search-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 16px 26px 10px;
  background: var(--panel);
}

/* sombra suave abajo solo cuando ya está "pegado" (la pone app.js) */
.search-sticky.stuck {
  box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid var(--line);
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

/* lupa dentro del campo, a la izquierda */
.search-bar > .ico {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  transition: border-color .15s ease;
}

.search-bar input::placeholder {
  color: var(--text-dim);
}

.search-bar input:hover {
  border-color: var(--red-dim);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--red);
}

/* la ✕ nativa de Chrome no combina: usamos la nuestra */
.search-bar input::-webkit-search-cancel-button {
  appearance: none;
}

.search-clear {
  position: absolute;
  right: 6px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-clear[hidden] {
  display: none;
}

.search-clear:hover,
.search-clear:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.search-clear .ico {
  width: 16px;
  height: 16px;
}

/* ===== TABS POR CATEGORÍA ===== */
.cat-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 26px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  /* sin la barra de scroll blanca del sistema: fina y del color del panel */
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.cat-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-ui);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.cat-tab:hover {
  color: var(--text);
}

.cat-tab:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

.cat-tab .ctab-count {
  font-size: 11px;
  letter-spacing: 0;
}

.cat-tab.active {
  color: var(--text);
  border-bottom-color: var(--red);
}

.cat-tab.active .ctab-count {
  color: var(--red);
}

/* ===== BLOQUES POR CATEGORÍA ===== */
main {
  padding: 22px 26px 60px;
}

.cat-block {
  margin-bottom: 32px;
}

.cat-block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.cat-block-head h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.cat-block-head .cb-progress {
  font-size: 14px;
  color: var(--red);
  font-weight: 700;
}

.cat-bar {
  height: 4px;
  background: var(--track);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}

.cat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red-dim), var(--red));
}

/* ===== ITEMS =====
   Tarjeta tipo subasta: etiqueta con el nombre arriba a la izquierda, imagen centrada, valor abajo a la derecha. */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}

.item {
  position: relative;
  aspect-ratio: 4/3;
  background: linear-gradient(180deg, var(--tile) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  /* franja de rareza: borde inferior rojo, como la línea de los items en el juego */
  border-bottom: 3px solid var(--red);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  transition: background .15s ease, border-color .15s ease;
}

.item:hover {
  background: var(--tile-hover);
}

.item:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.item img {
  position: absolute;
  inset: 26px 14px 24px;
  width: calc(100% - 28px);
  height: calc(100% - 50px);
  object-fit: contain;
  transition: filter .2s ease;
}

/* Arriba a la izquierda: "VI" + etiqueta con el nombre, en fila */
.item-head {
  position: absolute;
  top: 5px;
  left: 5px;
  right: 34px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

/* Nivel de rareza copiado de la ficha del juego (colores medidos sobre una captura):
   letras macizas coral claro, palo seco grueso, filo rojo oscuro, y detrás una pincelada roja inclinada.
   paint-order: el filo se pinta debajo del relleno, así engorda hacia afuera sin comerse la letra. */
.tier-mark {
  position: relative;
  z-index: 0;
  flex: none;
  font-family: Bahnschrift, 'Arial Narrow', Arial, sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 1px;
  color: #ff7375;
  -webkit-text-stroke: 2.5px #6a2224;
  paint-order: stroke fill;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* la pincelada: un trazo oscuro inclinado detrás de las letras */
.tier-mark::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 28%;
  top: -14%;
  width: 42%;
  height: 104%;
  background: #873334;
  opacity: .85;
  border-radius: 2px;
  transform: skewX(-12deg);
}

.item.locked .tier-mark {
  opacity: .55;
}

.item-name {
  min-width: 0;
  background: var(--tag);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.3;
  padding: 1px 5px;
  border-radius: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-value {
  position: absolute;
  right: 7px;
  bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text);
  z-index: 2;
}

.item-value .ico {
  width: 13px;
  height: 13px;
  color: var(--text-dim);
}

/* Lo que todavía no tenés: en gris y apagado, la etiqueta sin color */
.item.locked img {
  filter: grayscale(1) brightness(0.45);
}

.item.locked .item-name {
  background: rgba(60, 72, 80, 0.85);
  color: var(--text-dim);
}

.item.locked .item-value {
  color: var(--text-dim);
}

.item.locked {
  border-bottom-color: var(--red-dim);
}

/* Lo que tenés: glow rojo suave */
.item.owned {
  border-color: var(--red-dim);
  border-bottom-color: var(--red);
  box-shadow: inset 0 0 22px var(--red-glow);
}

.item .owned-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: var(--red);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.item .owned-badge .ico {
  width: 13px;
  height: 13px;
}

/* Botón de info, arriba a la derecha */
.item .info-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: color .15s ease, background .15s ease;
}

.item .info-btn .ico {
  width: 18px;
  height: 18px;
}

.item .info-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.item .info-btn:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 0;
  color: #fff;
}

/* Viendo una colección ajena por link: los items no se pueden marcar (el detalle sí se puede ver) */
.view-mode .item {
  cursor: default;
}

.view-mode .item:hover {
  background: linear-gradient(180deg, var(--tile) 0%, var(--panel-2) 100%);
}

.item .img-fallback {
  position: absolute;
  inset: 26px 10px 24px;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
}

.item.img-broken img {
  display: none;
}

.item.img-broken .img-fallback {
  display: flex;
}

/* ===== DETALLE (dialog) ===== */
.item-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font-family: var(--font-ui);
}

.item-dialog[open] {
  display: grid;
  /* minmax(0, …): sin esto una imagen ancha agranda su columna y aparece scroll horizontal */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.item-dialog::backdrop {
  background: rgba(5, 8, 10, 0.78);
}

.dlg-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.dlg-close:hover,
.dlg-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.dlg-close .ico {
  width: 20px;
  height: 20px;
}

.dlg-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 24px;
  background: radial-gradient(circle at 50% 45%, rgba(233, 75, 60, 0.18) 0%, var(--tile) 55%, var(--panel-2) 100%);
}

.dlg-art img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.dlg-fallback {
  display: none;
  font-size: 18px;
  color: var(--text-dim);
  text-align: center;
}

.dlg-art.img-broken img {
  display: none;
}

.dlg-art.img-broken .dlg-fallback {
  display: block;
}

.dlg-body {
  padding: 22px 24px 24px;
}

.dlg-cat {
  margin: 0 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--red);
}

.dlg-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 36px 16px 0;
}

.dlg-title .tier-mark {
  font-size: 27px;
  -webkit-text-stroke-width: 4px;
}

.dlg-body h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
}

.dlg-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 16px;
}

.dlg-facts div {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 10px;
}

.dlg-facts dt {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.dlg-facts dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.dlg-label {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.dlg-maps[hidden] {
  display: none;
}

.dlg-maps ul {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
}

.dlg-desc {
  margin: 0 0 20px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  line-height: 1.6;
  color: #c4ced5;
}

.dlg-desc.empty {
  color: var(--text-dim);
  font-style: italic;
}

.dlg-toggle {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
}

.dlg-toggle[hidden] {
  display: none;
}

/* Celular: imagen arriba, datos abajo */
@media (max-width: 640px) {
  .item-dialog[open] {
    grid-template-columns: minmax(0, 1fr);
  }

  .dlg-art {
    min-height: 200px;
  }

  .dlg-art img {
    max-height: 220px;
  }
}

/* ===== FOOTER ===== */
footer {
  padding: 20px 26px 40px;
  text-align: center;
}

/* Firma del dev */
.dev-credit {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: .3px;
}

.dev-credit .signature {
  color: var(--brand);
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-weight: 700;
}

.credits {
  margin: 18px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-dim);
  opacity: .7;
}

/* ===== ÍCONOS ===== */
/* Íconos SVG del sprite (<symbol> al inicio del body). Toman el color de `color`. */
.ico {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

/* ===== CELULAR ===== */
@media (max-width: 600px) {

  .modal-head,
  .toolbar,
  .progress-section,
  main,
  footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cat-tabs {
    padding: 8px 16px 0;
  }

  .search-sticky {
    padding: 14px 16px 8px;
  }

  .section-bar {
    padding: 14px 16px 0;
  }

  /* en celular el selector ocupa todo el ancho, mitad y mitad */
  .section-switch {
    display: flex;
  }

  .section-switch button {
    flex: 1;
    justify-content: center;
  }

  .progress-section {
    justify-content: center;
  }

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

  .item-name {
    font-size: 11px;
  }

  .item-value {
    font-size: 11.5px;
  }
}
