/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --navy-900: #04210f;
  --navy-800: #07371c;
  --navy-700: #0c4d27;
  --navy-600: #146633;
  --navy-400: #4caf7a;
  --navy-100: #d2f0dc;
  --navy-50:  #eafaf0;

  --gold-700: #8a6d00;
  --gold-600: #b38600;
  --gold-500: #d4af00;
  --gold-400: #ffdf00;
  --gold-200: #fff3b0;
  --gold-50:  #fffced;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white:    #ffffff;

  --green-500: #16a34a;
  --green-100: #dcfce7;
  --red-500: #dc2626;
  --blue-500: #3b82f6;
  --purple-500: #8b5cf6;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --transition: .2s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--gray-700);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-300);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow-md); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap; flex-shrink: 0;
  font-weight: 700; color: var(--navy-800);
}
.logo__img, .logo__svg { height: 36px; width: auto; }
.logo__title {
  font-size: 1.1rem; line-height: 1.2;
  display: flex; flex-direction: column;
}
.logo__title small {
  font-size: .7rem; font-weight: 500;
  color: var(--gold-600); letter-spacing: .5px;
}
.nav { display: flex; gap: 8px; }
.nav__link {
  padding: 6px 14px; border-radius: 999px;
  font-size: .85rem; font-weight: 500;
  color: var(--gray-700); transition: all var(--transition);
}
.nav__link:hover { background: var(--navy-50); color: var(--navy-700); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 4px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--gray-700); border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  color: var(--white); padding: 48px 0 40px; text-align: center;
}
.hero__inner { max-width: 700px; margin: 0 auto; }
.hero__title { font-size: 2rem; font-weight: 800; line-height: 1.2; }
.hero__title span { color: var(--gold-400); }
.hero__subtitle {
  margin-top: 12px; font-size: 1rem; color: rgba(255,255,255,.8);
  line-height: 1.5;
}

/* ============================================================
   VIEW TOGGLE
   ============================================================ */
body[data-view="landing"] .album-bar,
body[data-view="landing"] .stats-bar,
body[data-view="landing"] .filters,
body[data-view="landing"] .album-content,
body[data-view="landing"] .dupes-section { display: none !important; }

body[data-view="album"] .landing { display: none !important; }

body[data-view="loading"] .landing,
body[data-view="loading"] .album-bar,
body[data-view="loading"] .stats-bar,
body[data-view="loading"] .filters,
body[data-view="loading"] .album-content,
body[data-view="loading"] .dupes-section { display: none !important; }

/* ============================================================
   LANDING PAGE
   ============================================================ */
.landing { padding: 32px 0 48px; }
.landing__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; max-width: 800px; margin: 0 auto;
}
.landing__section {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-md);
}
.landing__title {
  font-size: 1.1rem; font-weight: 700;
  color: var(--navy-800); margin-bottom: 16px;
}
.landing__code-group {
  display: flex; gap: 8px;
}
.landing__code-input {
  flex: 1; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--gray-300); font-size: 1.1rem;
  font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  text-align: center; font-family: inherit; outline: none;
  transition: border-color var(--transition);
}
.landing__code-input:focus { border-color: var(--navy-400); }
.landing__code-input::placeholder {
  letter-spacing: 2px; font-weight: 500; color: var(--gray-400);
}
.landing__code-btn {
  padding: 12px 24px; border-radius: var(--radius-sm);
  background: var(--navy-700); color: var(--white);
  font-weight: 600; font-size: .9rem; border: none;
  transition: background var(--transition);
}
.landing__code-btn:hover { background: var(--navy-600); }
.landing__divider {
  text-align: center; margin: 20px 0; position: relative;
  color: var(--gray-400); font-size: .85rem;
}
.landing__divider::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--gray-200);
}
.landing__divider span {
  background: var(--white); padding: 0 12px; position: relative;
}
.landing__create-btn {
  width: 100%; padding: 14px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  color: var(--white); font-weight: 700; font-size: 1rem;
  border: none; transition: opacity var(--transition);
}
.landing__create-btn:hover { opacity: .9; }
.landing__empty {
  color: var(--gray-500); font-size: .9rem;
  text-align: center; padding: 24px 0;
}

