/* ============ Mi Álbum Mundial 2026 ============ */
:root {
  --bg: #0d1117;         /* grafito */
  --bg-2: #11161d;
  --card: #161b22;
  --card-2: #1c232d;
  --line: #2a313c;
  --text: #e6edf3;
  --muted: #8b97a7;
  --accent: #5b8cff;     /* azul del logo */
  --accent-2: #c9a227;   /* dorado apagado */
  --gold: #c9a227;
  --ok: #3fb950;
  --dup: #d9863f;
  --danger: #f0626c;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 50% -200px, #1b2430 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* ---------- Cabecera ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, var(--bg-2), rgba(13, 17, 23, .96));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: max(12px, env(safe-area-inset-top)) 14px 10px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-ball { font-size: 32px; }
.brand-logo { width: 42px; height: 42px; flex: 0 0 auto; }
.brand h1 { font-size: 18px; margin: 0; letter-spacing: .2px; }
.brand-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

/* Selector de colección (cabecera) */
.coll-switch {
  width: 100%; margin-top: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 9px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: "Oswald", sans-serif; letter-spacing: .3px;
}
.coll-switch .coll-switch-act { color: var(--accent); font-weight: 700; }

/* Pantalla de Colecciones */
.collections {
  position: fixed; inset: 0; z-index: 110; overflow: auto;
  background: var(--bg);
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
.collections[hidden] { display: none; }
.coll-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.coll-head h2 { margin: 0; font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: 1px; font-size: 20px; }
.coll-x {
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text); font-size: 16px;
}
.coll-intro { color: var(--muted); font-size: 13px; margin: 0 0 14px; max-width: 560px; }
.coll-body { max-width: 560px; margin: 0 auto; }
.coll-fam {
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: 1.4px;
  font-size: 13px; color: var(--gold); margin: 16px 2px 8px;
}
.coll-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; text-align: left;
}
.coll-item.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(91, 140, 255, .4); }
.coll-item.is-soon { opacity: .68; }
.ci-text { display: flex; flex-direction: column; min-width: 0; }
.ci-title { font-size: 15px; font-weight: 700; }
.ci-sub { font-size: 12px; color: var(--muted); }
.ci-chip { flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 3px 9px; border-radius: 999px; }
.ci-chip.active { background: var(--accent); color: #0b1220; }
.ci-chip.ready { background: rgba(63, 185, 80, .18); color: #5fcf86; border: 1px solid rgba(63, 185, 80, .4); }
.ci-chip.soon { background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.coll-note { color: var(--muted); font-size: 12px; text-align: center; margin: 18px 0 0; }
.coll-item.shake { animation: shake .4s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

.menu { margin-left: auto; }
.menu-btn {
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 38px; height: 38px;
  font-size: 20px; line-height: 1;
  cursor: pointer;
}

/* Menú como hoja inferior con fondo oscuro (no tapa el contenido) */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 8, 18, .6);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
}
/* El atributo hidden debe ganar al display:flex de arriba */
.sheet-backdrop[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 480px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow);
  padding: 10px 14px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px;
  animation: sheetUp .2s ease;
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 42px; height: 4px; border-radius: 99px; background: var(--line); margin: 4px auto 8px; }
.sheet-title { margin: 0 4px 4px; font-size: 14px; color: var(--muted); }
.sheet button {
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  text-align: left; padding: 14px 16px; font-size: 15px; cursor: pointer; border-radius: 12px;
}
.sheet button:hover { background: #232b36; }
.sheet .danger { color: var(--danger); }
.sheet .sheet-close { text-align: center; color: var(--muted); background: none; }
.sheet-field { display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 8px; }
.sheet-field span { font-size: 12px; color: var(--muted); }
.sheet-field input {
  padding: 12px 14px; border-radius: 12px; font-size: 15px;
  background: #0d1117; border: 1px solid var(--line); color: var(--text);
}

/* ---------- Cuenta y nube ---------- */
.cloud-status { font-size: 11px; color: var(--muted); margin-top: 6px; min-height: 14px; }
.account-box {
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px; margin: 2px 0 4px;
  display: flex; flex-direction: column; gap: 8px;
}
.account-box .acc-title { font-size: 14px; font-weight: 700; }
.account-box .acc-help { margin: 0; font-size: 12px; color: var(--muted); }
.account-box .acc-email { font-size: 13px; color: var(--accent); word-break: break-all; }
.account-box .acc-status { font-size: 12px; color: var(--muted); }
.account-box input {
  padding: 12px 14px; border-radius: 12px; font-size: 15px;
  background: #0d1117; border: 1px solid var(--line); color: var(--text);
}
.account-box .acc-actions { display: flex; gap: 8px; }
.account-box .acc-actions button { flex: 1; text-align: center; }
.account-box .acc-actions .acc-primary {
  background: var(--accent); color: #0b1220; border-color: transparent; font-weight: 700;
}
.account-box .acc-msg { font-size: 12px; color: var(--muted); min-height: 14px; }
.account-box .acc-msg.err { color: var(--danger); }

/* ---------- Pantalla de bienvenida (login obligatorio) ---------- */
body.locked { overflow: hidden; }
body.locked .app-header,
body.locked .content,
body.locked .app-footer { display: none; }

.welcome {
  position: fixed; inset: 0; z-index: 100; overflow: auto;
  display: flex; align-items: center; justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(1000px 500px at 50% -150px, #1b2430 0%, transparent 60%),
    var(--bg);
}
.welcome[hidden] { display: none; }
.welcome-card {
  width: 100%; max-width: 420px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow);
  padding: 24px 20px; display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.welcome-logo { width: min(78%, 280px); height: auto; margin: 2px auto 4px; display: block; }
.welcome-card h1 { margin: 0; font-size: 26px; font-style: italic; letter-spacing: 1px; }
.welcome-feats .fk { color: var(--accent); font-weight: 800; margin-right: 8px; }
.welcome-tag { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.welcome-feats { list-style: none; padding: 0; margin: 2px 0; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.welcome-feats li { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.welcome-auth { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.welcome-auth input {
  padding: 13px 14px; border-radius: 12px; font-size: 15px;
  background: #0d1117; border: 1px solid var(--line); color: var(--text);
}
.welcome-auth .acc-actions { display: flex; gap: 8px; }
.welcome-auth .acc-actions button {
  flex: 1; padding: 13px; border-radius: 12px; font-size: 15px; cursor: pointer;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
}
.welcome-auth .acc-actions .acc-primary { background: var(--accent); color: #0b1220; border-color: transparent; font-weight: 700; }
.welcome-auth .acc-msg { font-size: 13px; color: var(--muted); min-height: 16px; }
.welcome-auth .acc-msg.err { color: var(--danger); }
.welcome-foot { margin: 0; color: var(--muted); font-size: 12px; }

/* ---------- Cabecera plegable (con botón flotante) ---------- */
body.header-collapsed .app-header { display: none; }

.header-fab {
  position: fixed; right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 90; width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #0b1220;
  border: none; box-shadow: var(--shadow);
  font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; opacity: .95;
}
.header-fab:active { transform: scale(.95); }
body.locked .header-fab { display: none; }

/* ---------- Aviso de "toca otra vez" (doble toque) ---------- */
.cell.arming {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(91, 140, 255, .25);
}
.cell .st-arm { color: var(--accent); font-weight: 700; }

/* ---------- Estilo "álbum oficial" ---------- */
/* Tipografía deportiva condensada para títulos y números. */
.brand h1, .welcome-card h1, .page-title, .group-label,
.progress-big, .stat-num, .tab, .page-prog {
  font-family: "Oswald", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.brand h1 { text-transform: uppercase; letter-spacing: .6px; font-weight: 700; font-style: italic; }
.tabs .tab { text-transform: uppercase; letter-spacing: .8px; font-size: 13px; }
.page-title { letter-spacing: .3px; }
.group-label { text-transform: uppercase; letter-spacing: 1.6px; }

/* Línea de acento superior, fina y sobria. */
.app-header { border-top: 2px solid rgba(91, 140, 255, .35); }

/* Distintivo "MUNDIAL 2026" (chip discreto). */
.brand-badge {
  display: inline-block; background: rgba(201, 162, 39, .12);
  color: var(--gold); border: 1px solid rgba(201, 162, 39, .45);
  font-weight: 700; font-size: 10px; letter-spacing: .8px;
  padding: 2px 7px; border-radius: 6px; vertical-align: middle; margin-right: 4px;
}

/* ---------- Atajo de banderas ---------- */
.flagbar {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 10px 2px 2px; margin-top: 6px; scrollbar-width: none;
}
.flagbar::-webkit-scrollbar { display: none; }
.flagbar[hidden] { display: none; }
.flagchip {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.flagchip:active { transform: scale(.94); }
.flagchip-special {
  background: linear-gradient(180deg, #1f2630, #161b22);
  border-color: var(--gold); font-size: 18px;
}
.flagchip-code {
  width: auto; min-width: 46px; padding: 0 10px;
  font-family: "Oswald", sans-serif; font-weight: 700; font-size: 12px;
  letter-spacing: .5px; color: var(--text);
}
.flagbar-sep {
  flex: 0 0 auto; align-self: center; color: var(--gold); font-weight: 700;
  font-size: 11px; letter-spacing: .5px; padding: 0 2px 0 8px;
  font-family: "Oswald", sans-serif;
}

/* ---------- Secciones plegables ---------- */
.page.collapsible .page-head { cursor: pointer; user-select: none; }
.page.collapsed .page-head { margin-bottom: 0; }
.page.collapsed .grid { display: none; }
.page-right { display: flex; align-items: center; gap: 8px; }
.page-chev {
  color: var(--muted); font-size: 12px; display: inline-block;
  transition: transform .18s ease;
}
.page.collapsible:not(.collapsed) .page-chev { transform: rotate(90deg); }

/* ---------- Mercado ---------- */
.mkt-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px; }
.mkt-fbtn {
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 7px 12px; font-size: 12px; cursor: pointer;
  font-family: "Oswald", sans-serif; letter-spacing: .4px;
}
.mkt-fbtn.active { background: var(--accent); color: #0b1220; border-color: transparent; font-weight: 700; }
.mkt-refresh { margin-left: auto; font-size: 15px; padding: 6px 12px; }
.mkt-mode-cambio { color: var(--accent); }
.mkt-mode-venta { color: var(--gold); }

/* Resumen destacado */
.mkt-hero {
  background: linear-gradient(180deg, #1b222c, #161b22);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px; font-size: 14px;
}

/* Tarjeta por coleccionista */
.ucard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.ucard-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ucard-id { font-size: 14px; font-weight: 700; font-family: "Oswald", sans-serif; min-width: 0; }
.ucard-need {
  font-size: 10px; font-weight: 800; color: #0b1220; background: var(--accent);
  padding: 2px 7px; border-radius: 999px; margin-left: 4px; white-space: nowrap;
}
.ucard-contact {
  flex: 0 0 auto; background: var(--accent); color: #0b1220; font-weight: 700;
  font-size: 13px; text-decoration: none; padding: 9px 16px; border-radius: 999px; white-space: nowrap;
}
.ucard-contact.wa { background: #25d366; color: #04331c; }
.ucard-contact.plain { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.ucard-nocontact { font-size: 12px; color: var(--muted); font-style: italic; white-space: nowrap; }

/* Mini-cromos */
.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.mc {
  position: relative; background: #0d1117; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 4px 7px; text-align: center;
}
.mc.need { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91, 140, 255, .25); }
.mc-need {
  position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 800; color: #0b1220; background: var(--accent);
  padding: 1px 6px; border-radius: 999px; white-space: nowrap;
}
.mc-flag { font-size: 24px; line-height: 1; }
.mc-code { font-family: "Oswald", sans-serif; font-weight: 700; font-size: 11px; color: var(--gold); margin-top: 4px; }
.mc-mode { font-size: 11px; font-weight: 700; margin-top: 2px; }

.album-tools { display: flex; justify-content: flex-end; padding: 0 2px 8px; }
.tool-btn {
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 6px 14px; font-size: 12px; cursor: pointer;
  font-family: "Oswald", sans-serif; letter-spacing: .6px;
}
.tool-btn:active { transform: scale(.97); }

/* ---------- Progreso ---------- */
.progress-box {
  margin-top: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.progress-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.progress-big {
  font-size: 30px; font-weight: 800; line-height: 1;
  background: linear-gradient(90deg, #5b8cff, #8a6bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.progress-count { font-size: 13px; color: var(--muted); }
.progress-bar {
  height: 14px; background: #0d1117;
  border: 1px solid var(--line); border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #5b8cff, #8a6bff);
  transition: width .35s ease;
}
.extra-prog {
  margin-top: 8px; font-size: 12px; color: var(--accent-2);
  font-weight: 600;
}

/* ---------- Estadísticas ---------- */
.stats { display: flex; gap: 8px; margin-top: 10px; }
.stat {
  flex: 1; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 6px; text-align: center;
}
.stat-dup { border-color: rgba(255, 140, 66, .5); }
.stat-dup .stat-num { color: var(--dup); }
.stat-num { display: block; font-size: 20px; font-weight: 700; }
.stat-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* ---------- Búsqueda ---------- */
.search-wrap { margin-top: 10px; }
#search {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  background: #0d1117; border: 1px solid var(--line); color: var(--text);
  font-size: 15px;
}
#search::placeholder { color: #6f86ad; }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 8px; margin-top: 10px; }
.tab {
  flex: 1; padding: 10px; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); font-size: 14px; font-weight: 600;
}
.tab.active {
  color: #0b1220; background: linear-gradient(180deg, var(--accent), #3f6fe0);
  border-color: transparent;
}

/* ---------- Contenido ---------- */
.content { padding: 14px; max-width: 980px; margin: 0 auto; }

.group-label {
  margin: 18px 4px 8px; font-size: 13px; font-weight: 700;
  color: var(--gold); text-transform: uppercase; letter-spacing: 1px;
}

.page {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.page-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.page-title small { color: var(--muted); font-weight: 500; font-size: 12px; }
.page-emoji { font-size: 20px; }
.page-prog {
  font-size: 12px; color: var(--muted);
  background: #0d1117; border: 1px solid var(--line);
  padding: 3px 9px; border-radius: 99px; white-space: nowrap;
}

/* ---------- Cuadrícula de cromos (estilo cromo premium) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}

.cromo {
  position: relative;
  border-radius: 14px;
  padding: 8px;
  min-height: 150px;
  cursor: pointer;
  user-select: none;
  display: flex; flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #1d2531 0%, #161b22 60%, #11161d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 3px 8px rgba(0, 0, 0, .3);
  transition: transform .08s ease;
}
.cromo:active { transform: scale(.96); }

.cromo-code {
  font-size: 11px; font-weight: 800; letter-spacing: .3px; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
}
.foil-dot { color: var(--gold); }

.cromo-face {
  flex: 1; display: flex; align-items: center; justify-content: center; margin: 4px 0;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 70%);
}
.cromo-flag { font-size: 42px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); }

.cromo-name {
  font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center; color: var(--text);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cromo-sub { font-size: 10px; color: var(--muted); text-align: center; margin-top: 1px; }
.cromo-state { text-align: center; margin-top: 6px; font-size: 10px; font-weight: 800; }
.st-ok { color: #5fcf86; }
.st-no { color: var(--muted); }

.cromo-actions { position: absolute; top: 5px; right: 5px; display: flex; gap: 4px; z-index: 3; }
.cromo-dup {
  position: absolute; top: 6px; left: 6px; z-index: 3;
  background: var(--dup); color: #2a1206; font-weight: 900; font-size: 11px;
  padding: 1px 7px; border-radius: 99px; box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

/* Estados de posesión */
.cromo.missing { opacity: .6; border-style: dashed; }
.cromo.missing .cromo-flag { filter: grayscale(1) opacity(.85); }
.cromo.owned {
  border-color: rgba(63, 185, 80, .45);
  background: linear-gradient(160deg, #18241c 0%, #141b18 60%, #11161d 100%);
}

/* Foil (escudos, FWC, Coca-Cola): brillo metálico sobrio + barrido suave */
.cromo.foil { border-color: rgba(201, 162, 39, .45); }
.cromo.foil .cromo-code { color: var(--gold); }
.cromo.foil .cromo-face {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .05), rgba(201, 162, 39, .12) 60%, rgba(255, 255, 255, .04)),
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 70%);
}
.cromo.foil::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: 0; z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
  transform: translateX(-160%) skewX(-18deg);
  animation: sweep 3.8s ease-in-out infinite; pointer-events: none;
}
@keyframes sweep {
  0% { transform: translateX(-160%) skewX(-18deg); }
  60%, 100% { transform: translateX(360%) skewX(-18deg); }
}

/* Coca-Cola / ultra rara */
.cromo.extra { border-color: rgba(224, 65, 75, .6); }
.cromo.extra .cromo-code { color: #ff8a90; }
.cromo.extra.owned { background: linear-gradient(160deg, #3a1620, #1f0e14); }

/* Página de extras (Coca-Cola) */
.extra-page { border-color: #6a2230; background: linear-gradient(180deg, #2a1418, var(--card)); }

@media (prefers-reduced-motion: reduce) {
  .cromo.foil::before { animation: none; }
}

.mini {
  width: 22px; height: 22px; border-radius: 7px;
  background: rgba(10, 20, 36, .85); border: 1px solid var(--line);
  color: var(--text); font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mini:hover { background: var(--card-2); }
.btn-dec { color: var(--dup); }
.btn-inc { color: var(--ok); }

/* ---------- Listas (Faltan / Repes) ---------- */
.list-summary {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px;
}
.list-summary b { color: var(--gold); }

.dup-list { display: flex; flex-direction: column; gap: 8px; }
.dup-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px;
}
.dup-no {
  font-weight: 800; color: var(--gold); min-width: 56px; text-align: center; white-space: nowrap;
  font-size: 13px;
  background: #0d1117; border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px;
}
.dup-info { flex: 1; min-width: 0; }
.dup-name { font-size: 14px; font-weight: 600; }
.dup-where { font-size: 12px; color: var(--muted); }
.dup-count { display: flex; align-items: center; gap: 8px; }
.dup-x { font-weight: 800; color: var(--dup); min-width: 28px; text-align: center; }
.dup-row { flex-direction: column; align-items: stretch; gap: 10px; }
.dup-top { display: flex; align-items: center; gap: 12px; }

/* Rareza */
.rar { font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.rar-ultra { background: rgba(224, 65, 75, .18); color: #ff8a90; }
.rar-rara { background: rgba(255, 210, 63, .16); color: var(--gold); }
.rar-comun { background: #20324f; color: var(--muted); }

/* Controles de cambio / venta */
.listing-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lst-btn {
  flex: 1; min-width: 110px; padding: 9px 10px; border-radius: 10px; cursor: pointer;
  background: #0d1117; border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 13px;
}
.btn-cambio.active { background: rgba(91, 140, 255, .18); border-color: var(--accent); color: #7ff0d8; }
.btn-venta.active { background: rgba(255, 210, 63, .16); border-color: var(--gold); color: var(--gold); }
.price-input {
  width: 110px; padding: 9px 10px; border-radius: 10px;
  background: #0d1117; border: 1px solid var(--gold); color: var(--text); font-size: 14px;
}

.empty {
  text-align: center; color: var(--muted); padding: 40px 20px; font-size: 15px;
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- Pie ---------- */
.app-footer {
  text-align: center; color: var(--muted); font-size: 12px;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  max-width: 720px; margin: 0 auto;
}
.app-footer b { color: var(--text); }
.footer-soon { color: var(--accent); }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .brand h1 { font-size: 20px; }
}