/* Recent album cards */
.recent-albums { display: flex; flex-direction: column; gap: 8px; }
.recent-album {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200); background: var(--gray-50);
  transition: all var(--transition); gap: 12px;
}
.recent-album:hover { border-color: var(--navy-100); background: var(--navy-50); }
.recent-album__info { flex: 1; min-width: 0; }
.recent-album__name {
  display: block; font-weight: 600; font-size: .9rem;
  color: var(--gray-900); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.recent-album__code {
  display: block; font-size: .75rem; font-weight: 700;
  color: var(--gray-400); letter-spacing: 1px; margin-top: 2px;
}
.recent-album__actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.recent-album__mode {
  font-size: .7rem; font-weight: 600;
  color: var(--gray-400); padding: 2px 8px;
  border-radius: 999px; background: var(--gray-200);
}
.recent-album__mode--edit {
  color: var(--navy-700); background: var(--navy-100);
}
.recent-album__open {
  padding: 6px 14px; border-radius: 999px;
  background: var(--navy-700); color: var(--white);
  font-size: .75rem; font-weight: 600; border: none;
  transition: background var(--transition);
}
.recent-album__open:hover { background: var(--navy-600); }
.recent-album__remove {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--gray-300); background: var(--white);
  color: var(--gray-500); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); line-height: 1;
}
.recent-album__remove:hover {
  border-color: var(--red-500); color: var(--red-500);
  background: rgba(220,38,38,.05);
}

/* ============================================================
   ALBUM BAR
   ============================================================ */
.album-bar {
  background: var(--navy-900);
  padding: 10px 0;
}
.album-bar__row {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.album-bar__btn {
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: var(--white); font-size: .8rem; font-weight: 500;
  transition: all var(--transition); white-space: nowrap;
}
.album-bar__btn:hover {
  background: rgba(255,255,255,.2);
  border-color: var(--gold-400);
}
.album-bar__btn--share { color: var(--gold-400); }
.album-bar__btn--pin { color: var(--gold-400); }
.album-bar__name {
  font-size: .95rem; font-weight: 700;
  color: var(--white); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.album-bar__code {
  font-size: .75rem; font-weight: 700;
  color: var(--gold-400); letter-spacing: 1px;
  background: rgba(255,255,255,.1);
  padding: 3px 10px; border-radius: 999px;
}
.album-bar__mode {
  font-size: .7rem; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
}
.album-bar__mode--edit {
  color: var(--green-500); background: rgba(22,163,74,.15);
}
.album-bar__mode--readonly {
  color: var(--gray-300); background: rgba(255,255,255,.1);
}

/* ============================================================
   SHARE MODAL EXTRAS
   ============================================================ */
.share-link-group {
  display: flex; gap: 8px;
}
.share-link-input {
  flex: 1; padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300); font-size: .8rem;
  color: var(--gray-700); background: var(--gray-50);
  font-family: monospace; outline: none;
}
.share-link-btn {
  padding: 8px 16px; border-radius: var(--radius-sm);
  background: var(--navy-700); color: var(--white);
  font-size: .8rem; font-weight: 600; border: none;
  transition: background var(--transition); white-space: nowrap;
}
.share-link-btn:hover { background: var(--navy-600); }
.share-pin-group {
  display: flex; align-items: center; gap: 12px;
}
.share-pin-value {
  font-size: 1.5rem; font-weight: 800;
  color: var(--navy-800); letter-spacing: 4px;
  font-family: monospace;
}
.share-pin-note {
  font-size: .75rem; color: var(--gray-500);
  margin-top: 8px;
}
.share-whatsapp-btn {
  width: 100%; padding: 12px;
  border-radius: var(--radius-sm);
  background: #25D366; color: var(--white);
  font-size: .9rem; font-weight: 700; border: none;
  transition: opacity var(--transition);
}
.share-whatsapp-btn:hover { opacity: .9; }

/* ============================================================
   PIN INPUT
   ============================================================ */
.pin-input {
  width: 100%; padding: 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--gray-300); font-size: 1.8rem;
  font-weight: 800; letter-spacing: 8px; text-align: center;
  font-family: monospace; outline: none;
  transition: border-color var(--transition);
}
.pin-input:focus { border-color: var(--navy-400); }

/* ============================================================
   CREATED MODAL
   ============================================================ */
.created-info {
  display: flex; gap: 16px; margin-bottom: 16px;
}
.created-info__item {
  flex: 1; text-align: center; padding: 16px;
  border-radius: var(--radius-sm); background: var(--gray-50);
  border: 1px solid var(--gray-200);
}
.created-info__label {
  display: block; font-size: .75rem; font-weight: 600;
  color: var(--gray-500); margin-bottom: 6px; text-transform: uppercase;
  letter-spacing: .5px;
}
.created-info__value {
  display: block; font-size: 1.6rem; font-weight: 800;
  color: var(--navy-800); letter-spacing: 3px; font-family: monospace;
}
.created-info__value--pin { color: var(--gold-700); }
.created-warning {
  text-align: center; font-size: .85rem; font-weight: 600;
  color: var(--red-500); padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(220,38,38,.06);
  border: 1px solid rgba(220,38,38,.15);
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px; border-radius: 999px;
  background: var(--navy-900); color: var(--white);
  font-size: .85rem; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 300;
  transition: opacity .3s ease, transform .3s ease;
}
.toast[hidden] { display: block; opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(10px); }
.toast:not([hidden]) { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--hide { opacity: 0 !important; transform: translateX(-50%) translateY(10px) !important; }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  padding: 16px 0;
  position: relative; z-index: 10;
}
.stats-bar__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 12px;
}
.stat-card {
  background: var(--white); border-radius: var(--radius-md);
  padding: 16px 20px; box-shadow: var(--shadow-md);
  text-align: center;
}
.stat-card__value {
  display: block; font-size: 1.5rem; font-weight: 800;
  color: var(--navy-800);
}
.stat-card__label {
  display: block; font-size: .8rem; font-weight: 500;
  color: var(--gray-500); margin-top: 2px;
}
.stat-card__bar {
  margin-top: 8px; height: 6px; border-radius: 3px;
  background: var(--gray-200); overflow: hidden;
}
.stat-card__fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--navy-600), var(--gold-400));
  transition: width .4s ease; width: 0%;
}
.stat-card--pasted .stat-card__value { color: var(--green-500); }
.stat-card--missing .stat-card__value { color: var(--red-500); }
.stat-card--dupes .stat-card__value { color: var(--blue-500); }
.stat-card--special .stat-card__value { color: var(--purple-500); }

/* ============================================================
   FILTERS
   ============================================================ */
.filters { padding: 20px 0 12px; }
.filters__row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px;
}
.filter-group {
  display: flex; align-items: center; gap: 8px;
}
.filter-group__label {
  font-size: .85rem; font-weight: 600; color: var(--gray-700);
}
.filter-buttons { display: flex; gap: 4px; }
.filter-btn {
  padding: 6px 14px; border-radius: 999px;
  font-size: .8rem; font-weight: 500;
  background: var(--white); color: var(--gray-700);
  border: 1px solid var(--gray-300);
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--navy-400); color: var(--navy-700); }
.filter-btn.active {
  background: var(--navy-700); color: var(--white);
  border-color: var(--navy-700);
}
.search-input {
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--gray-300); font-size: .85rem;
  width: 280px; outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--navy-400); }
.btn-expand-all, .btn-clear {
  padding: 6px 14px; border-radius: 999px;
  font-size: .8rem; font-weight: 500;
  border: 1px solid var(--gray-300);
  background: var(--white); color: var(--gray-700);
  transition: all var(--transition);
}
.btn-expand-all:hover { border-color: var(--navy-400); color: var(--navy-700); }
.btn-clear { color: var(--red-500); border-color: var(--red-500); }
.btn-clear:hover { background: var(--red-500); color: var(--white); }

/* ============================================================
   ALBUM CONTENT - GROUPS & TEAMS
   ============================================================ */
.album-content { padding: 8px 0 40px; }

.group-section { margin-bottom: 32px; }
.group-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 2px solid var(--navy-100);
}
.group-header__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy-700); color: var(--gold-400);
  font-weight: 800; font-size: 1.1rem;
}
.group-header__title {
  font-size: 1.1rem; font-weight: 700; color: var(--navy-800);
}
.group-header__progress {
  margin-left: auto; font-size: .8rem; font-weight: 600;
  color: var(--gray-500);
}

.team-card {
  background: var(--white); border-radius: var(--radius-md);
  margin-bottom: 12px; box-shadow: var(--shadow-sm);
  overflow: hidden; transition: box-shadow var(--transition);
}
.team-card:hover { box-shadow: var(--shadow-md); }

.team-card__header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; cursor: pointer;
  border: none; background: none; width: 100%;
  text-align: left; font-family: inherit;
  transition: background var(--transition);
}
.team-card__header:hover { background: var(--gray-50); }
.team-card__flag { font-size: 1.6rem; flex-shrink: 0; }
.team-card__flag .fi { font-size: 1.4rem; border-radius: 3px; }
.team-card__name {
  font-size: 1rem; font-weight: 700; color: var(--gray-900);
  flex: 1;
}
.team-card__count {
  font-size: .8rem; font-weight: 600; color: var(--gray-500);
}
.team-card__count strong { color: var(--navy-700); }
.team-card__chevron {
  width: 20px; height: 20px; color: var(--gray-500);
  transition: transform var(--transition);
}
.team-card.open .team-card__chevron { transform: rotate(180deg); }
.team-card__progress {
  width: 80px; height: 4px; border-radius: 2px;
  background: var(--gray-200); overflow: hidden; flex-shrink: 0;
}
.team-card__progress-fill {
  height: 100%; border-radius: 2px;
  background: var(--green-500); transition: width .3s ease;
}

.btn-paste-all {
  display: block; width: 100%; margin-top: 12px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--green-500); background: var(--white);
  color: var(--green-500); font-size: .8rem; font-weight: 600;
  transition: all var(--transition);
}
.btn-paste-all:hover { background: var(--green-500); color: var(--white); }

.team-card__body { display: none; padding: 4px 16px 20px; }
.team-card.open .team-card__body { display: block; }

/* ============================================================
   STICKER GRID
   ============================================================ */
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

/* ============================================================
   STICKER CARD (Panini-style)
   ============================================================ */
.sticker {
  --sticker-color: var(--gray-500);
  position: relative;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--gray-300);
  background: var(--gray-100);
  padding: 8px 6px 6px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  aspect-ratio: 3 / 4;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}
.sticker:hover {
  border-color: var(--gray-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.sticker:active { transform: translateY(0); }

.sticker__local-num {
  font-size: .6rem; font-weight: 700;
  color: var(--gray-400); letter-spacing: .5px;
  position: absolute; top: 4px; left: 0; right: 0;
}

.sticker__avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
  color: rgba(255,255,255,.4);
  background: var(--gray-300);
  margin: 4px 0 2px;
  flex-shrink: 0;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.sticker__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}

.sticker__pos {
  font-size: .55rem; font-weight: 700;
  color: var(--gray-400); text-transform: uppercase;
  letter-spacing: .5px;
}
.sticker__name {
  font-size: .65rem; font-weight: 500;
  color: var(--gray-500); line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 100%;
}
.sticker__number {
  font-size: .55rem; font-weight: 600;
  color: var(--gray-400);
}

/* Collected state */
.sticker.collected {
  border-style: solid;
  border-color: var(--sticker-color);
  background: linear-gradient(180deg, color-mix(in srgb, var(--sticker-color) 8%, white) 0%, white 100%);
}
.sticker.collected .sticker__avatar {
  background: var(--sticker-color);
  color: rgba(255,255,255,.95);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--sticker-color) 40%, transparent);
}
.sticker.collected .sticker__local-num { color: var(--sticker-color); }
.sticker.collected .sticker__pos { color: var(--sticker-color); }
.sticker.collected .sticker__name { color: var(--gray-900); font-weight: 600; }
.sticker.collected .sticker__number { color: var(--gray-600); }

/* Special types */
/* Legacy silver/gold mapped to legend variants */
.sticker.special-legend-bronze {
  border-color: #b87333;
  background: linear-gradient(145deg, #fdf0e6, #f5dcc4);
}
.sticker.special-legend-bronze::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 4px;
  background: linear-gradient(135deg, transparent 30%, rgba(184,115,51,.25) 50%, transparent 70%);
  pointer-events: none;
  animation: shimmer 3s infinite;
}
.sticker.special-legend-silver {
  border-color: #8898a8;
  background: linear-gradient(145deg, #f0f2f5, #dde3ea);
}
.sticker.special-legend-silver::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 4px;
  background: linear-gradient(135deg, transparent 30%, rgba(136,152,168,.35) 50%, transparent 70%);
  pointer-events: none;
  animation: shimmer 3s infinite;
}
.sticker.special-legend-gold {
  border-color: var(--gold-500);
  background: linear-gradient(145deg, #fff9e0, #ffefb0);
}
.sticker.special-legend-gold::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 4px;
  background: linear-gradient(135deg, transparent 30%, rgba(255,215,0,.4) 50%, transparent 70%);
  pointer-events: none;
  animation: shimmer 3s infinite;
}
.sticker.special-parallel {
  border-color: #06b6d4;
  background: linear-gradient(145deg, #ecfeff, #cffafe);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.sticker.special-legend-bronze::after,
.sticker.special-legend-silver::after,
.sticker.special-legend-gold::after {
  background-size: 200% 100%;
}

/* Badges */
.sticker__badge-special {
  position: absolute; top: 3px; right: 3px;
  font-size: .65rem; line-height: 1; z-index: 1;
}
.sticker__badge-dupes {
  position: absolute; bottom: 3px; left: 3px;
  font-size: .55rem; font-weight: 700;
  background: var(--blue-500); color: var(--white);
  border-radius: 999px; padding: 1px 5px;
  line-height: 1.3; z-index: 1;
}
.sticker__badge-pasted {
  position: absolute; bottom: 3px; right: 3px;
  width: 16px; height: 16px;
  background: var(--green-500); color: var(--white);
  border-radius: 50%;
  font-size: .55rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; z-index: 2;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

/* Pasted state */
.sticker.pasted {
  border-color: var(--green-500);
  box-shadow: inset 0 0 0 1px rgba(22,163,74,.15);
}

/* Hidden by filter */
.sticker.hidden-filter { display: none; }

/* ============================================================
   INTRO SECTION (FIFA/stadiums)
   ============================================================ */
.intro-section { margin-bottom: 32px; }
.intro-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 2px solid var(--gold-200);
}
.intro-header__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold-500); color: var(--white);
  font-size: 1.2rem;
}
.intro-header__title {
  font-size: 1.1rem; font-weight: 700; color: var(--gold-700);
}
.intro-header__progress {
  margin-left: auto; font-size: .8rem; font-weight: 600;
  color: var(--gray-500);
}

/* ============================================================
   DUPLICATES SECTION
   ============================================================ */
.dupes-section { padding: 40px 0; background: var(--white); }
.section-title {
  font-size: 1.5rem; font-weight: 800;
  color: var(--navy-800); text-align: center;
}
.section-subtitle {
  text-align: center; color: var(--gray-500);
  font-size: .9rem; margin: 4px 0 24px;
}
.dupes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.dupe-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--gray-50); border: 1px solid var(--gray-200);
}
.dupe-item__number {
  font-size: .75rem; font-weight: 700;
  color: var(--navy-700); min-width: 50px;
}
.dupe-item__name {
  font-size: .8rem; color: var(--gray-700);
  flex: 1; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.dupe-item__count {
  font-size: .8rem; font-weight: 700;
  color: var(--blue-500); white-space: nowrap;
}
.no-dupes {
  text-align: center; color: var(--gray-500);
  padding: 40px 0; font-size: .95rem;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px; width: 100%; max-width: 380px;
  box-shadow: var(--shadow-lg); position: relative;
}
.modal__close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 1.5rem;
  color: var(--gray-500); line-height: 1;
}
.modal__close:hover { color: var(--gray-900); }
.modal__header {
  text-align: center; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--gray-200);
}
.modal__header-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  margin: 0 auto 10px; display: flex;
  align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800; color: #fff;
  position: relative; overflow: hidden;
}
.modal__header-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.modal__header-num {
  font-size: .8rem; font-weight: 700;
  color: var(--gray-500); display: block;
}
.modal__header-name {
  font-size: 1.2rem; font-weight: 700;
  color: var(--gray-900); display: block; margin-top: 4px;
}
.modal__header-team {
  font-size: .85rem; color: var(--gray-500);
  display: block; margin-top: 2px;
}
.modal__field { margin-bottom: 20px; }
.modal__label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--gray-700); margin-bottom: 8px;
}
.special-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.special-btn {
  padding: 6px 12px; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  border: 2px solid var(--gray-300);
  background: var(--white); color: var(--gray-700);
  transition: all var(--transition);
}
.special-btn:hover { border-color: var(--gray-500); }
.special-btn.active { border-color: var(--navy-700); background: var(--navy-50); color: var(--navy-800); }
.special-btn--legend-bronze.active { border-color: #b87333; background: #fdf0e6; }
.special-btn--legend-silver.active { border-color: #8898a8; background: #f0f2f5; }
.special-btn--legend-gold.active { border-color: var(--gold-500); background: #fff9e0; }
.special-btn--parallel.active { border-color: #06b6d4; background: #ecfeff; }

.pasted-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 16px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white); color: var(--gray-600);
  font-size: .85rem; font-weight: 600;
  transition: all var(--transition);
}
.pasted-toggle:hover { border-color: var(--gray-400); }
.pasted-toggle__check {
  width: 22px; height: 22px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; color: transparent;
  transition: all var(--transition);
  flex-shrink: 0;
}
.pasted-toggle.active {
  border-color: var(--green-500); background: var(--green-100); color: var(--green-500);
}
.pasted-toggle.active .pasted-toggle__check {
  background: var(--green-500); border-color: var(--green-500); color: var(--white);
}

.dupes-control {
  display: flex; align-items: center; gap: 16px;
  justify-content: center;
}
.dupes-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--gray-300); background: var(--white);
  font-size: 1.2rem; font-weight: 700; color: var(--gray-700);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.dupes-btn:hover { border-color: var(--navy-400); color: var(--navy-700); }
.dupes-value {
  font-size: 1.5rem; font-weight: 800;
  color: var(--blue-500); min-width: 40px; text-align: center;
}

.btn-remove {
  width: 100%; padding: 10px;
  border: 1px solid var(--red-500);
  border-radius: var(--radius-sm);
  background: var(--white); color: var(--red-500);
  font-size: .85rem; font-weight: 600;
  transition: all var(--transition);
}
.btn-remove:hover { background: var(--red-500); color: var(--white); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy-900); color: rgba(255,255,255,.6);
  padding: 24px 0; text-align: center; font-size: .8rem;
}
.footer .container { display: flex; justify-content: space-between; align-items: center; }
.footer__link { color: var(--gold-400); font-weight: 500; }
.footer__link:hover { text-decoration: underline; }

/* ============================================================
   COMPARE MODAL
   ============================================================ */
.modal--compare { max-width: 560px; max-height: 85vh; overflow-y: auto; }
.compare-loading { text-align: center; padding: 32px 0; color: var(--gray-500); }
.compare-summary { background: var(--gray-50); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; }
.compare-summary__info { font-size: .95rem; margin-bottom: 6px; }
.compare-summary__code { color: var(--gray-500); font-size: .8rem; margin-left: 6px; }
.compare-summary__stats { display: flex; gap: 12px; }
.compare-summary__stat { font-size: .85rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.compare-summary__stat--receive { background: var(--green-100); color: var(--green-500); }
.compare-summary__stat--give { background: #dbeafe; color: var(--blue-500); }
.compare-section { margin-bottom: 16px; }
.compare-section__title { font-size: .95rem; font-weight: 700; margin-bottom: 2px; }
.compare-section__title--receive { color: var(--green-500); }
.compare-section__title--give { color: var(--blue-500); }
.compare-section__desc { font-size: .75rem; color: var(--gray-500); margin-bottom: 8px; }
.compare-list { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.compare-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--gray-50); border-radius: var(--radius-sm); font-size: .85rem; }
.compare-item__num { font-weight: 700; color: var(--navy-700); min-width: 56px; }
.compare-item__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-item__team { color: var(--gray-500); font-size: .75rem; }
.compare-item__dupes { font-weight: 600; color: var(--gold-600); }
.compare-empty { text-align: center; color: var(--gray-500); font-size: .85rem; padding: 12px 0; }
.album-bar__btn--compare { background: var(--blue-500); color: var(--white); }
.album-bar__btn--compare:hover { background: #2563eb; }
.album-bar__btn--export { background: var(--green-500, #16a34a); color: var(--white); }
.album-bar__btn--export:hover { background: #15803d; }

/* EXPORT MODAL */
.modal--export { max-width: 420px; }
.export-buttons { display: flex; gap: 12px; margin-top: 8px; }
.export-btn {
  flex: 1; padding: 12px 16px; border: 2px solid var(--navy-700, #1e3a5f);
  border-radius: 8px; background: var(--white); color: var(--navy-900, #0c1f3f);
  font-size: .95rem; font-weight: 600; cursor: pointer; transition: all .15s;
}
.export-btn:hover { background: var(--navy-900, #0c1f3f); color: var(--white); }
.export-select {
  width: 100%; padding: 10px 12px; border: 2px solid var(--gray-300, #d1d5db);
  border-radius: 8px; font-size: .9rem; margin-top: 8px; background: var(--white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero { padding: 32px 0 28px; }
  .hero__title { font-size: 1.5rem; }
  .hero__subtitle { font-size: .9rem; }

  .landing__grid { grid-template-columns: 1fr; }
  .album-bar__row { gap: 6px; }
  .album-bar__name { font-size: .85rem; }

  .stats-bar__grid { grid-template-columns: 1fr 1fr; }
  .stat-card--total { grid-column: 1 / -1; }
  .stat-card__value { font-size: 1.2rem; }

  .filters__row { flex-direction: column; align-items: stretch; }
  .filter-group { flex-wrap: wrap; }
  .search-input { width: 100%; }

  .sticker-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
  }
  .sticker__avatar { width: 38px; height: 38px; font-size: .85rem; }
  .sticker__name { font-size: .6rem; }

  .nav { display: none; }
  .nav.open { display: flex; }
  .nav-toggle { display: flex; }

  .header__inner { height: 56px; }

  .nav.open {
    position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; background: var(--white);
    padding: 12px 20px; gap: 4px;
    border-bottom: 1px solid var(--gray-300);
    box-shadow: var(--shadow-md);
  }

  .dupes-grid { grid-template-columns: 1fr; }

  .footer .container { flex-direction: column; gap: 8px; }

  .created-info { flex-direction: column; gap: 10px; }
}

@media (max-width: 480px) {
  .stats-bar__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 12px 14px; }
  .stat-card__value { font-size: 1rem; }

  .sticker-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
  }
  .sticker__avatar { width: 32px; height: 32px; font-size: .75rem; }
  .sticker__name { font-size: .55rem; }

  .filter-buttons { flex-wrap: wrap; }

  .landing__section { padding: 20px; }
  .landing__code-input { font-size: .95rem; letter-spacing: 2px; padding: 10px 12px; }

  .album-bar__btn { padding: 5px 10px; font-size: .75rem; }
  .album-bar__code { display: none; }
}
